@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.
@@ -0,0 +1,74 @@
1
+ {
2
+ "commands": {
3
+ "metadata:enrich": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "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.\n\nThis 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.\n\nTo enrich multiple metadata components, specify multiple --metadata <name> flags. Enclose names that contain spaces in double quotes.\n\nEven 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).\n\nCurrently, this command supports enriching only Lightning Web Components, represented by the LightningComponentBundle metadata type.",
7
+ "examples": [
8
+ "Enrich the \"HelloWorld\" LightningComponentBundle metadata component in the local DX project; use your default org:\n<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:HelloWorld",
9
+ "Enrich the \"HelloWorld\" LightningComponentBundle metadata component and use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:HelloWorld --target-org my-org",
10
+ "Enrich metadata for multiple LightningComponentBundles using your default org:\n<%= config.bin %> <%= command.id %> --metadata LightningComponentBundle:Component1 --metadata LightningComponentBundle:Component2",
11
+ "Enrich metadata for multiple LightningComponentBundles using a matching wildcard:\n<%= config.bin %> <%= command.id %> --metadata \"LightningComponentBundle:Component\\*\""
12
+ ],
13
+ "flags": {
14
+ "json": {
15
+ "description": "Format output as json.",
16
+ "helpGroup": "GLOBAL",
17
+ "name": "json",
18
+ "allowNo": false,
19
+ "type": "boolean"
20
+ },
21
+ "flags-dir": {
22
+ "helpGroup": "GLOBAL",
23
+ "name": "flags-dir",
24
+ "summary": "Import flag values from a directory.",
25
+ "hasDynamicHelp": false,
26
+ "multiple": false,
27
+ "type": "option"
28
+ },
29
+ "target-org": {
30
+ "char": "o",
31
+ "name": "target-org",
32
+ "noCacheDefault": true,
33
+ "required": true,
34
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
35
+ "hasDynamicHelp": true,
36
+ "multiple": false,
37
+ "type": "option"
38
+ },
39
+ "metadata": {
40
+ "char": "m",
41
+ "description": "Wildcards (\"_\") are supported as long as you use double quotes, such as \"LightningComponentBundle:MyClass_\".",
42
+ "name": "metadata",
43
+ "required": true,
44
+ "summary": "Metadata type and optional component name to enrich.",
45
+ "hasDynamicHelp": false,
46
+ "multiple": true,
47
+ "type": "option"
48
+ }
49
+ },
50
+ "hasDynamicHelp": true,
51
+ "hiddenAliases": [],
52
+ "id": "metadata:enrich",
53
+ "pluginAlias": "@salesforce/plugin-metadata-enrichment",
54
+ "pluginName": "@salesforce/plugin-metadata-enrichment",
55
+ "pluginType": "core",
56
+ "strict": true,
57
+ "summary": "Enrich metadata components in your DX project by adding AI-generated descriptions.",
58
+ "enableJsonFlag": true,
59
+ "isESM": true,
60
+ "relativePath": [
61
+ "lib",
62
+ "commands",
63
+ "metadata",
64
+ "enrich.js"
65
+ ],
66
+ "aliasPermutations": [],
67
+ "permutations": [
68
+ "metadata:enrich",
69
+ "enrich:metadata"
70
+ ]
71
+ }
72
+ },
73
+ "version": "0.0.1"
74
+ }
package/package.json ADDED
@@ -0,0 +1,207 @@
1
+ {
2
+ "name": "@salesforce/plugin-metadata-enrichment",
3
+ "description": "A Salesforce CLI plugin to enrich metadata for Salesforce resources",
4
+ "version": "0.0.1",
5
+ "author": "Salesforce",
6
+ "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "dependencies": {
8
+ "@oclif/core": "^4",
9
+ "@salesforce/core": "^8.24.0",
10
+ "@salesforce/kit": "^3.2.4",
11
+ "@salesforce/metadata-enrichment": "^0.0.1",
12
+ "@salesforce/sf-plugins-core": "^12",
13
+ "@salesforce/source-deploy-retrieve": "^12.0.1"
14
+ },
15
+ "devDependencies": {
16
+ "@oclif/plugin-command-snapshot": "^5.3.8",
17
+ "@salesforce/cli-plugins-testkit": "^5.3.41",
18
+ "@salesforce/dev-scripts": "^11.0.4",
19
+ "@salesforce/plugin-command-reference": "^3.1.79",
20
+ "@salesforce/source-testkit": "^2.2.172",
21
+ "eslint-plugin-sf-plugin": "^1.20.33",
22
+ "oclif": "^4.22.59",
23
+ "ts-node": "^10.9.2",
24
+ "typescript": "^5.5.4"
25
+ },
26
+ "engines": {
27
+ "node": ">=20.0.0"
28
+ },
29
+ "files": [
30
+ "/lib",
31
+ "/messages",
32
+ "/npm-shrinkwrap.json",
33
+ "/oclif.lock",
34
+ "/oclif.manifest.json",
35
+ "/schemas"
36
+ ],
37
+ "homepage": "https://github.com/salesforcecli/plugin-metadata-enrichment",
38
+ "keywords": [
39
+ "force",
40
+ "salesforce",
41
+ "salesforcedx",
42
+ "sf",
43
+ "sf-plugin",
44
+ "sfdx",
45
+ "sfdx-plugin"
46
+ ],
47
+ "license": "Apache-2.0",
48
+ "oclif": {
49
+ "commands": "./lib/commands",
50
+ "bin": "sf",
51
+ "topicSeparator": " ",
52
+ "devPlugins": [
53
+ "@oclif/plugin-help",
54
+ "@oclif/plugin-command-snapshot",
55
+ "@salesforce/plugin-command-reference"
56
+ ],
57
+ "topics": {
58
+ "metadata": {
59
+ "description": "Commands to enrich metadata for Salesforce resources"
60
+ }
61
+ },
62
+ "flexibleTaxonomy": true
63
+ },
64
+ "repository": "salesforcecli/plugin-metadata-enrichment",
65
+ "scripts": {
66
+ "build": "wireit",
67
+ "clean": "sf-clean",
68
+ "clean-all": "sf-clean all",
69
+ "compile": "wireit",
70
+ "docs": "sf-docs",
71
+ "fix-license": "eslint src test --fix --rule \"header/header: [2]\"",
72
+ "format": "wireit",
73
+ "link-check": "wireit",
74
+ "lint": "wireit",
75
+ "postpack": "sf-clean --ignore-signing-artifacts",
76
+ "prepack": "sf-prepack",
77
+ "prepare": "sf-install",
78
+ "test": "wireit",
79
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
80
+ "test:only": "wireit",
81
+ "version": "oclif readme"
82
+ },
83
+ "publishConfig": {
84
+ "access": "public"
85
+ },
86
+ "wireit": {
87
+ "build": {
88
+ "dependencies": [
89
+ "compile",
90
+ "lint"
91
+ ]
92
+ },
93
+ "compile": {
94
+ "command": "tsc -p . --pretty --incremental",
95
+ "files": [
96
+ "src/**/*.ts",
97
+ "**/tsconfig.json",
98
+ "messages/**"
99
+ ],
100
+ "output": [
101
+ "lib/**",
102
+ "*.tsbuildinfo"
103
+ ],
104
+ "clean": "if-file-deleted"
105
+ },
106
+ "format": {
107
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
108
+ "files": [
109
+ "src/**/*.ts",
110
+ "test/**/*.ts",
111
+ "schemas/**/*.json",
112
+ "command-snapshot.json",
113
+ ".prettier*"
114
+ ],
115
+ "output": []
116
+ },
117
+ "lint": {
118
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
119
+ "files": [
120
+ "src/**/*.ts",
121
+ "test/**/*.ts",
122
+ "messages/**",
123
+ "**/.eslint*",
124
+ "**/tsconfig.json"
125
+ ],
126
+ "output": []
127
+ },
128
+ "test:compile": {
129
+ "command": "tsc -p \"./test\" --pretty",
130
+ "files": [
131
+ "test/**/*.ts",
132
+ "**/tsconfig.json"
133
+ ],
134
+ "output": []
135
+ },
136
+ "test": {
137
+ "dependencies": [
138
+ "test:compile",
139
+ "test:only",
140
+ "test:command-reference",
141
+ "test:deprecation-policy",
142
+ "lint",
143
+ "test:json-schema",
144
+ "link-check"
145
+ ]
146
+ },
147
+ "test:only": {
148
+ "command": "nyc mocha \"test/**/*.test.ts\"",
149
+ "env": {
150
+ "FORCE_COLOR": "2"
151
+ },
152
+ "files": [
153
+ "test/**/*.ts",
154
+ "src/**/*.ts",
155
+ "**/tsconfig.json",
156
+ ".mocha*",
157
+ "!*.nut.ts",
158
+ ".nycrc"
159
+ ],
160
+ "output": []
161
+ },
162
+ "test:command-reference": {
163
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
164
+ "files": [
165
+ "src/**/*.ts",
166
+ "messages/**",
167
+ "package.json"
168
+ ],
169
+ "output": [
170
+ "tmp/root"
171
+ ]
172
+ },
173
+ "test:deprecation-policy": {
174
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:compare",
175
+ "files": [
176
+ "src/**/*.ts"
177
+ ],
178
+ "output": [],
179
+ "dependencies": [
180
+ "compile"
181
+ ]
182
+ },
183
+ "test:json-schema": {
184
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" schema:compare",
185
+ "files": [
186
+ "src/**/*.ts",
187
+ "schemas"
188
+ ],
189
+ "output": []
190
+ },
191
+ "link-check": {
192
+ "command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|localhost|%s\" --markdown --retry --directory-listing --verbosity error",
193
+ "files": [
194
+ "./*.md",
195
+ "./!(CHANGELOG).md",
196
+ "messages/**/*.md"
197
+ ],
198
+ "output": []
199
+ }
200
+ },
201
+ "exports": "./lib/index.js",
202
+ "type": "module",
203
+ "sfdx": {
204
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.1.crt",
205
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-metadata-enrichment/0.0.1.sig"
206
+ }
207
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/EnrichmentMetrics",
4
+ "definitions": {
5
+ "EnrichmentMetrics": {
6
+ "type": "object",
7
+ "properties": {
8
+ "success": {
9
+ "type": "object",
10
+ "properties": {
11
+ "count": {
12
+ "type": "number"
13
+ },
14
+ "components": {
15
+ "type": "array",
16
+ "items": {
17
+ "$ref": "#/definitions/ComponentEnrichmentStatus"
18
+ }
19
+ }
20
+ },
21
+ "required": ["count", "components"],
22
+ "additionalProperties": false
23
+ },
24
+ "fail": {
25
+ "type": "object",
26
+ "properties": {
27
+ "count": {
28
+ "type": "number"
29
+ },
30
+ "components": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/ComponentEnrichmentStatus"
34
+ }
35
+ }
36
+ },
37
+ "required": ["count", "components"],
38
+ "additionalProperties": false
39
+ },
40
+ "skipped": {
41
+ "type": "object",
42
+ "properties": {
43
+ "count": {
44
+ "type": "number"
45
+ },
46
+ "components": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/ComponentEnrichmentStatus"
50
+ }
51
+ }
52
+ },
53
+ "required": ["count", "components"],
54
+ "additionalProperties": false
55
+ },
56
+ "total": {
57
+ "type": "number"
58
+ }
59
+ },
60
+ "required": ["success", "fail", "skipped", "total"],
61
+ "additionalProperties": false
62
+ },
63
+ "ComponentEnrichmentStatus": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "message": {
68
+ "type": "string"
69
+ },
70
+ "typeName": {
71
+ "type": "string"
72
+ },
73
+ "componentName": {
74
+ "type": "string"
75
+ }
76
+ },
77
+ "required": ["componentName", "message", "typeName"]
78
+ }
79
+ }
80
+ }