@cedarjs/structure 2.2.1 → 2.2.2-next.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +8 -24
  2. package/dist/index.d.ts +3 -5
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +8 -23
  5. package/dist/model/RWCell.d.ts +4 -3
  6. package/dist/model/RWCell.d.ts.map +1 -1
  7. package/dist/model/RWCell.js +7 -8
  8. package/dist/model/RWComponent.d.ts +1 -1
  9. package/dist/model/RWComponent.d.ts.map +1 -1
  10. package/dist/model/RWComponent.js +2 -2
  11. package/dist/model/RWEnvHelper.d.ts +3 -7
  12. package/dist/model/RWEnvHelper.d.ts.map +1 -1
  13. package/dist/model/RWEnvHelper.js +33 -114
  14. package/dist/model/RWFunction.d.ts +1 -1
  15. package/dist/model/RWFunction.d.ts.map +1 -1
  16. package/dist/model/RWFunction.js +2 -2
  17. package/dist/model/RWLayout.d.ts +1 -1
  18. package/dist/model/RWLayout.d.ts.map +1 -1
  19. package/dist/model/RWLayout.js +2 -2
  20. package/dist/model/RWPage.d.ts +1 -1
  21. package/dist/model/RWPage.d.ts.map +1 -1
  22. package/dist/model/RWPage.js +2 -2
  23. package/dist/model/RWProject.d.ts +1 -4
  24. package/dist/model/RWProject.d.ts.map +1 -1
  25. package/dist/model/RWProject.js +17 -19
  26. package/dist/model/RWRoute.d.ts +3 -16
  27. package/dist/model/RWRoute.d.ts.map +1 -1
  28. package/dist/model/RWRoute.js +11 -137
  29. package/dist/model/RWRouter.d.ts +2 -6
  30. package/dist/model/RWRouter.d.ts.map +1 -1
  31. package/dist/model/RWRouter.js +10 -62
  32. package/dist/model/RWSDL.d.ts +2 -2
  33. package/dist/model/RWSDL.d.ts.map +1 -1
  34. package/dist/model/RWSDL.js +4 -4
  35. package/dist/model/RWSDLField.d.ts +3 -7
  36. package/dist/model/RWSDLField.d.ts.map +1 -1
  37. package/dist/model/RWSDLField.js +10 -59
  38. package/dist/model/RWService.d.ts +1 -1
  39. package/dist/model/RWService.d.ts.map +1 -1
  40. package/dist/model/RWService.js +2 -2
  41. package/dist/model/RWServiceFunction.d.ts +2 -2
  42. package/dist/model/RWServiceFunction.d.ts.map +1 -1
  43. package/dist/model/RWServiceFunction.js +5 -6
  44. package/dist/model/RWTOML.d.ts +2 -2
  45. package/dist/model/RWTOML.d.ts.map +1 -1
  46. package/dist/model/RWTOML.js +6 -6
  47. package/dist/model/util/process_env.d.ts +9 -18
  48. package/dist/model/util/process_env.d.ts.map +1 -1
  49. package/dist/model/util/process_env.js +25 -34
  50. package/dist/nodes.d.ts +62 -0
  51. package/dist/nodes.d.ts.map +1 -0
  52. package/dist/nodes.js +175 -0
  53. package/dist/x/Location.d.ts +9 -0
  54. package/dist/x/Location.d.ts.map +1 -0
  55. package/dist/x/Location.js +18 -0
  56. package/dist/x/Position.d.ts +12 -0
  57. package/dist/x/Position.d.ts.map +1 -0
  58. package/dist/x/Position.js +35 -0
  59. package/dist/x/Range.d.ts +8 -0
  60. package/dist/x/Range.d.ts.map +1 -0
  61. package/dist/x/Range.js +22 -0
  62. package/dist/x/{vscode-languageserver-types.d.ts → diagnostics.d.ts} +27 -36
  63. package/dist/x/diagnostics.d.ts.map +1 -0
  64. package/dist/x/{vscode-languageserver-types.js → diagnostics.js} +30 -135
  65. package/dist/x/path.d.ts +1 -0
  66. package/dist/x/path.d.ts.map +1 -1
  67. package/dist/x/path.js +25 -17
  68. package/dist/x/prisma.d.ts +2 -3
  69. package/dist/x/prisma.d.ts.map +1 -1
  70. package/dist/x/prisma.js +5 -5
  71. package/package.json +3 -8
  72. package/dist/hosts.d.ts +0 -23
  73. package/dist/hosts.d.ts.map +0 -1
  74. package/dist/hosts.js +0 -44
  75. package/dist/ide.d.ts +0 -122
  76. package/dist/ide.d.ts.map +0 -1
  77. package/dist/ide.js +0 -240
  78. package/dist/interactive_cli/RedwoodCommandString.d.ts +0 -20
  79. package/dist/interactive_cli/RedwoodCommandString.d.ts.map +0 -1
  80. package/dist/interactive_cli/RedwoodCommandString.js +0 -72
  81. package/dist/interactive_cli/command_builder.d.ts +0 -10
  82. package/dist/interactive_cli/command_builder.d.ts.map +0 -1
  83. package/dist/interactive_cli/command_builder.js +0 -196
  84. package/dist/interactive_cli/dry_run.d.ts +0 -28
  85. package/dist/interactive_cli/dry_run.d.ts.map +0 -1
  86. package/dist/interactive_cli/dry_run.js +0 -104
  87. package/dist/interactive_cli/ui.d.ts +0 -32
  88. package/dist/interactive_cli/ui.d.ts.map +0 -1
  89. package/dist/interactive_cli/ui.js +0 -84
  90. package/dist/language_server/RWLanguageServer.d.ts +0 -30
  91. package/dist/language_server/RWLanguageServer.d.ts.map +0 -1
  92. package/dist/language_server/RWLanguageServer.js +0 -201
  93. package/dist/language_server/commands.d.ts +0 -14
  94. package/dist/language_server/commands.d.ts.map +0 -1
  95. package/dist/language_server/commands.js +0 -122
  96. package/dist/language_server/diagnostics.d.ts +0 -10
  97. package/dist/language_server/diagnostics.d.ts.map +0 -1
  98. package/dist/language_server/diagnostics.js +0 -61
  99. package/dist/language_server/outline.d.ts +0 -7
  100. package/dist/language_server/outline.d.ts.map +0 -1
  101. package/dist/language_server/outline.js +0 -37
  102. package/dist/language_server/start.d.ts +0 -2
  103. package/dist/language_server/start.d.ts.map +0 -1
  104. package/dist/language_server/start.js +0 -4
  105. package/dist/language_server/xmethods.d.ts +0 -11
  106. package/dist/language_server/xmethods.d.ts.map +0 -1
  107. package/dist/language_server/xmethods.js +0 -42
  108. package/dist/model/util/advanced_path_parser.d.ts +0 -12
  109. package/dist/model/util/advanced_path_parser.d.ts.map +0 -1
  110. package/dist/model/util/advanced_path_parser.js +0 -38
  111. package/dist/outline/index.d.ts +0 -3
  112. package/dist/outline/index.d.ts.map +0 -1
  113. package/dist/outline/index.js +0 -31
  114. package/dist/outline/outline.d.ts +0 -4
  115. package/dist/outline/outline.d.ts.map +0 -1
  116. package/dist/outline/outline.js +0 -262
  117. package/dist/outline/types.d.ts +0 -87
  118. package/dist/outline/types.d.ts.map +0 -1
  119. package/dist/outline/types.js +0 -72
  120. package/dist/x/vscode-languageserver-types.d.ts.map +0 -1
  121. package/dist/x/vscode-languageserver.d.ts +0 -12
  122. package/dist/x/vscode-languageserver.d.ts.map +0 -1
  123. package/dist/x/vscode-languageserver.js +0 -61
  124. package/dist/x/vscode.d.ts +0 -126
  125. package/dist/x/vscode.d.ts.map +0 -1
  126. package/dist/x/vscode.js +0 -294
