@salesforce/plugin-settings 1.5.0-qa.5 → 2.0.2
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/README.md +173 -17
- package/lib/alias.js +2 -6
- package/lib/alias.js.map +1 -1
- package/lib/commands/alias/list.d.ts +2 -2
- package/lib/commands/alias/list.js +15 -16
- package/lib/commands/alias/list.js.map +1 -1
- package/lib/commands/alias/set.d.ts +2 -2
- package/lib/commands/alias/set.js +22 -19
- package/lib/commands/alias/set.js.map +1 -1
- package/lib/commands/alias/unset.d.ts +4 -4
- package/lib/commands/alias/unset.js +31 -28
- package/lib/commands/alias/unset.js.map +1 -1
- package/lib/commands/config/get.d.ts +5 -4
- package/lib/commands/config/get.js +31 -32
- package/lib/commands/config/get.js.map +1 -1
- package/lib/commands/config/list.d.ts +5 -4
- package/lib/commands/config/list.js +18 -23
- package/lib/commands/config/list.js.map +1 -1
- package/lib/commands/config/set.d.ts +7 -8
- package/lib/commands/config/set.js +46 -69
- package/lib/commands/config/set.js.map +1 -1
- package/lib/commands/config/unset.d.ts +7 -8
- package/lib/commands/config/unset.js +39 -52
- package/lib/commands/config/unset.js.map +1 -1
- package/lib/config.d.ts +8 -10
- package/lib/config.js +80 -75
- package/lib/config.js.map +1 -1
- package/lib/hooks/init/load_config_meta.js +14 -41
- package/lib/hooks/init/load_config_meta.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/messages/config.get.md +3 -1
- package/messages/config.list.md +6 -2
- package/messages/config.set.md +8 -8
- package/messages/config.unset.md +7 -1
- package/oclif.lock +8550 -0
- package/oclif.manifest.json +286 -144
- package/package.json +225 -220
- package/schemas/config-get.json +1 -1
- package/schemas/config-list.json +1 -1
- package/schemas/config-set.json +3 -3
- package/schemas/config-unset.json +3 -3
package/lib/config.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ux } from '@salesforce/sf-plugins-core';
|
|
2
2
|
import { ConfigInfo } from '@salesforce/core';
|
|
3
|
+
import { HelpSection } from '@oclif/core';
|
|
3
4
|
export type Msg = {
|
|
4
5
|
name: string;
|
|
5
|
-
value?: string;
|
|
6
|
+
value?: string | boolean | number | null;
|
|
6
7
|
success: boolean;
|
|
7
8
|
location?: string;
|
|
8
9
|
path?: string;
|
|
@@ -20,11 +21,8 @@ export type Msg = {
|
|
|
20
21
|
deprecated?: boolean;
|
|
21
22
|
};
|
|
22
23
|
export type ConfigResponses = Msg[];
|
|
23
|
-
export declare const CONFIG_HELP_SECTION:
|
|
24
|
-
export declare
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
protected pushFailure(name: string, err: string | Error, value?: string): void;
|
|
29
|
-
protected output(title: string, verbose: boolean): void;
|
|
30
|
-
}
|
|
24
|
+
export declare const CONFIG_HELP_SECTION: HelpSection;
|
|
25
|
+
export declare const calculateSuggestion: (userEnteredConfig: string) => string;
|
|
26
|
+
export declare const buildFailureMsg: (name: string, err: unknown, value?: string) => Msg;
|
|
27
|
+
export declare const buildSuccessMsg: (configInfo: ConfigInfo) => Msg;
|
|
28
|
+
export declare const output: (ux: Ux, responses: Msg[], command: 'set' | 'unset' | 'list' | 'get', verbose?: boolean) => void;
|
package/lib/config.js
CHANGED
|
@@ -1,86 +1,91 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import { SfError, Config } from '@salesforce/core';
|
|
8
|
+
import { toHelpSection } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import Levenshtein from 'fast-levenshtein';
|
|
10
|
+
import { isJsonMap } from '@salesforce/ts-types';
|
|
11
|
+
export const CONFIG_HELP_SECTION = toHelpSection('CONFIGURATION VARIABLES', ...new Set(Config.getAllowedProperties().map((k) => k.newKey ?? k.key)));
|
|
12
|
+
export const calculateSuggestion = (userEnteredConfig) => {
|
|
13
|
+
// we'll use this array to keep track of which key is the closest to the users entered value.
|
|
14
|
+
// keys closer to the index 0 will be a closer guess than keys indexed further from 0
|
|
15
|
+
// an entry at 0 would be a direct match, an entry at 1 would be a single character off, etc.
|
|
16
|
+
const index = [];
|
|
17
|
+
Config.getAllowedProperties()
|
|
18
|
+
.map((k) => k.newKey ?? k.key)
|
|
19
|
+
.map((k) => (index[Levenshtein.get(userEnteredConfig, k)] = k));
|
|
20
|
+
return index.find((item) => item !== undefined) ?? '';
|
|
21
|
+
};
|
|
22
|
+
export const buildFailureMsg = (name, err, value) => {
|
|
23
|
+
const error = SfError.wrap(typeof err !== 'string' && !(err instanceof Error) ? 'Unknown error' : err);
|
|
24
|
+
return {
|
|
25
|
+
name,
|
|
26
|
+
success: false,
|
|
27
|
+
value,
|
|
28
|
+
error,
|
|
29
|
+
message: error.message.replace(/\.\.$/, '.'),
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const buildSuccessMsg = (configInfo) => {
|
|
33
|
+
if (Array.isArray(configInfo.value)) {
|
|
34
|
+
throw new SfError(`Config ${configInfo.key} is an Array. It should be a primitive.`);
|
|
19
35
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// we'll use this array to keep track of which key is the closest to the users entered value.
|
|
23
|
-
// keys closer to the index 0 will be a closer guess than keys indexed further from 0
|
|
24
|
-
// an entry at 0 would be a direct match, an entry at 1 would be a single character off, etc.
|
|
25
|
-
const index = [];
|
|
26
|
-
core_1.Config.getAllowedProperties()
|
|
27
|
-
.map((k) => k.newKey ?? k.key)
|
|
28
|
-
.map((k) => (index[Levenshtein.get(userEnteredConfig, k)] = k));
|
|
29
|
-
return index.find((item) => item !== undefined) ?? '';
|
|
36
|
+
if (isJsonMap(configInfo.value)) {
|
|
37
|
+
throw new SfError(`Config ${configInfo.key} is an Object. It should be a primitive.`);
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
return {
|
|
40
|
+
name: configInfo.key,
|
|
41
|
+
key: configInfo.key,
|
|
42
|
+
value: configInfo.value,
|
|
43
|
+
path: configInfo.path,
|
|
44
|
+
success: true,
|
|
45
|
+
location: configInfo.location,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export const output = (ux, responses, command, verbose = false) => {
|
|
49
|
+
if (!ux.outputEnabled) {
|
|
50
|
+
return;
|
|
40
51
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
name,
|
|
45
|
-
success: false,
|
|
46
|
-
value,
|
|
47
|
-
error,
|
|
48
|
-
message: error.message.replace(/\.\.$/, '.'),
|
|
49
|
-
});
|
|
50
|
-
process.exitCode = 1;
|
|
52
|
+
if (responses.length === 0) {
|
|
53
|
+
ux.log('No results found');
|
|
54
|
+
return;
|
|
51
55
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
56
|
+
ux.table(responses, {
|
|
57
|
+
name: { header: 'Name' },
|
|
58
|
+
...(verbose
|
|
59
|
+
? {
|
|
60
|
+
location: {
|
|
61
|
+
header: 'Location',
|
|
62
|
+
get: (row) => row.location ?? '',
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
: {}),
|
|
66
|
+
...(command === 'unset'
|
|
67
|
+
? {}
|
|
68
|
+
: {
|
|
69
|
+
value: {
|
|
70
|
+
header: 'Value',
|
|
71
|
+
get: (row) => row.value,
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
...(command === 'list' ? {} : { success: { header: 'Success' } }),
|
|
75
|
+
...(responses.some((msg) => msg.error)
|
|
76
|
+
? {
|
|
77
|
+
message: {
|
|
78
|
+
header: 'Message',
|
|
79
|
+
get: (row) => row.error?.message ?? '',
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
: {}),
|
|
83
|
+
}, { title: commandToTitleMapping[command] });
|
|
84
|
+
};
|
|
85
|
+
const commandToTitleMapping = {
|
|
86
|
+
set: 'Set Config',
|
|
87
|
+
unset: 'Unset Config',
|
|
88
|
+
list: 'List Config',
|
|
89
|
+
get: 'Get Config',
|
|
90
|
+
};
|
|
86
91
|
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAc,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAmBjD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AAC;gBACE,KAAK,EAAE;oBACL,MAAM,EAAE,OAAO;oBACf,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK;iBACxB;aACF,CAAC;QACN,GAAG,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QACjE,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC;YACpC,CAAC,CAAC;gBACE,OAAO,EAAE;oBACP,MAAM,EAAE,SAAS;oBACjB,GAAG,EAAE,CAAC,GAAG,EAAU,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE;iBAC/C;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,EACD,EAAE,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,YAAY;CACT,CAAC"}
|
|
@@ -1,59 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
|
-
const log = core_2.Logger.childFromRoot('plugin-settings:load_config_meta');
|
|
7
|
+
import { Config } from '@salesforce/core';
|
|
8
|
+
import { isObject, get } from '@salesforce/ts-types';
|
|
9
|
+
import { ModuleLoader } from '@oclif/core';
|
|
13
10
|
const OCLIF_META_PJSON_KEY = 'configMeta';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const configMetaPath = (0, ts_types_1.get)(plugin, `pjson.oclif.${OCLIF_META_PJSON_KEY}`, null);
|
|
11
|
+
const hook = async ({ config, context }) => {
|
|
12
|
+
const flattenedConfigMetas = (await Promise.all((config.getPluginsList() || []).flatMap(async (plugin) => {
|
|
13
|
+
const configMetaPath = get(plugin, `pjson.oclif.${OCLIF_META_PJSON_KEY}`, null);
|
|
18
14
|
if (typeof configMetaPath !== 'string') {
|
|
19
15
|
return;
|
|
20
16
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
configMetaRequireLocation = relativePath ?? configMetaPath;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (!configMetaRequireLocation) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
|
33
|
-
const configMetaPathModule = require(configMetaRequireLocation);
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
|
|
35
|
-
return configMetaPathModule?.default ?? configMetaPathModule;
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
log.error(`Error trying to load config meta from ${configMetaRequireLocation}`);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const hook = ({ config }) => {
|
|
43
|
-
const flattenedConfigMetas = (config.plugins || [])
|
|
44
|
-
.map((plugin) => {
|
|
45
|
-
const configMeta = loadConfigMeta(plugin);
|
|
17
|
+
const module = await ModuleLoader.load(plugin, configMetaPath);
|
|
18
|
+
const configMeta = module.default;
|
|
46
19
|
if (!configMeta) {
|
|
47
|
-
|
|
20
|
+
context.debug(`No config meta found for ${plugin.name}`);
|
|
48
21
|
}
|
|
49
22
|
return configMeta;
|
|
50
|
-
})
|
|
51
|
-
.
|
|
52
|
-
.
|
|
23
|
+
})))
|
|
24
|
+
.flatMap((d) => d)
|
|
25
|
+
.filter(isObject);
|
|
53
26
|
if (flattenedConfigMetas.length) {
|
|
54
|
-
|
|
27
|
+
Config.addAllowedProperties(flattenedConfigMetas);
|
|
55
28
|
}
|
|
56
29
|
return Promise.resolve();
|
|
57
30
|
};
|
|
58
|
-
|
|
31
|
+
export default hook;
|
|
59
32
|
//# sourceMappingURL=load_config_meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load_config_meta.js","sourceRoot":"","sources":["../../../src/hooks/init/load_config_meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load_config_meta.js","sourceRoot":"","sources":["../../../src/hooks/init/load_config_meta.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,MAAM,EAAsB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C,MAAM,IAAI,GAAiB,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAiB,EAAE;IACtE,MAAM,oBAAoB,GAAG,CAC3B,MAAM,OAAO,CAAC,GAAG,CACf,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACvD,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QAEhF,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;YACtC,OAAO;SACR;QAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,IAAI,CAAqC,MAAM,EAAE,cAAc,CAAC,CAAC;QACnG,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;QAElC,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SAC1D;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC,CACH,CACF;SACE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SACjB,MAAM,CAAqB,QAAQ,CAAC,CAAC;IAExC,IAAI,oBAAoB,CAAC,MAAM,EAAE;QAC/B,MAAM,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;KACnD;IACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
declare const _default: {};
|
|
2
|
-
export
|
|
2
|
+
export default _default;
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
7
|
+
export default {};
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAe,EAAE,CAAC"}
|
package/messages/config.get.md
CHANGED
|
@@ -4,7 +4,9 @@ Get the value of a configuration variable.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Run "sf config list" to see
|
|
7
|
+
Run "sf config list" to see the configuration variables you've already set and their level (local or global).
|
|
8
|
+
|
|
9
|
+
Run "sf config set" to set a configuration variable. For the full list of available configuration variables, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_config_values.htm.
|
|
8
10
|
|
|
9
11
|
# examples
|
|
10
12
|
|
package/messages/config.list.md
CHANGED
|
@@ -4,10 +4,14 @@ List the configuration variables that you've previously set.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A config variable can be global or local, depending on whether you used the --global flag when you set it. Local config variables apply only to the current project and override global config variables, which apply to all projects. You can set all config variables as environment variables. Environment variables override their equivalent local and global config variables.
|
|
8
|
+
|
|
9
|
+
The output of this command takes into account your current context. For example, let's say you run this command from a Salesforce DX project in which you've locally set the "target-org" config variable. The command displays the local value, even if you've also set "target-org" globally. If you haven't set the config variable locally, then the global value is displayed, if set. If you set the SF_TARGET_ORG environment variable, it's displayed as such and overrides any locally or globally set "target-org" config variable.
|
|
10
|
+
|
|
11
|
+
For the full list of available configuration variables, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_config_values.htm.
|
|
8
12
|
|
|
9
13
|
# examples
|
|
10
14
|
|
|
11
|
-
- List
|
|
15
|
+
- List the global and local configuration variables that apply to your current context:
|
|
12
16
|
|
|
13
17
|
$ <%= config.bin %> <%= command.id %>
|
package/messages/config.set.md
CHANGED
|
@@ -16,23 +16,23 @@ The resolution order if you've set a flag value in multiple ways is as follows:
|
|
|
16
16
|
|
|
17
17
|
Run "sf config list" to see the configuration variables you've already set and their level (local or global).
|
|
18
18
|
|
|
19
|
+
If you're setting a single config variable, you don't need to use an equal sign between the variable and value. But you must use the equal sign if setting multiple config variables.
|
|
20
|
+
|
|
21
|
+
For the full list of available configuration variables, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_config_values.htm.
|
|
22
|
+
|
|
19
23
|
# examples
|
|
20
24
|
|
|
21
25
|
- Set the local target-org configuration variable to an org username:
|
|
22
26
|
|
|
23
|
-
<%= config.bin %> <%= command.id %> target-org
|
|
27
|
+
<%= config.bin %> <%= command.id %> target-org me@my.org
|
|
24
28
|
|
|
25
29
|
- Set the local target-org configuration variable to an alias:
|
|
26
30
|
|
|
27
|
-
<%= config.bin %> <%= command.id %> target-org
|
|
28
|
-
|
|
29
|
-
- Set the global target-org configuration variable:
|
|
30
|
-
|
|
31
|
-
<%= config.bin %> <%= command.id %> --global target-org=my-scratch-org
|
|
31
|
+
<%= config.bin %> <%= command.id %> target-org my-scratch-org
|
|
32
32
|
|
|
33
|
-
- Set
|
|
33
|
+
- Set the global target-org and target-dev-hub configuration variables using aliases:
|
|
34
34
|
|
|
35
|
-
<%= config.bin %> <%= command.id %> target-org
|
|
35
|
+
<%= config.bin %> <%= command.id %> --global target-org=my-scratch-org target-dev-hub=my-dev-hub
|
|
36
36
|
|
|
37
37
|
# flags.global.summary
|
|
38
38
|
|
package/messages/config.unset.md
CHANGED
|
@@ -6,6 +6,8 @@ Unset local or global configuration variables.
|
|
|
6
6
|
|
|
7
7
|
Local configuration variables apply only to your current project. Global configuration variables apply in any Salesforce DX project.
|
|
8
8
|
|
|
9
|
+
For the full list of available configuration variables, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_config_values.htm.
|
|
10
|
+
|
|
9
11
|
# examples
|
|
10
12
|
|
|
11
13
|
- Unset the local "target-org" configuration variable:
|
|
@@ -18,7 +20,7 @@ Local configuration variables apply only to your current project. Global configu
|
|
|
18
20
|
|
|
19
21
|
# flags.global.summary
|
|
20
22
|
|
|
21
|
-
Unset the configuration variables globally
|
|
23
|
+
Unset the configuration variables globally.
|
|
22
24
|
|
|
23
25
|
# error.NoConfigKeysFound
|
|
24
26
|
|
|
@@ -27,3 +29,7 @@ You must provide one or more configuration variables to unset. Run "sf config li
|
|
|
27
29
|
# didYouMean
|
|
28
30
|
|
|
29
31
|
Did you mean %s?
|
|
32
|
+
|
|
33
|
+
# unsetGlobalWarning
|
|
34
|
+
|
|
35
|
+
The %s config variable is still set globally, unset it by using the --global flag.
|