@salesforce/core 3.10.1 → 3.11.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
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.11.0](https://github.com/forcedotcom/sfdx-core/compare/v3.10.1...v3.11.0) (2022-03-30)
6
+
7
+ ### Features
8
+
9
+ - normalize config vars for sf ([#543](https://github.com/forcedotcom/sfdx-core/issues/543)) ([93f3cbe](https://github.com/forcedotcom/sfdx-core/commit/93f3cbe90103fa159f21f532ffc173931037651c))
10
+
5
11
  ### [3.10.1](https://github.com/forcedotcom/sfdx-core/compare/v3.10.0...v3.10.1) (2022-03-24)
6
12
 
7
13
  ### Bug Fixes
@@ -51,6 +51,20 @@ export interface ConfigPropertyMetaInput {
51
51
  */
52
52
  failedMessage: string | ((value: ConfigValue) => string);
53
53
  }
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
+ }[];
54
68
  export declare enum SfdxPropertyKeys {
55
69
  /**
56
70
  * Username associated with the default dev hub org.
@@ -68,74 +82,112 @@ export declare enum SfdxPropertyKeys {
68
82
  DEFAULT_USERNAME = "defaultusername",
69
83
  /**
70
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}
71
87
  */
72
88
  ISV_DEBUGGER_SID = "isvDebuggerSid",
73
89
  /**
74
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}
75
93
  */
76
94
  ISV_DEBUGGER_URL = "isvDebuggerUrl",
77
95
  /**
78
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}
79
99
  */
80
100
  API_VERSION = "apiVersion",
81
101
  /**
82
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}
83
105
  */
84
106
  DISABLE_TELEMETRY = "disableTelemetry",
85
107
  /**
86
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}
87
111
  */
88
112
  CUSTOM_ORG_METADATA_TEMPLATES = "customOrgMetadataTemplates",
89
113
  /**
90
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}
91
117
  */
92
118
  MAX_QUERY_LIMIT = "maxQueryLimit",
93
- /** */
119
+ /**
120
+ * @deprecated
121
+ */
94
122
  REST_DEPLOY = "restDeploy",
95
- /** */
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
+ */
96
126
  INSTANCE_URL = "instanceUrl"
97
127
  }
98
128
  export declare const SFDX_ALLOWED_PROPERTIES: ({
99
129
  key: SfdxPropertyKeys;
100
130
  description: string;
131
+ newKey: OrgConfigProperties;
132
+ deprecated: boolean;
101
133
  input: {
102
134
  validator: (value: ConfigValue) => boolean;
103
135
  failedMessage: string;
104
136
  };
137
+ encrypted?: undefined;
105
138
  hidden?: undefined;
106
- newKey?: undefined;
107
- deprecated?: undefined;
139
+ } | {
140
+ key: SfdxPropertyKeys;
141
+ newKey: OrgConfigProperties;
142
+ deprecated: boolean;
143
+ description: string;
144
+ input?: undefined;
108
145
  encrypted?: undefined;
146
+ hidden?: undefined;
109
147
  } | {
110
148
  key: SfdxPropertyKeys;
149
+ newKey: OrgConfigProperties;
150
+ deprecated: boolean;
111
151
  description: string;
112
- hidden: boolean;
152
+ encrypted: boolean;
113
153
  input: {
114
154
  validator: (value: ConfigValue) => boolean;
115
155
  failedMessage: string;
116
156
  };
117
- newKey?: undefined;
118
- deprecated?: undefined;
119
- encrypted?: undefined;
157
+ hidden?: undefined;
120
158
  } | {
121
159
  key: SfdxPropertyKeys;
122
- newKey: OrgConfigProperties;
160
+ newKey: SfConfigProperties;
123
161
  deprecated: boolean;
124
162
  description: string;
125
- input?: undefined;
163
+ input: {
164
+ validator: (value: ConfigValue) => boolean;
165
+ failedMessage: string;
166
+ };
167
+ encrypted?: undefined;
126
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
+ };
127
179
  encrypted?: undefined;
128
180
  } | {
129
181
  key: SfdxPropertyKeys;
130
182
  description: string;
131
- encrypted: boolean;
183
+ hidden: boolean;
184
+ newKey: OrgConfigProperties;
132
185
  input: {
133
186
  validator: (value: ConfigValue) => boolean;
134
187
  failedMessage: string;
135
188
  };
136
- hidden?: undefined;
137
- newKey?: undefined;
138
189
  deprecated?: undefined;
190
+ encrypted?: undefined;
139
191
  })[];
140
192
  export declare const SfProperty: {
141
193
  [index: string]: ConfigPropertyMeta;
@@ -6,7 +6,7 @@
6
6
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.Config = exports.SfProperty = exports.SFDX_ALLOWED_PROPERTIES = exports.SfdxPropertyKeys = void 0;
9
+ exports.Config = exports.SfProperty = exports.SFDX_ALLOWED_PROPERTIES = exports.SfdxPropertyKeys = exports.SF_ALLOWED_PROPERTIES = exports.SfConfigProperties = void 0;
10
10
  const path_1 = require("path");
11
11
  const fs = require("fs");
12
12
  const kit_1 = require("@salesforce/kit");
@@ -40,10 +40,28 @@ const messages = messages_1.Messages.load('@salesforce/core', 'config', [
40
40
  'maxQueryLimit',
41
41
  'restDeploy',
42
42
  'instanceUrl',
43
+ 'disable-telemetry',
43
44
  ]);
44
45
  const log = logger_1.Logger.childFromRoot('core:config');
45
46
  const SFDX_CONFIG_FILE_NAME = 'sfdx-config.json';
46
47
  const CONFIG_FILE_NAME = 'config.json';
48
+ var SfConfigProperties;
49
+ (function (SfConfigProperties) {
50
+ /**
51
+ * Disables telemetry reporting
52
+ */
53
+ SfConfigProperties["DISABLE_TELEMETRY"] = "disable-telemetry";
54
+ })(SfConfigProperties = exports.SfConfigProperties || (exports.SfConfigProperties = {}));
55
+ exports.SF_ALLOWED_PROPERTIES = [
56
+ {
57
+ key: SfConfigProperties.DISABLE_TELEMETRY,
58
+ description: messages.getMessage(SfConfigProperties.DISABLE_TELEMETRY),
59
+ input: {
60
+ validator: (value) => value == null || ['true', 'false'].includes(value.toString()),
61
+ failedMessage: messages.getMessage('invalidBooleanConfigValue'),
62
+ },
63
+ },
64
+ ];
47
65
  var SfdxPropertyKeys;
48
66
  (function (SfdxPropertyKeys) {
49
67
  /**
@@ -62,37 +80,55 @@ var SfdxPropertyKeys;
62
80
  SfdxPropertyKeys["DEFAULT_USERNAME"] = "defaultusername";
63
81
  /**
64
82
  * The sid for the debugger configuration.
83
+ *
84
+ * @deprecated Replaced by OrgConfigProperties.ORG_ISV_DEBUGGER_SID in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
65
85
  */
66
86
  SfdxPropertyKeys["ISV_DEBUGGER_SID"] = "isvDebuggerSid";
67
87
  /**
68
88
  * The url for the debugger configuration.
89
+ *
90
+ * @deprecated Replaced by OrgConfigProperties.ORG_ISV_DEBUGGER_URL in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
69
91
  */
70
92
  SfdxPropertyKeys["ISV_DEBUGGER_URL"] = "isvDebuggerUrl";
71
93
  /**
72
94
  * The api version
95
+ *
96
+ * @deprecated Replaced by OrgConfigProperties.ORG_API_VERSION in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
73
97
  */
74
98
  SfdxPropertyKeys["API_VERSION"] = "apiVersion";
75
99
  /**
76
100
  * Disables telemetry reporting
101
+ *
102
+ * @deprecated Replaced by SfPropertyKeys.DISABLE_TELEMETRY in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
77
103
  */
78
104
  SfdxPropertyKeys["DISABLE_TELEMETRY"] = "disableTelemetry";
79
105
  /**
80
106
  * Custom templates repo or local location.
107
+ *
108
+ * @deprecated Replaced by OrgConfigProperties.ORG_CUSTOM_METADATA_TEMPLATES in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
81
109
  */
82
110
  SfdxPropertyKeys["CUSTOM_ORG_METADATA_TEMPLATES"] = "customOrgMetadataTemplates";
83
111
  /**
84
112
  * allows users to override the 10,000 result query limit
113
+ *
114
+ * @deprecated Replaced by OrgConfigProperties.ORG_MAX_QUERY_LIMIT in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
85
115
  */
86
116
  SfdxPropertyKeys["MAX_QUERY_LIMIT"] = "maxQueryLimit";
87
- /** */
117
+ /**
118
+ * @deprecated
119
+ */
88
120
  SfdxPropertyKeys["REST_DEPLOY"] = "restDeploy";
89
- /** */
121
+ /**
122
+ * @deprecated Replaced by OrgConfigProperties.ORG_INSTANCE_URL in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
123
+ */
90
124
  SfdxPropertyKeys["INSTANCE_URL"] = "instanceUrl";
91
125
  })(SfdxPropertyKeys = exports.SfdxPropertyKeys || (exports.SfdxPropertyKeys = {}));
92
126
  exports.SFDX_ALLOWED_PROPERTIES = [
93
127
  {
94
128
  key: SfdxPropertyKeys.INSTANCE_URL,
95
129
  description: messages.getMessage(SfdxPropertyKeys.INSTANCE_URL),
130
+ newKey: orgConfigProperties_1.OrgConfigProperties.ORG_INSTANCE_URL,
131
+ deprecated: true,
96
132
  input: {
97
133
  // If a value is provided validate it otherwise no value is unset.
98
134
  validator: (value) => {
@@ -109,6 +145,8 @@ exports.SFDX_ALLOWED_PROPERTIES = [
109
145
  },
110
146
  {
111
147
  key: SfdxPropertyKeys.API_VERSION,
148
+ newKey: orgConfigProperties_1.OrgConfigProperties.ORG_API_VERSION,
149
+ deprecated: true,
112
150
  description: messages.getMessage(SfdxPropertyKeys.API_VERSION),
113
151
  hidden: true,
114
152
  input: {
@@ -133,6 +171,8 @@ exports.SFDX_ALLOWED_PROPERTIES = [
133
171
  },
134
172
  {
135
173
  key: SfdxPropertyKeys.ISV_DEBUGGER_SID,
174
+ newKey: orgConfigProperties_1.OrgConfigProperties.ORG_ISV_DEBUGGER_SID,
175
+ deprecated: true,
136
176
  description: messages.getMessage(SfdxPropertyKeys.ISV_DEBUGGER_SID),
137
177
  encrypted: true,
138
178
  input: {
@@ -143,6 +183,8 @@ exports.SFDX_ALLOWED_PROPERTIES = [
143
183
  },
144
184
  {
145
185
  key: SfdxPropertyKeys.ISV_DEBUGGER_URL,
186
+ newKey: orgConfigProperties_1.OrgConfigProperties.ORG_ISV_DEBUGGER_URL,
187
+ deprecated: true,
146
188
  description: messages.getMessage(SfdxPropertyKeys.ISV_DEBUGGER_URL),
147
189
  input: {
148
190
  // If a value is provided validate it otherwise no value is unset.
@@ -152,17 +194,20 @@ exports.SFDX_ALLOWED_PROPERTIES = [
152
194
  },
153
195
  {
154
196
  key: SfdxPropertyKeys.DISABLE_TELEMETRY,
197
+ newKey: SfConfigProperties.DISABLE_TELEMETRY,
198
+ deprecated: true,
155
199
  description: messages.getMessage(SfdxPropertyKeys.DISABLE_TELEMETRY),
156
200
  input: {
157
201
  validator: (value) => value == null || ['true', 'false'].includes(value.toString()),
158
202
  failedMessage: messages.getMessage('invalidBooleanConfigValue'),
159
203
  },
160
204
  },
161
- // This should be brought in by a plugin, but there isn't a way to do that right now.
162
205
  {
163
206
  key: SfdxPropertyKeys.REST_DEPLOY,
164
207
  description: messages.getMessage(SfdxPropertyKeys.REST_DEPLOY),
165
208
  hidden: true,
209
+ newKey: 'org-metadata-rest-deploy',
210
+ deprecated: true,
166
211
  input: {
167
212
  validator: (value) => value != null && ['true', 'false'].includes(value.toString()),
168
213
  failedMessage: messages.getMessage('invalidBooleanConfigValue'),
@@ -171,6 +216,8 @@ exports.SFDX_ALLOWED_PROPERTIES = [
171
216
  {
172
217
  key: SfdxPropertyKeys.MAX_QUERY_LIMIT,
173
218
  description: messages.getMessage(SfdxPropertyKeys.MAX_QUERY_LIMIT),
219
+ hidden: true,
220
+ newKey: orgConfigProperties_1.OrgConfigProperties.ORG_MAX_QUERY_LIMIT,
174
221
  input: {
175
222
  // the bit shift will remove the negative bit, and any decimal numbers
176
223
  // then the parseFloat will handle converting it to a number from a string
@@ -420,6 +467,7 @@ class Config extends configFile_1.ConfigFile {
420
467
  exports.Config = Config;
421
468
  Config.allowedProperties = [
422
469
  ...exports.SFDX_ALLOWED_PROPERTIES,
470
+ ...exports.SF_ALLOWED_PROPERTIES,
423
471
  ...orgConfigProperties_1.ORG_CONFIG_ALLOWED_PROPERTIES,
424
472
  ];
425
473
  class SfdxConfig {
@@ -46,7 +46,7 @@ export declare enum EnvironmentVariable {
46
46
  'SF_TARGET_ORG' = "SF_TARGET_ORG",
47
47
  'SF_TARGET_DEV_HUB' = "SF_TARGET_DEV_HUB",
48
48
  'SF_ACCESS_TOKEN' = "SF_ACCESS_TOKEN",
49
- 'SF_API_VERSION' = "SF_API_VERSION",
49
+ 'SF_ORG_API_VERSION' = "SF_ORG_API_VERSION",
50
50
  'SF_AUDIENCE_URL' = "SF_AUDIENCE_URL",
51
51
  'SF_CODE_COVERAGE_REQUIREMENT' = "SF_CODE_COVERAGE_REQUIREMENT",
52
52
  'SF_CONTENT_TYPE' = "SF_CONTENT_TYPE",
@@ -57,12 +57,12 @@ export declare enum EnvironmentVariable {
57
57
  'SF_DNS_TIMEOUT' = "SF_DNS_TIMEOUT",
58
58
  'SF_DOMAIN_RETRY' = "SF_DOMAIN_RETRY",
59
59
  'SF_IMPROVED_CODE_COVERAGE' = "SF_IMPROVED_CODE_COVERAGE",
60
- 'SF_INSTANCE_URL' = "SF_INSTANCE_URL",
60
+ 'SF_ORG_INSTANCE_URL' = "SF_ORG_INSTANCE_URL",
61
61
  'SF_JSON_TO_STDOUT' = "SF_JSON_TO_STDOUT",
62
62
  'SF_LOG_LEVEL' = "SF_LOG_LEVEL",
63
63
  'SF_LOG_ROTATION_COUNT' = "SF_LOG_ROTATION_COUNT",
64
64
  'SF_LOG_ROTATION_PERIOD' = "SF_LOG_ROTATION_PERIOD",
65
- 'SF_MAX_QUERY_LIMIT' = "SF_MAX_QUERY_LIMIT",
65
+ 'SF_ORG_MAX_QUERY_LIMIT' = "SF_ORG_MAX_QUERY_LIMIT",
66
66
  'SF_MDAPI_TEMP_DIR' = "SF_MDAPI_TEMP_DIR",
67
67
  'SF_NPM_REGISTRY' = "SF_NPM_REGISTRY",
68
68
  'SF_PRECOMPILE_ENABLE' = "SF_PRECOMPILE_ENABLE",
@@ -60,7 +60,7 @@ var EnvironmentVariable;
60
60
  EnvironmentVariable["SF_TARGET_ORG"] = "SF_TARGET_ORG";
61
61
  EnvironmentVariable["SF_TARGET_DEV_HUB"] = "SF_TARGET_DEV_HUB";
62
62
  EnvironmentVariable["SF_ACCESS_TOKEN"] = "SF_ACCESS_TOKEN";
63
- EnvironmentVariable["SF_API_VERSION"] = "SF_API_VERSION";
63
+ EnvironmentVariable["SF_ORG_API_VERSION"] = "SF_ORG_API_VERSION";
64
64
  EnvironmentVariable["SF_AUDIENCE_URL"] = "SF_AUDIENCE_URL";
65
65
  EnvironmentVariable["SF_CODE_COVERAGE_REQUIREMENT"] = "SF_CODE_COVERAGE_REQUIREMENT";
66
66
  EnvironmentVariable["SF_CONTENT_TYPE"] = "SF_CONTENT_TYPE";
@@ -71,12 +71,12 @@ var EnvironmentVariable;
71
71
  EnvironmentVariable["SF_DNS_TIMEOUT"] = "SF_DNS_TIMEOUT";
72
72
  EnvironmentVariable["SF_DOMAIN_RETRY"] = "SF_DOMAIN_RETRY";
73
73
  EnvironmentVariable["SF_IMPROVED_CODE_COVERAGE"] = "SF_IMPROVED_CODE_COVERAGE";
74
- EnvironmentVariable["SF_INSTANCE_URL"] = "SF_INSTANCE_URL";
74
+ EnvironmentVariable["SF_ORG_INSTANCE_URL"] = "SF_ORG_INSTANCE_URL";
75
75
  EnvironmentVariable["SF_JSON_TO_STDOUT"] = "SF_JSON_TO_STDOUT";
76
76
  EnvironmentVariable["SF_LOG_LEVEL"] = "SF_LOG_LEVEL";
77
77
  EnvironmentVariable["SF_LOG_ROTATION_COUNT"] = "SF_LOG_ROTATION_COUNT";
78
78
  EnvironmentVariable["SF_LOG_ROTATION_PERIOD"] = "SF_LOG_ROTATION_PERIOD";
79
- EnvironmentVariable["SF_MAX_QUERY_LIMIT"] = "SF_MAX_QUERY_LIMIT";
79
+ EnvironmentVariable["SF_ORG_MAX_QUERY_LIMIT"] = "SF_ORG_MAX_QUERY_LIMIT";
80
80
  EnvironmentVariable["SF_MDAPI_TEMP_DIR"] = "SF_MDAPI_TEMP_DIR";
81
81
  EnvironmentVariable["SF_NPM_REGISTRY"] = "SF_NPM_REGISTRY";
82
82
  EnvironmentVariable["SF_PRECOMPILE_ENABLE"] = "SF_PRECOMPILE_ENABLE";
@@ -128,7 +128,7 @@ exports.SUPPORTED_ENV_VARS = {
128
128
  },
129
129
  [EnvironmentVariable.SFDX_API_VERSION]: {
130
130
  description: getMessage(EnvironmentVariable.SFDX_API_VERSION),
131
- synonymOf: EnvironmentVariable.SF_API_VERSION,
131
+ synonymOf: EnvironmentVariable.SF_ORG_API_VERSION,
132
132
  },
133
133
  [EnvironmentVariable.SFDX_AUDIENCE_URL]: {
134
134
  description: getMessage(EnvironmentVariable.SFDX_AUDIENCE_URL),
@@ -180,7 +180,7 @@ exports.SUPPORTED_ENV_VARS = {
180
180
  },
181
181
  [EnvironmentVariable.SFDX_INSTANCE_URL]: {
182
182
  description: getMessage(EnvironmentVariable.SFDX_INSTANCE_URL),
183
- synonymOf: EnvironmentVariable.SF_INSTANCE_URL,
183
+ synonymOf: EnvironmentVariable.SF_ORG_INSTANCE_URL,
184
184
  },
185
185
  [EnvironmentVariable.SFDX_JSON_TO_STDOUT]: {
186
186
  description: getMessage(EnvironmentVariable.SFDX_JSON_TO_STDOUT),
@@ -200,7 +200,7 @@ exports.SUPPORTED_ENV_VARS = {
200
200
  },
201
201
  [EnvironmentVariable.SFDX_MAX_QUERY_LIMIT]: {
202
202
  description: getMessage(EnvironmentVariable.SFDX_MAX_QUERY_LIMIT),
203
- synonymOf: EnvironmentVariable.SF_MAX_QUERY_LIMIT,
203
+ synonymOf: EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT,
204
204
  },
205
205
  [EnvironmentVariable.SFDX_MDAPI_TEMP_DIR]: {
206
206
  description: getMessage(EnvironmentVariable.SFDX_MDAPI_TEMP_DIR),
@@ -271,8 +271,8 @@ exports.SUPPORTED_ENV_VARS = {
271
271
  description: getMessage(EnvironmentVariable.SF_ACCESS_TOKEN),
272
272
  synonymOf: null,
273
273
  },
274
- [EnvironmentVariable.SF_API_VERSION]: {
275
- description: getMessage(EnvironmentVariable.SF_API_VERSION),
274
+ [EnvironmentVariable.SF_ORG_API_VERSION]: {
275
+ description: getMessage(EnvironmentVariable.SF_ORG_API_VERSION),
276
276
  synonymOf: null,
277
277
  },
278
278
  [EnvironmentVariable.SF_AUDIENCE_URL]: {
@@ -315,8 +315,8 @@ exports.SUPPORTED_ENV_VARS = {
315
315
  description: getMessage(EnvironmentVariable.SF_IMPROVED_CODE_COVERAGE),
316
316
  synonymOf: null,
317
317
  },
318
- [EnvironmentVariable.SF_INSTANCE_URL]: {
319
- description: getMessage(EnvironmentVariable.SF_INSTANCE_URL),
318
+ [EnvironmentVariable.SF_ORG_INSTANCE_URL]: {
319
+ description: getMessage(EnvironmentVariable.SF_ORG_INSTANCE_URL),
320
320
  synonymOf: null,
321
321
  },
322
322
  [EnvironmentVariable.SF_JSON_TO_STDOUT]: {
@@ -335,8 +335,8 @@ exports.SUPPORTED_ENV_VARS = {
335
335
  description: getMessage(EnvironmentVariable.SF_LOG_ROTATION_PERIOD),
336
336
  synonymOf: null,
337
337
  },
338
- [EnvironmentVariable.SF_MAX_QUERY_LIMIT]: {
339
- description: getMessage(EnvironmentVariable.SF_MAX_QUERY_LIMIT),
338
+ [EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT]: {
339
+ description: getMessage(EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT),
340
340
  synonymOf: null,
341
341
  },
342
342
  [EnvironmentVariable.SF_MDAPI_TEMP_DIR]: {
package/lib/exported.d.ts CHANGED
@@ -6,7 +6,7 @@ export { BaseConfigStore, ConfigContents, ConfigEntry, ConfigStore, ConfigValue
6
6
  export { GlobalInfo, SfEntry, SfInfo, SfInfoKeys, SfOrg, SfOrgs, SfToken, SfTokens } from './globalInfo';
7
7
  export { DeviceOauthService, DeviceCodeResponse, DeviceCodePollingResponse } from './deviceOauthService';
8
8
  export { OrgUsersConfig } from './config/orgUsersConfig';
9
- export { ConfigPropertyMeta, ConfigPropertyMetaInput, Config, SfdxPropertyKeys, SFDX_ALLOWED_PROPERTIES, } from './config/config';
9
+ export { ConfigPropertyMeta, ConfigPropertyMetaInput, Config, SfdxPropertyKeys, SfConfigProperties, SFDX_ALLOWED_PROPERTIES, SF_ALLOWED_PROPERTIES, } from './config/config';
10
10
  export { ConfigInfo, ConfigAggregator } from './config/configAggregator';
11
11
  export { AuthFields, AuthInfo, AuthSideEffects, OrgAuthorization } from './org/authInfo';
12
12
  export { AuthRemover } from './org/authRemover';
package/lib/exported.js CHANGED
@@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.scratchOrgCreate = exports.PermissionSetAssignment = exports.User = exports.REQUIRED_FIELDS = exports.DefaultUserFields = exports.MyDomainResolver = exports.StreamingClient = exports.CometClient = exports.PollingClient = exports.SfdxError = exports.SfError = exports.SchemaValidator = exports.SchemaPrinter = exports.SfdxProjectJson = exports.SfdxProject = exports.SfProjectJson = exports.SfProject = exports.ORG_CONFIG_ALLOWED_PROPERTIES = exports.OrgConfigProperties = exports.OrgTypes = exports.SandboxEvents = exports.Org = exports.Messages = exports.Logger = exports.LoggerLevel = exports.getJwtAudienceUrl = exports.SfdcUrl = exports.WebOAuthServer = exports.Lifecycle = exports.Global = exports.Mode = exports.SFDX_HTTP_HEADERS = exports.Connection = exports.AuthRemover = exports.AuthInfo = exports.ConfigAggregator = exports.SFDX_ALLOWED_PROPERTIES = exports.SfdxPropertyKeys = exports.Config = exports.OrgUsersConfig = exports.DeviceOauthService = exports.SfInfoKeys = exports.GlobalInfo = exports.BaseConfigStore = exports.EnvVars = exports.SUPPORTED_ENV_VARS = exports.EnvironmentVariable = exports.envVars = exports.TTLConfig = exports.ConfigFile = void 0;
20
- exports.scratchOrgLifecycleStages = exports.scratchOrgLifecycleEventName = void 0;
19
+ exports.User = exports.REQUIRED_FIELDS = exports.DefaultUserFields = exports.MyDomainResolver = exports.StreamingClient = exports.CometClient = exports.PollingClient = exports.SfdxError = exports.SfError = exports.SchemaValidator = exports.SchemaPrinter = exports.SfdxProjectJson = exports.SfdxProject = exports.SfProjectJson = exports.SfProject = exports.ORG_CONFIG_ALLOWED_PROPERTIES = exports.OrgConfigProperties = exports.OrgTypes = exports.SandboxEvents = exports.Org = exports.Messages = exports.Logger = exports.LoggerLevel = exports.getJwtAudienceUrl = exports.SfdcUrl = exports.WebOAuthServer = exports.Lifecycle = exports.Global = exports.Mode = exports.SFDX_HTTP_HEADERS = exports.Connection = exports.AuthRemover = exports.AuthInfo = exports.ConfigAggregator = exports.SF_ALLOWED_PROPERTIES = exports.SFDX_ALLOWED_PROPERTIES = exports.SfConfigProperties = exports.SfdxPropertyKeys = exports.Config = exports.OrgUsersConfig = exports.DeviceOauthService = exports.SfInfoKeys = exports.GlobalInfo = exports.BaseConfigStore = exports.EnvVars = exports.SUPPORTED_ENV_VARS = exports.EnvironmentVariable = exports.envVars = exports.TTLConfig = exports.ConfigFile = void 0;
20
+ exports.scratchOrgLifecycleStages = exports.scratchOrgLifecycleEventName = exports.scratchOrgCreate = exports.PermissionSetAssignment = void 0;
21
21
  const messages_1 = require("./messages");
22
22
  messages_1.Messages.importMessagesDirectory(__dirname);
23
23
  var configFile_1 = require("./config/configFile");
@@ -41,7 +41,9 @@ Object.defineProperty(exports, "OrgUsersConfig", { enumerable: true, get: functi
41
41
  var config_1 = require("./config/config");
42
42
  Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
43
43
  Object.defineProperty(exports, "SfdxPropertyKeys", { enumerable: true, get: function () { return config_1.SfdxPropertyKeys; } });
44
+ Object.defineProperty(exports, "SfConfigProperties", { enumerable: true, get: function () { return config_1.SfConfigProperties; } });
44
45
  Object.defineProperty(exports, "SFDX_ALLOWED_PROPERTIES", { enumerable: true, get: function () { return config_1.SFDX_ALLOWED_PROPERTIES; } });
46
+ Object.defineProperty(exports, "SF_ALLOWED_PROPERTIES", { enumerable: true, get: function () { return config_1.SF_ALLOWED_PROPERTIES; } });
45
47
  var configAggregator_1 = require("./config/configAggregator");
46
48
  Object.defineProperty(exports, "ConfigAggregator", { enumerable: true, get: function () { return configAggregator_1.ConfigAggregator; } });
47
49
  var authInfo_1 = require("./org/authInfo");
@@ -1,8 +1,69 @@
1
+ import { ConfigValue } from '../config/configStore';
1
2
  export declare enum OrgConfigProperties {
3
+ /**
4
+ * Username associate with the default org.
5
+ */
2
6
  TARGET_ORG = "target-org",
3
- TARGET_DEV_HUB = "target-dev-hub"
7
+ /**
8
+ * Username associated with the default dev hub org.
9
+ */
10
+ TARGET_DEV_HUB = "target-dev-hub",
11
+ /**
12
+ * The api version
13
+ */
14
+ ORG_API_VERSION = "org-api-version",
15
+ /**
16
+ * Custom templates repo or local location.
17
+ */
18
+ ORG_CUSTOM_METADATA_TEMPLATES = "org-custom-metadata-templates",
19
+ /**
20
+ * Allows users to override the 10,000 result query limit.
21
+ */
22
+ ORG_MAX_QUERY_LIMIT = "org-max-query-limit",
23
+ /**
24
+ * The instance url of the org.
25
+ */
26
+ ORG_INSTANCE_URL = "org-instance-url",
27
+ /**
28
+ * The sid for the debugger configuration.
29
+ */
30
+ ORG_ISV_DEBUGGER_SID = "org-isv-debugger-sid",
31
+ /**
32
+ * The url for the debugger configuration.
33
+ */
34
+ ORG_ISV_DEBUGGER_URL = "org-isv-debugger-url"
4
35
  }
5
- export declare const ORG_CONFIG_ALLOWED_PROPERTIES: {
36
+ export declare const ORG_CONFIG_ALLOWED_PROPERTIES: ({
6
37
  key: OrgConfigProperties;
7
38
  description: string;
8
- }[];
39
+ input?: undefined;
40
+ hidden?: undefined;
41
+ encrypted?: undefined;
42
+ } | {
43
+ key: OrgConfigProperties;
44
+ description: string;
45
+ input: {
46
+ validator: (value: ConfigValue) => boolean;
47
+ failedMessage: string;
48
+ };
49
+ hidden?: undefined;
50
+ encrypted?: undefined;
51
+ } | {
52
+ key: OrgConfigProperties;
53
+ description: string;
54
+ hidden: boolean;
55
+ input: {
56
+ validator: (value: ConfigValue) => boolean;
57
+ failedMessage: string;
58
+ };
59
+ encrypted?: undefined;
60
+ } | {
61
+ key: OrgConfigProperties;
62
+ description: string;
63
+ encrypted: boolean;
64
+ input: {
65
+ validator: (value: ConfigValue) => boolean;
66
+ failedMessage: string;
67
+ };
68
+ hidden?: undefined;
69
+ })[];
@@ -8,22 +8,125 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ORG_CONFIG_ALLOWED_PROPERTIES = exports.OrgConfigProperties = void 0;
10
10
  const path_1 = require("path");
11
+ const ts_types_1 = require("@salesforce/ts-types");
11
12
  const messages_1 = require("../messages");
13
+ const sfdcUrl_1 = require("../util/sfdcUrl");
14
+ const sfdc_1 = require("../util/sfdc");
12
15
  messages_1.Messages.importMessagesDirectory((0, path_1.join)(__dirname));
13
- const messages = messages_1.Messages.load('@salesforce/core', 'config', ['targetOrg', 'targetDevHub']);
16
+ const messages = messages_1.Messages.load('@salesforce/core', 'config', [
17
+ 'invalidApiVersion',
18
+ 'invalidBooleanConfigValue',
19
+ 'invalidInstanceUrl',
20
+ 'invalidIsvDebuggerSid',
21
+ 'invalidIsvDebuggerUrl',
22
+ 'invalidNumberConfigValue',
23
+ 'org-api-version',
24
+ 'org-instance-url',
25
+ 'org-isv-debugger-sid',
26
+ 'org-isv-debugger-url',
27
+ 'org-max-query-limit',
28
+ 'target-dev-hub',
29
+ 'target-org',
30
+ ]);
14
31
  var OrgConfigProperties;
15
32
  (function (OrgConfigProperties) {
33
+ /**
34
+ * Username associate with the default org.
35
+ */
16
36
  OrgConfigProperties["TARGET_ORG"] = "target-org";
37
+ /**
38
+ * Username associated with the default dev hub org.
39
+ */
17
40
  OrgConfigProperties["TARGET_DEV_HUB"] = "target-dev-hub";
41
+ /**
42
+ * The api version
43
+ */
44
+ OrgConfigProperties["ORG_API_VERSION"] = "org-api-version";
45
+ /**
46
+ * Custom templates repo or local location.
47
+ */
48
+ OrgConfigProperties["ORG_CUSTOM_METADATA_TEMPLATES"] = "org-custom-metadata-templates";
49
+ /**
50
+ * Allows users to override the 10,000 result query limit.
51
+ */
52
+ OrgConfigProperties["ORG_MAX_QUERY_LIMIT"] = "org-max-query-limit";
53
+ /**
54
+ * The instance url of the org.
55
+ */
56
+ OrgConfigProperties["ORG_INSTANCE_URL"] = "org-instance-url";
57
+ /**
58
+ * The sid for the debugger configuration.
59
+ */
60
+ OrgConfigProperties["ORG_ISV_DEBUGGER_SID"] = "org-isv-debugger-sid";
61
+ /**
62
+ * The url for the debugger configuration.
63
+ */
64
+ OrgConfigProperties["ORG_ISV_DEBUGGER_URL"] = "org-isv-debugger-url";
18
65
  })(OrgConfigProperties = exports.OrgConfigProperties || (exports.OrgConfigProperties = {}));
19
66
  exports.ORG_CONFIG_ALLOWED_PROPERTIES = [
20
67
  {
21
68
  key: OrgConfigProperties.TARGET_ORG,
22
- description: messages.getMessage('targetOrg'),
69
+ description: messages.getMessage(OrgConfigProperties.TARGET_ORG),
23
70
  },
24
71
  {
25
72
  key: OrgConfigProperties.TARGET_DEV_HUB,
26
- description: messages.getMessage('targetDevHub'),
73
+ description: messages.getMessage(OrgConfigProperties.TARGET_DEV_HUB),
74
+ },
75
+ {
76
+ key: OrgConfigProperties.ORG_INSTANCE_URL,
77
+ description: messages.getMessage(OrgConfigProperties.ORG_INSTANCE_URL),
78
+ input: {
79
+ // If a value is provided validate it otherwise no value is unset.
80
+ validator: (value) => {
81
+ if (value == null)
82
+ return true;
83
+ // validate if the value is a string and is a valid url and is either a salesforce domain
84
+ // or an internal url.
85
+ return ((0, ts_types_1.isString)(value) &&
86
+ sfdcUrl_1.SfdcUrl.isValidUrl(value) &&
87
+ (new sfdcUrl_1.SfdcUrl(value).isSalesforceDomain() || new sfdcUrl_1.SfdcUrl(value).isInternalUrl()));
88
+ },
89
+ failedMessage: messages.getMessage('invalidInstanceUrl'),
90
+ },
91
+ },
92
+ {
93
+ key: OrgConfigProperties.ORG_API_VERSION,
94
+ description: messages.getMessage(OrgConfigProperties.ORG_API_VERSION),
95
+ hidden: true,
96
+ input: {
97
+ // If a value is provided validate it otherwise no value is unset.
98
+ validator: (value) => value == null || ((0, ts_types_1.isString)(value) && sfdc_1.sfdc.validateApiVersion(value)),
99
+ failedMessage: messages.getMessage('invalidApiVersion'),
100
+ },
101
+ },
102
+ {
103
+ key: OrgConfigProperties.ORG_ISV_DEBUGGER_SID,
104
+ description: messages.getMessage(OrgConfigProperties.ORG_ISV_DEBUGGER_SID),
105
+ encrypted: true,
106
+ input: {
107
+ // If a value is provided validate it otherwise no value is unset.
108
+ validator: (value) => value == null || (0, ts_types_1.isString)(value),
109
+ failedMessage: messages.getMessage('invalidIsvDebuggerSid'),
110
+ },
111
+ },
112
+ {
113
+ key: OrgConfigProperties.ORG_ISV_DEBUGGER_URL,
114
+ description: messages.getMessage(OrgConfigProperties.ORG_ISV_DEBUGGER_URL),
115
+ input: {
116
+ // If a value is provided validate it otherwise no value is unset.
117
+ validator: (value) => value == null || (0, ts_types_1.isString)(value),
118
+ failedMessage: messages.getMessage('invalidIsvDebuggerUrl'),
119
+ },
120
+ },
121
+ {
122
+ key: OrgConfigProperties.ORG_MAX_QUERY_LIMIT,
123
+ description: messages.getMessage(OrgConfigProperties.ORG_MAX_QUERY_LIMIT),
124
+ input: {
125
+ // the bit shift will remove the negative bit, and any decimal numbers
126
+ // then the parseFloat will handle converting it to a number from a string
127
+ validator: (value) => value >>> 0 === parseFloat(value) && value > 0,
128
+ failedMessage: messages.getMessage('invalidNumberConfigValue'),
129
+ },
27
130
  },
28
131
  ];
29
132
  //# sourceMappingURL=orgConfigProperties.js.map
@@ -75,11 +75,11 @@ In sfdx-project.json, indicate only one package directory (path) as the default.
75
75
 
76
76
  The sfdx-project.json file must include one, and only one, default package directory (path). Because your sfdx-project.json file contains only one package directory, it must be the default. Remove the `"default": false` key and try again.
77
77
 
78
- # targetOrg
78
+ # target-org
79
79
 
80
80
  Username or alias of the org that all commands run against by default. (sf only)
81
81
 
82
- # targetDevHub
82
+ # target-dev-hub
83
83
 
84
84
  Username or alias of your default Dev Hub org. (sf only)
85
85
 
@@ -93,28 +93,52 @@ Username or alias of your default Dev Hub org. (sfdx only)
93
93
 
94
94
  # isvDebuggerSid
95
95
 
96
- ISV debugger SID
96
+ ISV debugger SID (sfdx only)
97
97
 
98
98
  # isvDebuggerUrl
99
99
 
100
- ISV debugger URL
100
+ ISV debugger URL (sfdx only)
101
+
102
+ # org-isv-debugger-sid
103
+
104
+ ISV debugger SID.
105
+
106
+ # org-isv-debugger-url
107
+
108
+ ISV debugger URL.
101
109
 
102
110
  # apiVersion
103
111
 
112
+ API version of your project. Default: API version of your Dev Hub org. (sfdx only)
113
+
114
+ # org-api-version
115
+
104
116
  API version of your project. Default: API version of your Dev Hub org.
105
117
 
106
118
  # disableTelemetry
107
119
 
108
- Disables the collection of usage and user environment information, etc. Default: true.
120
+ Disables the collection of usage and user environment information, etc. Default: false. (sfdx only)
121
+
122
+ # disable-telemetry
123
+
124
+ Disables the collection of usage and user environment information, etc. Default: false.
109
125
 
110
126
  # maxQueryLimit
111
127
 
128
+ Maximum number of Salesforce records returned by a CLI command. Default: 10,000. (sfdx only)
129
+
130
+ # org-max-query-limit
131
+
112
132
  Maximum number of Salesforce records returned by a CLI command. Default: 10,000.
113
133
 
114
134
  # restDeploy
115
135
 
116
- Whether deployments use the Metadata REST API (true) or SOAP API (false, default value).
136
+ Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). (sfdx only)
117
137
 
118
138
  # instanceUrl
119
139
 
140
+ URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com. (sfdx only)
141
+
142
+ # org-instance-url
143
+
120
144
  URL of the Salesforce instance hosting your org. Default: https://login.salesforce.com.
@@ -174,7 +174,7 @@ Username or alias of your default Dev Hub org. Overrides the target-dev-hub conf
174
174
 
175
175
  Specifies an access token when using a login command that uses access tokens.
176
176
 
177
- # sfApiVersion
177
+ # sfOrgApiVersion
178
178
 
179
179
  API version for a specific project or all projects. Default value is the API version of your Dev Hub. Overrides the apiVersion configuration variable.
180
180
 
@@ -218,7 +218,7 @@ Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom
218
218
 
219
219
  Set to true to scope Apex test results to the classes entered during a test run when running the Apex test commands.
220
220
 
221
- # sfInstanceUrl
221
+ # sfOrgInstanceUrl
222
222
 
223
223
  URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration variable.
224
224
 
@@ -238,7 +238,7 @@ The default rotation period for logs. Example '1d' will rotate logs daily (at mi
238
238
 
239
239
  The number of backup rotated log files to keep. Example: '3' will have the base sf.log file, and the past 3 (period) log files.
240
240
 
241
- # sfMaxQueryLimit
241
+ # sfOrgMaxQueryLimit
242
242
 
243
243
  Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration variable.
244
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "3.10.1",
3
+ "version": "3.11.0",
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",