@salesforce/plugin-metadata-enrichment 0.0.2 → 0.0.4

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 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.2/src/commands/metadata/enrich.ts)_
131
+ _See code: [src/commands/metadata/enrich.ts](https://github.com/salesforcecli/plugin-metadata-enrichment/blob/0.0.4/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 { SourceComponentProcessor, 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,8 +59,8 @@ export default class MetadataEnrich extends SfCommand {
62
59
  },
63
60
  });
64
61
  const projectSourceComponents = projectComponentSet.getSourceComponents().toArray();
65
- const enrichmentRecords = new EnrichmentRecords(projectSourceComponents, errorsMessages);
66
- const componentsToSkip = ComponentProcessor.getComponentsToSkip(projectSourceComponents, metadataEntries, project.getPath());
62
+ const enrichmentRecords = new EnrichmentRecords(projectSourceComponents);
63
+ const componentsToSkip = SourceComponentProcessor.getComponentsToSkip(projectSourceComponents, metadataEntries, project.getPath());
67
64
  enrichmentRecords.addSkippedComponents(componentsToSkip);
68
65
  enrichmentRecords.updateWithStatus(componentsToSkip, EnrichmentStatus.SKIPPED);
69
66
  enrichmentRecords.generateSkipReasons(componentsToSkip, projectSourceComponents);
@@ -82,7 +79,7 @@ export default class MetadataEnrich extends SfCommand {
82
79
  const enrichmentResults = await EnrichmentHandler.enrich(connection, componentsEligibleToProcess);
83
80
  enrichmentRecords.updateWithResults(enrichmentResults);
84
81
  mso.next();
85
- const fileUpdatedRecords = await FileProcessor.updateMetadataFiles(componentsEligibleToProcess, enrichmentRecords.recordSet);
82
+ const fileUpdatedRecords = await FileProcessor.updateMetadata(componentsEligibleToProcess, enrichmentRecords.recordSet);
86
83
  enrichmentRecords.updateWithResults(Array.from(fileUpdatedRecords));
87
84
  mso.stop();
88
85
  const metrics = EnrichmentMetrics.createEnrichmentMetrics(Array.from(enrichmentRecords.recordSet));
@@ -94,18 +91,21 @@ export default class MetadataEnrich extends SfCommand {
94
91
  status: 'Success',
95
92
  type: c.typeName,
96
93
  component: c.componentName,
94
+ requestId: c.requestId,
97
95
  message: c.message,
98
96
  })),
99
97
  ...metrics.skipped.components.map((c) => ({
100
98
  status: 'Skipped',
101
99
  type: c.typeName,
102
100
  component: c.componentName,
101
+ requestId: c.requestId,
103
102
  message: c.message,
104
103
  })),
105
104
  ...metrics.fail.components.map((c) => ({
106
105
  status: 'Failed',
107
106
  type: c.typeName,
108
107
  component: c.componentName,
108
+ requestId: c.requestId,
109
109
  message: c.message,
110
110
  })),
111
111
  ];
@@ -116,6 +116,7 @@ export default class MetadataEnrich extends SfCommand {
116
116
  { key: 'status', name: 'Status' },
117
117
  { key: 'type', name: 'Type' },
118
118
  { key: 'component', name: 'Component' },
119
+ { key: 'requestId', name: 'Request ID' },
119
120
  { key: 'message', name: 'Message' },
120
121
  ],
121
122
  data: tableRows,
@@ -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,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACxH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,CAAC;AAC3G,MAAM,cAAc,GAAG,QAAQ,CAAC,YAAY,CAAC,wCAAwC,EAAE,QAAQ,CAAC,CAAC;AACjG,MAAM,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,wCAAwC,EAAE,SAAS,CAAC,CAAC;AAEnG,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAA4B;IAC/D,MAAM,CAAU,OAAO,GAAG,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAChE,MAAM,CAAU,WAAW,GAAG,eAAe,CAAC,UAAU,CA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
  "name": "@salesforce/plugin-metadata-enrichment",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-metadata-enrichment",
9
- "version": "0.0.2",
9
+ "version": "0.0.4",
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.1",
17
+ "@salesforce/metadata-enrichment": "^0.0.6",
18
18
  "@salesforce/sf-plugins-core": "^12",
