@salesforce/core 2.27.2 → 2.28.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 +9 -0
- package/lib/authInfo.d.ts +4 -0
- package/lib/authInfo.js +4 -0
- package/lib/config/aliases.d.ts +2 -0
- package/lib/config/aliases.js +2 -0
- package/lib/config/authInfoConfig.d.ts +2 -0
- package/lib/config/authInfoConfig.js +2 -0
- package/lib/config/config.d.ts +8 -0
- package/lib/config/config.js +19 -0
- package/lib/util/fs.d.ts +3 -0
- package/lib/util/fs.js +3 -0
- package/messages/config.json +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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
|
+
## [2.28.0](https://github.com/forcedotcom/sfdx-core/compare/v2.27.2...v2.28.0) (2021-09-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add custom templates config ([3cf8a8c](https://github.com/forcedotcom/sfdx-core/commit/3cf8a8cee1e7196efced989dcca9b545e1283386))
|
|
11
|
+
* add validator for custom templates config ([dd2bcfe](https://github.com/forcedotcom/sfdx-core/commit/dd2bcfe8e7fee5c5c1c6321189ec04288103d5b6))
|
|
12
|
+
* update config name ([72e84bf](https://github.com/forcedotcom/sfdx-core/commit/72e84bfacef48a1c2d00a61ebbae3f632601abbd))
|
|
13
|
+
|
|
5
14
|
### [2.27.2](https://github.com/forcedotcom/sfdx-core/compare/v2.27.1...v2.27.2) (2021-08-05)
|
|
6
15
|
|
|
7
16
|
|
package/lib/authInfo.d.ts
CHANGED
|
@@ -163,6 +163,8 @@ export declare class AuthInfo extends AsyncCreatable<AuthInfo.Options> {
|
|
|
163
163
|
* Get a list of all auth files stored in the global directory.
|
|
164
164
|
*
|
|
165
165
|
* @returns {Promise<string[]>}
|
|
166
|
+
*
|
|
167
|
+
* @deprecated Removed in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
166
168
|
*/
|
|
167
169
|
static listAllAuthFiles(): Promise<string[]>;
|
|
168
170
|
/**
|
|
@@ -187,6 +189,8 @@ export declare class AuthInfo extends AsyncCreatable<AuthInfo.Options> {
|
|
|
187
189
|
* Forces the auth file to be re-read from disk for a given user. Returns `true` if a value was removed.
|
|
188
190
|
*
|
|
189
191
|
* @param username The username for the auth info to re-read.
|
|
192
|
+
*
|
|
193
|
+
* @deprecated Removed in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#configstore-configfile-authinfo-and-encrypting-values}
|
|
190
194
|
*/
|
|
191
195
|
static clearCache(username: string): boolean;
|
|
192
196
|
/**
|
package/lib/authInfo.js
CHANGED
|
@@ -216,6 +216,8 @@ class AuthInfo extends kit_1.AsyncCreatable {
|
|
|
216
216
|
* Get a list of all auth files stored in the global directory.
|
|
217
217
|
*
|
|
218
218
|
* @returns {Promise<string[]>}
|
|
219
|
+
*
|
|
220
|
+
* @deprecated Removed in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
219
221
|
*/
|
|
220
222
|
static async listAllAuthFiles() {
|
|
221
223
|
const globalFiles = await fs_1.fs.readdir(global_1.Global.DIR);
|
|
@@ -306,6 +308,8 @@ class AuthInfo extends kit_1.AsyncCreatable {
|
|
|
306
308
|
* Forces the auth file to be re-read from disk for a given user. Returns `true` if a value was removed.
|
|
307
309
|
*
|
|
308
310
|
* @param username The username for the auth info to re-read.
|
|
311
|
+
*
|
|
312
|
+
* @deprecated Removed in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#configstore-configfile-authinfo-and-encrypting-values}
|
|
309
313
|
*/
|
|
310
314
|
static clearCache(username) {
|
|
311
315
|
if (username) {
|
package/lib/config/aliases.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare enum AliasGroup {
|
|
|
22
22
|
* const username: string = await Aliases.fetch('myAlias');
|
|
23
23
|
* ```
|
|
24
24
|
* https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm
|
|
25
|
+
*
|
|
26
|
+
* @deprecated Replaced by GlobalInfo in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
25
27
|
*/
|
|
26
28
|
export declare class Aliases extends ConfigGroup<ConfigGroup.Options> {
|
|
27
29
|
/**
|
package/lib/config/aliases.js
CHANGED
|
@@ -33,6 +33,8 @@ var AliasGroup;
|
|
|
33
33
|
* const username: string = await Aliases.fetch('myAlias');
|
|
34
34
|
* ```
|
|
35
35
|
* https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm
|
|
36
|
+
*
|
|
37
|
+
* @deprecated Replaced by GlobalInfo in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
36
38
|
*/
|
|
37
39
|
class Aliases extends configGroup_1.ConfigGroup {
|
|
38
40
|
/**
|
|
@@ -6,6 +6,8 @@ import { ConfigFile } from './configFile';
|
|
|
6
6
|
* ```
|
|
7
7
|
* const authInfo = await AuthInfoConfig.create(AuthInfoConfig.getOptions(username));
|
|
8
8
|
* ```
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Replaced by GlobalInfo in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
9
11
|
*/
|
|
10
12
|
export declare class AuthInfoConfig extends ConfigFile<ConfigFile.Options> {
|
|
11
13
|
/**
|
|
@@ -15,6 +15,8 @@ const configFile_1 = require("./configFile");
|
|
|
15
15
|
* ```
|
|
16
16
|
* const authInfo = await AuthInfoConfig.create(AuthInfoConfig.getOptions(username));
|
|
17
17
|
* ```
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Replaced by GlobalInfo in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#globalinfo}
|
|
18
20
|
*/
|
|
19
21
|
class AuthInfoConfig extends configFile_1.ConfigFile {
|
|
20
22
|
/**
|
package/lib/config/config.d.ts
CHANGED
|
@@ -52,10 +52,14 @@ export interface ConfigPropertyMetaInput {
|
|
|
52
52
|
export declare class Config extends ConfigFile<ConfigFile.Options> {
|
|
53
53
|
/**
|
|
54
54
|
* Username associated with the default dev hub org.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_DEV_HUB in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
55
57
|
*/
|
|
56
58
|
static readonly DEFAULT_DEV_HUB_USERNAME: string;
|
|
57
59
|
/**
|
|
58
60
|
* Username associate with the default org.
|
|
61
|
+
*
|
|
62
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_ORG in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
59
63
|
*/
|
|
60
64
|
static readonly DEFAULT_USERNAME: string;
|
|
61
65
|
/**
|
|
@@ -74,6 +78,10 @@ export declare class Config extends ConfigFile<ConfigFile.Options> {
|
|
|
74
78
|
* Disables telemetry reporting
|
|
75
79
|
*/
|
|
76
80
|
static readonly DISABLE_TELEMETRY = "disableTelemetry";
|
|
81
|
+
/**
|
|
82
|
+
* Custom templates repo or local location.
|
|
83
|
+
*/
|
|
84
|
+
static readonly CUSTOM_ORG_METADATA_TEMPLATES = "customOrgMetadataTemplates";
|
|
77
85
|
/**
|
|
78
86
|
* allows users to override the 10,000 result query limit
|
|
79
87
|
*/
|
package/lib/config/config.js
CHANGED
|
@@ -258,10 +258,14 @@ class Config extends configFile_1.ConfigFile {
|
|
|
258
258
|
exports.Config = Config;
|
|
259
259
|
/**
|
|
260
260
|
* Username associated with the default dev hub org.
|
|
261
|
+
*
|
|
262
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_DEV_HUB in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
261
263
|
*/
|
|
262
264
|
Config.DEFAULT_DEV_HUB_USERNAME = 'defaultdevhubusername';
|
|
263
265
|
/**
|
|
264
266
|
* Username associate with the default org.
|
|
267
|
+
*
|
|
268
|
+
* @deprecated Replaced by OrgConfigProperties.TARGET_ORG in v3 {@link https://github.com/forcedotcom/sfdx-core/blob/v3/MIGRATING_V2-V3.md#config}
|
|
265
269
|
*/
|
|
266
270
|
Config.DEFAULT_USERNAME = 'defaultusername';
|
|
267
271
|
/**
|
|
@@ -280,6 +284,10 @@ Config.API_VERSION = 'apiVersion';
|
|
|
280
284
|
* Disables telemetry reporting
|
|
281
285
|
*/
|
|
282
286
|
Config.DISABLE_TELEMETRY = 'disableTelemetry';
|
|
287
|
+
/**
|
|
288
|
+
* Custom templates repo or local location.
|
|
289
|
+
*/
|
|
290
|
+
Config.CUSTOM_ORG_METADATA_TEMPLATES = 'customOrgMetadataTemplates';
|
|
283
291
|
/**
|
|
284
292
|
* allows users to override the 10,000 result query limit
|
|
285
293
|
*/
|
|
@@ -308,6 +316,17 @@ Config.allowedProperties = [
|
|
|
308
316
|
},
|
|
309
317
|
},
|
|
310
318
|
},
|
|
319
|
+
{
|
|
320
|
+
key: Config.CUSTOM_ORG_METADATA_TEMPLATES,
|
|
321
|
+
input: {
|
|
322
|
+
// If a value is provided validate it otherwise no value is unset.
|
|
323
|
+
validator: (value) => value == null || ts_types_1.isString(value),
|
|
324
|
+
get failedMessage() {
|
|
325
|
+
var _a;
|
|
326
|
+
return (_a = Config.messages) === null || _a === void 0 ? void 0 : _a.getMessage('InvalidCustomOrgMetadataTemplates');
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
311
330
|
{ key: Config.DEFAULT_DEV_HUB_USERNAME },
|
|
312
331
|
{ key: Config.DEFAULT_USERNAME },
|
|
313
332
|
{
|
package/lib/util/fs.d.ts
CHANGED
package/lib/util/fs.js
CHANGED
|
@@ -14,6 +14,9 @@ const kit_1 = require("@salesforce/kit");
|
|
|
14
14
|
const fsLib = require("graceful-fs");
|
|
15
15
|
const mkdirpLib = require("mkdirp");
|
|
16
16
|
const sfdxError_1 = require("../sfdxError");
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use fs/promises instead
|
|
19
|
+
*/
|
|
17
20
|
exports.fs = Object.assign({}, fsLib, {
|
|
18
21
|
/**
|
|
19
22
|
* The default file system mode to use when creating directories.
|
package/messages/config.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"InvalidConfigValue": "Invalid config value. %s",
|
|
4
4
|
"InvalidInstanceUrl": "Specify a valid Salesforce instance URL",
|
|
5
5
|
"InvalidApiVersion": "Specify a valid Salesforce API version, for example, 42.0",
|
|
6
|
+
"InvalidCustomOrgMetadataTemplates": "Specify a valid repository URL or directory for the custom org metadata templates.",
|
|
6
7
|
"InvalidIsvDebuggerSid": "Specify a valid Debugger SID",
|
|
7
8
|
"InvalidIsvDebuggerUrl": "Specify a valid Debugger URL",
|
|
8
9
|
"InvalidNumberConfigValue": "Specify a valid positive integer, for example, 150000",
|