@salesforce/cli-plugins-testkit 3.2.9 → 3.2.11

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/execCmd.d.ts CHANGED
@@ -4,8 +4,8 @@ import { SfError } from '@salesforce/core';
4
4
  import { Duration } from '@salesforce/kit';
5
5
  import { AnyJson, Many } from '@salesforce/ts-types';
6
6
  import { ExecOptions, ShellString } from 'shelljs';
7
- export declare type CLI = 'inherit' | 'sfdx' | 'sf';
8
- declare type BaseExecOptions = {
7
+ export type CLI = 'inherit' | 'sfdx' | 'sf';
8
+ type BaseExecOptions = {
9
9
  /**
10
10
  * Throws if this exit code is not returned by the child process.
11
11
  */
@@ -18,11 +18,11 @@ declare type BaseExecOptions = {
18
18
  */
19
19
  cli?: CLI;
20
20
  };
21
- export declare type ExecCmdOptions = ExecOptions & BaseExecOptions;
22
- declare type ExcludeMethods<T> = Pick<T, NonNullable<{
21
+ export type ExecCmdOptions = ExecOptions & BaseExecOptions;
22
+ type ExcludeMethods<T> = Pick<T, NonNullable<{
23
23
  [K in keyof T]: T[K] extends (_: any) => any ? never : K;
24
24
  }[keyof T]>>;
25
- export declare type JsonOutput<T> = {
25
+ export type JsonOutput<T> = {
26
26
  status: number;
27
27
  result: T;
28
28
  } & Partial<ExcludeMethods<SfError>>;
@@ -81,19 +81,19 @@ export declare enum Interaction {
81
81
  BACKSPACE = "\b",
82
82
  ALL = "a"
83
83
  }
84
- export declare type InteractiveCommandExecutionResult = {
84
+ export type InteractiveCommandExecutionResult = {
85
85
  code: number | null;
86
86
  stdout: string;
87
87
  stderr: string;
88
88
  duration: Duration;
89
89
  };
90
- export declare type InteractiveCommandExecutionOptions = BaseExecOptions & SpawnOptionsWithoutStdio;
90
+ export type InteractiveCommandExecutionOptions = BaseExecOptions & SpawnOptionsWithoutStdio;
91
91
  /**
92
92
  * A map of questions and answers to be used in an interactive command.
93
93
  *
94
94
  * The questions are strings that will be used to match the question asked by the command.
95
95
  */
96
- export declare type PromptAnswers = Record<string, Many<string>>;
96
+ export type PromptAnswers = Record<string, Many<string>>;
97
97
  /**
98
98
  * Execute an interactive command.
99
99
  *
package/lib/hubAuth.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type DevhubAuthStrategy = 'AUTO' | 'JWT' | 'AUTH_URL' | 'REUSE' | 'NONE';
1
+ export type DevhubAuthStrategy = 'AUTO' | 'JWT' | 'AUTH_URL' | 'REUSE' | 'NONE';
2
2
  export declare const prepareForJwt: (homeDir: string) => string;
3
3
  export declare const prepareForAuthUrl: (homeDir: string) => string;
4
4
  /**
@@ -4,7 +4,7 @@ import { Optional } from '@salesforce/ts-types';
4
4
  import { AuthFields } from '@salesforce/core';
5
5
  import { TestProject, TestProjectOptions } from './testProject';
6
6
  import { DevhubAuthStrategy } from './hubAuth';
7
- export declare type ScratchOrgConfig = {
7
+ export type ScratchOrgConfig = {
8
8
  executable?: 'sfdx' | 'sf';
9
9
  config?: string;
10
10
  duration?: number;
@@ -88,8 +88,10 @@ class TestSession extends kit_1.AsyncOptionalCreatable {
88
88
  }
89
89
  // Write the test session options used to create this session
90
90
  fs.writeFileSync(path.join(this.dir, 'testSessionOptions.json'), JSON.stringify(JSON.parse(JSON.stringify(this.options))));
91
- const authStrategy = this.options.devhubAuthStrategy === 'AUTO' ? (0, hubAuth_1.getAuthStrategy)() : this.options.devhubAuthStrategy ?? 'NONE';
91
+ let authStrategy = this.options.devhubAuthStrategy === 'AUTO' ? (0, hubAuth_1.getAuthStrategy)() : this.options.devhubAuthStrategy ?? 'NONE';
92
92
  (0, hubAuth_1.transferExistingAuthToEnv)(authStrategy);
93
+ authStrategy =
94
+ this.options.devhubAuthStrategy === 'AUTO' ? (0, hubAuth_1.getAuthStrategy)() : this.options.devhubAuthStrategy ?? 'NONE';
93
95
  // Set the homedir used by this test, on the TestSession and the process
94
96
  process.env.USERPROFILE = process.env.HOME = this.homeDir = kit_1.env.getString('TESTKIT_HOMEDIR', this.dir);
95
97
  process.env.SFDX_USE_GENERIC_UNIX_KEYCHAIN = 'true';
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.9",
4
+ "version": "3.2.11",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",
@@ -42,7 +42,7 @@
42
42
  "!lib/**/*.map"
43
43
  ],
44
44
  "dependencies": {
45
- "@salesforce/core": "^3.32.1",
45
+ "@salesforce/core": "^3.32.2",
46
46
  "@salesforce/kit": "^1.8.0",
47
47
  "@salesforce/ts-types": "^1.5.21",
48
48
  "@types/shelljs": "^0.8.11",
@@ -59,25 +59,25 @@
59
59
  "@salesforce/ts-sinon": "^1.4.2",
60
60
  "@types/archiver": "^5.1.0",
61
61
  "@types/debug": "^4.1.5",
62
- "@typescript-eslint/eslint-plugin": "^5.42.0",
63
- "@typescript-eslint/parser": "^5.42.1",
64
- "chai": "^4.3.0",
65
- "eslint": "^8.26.0",
62
+ "@typescript-eslint/eslint-plugin": "^5.43.0",
63
+ "@typescript-eslint/parser": "^5.44.0",
64
+ "chai": "^4.3.7",
65
+ "eslint": "^8.28.0",
66
66
  "eslint-config-prettier": "^8.5.0",
67
67
  "eslint-config-salesforce": "^1.1.0",
68
68
  "eslint-config-salesforce-license": "^0.1.6",
69
69
  "eslint-config-salesforce-typescript": "^1.1.1",
70
70
  "eslint-plugin-header": "^3.1.1",
71
71
  "eslint-plugin-import": "2.26.0",
72
- "eslint-plugin-jsdoc": "^39.6.2",
72
+ "eslint-plugin-jsdoc": "^39.6.4",
73
73
  "husky": "^7.0.4",
74
74
  "mocha": "^9.1.3",
75
75
  "nyc": "^15.1.0",
76
- "prettier": "^2.7.1",
76
+ "prettier": "^2.8.0",
77
77
  "pretty-quick": "^3.1.0",
78
78
  "sinon": "10.0.0",
79
79
  "ts-node": "^10.0.0",
80
- "typescript": "^4.8.4"
80
+ "typescript": "^4.9.3"
81
81
  },
82
82
  "config": {},
83
83
  "publishConfig": {