@salesforce/core 3.15.1 → 3.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.15.4](https://github.com/forcedotcom/sfdx-core/compare/v3.15.3...v3.15.4) (2022-05-03)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- SfdxConfigAggregator ([#576](https://github.com/forcedotcom/sfdx-core/issues/576)) ([9a25928](https://github.com/forcedotcom/sfdx-core/commit/9a259282efd3d2d97da42a54fd76c45d7f73df27))
|
|
10
|
+
|
|
11
|
+
### [3.15.3](https://github.com/forcedotcom/sfdx-core/compare/v3.15.2...v3.15.3) (2022-05-02)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- SfdxConfigAggregator ([6ee1437](https://github.com/forcedotcom/sfdx-core/commit/6ee14378f10df123ac38325853bc3b83d4d953bd))
|
|
16
|
+
|
|
17
|
+
### [3.15.2](https://github.com/forcedotcom/sfdx-core/compare/v3.15.1...v3.15.2) (2022-05-02)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- allow ConfigAggregator to accept custom config vars ([#575](https://github.com/forcedotcom/sfdx-core/issues/575)) ([2642128](https://github.com/forcedotcom/sfdx-core/commit/264212898cf14d8f34638926841ace89abf7efb0))
|
|
22
|
+
|
|
5
23
|
### [3.15.1](https://github.com/forcedotcom/sfdx-core/compare/v3.15.0...v3.15.1) (2022-04-28)
|
|
6
24
|
|
|
7
25
|
### Bug Fixes
|
|
@@ -53,7 +53,7 @@ export interface ConfigInfo {
|
|
|
53
53
|
* console.log(aggregator.getPropertyValue('target-org'));
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
export declare class ConfigAggregator extends AsyncOptionalCreatable<
|
|
56
|
+
export declare class ConfigAggregator extends AsyncOptionalCreatable<ConfigAggregator.Options> {
|
|
57
57
|
private static instance;
|
|
58
58
|
private static encrypted;
|
|
59
59
|
private allowedProperties;
|
|
@@ -66,8 +66,8 @@ export declare class ConfigAggregator extends AsyncOptionalCreatable<JsonMap> {
|
|
|
66
66
|
*
|
|
67
67
|
* @ignore
|
|
68
68
|
*/
|
|
69
|
-
constructor(options?:
|
|
70
|
-
static create<P, T extends AsyncOptionalCreatable<P>>(this: new (options?:
|
|
69
|
+
constructor(options?: ConfigAggregator.Options);
|
|
70
|
+
static create<P, T extends AsyncOptionalCreatable<P>>(this: new (options?: ConfigAggregator.Options) => T, options?: ConfigAggregator.Options): Promise<T>;
|
|
71
71
|
/**
|
|
72
72
|
* Get the info for a given key. If the ConfigAggregator was not asynchronously created OR
|
|
73
73
|
* the {@link ConfigAggregator.reload} was not called, the config value may be encrypted.
|
|
@@ -208,12 +208,18 @@ export declare namespace ConfigAggregator {
|
|
|
208
208
|
*/
|
|
209
209
|
ENVIRONMENT = "Environment"
|
|
210
210
|
}
|
|
211
|
+
type Options = {
|
|
212
|
+
customConfigMeta?: ConfigPropertyMeta[];
|
|
213
|
+
};
|
|
211
214
|
}
|
|
212
215
|
/**
|
|
213
216
|
* A ConfigAggregator that will work with deprecated config vars (e.g. defaultusername, apiVersion).
|
|
214
217
|
* We do NOT recommend using this class unless you absolutelty have to.
|
|
218
|
+
*
|
|
219
|
+
* @deprecated
|
|
215
220
|
*/
|
|
216
221
|
export declare class SfdxConfigAggregator extends ConfigAggregator {
|
|
222
|
+
constructor(options?: ConfigAggregator.Options);
|
|
217
223
|
getPropertyMeta(key: string): ConfigPropertyMeta;
|
|
218
224
|
getPropertyValue<T extends AnyJson>(key: string): Optional<T>;
|
|
219
225
|
getInfo(key: string): ConfigInfo;
|
|
@@ -64,6 +64,9 @@ class ConfigAggregator extends kit_1.AsyncOptionalCreatable {
|
|
|
64
64
|
if (ConfigAggregator.encrypted) {
|
|
65
65
|
await config.loadProperties();
|
|
66
66
|
}
|
|
67
|
+
if (options === null || options === void 0 ? void 0 : options.customConfigMeta) {
|
|
68
|
+
config_1.Config.addAllowedProperties(options.customConfigMeta);
|
|
69
|
+
}
|
|
67
70
|
return ConfigAggregator.instance;
|
|
68
71
|
}
|
|
69
72
|
/**
|
|
@@ -306,8 +309,19 @@ ConfigAggregator.encrypted = true;
|
|
|
306
309
|
/**
|
|
307
310
|
* A ConfigAggregator that will work with deprecated config vars (e.g. defaultusername, apiVersion).
|
|
308
311
|
* We do NOT recommend using this class unless you absolutelty have to.
|
|
312
|
+
*
|
|
313
|
+
* @deprecated
|
|
309
314
|
*/
|
|
310
315
|
class SfdxConfigAggregator extends ConfigAggregator {
|
|
316
|
+
constructor(options = {}) {
|
|
317
|
+
const customConfigMeta = options.customConfigMeta || [];
|
|
318
|
+
// org-metadata-rest-deploy has been moved to plugin-deploy-retrieve but we need to have a placeholder
|
|
319
|
+
// for it here since sfdx needs to know how to set the deprecated restDeploy config var.
|
|
320
|
+
const restDeploy = config_1.SFDX_ALLOWED_PROPERTIES.find((p) => p.key === config_1.SfdxPropertyKeys.REST_DEPLOY);
|
|
321
|
+
const orgRestDeploy = Object.assign({}, restDeploy, { key: 'org-metadata-rest-deploy', deprecated: false });
|
|
322
|
+
options.customConfigMeta = [...customConfigMeta, orgRestDeploy];
|
|
323
|
+
super(options);
|
|
324
|
+
}
|
|
311
325
|
getPropertyMeta(key) {
|
|
312
326
|
const match = this.getAllowedProperties().find((element) => key === element.key);
|
|
313
327
|
if ((match === null || match === void 0 ? void 0 : match.deprecated) && (match === null || match === void 0 ? void 0 : match.newKey)) {
|
|
@@ -324,7 +338,9 @@ class SfdxConfigAggregator extends ConfigAggregator {
|
|
|
324
338
|
return super.getPropertyValue(this.translate(key));
|
|
325
339
|
}
|
|
326
340
|
getInfo(key) {
|
|
327
|
-
|
|
341
|
+
const info = super.getInfo(this.translate(key));
|
|
342
|
+
info.key = this.translate(info.key, 'toOld');
|
|
343
|
+
return info;
|
|
328
344
|
}
|
|
329
345
|
getLocation(key) {
|
|
330
346
|
return super.getLocation(this.translate(key));
|
package/lib/config/configFile.js
CHANGED
|
@@ -306,7 +306,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
306
306
|
? this.options.rootFolder
|
|
307
307
|
: ConfigFile.resolveRootFolderSync(!!this.options.isGlobal);
|
|
308
308
|
if (_isGlobal || _isState) {
|
|
309
|
-
configRootFolder = (0, path_1.join)(configRootFolder, this.options.stateFolder || global_1.Global.
|
|
309
|
+
configRootFolder = (0, path_1.join)(configRootFolder, this.options.stateFolder || global_1.Global.SF_STATE_FOLDER);
|
|
310
310
|
}
|
|
311
311
|
this.path = (0, path_1.join)(configRootFolder, this.options.filePath ? this.options.filePath : '', this.options.filename);
|
|
312
312
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.OrgUsersConfig = void 0;
|
|
10
|
+
const global_1 = require("../global");
|
|
10
11
|
const configFile_1 = require("./configFile");
|
|
11
12
|
/**
|
|
12
13
|
* A config file that stores usernames for an org.
|
|
@@ -33,6 +34,7 @@ class OrgUsersConfig extends configFile_1.ConfigFile {
|
|
|
33
34
|
isState: true,
|
|
34
35
|
filename: `${orgId}.json`,
|
|
35
36
|
orgId,
|
|
37
|
+
stateFolder: global_1.Global.SFDX_STATE_FOLDER,
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.SandboxOrgConfig = void 0;
|
|
10
|
+
const global_1 = require("../global");
|
|
10
11
|
const configFile_1 = require("./configFile");
|
|
11
12
|
/**
|
|
12
13
|
* A config file that stores usernames for an org.
|
|
@@ -33,6 +34,7 @@ class SandboxOrgConfig extends configFile_1.ConfigFile {
|
|
|
33
34
|
isState: true,
|
|
34
35
|
filename: `${orgId}.sandbox.json`,
|
|
35
36
|
orgId,
|
|
37
|
+
stateFolder: global_1.Global.SFDX_STATE_FOLDER,
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
}
|