@salesforce/plugin-omnistudio-migration-tool 1.4.1-dev.21 → 1.4.1-dev.23
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/assess.d.ts +6 -0
- package/lib/commands/omnistudio/migration/assess.js +114 -31
- package/lib/commands/omnistudio/migration/assess.js.map +1 -1
- package/lib/commands/omnistudio/migration/info.d.ts +1 -0
- package/lib/commands/omnistudio/migration/info.js +13 -5
- package/lib/commands/omnistudio/migration/info.js.map +1 -1
- package/lib/commands/omnistudio/migration/migrate.d.ts +3 -1
- package/lib/commands/omnistudio/migration/migrate.js +99 -64
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/migration/base.d.ts +12 -2
- package/lib/migration/base.js +23 -8
- package/lib/migration/base.js.map +1 -1
- package/lib/migration/dataraptor.js +30 -17
- package/lib/migration/dataraptor.js.map +1 -1
- package/lib/migration/flexcard.d.ts +3 -1
- package/lib/migration/flexcard.js +208 -22
- package/lib/migration/flexcard.js.map +1 -1
- package/lib/migration/omniscript.d.ts +2 -1
- package/lib/migration/omniscript.js +36 -13
- package/lib/migration/omniscript.js.map +1 -1
- package/lib/migration/related/ApexMigration.d.ts +8 -3
- package/lib/migration/related/ApexMigration.js +108 -30
- package/lib/migration/related/ApexMigration.js.map +1 -1
- package/lib/migration/related/LwcMigration.js +24 -9
- package/lib/migration/related/LwcMigration.js.map +1 -1
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.d.ts +12 -8
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js +57 -65
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js.map +1 -1
- package/lib/utils/apex/parser/apexparser.d.ts +2 -0
- package/lib/utils/apex/parser/apexparser.js +16 -0
- package/lib/utils/apex/parser/apexparser.js.map +1 -1
- package/lib/utils/constants/stringContants.d.ts +16 -0
- package/lib/utils/constants/stringContants.js +22 -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} +59 -12
- package/lib/utils/file/fileUtil.js.map +1 -0
- package/lib/utils/interfaces.d.ts +29 -1
- package/lib/utils/json/jsonutil.js +1 -0
- package/lib/utils/json/jsonutil.js.map +1 -1
- package/lib/utils/logger/fileLogger.d.ts +7 -0
- package/lib/utils/logger/fileLogger.js +82 -0
- package/lib/utils/logger/fileLogger.js.map +1 -0
- package/lib/utils/logger.d.ts +12 -1
- package/lib/utils/logger.js +67 -1
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.d.ts +4 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js +63 -6
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/FileProcessorFactory.js +1 -1
- package/lib/utils/lwcparser/fileutils/FileProcessorFactory.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/lwcparser/htmlParser/HTMLParser.js +2 -2
- package/lib/utils/lwcparser/htmlParser/HTMLParser.js.map +1 -1
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js +2 -2
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js.map +1 -1
- package/lib/utils/lwcparser/xmlParser/XmlParser.js +2 -2
- package/lib/utils/lwcparser/xmlParser/XmlParser.js.map +1 -1
- package/lib/utils/orgPreferences.d.ts +40 -0
- package/lib/utils/orgPreferences.js +70 -0
- package/lib/utils/orgPreferences.js.map +1 -0
- package/lib/utils/orgUtils/index.d.ts +14 -1
- package/lib/utils/orgUtils/index.js +34 -10
- package/lib/utils/orgUtils/index.js.map +1 -1
- package/lib/utils/reportGenerator/reportInterfaces.d.ts +63 -15
- package/lib/utils/reportGenerator/reportUtil.d.ts +5 -0
- package/lib/utils/reportGenerator/reportUtil.js +36 -0
- package/lib/utils/reportGenerator/reportUtil.js.map +1 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.d.ts +12 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js +87 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/DRAssessmentReporter.d.ts +9 -2
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js +106 -57
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.d.ts +12 -0
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js +104 -0
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/IPAssessmentReporter.d.ts +9 -2
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js +110 -61
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js +141 -0
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/OSAssessmentReporter.d.ts +10 -3
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js +143 -83
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/assessmentReporter.d.ts +12 -11
- package/lib/utils/resultsbuilder/assessmentReporter.js +104 -263
- package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/index.d.ts +11 -8
- package/lib/utils/resultsbuilder/index.js +251 -209
- package/lib/utils/resultsbuilder/index.js.map +1 -1
- package/lib/utils/sfcli/project/sfProject.d.ts +1 -0
- package/lib/utils/sfcli/project/sfProject.js +25 -7
- package/lib/utils/sfcli/project/sfProject.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/lib/utils/templateParser/__tests__/test.d.ts +4 -0
- package/lib/utils/templateParser/__tests__/test.js +104 -0
- package/lib/utils/templateParser/__tests__/test.js.map +1 -0
- package/lib/utils/templateParser/generate.d.ts +17 -0
- package/lib/utils/templateParser/generate.js +30 -0
- package/lib/utils/templateParser/generate.js.map +1 -0
- package/lib/utils/templateParser/model/elementNode.d.ts +81 -0
- package/lib/utils/templateParser/model/elementNode.js +182 -0
- package/lib/utils/templateParser/model/elementNode.js.map +1 -0
- package/lib/utils/templateParser/model/nodeTypes.d.ts +6 -0
- package/lib/utils/templateParser/model/nodeTypes.js +11 -0
- package/lib/utils/templateParser/model/nodeTypes.js.map +1 -0
- package/lib/utils/templateParser/util.d.ts +133 -0
- package/lib/utils/templateParser/util.js +456 -0
- package/lib/utils/templateParser/util.js.map +1 -0
- package/messages/assess.json +62 -1
- package/messages/info.json +5 -1
- package/messages/migrate.json +51 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
- package/lib/utils/file/fileutil.js.map +0 -1
- package/lib/utils/prototypes.js +0 -18
- package/lib/utils/prototypes.js.map +0 -1
- package/lib/utils/reportGenerator/reportGenerator.d.ts +0 -2
- package/lib/utils/reportGenerator/reportGenerator.js +0 -152
- package/lib/utils/reportGenerator/reportGenerator.js.map +0 -1
- /package/lib/utils/{prototypes.d.ts → resultsbuilder/LWCAssessmentReporter.d.ts} +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrgPreferences = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Class to manage OmniStudio organization preferences
|
|
6
|
+
*
|
|
7
|
+
* @class OrgPreferences
|
|
8
|
+
* @description Provides functionality to enable OmniStudio preferences and check rollback flags
|
|
9
|
+
*/
|
|
10
|
+
class OrgPreferences {
|
|
11
|
+
/**
|
|
12
|
+
* Enables the disableRollbackFlagsPref setting in OmniStudio
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
* @static
|
|
16
|
+
* @async
|
|
17
|
+
* @param {Connection} connection - Salesforce connection instance
|
|
18
|
+
* @throws {Error} If enabling the preference fails
|
|
19
|
+
* @returns {Promise<void>}
|
|
20
|
+
*/
|
|
21
|
+
static async enableOmniPreferences(connection) {
|
|
22
|
+
try {
|
|
23
|
+
await connection.metadata.update('OmniStudioSettings', [
|
|
24
|
+
{
|
|
25
|
+
fullName: 'OmniStudio',
|
|
26
|
+
disableRollbackFlagsPref: true,
|
|
27
|
+
},
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
throw new Error(`Failed to enable disableRollbackFlagsPref: ${error instanceof Error ? error.message : String(error)}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Checks which rollback flags are enabled in OmniInteractionConfig
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
* @static
|
|
39
|
+
* @async
|
|
40
|
+
* @param {Connection} connection - Salesforce connection instance
|
|
41
|
+
* @throws {Error} If checking rollback flags fails
|
|
42
|
+
* @returns {Promise<string[]>} Array of enabled rollback flag names
|
|
43
|
+
*/
|
|
44
|
+
static async checkRollbackFlags(connection) {
|
|
45
|
+
try {
|
|
46
|
+
const result = await connection.query(`SELECT DeveloperName, Value FROM OmniInteractionConfig WHERE DeveloperName IN ('${this.ROLLBACK_FLAGS.join("','")}')`);
|
|
47
|
+
const enabledFlags = [];
|
|
48
|
+
for (const record of result.records) {
|
|
49
|
+
if (record.Value === 'true') {
|
|
50
|
+
enabledFlags.push(record.DeveloperName);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return enabledFlags;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
throw new Error(`Failed to check rollback flags: ${error instanceof Error ? error.message : String(error)}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.OrgPreferences = OrgPreferences;
|
|
61
|
+
/**
|
|
62
|
+
* List of rollback flags to check in OmniInteractionConfig
|
|
63
|
+
*
|
|
64
|
+
* @private
|
|
65
|
+
* @static
|
|
66
|
+
* @readonly
|
|
67
|
+
* @type {string[]}
|
|
68
|
+
*/
|
|
69
|
+
OrgPreferences.ROLLBACK_FLAGS = ['RollbackIPChanges', 'RollbackDRChanges', 'RollbackOSChanges'];
|
|
70
|
+
//# sourceMappingURL=orgPreferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orgPreferences.js","sourceRoot":"","sources":["../../src/utils/orgPreferences.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,MAAa,cAAc;IAWzB;;;;;;;;;OASG;IACI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAsB;QAC9D,IAAI;YACF,MAAM,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE;gBACrD;oBACE,QAAQ,EAAE,YAAY;oBACtB,wBAAwB,EAAE,IAAI;iBACD;aAChC,CAAC,CAAC;SACJ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CACb,8CAA8C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACvG,CAAC;SACH;IACH,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,UAAsB;QAC3D,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,CACnC,mFAAmF,IAAI,CAAC,cAAc,CAAC,IAAI,CACzG,KAAK,CACN,IAAI,CACN,CAAC;YACF,MAAM,YAAY,GAAa,EAAE,CAAC;YAClC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;gBACnC,IAAI,MAAM,CAAC,KAAK,KAAK,MAAM,EAAE;oBAC3B,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;iBACzC;aACF;YACD,OAAO,YAAY,CAAC;SACrB;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SAC9G;IACH,CAAC;;AA/DH,wCAgEC;AA/DC;;;;;;;GAOG;AACqB,6BAAc,GAAa,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
|
+
interface OrgDetails {
|
|
3
|
+
Name: string;
|
|
4
|
+
Id: string;
|
|
5
|
+
}
|
|
2
6
|
export interface OmnistudioOrgDetails {
|
|
3
|
-
packageDetails: PackageDetail
|
|
7
|
+
packageDetails: PackageDetail;
|
|
4
8
|
omniStudioOrgPermissionEnabled: boolean;
|
|
9
|
+
orgDetails: OrgDetails;
|
|
10
|
+
dataModel: string;
|
|
11
|
+
hasValidNamespace: boolean;
|
|
12
|
+
rollbackFlags?: string[];
|
|
5
13
|
}
|
|
6
14
|
export interface PackageDetail {
|
|
7
15
|
version: string;
|
|
@@ -15,6 +23,10 @@ export declare class OrgUtils {
|
|
|
15
23
|
private static readonly namespaces;
|
|
16
24
|
private static readonly fields;
|
|
17
25
|
private static readonly objectName;
|
|
26
|
+
private static readonly orgFields;
|
|
27
|
+
private static readonly orgObjectName;
|
|
28
|
+
private static readonly standardDataModel;
|
|
29
|
+
private static readonly customDataModel;
|
|
18
30
|
/**
|
|
19
31
|
* Fetches package details (version and namespace) for specific installed packages.
|
|
20
32
|
*
|
|
@@ -29,3 +41,4 @@ export declare class OrgUtils {
|
|
|
29
41
|
*/
|
|
30
42
|
static isOmniStudioOrgPermissionEnabled(connection: Connection, namespace: string): Promise<boolean>;
|
|
31
43
|
}
|
|
44
|
+
export {};
|
|
@@ -11,21 +11,39 @@ class OrgUtils {
|
|
|
11
11
|
* @returns Promise resolving to an array of PackageDetail objects
|
|
12
12
|
*/
|
|
13
13
|
static async getOrgDetails(connection, namespace) {
|
|
14
|
-
//Execute apex rest resource to get omnistudio org permission
|
|
15
|
-
const omniStudioOrgPermissionEnabled = await this.isOmniStudioOrgPermissionEnabled(connection, namespace);
|
|
16
14
|
// Query all installed packages and cast the result to InstalledPackage[]
|
|
17
15
|
const allInstalledPackages = (await query_1.QueryTools.queryAll(connection, '', this.objectName, this.fields));
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
let hasValidNamespace = true;
|
|
17
|
+
const orgDetails = (await query_1.QueryTools.queryAll(connection, '', this.orgObjectName, this.orgFields));
|
|
18
|
+
let packageDetails = {
|
|
19
|
+
version: '',
|
|
20
|
+
namespace: '',
|
|
21
|
+
};
|
|
22
|
+
for (const pkg of allInstalledPackages) {
|
|
23
|
+
if (namespace && namespace === pkg.NamespacePrefix) {
|
|
24
|
+
packageDetails.version = `${pkg.MajorVersion}.${pkg.MinorVersion}`;
|
|
25
|
+
packageDetails.namespace = pkg.NamespacePrefix;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (packageDetails.namespace === '') {
|
|
30
|
+
hasValidNamespace = false;
|
|
31
|
+
for (const pkg of allInstalledPackages) {
|
|
32
|
+
if ((namespace && namespace === pkg.NamespacePrefix) || this.namespaces.has(pkg.NamespacePrefix)) {
|
|
33
|
+
packageDetails.version = `${pkg.MajorVersion}.${pkg.MinorVersion}`;
|
|
34
|
+
packageDetails.namespace = pkg.NamespacePrefix;
|
|
35
|
+
break; // Exit loop after first match
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//Execute apex rest resource to get omnistudio org permission
|
|
40
|
+
const omniStudioOrgPermissionEnabled = await this.isOmniStudioOrgPermissionEnabled(connection, packageDetails.namespace);
|
|
26
41
|
return {
|
|
27
42
|
packageDetails: packageDetails,
|
|
28
43
|
omniStudioOrgPermissionEnabled: omniStudioOrgPermissionEnabled,
|
|
44
|
+
orgDetails: orgDetails[0],
|
|
45
|
+
dataModel: omniStudioOrgPermissionEnabled ? this.standardDataModel : this.customDataModel,
|
|
46
|
+
hasValidNamespace: hasValidNamespace,
|
|
29
47
|
};
|
|
30
48
|
}
|
|
31
49
|
/** *
|
|
@@ -282,4 +300,10 @@ OrgUtils.namespaces = new Set([
|
|
|
282
300
|
OrgUtils.fields = ['MajorVersion', 'MinorVersion', 'NamespacePrefix', 'Name'];
|
|
283
301
|
// Define the object name for querying installed packages
|
|
284
302
|
OrgUtils.objectName = 'Publisher';
|
|
303
|
+
// Define the fields to retrieve from the Organization object
|
|
304
|
+
OrgUtils.orgFields = ['Name'];
|
|
305
|
+
// Define the object name for querying installed packages
|
|
306
|
+
OrgUtils.orgObjectName = 'Organization';
|
|
307
|
+
OrgUtils.standardDataModel = 'Standard';
|
|
308
|
+
OrgUtils.customDataModel = 'Custom';
|
|
285
309
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/orgUtils/index.ts"],"names":[],"mappings":";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A6D;AACrC,kBAAS,GAAG,CAAC,MAAM,CAAC,CAAC;AAE7C,yDAAyD;AACjC,sBAAa,GAAG,cAAc,CAAC;AAE/B,0BAAiB,GAAG,UAAU,CAAC;AAC/B,wBAAe,GAAG,QAAQ,CAAC"}
|
|
@@ -1,22 +1,70 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export type CTASummary = {
|
|
2
|
+
name: string;
|
|
3
|
+
message: string;
|
|
4
|
+
link: string;
|
|
5
|
+
};
|
|
6
|
+
export interface OrgParam {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
namespace: string;
|
|
10
|
+
dataModel: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SummaryItemParam {
|
|
13
|
+
name: string;
|
|
14
|
+
total: number;
|
|
15
|
+
data: SummaryItemDetailParam[];
|
|
16
|
+
file: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SummaryItemDetailParam {
|
|
19
|
+
name: string;
|
|
20
|
+
count: number;
|
|
21
|
+
cssClass: string;
|
|
7
22
|
}
|
|
8
|
-
export interface
|
|
23
|
+
export interface DashboardParam {
|
|
24
|
+
title: string;
|
|
25
|
+
heading: string;
|
|
26
|
+
org: OrgParam;
|
|
27
|
+
assessmentDate: string;
|
|
28
|
+
summaryItems: SummaryItemParam[];
|
|
29
|
+
}
|
|
30
|
+
export interface ReportDataParam {
|
|
31
|
+
title: string | string[];
|
|
32
|
+
searchable: boolean;
|
|
9
33
|
key: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
34
|
+
value: string;
|
|
35
|
+
rowspan: number;
|
|
36
|
+
colspan: number;
|
|
37
|
+
isHref: boolean;
|
|
38
|
+
uri?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ReportRowParam {
|
|
41
|
+
data: ReportDataParam[];
|
|
42
|
+
rowId: string;
|
|
13
43
|
}
|
|
14
|
-
export interface
|
|
44
|
+
export interface ReportHeaderParam {
|
|
45
|
+
name: string;
|
|
46
|
+
colspan: number;
|
|
47
|
+
rowspan: number;
|
|
48
|
+
}
|
|
49
|
+
export interface ReportHeaderGroupParam {
|
|
50
|
+
header: ReportHeaderParam[];
|
|
51
|
+
}
|
|
52
|
+
export interface FilterParam {
|
|
15
53
|
label: string;
|
|
16
|
-
key: string;
|
|
17
|
-
filterOptions: string[];
|
|
18
54
|
}
|
|
19
|
-
export interface
|
|
55
|
+
export interface FilterGroupParam {
|
|
56
|
+
label: string;
|
|
20
57
|
key: string;
|
|
21
|
-
|
|
58
|
+
filters: FilterParam[];
|
|
59
|
+
}
|
|
60
|
+
export interface ReportParam {
|
|
61
|
+
title: string;
|
|
62
|
+
heading: string;
|
|
63
|
+
org: OrgParam;
|
|
64
|
+
assessmentDate: string;
|
|
65
|
+
total: number;
|
|
66
|
+
filterGroups: FilterGroupParam[];
|
|
67
|
+
headerGroups: ReportHeaderGroupParam[];
|
|
68
|
+
rows: ReportRowParam[];
|
|
69
|
+
rollbackFlags?: string[];
|
|
22
70
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OmnistudioOrgDetails } from '../orgUtils';
|
|
2
|
+
import { FilterGroupParam, OrgParam, ReportDataParam } from './reportInterfaces';
|
|
3
|
+
export declare function createRowDataParam(key: string, value: string, searchable: boolean, rowspan: number, colspan: number, isHref: boolean, uri?: string, title?: string | string[]): ReportDataParam;
|
|
4
|
+
export declare function getOrgDetailsForReport(omnistudioOrgDetails: OmnistudioOrgDetails): OrgParam;
|
|
5
|
+
export declare function createFilterGroupParam(label: string, key: string, filters: string[]): FilterGroupParam;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFilterGroupParam = exports.getOrgDetailsForReport = exports.createRowDataParam = void 0;
|
|
4
|
+
function createRowDataParam(key, value, searchable, rowspan, colspan, isHref, uri, title) {
|
|
5
|
+
return {
|
|
6
|
+
key,
|
|
7
|
+
value,
|
|
8
|
+
title: title || (value === null || value === void 0 ? void 0 : value.toString()) || '',
|
|
9
|
+
searchable,
|
|
10
|
+
rowspan,
|
|
11
|
+
colspan,
|
|
12
|
+
isHref,
|
|
13
|
+
uri,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.createRowDataParam = createRowDataParam;
|
|
17
|
+
function getOrgDetailsForReport(omnistudioOrgDetails) {
|
|
18
|
+
return {
|
|
19
|
+
name: omnistudioOrgDetails.orgDetails.Name,
|
|
20
|
+
id: omnistudioOrgDetails.orgDetails.Id,
|
|
21
|
+
namespace: omnistudioOrgDetails.packageDetails.namespace,
|
|
22
|
+
dataModel: omnistudioOrgDetails.dataModel,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.getOrgDetailsForReport = getOrgDetailsForReport;
|
|
26
|
+
function createFilterGroupParam(label, key, filters) {
|
|
27
|
+
return {
|
|
28
|
+
label,
|
|
29
|
+
key,
|
|
30
|
+
filters: filters.map((filter) => ({
|
|
31
|
+
label: filter,
|
|
32
|
+
})),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.createFilterGroupParam = createFilterGroupParam;
|
|
36
|
+
//# sourceMappingURL=reportUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportUtil.js","sourceRoot":"","sources":["../../../src/utils/reportGenerator/reportUtil.ts"],"names":[],"mappings":";;;AAGA,SAAgB,kBAAkB,CAChC,GAAW,EACX,KAAa,EACb,UAAmB,EACnB,OAAe,EACf,OAAe,EACf,MAAe,EACf,GAAY,EACZ,KAAyB;IAEzB,OAAO;QACL,GAAG;QACH,KAAK;QACL,KAAK,EAAE,KAAK,KAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,CAAA,IAAI,EAAE;QACvC,UAAU;QACV,OAAO;QACP,OAAO;QACP,MAAM;QACN,GAAG;KACJ,CAAC;AACJ,CAAC;AApBD,gDAoBC;AAED,SAAgB,sBAAsB,CAAC,oBAA0C;IAC/E,OAAO;QACL,IAAI,EAAE,oBAAoB,CAAC,UAAU,CAAC,IAAI;QAC1C,EAAE,EAAE,oBAAoB,CAAC,UAAU,CAAC,EAAE;QACtC,SAAS,EAAE,oBAAoB,CAAC,cAAc,CAAC,SAAS;QACxD,SAAS,EAAE,oBAAoB,CAAC,SAAS;KAC1C,CAAC;AACJ,CAAC;AAPD,wDAOC;AAED,SAAgB,sBAAsB,CAAC,KAAa,EAAE,GAAW,EAAE,OAAiB;IAClF,OAAO;QACL,KAAK;QACL,GAAG;QACH,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAChC,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AARD,wDAQC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApexAssessmentInfo } from '../interfaces';
|
|
2
|
+
import { OmnistudioOrgDetails } from '../orgUtils';
|
|
3
|
+
import { ReportParam, SummaryItemDetailParam } from '../reportGenerator/reportInterfaces';
|
|
4
|
+
export declare class ApexAssessmentReporter {
|
|
5
|
+
private static rowId;
|
|
6
|
+
private static rowIdPrefix;
|
|
7
|
+
static getApexAssessmentData(apexAssessmentInfos: ApexAssessmentInfo[], omnistudioOrgDetails: OmnistudioOrgDetails): ReportParam;
|
|
8
|
+
static getSummaryData(apexAssessmentInfos: ApexAssessmentInfo[]): SummaryItemDetailParam[];
|
|
9
|
+
private static getRowsForReport;
|
|
10
|
+
private static getFilterGroupsForReport;
|
|
11
|
+
private static getHeaderGroupsForReport;
|
|
12
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApexAssessmentReporter = void 0;
|
|
4
|
+
const reportUtil_1 = require("../reportGenerator/reportUtil");
|
|
5
|
+
class ApexAssessmentReporter {
|
|
6
|
+
static getApexAssessmentData(apexAssessmentInfos, omnistudioOrgDetails) {
|
|
7
|
+
return {
|
|
8
|
+
title: 'Apex Migration Assessment',
|
|
9
|
+
heading: 'Apex',
|
|
10
|
+
org: (0, reportUtil_1.getOrgDetailsForReport)(omnistudioOrgDetails),
|
|
11
|
+
assessmentDate: new Date().toString(),
|
|
12
|
+
total: (apexAssessmentInfos === null || apexAssessmentInfos === void 0 ? void 0 : apexAssessmentInfos.length) || 0,
|
|
13
|
+
filterGroups: this.getFilterGroupsForReport(apexAssessmentInfos),
|
|
14
|
+
headerGroups: this.getHeaderGroupsForReport(),
|
|
15
|
+
rows: this.getRowsForReport(apexAssessmentInfos),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static getSummaryData(apexAssessmentInfos) {
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
name: 'Can be Automated',
|
|
22
|
+
count: apexAssessmentInfos.filter((apexAssessmentInfo) => !apexAssessmentInfo.warnings || apexAssessmentInfo.warnings.length === 0).length,
|
|
23
|
+
cssClass: 'text-success',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Has Warnings',
|
|
27
|
+
count: apexAssessmentInfos.filter((info) => info.warnings && info.warnings.length > 0).length,
|
|
28
|
+
cssClass: 'text-warning',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
static getRowsForReport(apexAssessmentInfos) {
|
|
33
|
+
return apexAssessmentInfos.map((apexAssessmentInfo) => ({
|
|
34
|
+
rowId: `${this.rowIdPrefix}${this.rowId++}`,
|
|
35
|
+
data: [
|
|
36
|
+
(0, reportUtil_1.createRowDataParam)('name', apexAssessmentInfo.name, true, 1, 1, false),
|
|
37
|
+
(0, reportUtil_1.createRowDataParam)('fileReference', apexAssessmentInfo.path, false, 1, 1, false),
|
|
38
|
+
(0, reportUtil_1.createRowDataParam)('diff', apexAssessmentInfo.diff, false, 1, 1, false),
|
|
39
|
+
(0, reportUtil_1.createRowDataParam)('comments', apexAssessmentInfo.infos ? apexAssessmentInfo.infos.join(', ') : '', false, 1, 1, false, undefined, apexAssessmentInfo.infos),
|
|
40
|
+
(0, reportUtil_1.createRowDataParam)('errors', apexAssessmentInfo.warnings ? apexAssessmentInfo.warnings.join(', ') : '', false, 1, 1, false, undefined, apexAssessmentInfo.warnings),
|
|
41
|
+
],
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
static getFilterGroupsForReport(apexAssessmentInfos) {
|
|
45
|
+
return [
|
|
46
|
+
(0, reportUtil_1.createFilterGroupParam)('Filter By Comments', 'comments', Array.from(new Set(apexAssessmentInfos.map((row) => row.infos.join(', '))))),
|
|
47
|
+
(0, reportUtil_1.createFilterGroupParam)('Filter By Errors', 'errors', Array.from(new Set(apexAssessmentInfos.map((row) => row.warnings.join(', '))))),
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
static getHeaderGroupsForReport() {
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
header: [
|
|
54
|
+
{
|
|
55
|
+
name: 'Name',
|
|
56
|
+
colspan: 1,
|
|
57
|
+
rowspan: 1,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'File Reference',
|
|
61
|
+
colspan: 1,
|
|
62
|
+
rowspan: 1,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Diff',
|
|
66
|
+
colspan: 1,
|
|
67
|
+
rowspan: 1,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Comments',
|
|
71
|
+
colspan: 1,
|
|
72
|
+
rowspan: 1,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Errors',
|
|
76
|
+
colspan: 1,
|
|
77
|
+
rowspan: 1,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.ApexAssessmentReporter = ApexAssessmentReporter;
|
|
85
|
+
ApexAssessmentReporter.rowId = 0;
|
|
86
|
+
ApexAssessmentReporter.rowIdPrefix = 'apex-row-data-';
|
|
87
|
+
//# sourceMappingURL=ApexAssessmentReporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApexAssessmentReporter.js","sourceRoot":"","sources":["../../../src/utils/resultsbuilder/ApexAssessmentReporter.ts"],"names":[],"mappings":";;;AASA,8DAAmH;AAEnH,MAAa,sBAAsB;IAG1B,MAAM,CAAC,qBAAqB,CACjC,mBAAyC,EACzC,oBAA0C;QAE1C,OAAO;YACL,KAAK,EAAE,2BAA2B;YAClC,OAAO,EAAE,MAAM;YACf,GAAG,EAAE,IAAA,mCAAsB,EAAC,oBAAoB,CAAC;YACjD,cAAc,EAAE,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE;YACrC,KAAK,EAAE,CAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,MAAM,KAAI,CAAC;YACvC,YAAY,EAAE,IAAI,CAAC,wBAAwB,CAAC,mBAAmB,CAAC;YAChE,YAAY,EAAE,IAAI,CAAC,wBAAwB,EAAE;YAC7C,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;SACjD,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,mBAAyC;QACpE,OAAO;YACL;gBACE,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAC/B,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,QAAQ,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CACjG,CAAC,MAAM;gBACR,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,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ils';
|
|
3
|
+
import { ReportParam, SummaryItemDetailParam } from '../reportGenerator/reportInterfaces';
|
|
2
4
|
export declare class DRAssessmentReporter {
|
|
3
|
-
static
|
|
4
|
-
private static
|
|
5
|
+
private static rowId;
|
|
6
|
+
private static rowIdPrefix;
|
|
7
|
+
static getDatamapperAssessmentData(dataRaptorAssessmentInfos: DataRaptorAssessmentInfo[], instanceUrl: string, omnistudioOrgDetails: OmnistudioOrgDetails): ReportParam;
|
|
8
|
+
static getSummaryData(dataRaptorAssessmentInfos: DataRaptorAssessmentInfo[]): SummaryItemDetailParam[];
|
|
9
|
+
private static getFilterGroupsForReport;
|
|
10
|
+
private static getHeaderGroupsForReport;
|
|
11
|
+
private static getRowsForReport;
|
|
5
12
|
}
|
|
@@ -1,66 +1,115 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DRAssessmentReporter = void 0;
|
|
4
|
-
const
|
|
4
|
+
const reportUtil_1 = require("../reportGenerator/reportUtil");
|
|
5
5
|
class DRAssessmentReporter {
|
|
6
|
-
static
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
${reportingHelper_1.reportingHelper.convertToBuletedList(dr.warnings)}
|
|
21
|
-
</td>
|
|
22
|
-
<td style="word-wrap: break-word; white-space: normal; max-width: 200px;">
|
|
23
|
-
<div> ${reportingHelper_1.reportingHelper.decorateChanges(dr.formulaChanges, 'Formula')} </div>
|
|
24
|
-
</td>
|
|
25
|
-
<td style="word-wrap: break-word; white-space: normal; max-width: 60%; overflow: hidden;">
|
|
26
|
-
${reportingHelper_1.reportingHelper.convertToBuletedList(dr.apexDependencies)}
|
|
27
|
-
</td>
|
|
28
|
-
|
|
29
|
-
</tr>`;
|
|
30
|
-
tableBody += row;
|
|
31
|
-
}
|
|
32
|
-
return DRAssessmentReporter.getDRAssessmentReport(tableBody);
|
|
6
|
+
static getDatamapperAssessmentData(dataRaptorAssessmentInfos, instanceUrl, omnistudioOrgDetails) {
|
|
7
|
+
return {
|
|
8
|
+
title: 'Data Mapper Migration Assessment',
|
|
9
|
+
heading: 'Data Mapper',
|
|
10
|
+
org: (0, reportUtil_1.getOrgDetailsForReport)(omnistudioOrgDetails),
|
|
11
|
+
assessmentDate: new Date().toString(),
|
|
12
|
+
total: (dataRaptorAssessmentInfos === null || dataRaptorAssessmentInfos === void 0 ? void 0 : dataRaptorAssessmentInfos.length) || 0,
|
|
13
|
+
filterGroups: this.getFilterGroupsForReport(),
|
|
14
|
+
headerGroups: this.getHeaderGroupsForReport(),
|
|
15
|
+
rows: this.getRowsForReport(dataRaptorAssessmentInfos, instanceUrl),
|
|
16
|
+
rollbackFlags: (omnistudioOrgDetails.rollbackFlags || []).includes('RollbackDRChanges')
|
|
17
|
+
? ['RollbackDRChanges']
|
|
18
|
+
: undefined,
|
|
19
|
+
};
|
|
33
20
|
}
|
|
34
|
-
static
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
21
|
+
static getSummaryData(dataRaptorAssessmentInfos) {
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
name: 'Can be Automated',
|
|
25
|
+
count: dataRaptorAssessmentInfos.filter((dataRaptorAssessmentInfo) => !dataRaptorAssessmentInfo.warnings || dataRaptorAssessmentInfo.warnings.length === 0).length,
|
|
26
|
+
cssClass: 'text-success',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Has Warnings',
|
|
30
|
+
count: dataRaptorAssessmentInfos.filter((dataRaptorAssessmentInfo) => dataRaptorAssessmentInfo.warnings && dataRaptorAssessmentInfo.warnings.length > 0).length,
|
|
31
|
+
cssClass: 'text-warning',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
static getFilterGroupsForReport() {
|
|
36
|
+
return [(0, reportUtil_1.createFilterGroupParam)('Filter By Type', 'type', ['Extract', 'Transform', 'Load', 'Turbo Extract'])];
|
|
37
|
+
}
|
|
38
|
+
static getHeaderGroupsForReport() {
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
header: [
|
|
42
|
+
{
|
|
43
|
+
name: 'In Package',
|
|
44
|
+
colspan: 2,
|
|
45
|
+
rowspan: 1,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'In Core',
|
|
49
|
+
colspan: 1,
|
|
50
|
+
rowspan: 1,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Type',
|
|
54
|
+
colspan: 1,
|
|
55
|
+
rowspan: 2,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'Summary',
|
|
59
|
+
colspan: 1,
|
|
60
|
+
rowspan: 2,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Custom Function Dependencies',
|
|
64
|
+
colspan: 1,
|
|
65
|
+
rowspan: 2,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Apex Dependencies',
|
|
69
|
+
colspan: 1,
|
|
70
|
+
rowspan: 2,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
header: [
|
|
76
|
+
{
|
|
77
|
+
name: 'Name',
|
|
78
|
+
colspan: 1,
|
|
79
|
+
rowspan: 1,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Record ID',
|
|
83
|
+
colspan: 1,
|
|
84
|
+
rowspan: 1,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Name',
|
|
88
|
+
colspan: 1,
|
|
89
|
+
rowspan: 1,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
static getRowsForReport(dataRaptorAssessmentInfos, instanceUrl) {
|
|
96
|
+
return dataRaptorAssessmentInfos.map((dataRaptorAssessmentInfo) => ({
|
|
97
|
+
rowId: `${this.rowIdPrefix}${this.rowId++}`,
|
|
98
|
+
data: [
|
|
99
|
+
(0, reportUtil_1.createRowDataParam)('name', dataRaptorAssessmentInfo.oldName, true, 1, 1, false),
|
|
100
|
+
(0, reportUtil_1.createRowDataParam)('id', dataRaptorAssessmentInfo.id, false, 1, 1, true, `${instanceUrl}/${dataRaptorAssessmentInfo.id}`),
|
|
101
|
+
(0, reportUtil_1.createRowDataParam)('newName', dataRaptorAssessmentInfo.name, false, 1, 1, false),
|
|
102
|
+
(0, reportUtil_1.createRowDataParam)('type', dataRaptorAssessmentInfo.type, false, 1, 1, false),
|
|
103
|
+
(0, reportUtil_1.createRowDataParam)('summary', dataRaptorAssessmentInfo.infos ? dataRaptorAssessmentInfo.infos.join(', ') : '', false, 1, 1, false, undefined, dataRaptorAssessmentInfo.infos),
|
|
104
|
+
(0, reportUtil_1.createRowDataParam)('customFunctionDependencies', dataRaptorAssessmentInfo.formulaChanges
|
|
105
|
+
? dataRaptorAssessmentInfo.formulaChanges.map((change) => `${change.old} -> ${change.new}`).join(', ')
|
|
106
|
+
: '', false, 1, 1, false, undefined, dataRaptorAssessmentInfo.formulaChanges.map((change) => `${change.old} -> ${change.new}`)),
|
|
107
|
+
(0, reportUtil_1.createRowDataParam)('apexDependencies', dataRaptorAssessmentInfo.apexDependencies ? dataRaptorAssessmentInfo.apexDependencies.join(', ') : '', false, 1, 1, false, undefined, dataRaptorAssessmentInfo.apexDependencies),
|
|
108
|
+
],
|
|
109
|
+
}));
|
|
63
110
|
}
|
|
64
111
|
}
|
|
65
112
|
exports.DRAssessmentReporter = DRAssessmentReporter;
|
|
113
|
+
DRAssessmentReporter.rowId = 0;
|
|
114
|
+
DRAssessmentReporter.rowIdPrefix = 'dr-row-data-';
|
|
66
115
|
//# sourceMappingURL=DRAssessmentReporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DRAssessmentReporter.js","sourceRoot":"","sources":["../../../src/utils/resultsbuilder/DRAssessmentReporter.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DRAssessmentReporter.js","sourceRoot":"","sources":["../../../src/utils/resultsbuilder/DRAssessmentReporter.ts"],"names":[],"mappings":";;;AASA,8DAAmH;AAEnH,MAAa,oBAAoB;IAGxB,MAAM,CAAC,2BAA2B,CACvC,yBAAqD,EACrD,WAAmB,EACnB,oBAA0C;QAE1C,OAAO;YACL,KAAK,EAAE,kCAAkC;YACzC,OAAO,EAAE,aAAa;YACtB,GAAG,EAAE,IAAA,mCAAsB,EAAC,oBAAoB,CAAC;YACjD,cAAc,EAAE,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE;YACrC,KAAK,EAAE,CAAA,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,MAAM,KAAI,CAAC;YAC7C,YAAY,EAAE,IAAI,CAAC,wBAAwB,EAAE;YAC7C,YAAY,EAAE,IAAI,CAAC,wBAAwB,EAAE;YAC7C,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,EAAE,WAAW,CAAC;YACnE,aAAa,EAAE,CAAC,oBAAoB,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;gBACrF,CAAC,CAAC,CAAC,mBAAmB,CAAC;gBACvB,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;IAEM,MAAM,C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