@cedarjs/structure 2.8.1-next.0 → 2.8.1-next.116

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 (110) hide show
  1. package/README.md +1 -1
  2. package/dist/errors.js +9 -15
  3. package/dist/errors.js.map +1 -0
  4. package/dist/index.d.ts +7 -7
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +40 -67
  7. package/dist/index.js.map +1 -0
  8. package/dist/model/RWCell.d.ts +4 -4
  9. package/dist/model/RWCell.d.ts.map +1 -1
  10. package/dist/model/RWCell.js +111 -103
  11. package/dist/model/RWCell.js.map +1 -0
  12. package/dist/model/RWComponent.d.ts +2 -2
  13. package/dist/model/RWComponent.d.ts.map +1 -1
  14. package/dist/model/RWComponent.js +46 -41
  15. package/dist/model/RWComponent.js.map +1 -0
  16. package/dist/model/RWEnvHelper.d.ts +4 -4
  17. package/dist/model/RWEnvHelper.d.ts.map +1 -1
  18. package/dist/model/RWEnvHelper.js +212 -205
  19. package/dist/model/RWEnvHelper.js.map +1 -0
  20. package/dist/model/RWFunction.d.ts +2 -2
  21. package/dist/model/RWFunction.d.ts.map +1 -1
  22. package/dist/model/RWFunction.js +10 -15
  23. package/dist/model/RWFunction.js.map +1 -0
  24. package/dist/model/RWLayout.d.ts +2 -2
  25. package/dist/model/RWLayout.d.ts.map +1 -1
  26. package/dist/model/RWLayout.js +10 -15
  27. package/dist/model/RWLayout.js.map +1 -0
  28. package/dist/model/RWPage.d.ts +3 -3
  29. package/dist/model/RWPage.d.ts.map +1 -1
  30. package/dist/model/RWPage.js +61 -57
  31. package/dist/model/RWPage.js.map +1 -0
  32. package/dist/model/RWProject.d.ts +11 -17
  33. package/dist/model/RWProject.d.ts.map +1 -1
  34. package/dist/model/RWProject.js +218 -164
  35. package/dist/model/RWProject.js.map +1 -0
  36. package/dist/model/RWRoute.d.ts +5 -5
  37. package/dist/model/RWRoute.d.ts.map +1 -1
  38. package/dist/model/RWRoute.js +312 -262
  39. package/dist/model/RWRoute.js.map +1 -0
  40. package/dist/model/RWRouter.d.ts +4 -4
  41. package/dist/model/RWRouter.d.ts.map +1 -1
  42. package/dist/model/RWRouter.js +130 -126
  43. package/dist/model/RWRouter.js.map +1 -0
  44. package/dist/model/RWSDL.d.ts +5 -5
  45. package/dist/model/RWSDL.d.ts.map +1 -1
  46. package/dist/model/RWSDL.js +96 -84
  47. package/dist/model/RWSDL.js.map +1 -0
  48. package/dist/model/RWSDLField.d.ts +6 -6
  49. package/dist/model/RWSDLField.d.ts.map +1 -1
  50. package/dist/model/RWSDLField.js +79 -81
  51. package/dist/model/RWSDLField.js.map +1 -0
  52. package/dist/model/RWService.d.ts +4 -4
  53. package/dist/model/RWService.d.ts.map +1 -1
  54. package/dist/model/RWService.js +76 -76
  55. package/dist/model/RWService.js.map +1 -0
  56. package/dist/model/RWServiceFunction.d.ts +4 -4
  57. package/dist/model/RWServiceFunction.d.ts.map +1 -1
  58. package/dist/model/RWServiceFunction.js +95 -97
  59. package/dist/model/RWServiceFunction.js.map +1 -0
  60. package/dist/model/RWTOML.d.ts +3 -3
  61. package/dist/model/RWTOML.d.ts.map +1 -1
  62. package/dist/model/RWTOML.js +53 -55
  63. package/dist/model/RWTOML.js.map +1 -0
  64. package/dist/model/index.d.ts +2 -2
  65. package/dist/model/index.d.ts.map +1 -1
  66. package/dist/model/index.js +3 -20
  67. package/dist/model/index.js.map +1 -0
  68. package/dist/model/util/process_env.js +44 -62
  69. package/dist/model/util/process_env.js.map +1 -0
  70. package/dist/nodes.d.ts +2 -2
  71. package/dist/nodes.d.ts.map +1 -1
  72. package/dist/nodes.js +171 -164
  73. package/dist/nodes.js.map +1 -0
  74. package/dist/util.js +23 -33
  75. package/dist/util.js.map +1 -0
  76. package/dist/x/Array.js +15 -25
  77. package/dist/x/Array.js.map +1 -0
  78. package/dist/x/Location.d.ts +1 -1
  79. package/dist/x/Location.d.ts.map +1 -1
  80. package/dist/x/Location.js +11 -17
  81. package/dist/x/Location.js.map +1 -0
  82. package/dist/x/Position.js +18 -29
  83. package/dist/x/Position.js.map +1 -0
  84. package/dist/x/Range.d.ts +1 -1
  85. package/dist/x/Range.d.ts.map +1 -1
  86. package/dist/x/Range.js +17 -22
  87. package/dist/x/Range.js.map +1 -0
  88. package/dist/x/URL.js +59 -75
  89. package/dist/x/URL.js.map +1 -0
  90. package/dist/x/child_process.d.ts +1 -1
  91. package/dist/x/child_process.d.ts.map +1 -1
  92. package/dist/x/child_process.js +35 -49
  93. package/dist/x/child_process.js.map +1 -0
  94. package/dist/x/decorators.d.ts +2 -2
  95. package/dist/x/decorators.d.ts.map +1 -1
  96. package/dist/x/decorators.js +46 -26
  97. package/dist/x/decorators.js.map +1 -0
  98. package/dist/x/diagnostics.d.ts +3 -3
  99. package/dist/x/diagnostics.d.ts.map +1 -1
  100. package/dist/x/diagnostics.js +163 -259
  101. package/dist/x/diagnostics.js.map +1 -0
  102. package/dist/x/path.js +36 -55
  103. package/dist/x/path.js.map +1 -0
  104. package/dist/x/prisma.d.ts +2 -2
  105. package/dist/x/prisma.d.ts.map +1 -1
  106. package/dist/x/prisma.js +32 -55
  107. package/dist/x/prisma.js.map +1 -0
  108. package/dist/x/ts-morph.js +34 -45
  109. package/dist/x/ts-morph.js.map +1 -0
  110. package/package.json +38 -17