package/README.md CHANGED
@@ -2,22 +2,21 @@
2
2
 
3
3
  # Overview
4
4
 
5
- - The @redwoodjs/structure package lets you build, validate and inspect an object graph that represents a complete Redwood project
6
- - It is used by the CLI and by VSCode extensions to provide IDE features such as diagnostics, code-fixes, etc.
5
+ - The @cedarjs/structure package lets you build, validate and inspect an object graph that represents a complete Cedar project
6
+ - It is used by the CLI to provide features such as diagnostics.
7
7
  - **IMPORTANT:** This is an **internal** and **development-time only** package
8
- - You **cannot** "import it" into a normal redwood app
8
+ - You **cannot** "import it" into a normal cedar app
9
9
 
10
10
  ## Code
11
11
 
12
12
  - `/model/*`: The main API and classes (such as RWProject, RWPage, RWService, etc)
13
- - `/language_server/*`: A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation that wraps the `model` classes. More info [here](./src/language_server/README.md)
14
- - We use [vscode-languageserver-types](https://www.npmjs.com/package/vscode-languageserver-types) where possible (to represent Document URIs, Positions, Ranges, Diagnostics, etc)
13
+ - `/x/types.ts`: Core types for representing the project graph (Ranges, Positions, Locations, Diagnostics, etc)
15
14
 
16
15
  # Usage
17
16
 
18
17
  ## Diagnostics
19
18
 
20
- The most common use-case is getting the diagnostics of a complete Redwood project:
19
+ The most common use-case is getting the diagnostics of a complete Cedar project:
21
20
 
22
21
  ```ts
23
22
  import { getProject } from '@cedarjs/structure'
@@ -42,7 +41,7 @@ Note: Gathering _all_ diagnostics is expensive. It will trigger the creation of
42
41
 
43
42
  You can also traverse the graph to get more detailed information on multiple aspects of your app.
44
43
 
45
- For example, iterating over the routes of a Redwood project:
44
+ For example, iterating over the routes of a Cedar project:
46
45
 
47
46
  ```ts
48
47
  import { getProject } from '@cedarjs/structure'
@@ -70,7 +69,7 @@ async function test() {
70
69
  - Each node in the graph has an `id` property.
71
70
  - ids are unique and stable
72
71
  - They are organized in a hierarchical fashion (so that `child.id.startsWith(parent.id) === true`)
73
- - 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.
72
+ - 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 tooling to interact with the project graph and get diagnostics for quickly changing files.
74
73
 
75
74
  ```ts
76
75
  import { getProject } from '@cedarjs/structure'
@@ -99,28 +98,13 @@ Anatomy of an id:
99
98
  - The first component is always a file URI (or folder URI).
100
99
  - The rest are optional, and only exist when the node is internal to a file.
101
100
 
102
- ## Abstracting File System Access
103
-
104
- To allow use cases like dealing with unsaved files in IDEs, some filesystem methods can be overridden via the Host interface.
105
-
106
- ```ts
107
- import { Host, getProject } from '@cedarjs/structure'
108
- const myHost: Host {
109
- readFileSync(path:string){
110
- // ...
111
- }
112
- // ...
113
- }
114
- const project = getProject('/path/to/project', myHost)
115
- ```
116
-
117
101
  ## Sync VS Async
118
102
 
119
103
  When 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.
120
104
 
121
105
  ## Parsing Invalid Projects
122
106
 
123
- - It is possible to obtain a graph for an invalid/malformed Redwood project. This is by design since one of the main goals of this package is to provide a foundation for IDEs, which must support projects in invalid states
107
+ - It is possible to obtain a graph for an invalid/malformed Cedar project. This is by design since one of the main goals of this package is to provide a foundation for tooling, which must support projects in invalid states
124
108
  - If you want to check for structural validity, gather all diagnostics and look for errors.
125
109
 
126
110
  ```ts
package/dist/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- export { DiagnosticSeverity } from 'vscode-languageserver-types';
2
- export { DefaultHost, Host } from './hosts';
1
+ export { DiagnosticSeverity } from './x/diagnostics';
3
2
  export { RWProject, RWRoute } from './model';
4
3
  export { URL_file } from './x/URL';
5
- import { DefaultHost } from './hosts';
6
4
  import { RWProject } from './model';
7
- import type { GetSeverityLabelFunction } from './x/vscode-languageserver-types';
8
- export declare function getProject(projectRoot: string, host?: DefaultHost): RWProject;
5
+ import type { GetSeverityLabelFunction } from './x/diagnostics';
6
+ export declare function getProject(projectRoot: string): RWProject;
9
7
  export declare function printDiagnostics(projectRoot: string, opts?: {
10
8
  getSeverityLabel?: GetSeverityLabelFunction;
11
9
  }): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAG/E,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,cAAoB,aAKvE;AAED,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;CAAE,iBA8BvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAG/D,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,aAI7C;AAED,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;CAAE,iBA8BvD"}
package/dist/index.js CHANGED
@@ -4,22 +4,10 @@ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/defi
4
4
  _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- _Object$defineProperty(exports, "DefaultHost", {
8
- enumerable: true,
9
- get: function () {
10
- return _hosts.DefaultHost;
11
- }
12
- });
13
7
  _Object$defineProperty(exports, "DiagnosticSeverity", {
14
8
  enumerable: true,
15
9
  get: function () {
16
- return _vscodeLanguageserverTypes.DiagnosticSeverity;
17
- }
18
- });
19
- _Object$defineProperty(exports, "Host", {
20
- enumerable: true,
21
- get: function () {
22
- return _hosts.Host;
10
+ return _diagnostics.DiagnosticSeverity;
23
11
  }
24
12
  });
25
13
  _Object$defineProperty(exports, "RWProject", {
@@ -42,15 +30,12 @@ _Object$defineProperty(exports, "URL_file", {
42
30
  });
43
31
  exports.getProject = getProject;
44
32
  exports.printDiagnostics = printDiagnostics;
45
- var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
46
- var _hosts = require("./hosts");
33
+ var _diagnostics = require("./x/diagnostics");
47
34
  var _model = require("./model");
48
35
  var _URL = require("./x/URL");
49
- var _vscodeLanguageserverTypes2 = require("./x/vscode-languageserver-types");
50
- function getProject(projectRoot, host = new _hosts.DefaultHost()) {
36
+ function getProject(projectRoot) {
51
37
  return new _model.RWProject({
52
- projectRoot,
53
- host
38
+ projectRoot
54
39
  });
55
40
  }
56
41
  async function printDiagnostics(projectRoot, opts) {
@@ -63,13 +48,13 @@ async function printDiagnostics(projectRoot, opts) {
63
48
  let warnings = 0;
64
49
  let errors = 0;
65
50
  for (const d of await project.collectDiagnostics()) {
66
- const str = (0, _vscodeLanguageserverTypes2.ExtendedDiagnostic_format)(d, formatOpts);
51
+ const str = (0, _diagnostics.ExtendedDiagnostic_format)(d, formatOpts);
67
52
  console.log(`\n${str}`);
68
- // counts number of warnings (2) and errors (1) encountered
69
- if (d.diagnostic.severity === 2) {
53
+ // counts number of warnings and errors encountered
54
+ if (d.diagnostic.severity === _diagnostics.DiagnosticSeverity.Warning) {
70
55
  warnings++;
71
56
  }
72
- if (d.diagnostic.severity === 1) {
57
+ if (d.diagnostic.severity === _diagnostics.DiagnosticSeverity.Error) {
73
58
  errors++;
74
59
  }
75
60
  }
@@ -1,4 +1,5 @@
1
1
  import * as tsm from 'ts-morph';
2
+ import { DiagnosticSeverity } from '../x/diagnostics';
2
3
  import { RWComponent } from './RWComponent';
3
4
  export declare class RWCell extends RWComponent {
4
5
  /**
@@ -10,12 +11,12 @@ export declare class RWCell extends RWComponent {
10
11
  get queryString(): string | undefined;
11
12
  get queryAst(): import("graphql").DocumentNode | undefined;
12
13
  get queryOperationName(): string | undefined;
13
- diagnostics(): Generator<import("../x/vscode-languageserver-types").ExtendedDiagnostic | {
14
+ diagnostics(): Generator<import("../x/diagnostics").ExtendedDiagnostic | {
14
15
  uri: string;
15
16
  diagnostic: {
16
- range: import("vscode-languageserver-types").Range;
17
+ range: import("../x/Range").Range;
17
18
  message: any;
18
- severity: 1;
19
+ severity: DiagnosticSeverity;
19
20
  };
20
21
  }, void, unknown>;
21
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RWCell.d.ts","sourceRoot":"","sources":["../../src/model/RWCell.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAM/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;QAGI;IACJ,IAAY,MAAM,YAEjB;IAGD,IAAY,eAAe,kDAa1B;IAGD,IAAY,WAAW,IAAI,MAAM,GAAG,SAAS,CAE5C;IAGD,IAAY,QAAQ,+CAanB;IAGD,IAAY,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAWnD;IAEA,WAAW;;;;;;;;CAyCb"}
1
+ {"version":3,"file":"RWCell.d.ts","sourceRoot":"","sources":["../../src/model/RWCell.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;QAGI;IACJ,IAAY,MAAM,YAEjB;IAGD,IAAY,eAAe,kDAa1B;IAGD,IAAY,WAAW,IAAI,MAAM,GAAG,SAAS,CAE5C;IAGD,IAAY,QAAQ,+CAanB;IAGD,IAAY,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAWnD;IAEA,WAAW;;;;;;;;CAyCb"}
@@ -11,9 +11,8 @@ var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-c
11
11
  var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
12
12
  var _graphql = require("graphql");
13
13
  var tsm = _interopRequireWildcard(require("ts-morph"));
14
- var _vscodeLanguageserverTypes = require("vscode-languageserver-types");
15
14
  var _decorators = require("../x/decorators");
16
- var _vscodeLanguageserverTypes2 = require("../x/vscode-languageserver-types");
15
+ var _diagnostics = require("../x/diagnostics");
17
16
  var _RWComponent = require("./RWComponent");
18
17
  var _dec, _dec2, _dec3, _dec4, _dec5, _class;
19
18
  let RWCell = exports.RWCell = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _dec5 = (0, _decorators.lazy)(), _class = class RWCell extends _RWComponent.RWComponent {
@@ -77,16 +76,16 @@ let RWCell = exports.RWCell = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _deco
77
76
  *diagnostics() {
78
77
  // check that QUERY and Success are exported
79
78
  if (!this.exportedSymbols.has('QUERY')) {
80
- yield (0, _vscodeLanguageserverTypes2.err)(this.uri, 'Every Cell MUST export a QUERY variable (GraphQL query string)');
79
+ yield (0, _diagnostics.err)(this.uri, 'Every Cell MUST export a QUERY variable (GraphQL query string)');
81
80
  }
82
81
  try {
83
82
  if (!this.queryOperationName) {
84
83
  yield {
85
84
  uri: this.uri,
86
85
  diagnostic: {
87
- range: (0, _vscodeLanguageserverTypes2.Range_fromNode)(this.queryStringNode),
86
+ range: (0, _diagnostics.Range_fromNode)(this.queryStringNode),
88
87
  message: 'We recommend that you name your query operation',
89
- severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Warning
88
+ severity: _diagnostics.DiagnosticSeverity.Warning
90
89
  }
91
90
  };
92
91
  }
@@ -96,16 +95,16 @@ let RWCell = exports.RWCell = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _deco
96
95
  uri: this.uri,
97
96
  diagnostic: {
98
97
  // TODO: Try to figure out if we can point directly to the syntax error.
99
- range: (0, _vscodeLanguageserverTypes2.Range_fromNode)(this.sf.getVariableDeclaration('QUERY')),
98
+ range: (0, _diagnostics.Range_fromNode)(this.sf.getVariableDeclaration('QUERY')),
100
99
  message: e.message,
101
- severity: _vscodeLanguageserverTypes.DiagnosticSeverity.Error
100
+ severity: _diagnostics.DiagnosticSeverity.Error
102
101
  }
103
102
  };
104
103
  }
105
104
 
106
105
  // TODO: check that exported QUERY is semantically valid GraphQL (fields exist)
107
106
  if (!this.exportedSymbols.has('Success')) {
108
- yield (0, _vscodeLanguageserverTypes2.err)(this.uri, 'Every Cell MUST export a Success variable (React Component)');
107
+ yield (0, _diagnostics.err)(this.uri, 'Every Cell MUST export a Success variable (React Component)');
109
108
  }
110
109
  }
111
110
  }, (0, _applyDecoratedDescriptor2.default)(_class.prototype, "isCell", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "isCell"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "queryStringNode", [_dec2], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "queryStringNode"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "queryString", [_dec3], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "queryString"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "queryAst", [_dec4], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "queryAst"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "queryOperationName", [_dec5], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "queryOperationName"), _class.prototype), _class);
@@ -1,4 +1,4 @@
1
- import { FileNode } from '../ide';
1
+ import { FileNode } from '../nodes';
2
2
  import type { RWProject } from './RWProject';
3
3
  export declare class RWComponent extends FileNode {
4
4
  filePath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RWComponent.d.ts","sourceRoot":"","sources":["../../src/model/RWComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAGjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,WAAY,SAAQ,QAAQ;IAE9B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;IAK1B,IAAY,gBAAgB,IAAI,OAAO,CAKtC;IAED,IAAY,OAAO,YAIlB;IAED,IAAY,eAAe,gBAW1B;CACF"}
1
+ {"version":3,"file":"RWComponent.d.ts","sourceRoot":"","sources":["../../src/model/RWComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,WAAY,SAAQ,QAAQ;IAE9B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;IAK1B,IAAY,gBAAgB,IAAI,OAAO,CAKtC;IAED,IAAY,OAAO,YAIlB;IAED,IAAY,eAAe,gBAW1B;CACF"}
@@ -11,10 +11,10 @@ var _set = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/set"))
11
11
  var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor"));
12
12
  var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
13
13
  var tsm = _interopRequireWildcard(require("ts-morph"));
14
- var _ide = require("../ide");
14
+ var _nodes = require("../nodes");
15
15
  var _decorators = require("../x/decorators");
16
16
  var _dec, _dec2, _dec3, _class;
17
- let RWComponent = exports.RWComponent = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _class = class RWComponent extends _ide.FileNode {
17
+ let RWComponent = exports.RWComponent = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _class = class RWComponent extends _nodes.FileNode {
18
18
  constructor(filePath, parent) {
19
19
  super();
20
20
  this.filePath = filePath;
@@ -1,8 +1,7 @@
1
1
  import type * as tsm from 'ts-morph';
2
- import type { Location } from 'vscode-languageserver';
3
- import type { CodeLensX, Definition, HoverX, Reference } from '../ide';
4
- import { BaseNode } from '../ide';
5
- import type { ExtendedDiagnostic } from '../x/vscode-languageserver-types';
2
+ import { BaseNode } from '../nodes';
3
+ import type { ExtendedDiagnostic } from '../x/diagnostics';
4
+ import type { Location } from '../x/Location';
6
5
  import type { RWProject } from './RWProject';
7
6
  type EnvVarMap = Record<string, string>;
8
7
  export declare class RWEnvHelper extends BaseNode {
@@ -53,12 +52,9 @@ declare class ProcessDotEnvExpression extends BaseNode {
53
52
  get id(): string;
54
53
  get side(): "api" | "web";
55
54
  get location(): Location;
56
- ideInfo(): Generator<Definition | Reference | CodeLensX | HoverX, void, unknown>;
57
55
  diagnostics(): Generator<ExtendedDiagnostic, void, unknown>;
58
56
  get value_definition_file_basename(): ".env" | ".env.defaults" | undefined;
59
- get value_definition_location(): Location | undefined;
60
57
  get value_as_available(): string;
61
- private render;
62
58
  }
63
59
  export {};
64
60
  //# sourceMappingURL=RWEnvHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RWEnvHelper.d.ts","sourceRoot":"","sources":["../../src/model/RWEnvHelper.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAKjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAO1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEvC,qBAAa,WAAY,SAAQ,QAAQ;IACpB,MAAM,EAAE,SAAS;gBAAjB,MAAM,EAAE,SAAS;IAIpC,IAAY,EAAE,WAGb;IAED,mBAAmB;IAMnB;;;;OAIG;IACH,IAAY,GAAG,IAAI,SAAS,GAAG,SAAS,CAEvC;IAED;;;OAGG;IACH,IAAY,YAAY,IAAI,SAAS,GAAG,SAAS,CAEhD;IAED,IAAY,cAAc,mDAEzB;IAED;;;OAGG;IACH,IAAY,kB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C,qBAAa,WAAY,SAAQ,QAAQ;IACpB,MAAM,EAAE,SAAS;gBAAjB,MAAM,EAAE,SAAS;IAIpC,IAAY,EAAE,WAGb;IAED,mBAAmB;IAMnB;;;;OAIG;IACH,IAAY,GAAG,IAAI,SAAS,GAAG,SAAS,CAEvC;IAED;;;OAGG;IACH,IAAY,YAAY,IAAI,SAAS,GAAG,SAAS,CAEhD;IAED,IAAY,cAAc,mDAEzB;IAED;;;OAGG;IACH,IAAY,kBAAkB,IAAI,SAAS,CAE1C;IAED;;;;;OAKG;IACH,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,OAAO;IAQf,IAAY,oBAAoB,cAM/B;IAED,IAAY,oBAAoB,cAI/B;IAEK,QAAQ;IAIR,uBAAuB;CAe9B;AAED;;GAEG;AACH,cAAM,uBAAwB,SAAQ,QAAQ;IAEnC,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ;IAC9B,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ;gBAHzB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,EAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ;IAKlC,mBAAmB,CAAC,GAAG,EAAE,MAAM;IAO/B,IAAY,EAAE,WAIb;IAED,IAAY,IAAI,kBAEf;IAED,IAAY,QAAQ,aAEnB;IAEA,WAAW;IAwCZ,IAAY,8BAA8B,yCAYzC;IAED,IAAY,kBAAkB,WAM7B;CACF"}
@@ -13,23 +13,19 @@ var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/insta
13
13
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/map"));
14
14
  var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/array/from"));
15
15
  var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor"));
16
- var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/find-index"));
17
16
  var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
18
17
  var _nodeFs = _interopRequireDefault(require("node:fs"));
19
18
  var _nodePath = require("node:path");
20
19
  var dotenv = _interopRequireWildcard(require("dotenv-defaults"));
21
20
  var _lodash = require("lodash");
22
- var _vscodeLanguageserver = require("vscode-languageserver");
23
21
  var _projectConfig = require("@cedarjs/project-config");
24
- var _ide = require("../ide");
22
+ var _nodes = require("../nodes");
25
23
  var _decorators = require("../x/decorators");
24
+ var _diagnostics = require("../x/diagnostics");
26
25
  var _prisma = require("../x/prisma");
27
- var _URL = require("../x/URL");
28
- var _vscode = require("../x/vscode");
29
- var _vscodeLanguageserverTypes = require("../x/vscode-languageserver-types");
30
26
  var _process_env = require("./util/process_env");
31
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _dec8, _dec9, _dec0, _dec1, _dec10, _dec11, _class2;
32
- let RWEnvHelper = exports.RWEnvHelper = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _dec5 = (0, _decorators.lazy)(), _dec6 = (0, _decorators.lazy)(), _dec7 = (0, _decorators.lazy)(), _class = class RWEnvHelper extends _ide.BaseNode {
27
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _dec8, _dec9, _dec0, _dec1, _dec10, _class2;
28
+ let RWEnvHelper = exports.RWEnvHelper = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _dec5 = (0, _decorators.lazy)(), _dec6 = (0, _decorators.lazy)(), _dec7 = (0, _decorators.lazy)(), _class = class RWEnvHelper extends _nodes.BaseNode {
33
29
  constructor(parent) {
34
30
  super();
35
31
  this.parent = parent;
@@ -123,7 +119,7 @@ let RWEnvHelper = exports.RWEnvHelper = (_dec = (0, _decorators.lazy)(), _dec2 =
123
119
  /**
124
120
  * An occurrence of process.env somewhere in the codebase
125
121
  */
126
- let ProcessDotEnvExpression = (_dec8 = (0, _decorators.lazy)(), _dec9 = (0, _decorators.lazy)(), _dec0 = (0, _decorators.lazy)(), _dec1 = (0, _decorators.lazy)(), _dec10 = (0, _decorators.lazy)(), _dec11 = (0, _decorators.lazy)(), _class2 = class ProcessDotEnvExpression extends _ide.BaseNode {
122
+ let ProcessDotEnvExpression = (_dec8 = (0, _decorators.lazy)(), _dec9 = (0, _decorators.lazy)(), _dec0 = (0, _decorators.lazy)(), _dec1 = (0, _decorators.lazy)(), _dec10 = (0, _decorators.lazy)(), _class2 = class ProcessDotEnvExpression extends _nodes.BaseNode {
127
123
  constructor(parent, kind, key, node) {
128
124
  super();
129
125
  this.parent = parent;
@@ -140,66 +136,15 @@ let ProcessDotEnvExpression = (_dec8 = (0, _decorators.lazy)(), _dec9 = (0, _dec
140
136
  get id() {
141
137
  // this is an internal node. it is not associated to any particular file
142
138
  // we just need to make sure the ID is unique and correctly nested
143
- return this.parent.id + ' ' + (0, _vscodeLanguageserverTypes.LocationLike_toHashLink)(this.location);
139
+ return this.parent.id + ' ' + (0, _diagnostics.LocationLike_toHashLink)(this.location);
144
140
  }
145
141
  get side() {
146
142
  return this.kind === 'web' ? 'web' : 'api';
147
143
  }
148
144
  get location() {
149
- return (0, _vscodeLanguageserverTypes.LocationLike_toLocation)(this.node);
150
- }
151
- *ideInfo() {
152
- for (const x of this.render()) {
153
- if (!(0, _vscodeLanguageserverTypes.ExtendedDiagnostic_is)(x)) {
154
- yield x;
155
- }
156
- }
145
+ return (0, _diagnostics.LocationLike_toLocation)(this.node);
157
146
  }
158
147
  *diagnostics() {
159
- for (const x of this.render()) {
160
- if ((0, _vscodeLanguageserverTypes.ExtendedDiagnostic_is)(x)) {
161
- yield x;
162
- }
163
- }
164
- }
165
- get value_definition_file_basename() {
166
- const {
167
- key,
168
- parent: {
169
- env,
170
- env_defaults
171
- }
172
- } = this;
173
- if (env?.[key]) {
174
- return '.env';
175
- }
176
- if (env_defaults?.[key]) {
177
- return '.env.defaults';
178
- }
179
- return undefined;
180
- }
181
- get value_definition_location() {
182
- const x = this.value_definition_file_basename;
183
- if (!x) {
184
- return undefined;
185
- }
186
- const file = (0, _nodePath.join)(this.parent.parent.projectRoot, x);
187
- const content = _nodeFs.default.readFileSync(file).toString();
188
- const lines = content.split('\n');
189
- const index = (0, _findIndex.default)(lines).call(lines, l => (0, _startsWith.default)(l).call(l, this.key + '='));
190
- return {
191
- uri: (0, _URL.URL_file)(file),
192
- range: _vscodeLanguageserver.Range.create(index, 0, index, lines[index].length)
193
- };
194
- }
195
- get value_as_available() {
196
- if (this.side === 'web') {
197
- return this.parent.env_available_to_web[this.key];
198
- }
199
- const v = this.parent.env_available_to_api[this.key];
200
- return v;
201
- }
202
- *render() {
203
148
  const {
204
149
  key,
205
150
  location,
@@ -209,53 +154,6 @@ let ProcessDotEnvExpression = (_dec8 = (0, _decorators.lazy)(), _dec9 = (0, _dec
209
154
  uri,
210
155
  range
211
156
  } = location;
212
-
213
- // show reference to value definition
214
- if (this.value_definition_location) {
215
- yield {
216
- kind: 'Reference',
217
- location,
218
- target: this.value_definition_location
219
- };
220
- yield {
221
- kind: 'Definition',
222
- location,
223
- target: this.value_definition_location
224
- };
225
- }
226
- // show hover with the actual value, if present
227
- if (typeof value_as_available !== 'undefined') {
228
- yield {
229
- kind: 'Hover',
230
- location,
231
- hover: {
232
- range: location.range,
233
- contents: `${key}=${value_as_available} (${this.value_definition_file_basename ?? ''})`
234
- }
235
- };
236
- if (typeof value_as_available !== 'undefined' && this.value_definition_location) {
237
- const title = `${key}=${value_as_available}`;
238
- const command = {
239
- ...(0, _vscode.Command_open)(this.value_definition_location),
240
- title
241
- };
242
- const codelens = {
243
- kind: 'CodeLens',
244
- location,
245
- codeLens: {
246
- range,
247
- command
248
- }
249
- };
250
- // TODO: we need to add middleware to the LSP client
251
- // so the uri (string) is converted to a vscode.Uri
252
- // https://github.com/microsoft/vscode-languageserver-node/issues/495
253
- // eslint-disable-next-line no-constant-condition
254
- if (false) {
255
- yield codelens;
256
- }
257
- }
258
- }
259
157
  if (typeof value_as_available === 'undefined') {
260
158
  // the value is not available
261
159
  // there are a few scenarios here...
@@ -275,8 +173,7 @@ but it won't be available to your app in production *unless* you add it to inclu
275
173
  Tip: add the following to your redwood.toml:
276
174
  ${snippet}
277
175
  `,
278
- severity: _vscodeLanguageserver.DiagnosticSeverity.Warning
279
- // TODO: quickFix
176
+ severity: _diagnostics.DiagnosticSeverity.Warning
280
177
  }
281
178
  };
282
179
  } else {
@@ -286,11 +183,33 @@ ${snippet}
286
183
  diagnostic: {
287
184
  range,
288
185
  message: `env value ${key} is not available. add it to your .env file`,
289
- severity: _vscodeLanguageserver.DiagnosticSeverity.Warning
290
- // TODO: add a quickfix?
186
+ severity: _diagnostics.DiagnosticSeverity.Warning
291
187
  }
292
188
  };
293
189
  }
294
190
  }
295
191
  }
296
- }, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [_dec8], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "id"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "side", [_dec9], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "side"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "location", [_dec0], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_file_basename", [_dec1], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_file_basename"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_location", [_dec10], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_as_available", [_dec11], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_as_available"), _class2.prototype), _class2);
192
+ get value_definition_file_basename() {
193
+ const {
194
+ key,
195
+ parent: {
196
+ env,
197
+ env_defaults
198
+ }
199
+ } = this;
200
+ if (env?.[key]) {
201
+ return '.env';
202
+ }
203
+ if (env_defaults?.[key]) {
204
+ return '.env.defaults';
205
+ }
206
+ return undefined;
207
+ }
208
+ get value_as_available() {
209
+ if (this.side === 'web') {
210
+ return this.parent.env_available_to_web[this.key];
211
+ }
212
+ const v = this.parent.env_available_to_api[this.key];
213
+ return v;
214
+ }
215
+ }, (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "id", [_dec8], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "id"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "side", [_dec9], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "side"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "location", [_dec0], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "location"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_definition_file_basename", [_dec1], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_definition_file_basename"), _class2.prototype), (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "value_as_available", [_dec10], (0, _getOwnPropertyDescriptor.default)(_class2.prototype, "value_as_available"), _class2.prototype), _class2);
@@ -1,4 +1,4 @@
1
- import { FileNode } from '../ide';
1
+ import { FileNode } from '../nodes';
2
2
  import type { RWProject } from './RWProject';
3
3
  /**
4
4
  * functions exist in the /functions folder
@@ -1 +1 @@
1
- {"version":3,"file":"RWFunction.d.ts","sourceRoot":"","sources":["../../src/model/RWFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C;;GAEG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IAE7B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;CAI3B"}
1
+ {"version":3,"file":"RWFunction.d.ts","sourceRoot":"","sources":["../../src/model/RWFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C;;GAEG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IAE7B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;CAI3B"}
@@ -5,11 +5,11 @@ _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.RWFunction = void 0;
8
- var _ide = require("../ide");
8
+ var _nodes = require("../nodes");
9
9
  /**
10
10
  * functions exist in the /functions folder
11
11
  */
12
- class RWFunction extends _ide.FileNode {
12
+ class RWFunction extends _nodes.FileNode {
13
13
  constructor(filePath, parent) {
14
14
  super();
15
15
  this.filePath = filePath;
@@ -1,4 +1,4 @@
1
- import { FileNode } from '../ide';
1
+ import { FileNode } from '../nodes';
2
2
  import type { RWProject } from './RWProject';
3
3
  /**
4
4
  * layouts live in the src/layouts folder
@@ -1 +1 @@
1
- {"version":3,"file":"RWLayout.d.ts","sourceRoot":"","sources":["../../src/model/RWLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C;;GAEG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IAE3B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;CAI3B"}
1
+ {"version":3,"file":"RWLayout.d.ts","sourceRoot":"","sources":["../../src/model/RWLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C;;GAEG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IAE3B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,SAAS;gBADjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS;CAI3B"}
@@ -5,11 +5,11 @@ _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.RWLayout = void 0;
8
- var _ide = require("../ide");
8
+ var _nodes = require("../nodes");
9
9
  /**
10
10
  * layouts live in the src/layouts folder
11
11
  */
12
- class RWLayout extends _ide.FileNode {
12
+ class RWLayout extends _nodes.FileNode {
13
13
  constructor(filePath, parent) {
14
14
  super();
15
15
  this.filePath = filePath;
@@ -1,4 +1,4 @@
1
- import { FileNode } from '../ide';
1
+ import { FileNode } from '../nodes';
2
2
  import type { RWProject } from './RWProject';
3
3
  export declare class RWPage extends FileNode {
4
4
  constName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RWPage.d.ts","sourceRoot":"","sources":["../../src/model/RWPage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAGjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,MAAO,SAAQ,QAAQ;IAEzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,SAAS;gBAFjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS;IAI1B,IAAY,QAAQ,WAEnB;IACD,IAAY,KAAK,4CAIhB;IACD,IAAY,UAAU,IAAI,MAAM,GAAG,SAAS,CAc3C;IACD,IAAY,YAAY,kBAUvB;CACF"}
1
+ {"version":3,"file":"RWPage.d.ts","sourceRoot":"","sources":["../../src/model/RWPage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,MAAO,SAAQ,QAAQ;IAEzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,SAAS;gBAFjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS;IAI1B,IAAY,QAAQ,WAEnB;IACD,IAAY,KAAK,4CAIhB;IACD,IAAY,UAAU,IAAI,MAAM,GAAG,SAAS,CAc3C;IACD,IAAY,YAAY,kBAUvB;CACF"}
@@ -15,10 +15,10 @@ var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-c
15
15
  var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
16
16
  var _path = require("path");
17
17
  var tsm = _interopRequireWildcard(require("ts-morph"));
18
- var _ide = require("../ide");
18
+ var _nodes = require("../nodes");
19
19
  var _decorators = require("../x/decorators");
20
20
  var _dec, _dec2, _dec3, _dec4, _class;
21
- let RWPage = exports.RWPage = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _class = class RWPage extends _ide.FileNode {
21
+ let RWPage = exports.RWPage = (_dec = (0, _decorators.lazy)(), _dec2 = (0, _decorators.lazy)(), _dec3 = (0, _decorators.lazy)(), _dec4 = (0, _decorators.lazy)(), _class = class RWPage extends _nodes.FileNode {
22
22
  constructor(constName, path, parent) {
23
23
  super();
24
24
  this.constName = constName;
@@ -1,6 +1,5 @@
1
1
  import type { DMMF } from '@prisma/generator-helper';
2
- import type { Host } from '../hosts';
3
- import { BaseNode } from '../ide';
2
+ import { BaseNode } from '../nodes';
4
3
  import { RWCell } from './RWCell';
5
4
  import { RWComponent } from './RWComponent';
6
5
  import { RWEnvHelper } from './RWEnvHelper';
@@ -13,7 +12,6 @@ import { RWService } from './RWService';
13
12
  import { RWTOML } from './RWTOML';
14
13
  export interface RWProjectOptions {
15
14
  projectRoot: string;
16
- host: Host;
17
15
  }
18
16
  /**
19
17
  * Represents a Redwood project.
@@ -23,7 +21,6 @@ export declare class RWProject extends BaseNode {
23
21
  opts: RWProjectOptions;
24
22
  constructor(opts: RWProjectOptions);
25
23
  parent: undefined;
26
- get host(): Host;
27
24
  get projectRoot(): string;
28
25
  get id(): string;
29
26
  children(): (RWComponent | RWTOML | RWPage | RWRouter | RWService | RWSDL | RWLayout | RWEnvHelper)[];
@@ -1 +1 @@
1
- {"version":3,"file":"RWProject.d.ts","sourceRoot":"","sources":["../../src/model/RWProject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AASpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AASjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU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