@salesforce/core 4.0.0-v3.0 → 4.0.1
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/LICENSE.txt +1 -1
- package/README.md +93 -44
- package/lib/config/aliasesConfig.d.ts +12 -0
- package/lib/config/aliasesConfig.js +28 -0
- package/lib/config/authInfoConfig.d.ts +19 -0
- package/lib/config/authInfoConfig.js +35 -0
- package/lib/config/config.d.ts +181 -48
- package/lib/config/config.js +382 -159
- package/lib/config/configAggregator.d.ts +59 -42
- package/lib/config/configAggregator.js +135 -82
- package/lib/config/configFile.d.ts +2 -2
- package/lib/config/configFile.js +40 -31
- package/lib/config/configGroup.d.ts +9 -9
- package/lib/config/configGroup.js +13 -11
- package/lib/config/configStore.d.ts +9 -9
- package/lib/config/configStore.js +29 -26
- package/lib/config/envVars.d.ts +102 -0
- package/lib/config/envVars.js +457 -0
- package/lib/config/orgUsersConfig.d.ts +8 -0
- package/lib/config/orgUsersConfig.js +12 -0
- package/lib/config/sandboxOrgConfig.d.ts +8 -0
- package/lib/config/sandboxOrgConfig.js +12 -0
- package/lib/config/sandboxProcessCache.d.ts +16 -0
- package/lib/config/sandboxProcessCache.js +38 -0
- package/lib/config/tokensConfig.d.ts +10 -0
- package/lib/config/tokensConfig.js +29 -0
- package/lib/config/ttlConfig.d.ts +34 -0
- package/lib/config/ttlConfig.js +50 -0
- package/lib/crypto/crypto.js +29 -16
- package/lib/crypto/keyChain.js +4 -4
- package/lib/crypto/keyChainImpl.d.ts +5 -3
- package/lib/crypto/keyChainImpl.js +65 -66
- package/lib/crypto/secureBuffer.d.ts +1 -1
- package/lib/crypto/secureBuffer.js +1 -1
- package/lib/deviceOauthService.d.ts +5 -5
- package/lib/deviceOauthService.js +37 -33
- package/lib/exported.d.ts +22 -15
- package/lib/exported.js +49 -25
- package/lib/global.d.ts +17 -3
- package/lib/global.js +46 -13
- package/lib/lifecycleEvents.d.ts +39 -2
- package/lib/lifecycleEvents.js +77 -3
- package/lib/logger.d.ts +21 -11
- package/lib/logger.js +121 -105
- package/lib/messages.d.ts +53 -36
- package/lib/messages.js +89 -97
- package/lib/org/authInfo.d.ts +84 -72
- package/lib/org/authInfo.js +326 -320
- package/lib/org/authRemover.d.ts +16 -23
- package/lib/org/authRemover.js +62 -60
- package/lib/org/connection.d.ts +33 -59
- package/lib/org/connection.js +129 -190
- package/lib/org/index.js +6 -2
- package/lib/org/org.d.ts +263 -38
- package/lib/org/org.js +734 -149
- package/lib/org/orgConfigProperties.d.ts +69 -0
- package/lib/org/orgConfigProperties.js +121 -0
- package/lib/org/permissionSetAssignment.js +6 -15
- package/lib/org/scratchOrgCache.d.ts +20 -0
- package/lib/org/scratchOrgCache.js +33 -0
- package/lib/org/scratchOrgCreate.d.ts +54 -0
- package/lib/org/scratchOrgCreate.js +214 -0
- package/lib/org/scratchOrgErrorCodes.d.ts +10 -0
- package/lib/org/scratchOrgErrorCodes.js +79 -0
- package/lib/org/scratchOrgFeatureDeprecation.d.ts +26 -0
- package/lib/org/scratchOrgFeatureDeprecation.js +105 -0
- package/lib/org/scratchOrgInfoApi.d.ts +68 -0
- package/lib/org/scratchOrgInfoApi.js +416 -0
- package/lib/org/scratchOrgInfoGenerator.d.ts +64 -0
- package/lib/org/scratchOrgInfoGenerator.js +237 -0
- package/lib/org/scratchOrgLifecycleEvents.d.ts +10 -0
- package/lib/org/scratchOrgLifecycleEvents.js +41 -0
- package/lib/org/scratchOrgSettingsGenerator.d.ts +79 -0
- package/lib/org/scratchOrgSettingsGenerator.js +277 -0
- package/lib/org/scratchOrgTypes.d.ts +43 -0
- package/lib/{status/client.js → org/scratchOrgTypes.js} +1 -1
- package/lib/org/user.d.ts +7 -2
- package/lib/org/user.js +78 -54
- package/lib/schema/printer.d.ts +6 -0
- package/lib/schema/printer.js +49 -46
- package/lib/schema/validator.d.ts +12 -10
- package/lib/schema/validator.js +56 -76
- package/lib/{sfdxError.d.ts → sfError.d.ts} +12 -15
- package/lib/{sfdxError.js → sfError.js} +42 -24
- package/lib/{sfdxProject.d.ts → sfProject.d.ts} +75 -35
- package/lib/sfProject.js +651 -0
- package/lib/stateAggregator/accessors/aliasAccessor.d.ts +98 -0
- package/lib/stateAggregator/accessors/aliasAccessor.js +146 -0
- package/lib/stateAggregator/accessors/orgAccessor.d.ts +101 -0
- package/lib/stateAggregator/accessors/orgAccessor.js +240 -0
- package/lib/stateAggregator/accessors/sandboxAccessor.d.ts +8 -0
- package/lib/stateAggregator/accessors/sandboxAccessor.js +28 -0
- package/lib/stateAggregator/accessors/tokenAccessor.d.ts +63 -0
- package/lib/stateAggregator/accessors/tokenAccessor.js +80 -0
- package/lib/stateAggregator/index.d.ts +4 -0
- package/lib/stateAggregator/index.js +27 -0
- package/lib/stateAggregator/stateAggregator.d.ts +25 -0
- package/lib/stateAggregator/stateAggregator.js +46 -0
- package/lib/status/myDomainResolver.d.ts +1 -1
- package/lib/status/myDomainResolver.js +10 -10
- package/lib/status/pollingClient.d.ts +2 -6
- package/lib/status/pollingClient.js +38 -64
- package/lib/status/streamingClient.d.ts +5 -80
- package/lib/status/streamingClient.js +74 -94
- package/lib/status/types.d.ts +89 -0
- package/lib/status/types.js +18 -0
- package/lib/testSetup.d.ts +212 -79
- package/lib/testSetup.js +478 -182
- package/lib/util/cache.d.ts +11 -0
- package/lib/util/cache.js +70 -0
- package/lib/util/checkLightningDomain.d.ts +1 -0
- package/lib/util/checkLightningDomain.js +29 -0
- package/lib/util/directoryWriter.d.ts +12 -0
- package/lib/util/directoryWriter.js +54 -0
- package/lib/util/getJwtAudienceUrl.d.ts +4 -0
- package/lib/util/getJwtAudienceUrl.js +19 -0
- package/lib/util/internal.d.ts +28 -2
- package/lib/util/internal.js +65 -8
- package/lib/util/jsonXmlTools.d.ts +14 -0
- package/lib/util/jsonXmlTools.js +39 -0
- package/lib/util/mapKeys.d.ts +14 -0
- package/lib/util/mapKeys.js +52 -0
- package/lib/util/sfdc.d.ts +51 -63
- package/lib/util/sfdc.js +75 -127
- package/lib/util/sfdcUrl.d.ts +64 -0
- package/lib/util/sfdcUrl.js +197 -0
- package/lib/util/structuredWriter.d.ts +9 -0
- package/lib/util/structuredWriter.js +3 -0
- package/lib/util/zipWriter.d.ts +16 -0
- package/lib/util/zipWriter.js +68 -0
- package/lib/webOAuthServer.d.ts +20 -7
- package/lib/webOAuthServer.js +107 -60
- package/messageTransformer/messageTransformer.ts +93 -0
- package/messages/auth.md +11 -3
- package/messages/config.md +94 -6
- package/messages/connection.md +8 -0
- package/messages/core.json +3 -3
- package/messages/core.md +11 -1
- package/messages/envVars.md +313 -0
- package/messages/org.md +64 -0
- package/messages/scratchOrgCreate.md +23 -0
- package/messages/scratchOrgErrorCodes.md +115 -0
- package/messages/scratchOrgFeatureDeprecation.md +11 -0
- package/messages/scratchOrgInfoApi.md +20 -0
- package/messages/scratchOrgInfoGenerator.md +27 -0
- package/messages/user.md +12 -0
- package/package.json +138 -66
- package/CHANGELOG.md +0 -699
- package/lib/config/aliases.d.ts +0 -56
- package/lib/config/aliases.js +0 -96
- package/lib/config/globalInfoConfig.d.ts +0 -74
- package/lib/config/globalInfoConfig.js +0 -144
- package/lib/config/keychainConfig.d.ts +0 -19
- package/lib/config/keychainConfig.js +0 -43
- package/lib/config/sfdxDataHandler.d.ts +0 -36
- package/lib/config/sfdxDataHandler.js +0 -165
- package/lib/sfdxProject.js +0 -546
- package/lib/status/client.d.ts +0 -15
- package/lib/util/fs.d.ts +0 -198
- package/lib/util/fs.js +0 -374
package/lib/config/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { JsonPrimitive } from '@salesforce/ts-types';
|
|
1
|
+
import { JsonPrimitive, Nullable } from '@salesforce/ts-types';
|
|
2
|
+
import { OrgConfigProperties } from '../org/orgConfigProperties';
|
|
2
3
|
import { ConfigFile } from './configFile';
|
|
3
4
|
import { ConfigContents, ConfigValue } from './configStore';
|
|
4
5
|
/**
|
|
@@ -6,21 +7,34 @@ import { ConfigContents, ConfigValue } from './configStore';
|
|
|
6
7
|
*/
|
|
7
8
|
export interface ConfigPropertyMeta {
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* The config property name.
|
|
10
11
|
*/
|
|
11
12
|
key: string;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Description
|
|
15
|
+
*/
|
|
16
|
+
description: string;
|
|
17
|
+
/**
|
|
18
|
+
* Reference to the config data input validation.
|
|
14
19
|
*/
|
|
15
20
|
input?: ConfigPropertyMetaInput;
|
|
16
21
|
/**
|
|
17
|
-
*
|
|
22
|
+
* True if the property should be indirectly hidden from the user.
|
|
18
23
|
*/
|
|
19
24
|
hidden?: boolean;
|
|
20
25
|
/**
|
|
21
26
|
* True if the property values should be stored encrypted.
|
|
22
27
|
*/
|
|
23
28
|
encrypted?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* True if the property is deprecated
|
|
31
|
+
*/
|
|
32
|
+
deprecated?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Reference to config property name that will eventually replace this one.
|
|
35
|
+
* Is only used if deprecated is set to true.
|
|
36
|
+
*/
|
|
37
|
+
newKey?: string;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* Config property input validation
|
|
@@ -35,60 +49,162 @@ export interface ConfigPropertyMetaInput {
|
|
|
35
49
|
/**
|
|
36
50
|
* The message to return in the error if the validation fails.
|
|
37
51
|
*/
|
|
38
|
-
failedMessage: string;
|
|
52
|
+
failedMessage: string | ((value: ConfigValue) => string);
|
|
39
53
|
}
|
|
40
|
-
export declare
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*/
|
|
56
|
-
export declare class Config extends ConfigFile<ConfigFile.Options, ConfigProperties> {
|
|
54
|
+
export declare enum SfConfigProperties {
|
|
55
|
+
/**
|
|
56
|
+
* Disables telemetry reporting
|
|
57
|
+
*/
|
|
58
|
+
DISABLE_TELEMETRY = "disable-telemetry"
|
|
59
|
+
}
|
|
60
|
+
export declare const SF_ALLOWED_PROPERTIES: {
|
|
61
|
+
key: SfConfigProperties;
|
|
62
|
+
description: string;
|
|
63
|
+
input: {
|
|
64
|
+
validator: (value: ConfigValue) => boolean;
|
|
65
|
+
failedMessage: string;
|
|
66
|
+
};
|
|
67
|
+
}[];
|
|
68
|
+
export declare enum SfdxPropertyKeys {
|
|
57
69
|
/**
|
|
58
70
|
* Username associated with the default dev hub org.
|
|
71
|
+
*
|
|
72
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_DEV_HUB in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
73
|
+
* will remain in v3 for the foreseeable future so that `sfdx-core` can map between `sf` and `sfdx` config values
|
|
59
74
|
*/
|
|
60
|
-
|
|
75
|
+
DEFAULT_DEV_HUB_USERNAME = "defaultdevhubusername",
|
|
61
76
|
/**
|
|
62
77
|
* Username associate with the default org.
|
|
78
|
+
*
|
|
79
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_ORG in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
80
|
+
* will remain in v3 for the foreseeable future so that `sfdx-core` can map between `sf` and `sfdx` config values
|
|
63
81
|
*/
|
|
64
|
-
|
|
82
|
+
DEFAULT_USERNAME = "defaultusername",
|
|
65
83
|
/**
|
|
66
84
|
* The sid for the debugger configuration.
|
|
85
|
+
*
|
|
86
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_ISV_DEBUGGER_SID in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
67
87
|
*/
|
|
68
|
-
|
|
88
|
+
ISV_DEBUGGER_SID = "isvDebuggerSid",
|
|
69
89
|
/**
|
|
70
90
|
* The url for the debugger configuration.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_ISV_DEBUGGER_URL in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
71
93
|
*/
|
|
72
|
-
|
|
94
|
+
ISV_DEBUGGER_URL = "isvDebuggerUrl",
|
|
73
95
|
/**
|
|
74
96
|
* The api version
|
|
97
|
+
*
|
|
98
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_API_VERSION in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
75
99
|
*/
|
|
76
|
-
|
|
100
|
+
API_VERSION = "apiVersion",
|
|
77
101
|
/**
|
|
78
102
|
* Disables telemetry reporting
|
|
103
|
+
*
|
|
104
|
+
* @deprecated Replaced by SfPropertyKeys.DISABLE_TELEMETRY in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
79
105
|
*/
|
|
80
|
-
|
|
106
|
+
DISABLE_TELEMETRY = "disableTelemetry",
|
|
107
|
+
/**
|
|
108
|
+
* Custom templates repo or local location.
|
|
109
|
+
*
|
|
110
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_CUSTOM_METADATA_TEMPLATES in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
111
|
+
*/
|
|
112
|
+
CUSTOM_ORG_METADATA_TEMPLATES = "customOrgMetadataTemplates",
|
|
81
113
|
/**
|
|
82
114
|
* allows users to override the 10,000 result query limit
|
|
115
|
+
*
|
|
116
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_MAX_QUERY_LIMIT in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
117
|
+
*/
|
|
118
|
+
MAX_QUERY_LIMIT = "maxQueryLimit",
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated
|
|
83
121
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
122
|
+
REST_DEPLOY = "restDeploy",
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated Replaced by OrgConfigProperties.ORG_INSTANCE_URL in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
125
|
+
*/
|
|
126
|
+
INSTANCE_URL = "instanceUrl"
|
|
127
|
+
}
|
|
128
|
+
export declare const SFDX_ALLOWED_PROPERTIES: ({
|
|
129
|
+
key: SfdxPropertyKeys;
|
|
130
|
+
description: string;
|
|
131
|
+
newKey: OrgConfigProperties;
|
|
132
|
+
deprecated: boolean;
|
|
133
|
+
input: {
|
|
134
|
+
validator: (value: ConfigValue) => boolean;
|
|
135
|
+
failedMessage: string;
|
|
136
|
+
};
|
|
137
|
+
encrypted?: undefined;
|
|
138
|
+
hidden?: undefined;
|
|
139
|
+
} | {
|
|
140
|
+
key: SfdxPropertyKeys;
|
|
141
|
+
newKey: OrgConfigProperties;
|
|
142
|
+
deprecated: boolean;
|
|
143
|
+
description: string;
|
|
144
|
+
input?: undefined;
|
|
145
|
+
encrypted?: undefined;
|
|
146
|
+
hidden?: undefined;
|
|
147
|
+
} | {
|
|
148
|
+
key: SfdxPropertyKeys;
|
|
149
|
+
newKey: OrgConfigProperties;
|
|
150
|
+
deprecated: boolean;
|
|
151
|
+
description: string;
|
|
152
|
+
encrypted: boolean;
|
|
153
|
+
input: {
|
|
154
|
+
validator: (value: ConfigValue) => boolean;
|
|
155
|
+
failedMessage: string;
|
|
156
|
+
};
|
|
157
|
+
hidden?: undefined;
|
|
158
|
+
} | {
|
|
159
|
+
key: SfdxPropertyKeys;
|
|
160
|
+
newKey: SfConfigProperties;
|
|
161
|
+
deprecated: boolean;
|
|
162
|
+
description: string;
|
|
163
|
+
input: {
|
|
164
|
+
validator: (value: ConfigValue) => boolean;
|
|
165
|
+
failedMessage: string;
|
|
166
|
+
};
|
|
167
|
+
encrypted?: undefined;
|
|
168
|
+
hidden?: undefined;
|
|
169
|
+
} | {
|
|
170
|
+
key: SfdxPropertyKeys;
|
|
171
|
+
description: string;
|
|
172
|
+
hidden: boolean;
|
|
173
|
+
newKey: string;
|
|
174
|
+
deprecated: boolean;
|
|
175
|
+
input: {
|
|
176
|
+
validator: (value: ConfigValue) => boolean;
|
|
177
|
+
failedMessage: string;
|
|
178
|
+
};
|
|
179
|
+
encrypted?: undefined;
|
|
180
|
+
})[];
|
|
181
|
+
export declare const SfProperty: {
|
|
182
|
+
[index: string]: ConfigPropertyMeta;
|
|
183
|
+
};
|
|
184
|
+
export type ConfigProperties = {
|
|
185
|
+
[index: string]: JsonPrimitive;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* The files where sfdx config values are stored for projects and the global space.
|
|
189
|
+
*
|
|
190
|
+
* *Note:* It is not recommended to instantiate this object directly when resolving
|
|
191
|
+
* config values. Instead use {@link ConfigAggregator}
|
|
192
|
+
*
|
|
193
|
+
* ```
|
|
194
|
+
* const localConfig = await Config.create();
|
|
195
|
+
* localConfig.set('target-org', 'username@company.org');
|
|
196
|
+
* await localConfig.write();
|
|
197
|
+
* ```
|
|
198
|
+
* https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_config_values.htm
|
|
199
|
+
*/
|
|
200
|
+
export declare class Config extends ConfigFile<ConfigFile.Options, ConfigProperties> {
|
|
86
201
|
private static allowedProperties;
|
|
202
|
+
private sfdxConfig;
|
|
87
203
|
constructor(options?: ConfigFile.Options);
|
|
88
204
|
/**
|
|
89
205
|
* Returns the default file name for a config file.
|
|
90
206
|
*
|
|
91
|
-
* **See** {@link
|
|
207
|
+
* **See** {@link CONFIG_FILE_NAME}
|
|
92
208
|
*/
|
|
93
209
|
static getFileName(): string;
|
|
94
210
|
/**
|
|
@@ -101,13 +217,6 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
101
217
|
* @param metas Array of objects to set as the allowed config properties.
|
|
102
218
|
*/
|
|
103
219
|
static addAllowedProperties(metas: ConfigPropertyMeta[]): void;
|
|
104
|
-
/**
|
|
105
|
-
* Gets default options.
|
|
106
|
-
*
|
|
107
|
-
* @param isGlobal Make the config global.
|
|
108
|
-
* @param filename Override the default file. {@link Config.getFileName}
|
|
109
|
-
*/
|
|
110
|
-
static getDefaultOptions(isGlobal?: boolean, filename?: string): ConfigFile.Options;
|
|
111
220
|
/**
|
|
112
221
|
* The value of a supported config property.
|
|
113
222
|
*
|
|
@@ -120,10 +229,13 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
120
229
|
* Clear all the configured properties both local and global.
|
|
121
230
|
*/
|
|
122
231
|
static clear(): Promise<void>;
|
|
232
|
+
static getPropertyConfigMeta(propertyName: string): Nullable<ConfigPropertyMeta>;
|
|
233
|
+
private static propertyConfigMap;
|
|
123
234
|
/**
|
|
124
235
|
* Read, assign, and return the config contents.
|
|
125
236
|
*/
|
|
126
237
|
read(force?: boolean): Promise<ConfigProperties>;
|
|
238
|
+
readSync(force?: boolean): ConfigProperties;
|
|
127
239
|
/**
|
|
128
240
|
* Writes Config properties taking into account encrypted properties.
|
|
129
241
|
*
|
|
@@ -134,7 +246,7 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
134
246
|
* DO NOT CALL - The config file needs to encrypt values which can only be done asynchronously.
|
|
135
247
|
* Call {@link SfdxConfig.write} instead.
|
|
136
248
|
*
|
|
137
|
-
* **Throws** *{@link
|
|
249
|
+
* **Throws** *{@link SfError}{ name: 'InvalidWriteError' }* Always.
|
|
138
250
|
*
|
|
139
251
|
* @param newContents Contents to write
|
|
140
252
|
*/
|
|
@@ -142,8 +254,8 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
142
254
|
/**
|
|
143
255
|
* Sets a value for a property.
|
|
144
256
|
*
|
|
145
|
-
* **Throws** *{@link
|
|
146
|
-
* **Throws** *{@link
|
|
257
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
258
|
+
* **Throws** *{@link SfError}{ name: 'InvalidConfigValueError' }* If the input validator fails.
|
|
147
259
|
*
|
|
148
260
|
* @param key The property to set.
|
|
149
261
|
* @param value The value of the property.
|
|
@@ -152,23 +264,23 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
152
264
|
/**
|
|
153
265
|
* Unsets a value for a property.
|
|
154
266
|
*
|
|
155
|
-
* **Throws** *{@link
|
|
267
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* If the input validator fails.
|
|
156
268
|
*
|
|
157
269
|
* @param key The property to unset.
|
|
158
270
|
*/
|
|
159
271
|
unset(key: string): boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Initializer for supported config types.
|
|
162
|
-
*/
|
|
163
|
-
protected init(): Promise<void>;
|
|
164
272
|
/**
|
|
165
273
|
* Get an individual property config.
|
|
166
274
|
*
|
|
167
|
-
* **Throws** *{@link
|
|
275
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
168
276
|
*
|
|
169
277
|
* @param propertyName The name of the property.
|
|
170
278
|
*/
|
|
171
|
-
|
|
279
|
+
getPropertyConfig(propertyName: string): ConfigPropertyMeta;
|
|
280
|
+
/**
|
|
281
|
+
* Initializer for supported config types.
|
|
282
|
+
*/
|
|
283
|
+
protected init(): Promise<void>;
|
|
172
284
|
/**
|
|
173
285
|
* Encrypts and content properties that have a encryption attribute.
|
|
174
286
|
*
|
|
@@ -176,3 +288,24 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
176
288
|
*/
|
|
177
289
|
private cryptProperties;
|
|
178
290
|
}
|
|
291
|
+
export declare class SfdxConfig {
|
|
292
|
+
private options;
|
|
293
|
+
private config;
|
|
294
|
+
private sfdxPath;
|
|
295
|
+
constructor(options: ConfigFile.Options, config: Config);
|
|
296
|
+
/**
|
|
297
|
+
* If Global.SFDX_INTEROPERABILITY is enabled, merge the sfdx config into the sf config
|
|
298
|
+
*/
|
|
299
|
+
merge(config: ConfigProperties): ConfigProperties | undefined;
|
|
300
|
+
write(config?: import("@salesforce/ts-types").JsonMap): Promise<void>;
|
|
301
|
+
private readSync;
|
|
302
|
+
private getSfdxPath;
|
|
303
|
+
/**
|
|
304
|
+
* If toNew is specified: migrate all deprecated configs with a newKey to the newKey.
|
|
305
|
+
* - For example, defaultusername will be renamed to target-org.
|
|
306
|
+
*
|
|
307
|
+
* If toOld is specified: migrate all deprecated configs back to their original key.
|
|
308
|
+
* - For example, target-org will be renamed to defaultusername.
|
|
309
|
+
*/
|
|
310
|
+
private translate;
|
|
311
|
+
}
|