@salesforce/core 3.31.4 → 3.31.7
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/LICENSE.txt +11 -11
- package/README.md +222 -222
- package/lib/config/aliasesConfig.d.ts +12 -12
- package/lib/config/aliasesConfig.js +27 -27
- package/lib/config/authInfoConfig.d.ts +19 -19
- package/lib/config/authInfoConfig.js +34 -34
- package/lib/config/config.d.ts +311 -311
- package/lib/config/config.js +574 -574
- package/lib/config/configAggregator.d.ts +232 -232
- package/lib/config/configAggregator.js +379 -379
- package/lib/config/configFile.d.ts +199 -199
- package/lib/config/configFile.js +340 -340
- package/lib/config/configGroup.d.ts +141 -141
- package/lib/config/configGroup.js +224 -224
- package/lib/config/configStore.d.ts +241 -241
- package/lib/config/configStore.js +352 -352
- package/lib/config/envVars.d.ts +101 -101
- package/lib/config/envVars.js +456 -456
- package/lib/config/orgUsersConfig.d.ts +31 -31
- package/lib/config/orgUsersConfig.js +41 -41
- package/lib/config/sandboxOrgConfig.d.ts +37 -37
- package/lib/config/sandboxOrgConfig.js +50 -50
- package/lib/config/sandboxProcessCache.d.ts +16 -16
- package/lib/config/sandboxProcessCache.js +37 -37
- package/lib/config/tokensConfig.d.ts +10 -10
- package/lib/config/tokensConfig.js +28 -28
- package/lib/config/ttlConfig.d.ts +34 -34
- package/lib/config/ttlConfig.js +54 -54
- package/lib/crypto/crypto.d.ts +54 -54
- package/lib/crypto/crypto.js +220 -220
- package/lib/crypto/keyChain.d.ts +8 -8
- package/lib/crypto/keyChain.js +61 -61
- package/lib/crypto/keyChainImpl.d.ts +116 -116
- package/lib/crypto/keyChainImpl.js +486 -486
- package/lib/crypto/secureBuffer.d.ts +46 -46
- package/lib/crypto/secureBuffer.js +82 -82
- package/lib/deviceOauthService.d.ts +71 -71
- package/lib/deviceOauthService.js +191 -191
- package/lib/exported.d.ts +38 -38
- package/lib/exported.js +118 -118
- package/lib/global.d.ts +70 -70
- package/lib/global.js +109 -109
- package/lib/lifecycleEvents.d.ts +93 -93
- package/lib/lifecycleEvents.js +188 -188
- package/lib/logger.d.ts +381 -381
- package/lib/logger.js +734 -734
- package/lib/messages.d.ts +291 -291
- package/lib/messages.js +543 -543
- package/lib/org/authInfo.d.ts +344 -344
- package/lib/org/authInfo.js +892 -892
- package/lib/org/authRemover.d.ts +88 -88
- package/lib/org/authRemover.js +182 -182
- package/lib/org/connection.d.ts +197 -197
- package/lib/org/connection.js +395 -395
- package/lib/org/index.d.ts +6 -6
- package/lib/org/index.js +28 -28
- package/lib/org/org.d.ts +558 -558
- package/lib/org/org.js +1267 -1267
- package/lib/org/orgConfigProperties.d.ts +69 -69
- package/lib/org/orgConfigProperties.js +136 -136
- package/lib/org/permissionSetAssignment.d.ts +35 -35
- package/lib/org/permissionSetAssignment.js +125 -125
- package/lib/org/scratchOrgCache.d.ts +20 -20
- package/lib/org/scratchOrgCache.js +32 -32
- package/lib/org/scratchOrgCreate.d.ts +54 -54
- package/lib/org/scratchOrgCreate.js +216 -216
- package/lib/org/scratchOrgErrorCodes.d.ts +10 -10
- package/lib/org/scratchOrgErrorCodes.js +88 -88
- package/lib/org/scratchOrgFeatureDeprecation.d.ts +26 -26
- package/lib/org/scratchOrgFeatureDeprecation.js +109 -109
- package/lib/org/scratchOrgInfoApi.d.ts +68 -68
- package/lib/org/scratchOrgInfoApi.js +413 -413
- package/lib/org/scratchOrgInfoGenerator.d.ts +64 -64
- package/lib/org/scratchOrgInfoGenerator.js +241 -241
- package/lib/org/scratchOrgLifecycleEvents.d.ts +10 -10
- package/lib/org/scratchOrgLifecycleEvents.js +40 -40
- package/lib/org/scratchOrgSettingsGenerator.d.ts +78 -78
- package/lib/org/scratchOrgSettingsGenerator.js +276 -276
- package/lib/org/scratchOrgTypes.d.ts +43 -43
- package/lib/org/scratchOrgTypes.js +8 -8
- package/lib/org/user.d.ts +187 -187
- package/lib/org/user.js +448 -448
- package/lib/schema/printer.d.ts +79 -79
- package/lib/schema/printer.js +260 -260
- package/lib/schema/validator.d.ts +70 -70
- package/lib/schema/validator.js +169 -169
- package/lib/sfError.d.ts +73 -73
- package/lib/sfError.js +136 -136
- package/lib/sfProject.d.ts +357 -357
- package/lib/sfProject.js +671 -671
- package/lib/stateAggregator/accessors/aliasAccessor.d.ts +98 -98
- package/lib/stateAggregator/accessors/aliasAccessor.js +145 -145
- package/lib/stateAggregator/accessors/orgAccessor.d.ts +101 -101
- package/lib/stateAggregator/accessors/orgAccessor.js +240 -240
- package/lib/stateAggregator/accessors/sandboxAccessor.d.ts +8 -8
- package/lib/stateAggregator/accessors/sandboxAccessor.js +27 -27
- package/lib/stateAggregator/accessors/tokenAccessor.d.ts +63 -63
- package/lib/stateAggregator/accessors/tokenAccessor.js +79 -79
- package/lib/stateAggregator/index.d.ts +4 -4
- package/lib/stateAggregator/index.js +26 -26
- package/lib/stateAggregator/stateAggregator.d.ts +25 -25
- package/lib/stateAggregator/stateAggregator.js +45 -45
- package/lib/status/myDomainResolver.d.ts +66 -66
- package/lib/status/myDomainResolver.js +124 -124
- package/lib/status/pollingClient.d.ts +85 -85
- package/lib/status/pollingClient.js +115 -115
- package/lib/status/streamingClient.d.ts +244 -244
- package/lib/status/streamingClient.js +436 -436
- package/lib/status/types.d.ts +89 -89
- package/lib/status/types.js +17 -17
- package/lib/testSetup.d.ts +553 -553
- package/lib/testSetup.js +871 -871
- package/lib/util/cache.d.ts +11 -11
- package/lib/util/cache.js +69 -69
- package/lib/util/checkLightningDomain.d.ts +1 -1
- package/lib/util/checkLightningDomain.js +28 -28
- package/lib/util/directoryWriter.d.ts +12 -12
- package/lib/util/directoryWriter.js +53 -53
- package/lib/util/getJwtAudienceUrl.d.ts +4 -4
- package/lib/util/getJwtAudienceUrl.js +18 -18
- package/lib/util/internal.d.ts +58 -58
- package/lib/util/internal.js +118 -118
- package/lib/util/jsonXmlTools.d.ts +14 -14
- package/lib/util/jsonXmlTools.js +38 -38
- package/lib/util/mapKeys.d.ts +14 -14
- package/lib/util/mapKeys.js +51 -51
- package/lib/util/sfdc.d.ts +52 -52
- package/lib/util/sfdc.js +85 -85
- package/lib/util/sfdcUrl.d.ts +72 -72
- package/lib/util/sfdcUrl.js +215 -215
- package/lib/util/structuredWriter.d.ts +9 -9
- package/lib/util/structuredWriter.js +2 -2
- package/lib/util/zipWriter.d.ts +16 -16
- package/lib/util/zipWriter.js +67 -67
- package/lib/webOAuthServer.d.ts +156 -156
- package/lib/webOAuthServer.js +388 -388
- package/messages/auth.md +37 -37
- package/messages/config.md +156 -156
- package/messages/connection.md +30 -30
- package/messages/core.json +20 -20
- package/messages/core.md +67 -67
- package/messages/encryption.md +85 -85
- package/messages/envVars.md +303 -303
- package/messages/org.md +63 -63
- package/messages/permissionSetAssignment.md +31 -31
- package/messages/scratchOrgCreate.md +23 -23
- package/messages/scratchOrgErrorCodes.md +115 -115
- package/messages/scratchOrgFeatureDeprecation.md +11 -11
- package/messages/scratchOrgInfoApi.md +15 -15
- package/messages/scratchOrgInfoGenerator.md +23 -23
- package/messages/streaming.md +23 -23
- package/messages/user.md +35 -35
- package/package.json +97 -97
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
interface FeatureTypes {
|
|
2
|
-
simpleFeatureMapping: {
|
|
3
|
-
[key: string]: string[];
|
|
4
|
-
};
|
|
5
|
-
quantifiedFeatureMapping: Record<string, string | number | boolean | null | undefined>;
|
|
6
|
-
deprecatedFeatures: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare class ScratchOrgFeatureDeprecation {
|
|
9
|
-
private featureTypes;
|
|
10
|
-
constructor(options?: FeatureTypes);
|
|
11
|
-
/**
|
|
12
|
-
* Gets list of feature warnings that should be logged
|
|
13
|
-
*
|
|
14
|
-
* @param features The requested features.
|
|
15
|
-
* @returns List of string feature warnings.
|
|
16
|
-
*/
|
|
17
|
-
getFeatureWarnings(features: string | string[]): string[];
|
|
18
|
-
/**
|
|
19
|
-
* Removes all deprecated features for the organization.
|
|
20
|
-
*
|
|
21
|
-
* @param features List of features to filter
|
|
22
|
-
* @returns feature array with proper mapping.
|
|
23
|
-
*/
|
|
24
|
-
filterDeprecatedFeatures(features: string[]): string[];
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
1
|
+
interface FeatureTypes {
|
|
2
|
+
simpleFeatureMapping: {
|
|
3
|
+
[key: string]: string[];
|
|
4
|
+
};
|
|
5
|
+
quantifiedFeatureMapping: Record<string, string | number | boolean | null | undefined>;
|
|
6
|
+
deprecatedFeatures: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare class ScratchOrgFeatureDeprecation {
|
|
9
|
+
private featureTypes;
|
|
10
|
+
constructor(options?: FeatureTypes);
|
|
11
|
+
/**
|
|
12
|
+
* Gets list of feature warnings that should be logged
|
|
13
|
+
*
|
|
14
|
+
* @param features The requested features.
|
|
15
|
+
* @returns List of string feature warnings.
|
|
16
|
+
*/
|
|
17
|
+
getFeatureWarnings(features: string | string[]): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Removes all deprecated features for the organization.
|
|
20
|
+
*
|
|
21
|
+
* @param features List of features to filter
|
|
22
|
+
* @returns feature array with proper mapping.
|
|
23
|
+
*/
|
|
24
|
+
filterDeprecatedFeatures(features: string[]): string[];
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ScratchOrgFeatureDeprecation = void 0;
|
|
10
|
-
/**
|
|
11
|
-
* Certain Org Features require a translation or should be deprecated.
|
|
12
|
-
* Encapsulates feature mappings and deprecated features.
|
|
13
|
-
*/
|
|
14
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
|
-
// Local
|
|
16
|
-
const messages_1 = require("../messages");
|
|
17
|
-
messages_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
-
const messages = messages_1.Messages.load('@salesforce/core', 'scratchOrgFeatureDeprecation', [
|
|
19
|
-
'quantifiedFeatureWithoutQuantityWarning',
|
|
20
|
-
'mappedFeatureWarning',
|
|
21
|
-
'deprecatedFeatureWarning',
|
|
22
|
-
]);
|
|
23
|
-
const FEATURE_TYPES = {
|
|
24
|
-
// simpleFeatureMapping holds a set of direct replacement values for features.
|
|
25
|
-
simpleFeatureMapping: {
|
|
26
|
-
SALESWAVE: ['DEVELOPMENTWAVE'],
|
|
27
|
-
SERVICEWAVE: ['DEVELOPMENTWAVE'],
|
|
28
|
-
},
|
|
29
|
-
quantifiedFeatureMapping: {},
|
|
30
|
-
deprecatedFeatures: [
|
|
31
|
-
'EXPANDEDSOURCETRACKING',
|
|
32
|
-
'LISTCUSTOMSETTINGCREATION',
|
|
33
|
-
'AppNavCapabilities',
|
|
34
|
-
'EditInSubtab',
|
|
35
|
-
'OldNewRecordFlowConsole',
|
|
36
|
-
'OldNewRecordFlowStd',
|
|
37
|
-
'DesktopLayoutStandardOff',
|
|
38
|
-
'SplitViewOnStandardOff',
|
|
39
|
-
'PopOutUtilities',
|
|
40
|
-
],
|
|
41
|
-
};
|
|
42
|
-
class ScratchOrgFeatureDeprecation {
|
|
43
|
-
// Allow override for testing.
|
|
44
|
-
constructor(options = FEATURE_TYPES) {
|
|
45
|
-
this.featureTypes = options;
|
|
46
|
-
this.featureTypes.deprecatedFeatures = this.featureTypes.deprecatedFeatures.map((deprecatedFeature) => deprecatedFeature.toUpperCase());
|
|
47
|
-
// Make all of the keys in simpleFeatureMapping upper case.
|
|
48
|
-
const sfm = {};
|
|
49
|
-
Object.keys(this.featureTypes.simpleFeatureMapping).forEach((key) => {
|
|
50
|
-
sfm[key.toUpperCase()] = this.featureTypes.simpleFeatureMapping[key];
|
|
51
|
-
});
|
|
52
|
-
this.featureTypes.simpleFeatureMapping = sfm;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Gets list of feature warnings that should be logged
|
|
56
|
-
*
|
|
57
|
-
* @param features The requested features.
|
|
58
|
-
* @returns List of string feature warnings.
|
|
59
|
-
*/
|
|
60
|
-
getFeatureWarnings(features) {
|
|
61
|
-
/* Get warning messages for deprecated features and feature mappings.*/
|
|
62
|
-
const featureWarningMessages = [];
|
|
63
|
-
const requestedFeatures = ((0, ts_types_1.isString)(features) ? features : features.join(';')).toUpperCase();
|
|
64
|
-
/* If a public quantified feature is defined without a quantity, throw a warning.*/
|
|
65
|
-
Object.keys(this.featureTypes.quantifiedFeatureMapping).forEach((key) => {
|
|
66
|
-
if (new RegExp(`${key};|${key},|${key}$`, 'i').test(requestedFeatures)) {
|
|
67
|
-
featureWarningMessages.push(messages.getMessage('quantifiedFeatureWithoutQuantityWarning', [
|
|
68
|
-
key,
|
|
69
|
-
this.featureTypes.quantifiedFeatureMapping[key],
|
|
70
|
-
]));
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
/* If a simply mapped feature is defined, log a warning.*/
|
|
74
|
-
Object.keys(this.featureTypes.simpleFeatureMapping).forEach((key) => {
|
|
75
|
-
if (new RegExp(`${key};|${key},|${key}$`, 'i').test(requestedFeatures)) {
|
|
76
|
-
const tokens = '[' + this.featureTypes.simpleFeatureMapping[key].map((v) => "'" + v + "'").join(',') + ']';
|
|
77
|
-
featureWarningMessages.push(messages.getMessage('mappedFeatureWarning', [key, tokens]));
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
/* If a deprecated feature is identified as deprecated, throw a warning.*/
|
|
81
|
-
this.featureTypes.deprecatedFeatures.forEach((deprecatedFeature) => {
|
|
82
|
-
if (requestedFeatures.includes(deprecatedFeature)) {
|
|
83
|
-
featureWarningMessages.push(messages.getMessage('deprecatedFeatureWarning', [deprecatedFeature]));
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
return featureWarningMessages;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Removes all deprecated features for the organization.
|
|
90
|
-
*
|
|
91
|
-
* @param features List of features to filter
|
|
92
|
-
* @returns feature array with proper mapping.
|
|
93
|
-
*/
|
|
94
|
-
filterDeprecatedFeatures(features) {
|
|
95
|
-
return features.reduce((previousValue, currentValue) => {
|
|
96
|
-
const feature = currentValue.toUpperCase();
|
|
97
|
-
if (this.featureTypes.deprecatedFeatures.includes(feature)) {
|
|
98
|
-
return previousValue;
|
|
99
|
-
}
|
|
100
|
-
else if (this.featureTypes.simpleFeatureMapping[feature]) {
|
|
101
|
-
/* If a simply mapped feature is specified, then perform the mapping. */
|
|
102
|
-
const simpleFeatureMapping = this.featureTypes.simpleFeatureMapping[feature];
|
|
103
|
-
return [...previousValue, ...simpleFeatureMapping];
|
|
104
|
-
}
|
|
105
|
-
return [...previousValue, currentValue];
|
|
106
|
-
}, []);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
exports.ScratchOrgFeatureDeprecation = ScratchOrgFeatureDeprecation;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ScratchOrgFeatureDeprecation = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Certain Org Features require a translation or should be deprecated.
|
|
12
|
+
* Encapsulates feature mappings and deprecated features.
|
|
13
|
+
*/
|
|
14
|
+
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
|
+
// Local
|
|
16
|
+
const messages_1 = require("../messages");
|
|
17
|
+
messages_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
const messages = messages_1.Messages.load('@salesforce/core', 'scratchOrgFeatureDeprecation', [
|
|
19
|
+
'quantifiedFeatureWithoutQuantityWarning',
|
|
20
|
+
'mappedFeatureWarning',
|
|
21
|
+
'deprecatedFeatureWarning',
|
|
22
|
+
]);
|
|
23
|
+
const FEATURE_TYPES = {
|
|
24
|
+
// simpleFeatureMapping holds a set of direct replacement values for features.
|
|
25
|
+
simpleFeatureMapping: {
|
|
26
|
+
SALESWAVE: ['DEVELOPMENTWAVE'],
|
|
27
|
+
SERVICEWAVE: ['DEVELOPMENTWAVE'],
|
|
28
|
+
},
|
|
29
|
+
quantifiedFeatureMapping: {},
|
|
30
|
+
deprecatedFeatures: [
|
|
31
|
+
'EXPANDEDSOURCETRACKING',
|
|
32
|
+
'LISTCUSTOMSETTINGCREATION',
|
|
33
|
+
'AppNavCapabilities',
|
|
34
|
+
'EditInSubtab',
|
|
35
|
+
'OldNewRecordFlowConsole',
|
|
36
|
+
'OldNewRecordFlowStd',
|
|
37
|
+
'DesktopLayoutStandardOff',
|
|
38
|
+
'SplitViewOnStandardOff',
|
|
39
|
+
'PopOutUtilities',
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
class ScratchOrgFeatureDeprecation {
|
|
43
|
+
// Allow override for testing.
|
|
44
|
+
constructor(options = FEATURE_TYPES) {
|
|
45
|
+
this.featureTypes = options;
|
|
46
|
+
this.featureTypes.deprecatedFeatures = this.featureTypes.deprecatedFeatures.map((deprecatedFeature) => deprecatedFeature.toUpperCase());
|
|
47
|
+
// Make all of the keys in simpleFeatureMapping upper case.
|
|
48
|
+
const sfm = {};
|
|
49
|
+
Object.keys(this.featureTypes.simpleFeatureMapping).forEach((key) => {
|
|
50
|
+
sfm[key.toUpperCase()] = this.featureTypes.simpleFeatureMapping[key];
|
|
51
|
+
});
|
|
52
|
+
this.featureTypes.simpleFeatureMapping = sfm;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets list of feature warnings that should be logged
|
|
56
|
+
*
|
|
57
|
+
* @param features The requested features.
|
|
58
|
+
* @returns List of string feature warnings.
|
|
59
|
+
*/
|
|
60
|
+
getFeatureWarnings(features) {
|
|
61
|
+
/* Get warning messages for deprecated features and feature mappings.*/
|
|
62
|
+
const featureWarningMessages = [];
|
|
63
|
+
const requestedFeatures = ((0, ts_types_1.isString)(features) ? features : features.join(';')).toUpperCase();
|
|
64
|
+
/* If a public quantified feature is defined without a quantity, throw a warning.*/
|
|
65
|
+
Object.keys(this.featureTypes.quantifiedFeatureMapping).forEach((key) => {
|
|
66
|
+
if (new RegExp(`${key};|${key},|${key}$`, 'i').test(requestedFeatures)) {
|
|
67
|
+
featureWarningMessages.push(messages.getMessage('quantifiedFeatureWithoutQuantityWarning', [
|
|
68
|
+
key,
|
|
69
|
+
this.featureTypes.quantifiedFeatureMapping[key],
|
|
70
|
+
]));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
/* If a simply mapped feature is defined, log a warning.*/
|
|
74
|
+
Object.keys(this.featureTypes.simpleFeatureMapping).forEach((key) => {
|
|
75
|
+
if (new RegExp(`${key};|${key},|${key}$`, 'i').test(requestedFeatures)) {
|
|
76
|
+
const tokens = '[' + this.featureTypes.simpleFeatureMapping[key].map((v) => "'" + v + "'").join(',') + ']';
|
|
77
|
+
featureWarningMessages.push(messages.getMessage('mappedFeatureWarning', [key, tokens]));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
/* If a deprecated feature is identified as deprecated, throw a warning.*/
|
|
81
|
+
this.featureTypes.deprecatedFeatures.forEach((deprecatedFeature) => {
|
|
82
|
+
if (requestedFeatures.includes(deprecatedFeature)) {
|
|
83
|
+
featureWarningMessages.push(messages.getMessage('deprecatedFeatureWarning', [deprecatedFeature]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return featureWarningMessages;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Removes all deprecated features for the organization.
|
|
90
|
+
*
|
|
91
|
+
* @param features List of features to filter
|
|
92
|
+
* @returns feature array with proper mapping.
|
|
93
|
+
*/
|
|
94
|
+
filterDeprecatedFeatures(features) {
|
|
95
|
+
return features.reduce((previousValue, currentValue) => {
|
|
96
|
+
const feature = currentValue.toUpperCase();
|
|
97
|
+
if (this.featureTypes.deprecatedFeatures.includes(feature)) {
|
|
98
|
+
return previousValue;
|
|
99
|
+
}
|
|
100
|
+
else if (this.featureTypes.simpleFeatureMapping[feature]) {
|
|
101
|
+
/* If a simply mapped feature is specified, then perform the mapping. */
|
|
102
|
+
const simpleFeatureMapping = this.featureTypes.simpleFeatureMapping[feature];
|
|
103
|
+
return [...previousValue, ...simpleFeatureMapping];
|
|
104
|
+
}
|
|
105
|
+
return [...previousValue, currentValue];
|
|
106
|
+
}, []);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ScratchOrgFeatureDeprecation = ScratchOrgFeatureDeprecation;
|
|
110
110
|
//# sourceMappingURL=scratchOrgFeatureDeprecation.js.map
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { Duration } from '@salesforce/kit';
|
|
2
|
-
import { SaveResult } from 'jsforce';
|
|
3
|
-
import { AuthInfo } from './authInfo';
|
|
4
|
-
import { Org } from './org';
|
|
5
|
-
import SettingsGenerator from './scratchOrgSettingsGenerator';
|
|
6
|
-
import { ScratchOrgInfo } from './scratchOrgTypes';
|
|
7
|
-
export interface JsForceError extends Error {
|
|
8
|
-
errorCode: string;
|
|
9
|
-
fields: string[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param hubOrg Org
|
|
14
|
-
* @param id Record ID for the ScratchOrgInfoObject
|
|
15
|
-
* @returns Promise<ScratchOrgInfo>
|
|
16
|
-
*/
|
|
17
|
-
export declare const queryScratchOrgInfo: (hubOrg: Org, id: string) => Promise<ScratchOrgInfo>;
|
|
18
|
-
/**
|
|
19
|
-
* after we successfully signup an org we need to trade the auth token for access and refresh token.
|
|
20
|
-
*
|
|
21
|
-
* scratchOrgInfoComplete - The completed ScratchOrgInfo which should contain an access token.
|
|
22
|
-
* hubOrg - the environment hub org
|
|
23
|
-
* clientSecret - The OAuth client secret. May be null for JWT OAuth flow.
|
|
24
|
-
* signupTargetLoginUrlConfig - Login url
|
|
25
|
-
* retry - auth retry attempts
|
|
26
|
-
*
|
|
27
|
-
* @returns {Promise<AuthInfo>}
|
|
28
|
-
*/
|
|
29
|
-
export declare const authorizeScratchOrg: (options: {
|
|
30
|
-
scratchOrgInfoComplete: ScratchOrgInfo;
|
|
31
|
-
hubOrg: Org;
|
|
32
|
-
clientSecret?: string;
|
|
33
|
-
signupTargetLoginUrlConfig?: string;
|
|
34
|
-
retry?: number;
|
|
35
|
-
}) => Promise<AuthInfo>;
|
|
36
|
-
/**
|
|
37
|
-
* This extracts orgPrefs/settings from the user input and performs a basic scratchOrgInfo request.
|
|
38
|
-
*
|
|
39
|
-
* @param hubOrg - the environment hub org
|
|
40
|
-
* @param scratchOrgRequest - An object containing the fields of the ScratchOrgInfo
|
|
41
|
-
* @param settings - An object containing org settings
|
|
42
|
-
* @returns {Promise<SaveResult>}
|
|
43
|
-
*/
|
|
44
|
-
export declare const requestScratchOrgCreation: (hubOrg: Org, scratchOrgRequest: ScratchOrgInfo, settings: SettingsGenerator) => Promise<SaveResult>;
|
|
45
|
-
/**
|
|
46
|
-
* This retrieves the ScratchOrgInfo, polling until the status is Active or Error
|
|
47
|
-
*
|
|
48
|
-
* @param hubOrg
|
|
49
|
-
* @param scratchOrgInfoId - the id of the scratchOrgInfo that we are retrieving
|
|
50
|
-
* @param timeout - A Duration object
|
|
51
|
-
* @returns {Promise<ScratchOrgInfo>}
|
|
52
|
-
*/
|
|
53
|
-
export declare const pollForScratchOrgInfo: (hubOrg: Org, scratchOrgInfoId: string, timeout?: Duration) => Promise<ScratchOrgInfo>;
|
|
54
|
-
/**
|
|
55
|
-
* Deploy settings to the newly created scratch org
|
|
56
|
-
*
|
|
57
|
-
* @param scratchOrg an instance of the Org class
|
|
58
|
-
* @param orgSettings an instance of the SettingsGenerator class
|
|
59
|
-
* @param apiVersion the api version (used when created the package.xml)
|
|
60
|
-
*/
|
|
61
|
-
export declare const deploySettings: (scratchOrg: Org, orgSettings: SettingsGenerator, apiVersion: string) => Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @param scratchOrgAuthInfo an AuthInfo class from the scratch org
|
|
65
|
-
* @returns AuthInfo
|
|
66
|
-
*/
|
|
67
|
-
export declare const resolveUrl: (scratchOrgAuthInfo: AuthInfo) => Promise<AuthInfo>;
|
|
68
|
-
export declare const updateRevisionCounterToZero: (scratchOrg: Org) => Promise<void>;
|
|
1
|
+
import { Duration } from '@salesforce/kit';
|
|
2
|
+
import { SaveResult } from 'jsforce';
|
|
3
|
+
import { AuthInfo } from './authInfo';
|
|
4
|
+
import { Org } from './org';
|
|
5
|
+
import SettingsGenerator from './scratchOrgSettingsGenerator';
|
|
6
|
+
import { ScratchOrgInfo } from './scratchOrgTypes';
|
|
7
|
+
export interface JsForceError extends Error {
|
|
8
|
+
errorCode: string;
|
|
9
|
+
fields: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param hubOrg Org
|
|
14
|
+
* @param id Record ID for the ScratchOrgInfoObject
|
|
15
|
+
* @returns Promise<ScratchOrgInfo>
|
|
16
|
+
*/
|
|
17
|
+
export declare const queryScratchOrgInfo: (hubOrg: Org, id: string) => Promise<ScratchOrgInfo>;
|
|
18
|
+
/**
|
|
19
|
+
* after we successfully signup an org we need to trade the auth token for access and refresh token.
|
|
20
|
+
*
|
|
21
|
+
* scratchOrgInfoComplete - The completed ScratchOrgInfo which should contain an access token.
|
|
22
|
+
* hubOrg - the environment hub org
|
|
23
|
+
* clientSecret - The OAuth client secret. May be null for JWT OAuth flow.
|
|
24
|
+
* signupTargetLoginUrlConfig - Login url
|
|
25
|
+
* retry - auth retry attempts
|
|
26
|
+
*
|
|
27
|
+
* @returns {Promise<AuthInfo>}
|
|
28
|
+
*/
|
|
29
|
+
export declare const authorizeScratchOrg: (options: {
|
|
30
|
+
scratchOrgInfoComplete: ScratchOrgInfo;
|
|
31
|
+
hubOrg: Org;
|
|
32
|
+
clientSecret?: string;
|
|
33
|
+
signupTargetLoginUrlConfig?: string;
|
|
34
|
+
retry?: number;
|
|
35
|
+
}) => Promise<AuthInfo>;
|
|
36
|
+
/**
|
|
37
|
+
* This extracts orgPrefs/settings from the user input and performs a basic scratchOrgInfo request.
|
|
38
|
+
*
|
|
39
|
+
* @param hubOrg - the environment hub org
|
|
40
|
+
* @param scratchOrgRequest - An object containing the fields of the ScratchOrgInfo
|
|
41
|
+
* @param settings - An object containing org settings
|
|
42
|
+
* @returns {Promise<SaveResult>}
|
|
43
|
+
*/
|
|
44
|
+
export declare const requestScratchOrgCreation: (hubOrg: Org, scratchOrgRequest: ScratchOrgInfo, settings: SettingsGenerator) => Promise<SaveResult>;
|
|
45
|
+
/**
|
|
46
|
+
* This retrieves the ScratchOrgInfo, polling until the status is Active or Error
|
|
47
|
+
*
|
|
48
|
+
* @param hubOrg
|
|
49
|
+
* @param scratchOrgInfoId - the id of the scratchOrgInfo that we are retrieving
|
|
50
|
+
* @param timeout - A Duration object
|
|
51
|
+
* @returns {Promise<ScratchOrgInfo>}
|
|
52
|
+
*/
|
|
53
|
+
export declare const pollForScratchOrgInfo: (hubOrg: Org, scratchOrgInfoId: string, timeout?: Duration) => Promise<ScratchOrgInfo>;
|
|
54
|
+
/**
|
|
55
|
+
* Deploy settings to the newly created scratch org
|
|
56
|
+
*
|
|
57
|
+
* @param scratchOrg an instance of the Org class
|
|
58
|
+
* @param orgSettings an instance of the SettingsGenerator class
|
|
59
|
+
* @param apiVersion the api version (used when created the package.xml)
|
|
60
|
+
*/
|
|
61
|
+
export declare const deploySettings: (scratchOrg: Org, orgSettings: SettingsGenerator, apiVersion: string) => Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param scratchOrgAuthInfo an AuthInfo class from the scratch org
|
|
65
|
+
* @returns AuthInfo
|
|
66
|
+
*/
|
|
67
|
+
export declare const resolveUrl: (scratchOrgAuthInfo: AuthInfo) => Promise<AuthInfo>;
|
|
68
|
+
export declare const updateRevisionCounterToZero: (scratchOrg: Org) => Promise<void>;
|