@salesforce/core 3.10.0 → 3.11.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/CHANGELOG.md +14 -0
- package/lib/config/config.d.ts +65 -13
- package/lib/config/config.js +52 -4
- package/lib/config/envVars.d.ts +7 -3
- package/lib/config/envVars.js +32 -12
- package/lib/exported.d.ts +1 -1
- package/lib/exported.js +4 -2
- package/lib/logger.d.ts +11 -0
- package/lib/logger.js +19 -8
- package/lib/org/orgConfigProperties.d.ts +64 -3
- package/lib/org/orgConfigProperties.js +106 -3
- package/messages/config.md +30 -6
- package/messages/envVars.md +19 -3
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.1](https://github.com/forcedotcom/sfdx-core/compare/v3.11.0...v3.11.1) (2022-04-01)
|
|
6
|
+
|
|
7
|
+
## [3.11.0](https://github.com/forcedotcom/sfdx-core/compare/v3.10.1...v3.11.0) (2022-03-30)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- normalize config vars for sf ([#543](https://github.com/forcedotcom/sfdx-core/issues/543)) ([93f3cbe](https://github.com/forcedotcom/sfdx-core/commit/93f3cbe90103fa159f21f532ffc173931037651c))
|
|
12
|
+
|
|
13
|
+
### [3.10.1](https://github.com/forcedotcom/sfdx-core/compare/v3.10.0...v3.10.1) (2022-03-24)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- rotating file logs ([ef5df25](https://github.com/forcedotcom/sfdx-core/commit/ef5df25c17a67541d12d5c228c18b75775251d98))
|
|
18
|
+
|
|
5
19
|
## [3.10.0](https://github.com/forcedotcom/sfdx-core/compare/v3.9.0...v3.10.0) (2022-03-23)
|
|
6
20
|
|
|
7
21
|
### Features
|
package/lib/config/config.d.ts
CHANGED
|
@@ -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
|
-
|
|
107
|
-
|
|
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
|
-
|
|
152
|
+
encrypted: boolean;
|
|
113
153
|
input: {
|
|
114
154
|
validator: (value: ConfigValue) => boolean;
|
|
115
155
|
failedMessage: string;
|
|
116
156
|
};
|
|
117
|
-
|
|
118
|
-
deprecated?: undefined;
|
|
119
|
-
encrypted?: undefined;
|
|
157
|
+
hidden?: undefined;
|
|
120
158
|
} | {
|
|
121
159
|
key: SfdxPropertyKeys;
|
|
122
|
-
newKey:
|
|
160
|
+
newKey: SfConfigProperties;
|
|
123
161
|
deprecated: boolean;
|
|
124
162
|
description: string;
|
|
125
|
-
input
|
|
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
|
-
|
|
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;
|
package/lib/config/config.js
CHANGED
|
@@ -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 {
|
package/lib/config/envVars.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare enum EnvironmentVariable {
|
|
|
26
26
|
'SFDX_INSTANCE_URL' = "SFDX_INSTANCE_URL",
|
|
27
27
|
'SFDX_JSON_TO_STDOUT' = "SFDX_JSON_TO_STDOUT",
|
|
28
28
|
'SFDX_LOG_LEVEL' = "SFDX_LOG_LEVEL",
|
|
29
|
+
'SFDX_LOG_ROTATION_COUNT' = "SFDX_LOG_ROTATION_COUNT",
|
|
30
|
+
'SFDX_LOG_ROTATION_PERIOD' = "SFDX_LOG_ROTATION_PERIOD",
|
|
29
31
|
'SFDX_MAX_QUERY_LIMIT' = "SFDX_MAX_QUERY_LIMIT",
|
|
30
32
|
'SFDX_MDAPI_TEMP_DIR' = "SFDX_MDAPI_TEMP_DIR",
|
|
31
33
|
'SFDX_NPM_REGISTRY' = "SFDX_NPM_REGISTRY",
|
|
@@ -44,7 +46,7 @@ export declare enum EnvironmentVariable {
|
|
|
44
46
|
'SF_TARGET_ORG' = "SF_TARGET_ORG",
|
|
45
47
|
'SF_TARGET_DEV_HUB' = "SF_TARGET_DEV_HUB",
|
|
46
48
|
'SF_ACCESS_TOKEN' = "SF_ACCESS_TOKEN",
|
|
47
|
-
'
|
|
49
|
+
'SF_ORG_API_VERSION' = "SF_ORG_API_VERSION",
|
|
48
50
|
'SF_AUDIENCE_URL' = "SF_AUDIENCE_URL",
|
|
49
51
|
'SF_CODE_COVERAGE_REQUIREMENT' = "SF_CODE_COVERAGE_REQUIREMENT",
|
|
50
52
|
'SF_CONTENT_TYPE' = "SF_CONTENT_TYPE",
|
|
@@ -55,10 +57,12 @@ export declare enum EnvironmentVariable {
|
|
|
55
57
|
'SF_DNS_TIMEOUT' = "SF_DNS_TIMEOUT",
|
|
56
58
|
'SF_DOMAIN_RETRY' = "SF_DOMAIN_RETRY",
|
|
57
59
|
'SF_IMPROVED_CODE_COVERAGE' = "SF_IMPROVED_CODE_COVERAGE",
|
|
58
|
-
'
|
|
60
|
+
'SF_ORG_INSTANCE_URL' = "SF_ORG_INSTANCE_URL",
|
|
59
61
|
'SF_JSON_TO_STDOUT' = "SF_JSON_TO_STDOUT",
|
|
60
62
|
'SF_LOG_LEVEL' = "SF_LOG_LEVEL",
|
|
61
|
-
'
|
|
63
|
+
'SF_LOG_ROTATION_COUNT' = "SF_LOG_ROTATION_COUNT",
|
|
64
|
+
'SF_LOG_ROTATION_PERIOD' = "SF_LOG_ROTATION_PERIOD",
|
|
65
|
+
'SF_ORG_MAX_QUERY_LIMIT' = "SF_ORG_MAX_QUERY_LIMIT",
|
|
62
66
|
'SF_MDAPI_TEMP_DIR' = "SF_MDAPI_TEMP_DIR",
|
|
63
67
|
'SF_NPM_REGISTRY' = "SF_NPM_REGISTRY",
|
|
64
68
|
'SF_PRECOMPILE_ENABLE' = "SF_PRECOMPILE_ENABLE",
|
package/lib/config/envVars.js
CHANGED
|
@@ -40,6 +40,8 @@ var EnvironmentVariable;
|
|
|
40
40
|
EnvironmentVariable["SFDX_INSTANCE_URL"] = "SFDX_INSTANCE_URL";
|
|
41
41
|
EnvironmentVariable["SFDX_JSON_TO_STDOUT"] = "SFDX_JSON_TO_STDOUT";
|
|
42
42
|
EnvironmentVariable["SFDX_LOG_LEVEL"] = "SFDX_LOG_LEVEL";
|
|
43
|
+
EnvironmentVariable["SFDX_LOG_ROTATION_COUNT"] = "SFDX_LOG_ROTATION_COUNT";
|
|
44
|
+
EnvironmentVariable["SFDX_LOG_ROTATION_PERIOD"] = "SFDX_LOG_ROTATION_PERIOD";
|
|
43
45
|
EnvironmentVariable["SFDX_MAX_QUERY_LIMIT"] = "SFDX_MAX_QUERY_LIMIT";
|
|
44
46
|
EnvironmentVariable["SFDX_MDAPI_TEMP_DIR"] = "SFDX_MDAPI_TEMP_DIR";
|
|
45
47
|
EnvironmentVariable["SFDX_NPM_REGISTRY"] = "SFDX_NPM_REGISTRY";
|
|
@@ -58,7 +60,7 @@ var EnvironmentVariable;
|
|
|
58
60
|
EnvironmentVariable["SF_TARGET_ORG"] = "SF_TARGET_ORG";
|
|
59
61
|
EnvironmentVariable["SF_TARGET_DEV_HUB"] = "SF_TARGET_DEV_HUB";
|
|
60
62
|
EnvironmentVariable["SF_ACCESS_TOKEN"] = "SF_ACCESS_TOKEN";
|
|
61
|
-
EnvironmentVariable["
|
|
63
|
+
EnvironmentVariable["SF_ORG_API_VERSION"] = "SF_ORG_API_VERSION";
|
|
62
64
|
EnvironmentVariable["SF_AUDIENCE_URL"] = "SF_AUDIENCE_URL";
|
|
63
65
|
EnvironmentVariable["SF_CODE_COVERAGE_REQUIREMENT"] = "SF_CODE_COVERAGE_REQUIREMENT";
|
|
64
66
|
EnvironmentVariable["SF_CONTENT_TYPE"] = "SF_CONTENT_TYPE";
|
|
@@ -69,10 +71,12 @@ var EnvironmentVariable;
|
|
|
69
71
|
EnvironmentVariable["SF_DNS_TIMEOUT"] = "SF_DNS_TIMEOUT";
|
|
70
72
|
EnvironmentVariable["SF_DOMAIN_RETRY"] = "SF_DOMAIN_RETRY";
|
|
71
73
|
EnvironmentVariable["SF_IMPROVED_CODE_COVERAGE"] = "SF_IMPROVED_CODE_COVERAGE";
|
|
72
|
-
EnvironmentVariable["
|
|
74
|
+
EnvironmentVariable["SF_ORG_INSTANCE_URL"] = "SF_ORG_INSTANCE_URL";
|
|
73
75
|
EnvironmentVariable["SF_JSON_TO_STDOUT"] = "SF_JSON_TO_STDOUT";
|
|
74
76
|
EnvironmentVariable["SF_LOG_LEVEL"] = "SF_LOG_LEVEL";
|
|
75
|
-
EnvironmentVariable["
|
|
77
|
+
EnvironmentVariable["SF_LOG_ROTATION_COUNT"] = "SF_LOG_ROTATION_COUNT";
|
|
78
|
+
EnvironmentVariable["SF_LOG_ROTATION_PERIOD"] = "SF_LOG_ROTATION_PERIOD";
|
|
79
|
+
EnvironmentVariable["SF_ORG_MAX_QUERY_LIMIT"] = "SF_ORG_MAX_QUERY_LIMIT";
|
|
76
80
|
EnvironmentVariable["SF_MDAPI_TEMP_DIR"] = "SF_MDAPI_TEMP_DIR";
|
|
77
81
|
EnvironmentVariable["SF_NPM_REGISTRY"] = "SF_NPM_REGISTRY";
|
|
78
82
|
EnvironmentVariable["SF_PRECOMPILE_ENABLE"] = "SF_PRECOMPILE_ENABLE";
|
|
@@ -124,7 +128,7 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
124
128
|
},
|
|
125
129
|
[EnvironmentVariable.SFDX_API_VERSION]: {
|
|
126
130
|
description: getMessage(EnvironmentVariable.SFDX_API_VERSION),
|
|
127
|
-
synonymOf: EnvironmentVariable.
|
|
131
|
+
synonymOf: EnvironmentVariable.SF_ORG_API_VERSION,
|
|
128
132
|
},
|
|
129
133
|
[EnvironmentVariable.SFDX_AUDIENCE_URL]: {
|
|
130
134
|
description: getMessage(EnvironmentVariable.SFDX_AUDIENCE_URL),
|
|
@@ -176,7 +180,7 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
176
180
|
},
|
|
177
181
|
[EnvironmentVariable.SFDX_INSTANCE_URL]: {
|
|
178
182
|
description: getMessage(EnvironmentVariable.SFDX_INSTANCE_URL),
|
|
179
|
-
synonymOf: EnvironmentVariable.
|
|
183
|
+
synonymOf: EnvironmentVariable.SF_ORG_INSTANCE_URL,
|
|
180
184
|
},
|
|
181
185
|
[EnvironmentVariable.SFDX_JSON_TO_STDOUT]: {
|
|
182
186
|
description: getMessage(EnvironmentVariable.SFDX_JSON_TO_STDOUT),
|
|
@@ -186,9 +190,17 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
186
190
|
description: getMessage(EnvironmentVariable.SFDX_LOG_LEVEL),
|
|
187
191
|
synonymOf: EnvironmentVariable.SF_LOG_LEVEL,
|
|
188
192
|
},
|
|
193
|
+
[EnvironmentVariable.SFDX_LOG_ROTATION_COUNT]: {
|
|
194
|
+
description: getMessage(EnvironmentVariable.SFDX_LOG_ROTATION_COUNT),
|
|
195
|
+
synonymOf: EnvironmentVariable.SF_LOG_ROTATION_COUNT,
|
|
196
|
+
},
|
|
197
|
+
[EnvironmentVariable.SFDX_LOG_ROTATION_PERIOD]: {
|
|
198
|
+
description: getMessage(EnvironmentVariable.SFDX_LOG_ROTATION_PERIOD),
|
|
199
|
+
synonymOf: EnvironmentVariable.SF_LOG_ROTATION_PERIOD,
|
|
200
|
+
},
|
|
189
201
|
[EnvironmentVariable.SFDX_MAX_QUERY_LIMIT]: {
|
|
190
202
|
description: getMessage(EnvironmentVariable.SFDX_MAX_QUERY_LIMIT),
|
|
191
|
-
synonymOf: EnvironmentVariable.
|
|
203
|
+
synonymOf: EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT,
|
|
192
204
|
},
|
|
193
205
|
[EnvironmentVariable.SFDX_MDAPI_TEMP_DIR]: {
|
|
194
206
|
description: getMessage(EnvironmentVariable.SFDX_MDAPI_TEMP_DIR),
|
|
@@ -259,8 +271,8 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
259
271
|
description: getMessage(EnvironmentVariable.SF_ACCESS_TOKEN),
|
|
260
272
|
synonymOf: null,
|
|
261
273
|
},
|
|
262
|
-
[EnvironmentVariable.
|
|
263
|
-
description: getMessage(EnvironmentVariable.
|
|
274
|
+
[EnvironmentVariable.SF_ORG_API_VERSION]: {
|
|
275
|
+
description: getMessage(EnvironmentVariable.SF_ORG_API_VERSION),
|
|
264
276
|
synonymOf: null,
|
|
265
277
|
},
|
|
266
278
|
[EnvironmentVariable.SF_AUDIENCE_URL]: {
|
|
@@ -303,8 +315,8 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
303
315
|
description: getMessage(EnvironmentVariable.SF_IMPROVED_CODE_COVERAGE),
|
|
304
316
|
synonymOf: null,
|
|
305
317
|
},
|
|
306
|
-
[EnvironmentVariable.
|
|
307
|
-
description: getMessage(EnvironmentVariable.
|
|
318
|
+
[EnvironmentVariable.SF_ORG_INSTANCE_URL]: {
|
|
319
|
+
description: getMessage(EnvironmentVariable.SF_ORG_INSTANCE_URL),
|
|
308
320
|
synonymOf: null,
|
|
309
321
|
},
|
|
310
322
|
[EnvironmentVariable.SF_JSON_TO_STDOUT]: {
|
|
@@ -315,8 +327,16 @@ exports.SUPPORTED_ENV_VARS = {
|
|
|
315
327
|
description: getMessage(EnvironmentVariable.SF_LOG_LEVEL),
|
|
316
328
|
synonymOf: null,
|
|
317
329
|
},
|
|
318
|
-
[EnvironmentVariable.
|
|
319
|
-
description: getMessage(EnvironmentVariable.
|
|
330
|
+
[EnvironmentVariable.SF_LOG_ROTATION_COUNT]: {
|
|
331
|
+
description: getMessage(EnvironmentVariable.SF_LOG_ROTATION_COUNT),
|
|
332
|
+
synonymOf: null,
|
|
333
|
+
},
|
|
334
|
+
[EnvironmentVariable.SF_LOG_ROTATION_PERIOD]: {
|
|
335
|
+
description: getMessage(EnvironmentVariable.SF_LOG_ROTATION_PERIOD),
|
|
336
|
+
synonymOf: null,
|
|
337
|
+
},
|
|
338
|
+
[EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT]: {
|
|
339
|
+
description: getMessage(EnvironmentVariable.SF_ORG_MAX_QUERY_LIMIT),
|
|
320
340
|
synonymOf: null,
|
|
321
341
|
},
|
|
322
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.
|
|
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");
|
package/lib/logger.d.ts
CHANGED
|
@@ -163,6 +163,17 @@ export declare class Logger {
|
|
|
163
163
|
static readonly LEVEL_NAMES: string[];
|
|
164
164
|
private static readonly lifecycle;
|
|
165
165
|
private static rootLogger?;
|
|
166
|
+
/**
|
|
167
|
+
* The default rotation period for logs. Example '1d' will rotate logs daily (at midnight).
|
|
168
|
+
* See 'period' docs here: https://github.com/forcedotcom/node-bunyan#stream-type-rotating-file
|
|
169
|
+
*/
|
|
170
|
+
readonly logRotationPeriod: string;
|
|
171
|
+
/**
|
|
172
|
+
* The number of backup rotated log files to keep.
|
|
173
|
+
* Example: '3' will have the base sf.log file, and the past 3 (period) log files.
|
|
174
|
+
* See 'count' docs here: https://github.com/forcedotcom/node-bunyan#stream-type-rotating-file
|
|
175
|
+
*/
|
|
176
|
+
readonly logRotationCount: number;
|
|
166
177
|
/**
|
|
167
178
|
* Whether debug is enabled for this Logger.
|
|
168
179
|
*/
|
package/lib/logger.js
CHANGED
|
@@ -74,6 +74,17 @@ class Logger {
|
|
|
74
74
|
* `Logger`.
|
|
75
75
|
*/
|
|
76
76
|
constructor(optionsOrName) {
|
|
77
|
+
/**
|
|
78
|
+
* The default rotation period for logs. Example '1d' will rotate logs daily (at midnight).
|
|
79
|
+
* See 'period' docs here: https://github.com/forcedotcom/node-bunyan#stream-type-rotating-file
|
|
80
|
+
*/
|
|
81
|
+
this.logRotationPeriod = new kit_1.Env().getString('SF_LOG_ROTATION_PERIOD') || '1d';
|
|
82
|
+
/**
|
|
83
|
+
* The number of backup rotated log files to keep.
|
|
84
|
+
* Example: '3' will have the base sf.log file, and the past 3 (period) log files.
|
|
85
|
+
* See 'count' docs here: https://github.com/forcedotcom/node-bunyan#stream-type-rotating-file
|
|
86
|
+
*/
|
|
87
|
+
this.logRotationCount = new kit_1.Env().getNumber('SF_LOG_ROTATION_COUNT') || 2;
|
|
77
88
|
/**
|
|
78
89
|
* Whether debug is enabled for this Logger.
|
|
79
90
|
*/
|
|
@@ -252,12 +263,12 @@ class Logger {
|
|
|
252
263
|
if (!this.bunyan.streams.find(
|
|
253
264
|
// No bunyan typings
|
|
254
265
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
255
|
-
(stream) => stream.type === 'file' && stream.path === logFile)) {
|
|
256
|
-
// TODO: rotating-file
|
|
257
|
-
// https://github.com/trentm/node-bunyan#stream-type-rotating-file
|
|
266
|
+
(stream) => stream.type === 'rotating-file' && stream.path === logFile)) {
|
|
258
267
|
this.addStream({
|
|
259
|
-
type: 'file',
|
|
268
|
+
type: 'rotating-file',
|
|
260
269
|
path: logFile,
|
|
270
|
+
period: this.logRotationPeriod,
|
|
271
|
+
count: this.logRotationCount,
|
|
261
272
|
level: this.bunyan.level(),
|
|
262
273
|
});
|
|
263
274
|
}
|
|
@@ -292,12 +303,12 @@ class Logger {
|
|
|
292
303
|
if (!this.bunyan.streams.find(
|
|
293
304
|
// No bunyan typings
|
|
294
305
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
295
|
-
(stream) => stream.type === 'file' && stream.path === logFile)) {
|
|
296
|
-
// TODO: rotating-file
|
|
297
|
-
// https://github.com/trentm/node-bunyan#stream-type-rotating-file
|
|
306
|
+
(stream) => stream.type === 'rotating-file' && stream.path === logFile)) {
|
|
298
307
|
this.addStream({
|
|
299
|
-
type: 'file',
|
|
308
|
+
type: 'rotating-file',
|
|
300
309
|
path: logFile,
|
|
310
|
+
period: this.logRotationPeriod,
|
|
311
|
+
count: this.logRotationCount,
|
|
301
312
|
level: this.bunyan.level(),
|
|
302
313
|
});
|
|
303
314
|
}
|
|
@@ -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
|
-
|
|
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', [
|
|
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(
|
|
69
|
+
description: messages.getMessage(OrgConfigProperties.TARGET_ORG),
|
|
23
70
|
},
|
|
24
71
|
{
|
|
25
72
|
key: OrgConfigProperties.TARGET_DEV_HUB,
|
|
26
|
-
description: messages.getMessage(
|
|
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
|
package/messages/config.md
CHANGED
|
@@ -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
|
-
#
|
|
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
|
-
#
|
|
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:
|
|
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.
|
package/messages/envVars.md
CHANGED
|
@@ -94,6 +94,14 @@ Set to true to send messages resulting from failed Salesforce CLI commands to st
|
|
|
94
94
|
|
|
95
95
|
Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn.
|
|
96
96
|
|
|
97
|
+
# sfdxLogRotationCount
|
|
98
|
+
|
|
99
|
+
The default rotation period for logs. Example '1d' will rotate logs daily (at midnight).
|
|
100
|
+
|
|
101
|
+
# sfdxLogRotationPeriod
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
97
105
|
# sfdxMaxQueryLimit
|
|
98
106
|
|
|
99
107
|
Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration value.
|
|
@@ -166,7 +174,7 @@ Username or alias of your default Dev Hub org. Overrides the target-dev-hub conf
|
|
|
166
174
|
|
|
167
175
|
Specifies an access token when using a login command that uses access tokens.
|
|
168
176
|
|
|
169
|
-
#
|
|
177
|
+
# sfOrgApiVersion
|
|
170
178
|
|
|
171
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.
|
|
172
180
|
|
|
@@ -210,7 +218,7 @@ Time, in seconds, that Salesforce CLI waits for the Lightning Experience custom
|
|
|
210
218
|
|
|
211
219
|
Set to true to scope Apex test results to the classes entered during a test run when running the Apex test commands.
|
|
212
220
|
|
|
213
|
-
#
|
|
221
|
+
# sfOrgInstanceUrl
|
|
214
222
|
|
|
215
223
|
URL of the Salesforce instance that is hosting your org. Default value is https://login.salesforce.com. Overrides the instanceUrl configuration variable.
|
|
216
224
|
|
|
@@ -222,7 +230,15 @@ Set to true to send messages resulting from failed Salesforce CLI commands to st
|
|
|
222
230
|
|
|
223
231
|
Level of messages that the CLI writes to the log file. Valid values are trace, debug, info, warn, error, fatal. Default value is warn.
|
|
224
232
|
|
|
225
|
-
#
|
|
233
|
+
# sfLogRotationCount
|
|
234
|
+
|
|
235
|
+
The default rotation period for logs. Example '1d' will rotate logs daily (at midnight).
|
|
236
|
+
|
|
237
|
+
# sfLogRotationPeriod
|
|
238
|
+
|
|
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
|
+
|
|
241
|
+
# sfOrgMaxQueryLimit
|
|
226
242
|
|
|
227
243
|
Maximum number of Salesforce records returned by a CLI command. Default value is 10,000. Overrides the maxQueryLimit configuration variable.
|
|
228
244
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.1",
|
|
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",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"!lib/**/*.map"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@oclif/core": "^1.5.1",
|
|
38
37
|
"@salesforce/bunyan": "^2.0.0",
|
|
39
38
|
"@salesforce/kit": "^1.5.34",
|
|
40
39
|
"@salesforce/schemas": "^1.1.0",
|