diff --git a/packages/contentstack-bootstrap/src/bootstrap/interactive.ts b/packages/contentstack-bootstrap/src/bootstrap/interactive.ts index e9a0d75ac5..88e605d35d 100644 --- a/packages/contentstack-bootstrap/src/bootstrap/interactive.ts +++ b/packages/contentstack-bootstrap/src/bootstrap/interactive.ts @@ -101,12 +101,12 @@ export async function inquireLivePreviewSupport() { } export async function continueBootstrapCommand() { - const {shouldContinue} = await inquirer.prompt({ + const { shouldContinue } = await inquirer.prompt({ type: 'list', name: 'shouldContinue', message: `Do you still want to complete the bootstrap command with Live Preview Disabled?`, choices: ['yes', 'no'], loop: false, - }) + }); return shouldContinue; } \ No newline at end of file diff --git a/packages/contentstack-bootstrap/src/bootstrap/utils.ts b/packages/contentstack-bootstrap/src/bootstrap/utils.ts index 3c15fa8bb3..c83fe7809b 100644 --- a/packages/contentstack-bootstrap/src/bootstrap/utils.ts +++ b/packages/contentstack-bootstrap/src/bootstrap/utils.ts @@ -141,10 +141,10 @@ const envFileHandler = async ( let customHost; let previewHost: string; const regionName = region && region.name && region.name.toLowerCase(); - previewHost = region.cda?.substring('8').replace('cdn', 'rest-preview'); + previewHost = region.cda?.substring(8).replace('cdn', 'rest-preview'); const isUSRegion = regionName === 'us' || regionName === 'na'; if (regionName !== 'eu' && !isUSRegion) { - customHost = region.cda && region.cda.substring('8'); + customHost = region.cda && region.cda.substring(8); customHost = customHost.replace('cdn', 'rest-preview'); } const production = environmentVariables.environment === 'production' ? true : false; @@ -195,7 +195,9 @@ const envFileHandler = async ( customHost ?? previewHost }\n` : '\n' - }CONTENTSTACK_APP_HOST=''\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`; + }CONTENTSTACK_APP_HOST=''\nCONTENTSTACK_ENVIRONMENT=${ + environmentVariables.environment + }\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`; result = await writeEnvFile(content, filePath); break; case 'angular':