@salesforce/cli 2.13.1-esm.0 → 2.13.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.
@@ -1,4 +1,5 @@
1
1
  {
2
+ "version": "2.13.1",
2
3
  "commands": {
3
4
  "cmdt:generate:field": {
4
5
  "id": "cmdt:generate:field",
@@ -6593,6 +6594,5 @@
6593
6594
  }
6594
6595
  ]
6595
6596
  }
6596
- },
6597
- "version": "2.13.1-esm.0"
6597
+ }
6598
6598
  }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
3
  "description": "The Salesforce CLI",
4
- "version": "2.13.1-esm.0",
4
+ "version": "2.13.1",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
- "sf": "./bin/run.js",
8
- "sfdx": "./bin/run.js"
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": ">=16.0.0"
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
- "exports": "./dist/index.js",
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": "3.0.3",
124
+ "@oclif/core": "2.15.0",
126
125
  "@oclif/plugin-autocomplete": "2.3.9",
127
126
  "@oclif/plugin-commands": "2.2.28",
128
127
  "@oclif/plugin-help": "5.2.20",
@@ -151,8 +150,9 @@
151
150
  "@salesforce/plugin-templates": "55.5.14",
152
151
  "@salesforce/plugin-trust": "2.6.18",
153
152
  "@salesforce/plugin-user": "2.3.35",
154
- "@salesforce/sf-plugins-core": "4.0.0",
155
- "debug": "^4.3.4"
153
+ "@salesforce/sf-plugins-core": "3.1.28",
154
+ "debug": "^4.3.4",
155
+ "tslib": "^2.4.1"
156
156
  },
157
157
  "pinnedDependencies": [
158
158
  "@oclif/plugin-autocomplete",
@@ -191,14 +191,14 @@
191
191
  },
192
192
  "repository": "salesforcecli/cli",
193
193
  "scripts": {
194
- "build": "wireit",
194
+ "build": "sf-build",
195
195
  "channel:promote": "sf-release channel:promote",
196
196
  "clean": "sf-clean",
197
197
  "clean-all": "sf-clean all",
198
- "compile": "wireit",
198
+ "compile": "sf-compile",
199
199
  "docs": "sf-docs",
200
- "format": "wireit",
201
- "lint": "wireit",
200
+ "format": "sf-format",
201
+ "lint": "eslint \"src/**/*.ts\"",
202
202
  "oclif-artifacts": "oclif manifest",
203
203
  "pack:deb": "oclif pack:deb",
204
204
  "pack:macos": "oclif pack:macos",
@@ -213,13 +213,13 @@
213
213
  "prepare": "sf-install && yarn compile && yarn lint",
214
214
  "prepublishOnly": "npm shrinkwrap",
215
215
  "pretarball": "sf-release cli:tarballs:prepare --types",
216
+ "pretest": "echo disable # sf-compile-test",
216
217
  "promote": "oclif promote",
217
218
  "promote-dist-tags": "./scripts/promote-dist-tags",
218
219
  "promote:verify": "sf-release cli:versions:inspect --channels stable --locations archive --cli sf",
219
220
  "promote:verify-rc": "sf-release cli:versions:inspect --channels stable-rc --locations archive --cli sf",
220
- "test": "wireit",
221
+ "test": "sf-test",
221
222
  "test:deprecation-policy": "sf-release cli:artifacts:compare",
222
- "test:only": "wireit",
223
223
  "test:smoke-unix": "sf-release cli:tarballs:smoke",
224
224
  "upload:deb": "oclif upload:deb",
225
225
  "upload:macos": "oclif upload:macos",
@@ -229,10 +229,10 @@
229
229
  },
230
230
  "types": "dist/index.d.ts",
