@salesforce/core 3.32.5 → 3.32.6
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/lib/org/authInfo.d.ts
CHANGED
|
@@ -86,8 +86,7 @@ export declare type ConnectionOptions = AuthFields & {
|
|
|
86
86
|
};
|
|
87
87
|
export declare const DEFAULT_CONNECTED_APP_INFO: {
|
|
88
88
|
clientId: string;
|
|
89
|
-
|
|
90
|
-
legacyClientSecret: string;
|
|
89
|
+
clientSecret: string;
|
|
91
90
|
};
|
|
92
91
|
/**
|
|
93
92
|
* Handles persistence and fetching of user authentication information using
|
package/lib/org/authInfo.js
CHANGED
|
@@ -55,15 +55,7 @@ function parseIdUrl(idUrl) {
|
|
|
55
55
|
}
|
|
56
56
|
exports.DEFAULT_CONNECTED_APP_INFO = {
|
|
57
57
|
clientId: 'PlatformCLI',
|
|
58
|
-
|
|
59
|
-
// creates new AuthInfos. Currently that is the auth:* commands which
|
|
60
|
-
// aren't owned by this core library. These values need to be here
|
|
61
|
-
// for any old auth files where the id and secret aren't stored.
|
|
62
|
-
//
|
|
63
|
-
// Ideally, this would be removed at some point in the distant future
|
|
64
|
-
// when all auth files now have the clientId stored in it.
|
|
65
|
-
legacyClientId: 'SalesforceDevelopmentExperience',
|
|
66
|
-
legacyClientSecret: '1384510088588713504',
|
|
58
|
+
clientSecret: '',
|
|
67
59
|
};
|
|
68
60
|
/**
|
|
69
61
|
* Handles persistence and fetching of user authentication information using
|
|
@@ -398,7 +390,7 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
398
390
|
return opts;
|
|
399
391
|
}
|
|
400
392
|
getClientId() {
|
|
401
|
-
return this.getFields()?.clientId ?? exports.DEFAULT_CONNECTED_APP_INFO.
|
|
393
|
+
return this.getFields()?.clientId ?? exports.DEFAULT_CONNECTED_APP_INFO.clientId;
|
|
402
394
|
}
|
|
403
395
|
getRedirectUri() {
|
|
404
396
|
return 'http://localhost:1717/OauthRedirect';
|
|
@@ -729,8 +721,8 @@ class AuthInfo extends kit_1.AsyncOptionalCreatable {
|
|
|
729
721
|
// Ideally, this would be removed at some point in the distant future when all auth files
|
|
730
722
|
// now have the clientId stored in it.
|
|
731
723
|
if (!options.clientId) {
|
|
732
|
-
options.clientId = exports.DEFAULT_CONNECTED_APP_INFO.
|
|
733
|
-
options.clientSecret = exports.DEFAULT_CONNECTED_APP_INFO.
|
|
724
|
+
options.clientId = exports.DEFAULT_CONNECTED_APP_INFO.clientId;
|
|
725
|
+
options.clientSecret = exports.DEFAULT_CONNECTED_APP_INFO.clientSecret;
|
|
734
726
|
}
|
|
735
727
|
if (!options.redirectUri) {
|
|
736
728
|
options.redirectUri = this.getRedirectUri();
|
|
@@ -15,11 +15,7 @@ const webOAuthServer_1 = require("../webOAuthServer");
|
|
|
15
15
|
const messages_1 = require("../messages");
|
|
16
16
|
const sfError_1 = require("../sfError");
|
|
17
17
|
const scratchOrgFeatureDeprecation_1 = require("./scratchOrgFeatureDeprecation");
|
|
18
|
-
const
|
|
19
|
-
clientId: 'PlatformCLI',
|
|
20
|
-
legacyClientId: 'SalesforceDevelopmentExperience',
|
|
21
|
-
legacyClientSecret: '1384510088588713504',
|
|
22
|
-
};
|
|
18
|
+
const authInfo_1 = require("./authInfo");
|
|
23
19
|
messages_1.Messages.importMessagesDirectory(__dirname);
|
|
24
20
|
const messages = messages_1.Messages.loadMessages('@salesforce/core', 'scratchOrgInfoGenerator');
|
|
25
21
|
const SNAPSHOT_UNSUPPORTED_OPTIONS = [
|
|
@@ -156,7 +152,7 @@ const generateScratchOrgInfo = async ({ hubOrg, scratchOrgInfoPayload, nonamespa
|
|
|
156
152
|
// Use the Hub org's client ID value, if one wasn't provided to us, or the default
|
|
157
153
|
if (!scratchOrgInfoPayload.connectedAppConsumerKey) {
|
|
158
154
|
scratchOrgInfoPayload.connectedAppConsumerKey =
|
|
159
|
-
hubOrg.getConnection().getAuthInfoFields().clientId ??
|
|
155
|
+
hubOrg.getConnection().getAuthInfoFields().clientId ?? authInfo_1.DEFAULT_CONNECTED_APP_INFO.clientId;
|
|
160
156
|
}
|
|
161
157
|
if (!nonamespace && sfProject?.get('namespace')) {
|
|
162
158
|
scratchOrgInfoPayload.namespace = sfProject.get('namespace');
|