Skip to content

Commit 9654000

Browse files
committed
chore: address review concerns
1 parent e060cb3 commit 9654000

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/commands/org/create/sandbox.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,9 @@ export default class CreateSandbox extends SandboxCommandBase<SandboxProcessObje
141141
...(this.flags.clone ? { SourceSandboxName: this.flags.clone } : {}),
142142
...(!this.flags.clone && this.flags['license-type'] ? { LicenseType: this.flags['license-type'] } : {}),
143143
};
144-
const { sandboxReq } = await createSandboxRequest(
145-
!!this.flags.clone,
146-
this.flags['definition-file'],
147-
undefined,
148-
requestOptions
149-
);
144+
const { sandboxReq } = !this.flags.clone
145+
? await createSandboxRequest(false, this.flags['definition-file'], undefined, requestOptions)
146+
: await createSandboxRequest(true, this.flags['definition-file'], undefined, requestOptions);
150147
return {
151148
...sandboxReq,
152149
...(this.flags.clone ? { SourceId: await this.getSourceId() } : {}),

src/shared/sandboxRequest.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ export const generateSboxName = async (): Promise<string> => {
2020
return generated;
2121
};
2222

23+
export async function createSandboxRequest(
24+
isClone: true,
25+
definitionFile: string | undefined,
26+
logger?: Logger | undefined,
27+
properties?: Record<string, string | undefined>
28+
): Promise<{ sandboxReq: SandboxRequest; srcSandboxName: string }>;
29+
export async function createSandboxRequest(
30+
isClone: false,
31+
definitionFile: string | undefined,
32+
logger?: Logger | undefined,
33+
properties?: Record<string, string | undefined>
34+
): Promise<{ sandboxReq: SandboxRequest }>;
2335
export async function createSandboxRequest(
2436
isClone = false,
2537
definitionFile: string | undefined,

0 commit comments

Comments
 (0)