package/README.md CHANGED
@@ -21,7 +21,7 @@ The most common use-case is getting the diagnostics of a complete Cedar project:
21
21
  ```ts
22
22
  import { getProject } from '@cedarjs/structure'
23
23
  async function test() {
24
- const project = getProject('/path/to/app') // or "file:///path/to/app"
24
+ const project = getProject()
25
25
  for (const d of await project.collectDiagnostics()) {
26
26
  console.log(d.diagnostic.severity + ': ' + d.diagnostic.message)
27
27
  }
package/dist/errors.js CHANGED
@@ -1,19 +1,13 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.RWError = void 0;
8
1
  /**
9
2
  * Stable error codes
10
3
  * TODO: use numbers? they tend to be more resilient to changes.
11
4
  */
12
- let RWError = exports.RWError = /*#__PURE__*/function (RWError) {
13
- RWError["SERVICE_NOT_IMPLEMENTED"] = "SERVICE_NOT_IMPLEMENTED";
14
- RWError["NOTFOUND_PAGE_NOT_DEFINED"] = "NOTFOUND_PAGE_NOT_DEFINED";
15
- // this error should be broken down into more specialized errors: syntax error, duplicate parameters
16
- RWError["INVALID_ROUTE_PATH_SYNTAX"] = "INVALID_ROUTE_PATH_SYNTAX";
17
- RWError["SCHEMA_NOT_DEFINED"] = "SCHEMA_NOT_DEFINED";
18
- return RWError;
19
- }({});
5
+ export var RWError;
6
+ (function (RWError) {
7
+ RWError["SERVICE_NOT_IMPLEMENTED"] = "SERVICE_NOT_IMPLEMENTED";
8
+ RWError["NOTFOUND_PAGE_NOT_DEFINED"] = "NOTFOUND_PAGE_NOT_DEFINED";
9
+ // this error should be broken down into more specialized errors: syntax error, duplicate parameters
10
+ RWError["INVALID_ROUTE_PATH_SYNTAX"] = "INVALID_ROUTE_PATH_SYNTAX";
11
+ RWError["SCHEMA_NOT_DEFINED"] = "SCHEMA_NOT_DEFINED";
12
+ })(RWError || (RWError = {}));
13
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,8DAAmD,CAAA;IACnD,kEAAuD,CAAA;IACvD,oGAAoG;IACpG,kEAAuD,CAAA;IACvD,oDAAyC,CAAA;AAC3C,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export { DiagnosticSeverity } from './x/diagnostics';
2
- export { RWProject, RWRoute } from './model';
3
- export { URL_file } from './x/URL';
4
- import { RWProject } from './model';
5
- import type { GetSeverityLabelFunction } from './x/diagnostics';
6
- export declare function getProject(projectRoot: string): RWProject;
7
- export declare function printDiagnostics(projectRoot: string, opts?: {
1
+ export { DiagnosticSeverity } from './x/diagnostics.js';
2
+ export { RWProject, RWRoute } from './model/index.js';
3
+ export { URL_file } from './x/URL.js';
4
+ import { RWProject } from './model/index.js';
5
+ import type { GetSeverityLabelFunction } from './x/diagnostics.js';
6
+ export declare function getProject(): RWProject;
7
+ export declare function printDiagnostics(opts?: {
8
8
  getSeverityLabel?: GetSeverityLabelFunction;
9
9
  }): Promise<void>;
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAMlE,wBAAgB,UAAU,cAEzB;AAED,wBAAsB,gBAAgB,CAAC,IAAI,CAAC,EAAE;IAC5C,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;CAC5C,iBAkCA"}
package/dist/index.js CHANGED
@@ -1,70 +1,43 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- _Object$defineProperty(exports, "DiagnosticSeverity", {
8
- enumerable: true,
9
- get: function () {
10
- return _diagnostics.DiagnosticSeverity;
11
- }
12
- });
13
- _Object$defineProperty(exports, "RWProject", {
14
- enumerable: true,
15
- get: function () {
16
- return _model.RWProject;
17
- }
18
- });
19
- _Object$defineProperty(exports, "RWRoute", {
20
- enumerable: true,
21
- get: function () {
22
- return _model.RWRoute;
23
- }
24
- });
25
- _Object$defineProperty(exports, "URL_file", {
26
- enumerable: true,
27
- get: function () {
28
- return _URL.URL_file;
29
- }
30
- });
31
- exports.getProject = getProject;
32
- exports.printDiagnostics = printDiagnostics;
33
- var _diagnostics = require("./x/diagnostics");
34
- var _model = require("./model");
35
- var _URL = require("./x/URL");
36
- function getProject(projectRoot) {
37
- return new _model.RWProject({
38
- projectRoot
39
- });
1
+ import { getPaths } from '@cedarjs/project-config';
2
+ export { DiagnosticSeverity } from './x/diagnostics.js';
3
+ export { RWProject, RWRoute } from './model/index.js';
4
+ export { URL_file } from './x/URL.js';
5
+ import { RWProject } from './model/index.js';
6
+ import { ExtendedDiagnostic_format, DiagnosticSeverity, } from './x/diagnostics.js';
7
+ export function getProject() {
8
+ return new RWProject();
40
9
  }
41
- async function printDiagnostics(projectRoot, opts) {
42
- const project = getProject(projectRoot);
43
- const formatOpts = {
44
- cwd: projectRoot,
45
- ...opts
46
- };
47
- try {
48
- let warnings = 0;
49
- let errors = 0;
50
- for (const d of await project.collectDiagnostics()) {
51
- const str = (0, _diagnostics.ExtendedDiagnostic_format)(d, formatOpts);
52
- console.log(`\n${str}`);
53
- // counts number of warnings and errors encountered
54
- if (d.diagnostic.severity === _diagnostics.DiagnosticSeverity.Warning) {
55
- warnings++;
56
- }
57
- if (d.diagnostic.severity === _diagnostics.DiagnosticSeverity.Error) {
58
- errors++;
59
- }
10
+ export async function printDiagnostics(opts) {
11
+ const base = getPaths().base;
12
+ const project = getProject();
13
+ const formatOpts = { cwd: base, ...opts };
14
+ try {
15
+ let warnings = 0;
16
+ let errors = 0;
17
+ for (const d of await project.collectDiagnostics()) {
18
+ const str = ExtendedDiagnostic_format(d, formatOpts);
19
+ console.log(`\n${str}`);
20
+ // counts number of warnings and errors encountered
21
+ if (d.diagnostic.severity === DiagnosticSeverity.Warning) {
22
+ warnings++;
23
+ }
24
+ if (d.diagnostic.severity === DiagnosticSeverity.Error) {
25
+ errors++;
26
+ }
27
+ }
28
+ if (warnings === 0 && errors === 0) {
29
+ console.log('\nSuccess: no errors or warnings were detected\n');
30
+ }
31
+ else if (errors > 0) {
32
+ console.error(`\nFailure: ${errors} errors and ${warnings} warnings detected\n`);
33
+ process.exit(1);
34
+ }
60
35
  }
61
- if (warnings === 0 && errors === 0) {
62
- console.log('\nSuccess: no errors or warnings were detected\n');
63
- } else if (errors > 0) {
64
- console.error(`\nFailure: ${errors} errors and ${warnings} warnings detected\n`);
65
- process.exit(1);
36
+ catch (e) {
37
+ if (e instanceof Error) {
38
+ throw e;
39
+ }
40
+ throw new Error(String(e));
66
41
  }
67
- } catch (e) {
68
- throw new Error(e.message);
69
- }
70
- }
42
+ }
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACrD,OA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QAAQ,sBAAsB,CAClE,CAAA;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;YACvB,MAAM,CAAC,CAAA;QACT,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5B,CAAC;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import * as tsm from 'ts-morph';
2
- import { DiagnosticSeverity } from '../x/diagnostics';
3
- import { RWComponent } from './RWComponent';
2
+ import { DiagnosticSeverity } from '../x/diagnostics.js';
3
+ import { RWComponent } from './RWComponent.js';
4
4
  export declare class RWCell extends RWComponent {
5
5
  /**
6
6
  * A "Cell" is a component that ends in `Cell.{js, jsx, tsx}`, has no
@@ -11,10 +11,10 @@ export declare class RWCell extends RWComponent {
11
11
  get queryString(): string | undefined;
12
12
  get queryAst(): import("graphql").DocumentNode | undefined;
13
13
  get queryOperationName(): string | undefined;
14
- diagnostics(): Generator<import("../x/diagnostics").ExtendedDiagnostic | {
14
+ diagnostics(): Generator<import("../x/diagnostics.js").ExtendedDiagnostic | {
15
15
  uri: string;
16
16
  diagnostic: {
17
- range: import("../x/Range").Range;
17
+ range: import("../x/Range.js").Range;
18
18
  message: any;
19
19
  severity: DiagnosticSeverity;
20
20
  };
@@ -1 +1 @@
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"}
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,qBAAqB,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,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,110 +1,118 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard").default;
6
- _Object$defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.RWCell = void 0;
10
- var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor"));
11
- var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
12
- var _graphql = require("graphql");
13
- var tsm = _interopRequireWildcard(require("ts-morph"));
14
- var _decorators = require("../x/decorators");
15
- var _diagnostics = require("../x/diagnostics");
16
- var _RWComponent = require("./RWComponent");
17
- var _dec, _dec2, _dec3, _dec4, _dec5, _class;
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 {
19
- /**
20
- * A "Cell" is a component that ends in `Cell.{js, jsx, tsx}`, has no
21
- * default export AND exports `QUERY`
22
- **/
23
- get isCell() {
24
- return !this.hasDefaultExport && this.exportedSymbols.has('QUERY');
25
- }
26
-
27
- // TODO: Move to RWCellQuery
28
- get queryStringNode() {
29
- const i = this.sf.getVariableDeclaration('QUERY')?.getInitializer();
30
- if (!i) {
31
- return undefined;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Kind, parse as parseGraphQL } from 'graphql';
8
+ import * as tsm from 'ts-morph';
9
+ import { lazy } from '../x/decorators.js';
10
+ import { err, Range_fromNode } from '../x/diagnostics.js';
11
+ import { DiagnosticSeverity } from '../x/diagnostics.js';
12
+ import { RWComponent } from './RWComponent.js';
13
+ export class RWCell extends RWComponent {
14
+ /**
15
+ * A "Cell" is a component that ends in `Cell.{js, jsx, tsx}`, has no
16
+ * default export AND exports `QUERY`
17
+ **/
18
+ get isCell() {
19
+ return !this.hasDefaultExport && this.exportedSymbols.has('QUERY');
32
20
  }
33
- // TODO: do we allow other kinds of strings? or just tagged literals?
34
- if (tsm.Node.isTaggedTemplateExpression(i)) {
35
- const t = i.getTemplate();
36
- if (tsm.Node.isNoSubstitutionTemplateLiteral(t)) {
37
- return t;
38
- }
39
- }
40
- return undefined;
41
- }
42
-
43
- // TODO: Move to RWCellQuery
44
- get queryString() {
45
- return this.queryStringNode?.getLiteralText();
46
- }
47
-
48
- // TODO: Move to RWCellQuery
49
- get queryAst() {
50
- const qs = this.queryString;
51
- if (!qs) {
52
- return undefined;
53
- }
54
- try {
55
- return (0, _graphql.parse)(qs);
56
- } catch (e) {
57
- console.error("Can't parse the graphql query string in", this.filePath);
58
- console.error(e);
59
- return undefined;
60
- }
61
- }
62
-
63
- // TODO: Move to RWCellQuery
64
- get queryOperationName() {
65
- const ast = this.queryAst;
66
- if (!ast) {
67
- return undefined;
21
+ // TODO: Move to RWCellQuery
22
+ get queryStringNode() {
23
+ const i = this.sf.getVariableDeclaration('QUERY')?.getInitializer();
24
+ if (!i) {
25
+ return undefined;
26
+ }
27
+ // TODO: do we allow other kinds of strings? or just tagged literals?
28
+ if (tsm.Node.isTaggedTemplateExpression(i)) {
29
+ const t = i.getTemplate();
30
+ if (tsm.Node.isNoSubstitutionTemplateLiteral(t)) {
31
+ return t;
32
+ }
33
+ }
34
+ return undefined;
68
35
  }
69
- for (const def of ast.definitions) {
70
- if (def.kind == _graphql.Kind.OPERATION_DEFINITION) {
71
- return def?.name?.value;
72
- }
36
+ // TODO: Move to RWCellQuery
37
+ get queryString() {
38
+ return this.queryStringNode?.getLiteralText();
73
39
  }
74
- return undefined;
75
- }
76
- *diagnostics() {
77
- // check that QUERY and Success are exported
78
- if (!this.exportedSymbols.has('QUERY')) {
79
- yield (0, _diagnostics.err)(this.uri, 'Every Cell MUST export a QUERY variable (GraphQL query string)');
40
+ // TODO: Move to RWCellQuery
41
+ get queryAst() {
42
+ const qs = this.queryString;
43
+ if (!qs) {
44
+ return undefined;
45
+ }
46
+ try {
47
+ return parseGraphQL(qs);
48
+ }
49
+ catch (e) {
50
+ console.error("Can't parse the graphql query string in", this.filePath);
51
+ console.error(e);
52
+ return undefined;
53
+ }
80
54
  }
81
- try {
82
- if (!this.queryOperationName) {
83
- yield {
84
- uri: this.uri,
85
- diagnostic: {
86
- range: (0, _diagnostics.Range_fromNode)(this.queryStringNode),
87
- message: 'We recommend that you name your query operation',
88
- severity: _diagnostics.DiagnosticSeverity.Warning
89
- }
90
- };
91
- }
92
- } catch (e) {
93
- // Maybe the AST has a syntax error...
94
- yield {
95
- uri: this.uri,
96
- diagnostic: {
97
- // TODO: Try to figure out if we can point directly to the syntax error.
98
- range: (0, _diagnostics.Range_fromNode)(this.sf.getVariableDeclaration('QUERY')),
99
- message: e.message,
100
- severity: _diagnostics.DiagnosticSeverity.Error
55
+ // TODO: Move to RWCellQuery
56
+ get queryOperationName() {
57
+ const ast = this.queryAst;
58
+ if (!ast) {
59
+ return undefined;
60
+ }
61
+ for (const def of ast.definitions) {
62
+ if (def.kind == Kind.OPERATION_DEFINITION) {
63
+ return def?.name?.value;
64
+ }
101
65
  }
102
- };
66
+ return undefined;
103
67
  }
104
-
105
- // TODO: check that exported QUERY is semantically valid GraphQL (fields exist)
106
- if (!this.exportedSymbols.has('Success')) {
107
- yield (0, _diagnostics.err)(this.uri, 'Every Cell MUST export a Success variable (React Component)');
68
+ *diagnostics() {
69
+ // check that QUERY and Success are exported
70
+ if (!this.exportedSymbols.has('QUERY')) {
71
+ yield err(this.uri, 'Every Cell MUST export a QUERY variable (GraphQL query string)');
72
+ }
73
+ try {
74
+ if (!this.queryOperationName) {
75
+ yield {
76
+ uri: this.uri,
77
+ diagnostic: {
78
+ range: Range_fromNode(this.queryStringNode),
79
+ message: 'We recommend that you name your query operation',
80
+ severity: DiagnosticSeverity.Warning,
81
+ },
82
+ };
83
+ }
84
+ }
85
+ catch (e) {
86
+ // Maybe the AST has a syntax error...
87
+ yield {
88
+ uri: this.uri,
89
+ diagnostic: {
90
+ // TODO: Try to figure out if we can point directly to the syntax error.
91
+ range: Range_fromNode(this.sf.getVariableDeclaration('QUERY')),
92
+ message: e.message,
93
+ severity: DiagnosticSeverity.Error,
94
+ },
95
+ };
96
+ }
97
+ // TODO: check that exported QUERY is semantically valid GraphQL (fields exist)
98
+ if (!this.exportedSymbols.has('Success')) {
99
+ yield err(this.uri, 'Every Cell MUST export a Success variable (React Component)');
100
+ }
108
101
  }
109
- }
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);
102
+ }
103
+ __decorate([
104
+ lazy()
105
+ ], RWCell.prototype, "isCell", null);
106
+ __decorate([
107
+ lazy()
108
+ ], RWCell.prototype, "queryStringNode", null);
109
+ __decorate([
110
+ lazy()
111
+ ], RWCell.prototype, "queryString", null);
112
+ __decorate([
113
+ lazy()
114
+ ], RWCell.prototype, "queryAst", null);
115
+ __decorate([
116
+ lazy()
117
+ ], RWCell.prototype, "queryOperationName", null);
118
+ //# sourceMappingURL=RWCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RWCell.js","sourceRoot":"","sources":["../../src/model/RWCell.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD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AAC,KAAK;iBACnC;aACF,CAAA;QACH,CAAC;QAED,+EAA+E;QAC/E,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACzC,MAAM,GAAG,CACP,IAAI,CAAC,GAAG,EACR,6DAA6D,CAC9D,CAAA;QACH,CAAC;IACH,CAAC;CACF;AAhGS;IAAP,IAAI,EAAE;oCAEN;AAGO;IAAP,IAAI,EAAE;6CAaN;AAGO;IAAP,IAAI,EAAE;yCAEN;AAGO;IAAP,IAAI,EAAE;sCAaN;AAGO;IAAP,IAAI,EAAE;gDAWN"}
@@ -1,5 +1,5 @@
1
- import { FileNode } from '../nodes';
2
- import type { RWProject } from './RWProject';
1
+ import { FileNode } from '../nodes.js';
2
+ import type { RWProject } from './RWProject.js';
3
3
  export declare class RWComponent extends FileNode {
4
4
  filePath: string;
5
5
  parent: RWProject;
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"RWComponent.d.ts","sourceRoot":"","sources":["../../src/model/RWComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,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,42 +1,47 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard").default;
6
- _Object$defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.RWComponent = void 0;
10
- var _set = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/set"));
11
- var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor"));
12
- var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/applyDecoratedDescriptor"));
13
- var tsm = _interopRequireWildcard(require("ts-morph"));
14
- var _nodes = require("../nodes");
15
- var _decorators = require("../x/decorators");
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 _nodes.FileNode {
18
- constructor(filePath, parent) {
19
- super();
20
- this.filePath = filePath;
21
- this.parent = parent;
22
- }
23
- get hasDefaultExport() {
24
- // TODO: Is this enough to test a default export?
25
- return this.sf.getDescendantsOfKind(tsm.SyntaxKind.ExportAssignment).length > 0;
26
- }
27
- get stories() {
28
- // TODO: this is a placeholder
29
- // we could list all the (storybook) stories related to this component here
30
- return [];
31
- }
32
- get exportedSymbols() {
33
- // KLUDGE!
34
- const ss = new _set.default();
35
- for (const d of this.sf.getDescendantsOfKind(tsm.SyntaxKind.VariableDeclaration)) {
36
- if (d.isExported()) {
37
- ss.add(d.getName());
38
- }
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import * as tsm from 'ts-morph';
8
+ import { FileNode } from '../nodes.js';
9
+ import { lazy } from '../x/decorators.js';
10
+ export class RWComponent extends FileNode {
11
+ filePath;
12
+ parent;
13
+ constructor(filePath, parent) {
14
+ super();
15
+ this.filePath = filePath;
16
+ this.parent = parent;
39
17
  }
40
- return ss;
41
- }
42
- }, (0, _applyDecoratedDescriptor2.default)(_class.prototype, "hasDefaultExport", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "hasDefaultExport"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "stories", [_dec2], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "stories"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "exportedSymbols", [_dec3], (0, _getOwnPropertyDescriptor.default)(_class.prototype, "exportedSymbols"), _class.prototype), _class);
18
+ get hasDefaultExport() {
19
+ // TODO: Is this enough to test a default export?
20
+ return (this.sf.getDescendantsOfKind(tsm.SyntaxKind.ExportAssignment).length > 0);
21
+ }
22
+ get stories() {
23
+ // TODO: this is a placeholder
24
+ // we could list all the (storybook) stories related to this component here
25
+ return [];
26
+ }
27
+ get exportedSymbols() {
28
+ // KLUDGE!
29
+ const ss = new Set();
30
+ for (const d of this.sf.getDescendantsOfKind(tsm.SyntaxKind.VariableDeclaration)) {
31
+ if (d.isExported()) {
32
+ ss.add(d.getName());
33
+ }
34
+ }
35
+ return ss;
36
+ }
37
+ }
38
+ __decorate([
39
+ lazy()
40
+ ], RWComponent.prototype, "hasDefaultExport", null);
41
+ __decorate([
42
+ lazy()
43
+ ], RWComponent.prototype, "stories", null);
44
+ __decorate([
45
+ lazy()
46
+ ], RWComponent.prototype, "exportedSymbols", null);
47
+ //# sourceMappingURL=RWComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RWComponent.js","sourceRoot":"","sources":["../../src/model/RWComponent.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAIzC,MAAM,OAAO,WAAY,SAAQ,QAAQ;IAE9B;IACA;IAFT,YACS,QAAgB,EAChB,MAAiB;QAExB,KAAK,EAAE,CAAA;QAHA,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAW;IAG1B,CAAC;IAEO,IAAI,gBAAgB;QAC1B,iDAAiD;QACjD,OAAO,CACL,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,MAAM,GAAG,CAAC,CACzE,CAAA;IACH,CAAC;IAEO,IAAI,OAAO;QACjB,8BAA8B;QAC9B,2EAA2E;QAC3E,OAAO,EAAE,CAAA;IACX,CAAC;IAEO,IAAI,eAAe;QACzB,UAAU;QACV,MAAM,EAAE,GAAG,IAAI,GAAG,EAAU,CAAA;QAC5B,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAC1C,GAAG,CAAC,UAAU,CAAC,mBAAmB,CACnC,EAAE,CAAC;YACF,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC;gBACnB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;YACrB,CAAC;QACH,CAAC;QACD,OAAO,EAAE,CAAA;IACX,CAAC;CACF;AAzBS;IAAP,IAAI,EAAE;mDAKN;AAEO;IAAP,IAAI,EAAE;0CAIN;AAEO;IAAP,IAAI,EAAE;kDAWN"}
@@ -1,8 +1,8 @@
1
1
  import type * as tsm from 'ts-morph';
2
- import { BaseNode } from '../nodes';
3
- import type { ExtendedDiagnostic } from '../x/diagnostics';
4
- import type { Location } from '../x/Location';
5
- import type { RWProject } from './RWProject';
2
+ import { BaseNode } from '../nodes.js';
3
+ import type { ExtendedDiagnostic } from '../x/diagnostics.js';
4
+ import type { Location } from '../x/Location.js';
5
+ import type { RWProject } from './RWProject.js';
6
6
  type EnvVarMap = Record<string, string>;
7
7
  export declare class RWEnvHelper extends BaseNode {
8
8
  parent: RWProject;
@@ -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;AAIpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAM1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7C,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,kBAAkB,IAAI,SAAS,CAE1C;IAED;;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