@komaci/common-shared 244.1.2 → 244.1.4
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.
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"builder_industries_serviceprocess",
|
|
276
276
|
"builder_industries_utilizationmanagement",
|
|
277
277
|
"builder_industries_visit",
|
|
278
|
+
"builder_interaction_externalservices",
|
|
278
279
|
"builder_payments",
|
|
279
280
|
"builder_platform_interaction",
|
|
280
281
|
"builder_platform_process",
|
|
@@ -324,6 +325,7 @@
|
|
|
324
325
|
"commerce_dx_sampleapp",
|
|
325
326
|
"commerce_extension",
|
|
326
327
|
"commerce_inventory",
|
|
328
|
+
"commerce_market",
|
|
327
329
|
"commerce_my_account",
|
|
328
330
|
"commerce_ordermanagement",
|
|
329
331
|
"commerce_ordersummary",
|
|
@@ -339,6 +341,7 @@
|
|
|
339
341
|
"commercepayments",
|
|
340
342
|
"commercepricing",
|
|
341
343
|
"commercepromotions",
|
|
344
|
+
"commercestorepricing",
|
|
342
345
|
"commercetax",
|
|
343
346
|
"commonserviceexcellence",
|
|
344
347
|
"commpay_mp",
|
|
@@ -436,6 +439,7 @@
|
|
|
436
439
|
"devopsimpkg9",
|
|
437
440
|
"discoveryframework",
|
|
438
441
|
"dmvr",
|
|
442
|
+
"documentreader",
|
|
439
443
|
"dxp",
|
|
440
444
|
"dxp_action",
|
|
441
445
|
"dxp_base",
|
|
@@ -473,6 +477,7 @@
|
|
|
473
477
|
"es_property_editors",
|
|
474
478
|
"escBuilder",
|
|
475
479
|
"et4ae5",
|
|
480
|
+
"eu_program",
|
|
476
481
|
"eventbus",
|
|
477
482
|
"exp_builder",
|
|
478
483
|
"experience",
|
|
@@ -529,7 +534,9 @@
|
|
|
529
534
|
"fsc7gs0",
|
|
530
535
|
"fsc8gs0",
|
|
531
536
|
"fsc9gs0",
|
|
537
|
+
"fsc_onboarding_flows",
|
|
532
538
|
"fsc_rb",
|
|
539
|
+
"fsccomplaintmanagement",
|
|
533
540
|
"fscmainstgpu",
|
|
534
541
|
"fscmainstguat",
|
|
535
542
|
"fscserviceprocess",
|
|
@@ -626,6 +633,7 @@
|
|
|
626
633
|
"interactiontest",
|
|
627
634
|
"inventorypricing",
|
|
628
635
|
"iot",
|
|
636
|
+
"ise_bots",
|
|
629
637
|
"isotope",
|
|
630
638
|
"jigsaw_clean",
|
|
631
639
|
"jsonxform",
|
|
@@ -667,6 +675,7 @@
|
|
|
667
675
|
"mcontent_content_translate",
|
|
668
676
|
"mcontent_editor",
|
|
669
677
|
"mcontent_interaction_builder",
|
|
678
|
+
"mcontent_shared",
|
|
670
679
|
"mcontent_workspace",
|
|
671
680
|
"mfa_assistant",
|
|
672
681
|
"mlplatform",
|
|
@@ -684,6 +693,7 @@
|
|
|
684
693
|
"omnichannel_messaging",
|
|
685
694
|
"omnichannel_voice",
|
|
686
695
|
"omnistudiocore",
|
|
696
|
+
"onboarding_templates",
|
|
687
697
|
"onlinesales",
|
|
688
698
|
"opencti",
|
|
689
699
|
"openctitest",
|
|
@@ -743,12 +753,15 @@
|
|
|
743
753
|
"runtime_declarative_card",
|
|
744
754
|
"runtime_einstein_campaign",
|
|
745
755
|
"runtime_einstein_discovery",
|
|
756
|
+
"runtime_enablement_coaching",
|
|
746
757
|
"runtime_essential_checkout",
|
|
747
758
|
"runtime_growth_intelligence",
|
|
748
759
|
"runtime_hcc_performanceassistant",
|
|
749
760
|
"runtime_hcc_scalecenter",
|
|
750
761
|
"runtime_hello_studio",
|
|
751
762
|
"runtime_hybrid_capabilities",
|
|
763
|
+
"runtime_iag_base",
|
|
764
|
+
"runtime_iag_core",
|
|
752
765
|
"runtime_incident_mgmt_components",
|
|
753
766
|
"runtime_industries_actionablelist",
|
|
754
767
|
"runtime_industries_actionplan",
|
|
@@ -756,15 +769,20 @@
|
|
|
756
769
|
"runtime_industries_aisentimentresult",
|
|
757
770
|
"runtime_industries_arcgraph",
|
|
758
771
|
"runtime_industries_assessment",
|
|
772
|
+
"runtime_industries_budget",
|
|
759
773
|
"runtime_industries_churn_ED",
|
|
760
774
|
"runtime_industries_clause_library",
|
|
761
775
|
"runtime_industries_clm",
|
|
762
776
|
"runtime_industries_clm_addin",
|
|
763
777
|
"runtime_industries_components",
|
|
778
|
+
"runtime_industries_context",
|
|
779
|
+
"runtime_industries_cpq",
|
|
764
780
|
"runtime_industries_documentreader",
|
|
765
781
|
"runtime_industries_epc",
|
|
766
782
|
"runtime_industries_eri",
|
|
767
783
|
"runtime_industries_fsc",
|
|
784
|
+
"runtime_industries_fundraising",
|
|
785
|
+
"runtime_industries_fundraisingops",
|
|
768
786
|
"runtime_industries_gdf",
|
|
769
787
|
"runtime_industries_healthcare",
|
|
770
788
|
"runtime_industries_insurance",
|
|
@@ -781,6 +799,7 @@
|
|
|
781
799
|
"runtime_industries_publicsector",
|
|
782
800
|
"runtime_industries_recurrence",
|
|
783
801
|
"runtime_industries_recurrence_impl",
|
|
802
|
+
"runtime_industries_referral_management",
|
|
784
803
|
"runtime_industries_referralscoring",
|
|
785
804
|
"runtime_industries_retailexecution",
|
|
786
805
|
"runtime_industries_serviceprocess",
|
|
@@ -812,11 +831,13 @@
|
|
|
812
831
|
"runtime_platform_optimizer",
|
|
813
832
|
"runtime_platform_prefcenter",
|
|
814
833
|
"runtime_platform_privacy_analytics",
|
|
834
|
+
"runtime_platform_salesforcehub",
|
|
815
835
|
"runtime_platform_sfdx",
|
|
816
836
|
"runtime_platform_unified_notifications",
|
|
817
837
|
"runtime_platformservices_condBuilder",
|
|
818
838
|
"runtime_platformservices_transactionSecurity",
|
|
819
839
|
"runtime_process_exception",
|
|
840
|
+
"runtime_process_optimization",
|
|
820
841
|
"runtime_qtc_assetmanagement",
|
|
821
842
|
"runtime_quip",
|
|
822
843
|
"runtime_rbl_flows",
|
|
@@ -846,6 +867,7 @@
|
|
|
846
867
|
"runtime_sales_hvs_test",
|
|
847
868
|
"runtime_sales_insights",
|
|
848
869
|
"runtime_sales_lead",
|
|
870
|
+
"runtime_sales_leadiq",
|
|
849
871
|
"runtime_sales_linkedin",
|
|
850
872
|
"runtime_sales_merge",
|
|
851
873
|
"runtime_sales_multiaddedit",
|
|
@@ -868,6 +890,7 @@
|
|
|
868
890
|
"runtime_service_omnichannel",
|
|
869
891
|
"runtime_service_predictions",
|
|
870
892
|
"runtime_service_scs",
|
|
893
|
+
"runtime_service_servicecatalog",
|
|
871
894
|
"runtime_service_swarming",
|
|
872
895
|
"runtime_service_trials",
|
|
873
896
|
"runtime_service_trials_test",
|
|
@@ -875,6 +898,7 @@
|
|
|
875
898
|
"runtime_ses_base",
|
|
876
899
|
"runtime_ses_ext",
|
|
877
900
|
"runtime_ufa_flows",
|
|
901
|
+
"runtime_web3",
|
|
878
902
|
"runtime_workdotcom_qmgmt",
|
|
879
903
|
"rypple_corp",
|
|
880
904
|
"sales_bots",
|
|
@@ -927,11 +951,14 @@
|
|
|
927
951
|
"setup_industries_clm_addin",
|
|
928
952
|
"setup_industries_common",
|
|
929
953
|
"setup_industries_comprehend",
|
|
954
|
+
"setup_industries_context",
|
|
955
|
+
"setup_industries_cpq",
|
|
930
956
|
"setup_industries_dataprocessingengine",
|
|
931
957
|
"setup_industries_decisiontable",
|
|
932
958
|
"setup_industries_docgen",
|
|
933
959
|
"setup_industries_documentreader",
|
|
934
960
|
"setup_industries_educationcloud",
|
|
961
|
+
"setup_industries_grantmaking",
|
|
935
962
|
"setup_industries_insurance",
|
|
936
963
|
"setup_industries_mfg_common",
|
|
937
964
|
"setup_industries_mfg_service",
|
|
@@ -963,6 +990,7 @@
|
|
|
963
990
|
"setup_platform_cdc",
|
|
964
991
|
"setup_platform_dsar",
|
|
965
992
|
"setup_platform_dynamodbsetupwizard",
|
|
993
|
+
"setup_platform_eventrelay",
|
|
966
994
|
"setup_platform_externalconnection",
|
|
967
995
|
"setup_platform_externaldatasource",
|
|
968
996
|
"setup_platform_integration",
|
|
@@ -974,6 +1002,7 @@
|
|
|
974
1002
|
"setup_release_update",
|
|
975
1003
|
"setup_revenue_insights",
|
|
976
1004
|
"setup_revenue_intelligence",
|
|
1005
|
+
"setup_sales_ai4m",
|
|
977
1006
|
"setup_sales_bot",
|
|
978
1007
|
"setup_sales_einstein",
|
|
979
1008
|
"setup_sales_einsteinForecasting",
|
|
@@ -1146,6 +1175,7 @@
|
|
|
1146
1175
|
"vlocityins10",
|
|
1147
1176
|
"vlocityins11",
|
|
1148
1177
|
"vlocityins12",
|
|
1178
|
+
"vlocityins13",
|
|
1149
1179
|
"vlocityins2",
|
|
1150
1180
|
"vlocityins3",
|
|
1151
1181
|
"vlocityins4",
|
|
@@ -227,7 +227,13 @@ function initializePropertiesMap(adgProperties, adgFunctions, adgIndex, doc, mod
|
|
|
227
227
|
const importMetadata = moduleMetadata.importsByName.get(
|
|
228
228
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
229
229
|
moduleMetadata.importIndexReference.get(potentialImportRef.value));
|
|
230
|
-
importMetadata.
|
|
230
|
+
if (importMetadata.isFromInternalNamespace &&
|
|
231
|
+
importMetadata.isFromSupportedLibrary) {
|
|
232
|
+
importMetadata.usedInPriming = true;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
adgMetadata.requiredAdgFactoryFunctions.add(types_1.IdKeys.UNRESOLVED_VALUE);
|
|
236
|
+
}
|
|
231
237
|
}
|
|
232
238
|
else if (potentialImportRef.type === 'Unresolved') {
|
|
233
239
|
adgMetadata.requiredAdgFactoryFunctions.add(types_1.IdKeys.UNRESOLVED_VALUE);
|
|
@@ -80,6 +80,15 @@ export declare const updateAliasForImport: (lookupName: string, referencedName:
|
|
|
80
80
|
export declare function getImportTemplateKomaciDocByResourceName(resourceName: string, templateKomaciDocMap?: {
|
|
81
81
|
[fName: string]: KomaciDocument;
|
|
82
82
|
}): KomaciDocument | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* multiple things can import something with the same base name before we fully process ast
|
|
85
|
+
* this makes sure we get import metadata for the right namespace.
|
|
86
|
+
* @param name the import name
|
|
87
|
+
* @param namespace the namespace to insure we get from
|
|
88
|
+
* @param moduleMetadata module metadata
|
|
89
|
+
* @returns the import if we could find it
|
|
90
|
+
*/
|
|
91
|
+
export declare function getImportFromNamespace(name: string, namespace: string, moduleMetadata: ModuleMetadata): ImportMetadata | undefined;
|
|
83
92
|
/**
|
|
84
93
|
* pull all needful import metadata we can from the ast
|
|
85
94
|
* for the most part, we can grab data from the komaci document for imports but sometimes
|
|
@@ -94,6 +103,14 @@ export declare function getImportTemplateKomaciDocByResourceName(resourceName: s
|
|
|
94
103
|
* @param ast ast for the given component
|
|
95
104
|
*/
|
|
96
105
|
export declare const collectImportMetadataFromAst: (ast: t.File, moduleMetadata: ModuleMetadata) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Find the other import metadata object that references the same import with a different alias
|
|
108
|
+
* @param resourceName import resource path
|
|
109
|
+
* @param importedName the name as it comes from the import, an exported name, `default` or `*`
|
|
110
|
+
* @param moduleMetadata module metadata for this component
|
|
111
|
+
* @returns the import metadata if it is found
|
|
112
|
+
*/
|
|
113
|
+
export declare const findOtherAlias: (resourceName: string, importedName: string, moduleMetadata: ModuleMetadata) => ImportMetadata | undefined;
|
|
97
114
|
/**
|
|
98
115
|
* From a given adg, collect as much metadata as possible ONLY from the komaci document
|
|
99
116
|
*
|
package/build/moduleMetadata.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTemplateImport = exports.upliftFakePropsFromTemplate = exports.reconcileDefaultAdg = exports.isImportInvalid = exports.reconcilePrimingAdapater = exports.reconcileWireReference = exports.composeWireFunctionMetadata = exports.addTemplateUsageForAdg = exports.mapExportNamesToAdgs = exports.initalizeAdgMetadata = exports.collectImportMetadataFromAst = exports.getImportTemplateKomaciDocByResourceName = exports.updateAliasForImport = exports.addNewImportFromAst = exports.reconcileImport = exports.reconcileNamespace = exports.traverseAstImports = exports.composeImportMetadata = exports.initializeImportMetdataFromKomaciDocument = exports.initAdgMetadataObject = exports.initModuleMetadataObject = exports.NO_KOMACI_DOC_REF = void 0;
|
|
3
|
+
exports.isTemplateImport = exports.upliftFakePropsFromTemplate = exports.reconcileDefaultAdg = exports.isImportInvalid = exports.reconcilePrimingAdapater = exports.reconcileWireReference = exports.composeWireFunctionMetadata = exports.addTemplateUsageForAdg = exports.mapExportNamesToAdgs = exports.initalizeAdgMetadata = exports.findOtherAlias = exports.collectImportMetadataFromAst = exports.getImportFromNamespace = exports.getImportTemplateKomaciDocByResourceName = exports.updateAliasForImport = exports.addNewImportFromAst = exports.reconcileImport = exports.reconcileNamespace = exports.traverseAstImports = exports.composeImportMetadata = exports.initializeImportMetdataFromKomaciDocument = exports.initAdgMetadataObject = exports.initModuleMetadataObject = exports.NO_KOMACI_DOC_REF = void 0;
|
|
4
4
|
const allowlistNamespaces_1 = require("./allowlistNamespaces");
|
|
5
5
|
const komaciDocumentIntrospection_1 = require("./komaciDocumentIntrospection");
|
|
6
6
|
const types_1 = require("./types");
|
|
@@ -55,6 +55,7 @@ const initializeImportMetdataFromKomaciDocument = (doc, moduleMetadata, template
|
|
|
55
55
|
const namespace = {
|
|
56
56
|
names,
|
|
57
57
|
isSupported,
|
|
58
|
+
originalNames: names,
|
|
58
59
|
resourceName: importNamespace.resourceName,
|
|
59
60
|
isDefaultSpecifier: names.has('default'),
|
|
60
61
|
isNamespaceSpecifier: names.has('*'),
|
|
@@ -63,7 +64,10 @@ const initializeImportMetdataFromKomaciDocument = (doc, moduleMetadata, template
|
|
|
63
64
|
for (let j = 0; j < importNamespace.names.length; j++) {
|
|
64
65
|
const name = importNamespace.names[j];
|
|
65
66
|
const komaciDocImportRef = `${i}/names/${j}`;
|
|
66
|
-
|
|
67
|
+
// komaci doc references to other resolvable modules aren't going to ever be referenced by name so we can hoist them with the extra namespace
|
|
68
|
+
// this prevents collisions between the resolvable module and regular import
|
|
69
|
+
const importAlias = moduleMetadata.importsByName.has(name) ||
|
|
70
|
+
importNamespace.resourceName.startsWith('@salesforce/komaci')
|
|
67
71
|
? `${name}-${importNamespace.resourceName}`
|
|
68
72
|
: undefined;
|
|
69
73
|
(0, exports.composeImportMetadata)(name, importNamespace.resourceName, isSupported, templateAdgIndex !== undefined
|
|
@@ -201,6 +205,7 @@ const reconcileNamespace = (resourceName, moduleMetadata) => {
|
|
|
201
205
|
if (!namespace) {
|
|
202
206
|
namespace = {
|
|
203
207
|
names: new Set(),
|
|
208
|
+
originalNames: new Set(),
|
|
204
209
|
isSupported: allowlistNamespaces_1.isLocalHtmlImportReference.exec(resourceName)
|
|
205
210
|
? (0, allowlistNamespaces_1.isSupportedNamespace)(resourceName)
|
|
206
211
|
: (0, allowlistNamespaces_1.isNamespaceInternal)((0, allowlistNamespaces_1.getNamespaceFromImport)(resourceName)),
|
|
@@ -253,6 +258,13 @@ const addNewImportFromAst = (referencedName, namespace, moduleMetadata, original
|
|
|
253
258
|
}
|
|
254
259
|
moduleMetadata.importsByName.set(referencedName, importMetadata);
|
|
255
260
|
namespace.names.add(referencedName);
|
|
261
|
+
namespace.originalNames.add(originalImportName || referencedName);
|
|
262
|
+
if (originalImportName === 'default') {
|
|
263
|
+
namespace.isDefaultSpecifier = true;
|
|
264
|
+
}
|
|
265
|
+
else if (originalImportName === '*') {
|
|
266
|
+
namespace.isNamespaceSpecifier = true;
|
|
267
|
+
}
|
|
256
268
|
};
|
|
257
269
|
exports.addNewImportFromAst = addNewImportFromAst;
|
|
258
270
|
/**
|
|
@@ -264,13 +276,14 @@ exports.addNewImportFromAst = addNewImportFromAst;
|
|
|
264
276
|
* @param originalImportName (optional) the original name of the import that has been aliases. undefined if no alias.
|
|
265
277
|
*/
|
|
266
278
|
const updateAliasForImport = (lookupName, referencedName, namespace, moduleMetadata, originalImportName) => {
|
|
267
|
-
const importMetadata =
|
|
279
|
+
const importMetadata = getImportFromNamespace(lookupName, namespace.resourceName, moduleMetadata);
|
|
268
280
|
if (originalImportName && referencedName !== originalImportName && importMetadata) {
|
|
269
281
|
const isDefaultOrNamespace = originalImportName === '*' || originalImportName === 'default';
|
|
282
|
+
const oldAlias = importMetadata.importAlias || lookupName;
|
|
270
283
|
importMetadata.importAlias = referencedName;
|
|
284
|
+
moduleMetadata.importsByName.delete(oldAlias);
|
|
271
285
|
moduleMetadata.importsByName.set(referencedName, importMetadata);
|
|
272
|
-
|
|
273
|
-
namespace.names.delete(isDefaultOrNamespace ? originalImportName : lookupName);
|
|
286
|
+
namespace.names.delete(isDefaultOrNamespace ? originalImportName : oldAlias);
|
|
274
287
|
namespace.names.add(referencedName);
|
|
275
288
|
if (importMetadata.komaciDocImportRef !== exports.NO_KOMACI_DOC_REF) {
|
|
276
289
|
moduleMetadata.importIndexReference.set(importMetadata.komaciDocImportRef, referencedName);
|
|
@@ -295,6 +308,22 @@ function getImportTemplateKomaciDocByResourceName(resourceName, templateKomaciDo
|
|
|
295
308
|
return templateImportKomaciDoc;
|
|
296
309
|
}
|
|
297
310
|
exports.getImportTemplateKomaciDocByResourceName = getImportTemplateKomaciDocByResourceName;
|
|
311
|
+
/**
|
|
312
|
+
* multiple things can import something with the same base name before we fully process ast
|
|
313
|
+
* this makes sure we get import metadata for the right namespace.
|
|
314
|
+
* @param name the import name
|
|
315
|
+
* @param namespace the namespace to insure we get from
|
|
316
|
+
* @param moduleMetadata module metadata
|
|
317
|
+
* @returns the import if we could find it
|
|
318
|
+
*/
|
|
319
|
+
function getImportFromNamespace(name, namespace, moduleMetadata) {
|
|
320
|
+
let importMetadata = moduleMetadata.importsByName.get(name);
|
|
321
|
+
if (importMetadata?.resourceName !== namespace) {
|
|
322
|
+
importMetadata = moduleMetadata.importsByName.get(`${name}-${namespace}`);
|
|
323
|
+
}
|
|
324
|
+
return importMetadata;
|
|
325
|
+
}
|
|
326
|
+
exports.getImportFromNamespace = getImportFromNamespace;
|
|
298
327
|
/**
|
|
299
328
|
* pull all needful import metadata we can from the ast
|
|
300
329
|
* for the most part, we can grab data from the komaci document for imports but sometimes
|
|
@@ -311,15 +340,45 @@ exports.getImportTemplateKomaciDocByResourceName = getImportTemplateKomaciDocByR
|
|
|
311
340
|
const collectImportMetadataFromAst = (ast, moduleMetadata) => {
|
|
312
341
|
(0, exports.traverseAstImports)(ast, (lookupName, referencedName, resourceName, originalImportName) => {
|
|
313
342
|
const namespace = (0, exports.reconcileNamespace)(resourceName, moduleMetadata);
|
|
314
|
-
|
|
343
|
+
const existingImportMetadata = getImportFromNamespace(lookupName, resourceName, moduleMetadata);
|
|
344
|
+
if (!namespace.originalNames.has(originalImportName || referencedName)) {
|
|
315
345
|
(0, exports.addNewImportFromAst)(referencedName, namespace, moduleMetadata, originalImportName);
|
|
316
346
|
}
|
|
317
347
|
else {
|
|
348
|
+
const importMetadata = (0, exports.findOtherAlias)(resourceName, originalImportName || referencedName, moduleMetadata);
|
|
349
|
+
if (importMetadata) {
|
|
350
|
+
moduleMetadata.importsByName.set(referencedName, importMetadata);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (existingImportMetadata &&
|
|
354
|
+
existingImportMetadata.komaciDocImportRef !== exports.NO_KOMACI_DOC_REF &&
|
|
355
|
+
(!existingImportMetadata.importAlias ||
|
|
356
|
+
existingImportMetadata.importAlias ===
|
|
357
|
+
`${existingImportMetadata.name}-${resourceName}` ||
|
|
358
|
+
existingImportMetadata.importAlias === `namespace-${resourceName}`) &&
|
|
359
|
+
existingImportMetadata.name !== referencedName) {
|
|
318
360
|
(0, exports.updateAliasForImport)(lookupName, referencedName, namespace, moduleMetadata, originalImportName);
|
|
319
361
|
}
|
|
320
362
|
});
|
|
321
363
|
};
|
|
322
364
|
exports.collectImportMetadataFromAst = collectImportMetadataFromAst;
|
|
365
|
+
/**
|
|
366
|
+
* Find the other import metadata object that references the same import with a different alias
|
|
367
|
+
* @param resourceName import resource path
|
|
368
|
+
* @param importedName the name as it comes from the import, an exported name, `default` or `*`
|
|
369
|
+
* @param moduleMetadata module metadata for this component
|
|
370
|
+
* @returns the import metadata if it is found
|
|
371
|
+
*/
|
|
372
|
+
const findOtherAlias = (resourceName, importedName, moduleMetadata) => {
|
|
373
|
+
for (const importMetadata of moduleMetadata.importsByName.values()) {
|
|
374
|
+
if (importMetadata.resourceName === resourceName &&
|
|
375
|
+
importMetadata.name === importedName) {
|
|
376
|
+
return importMetadata;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return undefined;
|
|
380
|
+
};
|
|
381
|
+
exports.findOtherAlias = findOtherAlias;
|
|
323
382
|
/**
|
|
324
383
|
* From a given adg, collect as much metadata as possible ONLY from the komaci document
|
|
325
384
|
*
|
package/build/types.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ export declare type ImportDetail = {
|
|
|
56
56
|
resourceName: string;
|
|
57
57
|
/** The names of the specific things imported */
|
|
58
58
|
names: Set<string>;
|
|
59
|
+
/** unique un-aliased names for all of the things imported. can include the specials like default and * */
|
|
60
|
+
originalNames: Set<string>;
|
|
59
61
|
/** If this import is a namespace */
|
|
60
62
|
isNamespaceSpecifier: boolean;
|
|
61
63
|
/** If this import contains a default specifier */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/common-shared",
|
|
3
|
-
"version": "244.1.
|
|
3
|
+
"version": "244.1.4",
|
|
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": "244.1.
|
|
32
|
+
"@komaci/types": "244.1.4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/core": "^7.9.0",
|