19
19
  "@salesforce/source-deploy-retrieve": "^12.0.1"
20
20
  },
@@ -1124,7 +1124,6 @@
1124
1124
  "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
1125
1125
  "dev": true,
1126
1126
  "license": "MIT",
1127
- "peer": true,
1128
1127
  "dependencies": {
1129
1128
  "@babel/code-frame": "^7.29.0",
1130
1129
  "@babel/generator": "^7.29.0",
@@ -1664,8 +1663,7 @@
1664
1663
  "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz",
1665
1664
  "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==",
1666
1665
  "dev": true,
1667
- "license": "MIT",
1668
- "peer": true
1666
+ "license": "MIT"
1669
1667
  },
1670
1668
  "node_modules/@commitlint/load/node_modules/cosmiconfig-typescript-loader": {
1671
1669
  "version": "4.4.0",
@@ -4192,9 +4190,9 @@
4192
4190
  }
4193
4191
  },
4194
4192
  "node_modules/@salesforce/metadata-enrichment": {
4195
- "version": "0.0.1",
4196
- "resolved": "https://registry.npmjs.org/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.1.tgz",
4197
- "integrity": "sha512-8w3PKpgmXi6u0uKZCfuQ7f7YceivYml/92GSB5fHKSrIHFppBx2tVKgJPlauEnvyNj685HSxs7HPSMZ2bZWdJQ==",
4193
+ "version": "0.0.6",
4194
+ "resolved": "https://registry.npmjs.org/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.6.tgz",
4195
+ "integrity": "sha512-pFH6vpJoXPTLS7679g3GaKeNbkfwCtJVKWrTJUoLi8aYP9dec6LRsnBB7/RU1pU5jZ51/C3lLILALVt5S7rdfA==",
4198
4196
  "license": "Apache-2.0",
4199
4197
  "dependencies": {
4200
4198
  "@salesforce/core": "^8.24.0",
@@ -5795,7 +5793,6 @@
5795
5793
  "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
5796
5794
  "dev": true,
5797
5795
  "license": "BSD-2-Clause",
5798
- "peer": true,
5799
5796
  "dependencies": {
5800
5797
  "@typescript-eslint/scope-manager": "6.21.0",
5801
5798
  "@typescript-eslint/types": "6.21.0",
@@ -5993,7 +5990,6 @@
5993
5990
  "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
5994
5991
  "dev": true,
5995
5992
  "license": "MIT",
5996
- "peer": true,
5997
5993
  "bin": {
5998
5994
  "acorn": "bin/acorn"
5999
5995
  },
@@ -6568,7 +6564,6 @@
6568
6564
  }
6569
6565
  ],
6570
6566
  "license": "MIT",
6571
- "peer": true,
6572
6567
  "dependencies": {
6573
6568
  "baseline-browser-mapping": "^2.9.0",
6574
6569
  "caniuse-lite": "^1.0.30001759",
@@ -7498,7 +7493,6 @@
7498
7493
  "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
7499
7494
  "dev": true,
7500
7495
  "license": "MIT",
7501
- "peer": true,
7502
7496
  "dependencies": {
7503
7497
  "import-fresh": "^3.3.0",
7504
7498
  "js-yaml": "^4.1.0",
@@ -8312,7 +8306,6 @@
8312
8306
  "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
8313
8307
  "dev": true,
8314
8308
  "license": "MIT",
8315
- "peer": true,
8316
8309
  "dependencies": {
8317
8310
  "@eslint-community/eslint-utils": "^4.2.0",
8318
8311
  "@eslint-community/regexpp": "^4.6.1",
@@ -13682,7 +13675,6 @@
13682
13675
  "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
13683
13676
  "dev": true,
13684
13677
  "license": "MIT",
13685
- "peer": true,
13686
13678
  "bin": {
13687
13679
  "prettier": "bin-prettier.js"
13688
13680
  },
@@ -13981,7 +13973,6 @@
13981
13973
  "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
13982
13974
  "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
13983
13975
  "license": "MIT",
13984
- "peer": true,
13985
13976
  "dependencies": {
13986
13977
  "loose-envify": "^1.1.0"
13987
13978
  },
@@ -15568,7 +15559,6 @@
15568
15559
  "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
15569
15560
  "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
15570
15561
  "license": "MIT",
15571
- "peer": true,
15572
15562
  "engines": {
15573
15563
  "node": ">=12"
15574
15564
  },
@@ -15750,7 +15740,6 @@
15750
15740
  "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
15751
15741
  "dev": true,
15752
15742
  "license": "MIT",
15753
- "peer": true,
15754
15743
  "dependencies": {
15755
15744
  "@cspotcode/source-map-support": "^0.8.0",
15756
15745
  "@tsconfig/node10": "^1.0.7",
@@ -15828,8 +15817,7 @@
15828
15817
  "version": "2.8.1",
15829
15818
  "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
15830
15819
  "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
15831
- "license": "0BSD",
15832
- "peer": true
15820
+ "license": "0BSD"
15833
15821
  },
15834
15822
  "node_modules/tunnel-agent": {
15835
15823
  "version": "0.6.0",
@@ -16019,7 +16007,6 @@
16019
16007
  "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
16020
16008
  "dev": true,
16021
16009
  "license": "Apache-2.0",
16022
- "peer": true,
16023
16010
  "bin": {
16024
16011
  "tsc": "bin/tsc",
16025
16012
  "tsserver": "bin/tsserver"
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.1":
1743
- version "0.0.1"
1744
- resolved "https://registry.yarnpkg.com/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.1.tgz#e685e3bb9676dc1141b23880a10ccc098a88ecdb"
1745
- integrity sha512-8w3PKpgmXi6u0uKZCfuQ7f7YceivYml/92GSB5fHKSrIHFppBx2tVKgJPlauEnvyNj685HSxs7HPSMZ2bZWdJQ==
1742
+ "@salesforce/metadata-enrichment@^0.0.6":
1743
+ version "0.0.6"
1744
+ resolved "https://registry.yarnpkg.com/@salesforce/metadata-enrichment/-/metadata-enrichment-0.0.6.tgz#c80932f67c65c36ba6eae14e666dea141efaf495"
1745
+ integrity sha512-pFH6vpJoXPTLS7679g3GaKeNbkfwCtJVKWrTJUoLi8aYP9dec6LRsnBB7/RU1pU5jZ51/C3lLILALVt5S7rdfA==
1746
1746
  dependencies:
1747
1747
  "@salesforce/core" "^8.24.0"
1748
1748
  "@salesforce/kit" "^3.2.4"
@@ -71,5 +71,5 @@
71
71
  ]
72
72
  }
73
73
  },
74
- "version": "0.0.2"
74
+ "version": "0.0.4"
75
75
  }
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.2",
4
+ "version": "0.0.4",
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.1",
13
+ "@salesforce/metadata-enrichment": "^0.0.6",
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.2.crt",
207
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.2.sig"
206
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.4.crt",
207
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.4.sig"
208
208
  }
209
209
  }
