@komaci/common-shared 242.1.5 → 242.1.6
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.
- package/build/internal-namespaces.json +14 -0
- package/build/komaci-mapping.json +63 -3
- package/build/moduleMetadata.d.ts +1 -1
- package/build/moduleMetadata.js +2 -2
- package/build/types.d.ts +7 -2
- package/build/types.js +2 -0
- package/build/utils.d.ts +6 -6
- package/build/utils.js +14 -9
- package/package.json +2 -2
|
@@ -325,6 +325,8 @@
|
|
|
325
325
|
"commercetax",
|
|
326
326
|
"commonserviceexcellence",
|
|
327
327
|
"commpay_mp",
|
|
328
|
+
"comms_msm",
|
|
329
|
+
"comms_msm_cmp",
|
|
328
330
|
"community_article",
|
|
329
331
|
"community_builder",
|
|
330
332
|
"community_builder_test",
|
|
@@ -404,6 +406,7 @@
|
|
|
404
406
|
"devopsimpkg7",
|
|
405
407
|
"devopsimpkg8",
|
|
406
408
|
"devopsimpkg9",
|
|
409
|
+
"discoveryframework",
|
|
407
410
|
"dmvr",
|
|
408
411
|
"dxp",
|
|
409
412
|
"dxp_base",
|
|
@@ -424,6 +427,7 @@
|
|
|
424
427
|
"educationcloud",
|
|
425
428
|
"educationcloud_scheduler",
|
|
426
429
|
"eduint",
|
|
430
|
+
"edurfi",
|
|
427
431
|
"eduscheduler",
|
|
428
432
|
"einstein_assistant",
|
|
429
433
|
"einstein_discovery",
|
|
@@ -531,9 +535,12 @@
|
|
|
531
535
|
"hc8",
|
|
532
536
|
"hc9",
|
|
533
537
|
"hc9gs0",
|
|
538
|
+
"hc_contact_center",
|
|
539
|
+
"hc_crisis_center",
|
|
534
540
|
"hc_slack_flows",
|
|
535
541
|
"hcmainstgpu",
|
|
536
542
|
"hcmainstguat",
|
|
543
|
+
"hcumprovider",
|
|
537
544
|
"healthcare_crisis_center",
|
|
538
545
|
"healthcloud",
|
|
539
546
|
"healthcloud_crisis_center",
|
|
@@ -612,6 +619,7 @@
|
|
|
612
619
|
"lightningsnapin",
|
|
613
620
|
"lmrdebug",
|
|
614
621
|
"loyalty_member_engagement",
|
|
622
|
+
"loyalty_se",
|
|
615
623
|
"lsttest",
|
|
616
624
|
"ltngtools",
|
|
617
625
|
"lwc",
|
|
@@ -782,6 +790,7 @@
|
|
|
782
790
|
"runtime_revenue_billingbatchpayments",
|
|
783
791
|
"runtime_revenue_billingbatchschedulers",
|
|
784
792
|
"runtime_revenue_insights",
|
|
793
|
+
"runtime_revenue_intelligence",
|
|
785
794
|
"runtime_revenue_products",
|
|
786
795
|
"runtime_sales_activities",
|
|
787
796
|
"runtime_sales_activities_test",
|
|
@@ -803,6 +812,8 @@
|
|
|
803
812
|
"runtime_sales_linkedin",
|
|
804
813
|
"runtime_sales_merge",
|
|
805
814
|
"runtime_sales_multiaddedit",
|
|
815
|
+
"runtime_sales_opportunitysplit",
|
|
816
|
+
"runtime_sales_opportunitysplittest",
|
|
806
817
|
"runtime_sales_pathassistant",
|
|
807
818
|
"runtime_sales_pathassistanttest",
|
|
808
819
|
"runtime_sales_pipelineboard",
|
|
@@ -921,6 +932,7 @@
|
|
|
921
932
|
"setup_platform_sfdx",
|
|
922
933
|
"setup_release_update",
|
|
923
934
|
"setup_revenue_insights",
|
|
935
|
+
"setup_revenue_intelligence",
|
|
924
936
|
"setup_sales_bot",
|
|
925
937
|
"setup_sales_einstein",
|
|
926
938
|
"setup_sales_einsteinForecasting",
|
|
@@ -988,6 +1000,8 @@
|
|
|
988
1000
|
"stmpahins01",
|
|
989
1001
|
"studioauratest",
|
|
990
1002
|
"studiobrandingtest",
|
|
1003
|
+
"subledger_flow",
|
|
1004
|
+
"subledger_s_flow",
|
|
991
1005
|
"supporttest",
|
|
992
1006
|
"survey",
|
|
993
1007
|
"survey_sentiment",
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lightning/uiRecordActionsApi": {
|
|
3
|
+
"getActionOverrides": {
|
|
4
|
+
"prime": {
|
|
5
|
+
"importPath": "lightning/unstable_uiRecordActionsApi",
|
|
6
|
+
"identifier": "unstable_getActionOverrides_imperative"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"getRecordActions": {
|
|
4
10
|
"prime": {
|
|
5
11
|
"importPath": "lightning/unstable_uiRecordActionsApi",
|
|
@@ -24,7 +30,13 @@
|
|
|
24
30
|
},
|
|
25
31
|
"reducer": {
|
|
26
32
|
"importPath": "laf/batchingPortable",
|
|
27
|
-
"identifier": "RelatedListActionsBatchReducer"
|
|
33
|
+
"identifier": "RelatedListActionsBatchReducer",
|
|
34
|
+
"functions": {
|
|
35
|
+
"afterReduce": {
|
|
36
|
+
"name": "relatedListActionsBatchAfterReduce",
|
|
37
|
+
"filePath": "./scripts/reducer-codegen/after-reduce/relatedListActionsBatchAfterReduce.js"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
}
|
|
@@ -154,7 +166,21 @@
|
|
|
154
166
|
},
|
|
155
167
|
"reducer": {
|
|
156
168
|
"importPath": "laf/batchingPortable",
|
|
157
|
-
"identifier": "GetRecordBatchReducer"
|
|
169
|
+
"identifier": "GetRecordBatchReducer",
|
|
170
|
+
"functions": {
|
|
171
|
+
"afterReduce": {
|
|
172
|
+
"name": "getRecordBatchAfterReduce",
|
|
173
|
+
"filePath": "./scripts/reducer-codegen/after-reduce/getRecordBatchAfterReduce.js"
|
|
174
|
+
},
|
|
175
|
+
"groupByKey": {
|
|
176
|
+
"name": "getRecordBatchGroupByKey",
|
|
177
|
+
"filePath": "./scripts/reducer-codegen/group-by-key-function/getRecordBatchGroupByKey.js"
|
|
178
|
+
},
|
|
179
|
+
"isConfigBatchable": {
|
|
180
|
+
"name": "getRecordIsConfigBatchable",
|
|
181
|
+
"filePath": "./scripts/reducer-codegen/is-config-batchable/getRecordIsConfigBatchable.js"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
158
184
|
}
|
|
159
185
|
}
|
|
160
186
|
}
|
|
@@ -196,7 +222,13 @@
|
|
|
196
222
|
},
|
|
197
223
|
"reducer": {
|
|
198
224
|
"importPath": "laf/batchingPortable",
|
|
199
|
-
"identifier": "RelatedListInfoBatchReducer"
|
|
225
|
+
"identifier": "RelatedListInfoBatchReducer",
|
|
226
|
+
"functions": {
|
|
227
|
+
"groupByKey": {
|
|
228
|
+
"name": "relatedListInfoBatchGroupByKey",
|
|
229
|
+
"filePath": "./scripts/reducer-codegen/group-by-key-function/relatedListInfoBatchGroupByKey.js"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
200
232
|
}
|
|
201
233
|
}
|
|
202
234
|
},
|
|
@@ -238,6 +270,12 @@
|
|
|
238
270
|
}
|
|
239
271
|
},
|
|
240
272
|
"lightning/uiSearchApi": {
|
|
273
|
+
"getSearchFilterMetadata": {
|
|
274
|
+
"prime": {
|
|
275
|
+
"importPath": "lightning/unstable_uiSearchApi",
|
|
276
|
+
"identifier": "unstable_getSearchFilterMetadata_imperative"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
241
279
|
"getSearchFilterOptions": {
|
|
242
280
|
"prime": {
|
|
243
281
|
"importPath": "lightning/unstable_uiSearchApi",
|
|
@@ -258,6 +296,12 @@
|
|
|
258
296
|
}
|
|
259
297
|
},
|
|
260
298
|
"lightning/unstable_uiSearchApi": {
|
|
299
|
+
"unstable_getSearchFilterMetadata": {
|
|
300
|
+
"prime": {
|
|
301
|
+
"importPath": "lightning/unstable_uiSearchApi",
|
|
302
|
+
"identifier": "unstable_getSearchFilterMetadata_imperative"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
261
305
|
"unstable_getSearchFilterOptions": {
|
|
262
306
|
"prime": {
|
|
263
307
|
"importPath": "lightning/unstable_uiSearchApi",
|
|
@@ -277,6 +321,14 @@
|
|
|
277
321
|
}
|
|
278
322
|
}
|
|
279
323
|
},
|
|
324
|
+
"lightning/uiLookupsApi": {
|
|
325
|
+
"getLookupMetadata": {
|
|
326
|
+
"prime": {
|
|
327
|
+
"importPath": "lightning/unstable_uiLookupsApi",
|
|
328
|
+
"identifier": "unstable_getLookupMetadata_imperative"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
280
332
|
"lightning/unstable_uiGraphQLApi": {
|
|
281
333
|
"graphQL": {
|
|
282
334
|
"prime": {
|
|
@@ -284,5 +336,13 @@
|
|
|
284
336
|
"identifier": "unstable_graphQL_imperative"
|
|
285
337
|
}
|
|
286
338
|
}
|
|
339
|
+
},
|
|
340
|
+
"lightning/uiGraphQLApi": {
|
|
341
|
+
"unstable_graphql": {
|
|
342
|
+
"prime": {
|
|
343
|
+
"importPath": "force/ldsAdaptersUiapiGraphql",
|
|
344
|
+
"identifier": "graphql_imperative"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
287
347
|
}
|
|
288
348
|
}
|
|
@@ -73,7 +73,7 @@ export declare const addNewImportFromAst: (referencedName: string, namespace: Im
|
|
|
73
73
|
*/
|
|
74
74
|
export declare const updateAliasForImport: (lookupName: string, referencedName: string, namespace: ImportDetail, moduleMetadata: ModuleMetadata, originalImportName?: string) => void;
|
|
75
75
|
/**
|
|
76
|
-
* Searches the provided
|
|
76
|
+
* Searches the provided template komaci doc map for a document that corresponds to the provided namesapce.
|
|
77
77
|
* @param resourceName am imports resource name
|
|
78
78
|
* @param templateKomaciDocMap a map of template komaci docs.
|
|
79
79
|
*/
|
package/build/moduleMetadata.js
CHANGED
|
@@ -33,7 +33,7 @@ const initAdgMetadataObject = (defaultGeneratedName) => ({
|
|
|
33
33
|
properties: new Map(),
|
|
34
34
|
functions: [],
|
|
35
35
|
propertiesUsedInTemplate: new Set(),
|
|
36
|
-
requiredAdgFactoryFunctions: new Set(),
|
|
36
|
+
requiredAdgFactoryFunctions: new Set([types_1.IdKeys.ADG_FUNC]),
|
|
37
37
|
requiredCompositionFactoryFunctions: new Set(),
|
|
38
38
|
hasSourceFile: false,
|
|
39
39
|
});
|
|
@@ -277,7 +277,7 @@ const updateAliasForImport = (lookupName, referencedName, namespace, moduleMetad
|
|
|
277
277
|
};
|
|
278
278
|
exports.updateAliasForImport = updateAliasForImport;
|
|
279
279
|
/**
|
|
280
|
-
* Searches the provided
|
|
280
|
+
* Searches the provided template komaci doc map for a document that corresponds to the provided namesapce.
|
|
281
281
|
* @param resourceName am imports resource name
|
|
282
282
|
* @param templateKomaciDocMap a map of template komaci docs.
|
|
283
283
|
*/
|
package/build/types.d.ts
CHANGED
|
@@ -77,7 +77,8 @@ export declare enum PropertyTypes {
|
|
|
77
77
|
GETTER = "getter",
|
|
78
78
|
BASE = "base",
|
|
79
79
|
IMPORT_REFERENCE = "importReference",
|
|
80
|
-
TEMPLATE_STRING = "templateString"
|
|
80
|
+
TEMPLATE_STRING = "templateString",
|
|
81
|
+
RENDER_FUNCTION = "render"
|
|
81
82
|
}
|
|
82
83
|
/**
|
|
83
84
|
* Contextual information about a property and who consumes it
|
|
@@ -148,6 +149,7 @@ export declare type BasicImportMetadata = {
|
|
|
148
149
|
*/
|
|
149
150
|
export declare type TemplateImportMetadata = BasicImportMetadata & {
|
|
150
151
|
templateKomaciDoc: KomaciDocument;
|
|
152
|
+
adgReference?: string;
|
|
151
153
|
};
|
|
152
154
|
/**
|
|
153
155
|
* Main type for import meta data.
|
|
@@ -181,6 +183,8 @@ export declare type ClassPropertyNodes = {
|
|
|
181
183
|
getters: NodePath<t.ClassMethod>[];
|
|
182
184
|
/** nodes representative of Template strings */
|
|
183
185
|
templateStrings: NodePath<t.ClassProperty>[];
|
|
186
|
+
/**node to represent the render function */
|
|
187
|
+
renderFunction?: NodePath<t.ClassMethod>;
|
|
184
188
|
};
|
|
185
189
|
/** Contextual info about class and overarching module */
|
|
186
190
|
export declare type ModuleContext = {
|
|
@@ -193,6 +197,7 @@ export declare enum FunctionTypes {
|
|
|
193
197
|
PRIMING_FUNCTION = "PrimingFunction",
|
|
194
198
|
GETTER_FUNCTION = "GetterFunction",
|
|
195
199
|
TEMPLATE_STRING = "TemplateStringFunction",
|
|
200
|
+
RENDER_FUNCTION = "RenderFunction",
|
|
196
201
|
ERROR = "ErrorFunction"
|
|
197
202
|
}
|
|
198
203
|
/**
|
|
@@ -226,7 +231,7 @@ export declare type WireFunctionMetadata = BaseFunctionMetadata & {
|
|
|
226
231
|
* Metadata for a hoisted function type. Currently this is Getter functions and Template String Functions.
|
|
227
232
|
*/
|
|
228
233
|
export declare type HoistedFunctionMetadata = BaseFunctionMetadata & {
|
|
229
|
-
type: FunctionTypes.GETTER_FUNCTION | FunctionTypes.TEMPLATE_STRING;
|
|
234
|
+
type: FunctionTypes.GETTER_FUNCTION | FunctionTypes.TEMPLATE_STRING | FunctionTypes.RENDER_FUNCTION;
|
|
230
235
|
/** ast node from the original component source */
|
|
231
236
|
componentAstNode?: NodePath<t.ClassProperty | t.ClassMethod>;
|
|
232
237
|
generatedName?: string;
|
package/build/types.js
CHANGED
|
@@ -46,6 +46,7 @@ var PropertyTypes;
|
|
|
46
46
|
PropertyTypes["BASE"] = "base";
|
|
47
47
|
PropertyTypes["IMPORT_REFERENCE"] = "importReference";
|
|
48
48
|
PropertyTypes["TEMPLATE_STRING"] = "templateString";
|
|
49
|
+
PropertyTypes["RENDER_FUNCTION"] = "render";
|
|
49
50
|
})(PropertyTypes = exports.PropertyTypes || (exports.PropertyTypes = {}));
|
|
50
51
|
/**
|
|
51
52
|
* When a function is considered unsupported i.e.:
|
|
@@ -62,6 +63,7 @@ var FunctionTypes;
|
|
|
62
63
|
FunctionTypes["PRIMING_FUNCTION"] = "PrimingFunction";
|
|
63
64
|
FunctionTypes["GETTER_FUNCTION"] = "GetterFunction";
|
|
64
65
|
FunctionTypes["TEMPLATE_STRING"] = "TemplateStringFunction";
|
|
66
|
+
FunctionTypes["RENDER_FUNCTION"] = "RenderFunction";
|
|
65
67
|
FunctionTypes["ERROR"] = "ErrorFunction";
|
|
66
68
|
})(FunctionTypes = exports.FunctionTypes || (exports.FunctionTypes = {}));
|
|
67
69
|
//# sourceMappingURL=types.js.map
|
package/build/utils.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const TEMPLATED_STRING_FUNCTION = "TemplatedStringFunction";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function getPropertyMetadataFromAst(ast: t.File): ClassPropertyNodes;
|
|
18
18
|
/**
|
|
19
|
-
* Given a valid functional node (
|
|
19
|
+
* Given a valid functional node (template string or getter function), collect information that we may not have been able to collect via KomaciDocument
|
|
20
20
|
* and return a list of class member variables that are properly used in the method body.
|
|
21
21
|
* "properly" = i.e. used in the right-hand side of a member expression.
|
|
22
22
|
* @param getter NodePath<ClassMethod | Class Property> path that represents class member-level getter method or template string
|
|
@@ -77,11 +77,11 @@ export declare function getAstContextObject(ast: t.File): AstContext;
|
|
|
77
77
|
*/
|
|
78
78
|
export declare function isExternalModule(namespace: string): boolean;
|
|
79
79
|
/**
|
|
80
|
-
* Helper function to collect all variables declared within a
|
|
81
|
-
* @param getterMethodPath the babel path object of the
|
|
82
|
-
* @returns an array of variable names that were declared in the
|
|
80
|
+
* Helper function to collect all variables declared within a function method.
|
|
81
|
+
* @param getterMethodPath the babel path object of the function method.
|
|
82
|
+
* @returns an array of variable names that were declared in the function method.
|
|
83
83
|
*/
|
|
84
|
-
export declare function
|
|
84
|
+
export declare function getVariablesDeclaredInFunction(getterMethodPath: NodePath<t.ClassMethod>): string[];
|
|
85
85
|
/**
|
|
86
86
|
* Helper to get the name of a method
|
|
87
87
|
* @param node The method node
|
|
@@ -115,7 +115,7 @@ export declare function isPropertyNodeUsed(prop: NodePath<t.ClassProperty>, prop
|
|
|
115
115
|
* @param getterMethodPath the babel path object of the getter method.
|
|
116
116
|
* @returns a {Set<string>} of variable names that were declared as alias of 'this'.
|
|
117
117
|
*/
|
|
118
|
-
export declare function
|
|
118
|
+
export declare function getThisAliasDeclaredInFunction(getterMethodPath: NodePath<t.ClassMethod>): Set<string>;
|
|
119
119
|
/**
|
|
120
120
|
* @author xiaoxugu
|
|
121
121
|
* Determines whether the passed in {Expression} is a `this` or whether it is an equivalent alias to `this`
|
package/build/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFilepathSegments = exports.addPropertyFunction = exports.updateKomaciDocumentWithValidTemplatedStrings = exports.updateKomaciDocumentWithValidGetters = exports.isDeclaredInAst = exports.isExpressionThisOrAlias = exports.
|
|
3
|
+
exports.getFilepathSegments = exports.addPropertyFunction = exports.updateKomaciDocumentWithValidTemplatedStrings = exports.updateKomaciDocumentWithValidGetters = exports.isDeclaredInAst = exports.isExpressionThisOrAlias = exports.getThisAliasDeclaredInFunction = exports.isPropertyNodeUsed = exports.isGetterNodeUsed = exports.isPropertyUsed = exports.getClassMethodName = exports.getVariablesDeclaredInFunction = exports.isExternalModule = exports.getAstContextObject = exports.getAllClassMethods = exports.getAllModuleVaraibles = exports.getAllModuleFunctions = exports.getFromIdentifierOrStringLiteral = exports.collectImportUsage = exports.getMemberVarsFromGetter = exports.implicitConsumptionMetadata = exports.getPropertyMetadataFromAst = exports.TEMPLATED_STRING_FUNCTION = exports.GETTER_FUNCTION = exports.ONE_NS = exports.FORCE_NS = exports.LIGHTNING_NS = void 0;
|
|
4
4
|
const core_1 = require("@babel/core");
|
|
5
5
|
const types_1 = require("./types");
|
|
6
6
|
exports.LIGHTNING_NS = 'lightning';
|
|
@@ -19,6 +19,7 @@ function getPropertyMetadataFromAst(ast) {
|
|
|
19
19
|
const nodes = {
|
|
20
20
|
getters: [],
|
|
21
21
|
templateStrings: [],
|
|
22
|
+
renderFunction: undefined,
|
|
22
23
|
};
|
|
23
24
|
const Visitor = {
|
|
24
25
|
Program(path) {
|
|
@@ -44,6 +45,10 @@ function getPropertyMetadataFromAst(ast) {
|
|
|
44
45
|
(path.node.value.type === 'TemplateLiteral' ||
|
|
45
46
|
path.node.value.type ===
|
|
46
47
|
'TaggedTemplateExpression'));
|
|
48
|
+
nodes.renderFunction = classBody
|
|
49
|
+
.get('body')
|
|
50
|
+
.filter((path) => path.node.type === 'ClassMethod' &&
|
|
51
|
+
path.node.key.name === 'render')[0];
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
}
|
|
@@ -54,7 +59,7 @@ function getPropertyMetadataFromAst(ast) {
|
|
|
54
59
|
}
|
|
55
60
|
exports.getPropertyMetadataFromAst = getPropertyMetadataFromAst;
|
|
56
61
|
/**
|
|
57
|
-
* Given a valid functional node (
|
|
62
|
+
* Given a valid functional node (template string or getter function), collect information that we may not have been able to collect via KomaciDocument
|
|
58
63
|
* and return a list of class member variables that are properly used in the method body.
|
|
59
64
|
* "properly" = i.e. used in the right-hand side of a member expression.
|
|
60
65
|
* @param getter NodePath<ClassMethod | Class Property> path that represents class member-level getter method or template string
|
|
@@ -267,11 +272,11 @@ function isExternalModule(namespace) {
|
|
|
267
272
|
}
|
|
268
273
|
exports.isExternalModule = isExternalModule;
|
|
269
274
|
/**
|
|
270
|
-
* Helper function to collect all variables declared within a
|
|
271
|
-
* @param getterMethodPath the babel path object of the
|
|
272
|
-
* @returns an array of variable names that were declared in the
|
|
275
|
+
* Helper function to collect all variables declared within a function method.
|
|
276
|
+
* @param getterMethodPath the babel path object of the function method.
|
|
277
|
+
* @returns an array of variable names that were declared in the function method.
|
|
273
278
|
*/
|
|
274
|
-
function
|
|
279
|
+
function getVariablesDeclaredInFunction(getterMethodPath) {
|
|
275
280
|
const variables = [];
|
|
276
281
|
const getterMethodNode = getterMethodPath.node;
|
|
277
282
|
const declarations = getterMethodNode.body.body.filter((dec) => dec.type === 'VariableDeclaration');
|
|
@@ -282,7 +287,7 @@ function getVariablesDeclaredInGetter(getterMethodPath) {
|
|
|
282
287
|
});
|
|
283
288
|
return variables;
|
|
284
289
|
}
|
|
285
|
-
exports.
|
|
290
|
+
exports.getVariablesDeclaredInFunction = getVariablesDeclaredInFunction;
|
|
286
291
|
/**
|
|
287
292
|
* Helper to get the name of a method
|
|
288
293
|
* @param node The method node
|
|
@@ -338,7 +343,7 @@ exports.isPropertyNodeUsed = isPropertyNodeUsed;
|
|
|
338
343
|
* @param getterMethodPath the babel path object of the getter method.
|
|
339
344
|
* @returns a {Set<string>} of variable names that were declared as alias of 'this'.
|
|
340
345
|
*/
|
|
341
|
-
function
|
|
346
|
+
function getThisAliasDeclaredInFunction(getterMethodPath) {
|
|
342
347
|
const variables = new Set();
|
|
343
348
|
const getterMethodNode = getterMethodPath.node;
|
|
344
349
|
const declarations = getterMethodNode.body.body.filter((dec) => dec.type === 'VariableDeclaration');
|
|
@@ -351,7 +356,7 @@ function getThisAliasDeclaredInGetter(getterMethodPath) {
|
|
|
351
356
|
});
|
|
352
357
|
return variables;
|
|
353
358
|
}
|
|
354
|
-
exports.
|
|
359
|
+
exports.getThisAliasDeclaredInFunction = getThisAliasDeclaredInFunction;
|
|
355
360
|
/**
|
|
356
361
|
* @author xiaoxugu
|
|
357
362
|
* Determines whether the passed in {Expression} is a `this` or whether it is an equivalent alias to `this`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/common-shared",
|
|
3
|
-
"version": "242.1.
|
|
3
|
+
"version": "242.1.6",
|
|
4
4
|
"description": "Assets that are shared across Komaci commonjs packages",
|
|
5
5
|
"homepage": "https://komaci.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build/komaci-mapping.json"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@komaci/types": "242.1.
|
|
32
|
+
"@komaci/types": "242.1.6"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/core": "^7.9.0",
|