{"_id":"@redwoodjs/project-model","_rev":"27-ac46c0739893f3c78a45061fc1908cdd","name":"@redwoodjs/project-model","dist-tags":{"latest":"0.13.0","canary":"0.13.1-canary.1"},"versions":{"0.1.0":{"name":"@redwoodjs/project-model","version":"0.1.0","license":"MIT","_id":"@redwoodjs/project-model@0.1.0","maintainers":[{"name":"thedavidprice","email":"npm@thedavidprice.com"},{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"}],"dist":{"shasum":"304fda84c6d19635717cca666ef5f5b285614c4a","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.1.0.tgz","fileCount":99,"integrity":"sha512-bSXKpDut1HT2l68jg3QbZvwMRGtUa2S5OY7b9QrZjk54sbfEmgK2KCFcKQsuVYrnep43GLxqVBkYcFHiJYudqw==","signatures":[{"sig":"MEQCIGSqpi+u0JtufEplkxEu8cjeoH61PrE9OrejNjruRdKeAiBtgBGIvymrRnN/N20ghPPzZJezO3vgbWLXJpDy7gEoVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":983271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAzjXCRA9TVsSAnZWagAA7jcP/jSgcLpnC7J1J6iP4HAY\nlO0X1aMUZHe1t8Dd2NL35UYW6MdGEo3E97a2XEV3XO/TMN5JO6hcDgfOPtKr\nZRFEF0vv535HK3o56A5DtGVUFMTC9DDlR43WWBnDSfEtu4Y1c6I+0OlbP7qI\nytcpOwEagQkj2SmdACFPRrxeKJWmA7282JofYTF4+mfuH97/X0hmpE0jJ3M5\nRSYk8dUIQ6YCru8W0qwsH4SPSTROUn1Lk3vwcTr1gmxFI3/AS9yeXMpBVu8G\nsNGFP7IABDpb3uDVpi4QEnXwwjsT58kD+uQx87kFvNcEI+s0JyXUMu2FfU4+\n/9MjZVpF1nBTcdYbEvIylCTqCaBdBbjd+9optqJDqAJm1y3TFmz/+LhihlXR\nhzrNQyrrQViBi/JmvSJ7diNu81EvLzLGKt7ds052LV4/PMW1LtAidki7oUl7\nNvpcSbxiYOLBJRUyq6AcHG0Fpbh+lH/lNQuRQqz1ywCfHWElkf0OlNlLAIL4\nNdd39QboD6H8i6Y1mcIupUtI0Rn43OsbPgT7OU2HWvs0umXZCA2BvLIWUQTE\nbSfYKxpn/C1Ar259C/3qylEqbu2CG1ZduBOO4d6P/4DaoqMwLWcL5hiYqs0B\ntX4SOUzzckMhDGqTS2nFk6SHgpfzkpYj9XjTpAsIW5OwyHbieGq6ZVnL5wHI\nf4PK\r\n=FP+9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/language-server.js","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"6.14.4","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio to provide IDE features - Other IDEs can leverage language-server.ts","directories":{},"_nodeVersion":"14.4.0","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.1.0_1594046678919_0.4026392336859068","host":"s3://npm-registry-packages"}},"0.12.1-canary.24":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.24","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.24","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"6c15de425e9c4f544cb6f13cce37423fafcc51ce","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.24.tgz","fileCount":40,"integrity":"sha512-L83QgyRDadiPw1X5TWNUTOURcYafwA9jCmCHzMQPH/vhUfjFE+Fo/9Mdq3PNptMmeKFpzJiJxyF4pNGKz99Ddw==","signatures":[{"sig":"MEUCID7AS9wRiKO6rGK6rGfD61JXqEfebk+ebbbEsSXbb6yGAiEAlPSXAIRGnSKLFXL7+ecZVToSpTqkvG059kklpb0gQMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB0B7CRA9TVsSAnZWagAAERgP/A6WudxqTiq27BsODbIe\nhN4w1GewZE/WRucPfjgGMwfeqemyi8EwpRSpvxkWkFaXvI/jZtvIGbahJw0N\nr9Smjm0rIpeub4Ctt2JDcbpbwXEljug/tiN2A13STnnGa6dehnMpIb98VM/H\nLPk6O6u6JJThy/QE6ch/YCR7/k3jMrd6yzOkxf4OtusnyD6lenoNfzEhlReV\n69oVlSj4AnaP1SW2Gim/X/1zIOh97hL/XtN0nA323ijWGfvLUY/ensBzgxfI\nNO7hemOesHC/oqczktzAO/ig+F59KShZU7eqmLo5Qqv7pt9q5MSPwyTChb/Q\n8Xa5/l55qWvMly0unEQl2znM4u8rL2GkuYtNRy21DQIqXAVfOAMdfDi+RyC4\nzoIcvRg5bc7n69CILT2L5/2lZEKlC+01+LsmooX/liwcwy0V1YcPmNerCKqb\nOonqLeYBlUyuYWadi+OkLRmi8juI95vUHuhushMjwSIuGxWI/QCC3vyjDngP\neikqpdtByjYsf4neZDH8NRTrc5/9K1qoKgl6VlrKN/HSWZPlLJP1MEnJ+3VS\niOGs6f+oQ2hbrBFswY6RzWh6bLyCXTpfBads7zDWfDQ2uPp/YGsFzP+6GjuC\nTbDrc5bAMQMH3TjtuIIPqTQAWnmTsJVF4a26IWh5+qaFMtjSFoYRGklfYDeq\ns5ES\r\n=dUA2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"6b8eaedc99d4f704307dee5c535dd28f85f64eda","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.24_1594310779286_0.8573803341547119","host":"s3://npm-registry-packages"}},"0.12.1-canary.25":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.25","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.25","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"6c30e69034740ba2c2130b5c65db9d88c5b27e38","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.25.tgz","fileCount":40,"integrity":"sha512-MtCfQL5AVPPcby8EXBHgUs/WiVp+8On9MrhqsCZ+L7uqYdJlIOrH6Vy5nixp1G0JpWFkLTWR9t2ef+58JM2hZw==","signatures":[{"sig":"MEQCIGeugTFP05Hu+DV3mPilSTlMIt01VSNbX6qBXQEv1/XMAiAIjpLeahmAfbtUSS8NwuS8icUAjhm7DiYwNvsIABXadg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB0gWCRA9TVsSAnZWagAA/OsP/ipDk8IGkLjKJ6nerM+P\nRQS2YWMGTtzpQnbIXClmEAUCauOYw2QrIAf5YJe0y1pFMa6q7iDP92rKyiDk\ndYoUA5rAY6RcpIAqcTfRUQVE5YBjVi7uLwLqy0m4d/rEvHWzJEotpCZy2OEz\n0sJBo+uLq/0ERGMd052kbeugKzFmCa5V5I9v4Zr3AD//JXARaLoTZV1o/9VV\ntfp1CAJmho7Kem1uPKNB8hy9vg8sFV9ayuKJKVEOtgCdj8XkZzE69b/oZ9QI\n7RNi2zS73HpyfUpaklCqghUvGrbJ+ckayB10pyF+r5med5FRdKGPhUgiSy82\nLlcaSInIfKbLsxBTJUuCeN28eGBdEJs7PR+lArmkHuFxwky+02RoHoAaLuYX\nj63xOIVwL4ERSF8zh5+47Fo7XpJ+/t4Z724Iax3RrxvlnSx8gd23RYt0XgmE\nBnKvQW2n+RBgqvtZZROzQKH0+CDdIcbdTXK2StYCTZl/bnYySWCW09hpALaE\n/lfpN44ZtHzaQsX1M5vA2gehIdsNWr9QaBntdrL8eb0bENVPJryCku7cTHfs\n6BKIXmiOZ8m6skpimgFlJ8lJGDXXTXMbNAqIsAsfilas2UvoTnRr82rzJRmt\nFGUUEO0gqMV/Jn4m4Vg2QGBgjL+JQohosg2QE8A6AAtTYZPFoVbll63ji2BV\nvmu7\r\n=wilg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"7b0fb8fb42e9dc3744da5be7e39d38f8a32afe09","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.25_1594312726132_0.053822365457146804","host":"s3://npm-registry-packages"}},"0.12.1-canary.26":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.26","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.26","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"97b3ee7e0f960c26c0c545d8086dd1356dfb4e18","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.26.tgz","fileCount":40,"integrity":"sha512-KuZd6z0ygbTmE7pRWm1XrUzsl2A+iU+mDeuyaMkPKY1pGJRT340y6Lv5Yc4bO2FtAtdUclCRhXr/2/Uev5+fYA==","signatures":[{"sig":"MEQCIFx5yzT/zaFLLVOuyMuwRMqQJkvtjQs3fSxXbVEvUdm6AiAKWXcGl85Jv6Ws8hGvcoUBeH7itQoGvnNp4xDd55QN2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB2H7CRA9TVsSAnZWagAAUIkQAIIBywiLdCnJF8xVXKcv\nIjPybRv/aSUsuUy0+yvYrJ1rpsilDsQydqCvZ9sDxEUKsiBfgIajSw+jvMQx\nLgVFHzfO3rj5ywl+ME6N30SgLw96/Z3+SNkypzDHi8aOkpWYzS2QM5w3bosC\nK3CwozKM1RLwt5c1nG8w8Sqv6TqyTU+TVLwh7kOABJSkb37+o9j68ft6AcBH\nHSTwcPxl00ZJwMDgYi6gjcW7uj6hQwG/Fo89BbCK3JAr3zb/A2KLldhRUNOA\nZtFcjxpkxL37Riwj2NAViBPphRXHDTVJRXC8IrJGR/pe+IBGy7rDD1oyvLH4\nCemY/KIHERtN2LO0ItyeIwl7ojBr0gaLaBLhh2viyrta7orbw0FbfSm3fka2\n16cWFvoJ8N+xZWzi1dswY7CgHmNOlsMVamJ10QdzA9t7hS6W3KnDjMH18JwG\n+Ut5J6OH9FJjFwbGeH1HsWRXqrs4Tz13+AerVkwiOneBsWtAasv5YmSkRkGC\nBi5jx0j05auHoxCc48hfX2zrI3cB7Z7F6Giz9HpJIjGqDDBAGAj2+xNWl07v\nFNwWVpB+iiiTSJM/h2Zz+bDk1tiPyObuNp1lSEEfDMLepapmqnoGOoyLoqtw\n0xNyBqNhE7LbKnPVdC4rABzoPU1LUW98gKB25ONSgqhRqBNJx9b0ui4THCpQ\nySyR\r\n=ECpV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"b8801465d91470f2fcb3f34cea6cada1444b7da1","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.26_1594319354458_0.005181944097482516","host":"s3://npm-registry-packages"}},"0.12.1-canary.27":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.27","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.27","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"0a1ac9f5109808d5b9b50c63f4abf62474e627ef","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.27.tgz","fileCount":40,"integrity":"sha512-Z3nNB1/9F5TIIWTEBhnoPEfed6vbyvOWMQrlITLxVtjcXVa9EIx18ggkH1+dlKBl/2hEfSn1R6OBVqadNMFl8g==","signatures":[{"sig":"MEYCIQCCiwSQY5ZIOpRLwu7/3BgbnKUN/HvzvrXjH/j4VsuMZQIhAKP1e/cQsoEF9LZG2+SWwp/u+Tktigw0pVRsXTObw/ZT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB3m0CRA9TVsSAnZWagAA9fQP/12dtKBpRyqE7uzGi2wr\n2atiC3Ci/TKd/UpoTIh2GFBOtljYg8LxBGbI9p/I4ukY+/Dr5T3sTNmxy5CH\nUEkCtPr5Np++NvY1ei2W80MZgdVPMprSJZuJ0r1hPvWx/Lfk/1P5JSQiov+t\ntDd9M0j4wNjyRf0uwvQI3+45bmyldW2+ftTaDfK4q2ccqW8YCX7Vpi68G4TY\nw/WHfpDp0oADIpGeds284e2iElyTE5b1uQWOS429fMaWWlwpjPJGkjYaBKfC\nzNBgJ483IGW2u5nsmwnXcw0+qopmI6FQDWTwr4OBk3EtQqjuvq3j5HTEiJlO\nVXVLQOGNQFSCGwBrZz1/+IPakYKUHdypbeAEkjyy2tor7Wb/YDLTHJo3bDUP\nLn94eR3ZaaGxftTt9TUyxo01pbIzVlLWBFdYSexrFPZUzT7WkwMmCC8gsldC\nEwgJ+ROkFz89vke0z5nyU2keKrpmYqbq63dLwEs70nsadiXf+IlPL423fF1M\nl3N0beg95QsJgwuENH4rVpxAeW5LPqTkXQly6rI5nHr5t49FWFK27hmTcj7N\njTpVq3v1geFX28KulzLLBpvZUp3DwyibaNJRYzC9iJ6rJeCbpv4t0iFfjOlz\nA6oiW7UjYexp3U2kpry9Jox8SpU4MajdQBdfOCsLsEsf3g4B0gsVqxcizpeY\n+1eB\r\n=TN2q\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"11347626269aba58b9de6f2c60380d096a94e97a","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.27_1594325428485_0.40851468113898237","host":"s3://npm-registry-packages"}},"0.12.1-canary.28":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.28","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.28","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"62dfddbd2caa02eee921043aabc4c25b18f89cd2","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.28.tgz","fileCount":40,"integrity":"sha512-lLhvt6e7tyKV8w+XKoV4rj3kxeIDaAONSHi0YPRb/Mrl+lbW1E4nFpmxl24knCRKoRZql4DTs1S+YmAq1vB3sQ==","signatures":[{"sig":"MEQCIH2Rs8RzKyWYo4qHfEUxC0f3zL28dX2FVKHQh2+mcx0jAiAgRF2i9MmnKtvyGWbyisJGYnqGg5m8fEQ5jgdXY95JyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB420CRA9TVsSAnZWagAApO4P/igHXwTSULTDLsvjzcZm\nlvYrhp8wuTN0aqkjKOYab78qxy+SPfc83/51mAwQgAu++Tuu813KPzOtCfHq\njUxcr8ZL0hd00Sl8rrm2Iip6uOYCve0nHI7o6Llvyfkr90v+FvIE4zuzuFO3\nIUPciS3djVRlJus2z10ORrKB44IeWlpueMx7aQ4ew/qvV48rvaseED0BTZEs\nK+wQ8kAgK+p2MeTWqARsm45ljWOQpA73PJCTJTrXTzqFnyXYzx9nPSX+m1fg\nWD6PZoD0v1Q07CqLxp2sFO5f5q5rAG56zmNuF3NsZmVm6Zqsf/vqazn6tcdf\nIFrY0LcVgTZfgPMZN908ezm1R93iFoZVadYmYQn9oU8jVEAs1ZnUJfvsOuvb\nemAQ7fI4uCrTnKJoIkxjUfUUGHjNZvevijamYNK6rkIExVSnEOLR0eQHPBUZ\n2+bxrb08fadwkeAvYUX3Yey6pzh3rNTmUfGEXURX7/YYcecLY8j6lU9EVauJ\nyafsHZJ3t+7XWu3sftC/xiid/r5XmZXz5UmJE0T0yQ3EMlrJAw96/D4b6ree\nGX6LHTsJVxGAY4F2M/39CrIQ0PetpBj7Ua3YJLiXlJ2p8dzPa1IWud3gpCjX\nO2LIII379b3NuRnBlTcvSMRSCdBvEYAYOJBmlpXeLMCi8GvHMN+y6jMZOhnk\n0lYR\r\n=8wsh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"afc68538fba9038067efb621f108c052b541b0a3","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.28_1594330548523_0.8410205643765707","host":"s3://npm-registry-packages"}},"0.13.0":{"name":"@redwoodjs/project-model","version":"0.13.0","license":"MIT","_id":"@redwoodjs/project-model@0.13.0","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"7c03d986a4658979dd8c335e75a63caecb769a19","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.13.0.tgz","fileCount":40,"integrity":"sha512-ohZlPXYydy1geHSr9M+9LJEU1qMEsTh2fNL9OjUAqOwxXRai50A5svwnzq7qRzIQbTPKyl3WnqdJac9Z3qXehg==","signatures":[{"sig":"MEUCIQDC7ancav6YGumDbJTKf+CeKBf6HdC2mKvX3ZEb+bzSFQIgD+Hw5wjNeHUwKScq4/4ARTPoc0YE4CeNyz2IF/iW4Q4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB7VyCRA9TVsSAnZWagAA8PkQAJ4txQ9P2Opry9pgM0hq\nOixX1OnP3EW7wTQs39ETADdC2OYDIXlrrK3AwczbAbzR1MOmVmD+Yks47rAM\nJbXtCxzopeAklWpF9sXR6eoJzw1fAUb1gSd2gwLnk5oyk8dNFafW2pthzWd1\nySefme5nJ+JLabO8Cml3rKSbgbjTmNVdVixXS+h6PQ6CSNnnkGbh32GwdN7k\nMYKRIHjJnkAnfGuWwc0wTtbLr5refutpUb5q4WPNk+H4EqVgHwul5JNnpAuh\n3dQeYD4ug0X1F1HADB6upQZtQTFU4YbfElsExbtDmpw9eHBFDI0jJPHmb/Ul\nAaSo8DEZ3uVu6Mmg1KHWYxWlNBzsRm6nhFvqJIfd8zukknDzJNlKx+RD92C9\njeSXiwawtSWtVMcTO90nHkbPqJnTX8kBLa6xDM6Lq0ZRF1gugocvnoesO+sp\nE5sMFhdOJ/Lbime8w/736hh/LvezmICZWKTSiyIM6NNbUCsiJKrWHp3ueDsQ\n2wiSQzNcRp+Ic63mgv6WC23m+VO6wk03zOQgxLhCGngkgPss2r4yJFvCUrcq\nxBU6lwDSZNWbB9uLycCy9GQN/zL3fpFUX9zOkD8QVw0L0EMkWWMGmOOMedFG\n4SZ+hdNOuv+IbYi8h7MhgaZbIz0a26Xm9xRH0bAi8vLB78kyYNIQI5vI8w8M\nCqu2\r\n=hMSF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","gitHead":"adab65a2629938338a0c5ffb945bffcd9a262e4f","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"thedavidprice","email":"npm@thedavidprice.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (darwin)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.13.0_1594340722283_0.1476871005699152","host":"s3://npm-registry-packages"}},"0.12.1-canary.29":{"name":"@redwoodjs/project-model","version":"0.12.1-canary.29","license":"MIT","_id":"@redwoodjs/project-model@0.12.1-canary.29","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"876b8716cfd15edfce7ae5c3fcb8bf5d5543d577","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.12.1-canary.29.tgz","fileCount":40,"integrity":"sha512-4c+10/cROcKxGwbs/+rn0SuWIfDXsfhfp5uD3/Q+0tWy/Hqc2VYdw4Pjqrg0J0X+8In4OiUJp4UVBqR555/nhQ==","signatures":[{"sig":"MEQCIDVwDMSQTg9ty0rchrE9WryArA4v5J4+FfwmEPWRTcCgAiBvN8mer2loTDdHs/ahuU6Ho81mkJkUxzSn63vZPSP0ew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB7WcCRA9TVsSAnZWagAAW5YP/iseoTfWS6djkQ9ZwsHK\nCs01UUKdkKA2WlA0ayzRNwKvf2/TPW/UICj5dyW5ZC0/F9vbY+4bFg9zNTgD\nEyyc04SHMm65a+yt2thVAzijRqIJx+5838CgUPsIoZNKrRwQfPf8j/TaFEhK\n/gckZe0uShgghLxVVJhh/rquxlEDRS8wsdsxhYbmnL7ahyQTAFI2e/ETeexe\n/0Z38/FeGyPoEZ1b4BHwa/0/2WCnCpiZpB7B5vIC8yPaRfEYStCkzdd8f41H\nYm71Ci1nMiKuhW3eUtlRAEAa9NYQOkgqw3fGlr3jrT0JDW31SnpNv/OOuG+8\niCCRwk2SU0junpdFx7bQ3OVgX4DI6CmPpGeQdWnVJc9S+uPvONvIfS2e2mUf\n5+c1mTgNL3iNkplhbf0jZkRjNTNw4nRgbpyA1DRSFvz9PeeEh0lEeG3uFSAR\njlhSWps5iJYVRMTM4DwviiakPK4Lq7jB2jH1yVep+zC2jL40vEmq70vClLtN\nto6jiKOASYTgT12xBx1MNKSh+UThWLmwwQekzLmRsjBY/FD87zVTd6U31196\n8jCeHpJLv8eZKtL6fUjs+06srIOWi5I8fyHiRLDfokHPkHaIvsKjM0EfeJh7\nocGiWjzsG7PVdYix7wHJRu8VYi/4QIO96+1cjjFIuGI1NxlDbCytEw54FL5Q\nH/x5\r\n=4Yxg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"b11686a4cd84713be7ca7a4e51100103f131196e","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.12.1-canary.29_1594340764312_0.38448208458257516","host":"s3://npm-registry-packages"}},"0.13.1-canary.0":{"name":"@redwoodjs/project-model","version":"0.13.1-canary.0","license":"MIT","_id":"@redwoodjs/project-model@0.13.1-canary.0","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"aee24c603ae9bbee0c2b0070d1651ac1b5efff4a","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.13.1-canary.0.tgz","fileCount":40,"integrity":"sha512-trqgT71hsZ25PUtpsYy/0+NF5YL4KkKbhBSSX6WhTAyebK+xG9Jfsnhl09QSZRxNhLFOLD7OUc1o2MTBLxvUwg==","signatures":[{"sig":"MEYCIQDNilFsweJTGzUr+2gHj6/ybh5L57i2x2BllMuZ6BjO0AIhAM76Ma6l/OUyRQDd1bWtCtbt+uSVyXsXlev0DSAwnIB2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB7X7CRA9TVsSAnZWagAAElgQAKRJ9UA8AMDcOIdzTzjq\nwcNLt6u94746Wfz2hV612pP0/CwqXTbVlYbwetWoMplUayxHpVusvfnmUfta\n6HODsKevyXgrEak1lHJOkNvdnzCVddz0EeP50cQNMerjHaXCCVsVU+S05t61\n03qcMEBRW/Dgs+FgJU/uS65UAFSyrmjMsB9TC3rpgXcJ2EDmcqwpbtiL//gX\ngefiTCW26+E5GbGTXLqZa7duMpXBdH4EVxNyqqithP1tRRZadyuGfmbOsyP6\n/ajhDRvby63od9jvUgl4GHu7wxa15dxMgxYDcfvj2l6hAAsR1VYrjozbuJvD\nLZ3MlxrCNov5iEftLzsboxvgds/vKgu9WWCrRh9crLx0tLPGIzLGMSYPlQz1\n/EaisrLxDgXUdjWdfdk82YQsIzgvsJPjhAK0GWDDxFCAnW8RYuL540QtWc6/\nN7hNvK71vmvPV92KBksJtTVu+wzldb9cqHOB7n9yDgXMvjnWhXfCQTowjwtX\n/iP4cbXLRADWiTfTm59tqFwF+zXeGM8wetzA+P3mlrFz8cWlwfmHQjDDbXXZ\ntjCLT9HIZF6eN1hzc4ca+z2mX6Vjl3Le5PqKGrupJ/Jsv887vgaAFnP7MfmU\n/+VpvmESdbNkhvh+9qKQzcL2OkKNPbsFI23WbpE1lv+2gRXqrwN0Rdlj+Nnt\nszZv\r\n=Lkrn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"adab65a2629938338a0c5ffb945bffcd9a262e4f","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.13.1-canary.0_1594340859401_0.8409104988168203","host":"s3://npm-registry-packages"}},"0.13.1-canary.1":{"name":"@redwoodjs/project-model","version":"0.13.1-canary.1","license":"MIT","_id":"@redwoodjs/project-model@0.13.1-canary.1","maintainers":[{"name":"cannikin","email":"cannikin@fastmail.com"},{"name":"mojombo","email":"tom@mojombo.com"},{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},{"name":"thedavidprice","email":"npm@thedavidprice.com"}],"dist":{"shasum":"89daa9745786a88527758206adadb3bbd1a861af","tarball":"https://registry.npmjs.org/@redwoodjs/project-model/-/project-model-0.13.1-canary.1.tgz","fileCount":41,"integrity":"sha512-iO2tydudbhd3P9YM7tN+SQw/az57d7aLWax4Dd0RGvBDCngqDUeRsqk381MXmvirwtHU400a+AMIesrHikgnhw==","signatures":[{"sig":"MEUCICITg0qEfcTTmd758DmsYZsIbvBsG9H1laJzp2FxMt0EAiEAmGD+RmUzdGAb4Pr+GWBxUv64hytZ5e/gBSWFPVsXI9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCCx3CRA9TVsSAnZWagAAsa8P/RXahN+hKiprsSqOm6LF\ne+Ld+SH1YohNzd75SdtSevn9823JoPXhq3FE6MZ3WAnA2+ROAeGEqLgIbv2f\nb6uh27/Maa7l7/VYtLvqrhRg5ZqaSBNdUjLPxICI3MxG38cmd+NyK7V0q7xn\n+i2y/XpDbC3qsrVNwt1dJYntJQxahkXxWWXn5Ug5ft2ajDNjuzIZ296uysKN\nrZtUqMbUxOURQpPOfVuSHhzQtt89pzpBvlTRPBYDNQjEut0oviZN5wM8mYZI\n+iFe03OGqwRtq903qGuwocGoMAPaxU4BKsr8l1n7aTGgzCe+69GCsG+g9/iV\nqVp2zgjNIzUj77xzRkwW0mUXeEeolakjkNJE0lPrLiFllo9s+nIOluow3SW0\ndYcTRGetPQEmqyF1T6xXz7in+u6Cx7GTRiZvvTa79/TwwSJAU+MS8MWG6Gbi\nSyb9wxY5z49g1DERwZZD87XlvzVS/0r5S+0m7MjQHaZ1P/jvVHvUZ7wur4/K\nd0kpe+m8SQOk4pS3Tn+oaxh3Jo0OzMbhoDD72LZqnq5OFZVRx3gSpoHzB6rV\nr+aCohlBxAmZzcn3N1jb0+OnkuQXa+8Caa1PDMc3wobvt7ydmuL82gAaayqf\nQ38in9/Ev0r4m4FV3HcHDnGYaaymT6OGf0C9cWVAsQyb+0GtnrGAhFxovHz0\nrtCH\r\n=vyxv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testPathIgnorePatterns":["/fixtures/","/dist/"]},"main":"dist/index.js","readme":"# Overview\n\n- Main validation layer/model for Redwood (used by the Redwood CLI and other tools)\n- Used by Decoupled Studio and other tools to provide IDE features\n\n## Structure\n\n- `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)\n- `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes.\n\n# Usage\n\nThe most common use-case is getting the diagnostics of a complete redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nasync function test() {\n  const project = getProject('/path/to/app')\n  for (const d of await project.collectDiagnostics()) {\n    console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)\n  }\n}\n// ...\n// error: Router must have only one \"notfound\" page\n// error: Duplicate path in router: '/about-us'\n// error: Parameter \"id\" in route '/product/{id}' does not exist on ProductPage\n// error: PostsCell is missing the \"Success\" exported const\n// error: Property \"emial\" does not exist on \"User\" model\n// warning: Unused page AboutUs.js\n```\n\nNote: Gathering _all_ diagnostics is expensive. It will trigger the creation of the complete project graph.\nYou can also traverse the graph to get more specific information.\n\nFor example: Iterating over the routes of a redwood project:\n\n```ts\nimport { getProject } from '@redwoodjs/project-model'\nconst project = getProject('/path/to/app')\nfor (const route of project.router.routes) {\n  console.log(route.path + (route.isPrivate ? ' (private)' : ''))\n}\n// /\n// /about\n// /product/{id}\n// /admin (private)\n```\n\n# Design Notes\n\n- The project is represented by an AST of sorts\n- Nodes are created lazily as the user traverses properties\n- There is extensive caching going on under the hood. **If the underlying project changes, you need to create a new project**\n\n## id\n\n- Each node in the graph has an `id` property.\n- ids are unique and stable\n- They are organized in a hierarchical fashion (so the graph can be flattened as a tree)\n- Requesting a node using its id will not require the complete project to be processed. Only the subset that is needed (usually only the node's ancestors). This is important to enable efficient IDE-like tooling to interact with the project graph and get diagnostics for quickly changing files.\n\nHere are some examples of ids:\n\n- (Project)\n  - id: `\"file:///project/root\"`\n    - router: (Router)\n      - id: `\"file:///project/root/web/src/Routes.js\"`\n      - routes[0]: (Route)\n        - id: `\"file:///project/root/web/src/Routes.js /home\"` (notice that this id has two elements - it is an \"internal\" node)\n\nAn id is \"usually\" a file or folder.\n\nAnatomy of an id:\n\n- An id is a string.\n- It has components separated by spaces.\n- the first component is always a file URI (or folder URI).\n- The rest are optional, and only exist when the node is internal to a file.\n\n## Mutations\n\n- The project graph is immutable: If the underlying files change, you must create a new project.\n- This allows us to keep the logic clean and focused on capturing the \"rules\" that are unique to a Redwood app (most importantly, diagnostics). Other concerns such as change management, reactivity, etc, can be added on top\n\n## Abstracting File System Access\n\nTo allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overriden via the Host interface.\n\n## Sync VS Async\n\nWhen possible, the project graph is constructed synchronously. There are only a few exceptions. This simplifies the domain logic and validations, which is the main driver behind the project model itself.\n","gitHead":"dbf25b27942b27b7566a391153b8efe5d4406f5a","scripts":{"test":"jest","build":"yarn cross-env NODE_ENV=production babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start","prettier":"prettier --write './src/**/*.{ts,tsx}'","test:watch":"yarn test --watch","build:types":"tsc --build --clean && tsc --build"},"_npmUser":{"name":"peter.pistorius","email":"peter.pistorius@gmail.com"},"_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","directories":{},"_nodeVersion":"12.18.1","dependencies":{"toml":"^3.0.0","lodash":"^4.17.15","graphql":"^15.1.0","enquirer":"2.3.6","ts-morph":"^7.1.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","lru-cache":"^5.1.1","proxyquire":"^2.1.3","@prisma/sdk":"^2.1.1","findup-sync":"^4.0.0","lodash-decorators":"^6.0.1","lazy-get-decorator":"^2.2.0","@redwoodjs/internal":"^0.8.2","vscode-languageserver":"^6.1.1","vscode-languageserver-types":"^3.15.1","vscode-languageserver-textdocument":"^1.0.1"},"eslintConfig":{"rules":{"import/order":"off","prefer-const":"off","no-case-declarations":"off","no-unused-expressions":"off","@typescript-eslint/no-this-alias":"off","@typescript-eslint/no-non-null-assertion":"off"},"extends":"@redwoodjs/eslint-config"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^12.12.0","@types/lodash":"^4.14.157","@types/vscode":"^1.46.0","@types/fs-extra":"^9.0.1","@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/project-model_0.13.1-canary.1_1594371191544_0.4845652352142722","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-07-06T14:44:38.703Z","modified":"2026-03-13T13:41:22.719Z","0.1.0":"2020-07-06T14:44:39.104Z","0.12.1-canary.24":"2020-07-09T16:06:19.404Z","0.12.1-canary.25":"2020-07-09T16:38:46.259Z","0.12.1-canary.26":"2020-07-09T18:29:14.540Z","0.12.1-canary.27":"2020-07-09T20:10:28.630Z","0.12.1-canary.28":"2020-07-09T21:35:48.629Z","0.13.0":"2020-07-10T00:25:22.413Z","0.12.1-canary.29":"2020-07-10T00:26:04.460Z","0.13.1-canary.0":"2020-07-10T00:27:39.656Z","0.13.1-canary.1":"2020-07-10T08:53:11.653Z"},"license":"MIT","description":"- Main validation layer/model for Redwood (used by the Redwood CLI and other tools) - Used by Decoupled Studio and other tools to provide IDE features","maintainers":[{"email":"peter.pistorius@gmail.com","name":"peter.pistorius"},{"email":"justnvdm@gmail.com","name":"justinvdm"}],"readme":"","readmeFilename":""}