@salesforce/plugin-metadata-enrichment 0.0.2 → 0.0.3
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 +1 -1
- package/lib/commands/metadata/enrich.js +2 -5
- package/lib/commands/metadata/enrich.js.map +1 -1
- package/npm-shrinkwrap.json +6 -6
- package/oclif.lock +4 -4
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/schemas/metadata-enrich.json +26 -7
- package/lib/component/componentProcessor.d.ts +0 -24
- package/lib/component/componentProcessor.js +0 -132
- package/lib/component/componentProcessor.js.map +0 -1
- package/lib/component/index.d.ts +0 -1
- package/lib/component/index.js +0 -17
- package/lib/component/index.js.map +0 -1
- package/lib/utils/enrichmentRecords.d.ts +0 -12
- package/lib/utils/enrichmentRecords.js +0 -117
- package/lib/utils/enrichmentRecords.js.map +0 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -17
- package/lib/utils/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -128,6 +128,6 @@ FLAG DESCRIPTIONS
|
|
|
128
128
|
Wildcards ("_") are supported as long as you use double quotes, such as "LightningComponentBundle:MyClass_".
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
_See code: [src/commands/metadata/enrich.ts](https://github.com/salesforcecli/plugin-metadata-enrichment/blob/0.0.
|
|
131
|
+
_See code: [src/commands/metadata/enrich.ts](https://github.com/salesforcecli/plugin-metadata-enrichment/blob/0.0.3/src/commands/metadata/enrich.ts)_
|
|
132
132
|
|
|
133
133
|
<!-- commandsstop -->
|
|
@@ -17,12 +17,9 @@ import { MultiStageOutput } from '@oclif/multi-stage-output';
|
|
|
17
17
|
import { Messages, SfProject } from '@salesforce/core';
|
|
18
18
|
import { Flags, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
19
19
|
import { ComponentSetBuilder } from '@salesforce/source-deploy-retrieve';
|
|
20
|
-
import { EnrichmentHandler, EnrichmentMetrics, EnrichmentStatus, FileProcessor } from '@salesforce/metadata-enrichment';
|
|
21
|
-
import { ComponentProcessor } from '../../component/index.js';
|
|
22
|
-
import { EnrichmentRecords } from '../../utils/index.js';
|
|
20
|
+
import { ComponentProcessor, EnrichmentHandler, EnrichmentMetrics, EnrichmentRecords, EnrichmentStatus, FileProcessor } from '@salesforce/metadata-enrichment';
|
|
23
21
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
22
|
const commandMessages = Messages.loadMessages('@salesforce/plugin-metadata-enrichment', 'metadata.enrich');
|
|
25
|
-
const errorsMessages = Messages.loadMessages('@salesforce/plugin-metadata-enrichment', 'errors');
|
|
26
23
|
const metricsMessages = Messages.loadMessages('@salesforce/plugin-metadata-enrichment', 'metrics');
|
|
27
24
|
export default class MetadataEnrich extends SfCommand {
|
|
28
25
|
static summary = commandMessages.getMessage('summary');
|
|
@@ -62,7 +59,7 @@ export default class MetadataEnrich extends SfCommand {
|
|
|
62
59
|
},
|
|
63
60
|
});
|
|
64
61
|
const projectSourceComponents = projectComponentSet.getSourceComponents().toArray();
|
|
65
|
-
const enrichmentRecords = new EnrichmentRecords(projectSourceComponents
|
|
62
|
+
const enrichmentRecords = new EnrichmentRecords(projectSourceComponents);
|
|
66
63
|
const componentsToSkip = ComponentProcessor.getComponentsToSkip(projectSourceComponents, metadataEntries, project.getPath());
|
|
67
64
|
enrichmentRecords.addSkippedComponents(componentsToSkip);
|
|
68
65
|
enrichmentRecords.updateWithStatus(componentsToSkip, EnrichmentStatus.SKIPPED);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrich.js","sourceRoot":"","sources":["../../../src/commands/metadata/enrich.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,SA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,EAAE,CAAC,KAAK,CAAC;gBACP,OAAO,EAAE;oBACP,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACjC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;oBAC7B,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;oBACvC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;iBACpC;gBACD,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,MAAM;aACjB,CAAC,CAAC;QACL,CAAC;QACD,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEX,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-metadata-enrichment",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-metadata-enrichment",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@oclif/table": "^0.5.1",
|
|
15
15
|
"@salesforce/core": "^8.24.0",
|
|
16
16
|
"@salesforce/kit": "^3.2.4",
|
|
17
|
-
"@salesforce/metadata-enrichment": "^0.0.
|
|
17
|
+
"@salesforce/metadata-enrichment": "^0.0.4",
|
|
18
18
|
"@salesforce/sf-plugins-core": "^12",
|
|
19
19
|
"@salesforce/source-deploy-retrieve": "^12.0.1"
|
|
20
20
|
},
|
|
@@ -4192,9 +4192,9 @@
|
|
|
4192
4192
|
}
|
|
4193
4193
|
},
|
|
4194
4194
|
"node_modules/@salesforce/metadata-enrichment": {
|
|
4195
|
-
"version": "0.0.
|
|
4196
|
-
"resolved": "https://registry.npmjs.org/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.
|
|
4197
|
-
"integrity": "sha512-
|
|
4195
|
+
"version": "0.0.4",
|
|
4196
|
+
"resolved": "https://registry.npmjs.org/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.4.tgz",
|
|
4197
|
+
"integrity": "sha512-5NPGDd0vrzxiFvB/OfaGvYyZ+4aIDaiTa7wayTqAlQsvzTKWwf26TEtRGkLFV48uNqLt4/uGC5sDfuXRQlI+uQ==",
|
|
4198
4198
|
"license": "Apache-2.0",
|
|
4199
4199
|
"dependencies": {
|
|
4200
4200
|
"@salesforce/core": "^8.24.0",
|
package/oclif.lock
CHANGED
|
@@ -1739,10 +1739,10 @@
|
|
|
1739
1739
|
dependencies:
|
|
1740
1740
|
"@salesforce/ts-types" "^2.0.12"
|
|
1741
1741
|
|
|
1742
|
-
"@salesforce/metadata-enrichment@^0.0.
|
|
1743
|
-
version "0.0.
|
|
1744
|
-
resolved "https://registry.yarnpkg.com/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.
|
|
1745
|
-
integrity sha512-
|
|
1742
|
+
"@salesforce/metadata-enrichment@^0.0.4":
|
|
1743
|
+
version "0.0.4"
|
|
1744
|
+
resolved "https://registry.yarnpkg.com/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.4.tgz#542b2d49ef844c802942c252f602f3aed232c6ad"
|
|
1745
|
+
integrity sha512-5NPGDd0vrzxiFvB/OfaGvYyZ+4aIDaiTa7wayTqAlQsvzTKWwf26TEtRGkLFV48uNqLt4/uGC5sDfuXRQlI+uQ==
|
|
1746
1746
|
dependencies:
|
|
1747
1747
|
"@salesforce/core" "^8.24.0"
|
|
1748
1748
|
"@salesforce/kit" "^3.2.4"
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-metadata-enrichment",
|
|
3
3
|
"description": "A Salesforce CLI plugin to enrich metadata for Salesforce resources",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@oclif/table": "^0.5.1",
|
|
11
11
|
"@salesforce/core": "^8.24.0",
|
|
12
12
|
"@salesforce/kit": "^3.2.4",
|
|
13
|
-
"@salesforce/metadata-enrichment": "^0.0.
|
|
13
|
+
"@salesforce/metadata-enrichment": "^0.0.4",
|
|
14
14
|
"@salesforce/sf-plugins-core": "^12",
|
|
15
15
|
"@salesforce/source-deploy-retrieve": "^12.0.1"
|
|
16
16
|
},
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"exports": "./lib/index.js",
|
|
204
204
|
"type": "module",
|
|
205
205
|
"sfdx": {
|
|
206
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.
|
|
207
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.
|
|
206
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.3.crt",
|
|
207
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.3.sig"
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
"required": [
|
|
21
|
+
"required": [
|
|
22
|
+
"count",
|
|
23
|
+
"components"
|
|
24
|
+
],
|
|
22
25
|
"additionalProperties": false
|
|
23
26
|
},
|
|
24
27
|
"fail": {
|
|
@@ -34,7 +37,10 @@
|
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
},
|
|
37
|
-
"required": [
|
|
40
|
+
"required": [
|
|
41
|
+
"count",
|
|
42
|
+
"components"
|
|
43
|
+
],
|
|
38
44
|
"additionalProperties": false
|
|
39
45
|
},
|
|
40
46
|
"skipped": {
|
|
@@ -50,15 +56,24 @@
|
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
|
-
"required": [
|
|
59
|
+
"required": [
|
|
60
|
+
"count",
|
|
61
|
+
"components"
|
|
62
|
+
],
|
|
54
63
|
"additionalProperties": false
|
|
55
64
|
},
|
|
56
65
|
"total": {
|
|
57
66
|
"type": "number"
|
|
58
67
|
}
|
|
59
68
|
},
|
|
60
|
-
"required": [
|
|
61
|
-
|
|
69
|
+
"required": [
|
|
70
|
+
"success",
|
|
71
|
+
"fail",
|
|
72
|
+
"skipped",
|
|
73
|
+
"total"
|
|
74
|
+
],
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"description": "A metrics data object for storing the final enrichment results. This includes components that were successfully enriched, failed, or skipped. This metrics object can be used to generate the final console or json output."
|
|
62
77
|
},
|
|
63
78
|
"ComponentEnrichmentStatus": {
|
|
64
79
|
"type": "object",
|
|
@@ -74,7 +89,11 @@
|
|
|
74
89
|
"type": "string"
|
|
75
90
|
}
|
|
76
91
|
},
|
|
77
|
-
"required": [
|
|
92
|
+
"required": [
|
|
93
|
+
"componentName",
|
|
94
|
+
"message",
|
|
95
|
+
"typeName"
|
|
96
|
+
]
|
|
78
97
|
}
|
|
79
98
|
}
|
|
80
|
-
}
|
|
99
|
+
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type SourceComponent } from '@salesforce/source-deploy-retrieve';
|
|
2
|
-
import type { MetadataTypeAndName } from '@salesforce/metadata-enrichment';
|
|
3
|
-
export declare class ComponentProcessor {
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Determine the components to SKIP based on the source components and the metadata entries.
|
|
7
|
-
* This includes:
|
|
8
|
-
* - Input components that do not exist in the source project
|
|
9
|
-
* - Non-LWC components
|
|
10
|
-
* - LWC components that are missing their metadata configuration file
|
|
11
|
-
*
|
|
12
|
-
* @param sourceComponents
|
|
13
|
-
* @param metadataEntries
|
|
14
|
-
* @param projectDir
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
static getComponentsToSkip(sourceComponents: SourceComponent[], metadataEntries: string[], projectDir?: string): Set<MetadataTypeAndName>;
|
|
18
|
-
private static filterComponents;
|
|
19
|
-
private static diffRequestedComponents;
|
|
20
|
-
private static parseRequestedComponents;
|
|
21
|
-
private static getExistingSourceComponentNames;
|
|
22
|
-
private static createSourceComponentMap;
|
|
23
|
-
private static parseMetadataEntry;
|
|
24
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, Salesforce, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { RegistryAccess } from '@salesforce/source-deploy-retrieve';
|
|
17
|
-
export class ComponentProcessor {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* Determine the components to SKIP based on the source components and the metadata entries.
|
|
21
|
-
* This includes:
|
|
22
|
-
* - Input components that do not exist in the source project
|
|
23
|
-
* - Non-LWC components
|
|
24
|
-
* - LWC components that are missing their metadata configuration file
|
|
25
|
-
*
|
|
26
|
-
* @param sourceComponents
|
|
27
|
-
* @param metadataEntries
|
|
28
|
-
* @param projectDir
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
static getComponentsToSkip(sourceComponents, metadataEntries, projectDir) {
|
|
32
|
-
const requestedComponents = ComponentProcessor.parseRequestedComponents(metadataEntries, projectDir);
|
|
33
|
-
const missingComponents = ComponentProcessor.diffRequestedComponents(sourceComponents, requestedComponents);
|
|
34
|
-
const filteredComponents = ComponentProcessor.filterComponents(sourceComponents, requestedComponents);
|
|
35
|
-
return new Set([...missingComponents, ...filteredComponents]);
|
|
36
|
-
}
|
|
37
|
-
static filterComponents(sourceComponents, requestedComponents) {
|
|
38
|
-
const sourceComponentMap = ComponentProcessor.createSourceComponentMap(sourceComponents);
|
|
39
|
-
const filteredComponents = new Set();
|
|
40
|
-
for (const requestedComponent of requestedComponents) {
|
|
41
|
-
if (!requestedComponent?.componentName)
|
|
42
|
-
continue;
|
|
43
|
-
const sourceComponent = sourceComponentMap.get(requestedComponent.componentName);
|
|
44
|
-
if (!sourceComponent)
|
|
45
|
-
continue;
|
|
46
|
-
// Filter out non-LWC components
|
|
47
|
-
if (sourceComponent.type?.name !== 'LightningComponentBundle') {
|
|
48
|
-
filteredComponents.add({
|
|
49
|
-
typeName: sourceComponent.type.name,
|
|
50
|
-
componentName: requestedComponent.componentName,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
// Filter out LWC components that are missing the metadata xml file
|
|
54
|
-
else if (sourceComponent.type?.name === 'LightningComponentBundle' && !sourceComponent.xml) {
|
|
55
|
-
filteredComponents.add({
|
|
56
|
-
typeName: sourceComponent.type.name,
|
|
57
|
-
componentName: requestedComponent.componentName,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return filteredComponents;
|
|
62
|
-
}
|
|
63
|
-
static diffRequestedComponents(sourceComponents, requestedComponents) {
|
|
64
|
-
const existingSourceComponentNames = ComponentProcessor.getExistingSourceComponentNames(sourceComponents);
|
|
65
|
-
const missingComponents = new Set();
|
|
66
|
-
for (const requestedComponent of requestedComponents) {
|
|
67
|
-
if (requestedComponent.componentName && !existingSourceComponentNames.has(requestedComponent.componentName)) {
|
|
68
|
-
missingComponents.add(requestedComponent);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return missingComponents;
|
|
72
|
-
}
|
|
73
|
-
static parseRequestedComponents(metadataEntries, projectDir) {
|
|
74
|
-
const requestedComponents = new Set();
|
|
75
|
-
for (const entry of metadataEntries) {
|
|
76
|
-
const parsed = ComponentProcessor.parseMetadataEntry(entry, projectDir);
|
|
77
|
-
if (!parsed) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
// Ignore wildcarded component names
|
|
81
|
-
if (parsed.componentName?.includes('*')) {
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
requestedComponents.add(parsed);
|
|
85
|
-
}
|
|
86
|
-
return requestedComponents;
|
|
87
|
-
}
|
|
88
|
-
static getExistingSourceComponentNames(sourceComponents) {
|
|
89
|
-
const existingSourceComponentNames = new Set();
|
|
90
|
-
for (const component of sourceComponents) {
|
|
91
|
-
const componentName = component.fullName ?? component.name;
|
|
92
|
-
if (componentName) {
|
|
93
|
-
existingSourceComponentNames.add(componentName);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return existingSourceComponentNames;
|
|
97
|
-
}
|
|
98
|
-
static createSourceComponentMap(sourceComponents) {
|
|
99
|
-
const componentMap = new Map();
|
|
100
|
-
for (const component of sourceComponents) {
|
|
101
|
-
const componentName = component.fullName ?? component.name;
|
|
102
|
-
if (componentName) {
|
|
103
|
-
componentMap.set(componentName, component);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return componentMap;
|
|
107
|
-
}
|
|
108
|
-
static parseMetadataEntry(rawEntry, projectDir) {
|
|
109
|
-
try {
|
|
110
|
-
const registry = new RegistryAccess(undefined, projectDir);
|
|
111
|
-
// Split on the first colon, and then join the rest back together to support names that include colons
|
|
112
|
-
const [typeName, ...nameParts] = rawEntry.split(':');
|
|
113
|
-
const type = registry.getTypeByName(typeName.trim());
|
|
114
|
-
if (!type) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
const metadataName = nameParts.length > 0 ? nameParts.join(':').trim() : '*';
|
|
118
|
-
// Return null for wildcards since componentName is required
|
|
119
|
-
if (metadataName === '*') {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
typeName: type.name,
|
|
124
|
-
componentName: metadataName,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
catch {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=componentProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentProcessor.js","sourceRoot":"","sources":["../../src/component/componentProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAwB,MAAM,oCAAoC,CAAC;AAG1F,MAAM,OAAO,kBAAkB;IAC7B;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,mBAAmB,CAC/B,gBAAmC,EACnC,eAAyB,EACzB,UAAmB;QAEnB,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QACrG,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;QAC5G,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;QACtG,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,iBAAiB,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC;IAChE,CAAC;IAEO,MAAM,CAAC,gBAAgB,CAC7B,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,CAAC,IAAI,CAAC;YAC3D,IAAI,aAAa,EAAE,CAAC;gBAClB,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,MAAM,CAAC,kBAAkB,CAAC,QAAgB,EAAE,UAAmB;QACrE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAC3D,sGAAsG;YACtG,MAAM,CAAC,QAAQ,EAAE,GAAG,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;YAC7E,4DAA4D;YAC5D,IAAI,YAAY,KAAK,GAAG,EAAE,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,aAAa,EAAE,YAAY;aAC5B,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
package/lib/component/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ComponentProcessor } from './componentProcessor.js';
|
package/lib/component/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, Salesforce, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export { ComponentProcessor } from './componentProcessor.js';
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { SourceComponent } from '@salesforce/source-deploy-retrieve';
|
|
2
|
-
import type { Messages } from '@salesforce/core';
|
|
3
|
-
import { EnrichmentStatus, type EnrichmentRequestRecord, type MetadataTypeAndName } from '@salesforce/metadata-enrichment';
|
|
4
|
-
export declare class EnrichmentRecords {
|
|
5
|
-
readonly recordSet: Set<EnrichmentRequestRecord>;
|
|
6
|
-
private readonly errorMessages;
|
|
7
|
-
constructor(projectSourceComponents: SourceComponent[], errorMessages: Messages<string>);
|
|
8
|
-
addSkippedComponents(componentsToSkip: Set<MetadataTypeAndName>): void;
|
|
9
|
-
updateWithStatus(componentsToUpdate: Set<MetadataTypeAndName>, status: EnrichmentStatus): void;
|
|
10
|
-
updateWithResults(results: EnrichmentRequestRecord[]): void;
|
|
11
|
-
generateSkipReasons(componentsToSkip: Set<MetadataTypeAndName>, projectSourceComponents: SourceComponent[]): void;
|
|
12
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, Salesforce, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { EnrichmentStatus, } from '@salesforce/metadata-enrichment';
|
|
17
|
-
export class EnrichmentRecords {
|
|
18
|
-
recordSet;
|
|
19
|
-
errorMessages;
|
|
20
|
-
constructor(projectSourceComponents, errorMessages) {
|
|
21
|
-
this.errorMessages = errorMessages;
|
|
22
|
-
this.recordSet = new Set();
|
|
23
|
-
// Create initial records for all provided source components
|
|
24
|
-
for (const component of projectSourceComponents) {
|
|
25
|
-
const componentName = component.fullName ?? component.name;
|
|
26
|
-
if (componentName && component.type) {
|
|
27
|
-
this.recordSet.add({
|
|
28
|
-
componentName,
|
|
29
|
-
componentType: component.type,
|
|
30
|
-
requestBody: { contentBundles: [], metadataType: 'Generic', maxTokens: 50 },
|
|
31
|
-
response: null,
|
|
32
|
-
message: null,
|
|
33
|
-
status: EnrichmentStatus.NOT_PROCESSED,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
addSkippedComponents(componentsToSkip) {
|
|
39
|
-
for (const component of componentsToSkip) {
|
|
40
|
-
if (!component.componentName)
|
|
41
|
-
continue;
|
|
42
|
-
// Check if record already exists
|
|
43
|
-
const existingRecord = Array.from(this.recordSet).find((r) => r.componentName === component.componentName);
|
|
44
|
-
if (existingRecord)
|
|
45
|
-
continue;
|
|
46
|
-
// Create a new record for the skipped component
|
|
47
|
-
this.recordSet.add({
|
|
48
|
-
componentName: component.componentName,
|
|
49
|
-
componentType: { name: component.typeName },
|
|
50
|
-
requestBody: { contentBundles: [], metadataType: 'Generic', maxTokens: 50 },
|
|
51
|
-
response: null,
|
|
52
|
-
message: null,
|
|
53
|
-
status: EnrichmentStatus.SKIPPED,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
updateWithStatus(componentsToUpdate, status) {
|
|
58
|
-
const componentsToUpdateMap = new Map();
|
|
59
|
-
for (const component of componentsToUpdate) {
|
|
60
|
-
if (component.componentName) {
|
|
61
|
-
componentsToUpdateMap.set(component.componentName, component);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
for (const record of this.recordSet) {
|
|
65
|
-
const componentToUpdate = componentsToUpdateMap.get(record.componentName);
|
|
66
|
-
if (componentToUpdate) {
|
|
67
|
-
record.status = status;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
updateWithResults(results) {
|
|
72
|
-
const resultsMap = new Map(results.map((r) => [r.componentName, r]));
|
|
73
|
-
for (const record of this.recordSet) {
|
|
74
|
-
const processedResult = resultsMap.get(record.componentName);
|
|
75
|
-
if (processedResult) {
|
|
76
|
-
record.requestBody = processedResult.requestBody;
|
|
77
|
-
record.response = processedResult.response;
|
|
78
|
-
if (record.status !== EnrichmentStatus.SKIPPED) {
|
|
79
|
-
record.status = processedResult.response ? EnrichmentStatus.SUCCESS : EnrichmentStatus.FAIL;
|
|
80
|
-
}
|
|
81
|
-
record.message = processedResult.message;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
generateSkipReasons(componentsToSkip, projectSourceComponents) {
|
|
86
|
-
const sourceComponentMap = new Map();
|
|
87
|
-
for (const component of projectSourceComponents) {
|
|
88
|
-
const componentName = component.fullName ?? component.name;
|
|
89
|
-
if (componentName) {
|
|
90
|
-
sourceComponentMap.set(componentName, component);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
for (const skip of componentsToSkip) {
|
|
94
|
-
if (!skip.componentName)
|
|
95
|
-
continue;
|
|
96
|
-
const record = Array.from(this.recordSet).find((r) => r.componentName === skip.componentName);
|
|
97
|
-
if (!record || record.status !== EnrichmentStatus.SKIPPED || record.message)
|
|
98
|
-
continue;
|
|
99
|
-
const sourceComponent = sourceComponentMap.get(skip.componentName);
|
|
100
|
-
let message;
|
|
101
|
-
if (!sourceComponent) {
|
|
102
|
-
message = this.errorMessages.getMessage('errors.component.not.found');
|
|
103
|
-
}
|
|
104
|
-
else if (sourceComponent?.type?.name !== 'LightningComponentBundle') {
|
|
105
|
-
message = this.errorMessages.getMessage('errors.lwc.only');
|
|
106
|
-
}
|
|
107
|
-
else if (sourceComponent?.type?.name === 'LightningComponentBundle' && !sourceComponent.xml) {
|
|
108
|
-
message = this.errorMessages.getMessage('errors.lwc.configuration.not.found');
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
message = this.errorMessages.getMessage('errors.unknown');
|
|
112
|
-
}
|
|
113
|
-
record.message = message;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=enrichmentRecords.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enrichmentRecords.js","sourceRoot":"","sources":["../../src/utils/enrichmentRecords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,gBAAgB,GAGjB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,OAAO,iBAAiB;IACZ,SAAS,CAA+B;IACvC,aAAa,CAAmB;IAEjD,YAAmB,uBAA0C,EAAE,aAA+B;QAC5F,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAC;QAEpD,4DAA4D;QAC5D,KAA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E,IAAI,EAAE,IAAI,KAAK,0BAA0B,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;gBAC9F,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAAC;YAChF,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;YAC5D,CAAC;YAED,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,CAAC;IACH,CAAC;CACF"}
|
package/lib/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EnrichmentRecords } from './enrichmentRecords.js';
|
package/lib/utils/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026, Salesforce, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export { EnrichmentRecords } from './enrichmentRecords.js';
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|