@@ -18,7 +18,10 @@
18
18
  }
19
19
  }
20
20
  },
21
- "required": ["count", "components"],
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": ["count", "components"],
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": ["count", "components"],
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": ["success", "fail", "skipped", "total"],
61
- "additionalProperties": false
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",
@@ -67,6 +82,9 @@
67
82
  "message": {
68
83
  "type": "string"
69
84
  },
85
+ "requestId": {
86
+ "type": "string"
87
+ },
70
88
  "typeName": {
71
89
  "type": "string"
72
90
  },
@@ -74,7 +92,11 @@
74
92
  "type": "string"
75
93
  }
76
94
  },
77
- "required": ["componentName", "message", "typeName"]
95
+ "required": [
96
+ "componentName",
97
+ "message",
98
+ "typeName"
99
+ ]
78
100
  }
79
101
  }
80
- }
102
+ }
@@ -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,MA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,CAAC,QAAQ,IAAI,SAAS,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"}
@@ -1 +0,0 @@
1
- export { ComponentProcessor } from './componentProcessor.js';
@@ -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,KAAK,MAAM,SAAS,IAAI,uBAAuB,EAAE,CAAC;YAChD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,I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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"}
@@ -1 +0,0 @@
1
- export { EnrichmentRecords } from './enrichmentRecords.js';
@@ -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
@@ -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"}