@salesforce/cli 2.12.5 → 2.12.7-esm.0
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 +5 -5
- package/bin/dev.js +7 -0
- package/bin/run.js +30 -0
- package/dist/cli.js +34 -40
- package/dist/flags.js +1 -7
- package/dist/help/sfCommandHelp.js +2 -6
- package/dist/help/sfHelp.js +5 -8
- package/dist/hooks/display-release-notes.js +14 -39
- package/dist/hooks/incomplete.js +11 -12
- package/dist/hooks/pluginsPreinstall.js +3 -5
- package/dist/hooks/prerun.js +7 -8
- package/dist/index.js +1 -2
- package/dist/util/env.js +3 -7
- package/npm-shrinkwrap.json +3384 -2882
- package/oclif.manifest.json +1 -1
- package/package.json +96 -21
- package/scripts/post-install-release-notes.js +39 -37
- package/scripts/preinstall.js +5 -4
- package/bin/dev +0 -13
- package/bin/run +0 -25
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.
|
|
4
|
+
"version": "2.12.7-esm.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
|
-
"sf": "./bin/run",
|
|
8
|
-
"sfdx": "./bin/run"
|
|
7
|
+
"sf": "./bin/run.js",
|
|
8
|
+
"sfdx": "./bin/run.js"
|
|
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": ">=16.0.0"
|
|
14
14
|
},
|
|
15
15
|
"packageManager": "yarn@1.22.19",
|
|
16
16
|
"files": [
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"sf"
|
|
28
28
|
],
|
|
29
29
|
"license": "BSD-3-Clause",
|
|
30
|
-
"
|
|
30
|
+
"exports": "./dist/index.js",
|
|
31
|
+
"type": "module",
|
|
31
32
|
"oclif": {
|
|
32
33
|
"bin": "sf",
|
|
33
34
|
"binAliases": [
|
|
@@ -121,7 +122,7 @@
|
|
|
121
122
|
]
|
|
122
123
|
},
|
|
123
124
|
"dependencies": {
|
|
124
|
-
"@oclif/core": "
|
|
125
|
+
"@oclif/core": "3.0.0-beta.22",
|
|
125
126
|
"@oclif/plugin-autocomplete": "2.3.9",
|
|
126
127
|
"@oclif/plugin-commands": "2.2.27",
|
|
127
128
|
"@oclif/plugin-help": "5.2.20",
|
|
@@ -144,13 +145,13 @@
|
|
|
144
145
|
"@salesforce/plugin-org": "2.10.9",
|
|
145
146
|
"@salesforce/plugin-schema": "2.3.29",
|
|
146
147
|
"@salesforce/plugin-settings": "1.4.32",
|
|
147
|
-
"@salesforce/plugin-sobject": "0.2.
|
|
148
|
+
"@salesforce/plugin-sobject": "0.2.10",
|
|
148
149
|
"@salesforce/plugin-source": "2.10.39",
|
|
149
150
|
"@salesforce/plugin-telemetry": "2.3.6",
|
|
150
151
|
"@salesforce/plugin-templates": "55.5.14",
|
|
151
152
|
"@salesforce/plugin-trust": "2.6.16",
|
|
152
153
|
"@salesforce/plugin-user": "2.3.35",
|
|
153
|
-
"@salesforce/sf-plugins-core": "
|
|
154
|
+
"@salesforce/sf-plugins-core": "4.0.0-beta.4",
|
|
154
155
|
"debug": "^4.3.4",
|
|
155
156
|
"tslib": "^2.4.1"
|
|
156
157
|
},
|
|
@@ -193,14 +194,14 @@
|
|
|
193
194
|
},
|
|
194
195
|
"repository": "salesforcecli/cli",
|
|
195
196
|
"scripts": {
|
|
196
|
-
"build": "
|
|
197
|
+
"build": "wireit",
|
|
197
198
|
"channel:promote": "sf-release channel:promote",
|
|
198
199
|
"clean": "sf-clean",
|
|
199
200
|
"clean-all": "sf-clean all",
|
|
200
|
-
"compile": "
|
|
201
|
+
"compile": "wireit",
|
|
201
202
|
"docs": "sf-docs",
|
|
202
|
-
"format": "
|
|
203
|
-
"lint": "
|
|
203
|
+
"format": "wireit",
|
|
204
|
+
"lint": "wireit",
|
|
204
205
|
"oclif-artifacts": "oclif manifest",
|
|
205
206
|
"pack:deb": "oclif pack:deb",
|
|
206
207
|
"pack:macos": "oclif pack:macos",
|
|
@@ -215,13 +216,13 @@
|
|
|
215
216
|
"prepare": "sf-install && yarn compile && yarn lint",
|
|
216
217
|
"prepublishOnly": "npm shrinkwrap",
|
|
217
218
|
"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": "wireit",
|
|
224
224
|
"test:deprecation-policy": "sf-release cli:artifacts:compare",
|
|
225
|
+
"test:only": "wireit",
|
|
225
226
|
"test:smoke-unix": "sf-release cli:tarballs:smoke",
|
|
226
227
|
"upload:deb": "oclif upload:deb",
|
|
227
228
|
"upload:macos": "oclif upload:macos",
|
|
@@ -231,10 +232,10 @@
|
|
|
231
232
|
},
|
|
232
233
|
"types": "dist/index.d.ts",
|
|
233
234
|
"devDependencies": {
|
|
234
|
-
"@oclif/plugin-command-snapshot": "^
|
|
235
|
+
"@oclif/plugin-command-snapshot": "^4.0.2",
|
|
235
236
|
"@salesforce/dev-config": "^4.0.1",
|
|
236
|
-
"@salesforce/dev-scripts": "^
|
|
237
|
-
"@salesforce/plugin-release-management": "^4.4.
|
|
237
|
+
"@salesforce/dev-scripts": "^5.10.0",
|
|
238
|
+
"@salesforce/plugin-release-management": "^4.4.7",
|
|
238
239
|
"@salesforce/prettier-config": "^0.0.3",
|
|
239
240
|
"@salesforce/ts-sinon": "^1.4.15",
|
|
240
241
|
"@types/debug": "^4.1.9",
|
|
@@ -243,8 +244,8 @@
|
|
|
243
244
|
"aws-sdk": "^2.1464.0",
|
|
244
245
|
"chai": "^4.3.8",
|
|
245
246
|
"eslint": "^8.50.0",
|
|
246
|
-
"eslint-config-oclif": "^
|
|
247
|
-
"eslint-config-oclif-typescript": "^
|
|
247
|
+
"eslint-config-oclif": "^5",
|
|
248
|
+
"eslint-config-oclif-typescript": "^2.0.1",
|
|
248
249
|
"eslint-config-prettier": "^8.10.0",
|
|
249
250
|
"eslint-config-salesforce": "^2.0.2",
|
|
250
251
|
"eslint-config-salesforce-license": "^0.2.0",
|
|
@@ -259,8 +260,82 @@
|
|
|
259
260
|
"oclif": "^3.17.1",
|
|
260
261
|
"prettier": "^2.8.8",
|
|
261
262
|
"pretty-quick": "^3.1.3",
|
|
262
|
-
"sinon": "^
|
|
263
|
+
"sinon": "^15.2.0",
|
|
263
264
|
"ts-node": "^10.9.1",
|
|
264
|
-
"typescript": "^4.9.5"
|
|
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
|
+
}
|
|
265
340
|
}
|
|
266
341
|
}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
cmd.stderr.on('data', (error) => {
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
cmd.on('error', (error) => {
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// 'exit' fires whether or not the stream
|
|
37
|
-
cmd.on('exit', (code) => {
|
|
38
|
-
|
|
39
|
-
});
|
|
3
|
+
void (async () => {
|
|
4
|
+
if (process.env.SF_HIDE_RELEASE_NOTES === 'true') process.exit(0);
|
|
5
|
+
|
|
6
|
+
const { spawn } = await import('node:child_process');
|
|
7
|
+
const { join } = await import('node:path');
|
|
8
|
+
const { fileURLToPath } = await import('node:url');
|
|
9
|
+
/*
|
|
10
|
+
* NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
|
|
11
|
+
* https://github.com/salesforcecli/sfdx-cli/pull/407
|
|
12
|
+
*/
|
|
13
|
+
await new Promise((resolve) => {
|
|
14
|
+
const logAndExit = (msg) => {
|
|
15
|
+
console.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
16
|
+
console.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
17
|
+
console.log(msg.toString());
|
|
18
|
+
|
|
19
|
+
resolve();
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const executable = process.platform === 'win32' ? 'run.cmd' : 'run.js';
|
|
23
|
+
const cmd = spawn(join(fileURLToPath(import.meta.url), '..', '..', '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 is finished
|
|
37
|
+
cmd.on('exit', (code) => {
|
|
38
|
+
resolve();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
})();
|
package/scripts/preinstall.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
(() => {
|
|
1
|
+
void (async () => {
|
|
2
|
+
const { execSync } = await import('node:child_process');
|
|
4
3
|
const testCliNotVersion = (cli, version) => {
|
|
5
4
|
try {
|
|
6
5
|
return execSync(`${cli} --version`).toString('utf-8').includes(version);
|
|
@@ -11,6 +10,8 @@ const { execSync } = require('child_process');
|
|
|
11
10
|
};
|
|
12
11
|
// test sfdx is installed
|
|
13
12
|
if (testCliNotVersion('sfdx', 'sfdx-cli/7.')) {
|
|
14
|
-
throw Error(
|
|
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
|
+
);
|
|
15
16
|
}
|
|
16
17
|
})();
|
package/bin/dev
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const oclif = require('@oclif/core');
|
|
4
|
-
|
|
5
|
-
require('ts-node').register();
|
|
6
|
-
|
|
7
|
-
oclif.settings.tsnodeEnabled = true;
|
|
8
|
-
oclif.settings.debug = true;
|
|
9
|
-
oclif.settings.performanceEnabled = true;
|
|
10
|
-
|
|
11
|
-
process.env.NODE_ENV = 'development';
|
|
12
|
-
|
|
13
|
-
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
|
package/bin/run
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// Since the CLI is a single process, we can have a larger amount of max listeners since
|
|
4
|
-
// the process gets shut down. Don't set it to 0 (no limit) since we should still be aware
|
|
5
|
-
// of rouge event listeners
|
|
6
|
-
process.setMaxListeners(parseInt(process.env.SF_MAX_EVENT_LISTENERS, 10) || 1000);
|
|
7
|
-
|
|
8
|
-
// Don't let other plugins override the CLI specified max listener count
|
|
9
|
-
process.setMaxListeners = () => {};
|
|
10
|
-
|
|
11
|
-
// Pre-process/prune flags before creating or running the actual CLI
|
|
12
|
-
require('../dist/flags').preprocessCliFlags(process);
|
|
13
|
-
|
|
14
|
-
const cli = require('../dist/cli');
|
|
15
|
-
const pjson = require('../package.json');
|
|
16
|
-
|
|
17
|
-
cli
|
|
18
|
-
.create(pjson.version, 'stable')
|
|
19
|
-
.run()
|
|
20
|
-
.then(function () {
|
|
21
|
-
require('@oclif/core/flush')();
|
|
22
|
-
})
|
|
23
|
-
.catch(function (err) {
|
|
24
|
-
require('@oclif/core/handle')(err);
|
|
25
|
-
});
|