@salesforce/plugin-omnistudio-migration-tool 2.0.0-rc.60 → 2.0.0-rc.61
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/assess.d.ts +1 -0
- package/lib/commands/omnistudio/migration/assess.js +27 -0
- package/lib/commands/omnistudio/migration/assess.js.map +1 -1
- package/lib/commands/omnistudio/migration/clean.js +4 -2
- package/lib/commands/omnistudio/migration/clean.js.map +1 -1
- package/lib/commands/omnistudio/migration/migrate.js +11 -0
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/javascripts/reportGeneratorUtility.js +181 -0
- package/lib/migration/ApexNamespaceRegistry.d.ts +49 -0
- package/lib/migration/ApexNamespaceRegistry.js +130 -0
- package/lib/migration/ApexNamespaceRegistry.js.map +1 -0
- package/lib/migration/CustomCssRegistry.d.ts +117 -0
- package/lib/migration/CustomCssRegistry.js +234 -0
- package/lib/migration/CustomCssRegistry.js.map +1 -0
- package/lib/migration/base.js +1 -1
- package/lib/migration/base.js.map +1 -1
- package/lib/migration/customLabels.js +14 -3
- package/lib/migration/customLabels.js.map +1 -1
- package/lib/migration/flexcard.d.ts +98 -0
- package/lib/migration/flexcard.js +448 -15
- package/lib/migration/flexcard.js.map +1 -1
- package/lib/migration/interfaces.d.ts +1 -0
- package/lib/migration/interfaces.js.map +1 -1
- package/lib/migration/omniscript.d.ts +42 -1
- package/lib/migration/omniscript.js +249 -6
- package/lib/migration/omniscript.js.map +1 -1
- package/lib/migration/omniscriptInstance.d.ts +90 -0
- package/lib/migration/omniscriptInstance.js +755 -0
- package/lib/migration/omniscriptInstance.js.map +1 -0
- package/lib/styles/reportGenerator.css +25 -0
- package/lib/templates/assessmentReport.template +8 -0
- package/lib/templates/migrationReport.template +8 -0
- package/lib/utils/constants/documentRegistry.d.ts +6 -0
- package/lib/utils/constants/documentRegistry.js +6 -0
- package/lib/utils/constants/documentRegistry.js.map +1 -1
- package/lib/utils/constants/stringContants.d.ts +28 -5
- package/lib/utils/constants/stringContants.js +30 -5
- package/lib/utils/constants/stringContants.js.map +1 -1
- package/lib/utils/customLabels.d.ts +1 -0
- package/lib/utils/customLabels.js +3 -0
- package/lib/utils/customLabels.js.map +1 -1
- package/lib/utils/interfaces.d.ts +19 -0
- package/lib/utils/query/index.d.ts +1 -0
- package/lib/utils/query/index.js +17 -0
- package/lib/utils/query/index.js.map +1 -1
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js +4 -0
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.d.ts +12 -0
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js +109 -0
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/assessmentReporter.js +18 -2
- package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.d.ts +11 -1
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js +64 -1
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js.map +1 -1
- package/lib/utils/resultsbuilder/index.d.ts +4 -0
- package/lib/utils/resultsbuilder/index.js +61 -0
- package/lib/utils/resultsbuilder/index.js.map +1 -1
- package/lib/utils/stringUtils.d.ts +15 -0
- package/lib/utils/stringUtils.js +37 -0
- package/lib/utils/stringUtils.js.map +1 -1
- package/messages/assess.json +23 -2
- package/messages/migrate.json +29 -3
- package/oclif.manifest.json +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApexNamespaceRegistry = exports.ApexResolveStatus = void 0;
|
|
4
|
+
const logger_1 = require("../utils/logger");
|
|
5
|
+
exports.ApexResolveStatus = {
|
|
6
|
+
LOCAL: 'local',
|
|
7
|
+
NAMESPACED: 'namespaced',
|
|
8
|
+
NOT_FOUND: 'not_found',
|
|
9
|
+
SKIP: 'skip',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Singleton registry that pre-loads Apex class names at startup.
|
|
13
|
+
* Stores two sets: local classes (no namespace) and namespaced classes (matching the selected package namespace).
|
|
14
|
+
* All lookups after initialization are synchronous.
|
|
15
|
+
*/
|
|
16
|
+
class ApexNamespaceRegistry {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.localClasses = new Set();
|
|
19
|
+
this.namespacedClasses = new Set();
|
|
20
|
+
this.namespace = '';
|
|
21
|
+
this.initialized = false;
|
|
22
|
+
}
|
|
23
|
+
static getInstance() {
|
|
24
|
+
if (!ApexNamespaceRegistry.instance) {
|
|
25
|
+
ApexNamespaceRegistry.instance = new ApexNamespaceRegistry();
|
|
26
|
+
}
|
|
27
|
+
return ApexNamespaceRegistry.instance;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Pre-loads all Apex classes from the org into two buckets:
|
|
31
|
+
* - localClasses: classes with no namespace (NamespacePrefix is null/empty)
|
|
32
|
+
* - namespacedClasses: classes matching the selected package namespace
|
|
33
|
+
*
|
|
34
|
+
* Call once before assessment/migration begins.
|
|
35
|
+
*/
|
|
36
|
+
async initialize(connection, namespace) {
|
|
37
|
+
if (this.initialized)
|
|
38
|
+
return;
|
|
39
|
+
this.namespace = namespace;
|
|
40
|
+
try {
|
|
41
|
+
const localQuery = 'SELECT Name FROM ApexClass WHERE NamespacePrefix = null';
|
|
42
|
+
let result = await connection.tooling.query(localQuery);
|
|
43
|
+
if (result && result.records) {
|
|
44
|
+
result.records.forEach((r) => this.localClasses.add(r.Name.toLowerCase()));
|
|
45
|
+
while (!result.done && result.nextRecordsUrl) {
|
|
46
|
+
result = await connection.tooling.queryMore(result.nextRecordsUrl);
|
|
47
|
+
if (result && result.records) {
|
|
48
|
+
result.records.forEach((r) => this.localClasses.add(r.Name.toLowerCase()));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
logger_1.Logger.logVerbose(`ApexNamespaceRegistry: Loaded ${this.localClasses.size} local Apex classes`);
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
logger_1.Logger.logVerbose(`ApexNamespaceRegistry: Error loading local classes: ${err.message}`);
|
|
56
|
+
}
|
|
57
|
+
if (namespace) {
|
|
58
|
+
try {
|
|
59
|
+
const nsQuery = `SELECT Name FROM ApexClass WHERE NamespacePrefix = '${namespace}'`;
|
|
60
|
+
let result = await connection.tooling.query(nsQuery);
|
|
61
|
+
if (result && result.records) {
|
|
62
|
+
result.records.forEach((r) => this.namespacedClasses.add(r.Name.toLowerCase()));
|
|
63
|
+
while (!result.done && result.nextRecordsUrl) {
|
|
64
|
+
result = await connection.tooling.queryMore(result.nextRecordsUrl);
|
|
65
|
+
if (result && result.records) {
|
|
66
|
+
result.records.forEach((r) => this.namespacedClasses.add(r.Name.toLowerCase()));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
logger_1.Logger.logVerbose(`ApexNamespaceRegistry: Loaded ${this.namespacedClasses.size} Apex classes for namespace "${namespace}"`);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
logger_1.Logger.logVerbose(`ApexNamespaceRegistry: Error loading namespaced classes: ${err.message}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
this.initialized = true;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Checks a className and returns its resolution status:
|
|
80
|
+
* - 'local': exists without namespace, no change needed
|
|
81
|
+
* - 'namespaced': exists under the package namespace, needs prefix
|
|
82
|
+
* - 'not_found': does not exist in either set
|
|
83
|
+
* - 'skip': invalid class name or already qualified
|
|
84
|
+
*/
|
|
85
|
+
resolveStatus(className) {
|
|
86
|
+
if (!className || className.includes('.'))
|
|
87
|
+
return exports.ApexResolveStatus.SKIP;
|
|
88
|
+
if (!ApexNamespaceRegistry.VALID_APEX_CLASS_NAME.test(className))
|
|
89
|
+
return exports.ApexResolveStatus.SKIP;
|
|
90
|
+
const key = className.toLowerCase();
|
|
91
|
+
if (this.localClasses.has(key))
|
|
92
|
+
return exports.ApexResolveStatus.LOCAL;
|
|
93
|
+
if (this.namespacedClasses.has(key))
|
|
94
|
+
return exports.ApexResolveStatus.NAMESPACED;
|
|
95
|
+
return exports.ApexResolveStatus.NOT_FOUND;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns "namespace.className" if the class belongs to the package namespace,
|
|
99
|
+
* or the original className otherwise.
|
|
100
|
+
*/
|
|
101
|
+
getQualifiedClassName(className) {
|
|
102
|
+
if (!className || className.includes('.'))
|
|
103
|
+
return className;
|
|
104
|
+
if (!ApexNamespaceRegistry.VALID_APEX_CLASS_NAME.test(className))
|
|
105
|
+
return className;
|
|
106
|
+
const key = className.toLowerCase();
|
|
107
|
+
if (this.namespacedClasses.has(key) && !this.localClasses.has(key)) {
|
|
108
|
+
return `${this.namespace}.${className}`;
|
|
109
|
+
}
|
|
110
|
+
return className;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Returns true if the className was resolved to a namespaced class (will be prefixed).
|
|
114
|
+
*/
|
|
115
|
+
wasNamespaceAdded(className) {
|
|
116
|
+
return this.resolveStatus(className) === exports.ApexResolveStatus.NAMESPACED;
|
|
117
|
+
}
|
|
118
|
+
getNamespace() {
|
|
119
|
+
return this.namespace;
|
|
120
|
+
}
|
|
121
|
+
clear() {
|
|
122
|
+
this.localClasses.clear();
|
|
123
|
+
this.namespacedClasses.clear();
|
|
124
|
+
this.namespace = '';
|
|
125
|
+
this.initialized = false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.ApexNamespaceRegistry = ApexNamespaceRegistry;
|
|
129
|
+
ApexNamespaceRegistry.VALID_APEX_CLASS_NAME = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
|
130
|
+
//# sourceMappingURL=ApexNamespaceRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApexNamespaceRegistry.js","sourceRoot":"","sources":["../../src/migration/ApexNamespaceRegistry.ts"],"names":[],"mappings":";;;AACA,4CAAyC;AAE5B,QAAA,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX;;;;GAIG;AACH,MAAa,qBAAqB;IAAlC;QAIU,iBAAY,GAAgB,IAAI,GAAG,EAAE,CAAC;QACtC,sBAAiB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAC3C,cAAS,GAAG,EAAE,CAAC;QACf,gBAAW,GAAG,KAAK,CAAC;IA8G9B,CAAC;IA5GQ,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC;YACpC,qBAAqB,CAAC,QAAQ,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAC/D,CAAC;QACD,OAAO,qBAAqB,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,UAAU,CAAC,UAAsB,EAAE,SAAiB;QAC/D,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,yDAAyD,CAAC;YAC7E,IAAI,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAmB,UAAU,CAAC,CAAC;YAC1E,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBAC7B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC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AS,CAAC;QAC5D,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;QAEnF,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,SAAiB;QACxC,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,yBAAiB,CAAC,UAAU,CAAC;IACxE,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;;AApHH,sDAqHC;AAnHyB,2CAAqB,GAAG,yBAAyB,AAA5B,CAA6B"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Connection, Messages } from '@salesforce/core';
|
|
2
|
+
/**
|
|
3
|
+
* Outcome of scanning a single Static Resource for namespace references.
|
|
4
|
+
* - `notFound` — no record with this Name exists in the org
|
|
5
|
+
* - `unsupported` — body was unreadable or non-text & non-zip
|
|
6
|
+
* - `noNamespaceRef` — fetched, scanned, no namespace match
|
|
7
|
+
* - `namespaceFound` — fetched, scanned, namespace match found
|
|
8
|
+
*/
|
|
9
|
+
export type CustomCssScanVerdict = 'notFound' | 'unsupported' | 'noNamespaceRef' | 'namespaceFound';
|
|
10
|
+
/**
|
|
11
|
+
* Result of scanning the four-key `stylesheet` object embedded in an OmniScript's
|
|
12
|
+
* (or FlexCard's) PropertySetConfig. Returns the names of stylesheets whose
|
|
13
|
+
* StaticResource bodies still reference the org's managed-package namespace.
|
|
14
|
+
*
|
|
15
|
+
* Names are deduplicated, so a single resource referenced from multiple variant
|
|
16
|
+
* keys (e.g. both `lightning` and `newport`) appears only once.
|
|
17
|
+
*/
|
|
18
|
+
export interface CustomCssStylesheetScanResult {
|
|
19
|
+
stylesheetsWithNamespaceRefs: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Centralised, process-wide cache & scanner for Static Resources referenced as
|
|
23
|
+
* "Custom Lightning / Newport Stylesheet File Name" in OmniScript / FlexCard
|
|
24
|
+
* PropertySetConfig.
|
|
25
|
+
*
|
|
26
|
+
* Why a registry (vs a per-tool field): the same StaticResource is frequently
|
|
27
|
+
* shared across many OmniScripts and FlexCards. We don't want to re-query or
|
|
28
|
+
* re-download it per tool. OmniScript and Integration Procedure are two
|
|
29
|
+
* separate `OmniScriptMigrationTool` instances in the assess flow — without
|
|
30
|
+
* the registry, their caches would be siloed. Future component types can plug
|
|
31
|
+
* in by calling `scanResource()` directly without re-implementing the
|
|
32
|
+
* fetch/zip/scan logic.
|
|
33
|
+
*
|
|
34
|
+
* Lifetime: a single assessment run. Tools call `init(connection, namespace,
|
|
35
|
+
* messages)` once at construction time; subsequent inits are idempotent (the
|
|
36
|
+
* first one wins, and a `reset()` is exposed for tests / re-entrant runs).
|
|
37
|
+
*/
|
|
38
|
+
export declare class CustomCssRegistry {
|
|
39
|
+
private static instance;
|
|
40
|
+
/** Variant keys present on `propertySetConfig.stylesheet` for OmniScript. */
|
|
41
|
+
private static readonly OMNISCRIPT_STYLESHEET_VARIANTS;
|
|
42
|
+
private cache;
|
|
43
|
+
private connection?;
|
|
44
|
+
private namespace?;
|
|
45
|
+
private messages?;
|
|
46
|
+
static getInstance(): CustomCssRegistry;
|
|
47
|
+
/**
|
|
48
|
+
* Configure the registry. Safe to call multiple times — the first non-empty
|
|
49
|
+
* configuration wins, so the order in which tools initialise doesn't matter.
|
|
50
|
+
*/
|
|
51
|
+
init(connection: Connection, namespace: string, messages: Messages<string>): void;
|
|
52
|
+
/** Clears cache + configuration. Intended for tests / re-entrant assess runs. */
|
|
53
|
+
reset(): void;
|
|
54
|
+
/** Whether namespace scanning is meaningful in the current run. */
|
|
55
|
+
isEnabled(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Scan the four OmniScript stylesheet variants
|
|
58
|
+
* (`lightning`, `newport`, `lightningRtl`, `newportRtl`) on a parsed
|
|
59
|
+
* `propertySetConfig.stylesheet` object and return any that still reference
|
|
60
|
+
* the configured namespace inside their CSS body. Duplicate resource names
|
|
61
|
+
* (the same StaticResource referenced from multiple variants) are collapsed.
|
|
62
|
+
*
|
|
63
|
+
* Returns an empty result when scanning is disabled (no namespace configured)
|
|
64
|
+
* or when the stylesheet object is missing / malformed.
|
|
65
|
+
*/
|
|
66
|
+
scanOmniScriptStylesheets(stylesheet: unknown): Promise<CustomCssStylesheetScanResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Build the customer-facing warning message for an OmniScript StaticResource-
|
|
69
|
+
* backed stylesheet that contains namespace references. The OmniScript and
|
|
70
|
+
* FlexCard variants are split so each can map to its own help-doc URL in
|
|
71
|
+
* `documentRegistry`. Returns `null` if the registry has no message bundle yet.
|
|
72
|
+
*/
|
|
73
|
+
buildOmniScriptNamespaceWarning(resourceName: string): string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Build the customer-facing warning message for a FlexCard StaticResource-
|
|
76
|
+
* backed stylesheet that contains namespace references. Mirrors
|
|
77
|
+
* `buildOmniScriptNamespaceWarning` but uses the FlexCard-specific message key
|
|
78
|
+
* so the call-to-action helper resolves the FlexCard help-doc link.
|
|
79
|
+
*/
|
|
80
|
+
buildFlexCardNamespaceWarning(resourceName: string): string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Build the customer-facing warning message for inline CSS (e.g. FlexCard's
|
|
83
|
+
* `Styles__c.customStyles`) that contains namespace references. No
|
|
84
|
+
* StaticResource is involved, so no resource name is interpolated — the
|
|
85
|
+
* surrounding row in the assessment report already identifies the component.
|
|
86
|
+
*/
|
|
87
|
+
buildInlineCssNamespaceWarning(): string | null;
|
|
88
|
+
/**
|
|
89
|
+
* Substring-test the configured namespace against an arbitrary CSS string.
|
|
90
|
+
* Used for FlexCard `Styles__c.customStyles` (raw inline CSS) — no caching
|
|
91
|
+
* because the input is per-record and not shared.
|
|
92
|
+
*/
|
|
93
|
+
containsNamespaceInText(text: unknown): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Look up a Static Resource by Name, fetch its body (handling text and zip
|
|
96
|
+
* bodies), and report whether the configured namespace appears anywhere in
|
|
97
|
+
* its CSS. Cached by Name for the lifetime of the registry.
|
|
98
|
+
*
|
|
99
|
+
* Public so future component types (FlexCard, …) can reuse the cache directly
|
|
100
|
+
* without going through `scanOmniScriptStylesheets`.
|
|
101
|
+
*/
|
|
102
|
+
scanResource(resourceName: string): Promise<CustomCssScanVerdict>;
|
|
103
|
+
/** SOQL lookup of a StaticResource by Name. Returns undefined when not found. */
|
|
104
|
+
private lookupStaticResource;
|
|
105
|
+
/**
|
|
106
|
+
* Fetch the StaticResource body and dispatch to the appropriate scanner.
|
|
107
|
+
* Errors are logged and folded into the `unsupported` verdict so a single
|
|
108
|
+
* broken resource doesn't poison the rest of the assessment run.
|
|
109
|
+
*/
|
|
110
|
+
private scanStaticResourceBody;
|
|
111
|
+
private isTextContentType;
|
|
112
|
+
private isZipContentType;
|
|
113
|
+
/** Fetch a plain-text body and substring-check for the namespace. */
|
|
114
|
+
private scanTextBody;
|
|
115
|
+
/** Fetch a zip body and substring-check the namespace across every .css entry. */
|
|
116
|
+
private scanZipBody;
|
|
117
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CustomCssRegistry = void 0;
|
|
13
|
+
const jszip_1 = __importDefault(require("jszip"));
|
|
14
|
+
const query_1 = require("../utils/query");
|
|
15
|
+
const logger_1 = require("../utils/logger");
|
|
16
|
+
/**
|
|
17
|
+
* Centralised, process-wide cache & scanner for Static Resources referenced as
|
|
18
|
+
* "Custom Lightning / Newport Stylesheet File Name" in OmniScript / FlexCard
|
|
19
|
+
* PropertySetConfig.
|
|
20
|
+
*
|
|
21
|
+
* Why a registry (vs a per-tool field): the same StaticResource is frequently
|
|
22
|
+
* shared across many OmniScripts and FlexCards. We don't want to re-query or
|
|
23
|
+
* re-download it per tool. OmniScript and Integration Procedure are two
|
|
24
|
+
* separate `OmniScriptMigrationTool` instances in the assess flow — without
|
|
25
|
+
* the registry, their caches would be siloed. Future component types can plug
|
|
26
|
+
* in by calling `scanResource()` directly without re-implementing the
|
|
27
|
+
* fetch/zip/scan logic.
|
|
28
|
+
*
|
|
29
|
+
* Lifetime: a single assessment run. Tools call `init(connection, namespace,
|
|
30
|
+
* messages)` once at construction time; subsequent inits are idempotent (the
|
|
31
|
+
* first one wins, and a `reset()` is exposed for tests / re-entrant runs).
|
|
32
|
+
*/
|
|
33
|
+
class CustomCssRegistry {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.cache = new Map();
|
|
36
|
+
}
|
|
37
|
+
static getInstance() {
|
|
38
|
+
if (!CustomCssRegistry.instance) {
|
|
39
|
+
CustomCssRegistry.instance = new CustomCssRegistry();
|
|
40
|
+
}
|
|
41
|
+
return CustomCssRegistry.instance;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Configure the registry. Safe to call multiple times — the first non-empty
|
|
45
|
+
* configuration wins, so the order in which tools initialise doesn't matter.
|
|
46
|
+
*/
|
|
47
|
+
init(connection, namespace, messages) {
|
|
48
|
+
if (!this.connection)
|
|
49
|
+
this.connection = connection;
|
|
50
|
+
if (!this.namespace && namespace)
|
|
51
|
+
this.namespace = namespace;
|
|
52
|
+
if (!this.messages)
|
|
53
|
+
this.messages = messages;
|
|
54
|
+
}
|
|
55
|
+
/** Clears cache + configuration. Intended for tests / re-entrant assess runs. */
|
|
56
|
+
reset() {
|
|
57
|
+
this.cache.clear();
|
|
58
|
+
this.connection = undefined;
|
|
59
|
+
this.namespace = undefined;
|
|
60
|
+
this.messages = undefined;
|
|
61
|
+
}
|
|
62
|
+
/** Whether namespace scanning is meaningful in the current run. */
|
|
63
|
+
isEnabled() {
|
|
64
|
+
return Boolean(this.connection && this.namespace);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Scan the four OmniScript stylesheet variants
|
|
68
|
+
* (`lightning`, `newport`, `lightningRtl`, `newportRtl`) on a parsed
|
|
69
|
+
* `propertySetConfig.stylesheet` object and return any that still reference
|
|
70
|
+
* the configured namespace inside their CSS body. Duplicate resource names
|
|
71
|
+
* (the same StaticResource referenced from multiple variants) are collapsed.
|
|
72
|
+
*
|
|
73
|
+
* Returns an empty result when scanning is disabled (no namespace configured)
|
|
74
|
+
* or when the stylesheet object is missing / malformed.
|
|
75
|
+
*/
|
|
76
|
+
async scanOmniScriptStylesheets(stylesheet) {
|
|
77
|
+
const result = { stylesheetsWithNamespaceRefs: [] };
|
|
78
|
+
if (!this.isEnabled())
|
|
79
|
+
return result;
|
|
80
|
+
if (!stylesheet || typeof stylesheet !== 'object')
|
|
81
|
+
return result;
|
|
82
|
+
const sheet = stylesheet;
|
|
83
|
+
const flagged = new Set();
|
|
84
|
+
for (const variant of CustomCssRegistry.OMNISCRIPT_STYLESHEET_VARIANTS) {
|
|
85
|
+
const raw = sheet[variant];
|
|
86
|
+
const resourceName = (raw == null ? '' : String(raw)).trim();
|
|
87
|
+
if (!resourceName)
|
|
88
|
+
continue;
|
|
89
|
+
const verdict = await this.scanResource(resourceName);
|
|
90
|
+
if (verdict === 'namespaceFound') {
|
|
91
|
+
flagged.add(resourceName);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
result.stylesheetsWithNamespaceRefs = [...flagged];
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Build the customer-facing warning message for an OmniScript StaticResource-
|
|
99
|
+
* backed stylesheet that contains namespace references. The OmniScript and
|
|
100
|
+
* FlexCard variants are split so each can map to its own help-doc URL in
|
|
101
|
+
* `documentRegistry`. Returns `null` if the registry has no message bundle yet.
|
|
102
|
+
*/
|
|
103
|
+
buildOmniScriptNamespaceWarning(resourceName) {
|
|
104
|
+
if (!this.messages || !this.namespace)
|
|
105
|
+
return null;
|
|
106
|
+
return this.messages.getMessage('customCssStylesheetNamespaceWarningOmniScript', [resourceName]);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Build the customer-facing warning message for a FlexCard StaticResource-
|
|
110
|
+
* backed stylesheet that contains namespace references. Mirrors
|
|
111
|
+
* `buildOmniScriptNamespaceWarning` but uses the FlexCard-specific message key
|
|
112
|
+
* so the call-to-action helper resolves the FlexCard help-doc link.
|
|
113
|
+
*/
|
|
114
|
+
buildFlexCardNamespaceWarning(resourceName) {
|
|
115
|
+
if (!this.messages || !this.namespace)
|
|
116
|
+
return null;
|
|
117
|
+
return this.messages.getMessage('customCssStylesheetNamespaceWarningFlexCard', [resourceName]);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Build the customer-facing warning message for inline CSS (e.g. FlexCard's
|
|
121
|
+
* `Styles__c.customStyles`) that contains namespace references. No
|
|
122
|
+
* StaticResource is involved, so no resource name is interpolated — the
|
|
123
|
+
* surrounding row in the assessment report already identifies the component.
|
|
124
|
+
*/
|
|
125
|
+
buildInlineCssNamespaceWarning() {
|
|
126
|
+
if (!this.messages || !this.namespace)
|
|
127
|
+
return null;
|
|
128
|
+
return this.messages.getMessage('customCssInlineNamespaceWarning');
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Substring-test the configured namespace against an arbitrary CSS string.
|
|
132
|
+
* Used for FlexCard `Styles__c.customStyles` (raw inline CSS) — no caching
|
|
133
|
+
* because the input is per-record and not shared.
|
|
134
|
+
*/
|
|
135
|
+
containsNamespaceInText(text) {
|
|
136
|
+
if (!this.isEnabled())
|
|
137
|
+
return false;
|
|
138
|
+
if (typeof text !== 'string' || text.length === 0)
|
|
139
|
+
return false;
|
|
140
|
+
return text.includes(this.namespace);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Look up a Static Resource by Name, fetch its body (handling text and zip
|
|
144
|
+
* bodies), and report whether the configured namespace appears anywhere in
|
|
145
|
+
* its CSS. Cached by Name for the lifetime of the registry.
|
|
146
|
+
*
|
|
147
|
+
* Public so future component types (FlexCard, …) can reuse the cache directly
|
|
148
|
+
* without going through `scanOmniScriptStylesheets`.
|
|
149
|
+
*/
|
|
150
|
+
async scanResource(resourceName) {
|
|
151
|
+
if (!resourceName)
|
|
152
|
+
return 'notFound';
|
|
153
|
+
const cached = this.cache.get(resourceName);
|
|
154
|
+
if (cached)
|
|
155
|
+
return cached;
|
|
156
|
+
if (!this.connection || !this.namespace) {
|
|
157
|
+
// Registry was queried before init() — treat as unsupported but don't cache;
|
|
158
|
+
// a later init() must still get a chance to scan.
|
|
159
|
+
return 'unsupported';
|
|
160
|
+
}
|
|
161
|
+
const sr = await this.lookupStaticResource(resourceName);
|
|
162
|
+
if (!sr) {
|
|
163
|
+
this.cache.set(resourceName, 'notFound');
|
|
164
|
+
return 'notFound';
|
|
165
|
+
}
|
|
166
|
+
const verdict = await this.scanStaticResourceBody(sr);
|
|
167
|
+
this.cache.set(resourceName, verdict);
|
|
168
|
+
return verdict;
|
|
169
|
+
}
|
|
170
|
+
/** SOQL lookup of a StaticResource by Name. Returns undefined when not found. */
|
|
171
|
+
async lookupStaticResource(resourceName) {
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
173
|
+
const filters = new Map([['Name', resourceName]]);
|
|
174
|
+
const rows = (await query_1.QueryTools.query(this.connection, 'StaticResource', ['Id', 'Name', 'ContentType', 'BodyLength'], filters));
|
|
175
|
+
return rows && rows.length > 0 ? rows[0] : undefined;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Fetch the StaticResource body and dispatch to the appropriate scanner.
|
|
179
|
+
* Errors are logged and folded into the `unsupported` verdict so a single
|
|
180
|
+
* broken resource doesn't poison the rest of the assessment run.
|
|
181
|
+
*/
|
|
182
|
+
async scanStaticResourceBody(sr) {
|
|
183
|
+
const contentType = (sr.ContentType || '').toLowerCase();
|
|
184
|
+
const apiVersion = this.connection.getApiVersion();
|
|
185
|
+
const url = `/services/data/v${apiVersion}/sobjects/StaticResource/${sr.Id}/Body`;
|
|
186
|
+
try {
|
|
187
|
+
if (this.isTextContentType(contentType)) {
|
|
188
|
+
return await this.scanTextBody(url);
|
|
189
|
+
}
|
|
190
|
+
if (this.isZipContentType(contentType)) {
|
|
191
|
+
return await this.scanZipBody(url);
|
|
192
|
+
}
|
|
193
|
+
// Unsupported content type — don't false-positive.
|
|
194
|
+
return 'unsupported';
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
logger_1.Logger.error(`Failed to fetch/scan StaticResource '${sr.Name}': ${err.message}`);
|
|
198
|
+
return 'unsupported';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
isTextContentType(contentType) {
|
|
202
|
+
return contentType.startsWith('text/') || contentType === 'application/json' || contentType === '';
|
|
203
|
+
}
|
|
204
|
+
isZipContentType(contentType) {
|
|
205
|
+
return contentType === 'application/zip' || contentType === 'application/x-zip-compressed';
|
|
206
|
+
}
|
|
207
|
+
/** Fetch a plain-text body and substring-check for the namespace. */
|
|
208
|
+
async scanTextBody(url) {
|
|
209
|
+
const raw = await this.connection.request({ method: 'GET', url });
|
|
210
|
+
const cssText = Buffer.isBuffer(raw) ? raw.toString('utf8') : String(raw !== null && raw !== void 0 ? raw : '');
|
|
211
|
+
return cssText.includes(this.namespace) ? 'namespaceFound' : 'noNamespaceRef';
|
|
212
|
+
}
|
|
213
|
+
/** Fetch a zip body and substring-check the namespace across every .css entry. */
|
|
214
|
+
async scanZipBody(url) {
|
|
215
|
+
const raw = await this.connection.request({ method: 'GET', url });
|
|
216
|
+
const buf = Buffer.isBuffer(raw) ? raw : Buffer.from(raw, 'binary');
|
|
217
|
+
const zip = await jszip_1.default.loadAsync(buf);
|
|
218
|
+
const entries = Object.values(zip.files);
|
|
219
|
+
for (const file of entries) {
|
|
220
|
+
if (file.dir)
|
|
221
|
+
continue;
|
|
222
|
+
if (!/\.css$/i.test(file.name))
|
|
223
|
+
continue;
|
|
224
|
+
const cssText = await file.async('string');
|
|
225
|
+
if (cssText.includes(this.namespace))
|
|
226
|
+
return 'namespaceFound';
|
|
227
|
+
}
|
|
228
|
+
return 'noNamespaceRef';
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.CustomCssRegistry = CustomCssRegistry;
|
|
232
|
+
/** Variant keys present on `propertySetConfig.stylesheet` for OmniScript. */
|
|
233
|
+
CustomCssRegistry.OMNISCRIPT_STYLESHEET_VARIANTS = ['lightning', 'newport', 'lightningRtl', 'newportRtl'];
|
|
234
|
+
//# sourceMappingURL=CustomCssRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomCssRegistry.js","sourceRoot":"","sources":["../../src/migration/CustomCssRegistry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAGH,kDAA0B;AAC1B,0CAA4C;AAC5C,4CAAyC;A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,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9D,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,GAAG;gBAAE,SAAS;YACvB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,SAAS;YACzC,MAAM,OAAO,GAAW,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACnD,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;gBAAE,OAAO,gBAAgB,CAAC;QAChE,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;;AAxNH,8CAyNC;AAtNC,6EAA6E;AACrD,gDAA8B,GAElD,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,CAAC,AAFJ,CAEK"}
|
package/lib/migration/base.js
CHANGED
|
@@ -53,7 +53,7 @@ const createProgressBar = (action, type) => {
|
|
|
53
53
|
const noSpaceTypes = ['Omniscript', 'Integration Procedure', 'ExperienceSites'];
|
|
54
54
|
const space = noSpaceTypes.includes(typeStr) ? '' : '\t\t\t\t';
|
|
55
55
|
return new cliProgress.SingleBar({
|
|
56
|
-
format: `${action} ${type} | ${space} {bar} | {percentage}% || {value}/{total} Tasks`,
|
|
56
|
+
format: `${action} ${type} | ${space} {bar} | {percentage}% || {value}/{total} Tasks\n`,
|
|
57
57
|
barCompleteChar: '\u2588',
|
|
58
58
|
barIncompleteChar: '\u2591',
|
|
59
59
|
hideCursor: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/migration/base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,0DAA4C;AAC5C,oCAAkD;AAClD,sCAAwC;AACxC,gEAA6D;AAG7D,+DAA4D;AAU5D;;;;;;GAMG;AACI,MAAM,iBAAiB,GAAG,CAAC,MAAc,E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AAE,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAES,SAAS,CAAC,IAAY,EAAE,gBAAgB,GAAG,KAAK;QACxD,OAAO,uBAAU,CAAC,SAAS,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACtD,CAAC;IAES,KAAK,CAAC,QAAQ,CAAC,UAAkB;QACzC,kBAAU,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,aAAa,GAAG,UAAU,CAAC,CAAC;QAEzD,MAAM,GAAG,GAAa,MAAM,kBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC7E,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAE7B,MAAM,OAAO,GAAY,MAAM,cAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACrE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACO,eAAe,CAAC,MAAe,EAAE,GAAG,MAAgB;QAC5D,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IAC5B,CAAC;;AA7EH,8CA8EC;AA7E2B,6BAAW,GAAG,GAAG,CAAC"}
|
|
@@ -32,6 +32,7 @@ class CustomLabelsMigrationTool extends base_1.BaseMigrationTool {
|
|
|
32
32
|
try {
|
|
33
33
|
logger_1.Logger.log(this.messages.getMessage('startingCustomLabelMigration'));
|
|
34
34
|
const migrationData = new Map();
|
|
35
|
+
const allMigrationData = new Map();
|
|
35
36
|
const errors = [];
|
|
36
37
|
// Call clone-custom-labels API only
|
|
37
38
|
const cloneLabelsResponse = await this.callCloneCustomLabelsAPI();
|
|
@@ -39,14 +40,22 @@ class CustomLabelsMigrationTool extends base_1.BaseMigrationTool {
|
|
|
39
40
|
await this.callCloneCustomLabelLocalizationsAPI();
|
|
40
41
|
// Get total count from API response
|
|
41
42
|
const totalLabels = cloneLabelsResponse.results ? cloneLabelsResponse.results.length : 0;
|
|
42
|
-
// Process results
|
|
43
|
+
// Process results
|
|
43
44
|
if (cloneLabelsResponse.results) {
|
|
44
45
|
cloneLabelsResponse.results.forEach((labelResult) => {
|
|
45
46
|
const key = labelResult.name;
|
|
46
|
-
|
|
47
|
+
const { mappedStatus, hasErrors } = this.mapCloneStatusToMigrationStatus(labelResult.status);
|
|
48
|
+
// Store all records for CSV export
|
|
49
|
+
allMigrationData.set(key, {
|
|
50
|
+
labelName: labelResult.name,
|
|
51
|
+
cloneStatus: labelResult.status,
|
|
52
|
+
message: labelResult.message,
|
|
53
|
+
coreInfo: labelResult.coreInfo,
|
|
54
|
+
packageInfo: labelResult.packageInfo,
|
|
55
|
+
});
|
|
56
|
+
// Only include error and duplicate (where message is not "same value") in report table
|
|
47
57
|
if (stringContants_1.Constants.CustomLabelInvalidStatuses.includes(labelResult.status) &&
|
|
48
58
|
!(labelResult.status === 'duplicate' && labelResult.message === stringContants_1.Constants.CustomLabelSameValueMessage)) {
|
|
49
|
-
const { mappedStatus, hasErrors } = this.mapCloneStatusToMigrationStatus(labelResult.status);
|
|
50
59
|
// Store consolidated data that can be used for both dashboard and detailed reporting
|
|
51
60
|
const recordData = {
|
|
52
61
|
// Properties needed for dashboard status calculation
|
|
@@ -84,6 +93,7 @@ class CustomLabelsMigrationTool extends base_1.BaseMigrationTool {
|
|
|
84
93
|
records: migrationData, // Both point to the same data
|
|
85
94
|
errors,
|
|
86
95
|
totalCount: totalLabels, // Use totalCount instead of statistics
|
|
96
|
+
allRecords: allMigrationData, // All records for CSV export
|
|
87
97
|
},
|
|
88
98
|
];
|
|
89
99
|
}
|
|
@@ -96,6 +106,7 @@ class CustomLabelsMigrationTool extends base_1.BaseMigrationTool {
|
|
|
96
106
|
results: emptyMap,
|
|
97
107
|
records: emptyMap, // Both point to the same empty map
|
|
98
108
|
errors: [this.messages.getMessage('customLabelMigrationErrorMessage')],
|
|
109
|
+
allRecords: emptyMap,
|
|
99
110
|
},
|
|
100
111
|
];
|
|
101
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customLabels.js","sourceRoot":"","sources":["../../src/migration/customLabels.ts"],"names":[],"mappings":";;;AAMA,sCAAuD;AACvD,4CAAyC;AACzC,sEAA8D;AAC9D,iCAA2C;AAmD3C,MAAa,yBAA0B,SAAQ,wBAAiB;IAC9D,YAAmB,SAAiB,EAAE,UAAsB,EAAE,MAAc,EAAE,QAA0B,EAAE,EAAM;QAC9G,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;IAEM,OAAO;QACZ,OAAO,eAAe,CAAC;IACzB,CAAC;IAEM,aAAa,CAAC,MAAyB;QAC5C,OAAO,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC;IACtD,CAAC;IAEM,WAAW;QAChB,OAAO;YACL;gBACE,MAAM,EAAE,eAAe;gBACvB,MAAM,EAAE,eAAe;aACxB;SACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,kEAAkE;QAClE,eAAM,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC,CAAC;QACtE,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,IAAI,CAAC;YACH,eAAM,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,CAAC;YAErE,MAAM,aAAa,GAAG,IAAI,GAAG,EAAe,CAAC;YAC7C,MAAM,MAAM,GAAa,EAAE,CAAC;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