@salesforce/plugin-omnistudio-migration-tool 1.4.1-dev.21 → 1.4.1-dev.22
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 +19 -5
- package/lib/commands/omnistudio/migration/__tests__/assess.test.d.ts +1 -0
- package/lib/commands/omnistudio/migration/__tests__/assess.test.js +419 -0
- package/lib/commands/omnistudio/migration/__tests__/assess.test.js.map +1 -0
- package/lib/commands/omnistudio/migration/assess.d.ts +5 -0
- package/lib/commands/omnistudio/migration/assess.js +84 -27
- package/lib/commands/omnistudio/migration/assess.js.map +1 -1
- package/lib/commands/omnistudio/migration/migrate.d.ts +0 -1
- package/lib/commands/omnistudio/migration/migrate.js +19 -16
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/migration/dataraptor.js +3 -1
- package/lib/migration/dataraptor.js.map +1 -1
- package/lib/migration/omniscript.js +13 -2
- package/lib/migration/omniscript.js.map +1 -1
- package/lib/migration/related/ApexMigration.d.ts +1 -1
- package/lib/migration/related/ApexMigration.js +7 -6
- package/lib/migration/related/ApexMigration.js.map +1 -1
- package/lib/migration/related/LwcMigration.js +6 -5
- package/lib/migration/related/LwcMigration.js.map +1 -1
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.d.ts +12 -8
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js +44 -58
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js.map +1 -1
- package/lib/utils/constants/stringContants.d.ts +8 -0
- package/lib/utils/constants/stringContants.js +12 -0
- package/lib/utils/constants/stringContants.js.map +1 -0
- package/lib/utils/file/{fileutil.d.ts → fileUtil.d.ts} +14 -1
- package/lib/utils/file/{fileutil.js → fileUtil.js} +44 -5
- package/lib/utils/file/{fileutil.js.map → fileUtil.js.map} +1 -1
- package/lib/utils/interfaces.d.ts +10 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.d.ts +4 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js +62 -5
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/HtmlFileProcessor.d.ts +1 -1
- package/lib/utils/lwcparser/fileutils/HtmlFileProcessor.js +4 -4
- package/lib/utils/lwcparser/fileutils/HtmlFileProcessor.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/JavascriptFileProcessor.d.ts +1 -1
- package/lib/utils/lwcparser/fileutils/JavascriptFileProcessor.js +3 -3
- package/lib/utils/lwcparser/fileutils/JavascriptFileProcessor.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/XmlFileProcessor.d.ts +1 -1
- package/lib/utils/lwcparser/fileutils/XmlFileProcessor.js +3 -3
- package/lib/utils/lwcparser/fileutils/XmlFileProcessor.js.map +1 -1
- package/lib/utils/orgUtils/index.d.ts +13 -1
- package/lib/utils/orgUtils/index.js +34 -10
- package/lib/utils/orgUtils/index.js.map +1 -1
- package/lib/utils/reportGenerator/reportGenerator.d.ts +2 -2
- package/lib/utils/reportGenerator/reportGenerator.js +166 -46
- package/lib/utils/reportGenerator/reportGenerator.js.map +1 -1
- package/lib/utils/reportGenerator/reportInterfaces.d.ts +57 -11
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.d.ts +6 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js +114 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/DRAssessmentReporter.d.ts +2 -2
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js +117 -57
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/IPAssessmentReporter.d.ts +2 -2
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js +101 -61
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.d.ts +6 -0
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js +124 -0
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/OSAssessmentReporter.d.ts +5 -3
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js +187 -82
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/__tests__/DRAssessmentReporter.test.d.ts +1 -0
- package/lib/utils/resultsbuilder/__tests__/DRAssessmentReporter.test.js +137 -0
- package/lib/utils/resultsbuilder/__tests__/DRAssessmentReporter.test.js.map +1 -0
- package/lib/utils/resultsbuilder/assessmentReporter.d.ts +3 -7
- package/lib/utils/resultsbuilder/assessmentReporter.js +75 -132
- package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/index.d.ts +14 -8
- package/lib/utils/resultsbuilder/index.js +341 -208
- package/lib/utils/resultsbuilder/index.js.map +1 -1
- package/lib/utils/stringUtils.d.ts +9 -0
- package/lib/utils/stringUtils.js +25 -0
- package/lib/utils/stringUtils.js.map +1 -0
- package/messages/assess.json +4 -1
- package/messages/migrate.json +4 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
- package/lib/utils/prototypes.d.ts +0 -0
- package/lib/utils/prototypes.js +0 -18
- package/lib/utils/prototypes.js.map +0 -1
|
@@ -28,10 +28,11 @@ const fs = __importStar(require("fs"));
|
|
|
28
28
|
const shell = __importStar(require("shelljs"));
|
|
29
29
|
const apexparser_1 = require("../../utils/apex/parser/apexparser");
|
|
30
30
|
const sfProject_1 = require("../../utils/sfcli/project/sfProject");
|
|
31
|
-
const
|
|
31
|
+
const fileUtil_1 = require("../../utils/file/fileUtil");
|
|
32
32
|
const logger_1 = require("../../utils/logger");
|
|
33
33
|
const FileDiffUtil_1 = require("../../utils/lwcparser/fileutils/FileDiffUtil");
|
|
34
34
|
const stringutil_1 = require("../../utils/StringValue/stringutil");
|
|
35
|
+
const stringContants_1 = require("../../utils/constants/stringContants");
|
|
35
36
|
const BaseRealtedObjectMigration_1 = require("./BaseRealtedObjectMigration");
|
|
36
37
|
const APEXCLASS = 'Apexclass';
|
|
37
38
|
const APEX_CLASS_PATH = '/force-app/main/default/classes';
|
|
@@ -47,7 +48,7 @@ class ApexMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrat
|
|
|
47
48
|
this.vlocityOpenInterface = new apexparser_1.InterfaceImplements(VLOCITY_OPEN_INTERFACE, this.namespace);
|
|
48
49
|
}
|
|
49
50
|
processObjectType() {
|
|
50
|
-
return
|
|
51
|
+
return stringContants_1.Constants.Apex;
|
|
51
52
|
}
|
|
52
53
|
// public identifyObjects(migrationResults: MigrationResult[]): Promise<JSON[]> {
|
|
53
54
|
// throw new Error('Method not implemented.');
|
|
@@ -78,14 +79,14 @@ class ApexMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrat
|
|
|
78
79
|
processApexFiles(dir) {
|
|
79
80
|
dir += APEX_CLASS_PATH;
|
|
80
81
|
let files = [];
|
|
81
|
-
files =
|
|
82
|
+
files = fileUtil_1.FileUtil.readFilesSync(dir);
|
|
82
83
|
const fileAssessmentInfo = [];
|
|
83
84
|
for (const file of files) {
|
|
84
85
|
if (file.ext !== '.cls')
|
|
85
86
|
continue;
|
|
86
87
|
try {
|
|
87
88
|
const apexAssementInfo = this.processApexFile(file);
|
|
88
|
-
if (apexAssementInfo && apexAssementInfo.diff.length
|
|
89
|
+
if (apexAssementInfo && apexAssementInfo.diff.length < 3)
|
|
89
90
|
continue;
|
|
90
91
|
fileAssessmentInfo.push(apexAssementInfo);
|
|
91
92
|
}
|
|
@@ -122,7 +123,7 @@ class ApexMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrat
|
|
|
122
123
|
updateMessages.push('File has been updated to allow calls to Omnistudio components');
|
|
123
124
|
tokenUpdates.push(...tokeUpdatesForMethodCalls);
|
|
124
125
|
}
|
|
125
|
-
let difference =
|
|
126
|
+
let difference = [];
|
|
126
127
|
if (tokenUpdates && tokenUpdates.length > 0) {
|
|
127
128
|
const updatedContent = parser.rewrite(tokenUpdates);
|
|
128
129
|
fs.writeFileSync(file.location, parser.rewrite(tokenUpdates));
|
|
@@ -138,7 +139,7 @@ class ApexMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrat
|
|
|
138
139
|
warnings: warningMessage,
|
|
139
140
|
infos: updateMessages,
|
|
140
141
|
path: file.location,
|
|
141
|
-
diff: difference,
|
|
142
|
+
diff: JSON.stringify(difference),
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
145
|
processApexFileForRemotecalls(file, parser) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApexMigration.js","sourceRoot":"","sources":["../../../src/migration/related/ApexMigration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,+CAAiC;AAEjC,mEAU4C;AAC5C,mEAAgE;AAChE,wDAA2D;AAC3D,+CAA4C;AAE5C,+EAA4E;AAC5E,mEAAgE;AAChE,6EAA0E;AAE1E,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAC1D,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AACxD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAEtD,MAAa,aAAc,SAAQ,uDAA0B;IAK3D,YAAmB,WAAmB,EAAE,SAAiB,EAAE,GAAQ,EAAE,mBAA4B;QAC/F,KAAK,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9E,IAAI,CAAC,iBAAiB,GAAG,IAAI,gCAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,IAAI,CAAC,qBAAqB,GAAG,IAAI,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,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,aAAa,KAAK,CAAC,IAAI,uBAAuB,OAAO,GAAG,CAAC,CAAC;gBACjG,eAAM,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,IAAI,aAAa,KAAK,CAAC,IAAI,uBAAuB,OAAO,EAAE,CAAC,CAAC;gBAC3F,YAAY,CAAC,IAAI,CAAC,IAAI,8BAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;aAC1D;SACF;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,+BAA+B,CAAC,IAAU,EAAE,MAAqB;QACvE,MAAM,WAAW,GAAG,MAAM,CAAC,6BAA6B,CAAC;QACzD,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;QAC9C,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;YACpC,QAAQ,CAAC,IAAI,CACX,GAAG,IAAI,CAAC,IAAI,oBAAoB,UAAU,CAAC,SAAS,IAAI,UAAU,CAAC,UAAU,mGAAmG,CACjL,CAAC;SACH;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACO,cAAc;QACpB,OAAO;;;;;;;;;KASN,CAAC;IACJ,CAAC;CAOF;AAnLD,sCAmLC"}
|
|
@@ -27,16 +27,17 @@ exports.LwcMigration = void 0;
|
|
|
27
27
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
28
28
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
29
29
|
const shell = __importStar(require("shelljs"));
|
|
30
|
-
const
|
|
30
|
+
const fileUtil_1 = require("../../utils/file/fileUtil");
|
|
31
31
|
const sfProject_1 = require("../../utils/sfcli/project/sfProject");
|
|
32
32
|
const logger_1 = require("../../utils/logger");
|
|
33
33
|
const FileProcessorFactory_1 = require("../../utils/lwcparser/fileutils/FileProcessorFactory");
|
|
34
|
+
const stringContants_1 = require("../../utils/constants/stringContants");
|
|
34
35
|
const BaseRealtedObjectMigration_1 = require("./BaseRealtedObjectMigration");
|
|
35
36
|
const LWC_DIR_PATH = '/force-app/main/default/lwc';
|
|
36
37
|
const LWCTYPE = 'LightningComponentBundle';
|
|
37
38
|
class LwcMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigration {
|
|
38
39
|
processObjectType() {
|
|
39
|
-
return
|
|
40
|
+
return stringContants_1.Constants.LWC;
|
|
40
41
|
}
|
|
41
42
|
// public identifyObjects(migrationResults: MigrationResult[]): Promise<JSON[]> {
|
|
42
43
|
// this.assessment();
|
|
@@ -72,7 +73,7 @@ class LwcMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrati
|
|
|
72
73
|
dir += LWC_DIR_PATH;
|
|
73
74
|
let filesMap;
|
|
74
75
|
try {
|
|
75
|
-
filesMap =
|
|
76
|
+
filesMap = fileUtil_1.FileUtil.readAndProcessFiles(dir, 'OmniScript Auto-generated');
|
|
76
77
|
}
|
|
77
78
|
catch (error) {
|
|
78
79
|
logger_1.Logger.logger.error('Error in reading files', error);
|
|
@@ -85,7 +86,7 @@ class LwcMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrati
|
|
|
85
86
|
const jsonData = [];
|
|
86
87
|
fileMap.forEach((fileList, dir) => {
|
|
87
88
|
const changeInfos = [];
|
|
88
|
-
if (dir !==
|
|
89
|
+
if (dir !== stringContants_1.Constants.LWC &&
|
|
89
90
|
!dir.endsWith('MultiLanguage') &&
|
|
90
91
|
!dir.endsWith('English') &&
|
|
91
92
|
!dir.includes('_') &&
|
|
@@ -100,7 +101,7 @@ class LwcMigration extends BaseRealtedObjectMigration_1.BaseRelatedObjectMigrati
|
|
|
100
101
|
const path = file.location;
|
|
101
102
|
const name = file.name + file.ext;
|
|
102
103
|
const diff = processor.process(file, type, this.namespace);
|
|
103
|
-
if (diff !== undefined && diff !== '') {
|
|
104
|
+
if (diff !== undefined && diff !== '[]') {
|
|
104
105
|
const fileInfo = {
|
|
105
106
|
path,
|
|
106
107
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LwcMigration.js","sourceRoot":"","sources":["../../../src/migration/related/LwcMigration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,+DAA+D;AAC/D,+CAAiC;AACjC,wDAA2D;AAC3D,mEAAgE;AAChE,+CAA4C;AAC5C,+FAA4F;AAE5F,6EAA0E;AAE1E,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAE3C,MAAa,YAAa,SAAQ,uDAA0B;IACnD,iBAAiB;QACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"LwcMigration.js","sourceRoot":"","sources":["../../../src/migration/related/LwcMigration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,+DAA+D;AAC/D,+CAAiC;AACjC,wDAA2D;AAC3D,mEAAgE;AAChE,+CAA4C;AAC5C,+FAA4F;AAE5F,yEAAiE;AACjE,6EAA0E;AAE1E,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAE3C,MAAa,YAAa,SAAQ,uDAA0B;IACnD,iBAAiB;QACtB,OAAO,0BAAS,CAAC,GAAG,CAAC;IACvB,CAAC;IACD,iFAAiF;IACjF,uBAAuB;IACvB,gDAAgD;IAChD,IAAI;IACJ,6GAA6G;IAC7G,2CAA2C;IAC3C,IAAI;IACG,UAAU;QACf,MAAM,IAAI,GAAG,YAAY,CAAC;QAC1B,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QACxB,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3B,qBAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE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C5B,MAAM,aAAa,GAAsB;wBACvC,IAAI;wBACJ,WAAW;wBACX,MAAM;qBACP,CAAC;oBACF,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;wBACzC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;qBAC9B;iBACF;YACH,CAAC,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;SACjB;QAAC,OAAO,KAAK,EAAE;YACd,eAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SACpC;IACH,CAAC;IAEO,YAAY,CAAC,QAAgB;QACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACjH,CAAC;CACF;AAtGD,oCAsGC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Org } from '@salesforce/core';
|
|
2
|
-
import '../../utils
|
|
3
|
-
import {
|
|
2
|
+
import { RelatedObjectAssesmentInfo } from '../../utils';
|
|
3
|
+
import { ApexMigration } from './ApexMigration';
|
|
4
|
+
import { LwcMigration } from './LwcMigration';
|
|
4
5
|
export default class OmnistudioRelatedObjectMigrationFacade {
|
|
5
6
|
static args: {
|
|
6
7
|
name: string;
|
|
@@ -9,10 +10,13 @@ export default class OmnistudioRelatedObjectMigrationFacade {
|
|
|
9
10
|
protected readonly only: string;
|
|
10
11
|
protected readonly allversions: boolean;
|
|
11
12
|
protected readonly org: Org;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
private
|
|
13
|
+
protected readonly projectPath: string;
|
|
14
|
+
protected readonly apexMigration: ApexMigration;
|
|
15
|
+
protected readonly lwcMigration: LwcMigration;
|
|
16
|
+
constructor(namespace: string, only: string, allversions: boolean, org: Org, projectPath?: string, targetApexNamespace?: string);
|
|
17
|
+
private createProject;
|
|
18
|
+
private retrieveMetadata;
|
|
19
|
+
private processRelatedObjects;
|
|
20
|
+
migrateAll(relatedObjects: string[]): RelatedObjectAssesmentInfo;
|
|
21
|
+
assessAll(relatedObjects: string[]): RelatedObjectAssesmentInfo;
|
|
18
22
|
}
|
|
@@ -23,90 +23,79 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
require("../../utils/prototypes");
|
|
27
26
|
const shell = __importStar(require("shelljs"));
|
|
28
27
|
const utils_1 = require("../../utils");
|
|
29
28
|
const sfProject_1 = require("../../utils/sfcli/project/sfProject");
|
|
30
29
|
const logger_1 = require("../../utils/logger");
|
|
30
|
+
const stringContants_1 = require("../../utils/constants/stringContants");
|
|
31
31
|
const ApexMigration_1 = require("./ApexMigration");
|
|
32
|
-
const LwcMigration_1 = require("./LwcMigration");
|
|
33
32
|
// Initialize Messages with the current plugin directory
|
|
34
33
|
// Messages.importMessagesDirectory(__dirname);
|
|
35
34
|
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
36
35
|
// or any library that is using the messages framework can also be loaded this way.
|
|
37
36
|
// const messages = Messages.loadMessages('@salesforce/plugin-omnistudio-related-object-migration-tool', 'migrate');
|
|
38
|
-
|
|
37
|
+
// TODO: Uncomment code once MVP for migration is completed
|
|
38
|
+
// const LWCTYPE = 'LightningComponentBundle';
|
|
39
39
|
const APEXCLASS = 'Apexclass';
|
|
40
40
|
const defaultProjectName = 'omnistudio_migration';
|
|
41
41
|
class OmnistudioRelatedObjectMigrationFacade {
|
|
42
|
-
constructor(namespace, only, allversions, org) {
|
|
42
|
+
constructor(namespace, only, allversions, org, projectPath, targetApexNamespace) {
|
|
43
43
|
this.namespace = namespace;
|
|
44
44
|
this.only = only;
|
|
45
45
|
this.allversions = allversions;
|
|
46
46
|
this.org = org;
|
|
47
|
+
this.projectPath = projectPath || this.createProject();
|
|
48
|
+
// Initialize migration instances
|
|
49
|
+
this.apexMigration = new ApexMigration_1.ApexMigration(this.projectPath, this.namespace, this.org, targetApexNamespace);
|
|
50
|
+
// TODO: Uncomment code once MVP for migration is completed
|
|
51
|
+
// this.lwcMigration = new LwcMigration(this.projectPath, this.namespace, this.org);
|
|
47
52
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return projectPath;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
sfProject_1.sfProject.create(defaultProjectName);
|
|
55
|
-
return process.cwd() + '/' + defaultProjectName;
|
|
56
|
-
}
|
|
53
|
+
createProject() {
|
|
54
|
+
sfProject_1.sfProject.create(defaultProjectName);
|
|
55
|
+
return process.cwd() + '/' + defaultProjectName;
|
|
57
56
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
retrieveMetadata(relatedObjects) {
|
|
58
|
+
const pwd = shell.pwd();
|
|
59
|
+
shell.cd(this.projectPath);
|
|
60
|
+
// TODO: Uncomment code once MVP for migration is completed
|
|
61
|
+
// if (relatedObjects.includes(Constants.LWC)) {
|
|
62
|
+
// sfProject.retrieve(LWCTYPE, this.org.getUsername());
|
|
63
|
+
// }
|
|
64
|
+
if (relatedObjects.includes(stringContants_1.Constants.Apex)) {
|
|
65
|
+
sfProject_1.sfProject.retrieve(APEXCLASS, this.org.getUsername());
|
|
62
66
|
}
|
|
63
|
-
|
|
64
|
-
sfProject_1.sfProject.create(defaultProjectName);
|
|
65
|
-
projectPath = process.cwd() + '/' + defaultProjectName;
|
|
66
|
-
const pwd = shell.pwd();
|
|
67
|
-
shell.cd(projectPath);
|
|
68
|
-
if (relatedObjects.includes('lwc')) {
|
|
69
|
-
sfProject_1.sfProject.retrieve(LWCTYPE, this.org.getUsername());
|
|
70
|
-
}
|
|
71
|
-
if (relatedObjects.includes('apex')) {
|
|
72
|
-
sfProject_1.sfProject.retrieve(APEXCLASS, this.org.getUsername());
|
|
73
|
-
}
|
|
74
|
-
shell.cd(pwd);
|
|
75
|
-
}
|
|
76
|
-
return projectPath;
|
|
67
|
+
shell.cd(pwd);
|
|
77
68
|
}
|
|
78
|
-
|
|
69
|
+
processRelatedObjects(relatedObjects, isMigration) {
|
|
79
70
|
// Start the debug timer
|
|
80
71
|
utils_1.DebugTimer.getInstance().start();
|
|
81
|
-
//
|
|
82
|
-
|
|
72
|
+
// Retrieve metadata if needed
|
|
73
|
+
if (isMigration) {
|
|
74
|
+
this.retrieveMetadata(relatedObjects);
|
|
75
|
+
}
|
|
83
76
|
const debugTimer = utils_1.DebugTimer.getInstance();
|
|
84
77
|
debugTimer.start();
|
|
85
|
-
// Initialize migration tools based on the relatedObjects parameter
|
|
86
|
-
const apexMigrator = this.createApexClassMigrationTool(projectDirectory, targetApexNamespace);
|
|
87
|
-
const lwcMigrator = this.createLWCComponentMigrationTool(this.namespace, projectDirectory);
|
|
88
78
|
let apexAssessmentInfos = [];
|
|
89
|
-
|
|
90
|
-
// Proceed with
|
|
91
|
-
try {
|
|
92
|
-
if (relatedObjects.includes('apex')) {
|
|
93
|
-
apexAssessmentInfos = apexMigrator.migrate();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch (Error) {
|
|
97
|
-
// Log the error
|
|
98
|
-
logger_1.Logger.logger.error(Error.message);
|
|
99
|
-
}
|
|
79
|
+
const lwcAssessmentInfos = [];
|
|
80
|
+
// Proceed with processing logic
|
|
100
81
|
try {
|
|
101
|
-
if (relatedObjects.includes(
|
|
102
|
-
|
|
82
|
+
if (relatedObjects.includes(stringContants_1.Constants.Apex)) {
|
|
83
|
+
apexAssessmentInfos = isMigration ? this.apexMigration.migrate() : this.apexMigration.assess();
|
|
103
84
|
}
|
|
104
85
|
}
|
|
105
86
|
catch (Error) {
|
|
106
87
|
// Log the error
|
|
107
88
|
logger_1.Logger.logger.error(Error.message);
|
|
108
89
|
}
|
|
109
|
-
//
|
|
90
|
+
// TODO: Uncomment code once MVP for migration is completed
|
|
91
|
+
// try {
|
|
92
|
+
// if (relatedObjects.includes(Constants.LWC)) {
|
|
93
|
+
// lwcAssessmentInfos = isMigration ? this.lwcMigration.migrate() : this.lwcMigration.assessment();
|
|
94
|
+
// }
|
|
95
|
+
// } catch (Error) {
|
|
96
|
+
// // Log the error
|
|
97
|
+
// Logger.logger.error(Error.message);
|
|
98
|
+
// }
|
|
110
99
|
// Stop the debug timer
|
|
111
100
|
const timer = debugTimer.stop();
|
|
112
101
|
// Save timer to debug logger
|
|
@@ -114,14 +103,11 @@ class OmnistudioRelatedObjectMigrationFacade {
|
|
|
114
103
|
// Return results needed for --json flag
|
|
115
104
|
return { apexAssessmentInfos, lwcAssessmentInfos };
|
|
116
105
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
// Return an instance of LWCComponentMigrationTool when implemented
|
|
120
|
-
return new LwcMigration_1.LwcMigration(projectPath, this.namespace, this.org);
|
|
106
|
+
migrateAll(relatedObjects) {
|
|
107
|
+
return this.processRelatedObjects(relatedObjects, true);
|
|
121
108
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return new ApexMigration_1.ApexMigration(projectPath, this.namespace, this.org, targetApexNamespace);
|
|
109
|
+
assessAll(relatedObjects) {
|
|
110
|
+
return this.processRelatedObjects(relatedObjects, false);
|
|
125
111
|
}
|
|
126
112
|
}
|
|
127
113
|
exports.default = OmnistudioRelatedObjectMigrationFacade;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OmnistudioRelatedObjectMigrationFacade.js","sourceRoot":"","sources":["../../../src/migration/related/OmnistudioRelatedObjectMigrationFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA
|
|
1
|
+
{"version":3,"file":"OmnistudioRelatedObjectMigrationFacade.js","sourceRoot":"","sources":["../../../src/migration/related/OmnistudioRelatedObjectMigrationFacade.ts"],"names":[],"mappings":";;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AE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IACrD,CAAC;IAEM,UAAU,CAAC,cAAwB;QACxC,OAAO,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEM,SAAS,CAAC,cAAwB;QACvC,OAAO,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;;AArGH,yDAsGC;AArGC,yEAAyE;AACzE,0EAA0E;AAC5D,2CAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Constants = void 0;
|
|
4
|
+
exports.Constants = {
|
|
5
|
+
Omniscript: 'os',
|
|
6
|
+
Flexcard: 'fc',
|
|
7
|
+
IntegrationProcedure: 'ip',
|
|
8
|
+
DataMapper: 'dr',
|
|
9
|
+
LWC: 'lwc',
|
|
10
|
+
Apex: 'apex',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=stringContants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringContants.js","sourceRoot":"","sources":["../../../src/utils/constants/stringContants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,oBAAoB,EAAE,IAAI;IAC1B,UAAU,EAAE,IAAI;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class FileUtil {
|
|
2
2
|
static readFilesSync(dir: string): File[];
|
|
3
3
|
static readAllFiles(dirPath: string, fileMap?: Map<string, File[]>): Map<string, File[]>;
|
|
4
4
|
static saveToFile(outputFilePath: string, modifiedHtml: string): void;
|
|
@@ -18,3 +18,16 @@ export declare class File {
|
|
|
18
18
|
ext: string;
|
|
19
19
|
constructor(name: string, location: string, ext: string);
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Copies `.js` and `.css` files from a source directory (based on `folderName`)
|
|
23
|
+
* to a specified destination directory.
|
|
24
|
+
*
|
|
25
|
+
* @param folderName - The subdirectory under `/src/` where source asset files are located (e.g., `'javascripts'`, `'styles'`).
|
|
26
|
+
* @param destDir - The absolute or relative path to the destination directory where the assets should be copied.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* - If the destination directory does not exist, the method logs a warning and exits.
|
|
30
|
+
* - Only `.js` and `.css` files are copied.
|
|
31
|
+
* - The source files remain in place after copying.
|
|
32
|
+
*/
|
|
33
|
+
export declare function pushAssestUtilites(folderName: string, destDir: string): void;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.File = exports.
|
|
26
|
+
exports.pushAssestUtilites = exports.File = exports.FileUtil = void 0;
|
|
27
27
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
28
28
|
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
29
29
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
@@ -31,7 +31,7 @@ exports.File = exports.fileutil = void 0;
|
|
|
31
31
|
const fs = __importStar(require("fs"));
|
|
32
32
|
const path = __importStar(require("path"));
|
|
33
33
|
const logger_1 = require("../logger");
|
|
34
|
-
class
|
|
34
|
+
class FileUtil {
|
|
35
35
|
static readFilesSync(dir) {
|
|
36
36
|
const files = [];
|
|
37
37
|
fs.readdirSync(dir).forEach((filename) => {
|
|
@@ -125,7 +125,7 @@ class fileutil {
|
|
|
125
125
|
return fileMap;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
exports.
|
|
128
|
+
exports.FileUtil = FileUtil;
|
|
129
129
|
/**
|
|
130
130
|
* Check if a substring exists in an XML file
|
|
131
131
|
*
|
|
@@ -133,7 +133,7 @@ exports.fileutil = fileutil;
|
|
|
133
133
|
* @param searchString Substring to search for
|
|
134
134
|
* @returns true if substring exists, otherwise false
|
|
135
135
|
*/
|
|
136
|
-
|
|
136
|
+
FileUtil.doesSubstringExist = (filePath, searchString) => {
|
|
137
137
|
try {
|
|
138
138
|
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
|
139
139
|
return fileContent.includes(searchString);
|
|
@@ -151,4 +151,43 @@ class File {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
exports.File = File;
|
|
154
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Copies `.js` and `.css` files from a source directory (based on `folderName`)
|
|
156
|
+
* to a specified destination directory.
|
|
157
|
+
*
|
|
158
|
+
* @param folderName - The subdirectory under `/src/` where source asset files are located (e.g., `'javascripts'`, `'styles'`).
|
|
159
|
+
* @param destDir - The absolute or relative path to the destination directory where the assets should be copied.
|
|
160
|
+
*
|
|
161
|
+
* @remarks
|
|
162
|
+
* - If the destination directory does not exist, the method logs a warning and exits.
|
|
163
|
+
* - Only `.js` and `.css` files are copied.
|
|
164
|
+
* - The source files remain in place after copying.
|
|
165
|
+
*/
|
|
166
|
+
function pushAssestUtilites(folderName, destDir) {
|
|
167
|
+
const sourceDir = path.join(process.cwd(), 'src', folderName);
|
|
168
|
+
if (!fs.existsSync(destDir)) {
|
|
169
|
+
logger_1.Logger.logger.warn(`Destination directory does not exist: ${destDir}`);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
const files = fs.readdirSync(sourceDir);
|
|
174
|
+
files.forEach((file) => {
|
|
175
|
+
const ext = path.extname(file);
|
|
176
|
+
if (ext === '.js' || ext === '.css') {
|
|
177
|
+
const srcPath = path.join(sourceDir, file);
|
|
178
|
+
const destPath = path.join(destDir, file);
|
|
179
|
+
try {
|
|
180
|
+
fs.copyFileSync(srcPath, destPath);
|
|
181
|
+
}
|
|
182
|
+
catch (copyErr) {
|
|
183
|
+
logger_1.Logger.logger.error(`Error copying file ${srcPath} to ${destPath}: ${copyErr}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
catch (readDirErr) {
|
|
189
|
+
logger_1.Logger.logger.error(`Error reading directory ${sourceDir}: ${readDirErr}`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.pushAssestUtilites = pushAssestUtilites;
|
|
193
|
+
//# sourceMappingURL=fileUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"fileUtil.js","sourceRoot":"","sources":["../../../src/utils/file/fileUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAwD;AACxD,qEAAqE;AACrE,qEAAqE;AACrE,+BAA+B;AAC/B,uCAAyB;AACzB,2CAA6B;AAC7B,sCAAmC;AAEnC,MAAa,QAAQ;IACZ,MAAM,CAAC,aAAa,CAAC,GAAW;QACrC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;YACvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC7C,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAE7B,IAAI,MAAM;gBAAE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AE,EAAE;YACrB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,MAAM,EAAE;gBACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;gBAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAE1C,IAAI;oBACF,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;iBACpC;gBAAC,OAAO,OAAO,EAAE;oBAChB,eAAM,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,OAAO,OAAO,QAAQ,KAAK,OAAO,EAAE,CAAC,CAAC;iBACjF;aACF;QACH,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,UAAU,EAAE;QACnB,eAAM,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,SAAS,KAAK,UAAU,EAAE,CAAC,CAAC;KAC5E;AACH,CAAC;AA3BD,gDA2BC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { File } from '../utils/file/
|
|
1
|
+
import { File } from '../utils/file/fileUtil';
|
|
2
2
|
export interface MigratedObject {
|
|
3
3
|
name: string;
|
|
4
4
|
data?: MigratedRecordInfo[];
|
|
@@ -13,6 +13,10 @@ export interface MigratedRecordInfo {
|
|
|
13
13
|
migratedName?: string;
|
|
14
14
|
warnings: string[];
|
|
15
15
|
}
|
|
16
|
+
export interface DiffPair {
|
|
17
|
+
old: string | null;
|
|
18
|
+
new: string | null;
|
|
19
|
+
}
|
|
16
20
|
export interface LWCAssessmentInfo {
|
|
17
21
|
name: string;
|
|
18
22
|
changeInfos: FileChangeInfo[];
|
|
@@ -21,10 +25,12 @@ export interface LWCAssessmentInfo {
|
|
|
21
25
|
export interface OSAssessmentInfo {
|
|
22
26
|
name: string;
|
|
23
27
|
id: string;
|
|
28
|
+
oldName: string;
|
|
24
29
|
dependenciesIP: nameLocation[];
|
|
25
30
|
missingIP: string[];
|
|
26
31
|
dependenciesDR: nameLocation[];
|
|
27
32
|
missingDR: string[];
|
|
33
|
+
migrationStatus: string;
|
|
28
34
|
dependenciesOS: nameLocation[];
|
|
29
35
|
missingOS: string[];
|
|
30
36
|
dependenciesRemoteAction: nameLocation[];
|
|
@@ -37,6 +43,7 @@ export interface OSAssessmentInfo {
|
|
|
37
43
|
export interface IPAssessmentInfo {
|
|
38
44
|
name: string;
|
|
39
45
|
id: string;
|
|
46
|
+
oldName: string;
|
|
40
47
|
dependenciesIP: nameLocation[];
|
|
41
48
|
dependenciesDR: nameLocation[];
|
|
42
49
|
dependenciesOS: nameLocation[];
|
|
@@ -83,9 +90,11 @@ export interface FlexCardAssessmentInfo {
|
|
|
83
90
|
warnings: string[];
|
|
84
91
|
}
|
|
85
92
|
export interface DataRaptorAssessmentInfo {
|
|
93
|
+
oldName: string;
|
|
86
94
|
name: string;
|
|
87
95
|
id: string;
|
|
88
96
|
formulaChanges: oldNew[];
|
|
97
|
+
type: string;
|
|
89
98
|
infos: string[];
|
|
90
99
|
warnings: string[];
|
|
91
100
|
apexDependencies: string[];
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { DiffPair } from '../../interfaces';
|
|
1
2
|
export declare class FileDiffUtil {
|
|
2
|
-
|
|
3
|
+
static getDiffHTML(diff: string, name: string): string;
|
|
4
|
+
private static getDiffContent;
|
|
5
|
+
getFileDiff(filename: string, originalFileContent: string, modifiedFileContent: string): DiffPair[];
|
|
3
6
|
escapeHtml(text: string): string;
|
|
4
7
|
}
|