231
231
  "devDependencies": {
232
- "@oclif/plugin-command-snapshot": "^4.0.2",
232
+ "@oclif/plugin-command-snapshot": "^3.3.0",
233
233
  "@salesforce/dev-config": "^4.0.1",
234
- "@salesforce/dev-scripts": "^5.10.0",
235
- "@salesforce/plugin-release-management": "^4.4.7",
234
+ "@salesforce/dev-scripts": "^3.1.1",
235
+ "@salesforce/plugin-release-management": "^4.4.0",
236
236
  "@salesforce/prettier-config": "^0.0.3",
237
237
  "@salesforce/ts-sinon": "^1.4.17",
238
238
  "@types/debug": "^4.1.9",
@@ -241,8 +241,8 @@
241
241
  "aws-sdk": "^2.1468.0",
242
242
  "chai": "^4.3.10",
243
243
  "eslint": "^8.50.0",
244
- "eslint-config-oclif": "^5",
245
- "eslint-config-oclif-typescript": "^2.0.1",
244
+ "eslint-config-oclif": "^3.1",
245
+ "eslint-config-oclif-typescript": "^0.2.0",
246
246
  "eslint-config-prettier": "^8.10.0",
247
247
  "eslint-config-salesforce": "^2.0.2",
248
248
  "eslint-config-salesforce-license": "^0.2.0",
@@ -250,88 +250,15 @@
250
250
  "eslint-plugin-header": "^3.1.1",
251
251
  "eslint-plugin-import": "^2.28.1",
252
252
  "eslint-plugin-jsdoc": "^46.8.2",
253
+ "globby": "^11.1.0",
253
254
  "husky": "^7.0.4",
254
- "mocha": "^10",
255
+ "mocha": "^9.2.2",
255
256
  "nyc": "^15.1.0",
256
- "oclif": "^4.0.0-beta.5",
257
+ "oclif": "^3.17.2",
257
258
  "prettier": "^2.8.8",
258
259
  "pretty-quick": "^3.1.3",
259
- "sinon": "^15.2.0",
260
+ "sinon": "^11.1.2",
260
261
  "ts-node": "^10.9.1",
261
- "typescript": "^5",
262
- "wireit": "^0.9.5"
263
- },
264
- "wireit": {
265
- "build": {
266
- "dependencies": [
267
- "compile",
268
- "lint"
269
- ]
270
- },
271
- "compile": {
272
- "command": "tsc -p . --pretty --incremental",
273
- "files": [
274
- "src/**/*.ts",
275
- "**/tsconfig.json",
276
- "messages/**"
277
- ],
278
- "output": [
279
- "lib/**",
280
- "*.tsbuildinfo"
281
- ],
282
- "clean": "if-file-deleted"
283
- },
284
- "format": {
285
- "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
286
- "files": [
287
- "src/**/*.ts",
288
- "test/**/*.ts",
289
- "schemas/**/*.json",
290
- "command-snapshot.json",
291
- ".prettier*"
292
- ],
293
- "output": []
294
- },
295
- "lint": {
296
- "command": "eslint src test --color --cache --cache-location .eslintcache",
297
- "files": [
298
- "src/**/*.ts",
299
- "test/**/*.ts",
300
- "messages/**",
301
- "**/.eslint*",
302
- "**/tsconfig.json"
303
- ],
304
- "output": []
305
- },
306
- "test:compile": {
307
- "command": "tsc -p \"./test\" --pretty",
308
- "files": [
309
- "test/**/*.ts",
310
- "**/tsconfig.json"
311
- ],
312
- "output": []
313
- },
314
- "test": {
315
- "dependencies": [
316
- "test:compile",
317
- "test:only",
318
- "lint"
319
- ]
320
- },
321
- "test:only": {
322
- "command": "nyc mocha \"test/**/*.test.ts\"",
323
- "env": {
324
- "FORCE_COLOR": "2"
325
- },
326
- "files": [
327
- "test/**/*.ts",
328
- "src/**/*.ts",
329
- "**/tsconfig.json",
330
- ".mocha*",
331
- "!*.nut.ts",
332
- ".nycrc"
333
- ],
334
- "output": []
335
- }
262
+ "typescript": "^4.9.5"
336
263
  }
337
264
  }
@@ -1,44 +1,39 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { spawn } = await import('node:child_process');
4
- const { join } = await import('node:path');
5
- const { fileURLToPath } = await import('node:url');
6
-
7
- async function main() {
8
- if (process.env.SF_HIDE_RELEASE_NOTES === 'true') process.exit(0);
9
-
10
- /*
11
- * NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
12
- * https://github.com/salesforcecli/sfdx-cli/pull/407
13
- */
14
- await new Promise((resolve) => {
15
- const logAndExit = (msg) => {
16
- console.log('NOTE: This error can be ignored in CI and may be silenced in the future');
17
- console.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
18
- console.log(msg.toString());
19
-
20
- resolve();
21
- };
22
-
23
- const executable = process.platform === 'win32' ? 'run.cmd' : 'run.js';
24
- const cmd = spawn(join(fileURLToPath(import.meta.url), '..', '..', 'bin', executable), ['whatsnew', '--hook'], {
25
- stdio: ['ignore', 'inherit', 'pipe'],
26
- timeout: 10000,
27
- });
28
-
29
- cmd.stderr.on('data', (error) => {
30
- logAndExit(error);
31
- });
32
-
33
- cmd.on('error', (error) => {
34
- logAndExit(error);
35
- });
36
-
37
- // 'exit' fires whether or not the stream is finished
38
- cmd.on('exit', (code) => {
39
- resolve();
40
- });
41
- });
42
- }
43
-
44
- await main();
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
+ });
@@ -1,5 +1,6 @@
1
- async function main() {
2
- const { execSync } = await import('node:child_process');
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,10 +11,6 @@ async function main() {
10
11
  };
11
12
  // test sfdx is installed
12
13
  if (testCliNotVersion('sfdx', 'sfdx-cli/7.')) {
13
- throw new 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
- }
18
-
19
- await main();
16
+ })();
package/bin/dev.js DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ts-node
2
-
3
- async function main() {
4
- const oclif = await import('@oclif/core');
5
- oclif.settings.performanceEnabled = true;
6
- await oclif.execute({ development: true, dir: import.meta.url });
7
- }
8
-
9
- await main();
package/bin/run.js DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // Pre-process/prune flags before creating or running the actual CLI
4
- (await import('../dist/flags.js')).preprocessCliFlags(process);
5
-
6
- const oclif = await import('@oclif/core');
7
- const { createRequire } = await import('module');
8
- const pjson = createRequire(import.meta.url)('../package.json');
9
-
10
- const cli = await import('../dist/cli.js');
11
-
12
- async function main() {
13
- // Since the CLI is a single process, we can have a larger amount of max listeners since
14
- // the process gets shut down. Don't set it to 0 (no limit) since we should still be aware
15
- // of rouge event listeners
16
- process.setMaxListeners(parseInt(process.env.SF_MAX_EVENT_LISTENERS, 10) || 1000);
17
-
18
- // Don't let other plugins override the CLI specified max listener count
19
- process.setMaxListeners = () => {};
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
- }
31
-
32
- await main();