@komaci/esm-generator 264.4.0 → 266.3.0

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 (130) hide show
  1. package/build/genericAstGeneration.js +80 -34
  2. package/package.json +1 -1
  3. package/build/__tests__/adgAstGeneration.spec.d.ts +0 -2
  4. package/build/__tests__/adgAstGeneration.spec.js +0 -447
  5. package/build/__tests__/compile-generated-module-fixtures.spec.d.ts +0 -2
  6. package/build/__tests__/compile-generated-module-fixtures.spec.js +0 -49
  7. package/build/__tests__/compilerConfigs.d.ts +0 -24
  8. package/build/__tests__/compilerConfigs.js +0 -126
  9. package/build/__tests__/compositionAstGeneration.spec.d.ts +0 -2
  10. package/build/__tests__/compositionAstGeneration.spec.js +0 -676
  11. package/build/__tests__/fixtures-combined-files/exclude-comps-unused-import-prop/actual.d.ts +0 -6
  12. package/build/__tests__/fixtures-combined-files/exclude-comps-unused-import-prop/actual.js +0 -28
  13. package/build/__tests__/fixtures-combined-files/exclude-partial-classProps-indirect-importRef-getter/actual.d.ts +0 -29
  14. package/build/__tests__/fixtures-combined-files/exclude-partial-classProps-indirect-importRef-getter/actual.js +0 -148
  15. package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-one/actual.d.ts +0 -9
  16. package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-one/actual.js +0 -35
  17. package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-two/actual.d.ts +0 -10
  18. package/build/__tests__/fixtures-combined-files/exclude-total-unused-import-getter-from-two/actual.js +0 -39
  19. package/build/__tests__/fixtures-combined-files/exclude-wire-unused-import-prop/actual.d.ts +0 -7
  20. package/build/__tests__/fixtures-combined-files/exclude-wire-unused-import-prop/actual.js +0 -34
  21. package/build/__tests__/fixtures-combined-files/image-type/actual.d.ts +0 -13
  22. package/build/__tests__/fixtures-combined-files/image-type/actual.js +0 -41
  23. package/build/__tests__/fixtures-combined-files/include-all-indirect-importRef-getter-complex/actual.d.ts +0 -14
  24. package/build/__tests__/fixtures-combined-files/include-all-indirect-importRef-getter-complex/actual.js +0 -79
  25. package/build/__tests__/fixtures-combined-files/include-class-prop-indirect-importRef-getter/actual.d.ts +0 -18
  26. package/build/__tests__/fixtures-combined-files/include-class-prop-indirect-importRef-getter/actual.js +0 -103
  27. package/build/__tests__/fixtures-combined-files/include-comps-used-import-prop/actual.d.ts +0 -6
  28. package/build/__tests__/fixtures-combined-files/include-comps-used-import-prop/actual.js +0 -28
  29. package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-imports/actual.d.ts +0 -6
  30. package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-imports/actual.js +0 -16
  31. package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-nonAnalyzable-imports/actual.d.ts +0 -4
  32. package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-nonAnalyzable-imports/actual.js +0 -18
  33. package/build/__tests__/fixtures-combined-files/include-template-strings/actual.d.ts +0 -10
  34. package/build/__tests__/fixtures-combined-files/include-template-strings/actual.js +0 -41
  35. package/build/__tests__/fixtures-combined-files/include-used-import-getter/actual.d.ts +0 -9
  36. package/build/__tests__/fixtures-combined-files/include-used-import-getter/actual.js +0 -38
  37. package/build/__tests__/fixtures-combined-files/include-wire-used-import-prop/actual.d.ts +0 -7
  38. package/build/__tests__/fixtures-combined-files/include-wire-used-import-prop/actual.js +0 -34
  39. package/build/__tests__/fixtures-combined-files/only-named-export-with-template/actual.d.ts +0 -1
  40. package/build/__tests__/fixtures-combined-files/only-named-export-with-template/actual.js +0 -2
  41. package/build/__tests__/fixtures-combined-files/unsupported-wire-from-supported-namespace/actual.d.ts +0 -6
  42. package/build/__tests__/fixtures-combined-files/unsupported-wire-from-supported-namespace/actual.js +0 -19
  43. package/build/__tests__/fixtures-combined-files-multiple-templates/invalid-renderFunc-no-valid-imports/c/component/component.d.ts +0 -5
  44. package/build/__tests__/fixtures-combined-files-multiple-templates/invalid-renderFunc-no-valid-imports/c/component/component.js +0 -14
  45. package/build/__tests__/fixtures-combined-files-multiple-templates/valid-render-function-complex/lightning/component/component.d.ts +0 -6
  46. package/build/__tests__/fixtures-combined-files-multiple-templates/valid-render-function-complex/lightning/component/component.js +0 -31
  47. package/build/__tests__/fixtures-combined-files-multiple-templates/valid-render-function-simple/lightning/component/component.d.ts +0 -6
  48. package/build/__tests__/fixtures-combined-files-multiple-templates/valid-render-function-simple/lightning/component/component.js +0 -27
  49. package/build/__tests__/fixtures-gql/multipleGqlQueries/c/component/component.d.ts +0 -15
  50. package/build/__tests__/fixtures-gql/multipleGqlQueries/c/component/component.js +0 -104
  51. package/build/__tests__/fixtures-script-files/class-extends-multiple-with-separate-imports/actual.d.ts +0 -8
  52. package/build/__tests__/fixtures-script-files/class-extends-multiple-with-separate-imports/actual.js +0 -17
  53. package/build/__tests__/fixtures-script-files/class-extends-separate-imports/actual.d.ts +0 -4
  54. package/build/__tests__/fixtures-script-files/class-extends-separate-imports/actual.js +0 -13
  55. package/build/__tests__/fixtures-script-files/class-extends-separate-imports-alias/actual.d.ts +0 -4
  56. package/build/__tests__/fixtures-script-files/class-extends-separate-imports-alias/actual.js +0 -10
  57. package/build/__tests__/fixtures-script-files/class-props/actual.d.ts +0 -30
  58. package/build/__tests__/fixtures-script-files/class-props/actual.js +0 -103
  59. package/build/__tests__/fixtures-script-files/empty-class/actual.d.ts +0 -4
  60. package/build/__tests__/fixtures-script-files/empty-class/actual.js +0 -7
  61. package/build/__tests__/fixtures-script-files/empty-doc/actual.d.ts +0 -1
  62. package/build/__tests__/fixtures-script-files/empty-doc/actual.js +0 -2
  63. package/build/__tests__/fixtures-script-files/empty-wire/actual.d.ts +0 -5
  64. package/build/__tests__/fixtures-script-files/empty-wire/actual.js +0 -16
  65. package/build/__tests__/fixtures-script-files/exclude-wire-unused-import-prop/actual.d.ts +0 -7
  66. package/build/__tests__/fixtures-script-files/exclude-wire-unused-import-prop/actual.js +0 -34
  67. package/build/__tests__/fixtures-script-files/exports/actual.d.ts +0 -22
  68. package/build/__tests__/fixtures-script-files/exports/actual.js +0 -63
  69. package/build/__tests__/fixtures-script-files/imports/actual.d.ts +0 -11
  70. package/build/__tests__/fixtures-script-files/imports/actual.js +0 -80
  71. package/build/__tests__/fixtures-script-files/imports-namespaced/actual.d.ts +0 -10
  72. package/build/__tests__/fixtures-script-files/imports-namespaced/actual.js +0 -63
  73. package/build/__tests__/fixtures-script-files/include-wire-unused-import-prop/actual.d.ts +0 -7
  74. package/build/__tests__/fixtures-script-files/include-wire-unused-import-prop/actual.js +0 -34
  75. package/build/__tests__/fixtures-script-files/inheritance-imports-default/actual.d.ts +0 -3
  76. package/build/__tests__/fixtures-script-files/inheritance-imports-default/actual.js +0 -10
  77. package/build/__tests__/fixtures-script-files/inheritance-imports-local/actual.d.ts +0 -9
  78. package/build/__tests__/fixtures-script-files/inheritance-imports-local/actual.js +0 -24
  79. package/build/__tests__/fixtures-script-files/inheritance-imports-named/actual.d.ts +0 -4
  80. package/build/__tests__/fixtures-script-files/inheritance-imports-named/actual.js +0 -17
  81. package/build/__tests__/fixtures-script-files/inheritance-parent-unresolved/actual.d.ts +0 -4
  82. package/build/__tests__/fixtures-script-files/inheritance-parent-unresolved/actual.js +0 -17
  83. package/build/__tests__/fixtures-script-files/unsupported-wire-from-supported-namespace/actual.d.ts +0 -6
  84. package/build/__tests__/fixtures-script-files/unsupported-wire-from-supported-namespace/actual.js +0 -19
  85. package/build/__tests__/fixtures-script-files/wire-basic/actual.d.ts +0 -8
  86. package/build/__tests__/fixtures-script-files/wire-basic/actual.js +0 -30
  87. package/build/__tests__/fixtures-script-files/wire-functions/actual.d.ts +0 -13
  88. package/build/__tests__/fixtures-script-files/wire-functions/actual.js +0 -46
  89. package/build/__tests__/fixtures-script-files/wire-imports/actual.d.ts +0 -11
  90. package/build/__tests__/fixtures-script-files/wire-imports/actual.js +0 -63
  91. package/build/__tests__/fixtures-source-code/badImportRef.d.ts +0 -4
  92. package/build/__tests__/fixtures-source-code/badImportRef.js +0 -31
  93. package/build/__tests__/fixtures-source-code/generalMockSourceCode.d.ts +0 -8
  94. package/build/__tests__/fixtures-source-code/generalMockSourceCode.js +0 -127
  95. package/build/__tests__/fixtures-source-code/gqlMockSource.d.ts +0 -3
  96. package/build/__tests__/fixtures-source-code/gqlMockSource.js +0 -95
  97. package/build/__tests__/functionAstGeneration.spec.d.ts +0 -2
  98. package/build/__tests__/functionAstGeneration.spec.js +0 -727
  99. package/build/__tests__/general-komaci-docs/assorted-template-strings/source.d.ts +0 -10
  100. package/build/__tests__/general-komaci-docs/assorted-template-strings/source.js +0 -41
  101. package/build/__tests__/general-komaci-docs/getters-and-compositions-collisions/source.d.ts +0 -7
  102. package/build/__tests__/general-komaci-docs/getters-and-compositions-collisions/source.js +0 -31
  103. package/build/__tests__/general-komaci-docs/import-types/source.d.ts +0 -18
  104. package/build/__tests__/general-komaci-docs/import-types/source.js +0 -108
  105. package/build/__tests__/general-komaci-docs/import-types/validationStuff.d.ts +0 -18
  106. package/build/__tests__/general-komaci-docs/import-types/validationStuff.js +0 -63
  107. package/build/__tests__/general-komaci-docs/template-component/source.d.ts +0 -8
  108. package/build/__tests__/general-komaci-docs/template-component/source.js +0 -34
  109. package/build/__tests__/generated-module/compile-graphql-with-scoped-import.spec.d.ts +0 -2
  110. package/build/__tests__/generated-module/compile-graphql-with-scoped-import.spec.js +0 -20
  111. package/build/__tests__/generated-module/lightning/component/component.d.ts +0 -18
  112. package/build/__tests__/generated-module/lightning/component/component.js +0 -168
  113. package/build/__tests__/genericAstGeneration.spec.d.ts +0 -2
  114. package/build/__tests__/genericAstGeneration.spec.js +0 -1052
  115. package/build/__tests__/index.spec.d.ts +0 -2
  116. package/build/__tests__/index.spec.js +0 -393
  117. package/build/__tests__/komaci-ast-unit.spec.d.ts +0 -2
  118. package/build/__tests__/komaci-ast-unit.spec.js +0 -422
  119. package/build/__tests__/komaci-bundle-module.fixtures.spec.d.ts +0 -2
  120. package/build/__tests__/komaci-bundle-module.fixtures.spec.js +0 -76
  121. package/build/__tests__/komaci-bundle-multiple-templates-module.fixtures.spec.d.ts +0 -2
  122. package/build/__tests__/komaci-bundle-multiple-templates-module.fixtures.spec.js +0 -117
  123. package/build/__tests__/komaci-gql.fixtures.spec.d.ts +0 -2
  124. package/build/__tests__/komaci-gql.fixtures.spec.js +0 -51
  125. package/build/__tests__/komaci-script-module.fixtures.spec.d.ts +0 -2
  126. package/build/__tests__/komaci-script-module.fixtures.spec.js +0 -70
  127. package/build/__tests__/komaci-template-module.fixtures.spec.d.ts +0 -2
  128. package/build/__tests__/komaci-template-module.fixtures.spec.js +0 -57
  129. package/build/__tests__/readAndParseBundle.d.ts +0 -22
  130. package/build/__tests__/readAndParseBundle.js +0 -80
