@salesforce/plugin-omnistudio-migration-tool 2.0.0-rc.4 → 2.0.0-rc.41
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/README.md +28 -40
- package/lib/commands/omnistudio/migration/assess.d.ts +1 -1
- package/lib/commands/omnistudio/migration/assess.js +107 -37
- package/lib/commands/omnistudio/migration/assess.js.map +1 -1
- package/lib/commands/omnistudio/migration/info.js +1 -1
- package/lib/commands/omnistudio/migration/info.js.map +1 -1
- package/lib/commands/omnistudio/migration/migrate.d.ts +35 -5
- package/lib/commands/omnistudio/migration/migrate.js +262 -107
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/javascripts/reportGeneratorUtility.js +100 -19
- package/lib/migration/NameMappingRegistry.d.ts +130 -0
- package/lib/migration/NameMappingRegistry.js +376 -0
- package/lib/migration/NameMappingRegistry.js.map +1 -0
- package/lib/migration/base.d.ts +4 -2
- package/lib/migration/base.js +8 -1
- package/lib/migration/base.js.map +1 -1
- package/lib/migration/customLabels.d.ts +49 -0
- package/lib/migration/customLabels.js +190 -0
- package/lib/migration/customLabels.js.map +1 -0
- package/lib/migration/dataraptor.js +63 -14
- package/lib/migration/dataraptor.js.map +1 -1
- package/lib/migration/deployer.d.ts +11 -0
- package/lib/migration/deployer.js +59 -0
- package/lib/migration/deployer.js.map +1 -0
- package/lib/migration/flexcard.d.ts +44 -2
- package/lib/migration/flexcard.js +707 -110
- package/lib/migration/flexcard.js.map +1 -1
- package/lib/migration/globalautonumber.d.ts +6 -6
- package/lib/migration/globalautonumber.js +27 -34
- package/lib/migration/globalautonumber.js.map +1 -1
- package/lib/migration/interfaces.d.ts +5 -0
- package/lib/migration/interfaces.js +7 -0
- package/lib/migration/interfaces.js.map +1 -1
- package/lib/migration/omniscript.d.ts +42 -2
- package/lib/migration/omniscript.js +724 -100
- package/lib/migration/omniscript.js.map +1 -1
- package/lib/migration/postMigrate.d.ts +22 -3
- package/lib/migration/postMigrate.js +147 -12
- package/lib/migration/postMigrate.js.map +1 -1
- package/lib/migration/premigrate.d.ts +16 -0
- package/lib/migration/premigrate.js +122 -0
- package/lib/migration/premigrate.js.map +1 -0
- package/lib/migration/related/ApexMigration.d.ts +1 -0
- package/lib/migration/related/ApexMigration.js +143 -22
- package/lib/migration/related/ApexMigration.js.map +1 -1
- package/lib/migration/related/ExperienceSiteMigration.d.ts +12 -4
- package/lib/migration/related/ExperienceSiteMigration.js +127 -59
- package/lib/migration/related/ExperienceSiteMigration.js.map +1 -1
- package/lib/migration/related/FlexipageMigration.d.ts +4 -4
- package/lib/migration/related/FlexipageMigration.js +31 -30
- package/lib/migration/related/FlexipageMigration.js.map +1 -1
- package/lib/migration/related/LwcMigration.js +27 -16
- package/lib/migration/related/LwcMigration.js.map +1 -1
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js +30 -24
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js.map +1 -1
- package/lib/styles/reportGenerator.css +9 -5
- package/lib/templates/assessmentReport.template +67 -6
- package/lib/templates/migrationReport.template +146 -4
- package/lib/utils/OmnistudioSettingsPrefManager.d.ts +12 -0
- package/lib/utils/OmnistudioSettingsPrefManager.js +82 -0
- package/lib/utils/OmnistudioSettingsPrefManager.js.map +1 -0
- package/lib/utils/XMLUtil.js +2 -1
- package/lib/utils/XMLUtil.js.map +1 -1
- package/lib/utils/apex/parser/apexparser.d.ts +8 -1
- package/lib/utils/apex/parser/apexparser.js +63 -10
- package/lib/utils/apex/parser/apexparser.js.map +1 -1
- package/lib/utils/constants/documentRegistry.d.ts +2 -1
- package/lib/utils/constants/documentRegistry.js +4 -3
- package/lib/utils/constants/documentRegistry.js.map +1 -1
- package/lib/utils/constants/stringContants.d.ts +7 -0
- package/lib/utils/constants/stringContants.js +10 -2
- package/lib/utils/constants/stringContants.js.map +1 -1
- package/lib/utils/customLabels.d.ts +34 -0
- package/lib/utils/customLabels.js +97 -0
- package/lib/utils/customLabels.js.map +1 -0
- package/lib/utils/file/fileUtil.d.ts +3 -1
- package/lib/utils/file/fileUtil.js +11 -4
- package/lib/utils/file/fileUtil.js.map +1 -1
- package/lib/utils/flexipage/flexiPageTransformer.js +14 -10
- package/lib/utils/flexipage/flexiPageTransformer.js.map +1 -1
- package/lib/utils/generatePackageXml.d.ts +4 -2
- package/lib/utils/generatePackageXml.js +17 -23
- package/lib/utils/generatePackageXml.js.map +1 -1
- package/lib/utils/interfaces.d.ts +36 -3
- package/lib/utils/logger.js +3 -1
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js +20 -21
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js.map +1 -1
- package/lib/utils/lwcparser/xmlParser/XmlParser.js +2 -1
- package/lib/utils/lwcparser/xmlParser/XmlParser.js.map +1 -1
- package/lib/utils/orgPreferences.d.ts +1 -0
- package/lib/utils/orgPreferences.js +11 -8
- package/lib/utils/orgPreferences.js.map +1 -1
- package/lib/utils/orgUtils/index.d.ts +1 -1
- package/lib/utils/orgUtils/index.js +14 -14
- package/lib/utils/orgUtils/index.js.map +1 -1
- package/lib/utils/promptUtil.d.ts +2 -0
- package/lib/utils/promptUtil.js +26 -1
- package/lib/utils/promptUtil.js.map +1 -1
- package/lib/utils/reportGenerator/reportInterfaces.d.ts +9 -0
- package/lib/utils/reportGenerator/reportUtil.d.ts +1 -1
- package/lib/utils/reportGenerator/reportUtil.js +6 -3
- package/lib/utils/reportGenerator/reportUtil.js.map +1 -1
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.d.ts +2 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js +51 -15
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.d.ts +13 -0
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js +178 -0
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.d.ts +19 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js +239 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js +43 -11
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.d.ts +13 -0
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js +111 -0
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js +51 -12
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.d.ts +1 -0
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js +40 -18
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js +21 -14
- package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js +47 -12
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.d.ts +14 -0
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js +143 -139
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js +31 -18
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/assessmentReporter.d.ts +6 -1
- package/lib/utils/resultsbuilder/assessmentReporter.js +163 -66
- package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/index.d.ts +12 -1
- package/lib/utils/resultsbuilder/index.js +343 -84
- package/lib/utils/resultsbuilder/index.js.map +1 -1
- package/lib/utils/resultsbuilder/reportingHelper.d.ts +2 -7
- package/lib/utils/resultsbuilder/reportingHelper.js +0 -43
- package/lib/utils/resultsbuilder/reportingHelper.js.map +1 -1
- package/lib/utils/sfcli/project/sfProject.d.ts +4 -0
- package/lib/utils/sfcli/project/sfProject.js +56 -1
- package/lib/utils/sfcli/project/sfProject.js.map +1 -1
- package/lib/utils/shell/cli.js +3 -7
- package/lib/utils/shell/cli.js.map +1 -1
- package/lib/utils/storageUtil.d.ts +1 -0
- package/lib/utils/storageUtil.js +3 -0
- package/lib/utils/storageUtil.js.map +1 -1
- package/lib/utils/stringUtils.d.ts +9 -0
- package/lib/utils/stringUtils.js +38 -7
- package/lib/utils/stringUtils.js.map +1 -1
- package/lib/utils/templateParser/model/elementNode.js +11 -2
- package/lib/utils/templateParser/model/elementNode.js.map +1 -1
- package/lib/utils/validatorService.d.ts +13 -0
- package/lib/utils/validatorService.js +69 -0
- package/lib/utils/validatorService.js.map +1 -0
- package/messages/assess.json +125 -55
- package/messages/migrate.json +172 -53
- package/oclif.manifest.json +1 -1
- package/package.json +40 -7
- package/lib/utils/OmniGlobalAutoNumberPrefManager.d.ts +0 -40
- package/lib/utils/OmniGlobalAutoNumberPrefManager.js +0 -65
- package/lib/utils/OmniGlobalAutoNumberPrefManager.js.map +0 -1
|
@@ -11,9 +11,35 @@ function toggleFilterDropdown(tableId) {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
function closeFilterDropdown(tableId) {
|
|
15
|
+
const reportTable = document.getElementById(tableId);
|
|
16
|
+
if (!reportTable) return;
|
|
17
|
+
|
|
18
|
+
const dropdown = reportTable.querySelector('#filter-dropdown');
|
|
19
|
+
const chevronUp = reportTable.querySelector('#chevron-up');
|
|
20
|
+
const chevronDown = reportTable.querySelector('#chevron-down');
|
|
21
|
+
|
|
22
|
+
if (dropdown && dropdown.classList.contains('show')) {
|
|
23
|
+
dropdown.classList.remove('show');
|
|
24
|
+
if (chevronUp) chevronUp.classList.add('hidden');
|
|
25
|
+
if (chevronDown) chevronDown.classList.remove('hidden');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function closeAllFilterDropdowns() {
|
|
30
|
+
const openDropdowns = document.querySelectorAll('.filter-dropdown.show');
|
|
31
|
+
|
|
32
|
+
openDropdowns.forEach((dropdown) => {
|
|
33
|
+
dropdown.classList.remove('show');
|
|
34
|
+
// Find and update chevron icons
|
|
35
|
+
const container = dropdown.closest('.filter-dropdown-container') || dropdown.parentElement;
|
|
36
|
+
if (container) {
|
|
37
|
+
const chevronUp = container.querySelector('#chevron-up');
|
|
38
|
+
const chevronDown = container.querySelector('#chevron-down');
|
|
39
|
+
if (chevronUp) chevronUp.classList.add('hidden');
|
|
40
|
+
if (chevronDown) chevronDown.classList.remove('hidden');
|
|
41
|
+
}
|
|
42
|
+
});
|
|
17
43
|
}
|
|
18
44
|
|
|
19
45
|
function toggleDiffModal(name) {
|
|
@@ -102,8 +128,11 @@ function filterAndSearchTable(tableId) {
|
|
|
102
128
|
const visibleRows = Array.from(table.rows).filter(
|
|
103
129
|
(row) => row.style.display !== 'none' && row.id !== 'no-rows-message'
|
|
104
130
|
);
|
|
105
|
-
|
|
106
|
-
|
|
131
|
+
|
|
132
|
+
// filter only distinct classes from visibleRows
|
|
133
|
+
const distinctClasses = [...new Set(visibleRows.map((row) => row.classList[0]))];
|
|
134
|
+
reportTable.querySelector('#row-count').textContent = `Showing ${distinctClasses.length} record${
|
|
135
|
+
distinctClasses.length !== 1 ? 's' : ''
|
|
107
136
|
}`;
|
|
108
137
|
}
|
|
109
138
|
|
|
@@ -153,6 +182,55 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
153
182
|
document.querySelectorAll('.rpt-table-container').forEach((tableContainer) => {
|
|
154
183
|
filterAndSearchTable(tableContainer.id);
|
|
155
184
|
});
|
|
185
|
+
|
|
186
|
+
document.querySelectorAll('tr').forEach((row) => {
|
|
187
|
+
row.addEventListener('mouseover', (event) => {
|
|
188
|
+
const className = event.currentTarget.classList[0];
|
|
189
|
+
document.querySelectorAll(`.${className}`).forEach((r) => {
|
|
190
|
+
r.classList.add('highlight');
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
row.addEventListener('mouseout', (event) => {
|
|
194
|
+
const className = event.currentTarget.classList[0];
|
|
195
|
+
document.querySelectorAll(`.${className}`).forEach((r) => {
|
|
196
|
+
r.classList.remove('highlight');
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
// Attach filter dropdown event listeners after DOM is loaded
|
|
202
|
+
// Close panel and filter dropdown on escape key
|
|
203
|
+
document.addEventListener('keydown', function (event) {
|
|
204
|
+
if (event.key === 'Escape' || event.keyCode === 27) {
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
|
|
207
|
+
try {
|
|
208
|
+
closeCtaPanel();
|
|
209
|
+
} catch (error) {
|
|
210
|
+
// Silently handle error if CTA panel elements don't exist
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
try {
|
|
214
|
+
closeAllFilterDropdowns();
|
|
215
|
+
} catch (error) {
|
|
216
|
+
// Silently handle error if filter dropdown elements don't exist
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// Close filter dropdown when clicking outside
|
|
222
|
+
document.addEventListener('click', function (event) {
|
|
223
|
+
// Find all open filter dropdowns
|
|
224
|
+
document.querySelectorAll('.filter-dropdown.show').forEach((dropdown) => {
|
|
225
|
+
const reportTable = dropdown.closest('.rpt-table-container');
|
|
226
|
+
const filterButton = reportTable?.querySelector('.filter-toggle-button');
|
|
227
|
+
|
|
228
|
+
// Check if click was outside the dropdown and not on the filter button
|
|
229
|
+
if (reportTable && !dropdown.contains(event.target) && !filterButton?.contains(event.target)) {
|
|
230
|
+
closeFilterDropdown(reportTable.id);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
156
234
|
});
|
|
157
235
|
|
|
158
236
|
function openReport(ele) {
|
|
@@ -164,11 +242,14 @@ function toggleCtaPanel() {
|
|
|
164
242
|
const panel = document.getElementById('ctaPanel');
|
|
165
243
|
const overlay = document.getElementById('overlay');
|
|
166
244
|
|
|
167
|
-
if
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
245
|
+
// Only try to toggle if elements exist
|
|
246
|
+
if (panel && overlay) {
|
|
247
|
+
if (panel.classList.contains('open')) {
|
|
248
|
+
closeCtaPanel();
|
|
249
|
+
} else {
|
|
250
|
+
panel.classList.add('open');
|
|
251
|
+
overlay.classList.add('open');
|
|
252
|
+
}
|
|
172
253
|
}
|
|
173
254
|
}
|
|
174
255
|
|
|
@@ -176,18 +257,18 @@ function closeCtaPanel() {
|
|
|
176
257
|
const panel = document.getElementById('ctaPanel');
|
|
177
258
|
const overlay = document.getElementById('overlay');
|
|
178
259
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
// Close panel on escape key
|
|
184
|
-
document.addEventListener('keydown', function (event) {
|
|
185
|
-
if (event.key === 'Escape') {
|
|
186
|
-
closeCtaPanel();
|
|
260
|
+
// Only try to close if elements exist
|
|
261
|
+
if (panel) {
|
|
262
|
+
panel.classList.remove('open');
|
|
187
263
|
}
|
|
188
|
-
|
|
264
|
+
if (overlay) {
|
|
265
|
+
overlay.classList.remove('open');
|
|
266
|
+
}
|
|
267
|
+
}
|
|
189
268
|
|
|
190
269
|
// Expose globally so HTML inline event handlers can access them
|
|
191
270
|
window.toggleFilterDropdown = toggleFilterDropdown;
|
|
271
|
+
window.closeFilterDropdown = closeFilterDropdown;
|
|
272
|
+
window.closeAllFilterDropdowns = closeAllFilterDropdowns;
|
|
192
273
|
window.filterAndSearchTable = filterAndSearchTable;
|
|
193
274
|
window.toggleCtaSummaryPanel = toggleCtaSummaryPanel;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export interface ComponentNameMapping {
|
|
2
|
+
originalName: string;
|
|
3
|
+
cleanedName: string;
|
|
4
|
+
componentType: 'DataMapper' | 'OmniScript' | 'IntegrationProcedure' | 'FlexCard';
|
|
5
|
+
recordId: string;
|
|
6
|
+
migratedId?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DependencyReference {
|
|
9
|
+
parentComponentId: string;
|
|
10
|
+
parentComponentType: string;
|
|
11
|
+
fieldPath: string;
|
|
12
|
+
referencedOriginalName: string;
|
|
13
|
+
referencedComponentType: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Centralized registry for tracking name mappings and managing dependency updates
|
|
17
|
+
* during Omnistudio component migration.
|
|
18
|
+
*/
|
|
19
|
+
export declare class NameMappingRegistry {
|
|
20
|
+
private static instance;
|
|
21
|
+
private nameMappings;
|
|
22
|
+
private dependencyReferences;
|
|
23
|
+
private dataMapperMappings;
|
|
24
|
+
private omniScriptMappings;
|
|
25
|
+
private integrationProcedureMappings;
|
|
26
|
+
private flexCardMappings;
|
|
27
|
+
private angularOmniScriptRefs;
|
|
28
|
+
private constructor();
|
|
29
|
+
static getInstance(): NameMappingRegistry;
|
|
30
|
+
/**
|
|
31
|
+
* Register a component name mapping before migration
|
|
32
|
+
*/
|
|
33
|
+
registerNameMapping(mapping: ComponentNameMapping): void;
|
|
34
|
+
/**
|
|
35
|
+
* Register a dependency reference that needs to be updated
|
|
36
|
+
*/
|
|
37
|
+
registerDependencyReference(reference: DependencyReference): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get the cleaned name for a component
|
|
40
|
+
*/
|
|
41
|
+
getCleanedName(originalName: string, componentType: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Check if a DataMapper mapping exists in the registry
|
|
44
|
+
*/
|
|
45
|
+
hasDataMapperMapping(originalName: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Check if an Integration Procedure mapping exists in the registry
|
|
48
|
+
*/
|
|
49
|
+
hasIntegrationProcedureMapping(originalName: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Check if an OmniScript mapping exists in the registry
|
|
52
|
+
*/
|
|
53
|
+
hasOmniScriptMapping(originalName: string): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a FlexCard mapping exists in the registry
|
|
56
|
+
*/
|
|
57
|
+
hasFlexCardMapping(originalName: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Get available Integration Procedure mapping keys for debugging
|
|
60
|
+
*/
|
|
61
|
+
getIntegrationProcedureMappingKeys(): string[];
|
|
62
|
+
/**
|
|
63
|
+
* Get available OmniScript mapping keys for debugging
|
|
64
|
+
*/
|
|
65
|
+
getOmniScriptMappingKeys(): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Get DataMapper cleaned name
|
|
68
|
+
*/
|
|
69
|
+
getDataMapperCleanedName(originalName: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Get OmniScript cleaned name (Type_SubType_Language format)
|
|
72
|
+
*/
|
|
73
|
+
getOmniScriptCleanedName(type: string, subType: string, language: string | 'English'): string;
|
|
74
|
+
/**
|
|
75
|
+
* Get Integration Procedure cleaned name
|
|
76
|
+
*/
|
|
77
|
+
getIntegrationProcedureCleanedName(originalName: string): string;
|
|
78
|
+
/**
|
|
79
|
+
* Get FlexCard cleaned name
|
|
80
|
+
*/
|
|
81
|
+
getFlexCardCleanedName(originalName: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* Get all name mappings for reporting
|
|
84
|
+
*/
|
|
85
|
+
getAllNameMappings(): ComponentNameMapping[];
|
|
86
|
+
/**
|
|
87
|
+
* Get warnings for name changes
|
|
88
|
+
*/
|
|
89
|
+
getNameChangeWarnings(): string[];
|
|
90
|
+
/**
|
|
91
|
+
* Get warnings for a specific component type
|
|
92
|
+
*/
|
|
93
|
+
getNameChangeWarningsForType(componentType: string): string[];
|
|
94
|
+
/**
|
|
95
|
+
* Get count of components with name changes by type
|
|
96
|
+
*/
|
|
97
|
+
getNameChangeCountByType(): Record<string, number>;
|
|
98
|
+
/**
|
|
99
|
+
* Clear all mappings (for testing or new migration runs)
|
|
100
|
+
*/
|
|
101
|
+
clear(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Register an Angular OmniScript that should be skipped during migration
|
|
104
|
+
*/
|
|
105
|
+
registerAngularOmniScript(omniScriptRef: string): void;
|
|
106
|
+
/**
|
|
107
|
+
* Check if an OmniScript reference is Angular (should be skipped)
|
|
108
|
+
*/
|
|
109
|
+
isAngularOmniScript(omniScriptRef: string): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Get all Angular OmniScript references
|
|
112
|
+
*/
|
|
113
|
+
getAngularOmniScriptRefs(): Set<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Pre-process all components to register their name mappings
|
|
116
|
+
*/
|
|
117
|
+
preProcessComponents(dataMappers: any[], lwcOmniScripts: any[], angularOmniScripts: any[], integrationProcedures: any[], flexCards: any[]): void;
|
|
118
|
+
/**
|
|
119
|
+
* Update all dependency references with cleaned names
|
|
120
|
+
*/
|
|
121
|
+
updateDependencyReferences<T>(componentDefinition: T): T;
|
|
122
|
+
/**
|
|
123
|
+
* Recursively update references in an object
|
|
124
|
+
*/
|
|
125
|
+
private updateObjectReferences;
|
|
126
|
+
/**
|
|
127
|
+
* Update a string reference if it matches a known component name
|
|
128
|
+
*/
|
|
129
|
+
private updateStringReference;
|
|
130
|
+
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.NameMappingRegistry = void 0;
|
|
10
|
+
const stringutil_1 = require("../utils/StringValue/stringutil");
|
|
11
|
+
/**
|
|
12
|
+
* Centralized registry for tracking name mappings and managing dependency updates
|
|
13
|
+
* during Omnistudio component migration.
|
|
14
|
+
*/
|
|
15
|
+
class NameMappingRegistry {
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17
|
+
constructor() {
|
|
18
|
+
this.nameMappings = new Map();
|
|
19
|
+
this.dependencyReferences = [];
|
|
20
|
+
// Type-specific mappings for quick lookup
|
|
21
|
+
this.dataMapperMappings = new Map(); // original -> cleaned
|
|
22
|
+
this.omniScriptMappings = new Map(); // original -> cleaned
|
|
23
|
+
this.integrationProcedureMappings = new Map(); // original -> cleaned
|
|
24
|
+
this.flexCardMappings = new Map(); // original -> cleaned
|
|
25
|
+
// Track Angular OmniScripts that should be skipped (Type_SubType_Language format)
|
|
26
|
+
this.angularOmniScriptRefs = new Set();
|
|
27
|
+
}
|
|
28
|
+
static getInstance() {
|
|
29
|
+
if (!NameMappingRegistry.instance) {
|
|
30
|
+
NameMappingRegistry.instance = new NameMappingRegistry();
|
|
31
|
+
}
|
|
32
|
+
return NameMappingRegistry.instance;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Register a component name mapping before migration
|
|
36
|
+
*/
|
|
37
|
+
registerNameMapping(mapping) {
|
|
38
|
+
const key = `${mapping.componentType}:${mapping.originalName}`;
|
|
39
|
+
this.nameMappings.set(key, mapping);
|
|
40
|
+
// Store in type-specific maps for quick lookup
|
|
41
|
+
switch (mapping.componentType) {
|
|
42
|
+
case 'DataMapper':
|
|
43
|
+
this.dataMapperMappings.set(mapping.originalName, mapping.cleanedName);
|
|
44
|
+
break;
|
|
45
|
+
case 'OmniScript':
|
|
46
|
+
this.omniScriptMappings.set(mapping.originalName, mapping.cleanedName);
|
|
47
|
+
break;
|
|
48
|
+
case 'IntegrationProcedure':
|
|
49
|
+
this.integrationProcedureMappings.set(mapping.originalName, mapping.cleanedName);
|
|
50
|
+
break;
|
|
51
|
+
case 'FlexCard':
|
|
52
|
+
this.flexCardMappings.set(mapping.originalName, mapping.cleanedName);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Register a dependency reference that needs to be updated
|
|
58
|
+
*/
|
|
59
|
+
registerDependencyReference(reference) {
|
|
60
|
+
this.dependencyReferences.push(reference);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get the cleaned name for a component
|
|
64
|
+
*/
|
|
65
|
+
getCleanedName(originalName, componentType) {
|
|
66
|
+
const key = `${componentType}:${originalName}`;
|
|
67
|
+
const mapping = this.nameMappings.get(key);
|
|
68
|
+
if (mapping) {
|
|
69
|
+
return mapping.cleanedName;
|
|
70
|
+
}
|
|
71
|
+
// Fallback to direct cleaning if not registered
|
|
72
|
+
return stringutil_1.Stringutil.cleanName(originalName);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Check if a DataMapper mapping exists in the registry
|
|
76
|
+
*/
|
|
77
|
+
hasDataMapperMapping(originalName) {
|
|
78
|
+
return this.dataMapperMappings.has(originalName);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if an Integration Procedure mapping exists in the registry
|
|
82
|
+
*/
|
|
83
|
+
hasIntegrationProcedureMapping(originalName) {
|
|
84
|
+
return this.integrationProcedureMappings.has(originalName);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check if an OmniScript mapping exists in the registry
|
|
88
|
+
*/
|
|
89
|
+
hasOmniScriptMapping(originalName) {
|
|
90
|
+
return this.omniScriptMappings.has(originalName);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Check if a FlexCard mapping exists in the registry
|
|
94
|
+
*/
|
|
95
|
+
hasFlexCardMapping(originalName) {
|
|
96
|
+
return this.flexCardMappings.has(originalName);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get available Integration Procedure mapping keys for debugging
|
|
100
|
+
*/
|
|
101
|
+
getIntegrationProcedureMappingKeys() {
|
|
102
|
+
return Array.from(this.integrationProcedureMappings.keys());
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get available OmniScript mapping keys for debugging
|
|
106
|
+
*/
|
|
107
|
+
getOmniScriptMappingKeys() {
|
|
108
|
+
return Array.from(this.omniScriptMappings.keys());
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get DataMapper cleaned name
|
|
112
|
+
*/
|
|
113
|
+
getDataMapperCleanedName(originalName) {
|
|
114
|
+
return this.dataMapperMappings.get(originalName) || stringutil_1.Stringutil.cleanName(originalName);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get OmniScript cleaned name (Type_SubType_Language format)
|
|
118
|
+
*/
|
|
119
|
+
getOmniScriptCleanedName(type, subType, language) {
|
|
120
|
+
const originalName = `${type}_${subType}_${language}`;
|
|
121
|
+
// Check if we have a mapping for this OmniScript first
|
|
122
|
+
if (this.omniScriptMappings.has(originalName)) {
|
|
123
|
+
return this.omniScriptMappings.get(originalName);
|
|
124
|
+
}
|
|
125
|
+
// Fallback to cleaning individual parts
|
|
126
|
+
const cleanedType = stringutil_1.Stringutil.cleanName(type);
|
|
127
|
+
const cleanedSubType = stringutil_1.Stringutil.cleanName(subType);
|
|
128
|
+
return `${cleanedType}_${cleanedSubType}_${language}`;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get Integration Procedure cleaned name
|
|
132
|
+
*/
|
|
133
|
+
getIntegrationProcedureCleanedName(originalName) {
|
|
134
|
+
return this.integrationProcedureMappings.get(originalName) || stringutil_1.Stringutil.cleanName(originalName, true);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get FlexCard cleaned name
|
|
138
|
+
*/
|
|
139
|
+
getFlexCardCleanedName(originalName) {
|
|
140
|
+
return this.flexCardMappings.get(originalName) || stringutil_1.Stringutil.cleanName(originalName);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Get all name mappings for reporting
|
|
144
|
+
*/
|
|
145
|
+
getAllNameMappings() {
|
|
146
|
+
return Array.from(this.nameMappings.values());
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get warnings for name changes
|
|
150
|
+
*/
|
|
151
|
+
getNameChangeWarnings() {
|
|
152
|
+
const warnings = [];
|
|
153
|
+
for (const mapping of this.nameMappings.values()) {
|
|
154
|
+
if (mapping.originalName !== mapping.cleanedName) {
|
|
155
|
+
warnings.push(`${mapping.componentType} name will change: "${mapping.originalName}" → "${mapping.cleanedName}"`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return warnings;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get warnings for a specific component type
|
|
162
|
+
*/
|
|
163
|
+
getNameChangeWarningsForType(componentType) {
|
|
164
|
+
const warnings = [];
|
|
165
|
+
for (const mapping of this.nameMappings.values()) {
|
|
166
|
+
if (mapping.componentType === componentType && mapping.originalName !== mapping.cleanedName) {
|
|
167
|
+
warnings.push(`"${mapping.originalName}" → "${mapping.cleanedName}"`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return warnings;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Get count of components with name changes by type
|
|
174
|
+
*/
|
|
175
|
+
getNameChangeCountByType() {
|
|
176
|
+
const counts = {};
|
|
177
|
+
for (const mapping of this.nameMappings.values()) {
|
|
178
|
+
if (mapping.originalName !== mapping.cleanedName) {
|
|
179
|
+
counts[mapping.componentType] = (counts[mapping.componentType] || 0) + 1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return counts;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Clear all mappings (for testing or new migration runs)
|
|
186
|
+
*/
|
|
187
|
+
clear() {
|
|
188
|
+
this.nameMappings.clear();
|
|
189
|
+
this.dependencyReferences = [];
|
|
190
|
+
this.dataMapperMappings.clear();
|
|
191
|
+
this.omniScriptMappings.clear();
|
|
192
|
+
this.integrationProcedureMappings.clear();
|
|
193
|
+
this.flexCardMappings.clear();
|
|
194
|
+
this.angularOmniScriptRefs.clear();
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Register an Angular OmniScript that should be skipped during migration
|
|
198
|
+
*/
|
|
199
|
+
registerAngularOmniScript(omniScriptRef) {
|
|
200
|
+
this.angularOmniScriptRefs.add(omniScriptRef);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Check if an OmniScript reference is Angular (should be skipped)
|
|
204
|
+
*/
|
|
205
|
+
isAngularOmniScript(omniScriptRef) {
|
|
206
|
+
return this.angularOmniScriptRefs.has(omniScriptRef);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Get all Angular OmniScript references
|
|
210
|
+
*/
|
|
211
|
+
getAngularOmniScriptRefs() {
|
|
212
|
+
return new Set(this.angularOmniScriptRefs);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Pre-process all components to register their name mappings
|
|
216
|
+
*/
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
|
+
preProcessComponents(
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
220
|
+
dataMappers,
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
222
|
+
lwcOmniScripts,
|
|
223
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
224
|
+
angularOmniScripts,
|
|
225
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
226
|
+
integrationProcedures,
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
228
|
+
flexCards) {
|
|
229
|
+
// Register DataMapper mappings
|
|
230
|
+
for (const dr of dataMappers) {
|
|
231
|
+
this.registerNameMapping({
|
|
232
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
233
|
+
originalName: dr.Name,
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
235
|
+
cleanedName: stringutil_1.Stringutil.cleanName(dr.Name),
|
|
236
|
+
componentType: 'DataMapper',
|
|
237
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
238
|
+
recordId: dr.Id,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// Register OmniScript mappings
|
|
242
|
+
for (const os of lwcOmniScripts) {
|
|
243
|
+
// Extract namespace from field names (e.g., vlocity_ins__Type__c -> vlocity_ins)
|
|
244
|
+
const fieldNames = Object.keys(os);
|
|
245
|
+
const typeField = fieldNames.find((field) => field.endsWith('__Type__c')) || 'Type__c';
|
|
246
|
+
const subTypeField = fieldNames.find((field) => field.endsWith('__SubType__c')) || 'SubType__c';
|
|
247
|
+
const languageField = fieldNames.find((field) => field.endsWith('__Language__c')) || 'Language__c';
|
|
248
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
249
|
+
const type = os[typeField];
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
251
|
+
const subType = os[subTypeField];
|
|
252
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
253
|
+
const language = os[languageField] || 'English';
|
|
254
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
255
|
+
const originalName = `${type}_${subType}_${language}`;
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
257
|
+
const cleanedName = `${stringutil_1.Stringutil.cleanName(type)}_${stringutil_1.Stringutil.cleanName(subType)}_${language}`;
|
|
258
|
+
this.registerNameMapping({
|
|
259
|
+
originalName,
|
|
260
|
+
cleanedName,
|
|
261
|
+
componentType: 'OmniScript',
|
|
262
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
263
|
+
recordId: os.Id,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// Register Angular OmniScript references (to be skipped during migration)
|
|
267
|
+
for (const angularOs of angularOmniScripts) {
|
|
268
|
+
// Extract namespace from field names (e.g., vlocity_ins__Type__c -> vlocity_ins)
|
|
269
|
+
const fieldNames = Object.keys(angularOs);
|
|
270
|
+
const typeField = fieldNames.find((field) => field.endsWith('__Type__c')) || 'Type__c';
|
|
271
|
+
const subTypeField = fieldNames.find((field) => field.endsWith('__SubType__c')) || 'SubType__c';
|
|
272
|
+
const languageField = fieldNames.find((field) => field.endsWith('__Language__c')) || 'Language__c';
|
|
273
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
274
|
+
const type = angularOs[typeField];
|
|
275
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
276
|
+
const subType = angularOs[subTypeField];
|
|
277
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
278
|
+
const language = angularOs[languageField] || 'English';
|
|
279
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
280
|
+
const angularRef = `${type}_${subType}_${language}`;
|
|
281
|
+
this.registerAngularOmniScript(angularRef);
|
|
282
|
+
}
|
|
283
|
+
// Register Integration Procedure mappings
|
|
284
|
+
for (const ip of integrationProcedures) {
|
|
285
|
+
// Extract namespace from field names (e.g., vlocity_ins__Type__c -> vlocity_ins)
|
|
286
|
+
const fieldNames = Object.keys(ip);
|
|
287
|
+
const typeField = fieldNames.find((field) => field.endsWith('__Type__c')) || 'Type__c';
|
|
288
|
+
const subTypeField = fieldNames.find((field) => field.endsWith('__SubType__c')) || 'SubType__c';
|
|
289
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
290
|
+
const type = ip[typeField];
|
|
291
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
292
|
+
const subType = ip[subTypeField];
|
|
293
|
+
// Integration Procedures use only Type_SubType format (no language)
|
|
294
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
295
|
+
const originalName = `${type}_${subType}`;
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
297
|
+
const cleanedName = `${stringutil_1.Stringutil.cleanName(type)}_${stringutil_1.Stringutil.cleanName(subType)}`;
|
|
298
|
+
this.registerNameMapping({
|
|
299
|
+
originalName,
|
|
300
|
+
cleanedName,
|
|
301
|
+
componentType: 'IntegrationProcedure',
|
|
302
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
303
|
+
recordId: ip.Id,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
// Register FlexCard mappings
|
|
307
|
+
for (const fc of flexCards) {
|
|
308
|
+
this.registerNameMapping({
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
310
|
+
originalName: fc.Name,
|
|
311
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
312
|
+
cleanedName: stringutil_1.Stringutil.cleanName(fc.Name),
|
|
313
|
+
componentType: 'FlexCard',
|
|
314
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
315
|
+
recordId: fc.Id,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Update all dependency references with cleaned names
|
|
321
|
+
*/
|
|
322
|
+
updateDependencyReferences(componentDefinition) {
|
|
323
|
+
// This will be called for each component to update its dependencies
|
|
324
|
+
// Implementation depends on the specific structure of each component type
|
|
325
|
+
return this.updateObjectReferences(componentDefinition);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Recursively update references in an object
|
|
329
|
+
*/
|
|
330
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
331
|
+
updateObjectReferences(obj) {
|
|
332
|
+
if (typeof obj === 'string') {
|
|
333
|
+
return this.updateStringReference(obj);
|
|
334
|
+
}
|
|
335
|
+
if (Array.isArray(obj)) {
|
|
336
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
337
|
+
return obj.map((item) => this.updateObjectReferences(item));
|
|
338
|
+
}
|
|
339
|
+
if (obj && typeof obj === 'object') {
|
|
340
|
+
const updated = {};
|
|
341
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
342
|
+
updated[key] = this.updateObjectReferences(value);
|
|
343
|
+
}
|
|
344
|
+
return updated;
|
|
345
|
+
}
|
|
346
|
+
return obj;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Update a string reference if it matches a known component name
|
|
350
|
+
*/
|
|
351
|
+
updateStringReference(str) {
|
|
352
|
+
// Check if this string might be a DataMapper reference
|
|
353
|
+
if (this.dataMapperMappings.has(str)) {
|
|
354
|
+
return this.dataMapperMappings.get(str);
|
|
355
|
+
}
|
|
356
|
+
// Check if this string might be an Integration Procedure reference
|
|
357
|
+
if (this.integrationProcedureMappings.has(str)) {
|
|
358
|
+
return this.integrationProcedureMappings.get(str);
|
|
359
|
+
}
|
|
360
|
+
// Check if this string might be a FlexCard reference
|
|
361
|
+
if (this.flexCardMappings.has(str)) {
|
|
362
|
+
return this.flexCardMappings.get(str);
|
|
363
|
+
}
|
|
364
|
+
// Check if this string might be an OmniScript reference (Type_SubType_Language)
|
|
365
|
+
for (const [originalName, cleanedName] of this.omniScriptMappings.entries()) {
|
|
366
|
+
if (str === originalName) {
|
|
367
|
+
return cleanedName;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// Return original string unchanged if no mapping found
|
|
371
|
+
// Only registered component names should be cleaned
|
|
372
|
+
return str;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
exports.NameMappingRegistry = NameMappingRegistry;
|
|
376
|
+
//# sourceMappingURL=NameMappingRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NameMappingRegistry.js","sourceRoot":"","sources":["../../src/migration/NameMappingRegistry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,gEAA6D;AAkB7D;;;GAGG;AACH,MAAa,mBAAmB;IAc9B,gEAAgE;IAChE;QAbQ,iBAAY,GAAsC,IAAI,GAAG,EAAE,CAAC;QAC5D,yBAAoB,GAA0B,EAAE,CAAC;QAEzD,0CAA0C;QAClC,uBAAkB,GAAwB,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;QAC3E,uBAAkB,GAAwB,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;QAC3E,iCAA4B,GAAwB,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;QACrF,qBAAgB,GAAwB,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;QAEjF,kFAAkF;QAC1E,0BAAqB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAGhC,CAAC;IAEjB,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE;YACjC,mBAAmB,CAAC,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;SAC1D;QACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,mBAAmB,CAAC,OAA6B;QACtD,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAEpC,+CAA+C;QAC/C,QAAQ,OAAO,CAAC,aAAa,EAAE;YAC7B,KAAK,YAA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