@salesforce/cli 2.8.3-esm.2 → 2.8.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.8.3-esm.2",
2
+ "version": "2.8.4",
3
3
  "commands": {
4
4
  "cmdt:generate:field": {
5
5
  "id": "cmdt:generate:field",
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
3
  "description": "The Salesforce CLI",
4
- "version": "2.8.3-esm.2",
4
+ "version": "2.8.4",
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": [
@@ -120,7 +119,7 @@
120
119
  ]
121
120
  },
122
121
  "dependencies": {
123
- "@oclif/core": "3.0.0-beta.11",
122
+ "@oclif/core": "2.15.0",
124
123
  "@oclif/plugin-autocomplete": "2.3.6",
125
124
  "@oclif/plugin-commands": "2.2.24",
126
125
  "@oclif/plugin-help": "5.2.18",
@@ -190,14 +189,14 @@
190
189
  },
191
190
  "repository": "salesforcecli/cli",
192
191
  "scripts": {
193
- "build": "wireit",
192
+ "build": "sf-build",
194
193
  "channel:promote": "sf-release channel:promote",
195
194
  "clean": "sf-clean",
196
195
  "clean-all": "sf-clean all",
197
- "compile": "wireit",
196
+ "compile": "sf-compile",
198
197
  "docs": "sf-docs",
199
- "format": "wireit",
200
- "lint": "wireit",
198
+ "format": "sf-format",
199
+ "lint": "eslint \"src/**/*.ts\"",
201
200
  "oclif-artifacts": "oclif manifest",
202
201
  "pack:deb": "oclif pack:deb",
203
202
  "pack:macos": "oclif pack:macos",
@@ -212,13 +211,13 @@
212
211
  "prepare": "sf-install && yarn compile && yarn lint",
213
212
  "prepublishOnly": "npm shrinkwrap",
214
213
  "pretarball": "sf-release cli:tarballs:prepare --types",
214
+ "pretest": "echo disable # sf-compile-test",
215
215
  "promote": "oclif promote",
216
216
  "promote-dist-tags": "./scripts/promote-dist-tags",
217
217
  "promote:verify": "sf-release cli:versions:inspect --channels stable --locations archive --cli sf",
218
218
  "promote:verify-rc": "sf-release cli:versions:inspect --channels stable-rc --locations archive --cli sf",
219
- "test": "wireit",
219
+ "test": "sf-test",
220
220
  "test:deprecation-policy": "sf-release cli:artifacts:compare",
221
- "test:only": "wireit",
222
221
  "test:smoke-unix": "sf-release cli:tarballs:smoke --cli sf",
223
222
  "upload:deb": "oclif upload:deb",
224
223
  "upload:macos": "oclif upload:macos",
@@ -228,10 +227,10 @@
228
227
  },
229
228
  "types": "dist/index.d.ts",
230
229
  "devDependencies": {
231
- "@oclif/plugin-command-snapshot": "^4.0.2",
230
+ "@oclif/plugin-command-snapshot": "^3.3.0",
232
231
  "@salesforce/dev-config": "^4.0.1",
233
- "@salesforce/dev-scripts": "^5.9.0",
234
- "@salesforce/plugin-release-management": "^4.1.25",
232
+ "@salesforce/dev-scripts": "^3.1.1",
233
+ "@salesforce/plugin-release-management": "^4.1.19",
235
234
  "@salesforce/prettier-config": "^0.0.3",
236
235
  "@salesforce/ts-sinon": "^1.4.15",
237
236
  "@types/debug": "^4.1.8",
@@ -240,7 +239,7 @@
240
239
  "aws-sdk": "^2.1446.0",
241
240
  "chai": "^4.3.8",
242
241
  "eslint": "^8.48.0",
243
- "eslint-config-oclif": "^4",
242
+ "eslint-config-oclif": "^3.1",
244
243
  "eslint-config-oclif-typescript": "^0.2.0",
245
244
  "eslint-config-prettier": "^8.10.0",
246
245
  "eslint-config-salesforce": "^2.0.2",
@@ -256,82 +255,8 @@
256
255
  "oclif": "^3.11.3",
257
256
  "prettier": "^2.8.8",
258
257
  "pretty-quick": "^3.1.3",
259
- "sinon": "^15.2.0",
258
+ "sinon": "^11.1.2",
260
259
  "ts-node": "^10.9.1",
261
- "typescript": "^4.9.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
- }
260
+ "typescript": "^4.9.5"
336
261
  }
337
262
  }
@@ -1,42 +1,39 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- void (async () => {
4
- const { spawn } = await import('node:child_process');
5
- const { join } = await import('node:path');
6
- const { fileURLToPath } = await import('node:url');
7
-
8
- if (process.env.SF_HIDE_RELEASE_NOTES === 'true') process.exit(0);
9
-
10
- const logAndExit = (msg) => {
11
- console.log('NOTE: This error can be ignored in CI and may be silenced in the future');
12
- console.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
13
- console.log(msg.toString());
14
-
15
- process.exit(0);
16
- };
17
-
18
- /*
19
- * NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
20
- * https://github.com/salesforcecli/sfdx-cli/pull/407
21
- */
22
-
23
- const executable = process.platform === 'win32' ? 'run.cmd' : 'run.js';
24
-
25
- const cmd = spawn(join(fileURLToPath(import.meta.url), '..', '..', 'bin', executable), ['whatsnew', '--hook'], {
26
- stdio: ['ignore', 'inherit', 'pipe'],
27
- timeout: 10000,
28
- });
29
-
30
- cmd.stderr.on('data', (error) => {
31
- logAndExit(error);
32
- });
33
-
34
- cmd.on('error', (error) => {
35
- logAndExit(error);
36
- });
37
-
38
- // 'exit' fires whether or not the stream are finished
39
- cmd.on('exit', (code) => {
40
- process.exit(0);
41
- });
42
- })();
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
- void (async () => {
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,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
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- void (async () => {
4
- const oclif = await import('@oclif/core');
5
- oclif.settings.performanceEnabled = true;
6
- await oclif.execute({ development: true, dir: import.meta.url });
7
- })();
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
- })();