@salesforce/plugin-metadata-enrichment 0.0.1
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/LICENSE.txt +206 -0
- package/README.md +122 -0
- package/lib/commands/metadata/enrich.d.ts +12 -0
- package/lib/commands/metadata/enrich.js +83 -0
- package/lib/commands/metadata/enrich.js.map +1 -0
- package/lib/component/componentProcessor.d.ts +24 -0
- package/lib/component/componentProcessor.js +132 -0
- package/lib/component/componentProcessor.js.map +1 -0
- package/lib/component/index.d.ts +1 -0
- package/lib/component/index.js +17 -0
- package/lib/component/index.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/enrichmentRecords.d.ts +12 -0
- package/lib/utils/enrichmentRecords.js +117 -0
- package/lib/utils/enrichmentRecords.js.map +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +18 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/metricsFormatter.d.ts +12 -0
- package/lib/utils/metricsFormatter.js +62 -0
- package/lib/utils/metricsFormatter.js.map +1 -0
- package/messages/errors.md +15 -0
- package/messages/metadata.enrich.md +53 -0
- package/messages/metrics.md +19 -0
- package/npm-shrinkwrap.json +16758 -0
- package/oclif.lock +8870 -0
- package/oclif.manifest.json +74 -0
- package/package.json +207 -0
- package/schemas/metadata-enrich.json +80 -0
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrichmentRecords.js","sourceRoot":"","sources":["../../src/utils/enrichmentRecords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;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AAE,CAAC;gBACrB,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;YACxE,CAAC;iBAAM,IAAI,eAAe,EAAE,IAAI,EAAE,IAAI,KAAK,0BAA0B,EAAE,CAAC;gBACtE,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;YAC7D,CAAC;iBAAM,IAAI,eAAe,EAAE,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { MetricsFormatter } from './metricsFormatter.js';
|
|
17
|
+
export { EnrichmentRecords } from './enrichmentRecords.js';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Messages } from '@salesforce/core';
|
|
2
|
+
import type { EnrichmentMetrics } from '@salesforce/metadata-enrichment';
|
|
3
|
+
export declare class MetricsFormatter {
|
|
4
|
+
/**
|
|
5
|
+
* Log the formatted enrichment metrics to the console
|
|
6
|
+
*
|
|
7
|
+
* @param log
|
|
8
|
+
* @param metrics
|
|
9
|
+
* @param metricsMessages
|
|
10
|
+
*/
|
|
11
|
+
static logMetrics(log: (message: string) => void, metrics: EnrichmentMetrics, metricsMessages: Messages<string>): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 class MetricsFormatter {
|
|
17
|
+
/**
|
|
18
|
+
* Log the formatted enrichment metrics to the console
|
|
19
|
+
*
|
|
20
|
+
* @param log
|
|
21
|
+
* @param metrics
|
|
22
|
+
* @param metricsMessages
|
|
23
|
+
*/
|
|
24
|
+
static logMetrics(log, metrics, metricsMessages) {
|
|
25
|
+
log('');
|
|
26
|
+
log(metricsMessages.getMessage('metrics.total.count', [metrics.total]));
|
|
27
|
+
log('');
|
|
28
|
+
// Success section
|
|
29
|
+
log(metricsMessages.getMessage('metrics.success.count', [metrics.success.count]));
|
|
30
|
+
if (metrics.success.components.length > 0) {
|
|
31
|
+
for (const component of metrics.success.components) {
|
|
32
|
+
log(` • ${component.typeName}:${component.componentName ?? '*'}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
log('');
|
|
36
|
+
// Skipped section
|
|
37
|
+
log(metricsMessages.getMessage('metrics.skipped.count', [metrics.skipped.count]));
|
|
38
|
+
if (metrics.skipped.components.length > 0) {
|
|
39
|
+
for (const component of metrics.skipped.components) {
|
|
40
|
+
log(` • ${component.typeName}:${component.componentName ?? '*'}`);
|
|
41
|
+
if (component.message) {
|
|
42
|
+
log(` ` + metricsMessages.getMessage(`metrics.message`, [component.message]));
|
|
43
|
+
log('');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
log('');
|
|
48
|
+
// Failed section
|
|
49
|
+
log(metricsMessages.getMessage('metrics.fail.count', [metrics.fail.count]));
|
|
50
|
+
if (metrics.fail.components.length > 0) {
|
|
51
|
+
for (const component of metrics.fail.components) {
|
|
52
|
+
log(` • ${component.typeName}:${component.componentName ?? '*'}`);
|
|
53
|
+
if (component.message) {
|
|
54
|
+
log(` ` + metricsMessages.getMessage(`metrics.message`, [component.message]));
|
|
55
|
+
log('');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
log('');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=metricsFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metricsFormatter.js","sourceRoot":"","sources":["../../src/utils/metricsFormatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM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CAAC,CAAC,CAAC,CAAC;oBACjF,GAAG,CAAC,EAAE,CAAC,CAAC;gBACV,CAAC;YACH,CAAC;QACH,CAAC;QACD,GAAG,CAAC,EAAE,CAAC,CAAC;QAER,iBAAiB;QACjB,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChD,GAAG,CAAC,OAAO,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,aAAa,IAAI,GAAG,EAAE,CAAC,CAAC;gBACnE,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;oBACtB,GAAG,CAAC,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBACjF,GAAG,CAAC,EAAE,CAAC,CAAC;gBACV,CAAC;YACH,CAAC;QACH,CAAC;QACD,GAAG,CAAC,EAAE,CAAC,CAAC;IACV,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# errors.component.not.found
|
|
2
|
+
|
|
3
|
+
Component not found in project.
|
|
4
|
+
|
|
5
|
+
# errors.lwc.only
|
|
6
|
+
|
|
7
|
+
Only Lightning Web Components are currently supported for enrichment.
|
|
8
|
+
|
|
9
|
+
# errors.lwc.configuration.not.found
|
|
10
|
+
|
|
11
|
+
The Lightning Web Component configuration file doesn't exist (\*.js-meta.xml).
|
|
12
|
+
|
|
13
|
+
# errors.unknown
|
|
14
|
+
|
|
15
|
+
An unknown error occurred.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Enrich metadata components in your DX project by adding AI-generated descriptions.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Use this command to add AI-generated descriptions right in the metadata source files in your local DX project. These enriched descriptions succinctly outline the metadata component’s purpose and capabilities, which in turn provide context when vibe coding with an AI tool, such as Agentforce Vibes.
|
|
8
|
+
|
|
9
|
+
This command updates only the local metadata source files in your DX project; it doesn't change the components in your org. If you want the AI-generated descriptions in your org, then you must explicitly deploy the updated metadata components to your org by using, for example, the "project deploy start" CLI command.
|
|
10
|
+
|
|
11
|
+
To enrich multiple metadata components, specify multiple --metadata <name> flags. Enclose names that contain spaces in double quotes.
|
|
12
|
+
|
|
13
|
+
Even though this command updates only local files in your DX project, you're still required to authorize and specify an org, which is how the command accesses a large language model (LLM).
|
|
14
|
+
|
|
15
|
+
Currently, this command supports enriching only Lightning Web Components, represented by the LightningComponentBundle metadata type.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Enrich the "HelloWorld" LightningComponentBundle metadata component in the local DX project; use your default org:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:HelloWorld
|
|
22
|
+
|
|
23
|
+
- Enrich the "HelloWorld" LightningComponentBundle metadata component and use the org with alias "my-org":
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:HelloWorld --target-org my-org
|
|
26
|
+
|
|
27
|
+
- Enrich metadata for multiple LightningComponentBundles using your default org:
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:Component1 --metadata LightningComponentBundle:Component2
|
|
30
|
+
|
|
31
|
+
- Enrich metadata for multiple LightningComponentBundles using a matching wildcard:
|
|
32
|
+
|
|
33
|
+
<%= config.bin %> <%= command.id %> --metadata "LightningComponentBundle:Component\*"
|
|
34
|
+
|
|
35
|
+
# flags.metadata.summary
|
|
36
|
+
|
|
37
|
+
Metadata type and optional component name to enrich.
|
|
38
|
+
|
|
39
|
+
# flags.metadata.description
|
|
40
|
+
|
|
41
|
+
Wildcards ("_") are supported as long as you use double quotes, such as "LightningComponentBundle:MyClass_".
|
|
42
|
+
|
|
43
|
+
# spinner.setup
|
|
44
|
+
|
|
45
|
+
Setting up and retrieving project source components
|
|
46
|
+
|
|
47
|
+
# spinner.executing
|
|
48
|
+
|
|
49
|
+
Executing metadata enrichment for %s eligible components
|
|
50
|
+
|
|
51
|
+
# spinner.updating.files
|
|
52
|
+
|
|
53
|
+
Updating metadata configuration with enriched results
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# metrics.total.count
|
|
2
|
+
|
|
3
|
+
Total Components Processed: %s
|
|
4
|
+
|
|
5
|
+
# metrics.success.count
|
|
6
|
+
|
|
7
|
+
✓ Successfully Enriched: %s
|
|
8
|
+
|
|
9
|
+
# metrics.skipped.count
|
|
10
|
+
|
|
11
|
+
⊘ Skipped: %s
|
|
12
|
+
|
|
13
|
+
# metrics.fail.count
|
|
14
|
+
|
|
15
|
+
✗ Failed: %s
|
|
16
|
+
|
|
17
|
+
# metrics.message
|
|
18
|
+
|
|
19
|
+
Message: %s
|