@salesforce/plugin-signups 1.4.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commands/org/list/shape.d.ts +4 -1
- package/lib/commands/org/list/shape.js +10 -7
- package/lib/commands/org/list/shape.js.map +1 -1
- package/lib/shared/orgShapeListUtils.d.ts +1 -1
- package/lib/shared/orgShapeListUtils.js +5 -1
- package/lib/shared/orgShapeListUtils.js.map +1 -1
- package/messages/messages.md +3 -0
- package/oclif.manifest.json +1 -1
- package/package.json +18 -17
@@ -12,4 +12,7 @@ export declare class OrgShapeListCommand extends SfCommand<OrgShapeListResult[]>
|
|
12
12
|
};
|
13
13
|
run(): Promise<OrgShapeListResult[]>;
|
14
14
|
}
|
15
|
-
export declare const getAllOrgShapesFromAuthenticatedOrgs: () => Promise<
|
15
|
+
export declare const getAllOrgShapesFromAuthenticatedOrgs: () => Promise<{
|
16
|
+
orgShapes: OrgShapeListResult[];
|
17
|
+
errors: Error[];
|
18
|
+
}>;
|
@@ -10,6 +10,7 @@ exports.getAllOrgShapesFromAuthenticatedOrgs = exports.OrgShapeListCommand = voi
|
|
10
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
11
11
|
const core_1 = require("@salesforce/core");
|
12
12
|
const chalk = require("chalk");
|
13
|
+
const kit_1 = require("@salesforce/kit");
|
13
14
|
const orgShapeListUtils_1 = require("../../../shared/orgShapeListUtils");
|
14
15
|
core_1.Messages.importMessagesDirectory(__dirname);
|
15
16
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'shape.list');
|
@@ -29,14 +30,16 @@ class OrgShapeListCommand extends sf_plugins_core_1.SfCommand {
|
|
29
30
|
// there were no flags being used in the original!
|
30
31
|
// eslint-disable-next-line sf-plugin/should-parse-flags
|
31
32
|
async run() {
|
32
|
-
const
|
33
|
-
|
33
|
+
const { orgShapes, errors } = await (0, exports.getAllOrgShapesFromAuthenticatedOrgs)();
|
34
|
+
errors.forEach((e) => this.warn(e));
|
35
|
+
if (orgShapes.length === 0) {
|
36
|
+
this.log();
|
34
37
|
this.info(messages.getMessage('noOrgShapes'));
|
35
|
-
return
|
38
|
+
return orgShapes;
|
36
39
|
}
|
37
40
|
this.styledHeader('Org Shapes');
|
38
|
-
this.table(
|
39
|
-
return
|
41
|
+
this.table(orgShapes.map((shape) => (shape.status === 'Active' ? { ...shape, status: chalk.green(shape.status) } : shape)), orgShapeColumns);
|
42
|
+
return orgShapes;
|
40
43
|
}
|
41
44
|
}
|
42
45
|
exports.OrgShapeListCommand = OrgShapeListCommand;
|
@@ -57,8 +60,8 @@ const getAllOrgShapesFromAuthenticatedOrgs = async () => {
|
|
57
60
|
if (orgs.length === 0) {
|
58
61
|
throw messages.createError('noAuthFound');
|
59
62
|
}
|
60
|
-
const shapes = await
|
61
|
-
return shapes.flat();
|
63
|
+
const shapes = await (0, kit_1.settleAll)(orgs.map((o) => (0, orgShapeListUtils_1.getAllShapesFromOrg)(o)));
|
64
|
+
return { orgShapes: shapes.fulfilled.flat(), errors: shapes.rejected };
|
62
65
|
};
|
63
66
|
exports.getAllOrgShapesFromAuthenticatedOrgs = getAllOrgShapesFromAuthenticatedOrgs;
|
64
67
|
//# sourceMappingURL=shape.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/list/shape.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAyE;AACzE,2CAAsD;AACtD,+BAA+B;AAC/B,yEAA4F;AAE5F,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC;AAEnF,qCAAqC;AACrC,MAAM,eAAe,GAAG;IACtB,KAAK,EAAE;QACL,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,CAAC,IAAwB,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;KAC5D;IACD,QAAQ,EAA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AAG,KAAK,IAGtD,EAAE;IACH,MAAM,IAAI,GAAG,MAAM,eAAQ,CAAC,qBAAqB,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACxG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;KAC3C;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,eAAS,EAAuB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,uCAAmB,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9F,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;AACzE,CAAC,CAAC;AAXW,QAAA,oCAAoC,wCAW/C"}
|
@@ -8,6 +8,8 @@
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.isShapeEnabled = exports.getAllShapesFromOrg = void 0;
|
10
10
|
const core_1 = require("@salesforce/core");
|
11
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
12
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'messages');
|
11
13
|
async function getAllShapesFromOrg(orgAuth) {
|
12
14
|
const org = await core_1.Org.create({ aliasOrUsername: orgAuth.username });
|
13
15
|
const conn = org.getConnection();
|
@@ -34,7 +36,9 @@ async function getAllShapesFromOrg(orgAuth) {
|
|
34
36
|
}
|
35
37
|
else {
|
36
38
|
logger.error(false, 'Error finding org shapes', JsForceErr);
|
37
|
-
|
39
|
+
const error = core_1.SfError.wrap(JsForceErr);
|
40
|
+
error.message = messages.getMessage('errorWithOrg', [orgAuth.username, JsForceErr.message]);
|
41
|
+
return Promise.reject(error);
|
38
42
|
}
|
39
43
|
}
|
40
44
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"orgShapeListUtils.js","sourceRoot":"","sources":["../../src/shared/orgShapeListUtils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
1
|
+
{"version":3,"file":"orgShapeListUtils.js","sourceRoot":"","sources":["../../src/shared/orgShapeListUtils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAgG;AAChG,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,UAAU,CAAC,CAAC;AA0B1E,KAAK,UAAU,mBAAmB,CAAC,OAAyB;IACjE,MAAM,GAAG,GAAG,MAAM,UAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,MAAM,aAAM,CAAC,KAAK,CAAC,wBAAwB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,IAAI,CAAC,cAAc,OAAO,CAAC,QAAQ,aAAa,CAAC,CAAC;IACzD,IAAI;QACF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,KAAK,CAClC,wHAAwH,CACzH,CAAC;QACF,OAAO,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACzC,GAAG;gBACD,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,KAAK,CAAC,EAAE;gBACjB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ;gBACnC,WAAW,EAAE,KAAK,CAAC,WAAW;aAC/B;YACD,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC,CAAC,CAAC;KACL;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,UAAU,GAAG,GAAmB,CAAC;QACvC,IAAI,UAAU,CAAC,SAAS,KAAK,cAAc,EAAE;YAC3C,OAAO,EAAE,CAAC;SACX;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,0BAA0B,EAAE,UAAU,CAAC,CAAC;YAC5D,MAAM,KAAK,GAAG,cAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5F,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC9B;KACF;AACH,CAAC;AA/BD,kDA+BC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,IAAgB;IACnD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CACxC,wCAAwC,gBAAgB,EAAE,CAC3D,CAAC;IACF,+DAA+D;IAC/D,OAAO,SAAS,CAAC,SAAS,GAAG,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,wBAAwB,CAAC;AACrF,CAAC;AAND,wCAMC"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
@@ -1,40 +1,41 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salesforce/plugin-signups",
|
3
3
|
"description": "Commands to interact with org shapes",
|
4
|
-
"version": "1.4.
|
4
|
+
"version": "1.4.3",
|
5
5
|
"author": "Salesforce",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
8
8
|
"dependencies": {
|
9
|
-
"@oclif/core": "^2.
|
10
|
-
"@salesforce/core": "^3.33.
|
11
|
-
"@salesforce/
|
9
|
+
"@oclif/core": "^2.3.0",
|
10
|
+
"@salesforce/core": "^3.33.2",
|
11
|
+
"@salesforce/kit": "^1.9.0",
|
12
|
+
"@salesforce/sf-plugins-core": "^2.2.1",
|
12
13
|
"chalk": "^4.1.2",
|
13
14
|
"change-case": "^4.1.2",
|
14
15
|
"tslib": "^2"
|
15
16
|
},
|
16
17
|
"devDependencies": {
|
17
|
-
"@oclif/plugin-command-snapshot": "^3.3.
|
18
|
-
"@salesforce/cli-plugins-testkit": "^3.2.
|
18
|
+
"@oclif/plugin-command-snapshot": "^3.3.6",
|
19
|
+
"@salesforce/cli-plugins-testkit": "^3.2.21",
|
19
20
|
"@salesforce/dev-config": "^3.0.1",
|
20
21
|
"@salesforce/dev-scripts": "^4.0.0-beta.9",
|
21
|
-
"@salesforce/plugin-command-reference": "^2.
|
22
|
+
"@salesforce/plugin-command-reference": "^2.3.1",
|
22
23
|
"@salesforce/prettier-config": "^0.0.2",
|
23
|
-
"@salesforce/ts-sinon": "1.4.
|
24
|
-
"@salesforce/ts-types": "^1.7.
|
25
|
-
"@swc/core": "^1.3.
|
24
|
+
"@salesforce/ts-sinon": "^1.4.6",
|
25
|
+
"@salesforce/ts-types": "^1.7.3",
|
26
|
+
"@swc/core": "^1.3.36",
|
26
27
|
"@types/chai-as-promised": "^7.1.5",
|
27
28
|
"@types/chai-string": "^1.4.2",
|
28
29
|
"@types/inquirer": "^9.0.3",
|
29
30
|
"@types/shelljs": "^0.8.11",
|
30
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
31
|
-
"@typescript-eslint/parser": "^5.
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
32
|
+
"@typescript-eslint/parser": "^5.53.0",
|
32
33
|
"chai": "^4.3.7",
|
33
34
|
"chai-as-promised": "7.1.1",
|
34
35
|
"chai-string": "^1.5.0",
|
35
36
|
"eslint": "^8.31.0",
|
36
37
|
"eslint-config-prettier": "^8.6.0",
|
37
|
-
"eslint-config-salesforce": "^1.1.
|
38
|
+
"eslint-config-salesforce": "^1.1.1",
|
38
39
|
"eslint-config-salesforce-license": "^0.2.0",
|
39
40
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
40
41
|
"eslint-plugin-header": "^3.1.1",
|
@@ -44,8 +45,8 @@
|
|
44
45
|
"husky": "^7.0.4",
|
45
46
|
"mocha": "^9.1.3",
|
46
47
|
"nyc": "^15.1.0",
|
47
|
-
"oclif": "^3.6.
|
48
|
-
"prettier": "^2.8.
|
48
|
+
"oclif": "^3.6.5",
|
49
|
+
"prettier": "^2.8.4",
|
49
50
|
"pretty-quick": "^3.1.0",
|
50
51
|
"shx": "0.3.4",
|
51
52
|
"sinon": "^11.1.1",
|
@@ -218,7 +219,7 @@
|
|
218
219
|
}
|
219
220
|
},
|
220
221
|
"sfdx": {
|
221
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.4.
|
222
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.4.
|
222
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.4.3.crt",
|
223
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-signups/1.4.3.sig"
|
223
224
|
}
|
224
225
|
}
|