@@ -1,10 +0,0 @@
1
- export default class Component extends LightningElement {
2
- basic: any;
3
- basicInit: string;
4
- publicWithTemplate: string;
5
- internalProp: any;
6
- badTemplate: any;
7
- wireForLinkage: any;
8
- }
9
- import { LightningElement } from "lwc";
10
- //# sourceMappingURL=source.d.ts.map
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const lwc_1 = require("lwc");
10
- const record_1 = require("lightning/record");
11
- const graphql_1 = require("lightning/graphql");
12
- const snoop_1 = require("snoop");
13
- class Component extends lwc_1.LightningElement {
14
- constructor() {
15
- super(...arguments);
16
- this.basicInit = 'testing';
17
- this.publicWithTemplate = `A template here maybe it references ${this.basicInit} ${snoop_1.sneaky}`;
18
- this.internalProp = (0, graphql_1.gql) `search { record $thing ${['a', 'b', 'c']
19
- .map((a) => `a${a}`)
20
- .join(',')}}`;
21
- this.badTemplate = (0, snoop_1.sneaky) `${(this.basic = 'boom')}normal string`;
22
- }
23
- }
24
- __decorate([
25
- lwc_1.api
26
- ], Component.prototype, "basic", void 0);
27
- __decorate([
28
- lwc_1.api
29
- ], Component.prototype, "basicInit", void 0);
30
- __decorate([
31
- lwc_1.api
32
- ], Component.prototype, "publicWithTemplate", void 0);
33
- __decorate([
34
- (0, lwc_1.wire)(record_1.getRecord, {
35
- p1: '$publicWithTemplate',
36
- p2: '$internalProp',
37
- p3: '$badTemplate',
38
- })
39
- ], Component.prototype, "wireForLinkage", void 0);
40
- exports.default = Component;
41
- //# sourceMappingURL=source.js.map
@@ -1,7 +0,0 @@
1
- export default class ScriptTestClass extends LightningElement {
2
- contacts: any[];
3
- record: any;
4
- get cg(): string;
5
- }
6
- import { LightningElement } from "lwc";
7
- //# sourceMappingURL=source.d.ts.map
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const lwc_1 = require("lwc");
13
- const uiRecordApi_1 = require("lightning/uiRecordApi");
14
- const Contacts_Title_1 = __importDefault(require("@salesforce/label/Contacts.Title"));
15
- class ScriptTestClass extends lwc_1.LightningElement {
16
- constructor() {
17
- super(...arguments);
18
- this.contacts = [];
19
- }
20
- get cg() {
21
- return 'i am a label' + Contacts_Title_1.default;
22
- }
23
- }
24
- __decorate([
25
- (0, lwc_1.wire)(uiRecordApi_1.getRecords, { recordIds: ['0001', '0002', '0003'] })
26
- ], ScriptTestClass.prototype, "contacts", void 0);
27
- __decorate([
28
- (0, lwc_1.wire)(uiRecordApi_1.getRecordUi, { test: '$cg' })
29
- ], ScriptTestClass.prototype, "record", void 0);
30
- exports.default = ScriptTestClass;
31
- //# sourceMappingURL=source.js.map
@@ -1,18 +0,0 @@
1
- export default class Example {
2
- recordId: any;
3
- get functionCallFromNamespacedImport(): any;
4
- get mutlipleCallsFromNamespacedImport(): any;
5
- get mixedCallsFromImportsWithMultipleImports(): string;
6
- get callFromImportWithOnlySpecificImport(): any;
7
- get callFromAlias(): any;
8
- get callFromDefault(): any;
9
- get smorgasbord(): any;
10
- localProp: {
11
- baz: string;
12
- };
13
- Bar: string;
14
- get samePropNames(): string;
15
- record: {};
16
- contacts: any;
17
- }
18
- //# sourceMappingURL=source.d.ts.map
@@ -1,108 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- 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;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- var __importDefault = (this && this.__importDefault) || function (mod) {
32
- return (mod && mod.__esModule) ? mod : { "default": mod };
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- const lightning_1 = require("lightning");
36
- // i1
37
- const uiRecordApi_1 = require("lightning/uiRecordApi");
38
- // i2
39
- const ContactController_findContacts_1 = __importDefault(require("@salesforce/apex/ContactController.findContacts"));
40
- // i4
41
- const Foo = __importStar(require("laf/transformWire"));
42
- // i6, { i7 }
43
- const shared_1 = __importStar(require("force/shared"));
44
- class Example extends lightning_1.LightningElement {
45
- constructor() {
46
- super(...arguments);
47
- // member expression reference a property name same to an import
48
- this.localProp = {
49
- baz: 'somevalue',
50
- };
51
- this.Bar = 'somevalue';
52
- this.record = {};
53
- }
54
- get functionCallFromNamespacedImport() {
55
- const tempVal = Foo.important('withStuff');
56
- return tempVal;
57
- }
58
- get mutlipleCallsFromNamespacedImport() {
59
- const tempVal = Foo.important('withStuff');
60
- const secondVal = tempVal + Foo.rewind() + Foo.someValue;
61
- return secondVal;
62
- }
63
- get mixedCallsFromImportsWithMultipleImports() {
64
- const newShiny = shared_1.default.wowThatsCool(shared_1.default.uniqueId);
65
- const oldDull = (0, shared_1.trouble)();
66
- return newShiny + ' ' + oldDull;
67
- }
68
- get callFromImportWithOnlySpecificImport() {
69
- return shared_1.Bar;
70
- }
71
- get callFromAlias() {
72
- return (0, shared_1.friendlyGesture)();
73
- }
74
- get callFromDefault() {
75
- return this.record && this.record.data
76
- ? shared_1.baz + shared_1.baz.someCall(this.record.data)
77
- : shared_1.baz;
78
- }
79
- get smorgasbord() {
80
- const goodValue = Foo.wowCheckThisOut(this.record.data, this.contacts.data) + shared_1.baz;
81
- const secondary = (0, shared_1.trouble)();
82
- const comboScore = (0, shared_1.friendlyGesture)(goodValue + secondary);
83
- return (0, shared_1.default)(comboScore);
84
- }
85
- get samePropNames() {
86
- return this.localProp.baz + this.Bar;
87
- }
88
- }
89
- __decorate([
90
- lightning_1.api
91
- ], Example.prototype, "recordId", void 0);
92
- __decorate([
93
- (0, lightning_1.wire)(uiRecordApi_1.getRecord, { recordId: '$recordId', layoutTypes: ['Full'], modes: ['View'] })
94
- ], Example.prototype, "record", void 0);
95
- __decorate([
96
- (0, lightning_1.wire)(ContactController_findContacts_1.default, {
97
- smorgasbord: '$smorgasbord',
98
- callFromDefault: '$callFromDefault',
99
- callFromAlias: '$callFromAlias',
100
- callFromImportWithOnlySpecificImport: '$callFromImportWithOnlySpecificImport',
101
- mixedCallsFromImportsWithMultipleImports: '$mixedCallsFromImportsWithMultipleImports',
102
- mutlipleCallsFromNamespacedImport: '$mutlipleCallsFromNamespacedImport',
103
- functionCallFromNamespacedImport: '$functionCallFromNamespacedImport',
104
- samePropNames: '$samePropNames',
105
- })
106
- ], Example.prototype, "contacts", void 0);
107
- exports.default = Example;
108
- //# sourceMappingURL=source.js.map
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- functions: {
3
- functionCallFromNamespacedImport: string;
4
- mutlipleCallsFromNamespacedImport: string;
5
- mixedCallsFromImportsWithMultipleImports: string;
6
- callFromImportWithOnlySpecificImport: string;
7
- callFromAlias: string;
8
- callFromDefault: string;
9
- smorgasbord: string;
10
- samePropNames: string;
11
- };
12
- imports: Record<string, {
13
- resourceName: string;
14
- output: string;
15
- }>;
16
- };
17
- export default _default;
18
- //# sourceMappingURL=validationStuff.d.ts.map
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const expectedFunctions = {
4
- functionCallFromNamespacedImport: `function g0(props) {
5
- const tempVal = i8.important('withStuff');
6
- return tempVal;
7
- }`,
8
- mutlipleCallsFromNamespacedImport: `function g1(props) {
9
- const tempVal = i8.important('withStuff');
10
- const secondVal = tempVal + i8.rewind() + i8.someValue;
11
- return secondVal;
12
- }`,
13
- mixedCallsFromImportsWithMultipleImports: `function g2(props) {
14
- const newShiny = i2.wowThatsCool(i2.uniqueId);
15
- const oldDull = i3();
16
- return newShiny + ' ' + oldDull;
17
- }`,
18
- callFromImportWithOnlySpecificImport: `function g3(props) {
19
- return i1;
20
- }`,
21
- callFromAlias: `function g4(props) {
22
- return i4();
23
- }`,
24
- callFromDefault: `function g5(props) {
25
- return props.record && props.record.data ? i5 + i5.someCall(props.record.data) : i5;
26
- }`,
27
- smorgasbord: `function g6(props) {
28
- const goodValue = i8.wowCheckThisOut(props.record.data, props.contacts.data) + i5;
29
- const secondary = i3();
30
- const comboScore = i4(goodValue + secondary);
31
- return i2(comboScore);
32
- }`,
33
- samePropNames: `function g7(props) {
34
- return props.localProp.baz + props.Bar;
35
- }`,
36
- };
37
- const expectedImports = {
38
- namespace: {
39
- resourceName: 'laf/transformWire',
40
- output: 'import * as i8 from "laf/transformWire";',
41
- },
42
- default: {
43
- resourceName: 'force/shared',
44
- output: 'import i2, { Bar as i1, trouble as i3, friendlyGesture as i4, baz as i5 } from "force/shared";',
45
- },
46
- mixed: {
47
- resourceName: 'force/shared',
48
- output: 'import i2, { Bar as i1, trouble as i3, friendlyGesture as i4, baz as i5 } from "force/shared";',
49
- },
50
- alias: {
51
- resourceName: 'force/shared',
52
- output: 'import i2, { Bar as i1, trouble as i3, friendlyGesture as i4, baz as i5 } from "force/shared";',
53
- },
54
- regular: {
55
- resourceName: 'force/shared',
56
- output: 'import i2, { Bar as i1, trouble as i3, friendlyGesture as i4, baz as i5 } from "force/shared";',
57
- },
58
- };
59
- exports.default = {
60
- functions: expectedFunctions,
61
- imports: expectedImports,
62
- };
63
- //# sourceMappingURL=validationStuff.js.map
@@ -1,8 +0,0 @@
1
- export default class Component {
2
- recordId: any;
3
- contractId: any;
4
- malicious: string;
5
- contract: any;
6
- account: any;
7
- }
8
- //# sourceMappingURL=source.d.ts.map
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const shared_1 = require("force/shared");
13
- const uiRecordApi_1 = require("lightning/uiRecordApi");
14
- const crazycool_1 = __importDefault(require("@salesforce/label/crazycool"));
15
- const lightning_1 = require("lightning");
16
- const import_1 = __importDefault(require("bad/import"));
17
- class Component extends lightning_1.LightningElement {
18
- constructor() {
19
- super(...arguments);
20
- this.contractId = (0, shared_1.gql) `search ${this.recordId} + ${crazycool_1.default}`;
21
- this.malicious = `nefarious input ${((this.recordId = 'busted'), (0, import_1.default)())}`;
22
- }
23
- }
24
- __decorate([
25
- lightning_1.api
26
- ], Component.prototype, "recordId", void 0);
27
- __decorate([
28
- (0, lightning_1.wire)(uiRecordApi_1.getRecord, { id: '$contractId' })
29
- ], Component.prototype, "contract", void 0);
30
- __decorate([
31
- (0, lightning_1.wire)(uiRecordApi_1.getRecord, { id: '$malicious' })
32
- ], Component.prototype, "account", void 0);
33
- exports.default = Component;
34
- //# sourceMappingURL=source.js.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=compile-graphql-with-scoped-import.spec.d.ts.map
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const readAndParseBundle_1 = require("../readAndParseBundle");
8
- describe('test komaci can build a correct module', () => {
9
- it('can handle an import name conflicting with optional property name', () => {
10
- //TODO: tweak this test pattern further so that it's even less repetitive while not generating tests.
11
- const componentPath = path_1.default.join(__dirname, 'lightning', 'component');
12
- const actualModuleSrc = (0, readAndParseBundle_1.readAndParseBundle)(componentPath, {
13
- enableKomaci: true,
14
- type: 'internal',
15
- enableLuvio: true,
16
- }).output.modGenOutput;
17
- expect(actualModuleSrc).toMatchSnapshot();
18
- });
19
- });
20
- //# sourceMappingURL=compile-graphql-with-scoped-import.spec.js.map
@@ -1,18 +0,0 @@
1
- export default class MultipleGraphQL extends LightningElement {
2
- recordId: any;
3
- get woQuery(): any;
4
- graphqlResult: any;
5
- get accountIDs(): any;
6
- get graphqlVariables(): {
7
- recordId: any;
8
- };
9
- get accRelatedRecQuery(): any;
10
- graphqlAccResult: any;
11
- get graphqlAccVariables(): {
12
- accId: any;
13
- };
14
- get accountResponseString(): any;
15
- get accountResponse(): string;
16
- }
17
- import { LightningElement } from "lwc";
18
- //# sourceMappingURL=component.d.ts.map
@@ -1,168 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const lwc_1 = require("lwc");
10
- const uiGraphQLApi_1 = require("lightning/uiGraphQLApi");
11
- class MultipleGraphQL extends lwc_1.LightningElement {
12
- get woQuery() {
13
- return (0, uiGraphQLApi_1.gql) `
14
- query showWorkorder($recordId: ID) {
15
- uiapi {
16
- query {
17
- WorkOrder(where: { Id: { eq: $recordId } })
18
- @category(name: "recordQuery") {
19
- edges {
20
- node {
21
- Id
22
- Status @category(name: "StringValue") {
23
- value
24
- }
25
- AccountId @category(name: "IDValue") {
26
- value
27
- }
28
- }
29
- }
30
- }
31
- }
32
- }
33
- }
34
- `;
35
- }
36
- get accountIDs() {
37
- return this.graphqlResult?.data?.uiapi.query.WorkOrder.edges[0].node.AccountId
38
- .value; // Here's the bug
39
- }
40
- get graphqlVariables() {
41
- return {
42
- recordId: this.recordId,
43
- };
44
- }
45
- //fetching Location and Asset from Account ID
46
- get accRelatedRecQuery() {
47
- return (0, uiGraphQLApi_1.gql) `
48
- query showAccRelRecords($accId: ID) {
49
- uiapi {
50
- query {
51
- Account(where: { Id: { eq: $accId } })
52
- @category(name: "recordQuery") {
53
- edges {
54
- node {
55
- Locations__r(where: { Active__c: { eq: true } })
56
- @category(name: "childRelationship") {
57
- edges {
58
- node {
59
- Name @category(name: "StringValue") {
60
- value
61
- }
62
- LocationType
63
- @category(name: "StringValue") {
64
- value
65
- }
66
- Customer_Site__r
67
- @category(
68
- name: "parentRelationship"
69
- ) {
70
- Name @category(name: "StringValue") {
71
- value
72
- }
73
- }
74
- }
75
- }
76
- }
77
- Assets(where: { Active__c: { eq: true } })
78
- @category(name: "childRelationship") {
79
- edges {
80
- node {
81
- Name @category(name: "StringValue") {
82
- value
83
- }
84
- Linked_Asset_Name__c
85
- @category(name: "StringValue") {
86
- value
87
- }
88
- LocationId @category(name: "IDValue") {
89
- value
90
- }
91
- Asset_Type__c
92
- @category(name: "StringValue") {
93
- value
94
- }
95
- Machine_Type__c
96
- @category(name: "StringValue") {
97
- value
98
- }
99
- Linked_Asset_Serial_Number__c
100
- @category(name: "StringValue") {
101
- value
102
- }
103
- AccountId @category(name: "IDValue") {
104
- value
105
- }
106
- Account
107
- @category(
108
- name: "parentRelationship"
109
- ) {
110
- Name @category(name: "StringValue") {
111
- value
112
- }
113
- }
114
- Location
115
- @category(
116
- name: "parentRelationship"
117
- ) {
118
- Name @category(name: "StringValue") {
119
- value
120
- }
121
- LocationType
122
- @category(name: "StringValue") {
123
- value
124
- }
125
- }
126
- }
127
- }
128
- }
129
- }
130
- }
131
- }
132
- }
133
- }
134
- }
135
- `;
136
- }
137
- //AccountID populated through result of other graphql
138
- get graphqlAccVariables() {
139
- return {
140
- accId: this.accountIDs,
141
- };
142
- }
143
- get accountResponseString() {
144
- return this.graphqlAccResult;
145
- }
146
- get accountResponse() {
147
- return JSON.stringify(this.graphqlAccResult);
148
- }
149
- }
150
- __decorate([
151
- lwc_1.api
152
- ], MultipleGraphQL.prototype, "recordId", void 0);
153
- __decorate([
154
- (0, lwc_1.wire)(uiGraphQLApi_1.graphql, {
155
- query: '$woQuery',
156
- variables: '$graphqlVariables',
157
- operationName: 'showWorkorder',
158
- })
159
- ], MultipleGraphQL.prototype, "graphqlResult", void 0);
160
- __decorate([
161
- (0, lwc_1.wire)(uiGraphQLApi_1.graphql, {
162
- query: '$accRelatedRecQuery',
163
- variables: '$graphqlAccVariables',
164
- operationName: 'showAccRelRecords',
165
- })
166
- ], MultipleGraphQL.prototype, "graphqlAccResult", void 0);
167
- exports.default = MultipleGraphQL;
168
- //# sourceMappingURL=component.js.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=genericAstGeneration.spec.d.ts.map