@salesforce/cli 2.12.7-esm.0 → 2.12.7
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 +54 -42
- package/bin/dev +13 -0
- package/bin/run +25 -0
- package/dist/cli.js +40 -34
- package/dist/flags.js +7 -1
- package/dist/help/sfCommandHelp.js +6 -2
- package/dist/help/sfHelp.js +8 -5
- package/dist/hooks/display-release-notes.js +39 -14
- package/dist/hooks/incomplete.js +12 -11
- package/dist/hooks/pluginsPreinstall.js +5 -3
- package/dist/hooks/prerun.js +8 -7
- package/dist/index.js +2 -1
- package/dist/util/env.js +7 -3
- package/npm-shrinkwrap.json +2862 -3364
- package/oclif.manifest.json +1 -1
- package/package.json +24 -99
- package/scripts/post-install-release-notes.js +37 -39
- package/scripts/preinstall.js +4 -5
- package/bin/dev.js +0 -7
- package/bin/run.js +0 -30
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/cli",
|
|
3
3
|
"description": "The Salesforce CLI",
|
|
4
|
-
"version": "2.12.7
|
|
4
|
+
"version": "2.12.7",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
|
-
"sf": "./bin/run
|
|
8
|
-
"sfdx": "./bin/run
|
|
7
|
+
"sf": "./bin/run",
|
|
8
|
+
"sfdx": "./bin/run"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://github.com/salesforcecli/cli",
|
|
11
11
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": ">=14.0.0"
|
|
14
14
|
},
|
|
15
15
|
"packageManager": "yarn@1.22.19",
|
|
16
16
|
"files": [
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"sf"
|
|
28
28
|
],
|
|
29
29
|
"license": "BSD-3-Clause",
|
|
30
|
-
"
|
|
31
|
-
"type": "module",
|
|
30
|
+
"main": "dist/index.js",
|
|
32
31
|
"oclif": {
|
|
33
32
|
"bin": "sf",
|
|
34
33
|
"binAliases": [
|
|
@@ -122,7 +121,7 @@
|
|
|
122
121
|
]
|
|
123
122
|
},
|
|
124
123
|
"dependencies": {
|
|
125
|
-
"@oclif/core": "
|
|
124
|
+
"@oclif/core": "2.15.0",
|
|
126
125
|
"@oclif/plugin-autocomplete": "2.3.9",
|
|
127
126
|
"@oclif/plugin-commands": "2.2.27",
|
|
128
127
|
"@oclif/plugin-help": "5.2.20",
|
|
@@ -137,21 +136,21 @@
|
|
|
137
136
|
"@salesforce/plugin-apex": "2.3.17",
|
|
138
137
|
"@salesforce/plugin-auth": "2.8.19",
|
|
139
138
|
"@salesforce/plugin-data": "2.5.15",
|
|
140
|
-
"@salesforce/plugin-deploy-retrieve": "1.18.
|
|
139
|
+
"@salesforce/plugin-deploy-retrieve": "1.18.5",
|
|
141
140
|
"@salesforce/plugin-info": "2.6.48",
|
|
142
141
|
"@salesforce/plugin-limits": "2.3.37",
|
|
143
142
|
"@salesforce/plugin-login": "1.2.34",
|
|
144
143
|
"@salesforce/plugin-marketplace": "0.2.3",
|
|
145
|
-
"@salesforce/plugin-org": "2.10.
|
|
144
|
+
"@salesforce/plugin-org": "2.10.10",
|
|
146
145
|
"@salesforce/plugin-schema": "2.3.29",
|
|
147
|
-
"@salesforce/plugin-settings": "1.4.
|
|
146
|
+
"@salesforce/plugin-settings": "1.4.33",
|
|
148
147
|
"@salesforce/plugin-sobject": "0.2.10",
|
|
149
148
|
"@salesforce/plugin-source": "2.10.39",
|
|
150
149
|
"@salesforce/plugin-telemetry": "2.3.6",
|
|
151
150
|
"@salesforce/plugin-templates": "55.5.14",
|
|
152
151
|
"@salesforce/plugin-trust": "2.6.16",
|
|
153
152
|
"@salesforce/plugin-user": "2.3.35",
|
|
154
|
-
"@salesforce/sf-plugins-core": "
|
|
153
|
+
"@salesforce/sf-plugins-core": "3.1.28",
|
|
155
154
|
"debug": "^4.3.4",
|
|
156
155
|
"tslib": "^2.4.1"
|
|
157
156
|
},
|
|
@@ -194,14 +193,14 @@
|
|
|
194
193
|
},
|
|
195
194
|
"repository": "salesforcecli/cli",
|
|
196
195
|
"scripts": {
|
|
197
|
-
"build": "
|
|
196
|
+
"build": "sf-build",
|
|
198
197
|
"channel:promote": "sf-release channel:promote",
|
|
199
198
|
"clean": "sf-clean",
|
|
200
199
|
"clean-all": "sf-clean all",
|
|
201
|
-
"compile": "
|
|
200
|
+
"compile": "sf-compile",
|
|
202
201
|
"docs": "sf-docs",
|
|
203
|
-
"format": "
|
|
204
|
-
"lint": "
|
|
202
|
+
"format": "sf-format",
|
|
203
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
205
204
|
"oclif-artifacts": "oclif manifest",
|
|
206
205
|
"pack:deb": "oclif pack:deb",
|
|
207
206
|
"pack:macos": "oclif pack:macos",
|
|
@@ -216,13 +215,13 @@
|
|
|
216
215
|
"prepare": "sf-install && yarn compile && yarn lint",
|
|
217
216
|
"prepublishOnly": "npm shrinkwrap",
|
|
218
217
|
"pretarball": "sf-release cli:tarballs:prepare --types",
|
|
218
|
+
"pretest": "echo disable # sf-compile-test",
|
|
219
219
|
"promote": "oclif promote",
|
|
220
220
|
"promote-dist-tags": "./scripts/promote-dist-tags",
|
|
221
221
|
"promote:verify": "sf-release cli:versions:inspect --channels stable --locations archive --cli sf",
|
|
222
222
|
"promote:verify-rc": "sf-release cli:versions:inspect --channels stable-rc --locations archive --cli sf",
|
|
223
|
-
"test": "
|
|
223
|
+
"test": "sf-test",
|
|
224
224
|
"test:deprecation-policy": "sf-release cli:artifacts:compare",
|
|
225
|
-
"test:only": "wireit",
|
|
226
225
|
"test:smoke-unix": "sf-release cli:tarballs:smoke",
|
|
227
226
|
"upload:deb": "oclif upload:deb",
|
|
228
227
|
"upload:macos": "oclif upload:macos",
|
|
@@ -232,20 +231,20 @@
|
|
|
232
231
|
},
|
|
233
232
|
"types": "dist/index.d.ts",
|
|
234
233
|
"devDependencies": {
|
|
235
|
-
"@oclif/plugin-command-snapshot": "^
|
|
234
|
+
"@oclif/plugin-command-snapshot": "^3.3.0",
|
|
236
235
|
"@salesforce/dev-config": "^4.0.1",
|
|
237
|
-
"@salesforce/dev-scripts": "^
|
|
238
|
-
"@salesforce/plugin-release-management": "^4.4.
|
|
236
|
+
"@salesforce/dev-scripts": "^3.1.1",
|
|
237
|
+
"@salesforce/plugin-release-management": "^4.4.0",
|
|
239
238
|
"@salesforce/prettier-config": "^0.0.3",
|
|
240
|
-
"@salesforce/ts-sinon": "^1.4.
|
|
239
|
+
"@salesforce/ts-sinon": "^1.4.17",
|
|
241
240
|
"@types/debug": "^4.1.9",
|
|
242
241
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
243
242
|
"@typescript-eslint/parser": "^5.62.0",
|
|
244
243
|
"aws-sdk": "^2.1464.0",
|
|
245
244
|
"chai": "^4.3.8",
|
|
246
245
|
"eslint": "^8.50.0",
|
|
247
|
-
"eslint-config-oclif": "^
|
|
248
|
-
"eslint-config-oclif-typescript": "^2.0
|
|
246
|
+
"eslint-config-oclif": "^3.1",
|
|
247
|
+
"eslint-config-oclif-typescript": "^0.2.0",
|
|
249
248
|
"eslint-config-prettier": "^8.10.0",
|
|
250
249
|
"eslint-config-salesforce": "^2.0.2",
|
|
251
250
|
"eslint-config-salesforce-license": "^0.2.0",
|
|
@@ -260,82 +259,8 @@
|
|
|
260
259
|
"oclif": "^3.17.1",
|
|
261
260
|
"prettier": "^2.8.8",
|
|
262
261
|
"pretty-quick": "^3.1.3",
|
|
263
|
-
"sinon": "^
|
|
262
|
+
"sinon": "^11.1.2",
|
|
264
263
|
"ts-node": "^10.9.1",
|
|
265
|
-
"typescript": "^4.9.5"
|
|
266
|
-
"wireit": "^0.9.5"
|
|
267
|
-
},
|
|
268
|
-
"wireit": {
|
|
269
|
-
"build": {
|
|
270
|
-
"dependencies": [
|
|
271
|
-
"compile",
|
|
272
|
-
"lint"
|
|
273
|
-
]
|
|
274
|
-
},
|
|
275
|
-
"compile": {
|
|
276
|
-
"command": "tsc -p . --pretty --incremental",
|
|
277
|
-
"files": [
|
|
278
|
-
"src/**/*.ts",
|
|
279
|
-
"**/tsconfig.json",
|
|
280
|
-
"messages/**"
|
|
281
|
-
],
|
|
282
|
-
"output": [
|
|
283
|
-
"lib/**",
|
|
284
|
-
"*.tsbuildinfo"
|
|
285
|
-
],
|
|
286
|
-
"clean": "if-file-deleted"
|
|
287
|
-
},
|
|
288
|
-
"format": {
|
|
289
|
-
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
|
|
290
|
-
"files": [
|
|
291
|
-
"src/**/*.ts",
|
|
292
|
-
"test/**/*.ts",
|
|
293
|
-
"schemas/**/*.json",
|
|
294
|
-
"command-snapshot.json",
|
|
295
|
-
".prettier*"
|
|
296
|
-
],
|
|
297
|
-
"output": []
|
|
298
|
-
},
|
|
299
|
-
"lint": {
|
|
300
|
-
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
301
|
-
"files": [
|
|
302
|
-
"src/**/*.ts",
|
|
303
|
-
"test/**/*.ts",
|
|
304
|
-
"messages/**",
|
|
305
|
-
"**/.eslint*",
|
|
306
|
-
"**/tsconfig.json"
|
|
307
|
-
],
|
|
308
|
-
"output": []
|
|
309
|
-
},
|
|
310
|
-
"test:compile": {
|
|
311
|
-
"command": "tsc -p \"./test\" --pretty",
|
|
312
|
-
"files": [
|
|
313
|
-
"test/**/*.ts",
|
|
314
|
-
"**/tsconfig.json"
|
|
315
|
-
],
|
|
316
|
-
"output": []
|
|
317
|
-
},
|
|
318
|
-
"test": {
|
|
319
|
-
"dependencies": [
|
|
320
|
-
"test:compile",
|
|
321
|
-
"test:only",
|
|
322
|
-
"lint"
|
|
323
|
-
]
|
|
324
|
-
},
|
|
325
|
-
"test:only": {
|
|
326
|
-
"command": "nyc mocha \"test/**/*.test.ts\"",
|
|
327
|
-
"env": {
|
|
328
|
-
"FORCE_COLOR": "2"
|
|
329
|
-
},
|
|
330
|
-
"files": [
|
|
331
|
-
"test/**/*.ts",
|
|
332
|
-
"src/**/*.ts",
|
|
333
|
-
"**/tsconfig.json",
|
|
334
|
-
".mocha*",
|
|
335
|
-
"!*.nut.ts",
|
|
336
|
-
".nycrc"
|
|
337
|
-
],
|
|
338
|
-
"output": []
|
|
339
|
-
}
|
|
264
|
+
"typescript": "^4.9.5"
|
|
340
265
|
}
|
|
341
266
|
}
|
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
})();
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
|
|
6
|
+
if (process.env.SF_HIDE_RELEASE_NOTES === 'true') process.exit(0);
|
|
7
|
+
|
|
8
|
+
const logAndExit = (msg) => {
|
|
9
|
+
console.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
10
|
+
console.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
11
|
+
console.log(msg.toString());
|
|
12
|
+
|
|
13
|
+
process.exit(0);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
|
|
18
|
+
* https://github.com/salesforcecli/sfdx-cli/pull/407
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var executable = process.platform === 'win32' ? 'run.cmd' : 'run';
|
|
22
|
+
|
|
23
|
+
var cmd = spawn(join(__dirname, '..', 'bin', executable), ['whatsnew', '--hook'], {
|
|
24
|
+
stdio: ['ignore', 'inherit', 'pipe'],
|
|
25
|
+
timeout: 10000,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
cmd.stderr.on('data', (error) => {
|
|
29
|
+
logAndExit(error);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
cmd.on('error', (error) => {
|
|
33
|
+
logAndExit(error);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// 'exit' fires whether or not the stream are finished
|
|
37
|
+
cmd.on('exit', (code) => {
|
|
38
|
+
process.exit(0);
|
|
39
|
+
});
|
package/scripts/preinstall.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
3
|
+
(() => {
|
|
3
4
|
const testCliNotVersion = (cli, version) => {
|
|
4
5
|
try {
|
|
5
6
|
return execSync(`${cli} --version`).toString('utf-8').includes(version);
|
|
@@ -10,8 +11,6 @@ void (async () => {
|
|
|
10
11
|
};
|
|
11
12
|
// test sfdx is installed
|
|
12
13
|
if (testCliNotVersion('sfdx', 'sfdx-cli/7.')) {
|
|
13
|
-
throw Error(
|
|
14
|
-
'"sf@2.x" has a bin alias for "sfdx", please uninstall sfdx-cli first. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm for more information'
|
|
15
|
-
);
|
|
14
|
+
throw Error('"sf@2.x" has a bin alias for "sfdx", please uninstall sfdx-cli first. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm for more information');
|
|
16
15
|
}
|
|
17
16
|
})();
|
package/bin/dev.js
DELETED
package/bin/run.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
void (async () => {
|
|
4
|
-
// Since the CLI is a single process, we can have a larger amount of max listeners since
|
|
5
|
-
// the process gets shut down. Don't set it to 0 (no limit) since we should still be aware
|
|
6
|
-
// of rouge event listeners
|
|
7
|
-
process.setMaxListeners(parseInt(process.env.SF_MAX_EVENT_LISTENERS, 10) || 1000);
|
|
8
|
-
|
|
9
|
-
// Don't let other plugins override the CLI specified max listener count
|
|
10
|
-
process.setMaxListeners = () => {};
|
|
11
|
-
|
|
12
|
-
// Pre-process/prune flags before creating or running the actual CLI
|
|
13
|
-
(await import('../dist/flags.js')).preprocessCliFlags(process);
|
|
14
|
-
|
|
15
|
-
const oclif = await import('@oclif/core');
|
|
16
|
-
const { createRequire } = await import('module');
|
|
17
|
-
const pjson = createRequire(import.meta.url)('../package.json');
|
|
18
|
-
|
|
19
|
-
const cli = await import('../dist/cli.js');
|
|
20
|
-
|
|
21
|
-
cli
|
|
22
|
-
.create({ version: pjson.version, bin: pjson.oclif.bin, channel: 'stable' })
|
|
23
|
-
.run()
|
|
24
|
-
.then(async () => {
|
|
25
|
-
await oclif.flush();
|
|
26
|
-
})
|
|
27
|
-
.catch(async (err) => {
|
|
28
|
-
await oclif.handle(err);
|
|
29
|
-
});
|
|
30
|
-
})();
|