Skip to content

Commit a75de29

Browse files
committed
Merge branch 'main' into mdonnalley/ux
2 parents edf5d39 + 7072331 commit a75de29

File tree

7 files changed

+67
-63
lines changed

7 files changed

+67
-63
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## [9.1.1](https://github.com/salesforcecli/sf-plugins-core/compare/9.1.0...9.1.1) (2024-06-01)
2+
3+
### Bug Fixes
4+
5+
- **deps:** major-version-inquirers, exit-code typing ([#561](https://github.com/salesforcecli/sf-plugins-core/issues/561)) ([91333cb](https://github.com/salesforcecli/sf-plugins-core/commit/91333cb39ed0683fb3835acd069e92374cfde6cd))
6+
7+
# [9.1.0](https://github.com/salesforcecli/sf-plugins-core/compare/9.0.14...9.1.0) (2024-05-30)
8+
9+
### Features
10+
11+
- add a default summary for optional orgs ([#560](https://github.com/salesforcecli/sf-plugins-core/issues/560)) ([8793406](https://github.com/salesforcecli/sf-plugins-core/commit/8793406075e6d753dd5137a5c7d1cbe759572c54))
12+
113
## [9.0.14](https://github.com/salesforcecli/sf-plugins-core/compare/9.0.13...9.0.14) (2024-05-26)
214

315
### Bug Fixes

messages/messages.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,18 @@ The specified org %s is not a Dev Hub.
4242

4343
Username or alias of the target org. Not required if the `target-org` configuration variable is already set.
4444

45+
# flags.optionalTargetOrg.summary
46+
47+
Username or alias of the target org.
48+
4549
# flags.targetDevHubOrg.summary
4650

4751
Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.
4852

53+
# flags.optionalTargetDevHubOrg.summary
54+
55+
Username or alias of the Dev Hub org.
56+
4957
# flags.apiVersion.description
5058

5159
Override the api version used for api requests made by this command

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/sf-plugins-core",
3-
"version": "9.0.14-beta.1",
3+
"version": "9.1.1-beta.0",
44
"description": "Utils for writing Salesforce CLI plugins",
55
"main": "lib/exported",
66
"types": "lib/exported.d.ts",
@@ -44,8 +44,8 @@
4444
"node": ">=18.0.0"
4545
},
4646
"dependencies": {
47-
"@inquirer/confirm": "^2.0.17",
48-
"@inquirer/password": "^1.1.16",
47+
"@inquirer/confirm": "^3.1.9",
48+
"@inquirer/password": "^2.1.9",
4949
"@oclif/core": "^4",
5050
"@salesforce/core": "^7.3.9",
5151
"@salesforce/kit": "^3.1.2",
@@ -58,10 +58,10 @@
5858
"terminal-link": "^3.0.0"
5959
},
6060
"devDependencies": {
61-
"@inquirer/type": "^1.3.1",
61+
"@inquirer/type": "^1.3.3",
6262
"@types/cli-progress": "^3.11.5",
6363
"@salesforce/dev-scripts": "^9.1.2",
64-
"eslint-plugin-sf-plugin": "^1.18.4",
64+
"eslint-plugin-sf-plugin": "^1.18.5",
6565
"ts-node": "^10.9.2",
6666
"typescript": "^5.4.5"
6767
},

src/errorHandling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const computeErrorCode = (e: Error | SfError | SfCommandError): number =>
4343
return typeof e.code !== 'number' ? 1 : e.code;
4444
}
4545

46-
return process.exitCode ?? 1;
46+
return typeof process.exitCode === 'number' ? process.exitCode : 1;
4747
};
4848

4949
/** identifies gacks via regex. Searches the error message, stack, and recursively checks the cause chain */

src/flags/orgFlags.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const optionalOrgFlag = Flags.custom({
102102
char: 'o',
103103
noCacheDefault: true,
104104
parse: async (input: string | undefined) => maybeGetOrg(input),
105+
summary: messages.getMessage('flags.optionalTargetOrg.summary'),
105106
default: async () => maybeGetOrg(),
106107
defaultHelp: async (context) => {
107108
if (context.options instanceof Org) {
@@ -211,7 +212,7 @@ export const requiredHubFlag = Flags.custom({
211212
*/
212213
export const optionalHubFlag = Flags.custom({
213214
char: 'v',
214-
summary: messages.getMessage('flags.targetDevHubOrg.summary'),
215+
summary: messages.getMessage('flags.optionalTargetDevHubOrg.summary'),
215216
noCacheDefault: true,
216217
parse: async (input: string | undefined) => maybeGetHub(input),
217218
default: async () => maybeGetHub(),

src/sfCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export abstract class SfCommand<T> extends Command {
362362
*/
363363
protected toSuccessJson(result: T): SfCommand.Json<T> {
364364
return {
365-
status: process.exitCode ?? 0,
365+
status: typeof process.exitCode === 'number' ? process.exitCode : 0,
366366
result,
367367
warnings: this.warnings,
368368
};

yarn.lock

Lines changed: 38 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -421,49 +421,51 @@
421421
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
422422
integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
423423

424-
"@inquirer/confirm@^2.0.17":
425-
version "2.0.17"
426-
resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-2.0.17.tgz#a45eb1b973c51c993a3c093a0114e960b1cf09a4"
427-
integrity sha512-EqzhGryzmGpy2aJf6LxJVhndxYmFs+m8cxXzf8nejb1DE3sabf6mUgBcp4J0jAUEiAcYzqmkqRr7LPFh/WdnXA==
424+
"@inquirer/confirm@^3.1.9":
425+
version "3.1.9"
426+
resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-3.1.9.tgz#1bc384bc8267827ec75d0684e189692bb4dda38b"
427+
integrity sha512-UF09aejxCi4Xqm6N/jJAiFXArXfi9al52AFaSD+2uIHnhZGtd1d6lIGTRMPouVSJxbGEi+HkOWSYaiEY/+szUw==
428428
dependencies:
429-
"@inquirer/core" "^6.0.0"
430-
"@inquirer/type" "^1.1.6"
431-
chalk "^4.1.2"
429+
"@inquirer/core" "^8.2.2"
430+
"@inquirer/type" "^1.3.3"
432431

433-
"@inquirer/core@^6.0.0":
434-
version "6.0.0"
435-
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-6.0.0.tgz#d44ccd8ae09a4879a78f09cca35bf1ab894b95f4"
436-
integrity sha512-fKi63Khkisgda3ohnskNf5uZJj+zXOaBvOllHsOkdsXRA/ubQLJQrZchFFi57NKbZzkTunXiBMdvWOv71alonw==
432+
"@inquirer/core@^8.2.2":
433+
version "8.2.2"
434+
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-8.2.2.tgz#797b1e71b920c9788b9d26d89c8b334149852d52"
435+
integrity sha512-K8SuNX45jEFlX3EBJpu9B+S2TISzMPGXZIuJ9ME924SqbdW6Pt6fIkKvXg7mOEOKJ4WxpQsxj0UTfcL/A434Ww==
437436
dependencies:
438-
"@inquirer/type" "^1.1.6"
437+
"@inquirer/figures" "^1.0.3"
438+
"@inquirer/type" "^1.3.3"
439439
"@types/mute-stream" "^0.0.4"
440-
"@types/node" "^20.10.7"
440+
"@types/node" "^20.12.13"
441441
"@types/wrap-ansi" "^3.0.0"
442442
ansi-escapes "^4.3.2"
443443
chalk "^4.1.2"
444444
cli-spinners "^2.9.2"
445445
cli-width "^4.1.0"
446-
figures "^3.2.0"
447446
mute-stream "^1.0.0"
448-
run-async "^3.0.0"
449447
signal-exit "^4.1.0"
450448
strip-ansi "^6.0.1"
451449
wrap-ansi "^6.2.0"
452450

453-
"@inquirer/password@^1.1.16":
454-
version "1.1.16"
455-
resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-1.1.16.tgz#37ddebbe37c6e76f8ad27d1f726aacdd7c423558"
456-
integrity sha512-aZYZVHLUXZ2gbBot+i+zOJrks1WaiI95lvZCn1sKfcw6MtSSlYC8uDX8sTzQvAsQ8epHoP84UNvAIT0KVGOGqw==
451+
"@inquirer/figures@^1.0.3":
452+
version "1.0.3"
453+
resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.3.tgz#1227cc980f88e6d6ab85abadbf164f5038041edd"
454+
integrity sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==
455+
456+
"@inquirer/password@^2.1.9":
457+
version "2.1.9"
458+
resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-2.1.9.tgz#8d464c17cb67beabb309a039229ff1b0a6337294"
459+
integrity sha512-QPtVcT12Fkn0TyuZJelR7QOtc5l1d/6pB5EfkHOivTzC6QTFxRCHl+Gx7Q3E2U/kgJeCCmDov6itDFggk9nkgA==
457460
dependencies:
458-
"@inquirer/core" "^6.0.0"
459-
"@inquirer/type" "^1.1.6"
461+
"@inquirer/core" "^8.2.2"
462+
"@inquirer/type" "^1.3.3"
460463
ansi-escapes "^4.3.2"
461-
chalk "^4.1.2"
462464

463-
"@inquirer/type@^1.1.6", "@inquirer/type@^1.3.1":
464-
version "1.3.1"
465-
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-1.3.1.tgz#afb95ff78f44fff7e8a00e17d5820db6add2a076"
466-
integrity sha512-Pe3PFccjPVJV1vtlfVvm9OnlbxqdnP5QcscFEFEnK5quChf1ufZtM0r8mR5ToWHMxZOh0s8o/qp9ANGRTo/DAw==
465+
"@inquirer/type@^1.3.3":
466+
version "1.3.3"
467+
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-1.3.3.tgz#26b2628630fd2381c7fa1e3ab396feb9bbc575da"
468+
integrity sha512-xTUt0NulylX27/zMx04ZYar/kr1raaiFTVvQ5feljQsiAgdm0WPj4S73/ye0fbslh+15QrIuDvfCXTek7pMY5A==
467469

468470
"@isaacs/cliui@^8.0.2":
469471
version "8.0.2"
@@ -612,7 +614,7 @@
612614
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
613615
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
614616

615-
"@salesforce/core@^7.3.8", "@salesforce/core@^7.3.9":
617+
"@salesforce/core@^7.3.9":
616618
version "7.3.9"
617619
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-7.3.9.tgz#8abe2b3e2393989d11e92b7a6b96043fc9d5b9c8"
618620
integrity sha512-eJqDiA5b7wU50Ee/xjmGzSnHrNVJ8S77B7enfX30gm7gxU3i3M3QeBdiV6XAOPLSIL96DseofP6Tv6c+rljlKA==
@@ -789,10 +791,10 @@
789791
dependencies:
790792
"@types/node" "*"
791793

792-
"@types/node@*":
793-
version "20.12.7"
794-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384"
795-
integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==
794+
"@types/node@*", "@types/node@^20.12.13":
795+
version "20.13.0"
796+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.13.0.tgz#011a76bc1e71ae9a026dddcfd7039084f752c4b6"
797+
integrity sha512-FM6AOb3khNkNIXPnHFDYaHerSv8uN22C91z098AnGccVu+Pcdhi+pNUFDi0iLmPIsVE0JBD0KVS7mzUYt4nRzQ==
796798
dependencies:
797799
undici-types "~5.26.4"
798800

@@ -803,13 +805,6 @@
803805
dependencies:
804806
undici-types "~5.26.4"
805807

806-
"@types/node@^20.10.7":
807-
version "20.11.16"
808-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.16.tgz#4411f79411514eb8e2926f036c86c9f0e4ec6708"
809-
integrity sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==
810-
dependencies:
811-
undici-types "~5.26.4"
812-
813808
"@types/normalize-package-data@^2.4.0":
814809
version "2.4.1"
815810
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
@@ -2078,12 +2073,12 @@ eslint-plugin-jsdoc@^46.10.1:
20782073
semver "^7.5.4"
20792074
spdx-expression-parse "^4.0.0"
20802075

2081-
eslint-plugin-sf-plugin@^1.18.4:
2082-
version "1.18.4"
2083-
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.18.4.tgz#59a41e224d620e20d0fe0e3902c43208c2629037"
2084-
integrity sha512-bPYmEh+5ARunhIfBoHc9UqrvPslRcYcloXJRKWqVkvU8tIBAiq2lqp6GWjVuUMPGjhvtUgICMolp6ozjO9wvmA==
2076+
eslint-plugin-sf-plugin@^1.18.5:
2077+
version "1.18.5"
2078+
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.18.5.tgz#4a81063c8dea645db8be183c3257a33dc67c0158"
2079+
integrity sha512-yjvWM3OmxFuUUlHhDAXczo4ysX5ONoeysPL0B0Cj/zjrizvS05fjaAy53fa+AwVjOIOthWopFh2vPDSTNQ+pmA==
20852080
dependencies:
2086-
"@salesforce/core" "^7.3.8"
2081+
"@salesforce/core" "^7.3.9"
20872082
"@typescript-eslint/utils" "^6.17.0"
20882083

20892084
eslint-plugin-unicorn@^50.0.1:
@@ -2326,13 +2321,6 @@ faye@^1.4.0:
23262321
tough-cookie "*"
23272322
tunnel-agent "*"
23282323

2329-
figures@^3.2.0:
2330-
version "3.2.0"
2331-
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
2332-
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
2333-
dependencies:
2334-
escape-string-regexp "^1.0.5"
2335-
23362324
file-entry-cache@^6.0.1:
23372325
version "6.0.1"
23382326
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
@@ -4429,11 +4417,6 @@ rimraf@^3.0.0, rimraf@^3.0.2:
44294417
dependencies:
44304418
glob "^7.1.3"
44314419

4432-
run-async@^3.0.0:
4433-
version "3.0.0"
4434-
resolved "https://registry.yarnpkg.com/run-async/-/run-async-3.0.0.tgz#42a432f6d76c689522058984384df28be379daad"
4435-
integrity sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==
4436-
44374420
run-parallel@^1.1.9:
44384421
version "1.2.0"
44394422
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"

0 commit comments

Comments
 (0)