@salesforce/core 3.15.1 → 3.15.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.
@@ -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<JsonMap> {
56
+ export declare class ConfigAggregator extends AsyncOptionalCreatable<ConfigAggregator.Options> {
57
57
  private static instance;
58
58
  private static encrypted;
59
59
  private allowedProperties;
@@ -66,7 +66,7 @@ export declare class ConfigAggregator extends AsyncOptionalCreatable<JsonMap> {
66
66
  *
67
67
  * @ignore
68
68
  */
69
- constructor(options?: JsonMap);
69
+ constructor(options?: ConfigAggregator.Options);
70
70
  static create<P, T extends AsyncOptionalCreatable<P>>(this: new (options?: P) => T, options?: P): Promise<T>;
71
71
  /**
72
72
  * Get the info for a given key. If the ConfigAggregator was not asynchronously created OR
@@ -208,12 +208,19 @@ 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
+ private static CUSTOM_CONFIG_VARS;
223
+ constructor(options?: ConfigAggregator.Options);
217
224
  getPropertyMeta(key: string): ConfigPropertyMeta;
218
225
  getPropertyValue<T extends AnyJson>(key: string): Optional<T>;
219
226
  getInfo(key: string): ConfigInfo;
@@ -37,6 +37,9 @@ class ConfigAggregator extends kit_1.AsyncOptionalCreatable {
37
37
  */
38
38
  constructor(options) {
39
39
  super(options || {});
40
+ if (options === null || options === void 0 ? void 0 : options.customConfigMeta) {
41
+ config_1.Config.addAllowedProperties(options.customConfigMeta);
42
+ }
40
43
  // Don't throw an project error with the aggregator, since it should resolve to global if
41
44
  // there is no project.
42
45
  try {
@@ -306,8 +309,15 @@ 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
+ options.customConfigMeta = [...customConfigMeta, ...SfdxConfigAggregator.CUSTOM_CONFIG_VARS];
319
+ super(options || {});
320
+ }
311
321
  getPropertyMeta(key) {
312
322
  const match = this.getAllowedProperties().find((element) => key === element.key);
313
323
  if ((match === null || match === void 0 ? void 0 : match.deprecated) && (match === null || match === void 0 ? void 0 : match.newKey)) {
@@ -347,4 +357,7 @@ class SfdxConfigAggregator extends ConfigAggregator {
347
357
  }
348
358
  }
349
359
  exports.SfdxConfigAggregator = SfdxConfigAggregator;
360
+ // org-metadata-rest-deploy has been moved to plugin-deploy-retrieve but we need to have a placeholder
361
+ // for it here since sfdx needs to know how to set the deprecated restDeploy config var.
362
+ SfdxConfigAggregator.CUSTOM_CONFIG_VARS = [{ key: 'org-metadata-rest-deploy', hidden: true }];
350
363
  //# sourceMappingURL=configAggregator.js.map
@@ -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.SFDX_STATE_FOLDER);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "3.15.1",
3
+ "version": "3.15.2",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",