@salesforce/plugin-omnistudio-migration-tool 1.3.1-dev.0 → 1.4.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/omnistudio/migration/migrate.js +4 -1
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/utils/apex/parser/apexparser.d.ts +13 -0
- package/lib/utils/apex/parser/apexparser.js +74 -0
- package/lib/utils/apex/parser/apexparser.js.map +1 -0
- package/lib/utils/logger.d.ts +9 -0
- package/lib/utils/logger.js +18 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/lwcparser/htmlParser/HTMLParser.d.ts +9 -0
- package/lib/utils/lwcparser/htmlParser/HTMLParser.js +74 -0
- package/lib/utils/lwcparser/htmlParser/HTMLParser.js.map +1 -0
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.d.ts +7 -0
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js +45 -0
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js.map +1 -0
- package/lib/utils/lwcparser/xmlParser/XmlParser.d.ts +8 -0
- package/lib/utils/lwcparser/xmlParser/XmlParser.js +45 -0
- package/lib/utils/lwcparser/xmlParser/XmlParser.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +14 -6
|
@@ -45,6 +45,7 @@ const utils_1 = require("../../../utils");
|
|
|
45
45
|
const resultsbuilder_1 = require("../../../utils/resultsbuilder");
|
|
46
46
|
const flexcard_1 = require("../../../migration/flexcard");
|
|
47
47
|
const omniscript_1 = require("../../../migration/omniscript");
|
|
48
|
+
const logger_1 = require("../../../utils/logger");
|
|
48
49
|
// Initialize Messages with the current plugin directory
|
|
49
50
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
50
51
|
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
@@ -57,6 +58,8 @@ class Migrate extends basecommand_1.default {
|
|
|
57
58
|
const apiVersion = (this.flags.apiversion || '55.0');
|
|
58
59
|
const migrateOnly = (this.flags.only || '');
|
|
59
60
|
const allVersions = this.flags.allversions || false;
|
|
61
|
+
logger_1.Logger.initialiseLogger(this.ux, this.logger);
|
|
62
|
+
this.logger = logger_1.Logger.logger;
|
|
60
63
|
// this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername
|
|
61
64
|
const conn = this.org.getConnection();
|
|
62
65
|
conn.setApiVersion(apiVersion);
|
|
@@ -96,7 +99,7 @@ class Migrate extends basecommand_1.default {
|
|
|
96
99
|
let allTruncateComplete = true;
|
|
97
100
|
for (const cls of migrationObjects.reverse()) {
|
|
98
101
|
try {
|
|
99
|
-
|
|
102
|
+
logger_1.Logger.ux.log('Cleaning: ' + cls.getName());
|
|
100
103
|
debugTimer.lap('Cleaning: ' + cls.getName());
|
|
101
104
|
await cls.truncate();
|
|
102
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../../src/commands/omnistudio/migration/migrate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,+DAA+D;AAC/D,uDAAuD;AACvD;;;;;GAKG;AACH,uCAAyB;AACzB,iDAA4C;AAC5C,2CAA4C;AAC5C,qCAAmC;AACnC,oEAAsD;AACtD,8DAAwE;AACxE,0CAAgF;AAEhF,kEAA+D;AAC/D,0DAAgE;AAChE,8DAA8F;
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../../src/commands/omnistudio/migration/migrate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,+DAA+D;AAC/D,uDAAuD;AACvD;;;;;GAKG;AACH,uCAAyB;AACzB,iDAA4C;AAC5C,2CAA4C;AAC5C,qCAAmC;AACnC,oEAAsD;AACtD,8DAAwE;AACxE,0CAAgF;AAEhF,kEAA+D;AAC/D,0DAAgE;AAChE,8DAA8F;AAC9F,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,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CompilationUnitContext } from '@apexdevtools/apex-parser';
|
|
2
|
+
import { Token } from 'antlr4ts';
|
|
3
|
+
export declare class ApexASTParser {
|
|
4
|
+
private apexFileContent;
|
|
5
|
+
private implementsInterface;
|
|
6
|
+
private interfaceName;
|
|
7
|
+
private methodName;
|
|
8
|
+
private astListener;
|
|
9
|
+
get implemementsInterface(): Map<string, Token>;
|
|
10
|
+
constructor(apexFileContent: string, interfaceName: string, methodName: string);
|
|
11
|
+
parse(): CompilationUnitContext;
|
|
12
|
+
private createASTListener;
|
|
13
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApexASTParser = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
8
|
+
const apex_parser_1 = require("@apexdevtools/apex-parser");
|
|
9
|
+
const antlr4ts_1 = require("antlr4ts");
|
|
10
|
+
const ParseTreeWalker_1 = require("antlr4ts/tree/ParseTreeWalker");
|
|
11
|
+
class ApexASTParser {
|
|
12
|
+
get implemementsInterface() {
|
|
13
|
+
return this.implementsInterface;
|
|
14
|
+
}
|
|
15
|
+
constructor(apexFileContent, interfaceName, methodName) {
|
|
16
|
+
this.implementsInterface = new Map();
|
|
17
|
+
this.apexFileContent = apexFileContent;
|
|
18
|
+
this.interfaceName = interfaceName;
|
|
19
|
+
this.methodName = methodName;
|
|
20
|
+
this.astListener = this.createASTListener();
|
|
21
|
+
}
|
|
22
|
+
parse() {
|
|
23
|
+
const lexer = new apex_parser_1.ApexLexer(new apex_parser_1.CaseInsensitiveInputStream(antlr4ts_1.CharStreams.fromString(this.apexFileContent)));
|
|
24
|
+
const tokens = new apex_parser_1.CommonTokenStream(lexer);
|
|
25
|
+
const parser = new apex_parser_1.ApexParser(tokens);
|
|
26
|
+
const context = parser.compilationUnit();
|
|
27
|
+
// parser.addParseListener(new interfaceVisitor() as ApexParserListener);
|
|
28
|
+
ParseTreeWalker_1.ParseTreeWalker.DEFAULT.walk(this.astListener, context);
|
|
29
|
+
return context;
|
|
30
|
+
}
|
|
31
|
+
createASTListener() {
|
|
32
|
+
class ApexMigrationListener {
|
|
33
|
+
constructor(parser) {
|
|
34
|
+
this.parser = parser;
|
|
35
|
+
}
|
|
36
|
+
enterClassDeclaration(ctx) {
|
|
37
|
+
const interfaceToBeSearched = this.parser.interfaceName;
|
|
38
|
+
if (!interfaceToBeSearched)
|
|
39
|
+
return;
|
|
40
|
+
if (!ctx.typeList() || !ctx.typeList().typeRef())
|
|
41
|
+
return;
|
|
42
|
+
for (const typeRefContext of ctx.typeList().typeRef())
|
|
43
|
+
for (const typeNameContext of typeRefContext.typeName()) {
|
|
44
|
+
if (!typeNameContext.id() || !typeNameContext.id().Identifier())
|
|
45
|
+
continue;
|
|
46
|
+
if (typeNameContext.id().Identifier().symbol.text === interfaceToBeSearched) {
|
|
47
|
+
this.parser.implementsInterface.set(interfaceToBeSearched, typeNameContext.id().Identifier().symbol);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
enterDotExpression(ctx) {
|
|
52
|
+
// console.log('*********');
|
|
53
|
+
// console.log(ctx.expression().start.text);
|
|
54
|
+
if (ctx.dotMethodCall() && this.parser.methodName) {
|
|
55
|
+
// console.log(ctx.dotMethodCall().anyId().Identifier().symbol.text);
|
|
56
|
+
// ctx.dotMethodCall().expressionList().expression(1).children[0].children[0].children[0];
|
|
57
|
+
// console.log(ctx.dotMethodCall().expressionList().expression(1).children[0]);
|
|
58
|
+
}
|
|
59
|
+
// console.log('*********');
|
|
60
|
+
}
|
|
61
|
+
enterVariableDeclarator(ctx) {
|
|
62
|
+
if (ctx.id().Identifier().symbol.text === 'DRName') {
|
|
63
|
+
// console.log(ctx.expression());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return new ApexMigrationListener(this);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.ApexASTParser = ApexASTParser;
|
|
71
|
+
// const filePath = '/Users/abhinavkumar2/company/plugin-omnistudio-migration-tool/test/FormulaParserService.cls';
|
|
72
|
+
// new ApexASTParser(filePath, 'callable', '').parse(filePath);
|
|
73
|
+
// console.log(ast);
|
|
74
|
+
//# sourceMappingURL=apexparser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apexparser.js","sourceRoot":"","sources":["../../../../src/utils/apex/parser/apexparser.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,2DAUmC;AACnC,uCAA8C;AAC9C,mEAAgE;AAEhE,MAAa,aAAa;IASxB,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED,YAAmB,eAAuB,EAAE,aAAqB,EAAE,UAAkB;QAX7E,wBAAmB,GAAuB,IAAI,GAAG,EAAE,CAAC;QAY1D,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC9C,CAAC;IAEM,KAAK;QACV,MAAM,KAAK,GAAG,IAAI,uBAAS,CAAC,IAAI,wCAA0B,CAAC,sBAAW,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAC1G,MAAM,MAAM,GAAG,IAAI,+BAAiB,CAAC,KAAK,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I,CAAC,MAAM,CAAC,UAAU,EAAE;oBACjD,qEAAqE;oBACrE,0FAA0F;oBAC1F,+EAA+E;iBAChF;gBACD,4BAA4B;YAC9B,CAAC;YAEM,uBAAuB,CAAC,GAA8B;gBAC3D,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE;oBAClD,iCAAiC;iBAClC;YACH,CAAC;SACF;QACD,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF;AAjED,sCAiEC;AAED,kHAAkH;AAClH,+DAA+D;AAE/D,oBAAoB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UX } from '@salesforce/command';
|
|
2
|
+
import { Logger as SfLogger } from '@salesforce/core';
|
|
3
|
+
export declare class Logger {
|
|
4
|
+
private static sfUX;
|
|
5
|
+
private static sfLogger;
|
|
6
|
+
static initialiseLogger(ux: UX, logger: SfLogger): Logger;
|
|
7
|
+
static get logger(): SfLogger;
|
|
8
|
+
static get ux(): UX;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = void 0;
|
|
4
|
+
class Logger {
|
|
5
|
+
static initialiseLogger(ux, logger) {
|
|
6
|
+
Logger.sfUX = ux;
|
|
7
|
+
Logger.sfLogger = logger;
|
|
8
|
+
return Logger;
|
|
9
|
+
}
|
|
10
|
+
static get logger() {
|
|
11
|
+
return Logger.sfLogger;
|
|
12
|
+
}
|
|
13
|
+
static get ux() {
|
|
14
|
+
return Logger.sfUX;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Logger = Logger;
|
|
18
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;AAGA,MAAa,MAAM;IAIV,MAAM,CAAC,gBAAgB,CAAC,EAAM,EAAE,MAAgB;QACrD,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QACjB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,MAAM,KAAK,MAAM;QACtB,OAAO,MAAM,CAAC,QAAQ,CAAC;IACzB,CAAC;IACM,MAAM,KAAK,EAAE;QAClB,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CACF;AAhBD,wBAgBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare class HTMLParser {
|
|
2
|
+
private parser;
|
|
3
|
+
constructor(htmlFilePath: string);
|
|
4
|
+
private loadHTMLFromFile;
|
|
5
|
+
replaceCustomTag(oldTag: string, newTag: string): void;
|
|
6
|
+
saveToFile(outputFilePath: string): void;
|
|
7
|
+
getModifiedHTML(): string;
|
|
8
|
+
}
|
|
9
|
+
export default HTMLParser;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
27
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
28
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
29
|
+
/* eslint-disable no-console */
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
31
|
+
const cheerio = __importStar(require("cheerio"));
|
|
32
|
+
class HTMLParser {
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
|
|
34
|
+
constructor(htmlFilePath) {
|
|
35
|
+
// Load the HTML file and initialize cheerio
|
|
36
|
+
const html = this.loadHTMLFromFile(htmlFilePath);
|
|
37
|
+
this.parser = cheerio.load(html);
|
|
38
|
+
}
|
|
39
|
+
// Method to load HTML from a file
|
|
40
|
+
loadHTMLFromFile(filePath) {
|
|
41
|
+
try {
|
|
42
|
+
return fs.readFileSync(filePath, 'utf8');
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.error(`Error reading file from disk: ${error}`);
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Method to replace custom tags
|
|
50
|
+
replaceCustomTag(oldTag, newTag) {
|
|
51
|
+
this.parser(oldTag).each((_, element) => {
|
|
52
|
+
const newElement = this.parser(`<${newTag}></${newTag}>`).html(this.parser(element).html());
|
|
53
|
+
this.parser(element).replaceWith(newElement);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// Method to save modified HTML back to a file
|
|
57
|
+
saveToFile(outputFilePath) {
|
|
58
|
+
try {
|
|
59
|
+
const modifiedHtml = this.parser.html();
|
|
60
|
+
fs.writeFileSync(outputFilePath, modifiedHtml);
|
|
61
|
+
console.log(`Modified HTML saved to ${outputFilePath}`);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error(`Error writing file to disk: ${error}`);
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Optional: Method to get the modified HTML as a string
|
|
69
|
+
getModifiedHTML() {
|
|
70
|
+
return this.parser.html();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.default = HTMLParser;
|
|
74
|
+
//# sourceMappingURL=HTMLParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTMLParser.js","sourceRoot":"","sources":["../../../../src/utils/lwcparser/htmlParser/HTMLParser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,qEAAqE;AACrE,uDAAuD;AACvD,+BAA+B;AAC/B,uCAAyB;AACzB,iDAAmC;AAEnC,MAAM,UAAU;IAGd,4EAA4E;IAC5E,YAAY,YAAoB;QAC9B,4CAA4C;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,kCAAkC;IAC1B,gBAAgB,CAAC,QAAgB;QACvC,IAAI;YACF,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;SAC1C;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAED,gCAAgC;IACzB,gBAAgB,CAAC,MAAc,EAAE,MAAc;QACpD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE;YACtC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5F,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,8CAA8C;IACvC,UAAU,CAAC,cAAsB;QACtC,IAAI;YACF,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACxC,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,0BAA0B,cAAc,EAAE,CAAC,CAAC;SACzD;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,+BAA+B,KAAK,EAAE,CAAC,CAAC;YACtD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAED,wDAAwD;IACjD,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CACF;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
|
+
/* eslint-disable no-console */
|
|
5
|
+
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
6
|
+
// import * as fs from 'fs';
|
|
7
|
+
// import { parse, type ParseResult } from '@babel/parser'; // Import all types from @babel/types
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
class JavaScriptParser {
|
|
10
|
+
constructor(filePath) {
|
|
11
|
+
// private fileContent: string;
|
|
12
|
+
this.ast = null; // Specify the generic type argument
|
|
13
|
+
// this.fileContent = fs.readFileSync(filePath, 'utf-8');
|
|
14
|
+
this.ast = null;
|
|
15
|
+
}
|
|
16
|
+
// public parseCode(): void {
|
|
17
|
+
// const parseResult: File = parse(this.fileContent, {
|
|
18
|
+
// sourceType: 'module', // Use 'script' if you're parsing non-module code
|
|
19
|
+
// plugins: ['jsx', 'typescript'], // Add plugins as needed
|
|
20
|
+
// });
|
|
21
|
+
// if (parseResult.type === 'File') {
|
|
22
|
+
// this.ast = parseResult;
|
|
23
|
+
// } else {
|
|
24
|
+
// throw new Error("Parsing did not return a 'File' node as expected.");
|
|
25
|
+
// }
|
|
26
|
+
// }
|
|
27
|
+
// Method to get the AST as a string
|
|
28
|
+
getAST() {
|
|
29
|
+
if (!this.ast) {
|
|
30
|
+
console.error('AST is not available. Please parse the code first.');
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return JSON.stringify(this.ast, null, 2);
|
|
34
|
+
}
|
|
35
|
+
// Main method to process the file
|
|
36
|
+
processFile() {
|
|
37
|
+
// this.parseCode(); // Parse the JavaScript code
|
|
38
|
+
const astString = this.getAST(); // Get the AST as a string
|
|
39
|
+
if (astString) {
|
|
40
|
+
console.log(astString); // Output the AST
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.default = JavaScriptParser;
|
|
45
|
+
//# sourceMappingURL=JavaScriptParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JavaScriptParser.js","sourceRoot":"","sources":["../../../../src/utils/lwcparser/jsParser/JavaScriptParser.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,4DAA4D;AAC5D,+BAA+B;AAC/B,qEAAqE;AACrE,4BAA4B;AAC5B,iGAAiG;;AAEjG,MAAM,gBAAgB;IAIpB,YAAY,QAAgB;QAH5B,+BAA+B;QACvB,QAAG,GAAgB,IAAI,CAAC,CAAC,oCAAoC;QAGnE,yDAAyD;QACzD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IAClB,CAAC;IAED,6BAA6B;IAC7B,wDAAwD;IACxD,8EAA8E;IAC9E,+DAA+D;IAC/D,QAAQ;IAER,uCAAuC;IACvC,8BAA8B;IAC9B,aAAa;IACb,4EAA4E;IAC5E,MAAM;IACN,IAAI;IAEJ,oCAAoC;IACpC,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACpE,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,kCAAkC;IAClC,WAAW;QACT,iDAAiD;QACjD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,0BAA0B;QAC3D,IAAI,SAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB;SAC1C;IACH,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XmlParser = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
6
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
10
|
+
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
11
|
+
const xmldom_1 = require("xmldom");
|
|
12
|
+
class XmlParser {
|
|
13
|
+
constructor(xmlString) {
|
|
14
|
+
this.xmlString = xmlString;
|
|
15
|
+
this.xmlDoc = null;
|
|
16
|
+
this.parseXml();
|
|
17
|
+
}
|
|
18
|
+
parseXml() {
|
|
19
|
+
const parser = new xmldom_1.DOMParser();
|
|
20
|
+
this.xmlDoc = parser.parseFromString(this.xmlString, 'text/xml');
|
|
21
|
+
}
|
|
22
|
+
removeNode(tagName, index = 0) {
|
|
23
|
+
var _a;
|
|
24
|
+
if (!this.xmlDoc) {
|
|
25
|
+
throw new Error('XML document has not been parsed.');
|
|
26
|
+
}
|
|
27
|
+
const nodes = this.xmlDoc.getElementsByTagName(tagName);
|
|
28
|
+
if (nodes.length > index) {
|
|
29
|
+
const nodeToRemove = nodes[index];
|
|
30
|
+
(_a = nodeToRemove.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(nodeToRemove);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw new Error(`No node found with tag name "${tagName}" at index ${index}.`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
getXmlString() {
|
|
37
|
+
if (!this.xmlDoc) {
|
|
38
|
+
throw new Error('XML document has not been parsed.');
|
|
39
|
+
}
|
|
40
|
+
const serializer = new xmldom_1.XMLSerializer();
|
|
41
|
+
return serializer.serializeToString(this.xmlDoc);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.XmlParser = XmlParser;
|
|
45
|
+
//# sourceMappingURL=XmlParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XmlParser.js","sourceRoot":"","sources":["../../../../src/utils/lwcparser/xmlParser/XmlParser.ts"],"names":[],"mappings":";;;AAAA,2DAA2D;AAC3D,wDAAwD;AACxD,uDAAuD;AACvD,+DAA+D;AAC/D,sDAAsD;AACtD,4DAA4D;AAC5D,qEAAqE;AACrE,mCAAkD;AAElD,MAAa,SAAS;IAGpB,YAAoB,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QAF7B,WAAM,GAAoB,IAAI,CAAC;QAGrC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,QAAQ;QACd,MAAM,MAAM,GAAG,IAAI,kBAAS,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACnE,CAAC;IAEM,UAAU,CAAC,OAAe,EAAE,QAAgB,CAAC;;QAClD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAExD,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,EAAE;YACxB,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;YAClC,MAAA,YAAY,CAAC,UAAU,0CAAE,WAAW,CAAC,YAAY,CAAC,CAAC;SACpD;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,gCAAgC,OAAO,cAAc,KAAK,GAAG,CAAC,CAAC;SAChF;IACH,CAAC;IAEM,YAAY;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QAED,MAAM,UAAU,GAAG,IAAI,sBAAa,EAAE,CAAC;QACvC,OAAO,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;CACF;AAnCD,8BAmCC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.
|
|
1
|
+
{"version":"1.4.1-dev.0","commands":{"basecommand":{"id":"basecommand","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"}},"args":[]},"omnistudio:migration:info":{"id":"omnistudio:migration:info","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-a] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["sfdx omnistudio:migration:info --targetusername myOrg@example.com --targetdevhubusername devhub@org.com","sfdx omnistudio:migration:info --name myname --targetusername myOrg@example.com"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"name":{"name":"name","type":"option","char":"n","description":"name to print"},"allversions":{"name":"allversions","type":"boolean","char":"a","description":"Migrate all versions of a component","required":false,"allowNo":false}},"args":[{"name":"file"}]},"omnistudio:migration:migrate":{"id":"omnistudio:migration:migrate","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-o <string>] [-a] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=dr","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=ip","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=os","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=fc"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"namespace":{"name":"namespace","type":"option","char":"n","description":"The namespaced of the package"},"only":{"name":"only","type":"option","char":"o","description":"Migrate a single element: osip | fc | dr"},"allversions":{"name":"allversions","type":"boolean","char":"a","description":"Migrate all versions of a component","required":false,"allowNo":false}},"args":[{"name":"file"}]}}}
|
package/package.json
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-omnistudio-migration-tool",
|
|
3
3
|
"description": "This SFDX plugin migrates FlexCard, OmniScript, DataRaptor, and Integration Procedure custom objects to standard objects.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.1-dev.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
+
"@babel/parser": "^7.25.4",
|
|
9
|
+
"@apexdevtools/apex-parser": "^4.1.0",
|
|
8
10
|
"@oclif/command": "^1",
|
|
9
11
|
"@oclif/config": "^1",
|
|
10
12
|
"@oclif/errors": "^1",
|
|
11
13
|
"@salesforce/command": "^4.2.1",
|
|
12
14
|
"@salesforce/core": "^2.37.1",
|
|
15
|
+
"@types/jsdom": "^21.1.7",
|
|
13
16
|
"@types/lodash.chunk": "^4.2.9",
|
|
17
|
+
"cheerio": "^1.0.0",
|
|
18
|
+
"jsdom": "^25.0.0",
|
|
14
19
|
"lodash.chunk": "^4.2.0",
|
|
15
20
|
"open": "^8.4.2",
|
|
16
|
-
"tslib": "^2"
|
|
21
|
+
"tslib": "^2",
|
|
22
|
+
"xmldom": "^0.6.0"
|
|
17
23
|
},
|
|
18
24
|
"devDependencies": {
|
|
25
|
+
"@babel/parser": "^7.25.4",
|
|
19
26
|
"@oclif/dev-cli": "^1",
|
|
20
27
|
"@oclif/plugin-command-snapshot": "^3.3.15",
|
|
21
28
|
"@oclif/plugin-help": "^3",
|
|
@@ -25,10 +32,11 @@
|
|
|
25
32
|
"@salesforce/plugin-command-reference": "^1.4.7",
|
|
26
33
|
"@salesforce/prettier-config": "^0.0.3",
|
|
27
34
|
"@salesforce/ts-sinon": "^1",
|
|
35
|
+
"@types/babel__traverse": "^7.20.6",
|
|
28
36
|
"@types/jsforce": "^1.11.5",
|
|
29
37
|
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
|
30
38
|
"@typescript-eslint/parser": "^4.2.0",
|
|
31
|
-
"chai": "^4.
|
|
39
|
+
"chai": "^4.4.1",
|
|
32
40
|
"eslint": "^7.27.0",
|
|
33
41
|
"eslint-config-oclif": "^3.1",
|
|
34
42
|
"eslint-config-prettier": "^8",
|
|
@@ -45,7 +53,7 @@
|
|
|
45
53
|
"mocha": "^8.4.0",
|
|
46
54
|
"nyc": "^15.1.0",
|
|
47
55
|
"prettier": "^2.8.8",
|
|
48
|
-
"pretty-quick": "^3.1
|
|
56
|
+
"pretty-quick": "^3.3.1",
|
|
49
57
|
"sinon": "10.0.0",
|
|
50
58
|
"ts-node": "^10.9.2",
|
|
51
59
|
"typescript": "^4.9.5"
|
|
@@ -115,7 +123,7 @@
|
|
|
115
123
|
}
|
|
116
124
|
},
|
|
117
125
|
"sfdx": {
|
|
118
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.
|
|
119
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.
|
|
126
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.4.1-dev.0.crt",
|
|
127
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.4.1-dev.0.sig"
|
|
120
128
|
}
|
|
121
129
|
}
|