@salesforce/sf-plugins-core 1.11.1 → 1.12.0
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 +19 -0
- package/lib/flags/orgFlags.d.ts +2 -2
- package/lib/flags/orgFlags.js +15 -3
- package/lib/sfCommand.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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
|
+
## [1.12.0](https://github.com/salesforcecli/sf-plugins-core/compare/v1.11.3...v1.12.0) (2022-04-18)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- adjusting message colors for accessibility ([6f873da](https://github.com/salesforcecli/sf-plugins-core/commit/6f873daf2e05c2ec0b52b357b15333a3b68e106e))
|
|
10
|
+
|
|
11
|
+
### [1.11.3](https://github.com/salesforcecli/sf-plugins-core/compare/v1.11.2...v1.11.3) (2022-04-12)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- need await in order for the catch to be effective ([2805578](https://github.com/salesforcecli/sf-plugins-core/commit/28055783503177667620528b6246b252ff10cb7f))
|
|
16
|
+
|
|
17
|
+
### [1.11.2](https://github.com/salesforcecli/sf-plugins-core/compare/v1.11.1...v1.11.2) (2022-04-11)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- optional orgs can be undefined ([412629d](https://github.com/salesforcecli/sf-plugins-core/commit/412629de689d7d73b7c2b0673b8e9b373cc957bc))
|
|
22
|
+
- throw if input provided but no org found ([10be468](https://github.com/salesforcecli/sf-plugins-core/commit/10be468c0c3e164fed171c947dbe437b2325605c))
|
|
23
|
+
|
|
5
24
|
### [1.11.1](https://github.com/salesforcecli/sf-plugins-core/compare/v1.11.0...v1.11.1) (2022-04-07)
|
|
6
25
|
|
|
7
26
|
### Bug Fixes
|
package/lib/flags/orgFlags.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { Org } from '@salesforce/core';
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const optionalOrgFlag: import("@oclif/core/lib/interfaces").Definition<Org | undefined>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* A required org, specified by username or alias
|
|
22
22
|
* Will throw if the specified org default do not exist
|
|
23
23
|
* Will default to the default org if one is not specified.
|
|
24
24
|
* Will throw if no default org exists and none is specified
|
|
@@ -38,7 +38,7 @@ export declare const optionalOrgFlag: import("@oclif/core/lib/interfaces").Defin
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const requiredOrgFlag: import("@oclif/core/lib/interfaces").Definition<Org>;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* A required org that is a devHub
|
|
42
42
|
* Will throw if the specified org does not exist
|
|
43
43
|
* Will default to the default dev hub if one is not specified
|
|
44
44
|
* Will throw if no default deb hub exists and none is specified
|
package/lib/flags/orgFlags.js
CHANGED
|
@@ -11,7 +11,19 @@ const core_1 = require("@oclif/core");
|
|
|
11
11
|
const core_2 = require("@salesforce/core");
|
|
12
12
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
13
13
|
const messages = core_2.Messages.loadMessages('@salesforce/sf-plugins-core', 'messages');
|
|
14
|
-
const maybeGetOrg = async (input) =>
|
|
14
|
+
const maybeGetOrg = async (input) => {
|
|
15
|
+
try {
|
|
16
|
+
return await core_2.Org.create({ aliasOrUsername: input });
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
if (!input) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw e;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
15
27
|
const getOrgOrThrow = async (input) => {
|
|
16
28
|
const org = await maybeGetOrg(input);
|
|
17
29
|
if (!org) {
|
|
@@ -60,7 +72,7 @@ exports.optionalOrgFlag = core_1.Flags.build({
|
|
|
60
72
|
defaultHelp: async () => { var _a; return (_a = (await maybeGetOrg())) === null || _a === void 0 ? void 0 : _a.getUsername(); },
|
|
61
73
|
});
|
|
62
74
|
/**
|
|
63
|
-
*
|
|
75
|
+
* A required org, specified by username or alias
|
|
64
76
|
* Will throw if the specified org default do not exist
|
|
65
77
|
* Will default to the default org if one is not specified.
|
|
66
78
|
* Will throw if no default org exists and none is specified
|
|
@@ -85,7 +97,7 @@ exports.requiredOrgFlag = core_1.Flags.build({
|
|
|
85
97
|
defaultHelp: async () => { var _a; return (_a = (await getOrgOrThrow())) === null || _a === void 0 ? void 0 : _a.getUsername(); },
|
|
86
98
|
});
|
|
87
99
|
/**
|
|
88
|
-
*
|
|
100
|
+
* A required org that is a devHub
|
|
89
101
|
* Will throw if the specified org does not exist
|
|
90
102
|
* Will default to the default dev hub if one is not specified
|
|
91
103
|
* Will throw if no default deb hub exists and none is specified
|
package/lib/sfCommand.js
CHANGED
|
@@ -15,10 +15,10 @@ const ux_1 = require("./ux");
|
|
|
15
15
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
16
16
|
const messages = core_2.Messages.loadMessages('@salesforce/sf-plugins-core', 'messages');
|
|
17
17
|
exports.StandardColors = {
|
|
18
|
-
error: chalk.
|
|
19
|
-
warning: chalk.
|
|
18
|
+
error: chalk.bold.red,
|
|
19
|
+
warning: chalk.bold.yellow,
|
|
20
20
|
info: chalk.dim,
|
|
21
|
-
success: chalk.
|
|
21
|
+
success: chalk.bold.green,
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* A base command that provides convenient access to CLI help
|