@salesforce/cli-plugins-testkit 2.1.2 → 2.1.3
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/CHANGELOG.md +6 -0
- package/lib/hubAuth.js +3 -3
- package/lib/testSession.js +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.1.3](https://github.com/salesforcecli/cli-plugins-testkit/compare/v2.1.2...v2.1.3) (2022-06-06)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- globalinfo -> stateAggregator ([6638739](https://github.com/salesforcecli/cli-plugins-testkit/commit/66387396d6aba5276cbadeb2d40fcc98182cd034))
|
|
10
|
+
|
|
5
11
|
### [2.1.2](https://github.com/salesforcecli/cli-plugins-testkit/compare/v2.1.1...v2.1.2) (2022-06-02)
|
|
6
12
|
|
|
7
13
|
### Bug Fixes
|
package/lib/hubAuth.js
CHANGED
|
@@ -87,7 +87,7 @@ const testkitHubAuth = (homeDir, authStrategy = getAuthStrategy()) => {
|
|
|
87
87
|
logger('trying jwt auth');
|
|
88
88
|
const jwtKey = (0, exports.prepareForJwt)(homeDir);
|
|
89
89
|
const results = shell.exec(`sfdx auth:jwt:grant -d -u ${kit_1.env.getString('TESTKIT_HUB_USERNAME', '')} -i ${kit_1.env.getString('TESTKIT_JWT_CLIENT_ID', '')} -f ${jwtKey} -r ${kit_1.env.getString('TESTKIT_HUB_INSTANCE', DEFAULT_INSTANCE_URL)}`, execOpts);
|
|
90
|
-
core_1.
|
|
90
|
+
core_1.StateAggregator.clearInstance();
|
|
91
91
|
if (results.code !== 0) {
|
|
92
92
|
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}`);
|
|
93
93
|
}
|
|
@@ -97,7 +97,7 @@ const testkitHubAuth = (homeDir, authStrategy = getAuthStrategy()) => {
|
|
|
97
97
|
logger('trying to authenticate with AuthUrl');
|
|
98
98
|
const tmpUrl = (0, exports.prepareForAuthUrl)(homeDir);
|
|
99
99
|
const shellOutput = shell.exec(`sfdx auth:sfdxurl:store -d -f ${tmpUrl}`, execOpts);
|
|
100
|
-
core_1.
|
|
100
|
+
core_1.StateAggregator.clearInstance();
|
|
101
101
|
logger(shellOutput);
|
|
102
102
|
if (shellOutput.code !== 0) {
|
|
103
103
|
throw new Error(`auth:sfdxurl for url ${tmpUrl} failed with exit code: ${shellOutput.code}\n ${shellOutput.stdout + shellOutput.stderr}`);
|
|
@@ -161,7 +161,7 @@ const transferExistingAuthToEnv = (authStrategy = getAuthStrategy()) => {
|
|
|
161
161
|
// this is an org from web:auth or auth:url. Generate the authUrl and set in the env
|
|
162
162
|
logger('copying variables to env from org:display for AuthUrl');
|
|
163
163
|
const displayContents = JSON.parse(shell.exec(`sfdx force:org:display -u ${devhub} --verbose --json`, execOpts));
|
|
164
|
-
core_1.
|
|
164
|
+
core_1.StateAggregator.clearInstance();
|
|
165
165
|
logger(`found ${displayContents.result.sfdxAuthUrl}`);
|
|
166
166
|
kit_1.env.setString('TESTKIT_AUTH_URL', displayContents.result.sfdxAuthUrl);
|
|
167
167
|
return;
|
package/lib/testSession.js
CHANGED
|
@@ -183,7 +183,7 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
|
|
|
183
183
|
}
|
|
184
184
|
this.debug('Deleted org result=', rv.stdout);
|
|
185
185
|
}
|
|
186
|
-
core_1.
|
|
186
|
+
core_1.StateAggregator.clearInstance();
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
async rmSessionDir() {
|
|
@@ -275,8 +275,8 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
|
|
|
275
275
|
await this.sleep(timeout);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
// there may be
|
|
279
|
-
core_1.
|
|
278
|
+
// there may be StateAggregator touches from org:create or other setup commands run
|
|
279
|
+
core_1.StateAggregator.clearInstance();
|
|
280
280
|
}
|
|
281
281
|
async sleep(duration) {
|
|
282
282
|
await (0, kit_1.sleep)(duration);
|
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": "2.1.
|
|
4
|
+
"version": "2.1.3",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"!lib/**/*.map"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@salesforce/core": "^3.19.
|
|
46
|
-
"@salesforce/kit": "^1.5.
|
|
45
|
+
"@salesforce/core": "^3.19.4",
|
|
46
|
+
"@salesforce/kit": "^1.5.42",
|
|
47
47
|
"@salesforce/ts-types": "^1.5.17",
|
|
48
48
|
"archiver": "^5.2.0",
|
|
49
49
|
"debug": "^4.3.1",
|