@salesforce/cli-plugins-testkit 3.2.21 → 3.2.23

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/lib/hubAuth.js CHANGED
@@ -76,7 +76,7 @@ const testkitHubAuth = (homeDir, authStrategy = (0, exports.getAuthStrategy)())
76
76
  if (authStrategy === 'JWT') {
77
77
  logger('trying jwt auth');
78
78
  const jwtKey = (0, exports.prepareForJwt)(homeDir);
79
- const results = shell.exec(`sf login jwt org --set-default-dev-hub --username ${kit_1.env.getString('TESTKIT_HUB_USERNAME', '')} --clientid ${kit_1.env.getString('TESTKIT_JWT_CLIENT_ID', '')} --keyfile ${jwtKey} --instance-url ${kit_1.env.getString('TESTKIT_HUB_INSTANCE', DEFAULT_INSTANCE_URL)}`, execOpts);
79
+ const results = shell.exec(`sf org:login:jwt --set-default-dev-hub --username ${kit_1.env.getString('TESTKIT_HUB_USERNAME', '')} --client-id ${kit_1.env.getString('TESTKIT_JWT_CLIENT_ID', '')} --jwt-key-file ${jwtKey} --instance-url ${kit_1.env.getString('TESTKIT_HUB_INSTANCE', DEFAULT_INSTANCE_URL)}`, execOpts);
80
80
  if (results.code !== 0) {
81
81
  throw new Error(`jwt:grant for org ${kit_1.env.getString('TESTKIT_HUB_USERNAME', 'TESTKIT_HUB_USERNAME was not set')} failed with exit code: ${results.code}\n ${results.stdout + results.stderr}`);
82
82
  }
@@ -85,10 +85,10 @@ const testkitHubAuth = (homeDir, authStrategy = (0, exports.getAuthStrategy)())
85
85
  if (authStrategy === 'AUTH_URL') {
86
86
  logger('trying to authenticate with AuthUrl');
87
87
  const tmpUrl = (0, exports.prepareForAuthUrl)(homeDir);
88
- const shellOutput = shell.exec(`sfdx auth:sfdxurl:store -d -f ${tmpUrl}`, execOpts);
88
+ const shellOutput = shell.exec(`sf org:login:sfdx-url -d -f ${tmpUrl}`, execOpts);
89
89
  logger(shellOutput);
90
90
  if (shellOutput.code !== 0) {
91
- throw new Error(`auth:sfdxurl for url ${tmpUrl} failed with exit code: ${shellOutput.code}\n ${shellOutput.stdout + shellOutput.stderr}`);
91
+ throw new Error(`org:login:sfdx-ur for url ${tmpUrl} failed with exit code: ${shellOutput.code}\n ${shellOutput.stdout + shellOutput.stderr}`);
92
92
  }
93
93
  return;
94
94
  }
@@ -101,7 +101,7 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
101
101
  const configResults = JSON.parse(stripAnsi(config.stdout));
102
102
  const usernameOrAlias = configResults.result.find((org) => org.name === 'target-dev-hub')?.value;
103
103
  if (usernameOrAlias) {
104
- const displayEnv = shell.exec(`sf env display -e ${usernameOrAlias} --json`, this.shelljsExecOptions);
104
+ const displayEnv = shell.exec(`sf org:display -o ${usernameOrAlias} --json`, this.shelljsExecOptions);
105
105
  const displayEnvResults = JSON.parse(stripAnsi(displayEnv.stdout));
106
106
  this.hubOrg = displayEnvResults.result;
107
107
  }
@@ -183,7 +183,7 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
183
183
  if (this.orgsAliases.includes(org))
184
184
  continue;
185
185
  this.debug(`Deleting test org: ${org}`);
186
- const rv = shell.exec(`sf env delete scratch -o ${org} -p`, this.shelljsExecOptions);
186
+ const rv = shell.exec(`sf org:delete:scratch -o ${org} -p`, this.shelljsExecOptions);
187
187
  this.orgs.delete(org);
188
188
  if (rv.code !== 0) {
189
189
  // Must still delete the session dir if org:delete fails
@@ -239,7 +239,7 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
239
239
  if (org.executable === 'sfdx')
240
240
  baseCmd += ` username=${org.username}`;
241
241
  else
242
- throw new Error('username property is not supported by sf env create scratch');
242
+ throw new Error('username property is not supported by sf org create scratch');
243
243
  }
244
244
  if (org.edition) {
245
245
  baseCmd += executable === 'sf' ? ` -e ${org.edition}` : ` edition=${org.edition}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/cli-plugins-testkit",
3
3
  "description": "Provides test utilities to assist Salesforce CLI plug-in authors with writing non-unit tests (NUT).",
4
- "version": "3.2.21",
4
+ "version": "3.2.23",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@salesforce/core": "^3.33.1",
46
46
  "@salesforce/kit": "^1.8.0",
47
- "@salesforce/ts-types": "^1.7.2",
47
+ "@salesforce/ts-types": "^1.7.3",
48
48
  "@types/shelljs": "^0.8.11",
49
49
  "archiver": "^5.2.0",
50
50
  "debug": "^4.3.1",
@@ -60,16 +60,16 @@
60
60
  "@types/archiver": "^5.1.0",
61
61
  "@types/debug": "^4.1.5",
62
62
  "@typescript-eslint/eslint-plugin": "^5.45.0",
63
- "@typescript-eslint/parser": "^5.50.0",
63
+ "@typescript-eslint/parser": "^5.53.0",
64
64
  "chai": "^4.3.7",
65
- "eslint": "^8.33.0",
65
+ "eslint": "^8.34.0",
66
66
  "eslint-config-prettier": "^8.6.0",
67
- "eslint-config-salesforce": "^1.1.0",
67
+ "eslint-config-salesforce": "^1.1.1",
68
68
  "eslint-config-salesforce-license": "^0.2.0",
69
69
  "eslint-config-salesforce-typescript": "^1.1.1",
70
70
  "eslint-plugin-header": "^3.1.1",
71
71
  "eslint-plugin-import": "2.27.5",
72
- "eslint-plugin-jsdoc": "^39.8.0",
72
+ "eslint-plugin-jsdoc": "^39.9.1",
73
73
  "husky": "^7.0.4",
74
74
  "mocha": "^9.1.3",
75
75
  "nyc": "^15.1.0",