From 447b070d02badbe488f20c961b8db79ac6e9aef9 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 22 Nov 2023 11:17:37 -0600 Subject: [PATCH] feat: set some known props during scratch org creation --- src/org/scratchOrgInfoApi.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/scratchOrgInfoApi.ts b/src/org/scratchOrgInfoApi.ts index c8fdfe893c..57b46d7855 100644 --- a/src/org/scratchOrgInfoApi.ts +++ b/src/org/scratchOrgInfoApi.ts @@ -232,7 +232,11 @@ export const authorizeScratchOrg = async (options: { clientId: scratchOrgInfoComplete.ConnectedAppConsumerKey, createdOrgInstance: scratchOrgInfoComplete.SignupInstance, isDevHub: false, - snapshot: scratchOrgInfoComplete.Snapshot, + isScratch: true, + isSandbox: false, + // omit optional fields unless they are present + ...(scratchOrgInfoComplete.Namespace ? { namespacePrefix: scratchOrgInfoComplete.Namespace } : {}), + ...(scratchOrgInfoComplete.Snapshot ? { snapshot: scratchOrgInfoComplete.Snapshot } : {}), }); return authInfo;