@salesforce/plugin-settings 1.0.9 → 1.1.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/lib/alias.d.ts +13 -0
- package/lib/alias.js +34 -0
- package/lib/alias.js.map +1 -0
- package/lib/commands/alias/list.d.ts +7 -0
- package/lib/commands/alias/list.js +26 -0
- package/lib/commands/alias/list.js.map +1 -0
- package/lib/commands/alias/set.d.ts +8 -0
- package/lib/commands/alias/set.js +53 -0
- package/lib/commands/alias/set.js.map +1 -0
- package/lib/commands/alias/unset.d.ts +12 -0
- package/lib/commands/alias/unset.js +73 -0
- package/lib/commands/alias/unset.js.map +1 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/get.js.map +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/list.js.map +1 -1
- package/lib/commands/config/set.d.ts +0 -4
- package/lib/commands/config/set.js +30 -45
- package/lib/commands/config/set.js.map +1 -1
- package/lib/commands/config/unset.js +1 -1
- package/lib/commands/config/unset.js.map +1 -1
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/messages/alias.list.md +13 -0
- package/messages/alias.set.md +37 -0
- package/messages/alias.unset.md +41 -0
- package/messages/{get.md → config.get.md} +0 -0
- package/messages/{list.md → config.list.md} +1 -1
- package/messages/{set.md → config.set.md} +9 -9
- package/messages/{unset.md → config.unset.md} +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +17 -14
- package/schemas/alias-list.json +113 -0
- package/schemas/alias-set.json +113 -0
- package/schemas/alias-unset.json +113 -0
package/lib/alias.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SfError } from '@salesforce/core';
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
export declare type AliasResult = {
|
|
4
|
+
alias: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
success?: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
error?: SfError;
|
|
9
|
+
};
|
|
10
|
+
export declare type AliasResults = AliasResult[];
|
|
11
|
+
export declare abstract class AliasCommand<T> extends SfCommand<T> {
|
|
12
|
+
protected output(title: string, results: AliasResults): void;
|
|
13
|
+
}
|
package/lib/alias.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AliasCommand = void 0;
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
class AliasCommand extends sf_plugins_core_1.SfCommand {
|
|
12
|
+
output(title, results) {
|
|
13
|
+
if (results.length === 0) {
|
|
14
|
+
this.log('No results');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const columns = {
|
|
18
|
+
alias: { header: 'Alias' },
|
|
19
|
+
value: { header: 'Value' },
|
|
20
|
+
};
|
|
21
|
+
if (title.includes('Set') || title.includes('Unset')) {
|
|
22
|
+
columns.success = { header: 'Success' };
|
|
23
|
+
}
|
|
24
|
+
// If any result contains an Error, add the header and grab the message off of Error
|
|
25
|
+
if (results.some((result) => result.error)) {
|
|
26
|
+
process.exitCode = 1;
|
|
27
|
+
columns.message = { header: 'Message' };
|
|
28
|
+
results.map((result) => (result.message = result.error?.message));
|
|
29
|
+
}
|
|
30
|
+
this.table(results, columns, { title, 'no-truncate': true });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.AliasCommand = AliasCommand;
|
|
34
|
+
//# sourceMappingURL=alias.js.map
|
package/lib/alias.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.js","sourceRoot":"","sources":["../src/alias.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,iEAAwD;AAYxD,MAAsB,YAAgB,SAAQ,2BAAY;IAC9C,MAAM,CAAC,KAAa,EAAE,OAAqB;QACnD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACvB,OAAO;SACR;QAED,MAAM,OAAO,GAA2C;YACtD,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;YAC1B,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;SAC3B,CAAC;QAEF,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACpD,OAAO,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;SACzC;QAED,oFAAoF;QACpF,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YAErB,OAAO,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;YAExC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;SACnE;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF;AA3BD,oCA2BC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const core_1 = require("@salesforce/core");
|
|
10
|
+
const alias_1 = require("../../alias");
|
|
11
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
12
|
+
const messages = core_1.Messages.load('@salesforce/plugin-settings', 'alias.list', ['summary', 'description', 'examples']);
|
|
13
|
+
class AliasList extends alias_1.AliasCommand {
|
|
14
|
+
async run() {
|
|
15
|
+
const stateAggregator = await core_1.StateAggregator.getInstance();
|
|
16
|
+
const aliases = stateAggregator.aliases.getAll();
|
|
17
|
+
const results = Object.entries(aliases).map(([alias, value]) => ({ alias, value }));
|
|
18
|
+
this.output('Alias List', results);
|
|
19
|
+
return results;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = AliasList;
|
|
23
|
+
AliasList.summary = messages.getMessage('summary');
|
|
24
|
+
AliasList.description = messages.getMessage('description');
|
|
25
|
+
AliasList.examples = messages.getMessages('examples');
|
|
26
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/alias/list.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA6D;AAC7D,uCAAyD;AAEzD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,6BAA6B,EAAE,YAAY,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AACpH,MAAqB,SAAU,SAAQ,oBAA0B;IAKxD,KAAK,CAAC,GAAG;QACd,MAAM,eAAe,GAAG,MAAM,sBAAe,CAAC,WAAW,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAEpF,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAEnC,OAAO,OAAO,CAAC;IACjB,CAAC;;AAdH,4BAeC;AAde,iBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,qBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,kBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AliasCommand, AliasResults } from '../../alias';
|
|
2
|
+
export default class AliasSet extends AliasCommand<AliasResults> {
|
|
3
|
+
static summary: string;
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static readonly strict = false;
|
|
7
|
+
run(): Promise<AliasResults>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
10
|
+
const core_1 = require("@salesforce/core");
|
|
11
|
+
const alias_1 = require("../../alias");
|
|
12
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
+
const messages = core_1.Messages.load('@salesforce/plugin-settings', 'alias.set', [
|
|
14
|
+
'summary',
|
|
15
|
+
'description',
|
|
16
|
+
'examples',
|
|
17
|
+
'error.ArgumentsRequired',
|
|
18
|
+
'error.ValueRequired',
|
|
19
|
+
]);
|
|
20
|
+
class AliasSet extends alias_1.AliasCommand {
|
|
21
|
+
async run() {
|
|
22
|
+
const stateAggregator = await core_1.StateAggregator.getInstance();
|
|
23
|
+
const { args, argv } = await this.parse(AliasSet);
|
|
24
|
+
if (!argv.length)
|
|
25
|
+
throw messages.createError('error.ArgumentsRequired');
|
|
26
|
+
const parsed = (0, sf_plugins_core_1.parseVarArgs)(args, argv);
|
|
27
|
+
const results = Object.entries(parsed).map(([alias, value]) => {
|
|
28
|
+
try {
|
|
29
|
+
if (!value) {
|
|
30
|
+
return { alias, success: false, error: messages.createError('error.ValueRequired'), value };
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
stateAggregator.aliases.set(alias, value);
|
|
34
|
+
return { alias, success: true, value };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
const error = err;
|
|
39
|
+
return { alias, success: false, error, value };
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
await stateAggregator.aliases.write();
|
|
43
|
+
this.output('Alias Set', results);
|
|
44
|
+
return results;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.default = AliasSet;
|
|
48
|
+
AliasSet.summary = messages.getMessage('summary');
|
|
49
|
+
AliasSet.description = messages.getMessage('description');
|
|
50
|
+
AliasSet.examples = messages.getMessages('examples');
|
|
51
|
+
// This allows varargs
|
|
52
|
+
AliasSet.strict = false;
|
|
53
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../src/commands/alias/set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iEAA2D;AAC3D,2CAAsE;AACtE,uCAAyD;AAEzD,eAAQ,CAAC,uBAAuB,CAAC,SAA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,OAAO,CAAC,KAAK,EAAE,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAElC,OAAO,OAAO,CAAC;IACjB,CAAC;;AApCH,2BAqCC;AApCe,gBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,oBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,iBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE1D,sBAAsB;AACC,eAAM,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AliasCommand, AliasResults } from '../../alias';
|
|
2
|
+
export default class AliasUnset extends AliasCommand<AliasResults> {
|
|
3
|
+
static summary: string;
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static readonly strict = false;
|
|
7
|
+
static flags: {
|
|
8
|
+
all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'no-prompt': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<AliasResults>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
10
|
+
const core_1 = require("@salesforce/core");
|
|
11
|
+
const alias_1 = require("../../alias");
|
|
12
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
+
const messages = core_1.Messages.load('@salesforce/plugin-settings', 'alias.unset', [
|
|
14
|
+
'summary',
|
|
15
|
+
'description',
|
|
16
|
+
'examples',
|
|
17
|
+
'flags.all.summary',
|
|
18
|
+
'flags.no-prompt.summary',
|
|
19
|
+
'error.NameRequired',
|
|
20
|
+
'warning.NoAliasesSet',
|
|
21
|
+
'prompt.RemoveAllAliases',
|
|
22
|
+
]);
|
|
23
|
+
class AliasUnset extends alias_1.AliasCommand {
|
|
24
|
+
async run() {
|
|
25
|
+
const { flags, argv } = await this.parse(AliasUnset);
|
|
26
|
+
const stateAggregator = await core_1.StateAggregator.getInstance();
|
|
27
|
+
const aliases = stateAggregator.aliases.getAll();
|
|
28
|
+
const toRemove = flags.all ? Object.keys(aliases) : argv;
|
|
29
|
+
if (toRemove.length === 0) {
|
|
30
|
+
if (flags.all) {
|
|
31
|
+
this.warn(messages.getMessage('warning.NoAliasesSet'));
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
// No arg was passed, we don't know what to unset.
|
|
35
|
+
throw messages.createError('error.NameRequired');
|
|
36
|
+
}
|
|
37
|
+
// Confirm the users wants to remove all aliases. Supports --no-prompt.
|
|
38
|
+
if (flags.all && !flags['no-prompt'] && !(await this.confirm(messages.getMessage('prompt.RemoveAllAliases')))) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const results = toRemove.map((alias) => {
|
|
42
|
+
// We will log the value in the output in case an alias was unset by mistake.
|
|
43
|
+
const value = aliases[alias];
|
|
44
|
+
try {
|
|
45
|
+
stateAggregator.aliases.unset(alias);
|
|
46
|
+
return { alias, value, success: true };
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
const error = err;
|
|
50
|
+
return { alias, value, success: false, error };
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
await stateAggregator.aliases.write();
|
|
54
|
+
this.output('Alias Unset', results);
|
|
55
|
+
return results;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.default = AliasUnset;
|
|
59
|
+
AliasUnset.summary = messages.getMessage('summary');
|
|
60
|
+
AliasUnset.description = messages.getMessage('description');
|
|
61
|
+
AliasUnset.examples = messages.getMessages('examples');
|
|
62
|
+
AliasUnset.strict = false; // This allows varargs
|
|
63
|
+
AliasUnset.flags = {
|
|
64
|
+
all: sf_plugins_core_1.Flags.boolean({
|
|
65
|
+
summary: messages.getMessage('flags.all.summary'),
|
|
66
|
+
char: 'a',
|
|
67
|
+
}),
|
|
68
|
+
'no-prompt': sf_plugins_core_1.Flags.boolean({
|
|
69
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
70
|
+
char: 'p',
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=unset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unset.js","sourceRoot":"","sources":["../../../src/commands/alias/unset.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iEAAoD;AACpD,2CAAsE;AACtE,uCAAyD;AAEzD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,6BAA6B,EAAE,aAAa,EAAE;IAC3E,SAAS;IACT,aAAa;IACb,UAAU;IACV,mBAAmB;IACnB,yBAAyB;IACzB,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;CAC1B,CAAC,CAAC;AAEH,MAAqB,UAAW,SAAQ,oBAA0B;IAiBzD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAErD,MAAM,eAAe,GAAG,MAAM,sBAAe,CAAC,WAAW,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC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,CAAC;AACzC,sBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,mBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AACnC,iBAAM,GAAG,KAAK,CAAC,CAAC,sBAAsB;AAE/C,gBAAK,GAAG;IACpB,GAAG,EAAE,uBAAK,CAAC,OAAO,CAAC;QACjB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;QACjD,IAAI,EAAE,GAAG;KACV,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QACvD,IAAI,EAAE,GAAG;KACV,CAAC;CACH,CAAC"}
|
|
@@ -11,7 +11,7 @@ const core_1 = require("@oclif/core");
|
|
|
11
11
|
const core_2 = require("@salesforce/core");
|
|
12
12
|
const config_1 = require("../../config");
|
|
13
13
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
14
|
-
const messages = core_2.Messages.loadMessages('@salesforce/plugin-settings', 'get');
|
|
14
|
+
const messages = core_2.Messages.loadMessages('@salesforce/plugin-settings', 'config.get');
|
|
15
15
|
class Get extends config_1.ConfigCommand {
|
|
16
16
|
async run() {
|
|
17
17
|
const { argv, flags } = await this.parse(Get);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/config/get.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAoC;AACpC,2CAA8D;AAC9D,yCAAmF;AAEnF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/config/get.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAoC;AACpC,2CAA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C7B,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtD,CAAC;CACH,CAAC;AAEY,iCAA6B,GAAG,4BAAmB,CAAC"}
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
const core_1 = require("@salesforce/core");
|
|
10
10
|
const config_1 = require("../../config");
|
|
11
11
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
12
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-settings', 'list');
|
|
12
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-settings', 'config.list');
|
|
13
13
|
class List extends config_1.ConfigCommand {
|
|
14
14
|
async run() {
|
|
15
15
|
const aggregator = await core_1.ConfigAggregator.create();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/config/list.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAA8D;AAC9D,yCAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/config/list.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAA8D;AAC9D,yCAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,aAAa,CAAC,CAAC;AAErF,MAAqB,IAAK,SAAQ,sBAA8B;IAMvD,KAAK,CAAC,GAAG;QACd,MAAM,UAAU,GAAG,MAAM,uBAAgB,CAAC,MAAM,EAAE,CAAC;QAEnD,UAAU,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACvC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;;AAjBH,uBAkBC;AAjBwB,gBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,YAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,aAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AACrD,UAAK,GAAG,EAAE,CAAC"}
|
|
@@ -9,8 +9,4 @@ export declare class Set extends ConfigCommand<ConfigResponses> {
|
|
|
9
9
|
};
|
|
10
10
|
static configurationVariablesSection: import("@salesforce/sf-plugins-core/lib/util").HelpSection;
|
|
11
11
|
run(): Promise<ConfigResponses>;
|
|
12
|
-
protected resolveArguments(): Promise<string[]>;
|
|
13
|
-
protected parseConfigKeysAndValues(): Promise<{
|
|
14
|
-
[index: string]: string;
|
|
15
|
-
}>;
|
|
16
12
|
}
|
|
@@ -8,28 +8,42 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Set = void 0;
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
12
|
const core_2 = require("@salesforce/core");
|
|
12
13
|
const config_1 = require("../../config");
|
|
13
14
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
14
|
-
const messages = core_2.Messages.
|
|
15
|
+
const messages = core_2.Messages.load('@salesforce/plugin-settings', 'config.set', [
|
|
16
|
+
'summary',
|
|
17
|
+
'description',
|
|
18
|
+
'examples',
|
|
19
|
+
'flags.global.summary',
|
|
20
|
+
'error.ArgumentsRequired',
|
|
21
|
+
'error.ValueRequired',
|
|
22
|
+
]);
|
|
15
23
|
class Set extends config_1.ConfigCommand {
|
|
16
24
|
async run() {
|
|
17
|
-
const { flags } = await this.parse(Set);
|
|
25
|
+
const { args, argv, flags } = await this.parse(Set);
|
|
18
26
|
const config = await loadConfig(flags.global);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const value =
|
|
27
|
+
if (!argv.length)
|
|
28
|
+
throw messages.createError('error.ArgumentsRequired');
|
|
29
|
+
const parsed = (0, sf_plugins_core_1.parseVarArgs)(args, argv);
|
|
30
|
+
for (const name of Object.keys(parsed)) {
|
|
31
|
+
const value = parsed[name];
|
|
24
32
|
try {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
if (!value) {
|
|
34
|
+
// Push a failure if users are try to unset a value with `set=`.
|
|
35
|
+
this.pushFailure(name, messages.createError('error.ValueRequired'), value);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
// core's builtin config validation requires synchronous functions but there's
|
|
39
|
+
// currently no way to validate an org synchronously. Therefore, we have to manually
|
|
40
|
+
// validate the org here and manually set the error message if it fails
|
|
41
|
+
// eslint-disable-next-line no-await-in-loop
|
|
42
|
+
if (isOrgKey(name) && value)
|
|
43
|
+
await validateOrg(value);
|
|
44
|
+
config.set(name, value);
|
|
45
|
+
this.responses.push({ name, value, success: true });
|
|
46
|
+
}
|
|
33
47
|
}
|
|
34
48
|
catch (err) {
|
|
35
49
|
this.pushFailure(name, err, value);
|
|
@@ -41,35 +55,6 @@ class Set extends config_1.ConfigCommand {
|
|
|
41
55
|
}
|
|
42
56
|
return this.responses;
|
|
43
57
|
}
|
|
44
|
-
async resolveArguments() {
|
|
45
|
-
const { args, argv } = await this.parse(Set);
|
|
46
|
-
const argVals = Object.values(args);
|
|
47
|
-
return argv.filter((val) => !argVals.includes(val));
|
|
48
|
-
}
|
|
49
|
-
async parseConfigKeysAndValues() {
|
|
50
|
-
const configs = {};
|
|
51
|
-
const args = await this.resolveArguments();
|
|
52
|
-
if (!args.length) {
|
|
53
|
-
throw messages.createError('error.ArgumentsRequired');
|
|
54
|
-
}
|
|
55
|
-
// Support `config set key value`
|
|
56
|
-
if (args.length === 2 && !args[0].includes('=')) {
|
|
57
|
-
return { [args[0]]: args[1] };
|
|
58
|
-
}
|
|
59
|
-
// Ensure that all args are in the right format (e.g. key=value key1=value1)
|
|
60
|
-
args.forEach((arg) => {
|
|
61
|
-
const split = arg.split('=');
|
|
62
|
-
if (split.length !== 2) {
|
|
63
|
-
throw messages.createError('error.InvalidArgumentFormat', [arg]);
|
|
64
|
-
}
|
|
65
|
-
const [name, value] = split;
|
|
66
|
-
if (configs[name]) {
|
|
67
|
-
throw messages.createError('error.DuplicateArgument', [name]);
|
|
68
|
-
}
|
|
69
|
-
configs[name] = value || undefined;
|
|
70
|
-
});
|
|
71
|
-
return configs;
|
|
72
|
-
}
|
|
73
58
|
}
|
|
74
59
|
exports.Set = Set;
|
|
75
60
|
Set.description = messages.getMessage('description');
|
|
@@ -90,7 +75,7 @@ const loadConfig = async (global) => {
|
|
|
90
75
|
return config;
|
|
91
76
|
}
|
|
92
77
|
catch (error) {
|
|
93
|
-
if (error instanceof core_2.
|
|
78
|
+
if (error instanceof core_2.SfError) {
|
|
94
79
|
error.actions = error.actions || [];
|
|
95
80
|
error.actions.push('Run with --global to set for your entire workspace.');
|
|
96
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../src/commands/config/set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../src/commands/config/set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC,iEAA2D;AAC3D,2CAAu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qD,CAAC,CAAC;SAC3E;QACD,MAAM,KAAK,CAAC;KACb;AACH,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAW,EAAE,CACzC,CAAC,0BAAmB,CAAC,cAAwB,EAAE,0BAAmB,CAAC,UAAoB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAE1G,MAAM,WAAW,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IACzD,IAAI;QACF,MAAM,UAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;KAC9C;IAAC,MAAM;QACN,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,yBAAyB,CAAC,CAAC;KAC/E;AACH,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ const core_1 = require("@oclif/core");
|
|
|
11
11
|
const core_2 = require("@salesforce/core");
|
|
12
12
|
const config_1 = require("../../config");
|
|
13
13
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
14
|
-
const messages = core_2.Messages.loadMessages('@salesforce/plugin-settings', 'unset');
|
|
14
|
+
const messages = core_2.Messages.loadMessages('@salesforce/plugin-settings', 'config.unset');
|
|
15
15
|
class UnSet extends config_1.ConfigCommand {
|
|
16
16
|
async run() {
|
|
17
17
|
const { argv, flags } = await this.parse(UnSet);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unset.js","sourceRoot":"","sources":["../../../src/commands/config/unset.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC,2CAAoD;AACpD,yCAAmF;AAEnF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"unset.js","sourceRoot":"","sources":["../../../src/commands/config/unset.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAAoC;AACpC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,aAAa,CAAC,CAAC;AACjD,aAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,cAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5C,YAAM,GAAG,KAAK,CAAC;AAExB,mCAA6B,GAAG,4BAAmB,CAAC;AAE3C,WAAK,GAAG;IAC7B,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KACrD,CAAC;CACH,CAAC"}
|
package/lib/config.js
CHANGED
|
@@ -25,7 +25,7 @@ class ConfigCommand extends sf_plugins_core_1.SfCommand {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
pushFailure(name, err, value) {
|
|
28
|
-
const error = core_1.
|
|
28
|
+
const error = core_1.SfError.wrap(err);
|
|
29
29
|
this.responses.push({
|
|
30
30
|
name,
|
|
31
31
|
success: false,
|
|
@@ -58,7 +58,7 @@ class ConfigCommand extends sf_plugins_core_1.SfCommand {
|
|
|
58
58
|
get: (row) => row.location ?? '',
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
if (this.responses.
|
|
61
|
+
if (this.responses.some((msg) => msg.error)) {
|
|
62
62
|
columns.message = {
|
|
63
63
|
header: 'Message',
|
|
64
64
|
get: (row) => row.message ?? '',
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAwD;AAExD,2CAA8F;AAC9F,iEAA4D;AAc/C,QAAA,mBAAmB,GAAG,IAAA,+BAAa,EAC9C,yBAAyB,EACzB,uBAAgB,CA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,EAAE,OAAO;gBACf,GAAG,EAAE,CAAC,GAAG,EAAU,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;aACtC,CAAC;SACH;QAED,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;SACzC;QAED,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,QAAQ,GAAG;gBACjB,MAAM,EAAE,UAAU;gBAClB,GAAG,EAAE,CAAC,GAAG,EAAU,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE;aACzC,CAAC;SACH;QAED,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YAC3C,OAAO,CAAC,OAAO,GAAG;gBAChB,MAAM,EAAE,SAAS;gBACjB,GAAG,EAAE,CAAC,GAAG,EAAU,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE;aACxC,CAAC;YACF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;SACjE;QAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AA9DD,sCA8DC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List all aliases currently set on your local computer.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Aliases are global, which means that you can use all the listed aliases in any Salesforce DX project on your computer.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- List all the aliases you've set:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Set one or more aliases on your local computer.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Aliases are user-defined short names that make it easier to use the CLI. For example, users often set an alias for a scratch org usernames because they're long and unintuitive. Check the --help of a CLI command to determine where you can use an alias.
|
|
8
|
+
|
|
9
|
+
You can associate an alias with only one value at a time. If you set an alias multiple times, the alias points to the most recent value. Aliases are global; after you set an alias, you can use it in any Salesforce DX project on your computer.
|
|
10
|
+
|
|
11
|
+
Use quotes to specify an alias value that contains spaces. You typically use an equal sign to set your alias, although you don't need it if you're setting a single alias in a command.
|
|
12
|
+
|
|
13
|
+
# examples
|
|
14
|
+
|
|
15
|
+
- Set an alias for a scratch org username:
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> my-scratch-org=test-sadbiytjsupn@example.com
|
|
18
|
+
|
|
19
|
+
- Set multiple aliases with a single command:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> my-scratch-org=test-sadbiytjsupn@example.com my-other-scratch-org=test-ss0xut7txzxf@example.com
|
|
22
|
+
|
|
23
|
+
- Set an alias that contains spaces:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> my-alias='alias with spaces'
|
|
26
|
+
|
|
27
|
+
- Set a single alias without using an equal sign:
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> my-scratch-org test-ss0xut7txzxf@example.com
|
|
30
|
+
|
|
31
|
+
# error.ArgumentsRequired
|
|
32
|
+
|
|
33
|
+
You must provide one or more aliases to set. Use the --help flag to see examples.
|
|
34
|
+
|
|
35
|
+
# error.ValueRequired
|
|
36
|
+
|
|
37
|
+
You must provide a value when setting an alias. Use `sf alias unset my-alias-name` to remove existing aliases.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Unset one or more aliases that are currently set on your local computer.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Aliases are global, so when you unset one it's no longer available in any Salesforce DX project.
|
|
8
|
+
|
|
9
|
+
# flags.all.summary
|
|
10
|
+
|
|
11
|
+
Unset all currently set aliases.
|
|
12
|
+
|
|
13
|
+
# flags.no-prompt.summary
|
|
14
|
+
|
|
15
|
+
Don't prompt the user for confirmation when unsetting all aliases.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Unset an alias:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> my-alias
|
|
22
|
+
|
|
23
|
+
- Unset multiple aliases with a single command:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> my-alias my-other-alias
|
|
26
|
+
|
|
27
|
+
- Unset all aliases:
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> --all [--no-prompt]
|
|
30
|
+
|
|
31
|
+
# error.NameRequired
|
|
32
|
+
|
|
33
|
+
You must provide an alias name when unsetting an alias.
|
|
34
|
+
|
|
35
|
+
# warning.NoAliasesSet
|
|
36
|
+
|
|
37
|
+
The `--all` flag was passed, but no aliases are currently set. Exiting.
|
|
38
|
+
|
|
39
|
+
# prompt.RemoveAllAliases
|
|
40
|
+
|
|
41
|
+
Are you sure you want to unset all aliases?
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ List the configuration variables that you've previously set.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Global configuration variables apply to any
|
|
7
|
+
Global configuration variables apply to any Salesforce DX project and are always displayed. If you run this command from a project directory, local configuration variables are also displayed.
|
|
8
8
|
|
|
9
9
|
# examples
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ Set one or more configuration variables, such as your default org.
|
|
|
6
6
|
|
|
7
7
|
Use configuration variables to set CLI defaults, such as your default org or the API version you want the CLI to use. For example, if you set the "target-org" configuration variable, you don't need to specify it as a "sf deploy metadata" flag if you're deploying to your default org.
|
|
8
8
|
|
|
9
|
-
Local configuration variables apply only to your current project. Global variables, specified with the --global flag, apply in any
|
|
9
|
+
Local configuration variables apply only to your current project. Global variables, specified with the --global flag, apply in any Salesforce DX project.
|
|
10
10
|
|
|
11
11
|
The resolution order if you've set a flag value in multiple ways is as follows:
|
|
12
12
|
|
|
@@ -30,18 +30,18 @@ Run "sf config list" to see the configuration variables you've already set and t
|
|
|
30
30
|
|
|
31
31
|
<%= config.bin %> <%= command.id %> --global target-org=my-scratch-org
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Set the configuration variables globally, so they can be used from any directory.
|
|
36
|
-
|
|
37
|
-
# error.InvalidArgumentFormat
|
|
33
|
+
- Set a single configuration variable without using an equal sign; this syntax doesn't work when setting multiple configuration variables:
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
<%= config.bin %> <%= command.id %> target-org me@my.com
|
|
40
36
|
|
|
41
|
-
#
|
|
37
|
+
# flags.global.summary
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
Set the configuration variables globally, so they can be used from any Salesforce DX project.
|
|
44
40
|
|
|
45
41
|
# error.ArgumentsRequired
|
|
46
42
|
|
|
47
43
|
You must provide one or more configuration variables to set. Use the --help flag to view the available configuration variables.
|
|
44
|
+
|
|
45
|
+
# error.ValueRequired
|
|
46
|
+
|
|
47
|
+
You must provide a value when setting a config. Use `sf config unset the-config-name` to unset existing configs.
|
|
@@ -4,7 +4,7 @@ Unset local or global configuration variables.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Local configuration variables apply only to your current project. Global configuration variables apply in any
|
|
7
|
+
Local configuration variables apply only to your current project. Global configuration variables apply in any Salesforce DX project.
|
|
8
8
|
|
|
9
9
|
# examples
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ Local configuration variables apply only to your current project. Global configu
|
|
|
18
18
|
|
|
19
19
|
# flags.global.summary
|
|
20
20
|
|
|
21
|
-
Unset the configuration variables globally, so they can no longer be used from any
|
|
21
|
+
Unset the configuration variables globally, so they can no longer be used from any Salesforce DX project.
|
|
22
22
|
|
|
23
23
|
# error.NoConfigKeysFound
|
|
24
24
|
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.9","commands":{"config:get":{"id":"config:get","summary":"Get the value of a configuration variable.","description":"Run \"sf config list\" to see all the configuration variables you've set. Global configuration variable are always displayed; local ones are displayed if you run the command in a project directory. Run \"sf config set\" to set a configuration variable.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Get the value of the \"target-org\" configuration variable.\n<%= config.bin %> <%= command.id %> target-org","Get multiple configuration variables and display whether they're set locally or globally:\n<%= config.bin %> <%= command.id %> target-org api-version --verbose"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Display whether the configuration variables are set locally or globally.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}},"config:list":{"id":"config:list","summary":"List the configuration variables that you've previously set.","description":"Global configuration variables apply to any directory and are always displayed. If you run this command from a project directory, local configuration variables are also displayed.","strict":true,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["List both global configuration variables and those local to your project:\n$ <%= config.bin %> <%= command.id %>"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[]},"config:set":{"id":"config:set","summary":"Set one or more configuration variables, such as your default org.","description":"Use configuration variables to set CLI defaults, such as your default org or the API version you want the CLI to use. For example, if you set the \"target-org\" configuration variable, you don't need to specify it as a \"sf deploy metadata\" flag if you're deploying to your default org.\n\nLocal configuration variables apply only to your current project. Global variables, specified with the --global flag, apply in any directory.\n\nThe resolution order if you've set a flag value in multiple ways is as follows:\n\n 1. Flag value specified at the command line.\n 2. Local (project-level) configuration variable.\n 3. Global configuration variable.\n\nRun \"sf config list\" to see the configuration variables you've already set and their level (local or global).","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Set the local target-org configuration variable to an org username:\n<%= config.bin %> <%= command.id %> target-org=me@my.org","Set the local target-org configuration variable to an alias:\n<%= config.bin %> <%= command.id %> target-org=my-scratch-org","Set the global target-org configuration variable:\n<%= config.bin %> <%= command.id %> --global target-org=my-scratch-org"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","summary":"Set the configuration variables globally, so they can be used from any directory.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}},"config:unset":{"id":"config:unset","summary":"Unset local or global configuration variables.","description":"Local configuration variables apply only to your current project. Global configuration variables apply in any directory.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Unset the local \"target-org\" configuration variable:\n<%= config.bin %> <%= command.id %> target-org","Unset multiple configuration variables globally:\n<%= config.bin %> <%= command.id %> target-org api-version --global"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","summary":"Unset the configuration variables globally, so they can no longer be used from any directory.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}}}}
|
|
1
|
+
{"version":"1.1.0","commands":{"alias:list":{"id":"alias:list","summary":"List all aliases currently set on your local computer.","description":"Aliases are global, which means that you can use all the listed aliases in any Salesforce DX project on your computer.","strict":true,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["List all the aliases you've set:\n<%= config.bin %> <%= command.id %>"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[]},"alias:set":{"id":"alias:set","summary":"Set one or more aliases on your local computer.","description":"Aliases are user-defined short names that make it easier to use the CLI. For example, users often set an alias for a scratch org usernames because they're long and unintuitive. Check the --help of a CLI command to determine where you can use an alias.\n\nYou can associate an alias with only one value at a time. If you set an alias multiple times, the alias points to the most recent value. Aliases are global; after you set an alias, you can use it in any Salesforce DX project on your computer.\n\nUse quotes to specify an alias value that contains spaces. You typically use an equal sign to set your alias, although you don't need it if you're setting a single alias in a command.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Set an alias for a scratch org username:\n<%= config.bin %> <%= command.id %> my-scratch-org=test-sadbiytjsupn@example.com","Set multiple aliases with a single command:\n<%= config.bin %> <%= command.id %> my-scratch-org=test-sadbiytjsupn@example.com my-other-scratch-org=test-ss0xut7txzxf@example.com","Set an alias that contains spaces:\n<%= config.bin %> <%= command.id %> my-alias='alias with spaces'","Set a single alias without using an equal sign:\n<%= config.bin %> <%= command.id %> my-scratch-org test-ss0xut7txzxf@example.com"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[]},"alias:unset":{"id":"alias:unset","summary":"Unset one or more aliases that are currently set on your local computer.","description":"Aliases are global, so when you unset one it's no longer available in any Salesforce DX project.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Unset an alias:\n<%= config.bin %> <%= command.id %> my-alias","Unset multiple aliases with a single command:\n<%= config.bin %> <%= command.id %> my-alias my-other-alias","Unset all aliases:\n<%= config.bin %> <%= command.id %> --all [--no-prompt]"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"all":{"name":"all","type":"boolean","char":"a","summary":"Unset all currently set aliases.","allowNo":false},"no-prompt":{"name":"no-prompt","type":"boolean","char":"p","summary":"Don't prompt the user for confirmation when unsetting all aliases.","allowNo":false}},"args":[]},"config:get":{"id":"config:get","summary":"Get the value of a configuration variable.","description":"Run \"sf config list\" to see all the configuration variables you've set. Global configuration variable are always displayed; local ones are displayed if you run the command in a project directory. Run \"sf config set\" to set a configuration variable.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Get the value of the \"target-org\" configuration variable.\n<%= config.bin %> <%= command.id %> target-org","Get multiple configuration variables and display whether they're set locally or globally:\n<%= config.bin %> <%= command.id %> target-org api-version --verbose"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Display whether the configuration variables are set locally or globally.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}},"config:list":{"id":"config:list","summary":"List the configuration variables that you've previously set.","description":"Global configuration variables apply to any Salesforce DX project and are always displayed. If you run this command from a project directory, local configuration variables are also displayed.","strict":true,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["List both global configuration variables and those local to your project:\n$ <%= config.bin %> <%= command.id %>"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false}},"args":[]},"config:set":{"id":"config:set","summary":"Set one or more configuration variables, such as your default org.","description":"Use configuration variables to set CLI defaults, such as your default org or the API version you want the CLI to use. For example, if you set the \"target-org\" configuration variable, you don't need to specify it as a \"sf deploy metadata\" flag if you're deploying to your default org.\n\nLocal configuration variables apply only to your current project. Global variables, specified with the --global flag, apply in any Salesforce DX project.\n\nThe resolution order if you've set a flag value in multiple ways is as follows:\n\n 1. Flag value specified at the command line.\n 2. Local (project-level) configuration variable.\n 3. Global configuration variable.\n\nRun \"sf config list\" to see the configuration variables you've already set and their level (local or global).","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Set the local target-org configuration variable to an org username:\n<%= config.bin %> <%= command.id %> target-org=me@my.org","Set the local target-org configuration variable to an alias:\n<%= config.bin %> <%= command.id %> target-org=my-scratch-org","Set the global target-org configuration variable:\n<%= config.bin %> <%= command.id %> --global target-org=my-scratch-org","Set a single configuration variable without using an equal sign; this syntax doesn't work when setting multiple configuration variables:\n<%= config.bin %> <%= command.id %> target-org me@my.com"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","summary":"Set the configuration variables globally, so they can be used from any Salesforce DX project.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}},"config:unset":{"id":"config:unset","summary":"Unset local or global configuration variables.","description":"Local configuration variables apply only to your current project. Global configuration variables apply in any Salesforce DX project.","strict":false,"pluginName":"@salesforce/plugin-settings","pluginAlias":"@salesforce/plugin-settings","pluginType":"core","aliases":[],"examples":["Unset the local \"target-org\" configuration variable:\n<%= config.bin %> <%= command.id %> target-org","Unset multiple configuration variables globally:\n<%= config.bin %> <%= command.id %> target-org api-version --global"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","summary":"Unset the configuration variables globally, so they can no longer be used from any Salesforce DX project.","allowNo":false}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org. (sfdx only)"},{"name":"disableTelemetry","description":"Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)"},{"name":"instanceUrl","description":"URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)"},{"name":"maxQueryLimit","description":"Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)"},{"name":"restDeploy","description":"Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)"},{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"target-dev-hub","description":"Username or alias of your default Dev Hub org. (sf only)"}]}}}}
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-settings",
|
|
3
3
|
"description": "configure the Salesforce CLI",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^1.
|
|
9
|
-
"@salesforce/core": "^3.
|
|
8
|
+
"@oclif/core": "^1.19.0",
|
|
9
|
+
"@salesforce/core": "^3.31.12",
|
|
10
10
|
"@salesforce/sf-plugins-core": "^1.15.2",
|
|
11
11
|
"tslib": "^2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@oclif/plugin-command-snapshot": "^3.2.
|
|
15
|
-
"@oclif/test": "^2.2.
|
|
16
|
-
"@salesforce/cli-plugins-testkit": "^3.2.
|
|
14
|
+
"@oclif/plugin-command-snapshot": "^3.2.5",
|
|
15
|
+
"@oclif/test": "^2.2.4",
|
|
16
|
+
"@salesforce/cli-plugins-testkit": "^3.2.3",
|
|
17
17
|
"@salesforce/dev-config": "^3.1.0",
|
|
18
18
|
"@salesforce/dev-scripts": "^3.1.0",
|
|
19
|
-
"@salesforce/kit": "^1.
|
|
19
|
+
"@salesforce/kit": "^1.7.0",
|
|
20
20
|
"@salesforce/plugin-command-reference": "^2.2.8",
|
|
21
21
|
"@salesforce/prettier-config": "^0.0.2",
|
|
22
22
|
"@salesforce/ts-sinon": "^1.4.0",
|
|
23
|
-
"@salesforce/ts-types": "^1.5.
|
|
23
|
+
"@salesforce/ts-types": "^1.5.21",
|
|
24
24
|
"@types/fs-extra": "^9.0.13",
|
|
25
25
|
"@types/shelljs": "^0.8.11",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
27
|
-
"@typescript-eslint/parser": "^5.
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^5.40.1",
|
|
27
|
+
"@typescript-eslint/parser": "^5.40.1",
|
|
28
28
|
"chai": "^4.3.6",
|
|
29
29
|
"eslint": "^8.25.0",
|
|
30
30
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
34
34
|
"eslint-plugin-header": "^3.1.1",
|
|
35
35
|
"eslint-plugin-import": "^2.26.0",
|
|
36
|
-
"eslint-plugin-jsdoc": "^39.3.
|
|
36
|
+
"eslint-plugin-jsdoc": "^39.3.13",
|
|
37
37
|
"eslint-plugin-sf-plugin": "^0.3.0",
|
|
38
38
|
"fs-extra": "^10.1.0",
|
|
39
39
|
"husky": "^7.0.4",
|
|
@@ -87,6 +87,9 @@
|
|
|
87
87
|
"topics": {
|
|
88
88
|
"config": {
|
|
89
89
|
"description": "Commands to configure Salesforce CLI."
|
|
90
|
+
},
|
|
91
|
+
"alias": {
|
|
92
|
+
"description": "Use the alias commands to manage your aliases."
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
},
|
|
@@ -110,14 +113,14 @@
|
|
|
110
113
|
"test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
|
|
111
114
|
"test:deprecation-policy": "./bin/dev snapshot:compare",
|
|
112
115
|
"test:json-schema": "./bin/dev schema:compare",
|
|
113
|
-
"test:nuts": "nyc mocha \"
|
|
116
|
+
"test:nuts": "nyc mocha \"test/**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
|
|
114
117
|
"version": "oclif readme"
|
|
115
118
|
},
|
|
116
119
|
"publishConfig": {
|
|
117
120
|
"access": "public"
|
|
118
121
|
},
|
|
119
122
|
"sfdx": {
|
|
120
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-settings/1.0.
|
|
121
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-settings/1.0.
|
|
123
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-settings/1.1.0.crt",
|
|
124
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-settings/1.1.0.sig"
|
|
122
125
|
}
|
|
123
126
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AliasResults",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AliasResults": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/AliasResult"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"AliasResult": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"alias": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"value": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"success": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"message": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"error": {
|
|
27
|
+
"$ref": "#/definitions/SfError"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["alias"],
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"SfError": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"name": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"message": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"stack": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"cause": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"cause": {
|
|
53
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
54
|
+
},
|
|
55
|
+
"fullStack": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"message": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"stack": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": ["message", "name"],
|
|
66
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
67
|
+
},
|
|
68
|
+
"actions": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"description": "Action messages. Hints to the users regarding what can be done to fix related issues."
|
|
74
|
+
},
|
|
75
|
+
"exitCode": {
|
|
76
|
+
"type": "number",
|
|
77
|
+
"description": "SfdxCommand can return this process exit code."
|
|
78
|
+
},
|
|
79
|
+
"context": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "The related context for this error."
|
|
82
|
+
},
|
|
83
|
+
"data": {}
|
|
84
|
+
},
|
|
85
|
+
"required": ["exitCode", "message", "name"],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"description": "A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.\n\nTo throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.\n\n``` // To load a message bundle (Note that __dirname should contain a messages folder) Messages.importMessagesDirectory(__dirname); const messages = Messages.load('myPackageName', 'myBundleName');\n\n// To throw a non-bundle based error: throw new SfError(message.getMessage('myError'), 'MyErrorName'); ```"
|
|
88
|
+
},
|
|
89
|
+
"alias-1501530572-0-211-1501530572-0-1533943985149": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"name": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"cause": {
|
|
97
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
98
|
+
},
|
|
99
|
+
"fullStack": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"message": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"stack": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": ["message", "name"],
|
|
110
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AliasResults",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AliasResults": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/AliasResult"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"AliasResult": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"alias": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"value": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"success": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"message": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"error": {
|
|
27
|
+
"$ref": "#/definitions/SfError"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["alias"],
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"SfError": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"name": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"message": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"stack": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"cause": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"cause": {
|
|
53
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
54
|
+
},
|
|
55
|
+
"fullStack": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"message": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"stack": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": ["message", "name"],
|
|
66
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
67
|
+
},
|
|
68
|
+
"actions": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"description": "Action messages. Hints to the users regarding what can be done to fix related issues."
|
|
74
|
+
},
|
|
75
|
+
"exitCode": {
|
|
76
|
+
"type": "number",
|
|
77
|
+
"description": "SfdxCommand can return this process exit code."
|
|
78
|
+
},
|
|
79
|
+
"context": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "The related context for this error."
|
|
82
|
+
},
|
|
83
|
+
"data": {}
|
|
84
|
+
},
|
|
85
|
+
"required": ["exitCode", "message", "name"],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"description": "A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.\n\nTo throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.\n\n``` // To load a message bundle (Note that __dirname should contain a messages folder) Messages.importMessagesDirectory(__dirname); const messages = Messages.load('myPackageName', 'myBundleName');\n\n// To throw a non-bundle based error: throw new SfError(message.getMessage('myError'), 'MyErrorName'); ```"
|
|
88
|
+
},
|
|
89
|
+
"alias-1501530572-0-211-1501530572-0-1533943985149": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"name": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"cause": {
|
|
97
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
98
|
+
},
|
|
99
|
+
"fullStack": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"message": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"stack": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": ["message", "name"],
|
|
110
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AliasResults",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AliasResults": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/AliasResult"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"AliasResult": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"alias": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"value": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"success": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"message": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"error": {
|
|
27
|
+
"$ref": "#/definitions/SfError"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["alias"],
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"SfError": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"name": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"message": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"stack": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"cause": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"cause": {
|
|
53
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
54
|
+
},
|
|
55
|
+
"fullStack": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"message": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"stack": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": ["message", "name"],
|
|
66
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
67
|
+
},
|
|
68
|
+
"actions": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"description": "Action messages. Hints to the users regarding what can be done to fix related issues."
|
|
74
|
+
},
|
|
75
|
+
"exitCode": {
|
|
76
|
+
"type": "number",
|
|
77
|
+
"description": "SfdxCommand can return this process exit code."
|
|
78
|
+
},
|
|
79
|
+
"context": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "The related context for this error."
|
|
82
|
+
},
|
|
83
|
+
"data": {}
|
|
84
|
+
},
|
|
85
|
+
"required": ["exitCode", "message", "name"],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"description": "A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.\n\nTo throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.\n\n``` // To load a message bundle (Note that __dirname should contain a messages folder) Messages.importMessagesDirectory(__dirname); const messages = Messages.load('myPackageName', 'myBundleName');\n\n// To throw a non-bundle based error: throw new SfError(message.getMessage('myError'), 'MyErrorName'); ```"
|
|
88
|
+
},
|
|
89
|
+
"alias-1501530572-0-211-1501530572-0-1533943985149": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"name": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"cause": {
|
|
97
|
+
"$ref": "#/definitions/alias-1501530572-0-211-1501530572-0-1533943985149"
|
|
98
|
+
},
|
|
99
|
+
"fullStack": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"message": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"stack": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": ["message", "name"],
|
|
110
|
+
"description": "Any `Error` compatible with the `NamedError` type signature."
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|