@salesforce/core 7.3.4 → 7.3.5
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.
|
@@ -7,7 +7,7 @@ export type ScratchOrgInfoPayload = {
|
|
|
7
7
|
package2AncestorIds: string;
|
|
8
8
|
features: string | string[];
|
|
9
9
|
connectedAppConsumerKey: string;
|
|
10
|
-
namespace
|
|
10
|
+
namespace?: string;
|
|
11
11
|
connectedAppCallbackUrl: string;
|
|
12
12
|
durationDays: number;
|
|
13
13
|
} & PartialScratchOrgInfo;
|
|
@@ -143,12 +143,14 @@ const generateScratchOrgInfo = async ({ hubOrg, scratchOrgInfoPayload, nonamespa
|
|
|
143
143
|
catch (e) {
|
|
144
144
|
// project is not required
|
|
145
145
|
}
|
|
146
|
+
const { namespace: originalNamespace, ...payload } = scratchOrgInfoPayload;
|
|
147
|
+
const namespace = originalNamespace ?? sfProject?.get('namespace');
|
|
146
148
|
return {
|
|
147
|
-
...
|
|
149
|
+
...payload,
|
|
148
150
|
orgName: scratchOrgInfoPayload.orgName ?? 'Company',
|
|
149
151
|
// we already have the info, and want to get rid of configApi, so this doesn't use that
|
|
150
152
|
connectedAppCallbackUrl: `http://localhost:${await webOAuthServer_1.WebOAuthServer.determineOauthPort()}/OauthRedirect`,
|
|
151
|
-
...(!nonamespace &&
|
|
153
|
+
...(!nonamespace && namespace ? { namespace } : {}),
|
|
152
154
|
// Use the Hub org's client ID value, if one wasn't provided to us, or the default
|
|
153
155
|
connectedAppConsumerKey: scratchOrgInfoPayload.connectedAppConsumerKey ??
|
|
154
156
|
hubOrg.getConnection().getAuthInfoFields().clientId ??
|