From 4649f9a4796f818b04de579036868f460aaa066c Mon Sep 17 00:00:00 2001 From: Carolina Gonzalez Date: Fri, 31 Jan 2025 11:43:44 -0500 Subject: [PATCH] fix: temporary commit to determine why cli tests are failing --- .../src/actions/init-project/initProject.ts | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/packages/@sanity/cli/src/actions/init-project/initProject.ts b/packages/@sanity/cli/src/actions/init-project/initProject.ts index 7e4f720657e..02c7528b653 100644 --- a/packages/@sanity/cli/src/actions/init-project/initProject.ts +++ b/packages/@sanity/cli/src/actions/init-project/initProject.ts @@ -49,7 +49,6 @@ import {createProject} from '../project/createProject' import {bootstrapLocalTemplate} from './bootstrapLocalTemplate' import {bootstrapRemoteTemplate} from './bootstrapRemoteTemplate' import {type GenerateConfigOptions} from './createStudioConfig' -import {determineStudioTemplate} from './determineStudioTemplate' import {absolutify, validateEmptyPath} from './fsUtils' import {tryGitInit} from './git' import {promptForDatasetName} from './promptForDatasetName' @@ -273,13 +272,6 @@ export default async function initSanity( print('') const flags = await prepareFlags() - // skip project / dataset prompting - const isStudioTemplate = cliFlags.template && determineStudioTemplate(cliFlags.template) - /* eslint-disable no-console */ - console.log('isStudioTemplate', isStudioTemplate) - /* eslint-disable no-console */ - console.log('cli flags', JSON.stringify(cliFlags)) - // We're authenticated, now lets select or create a project const {projectId, displayName, isFirstProject, datasetName, schemaUrl} = await getProjectDetails() @@ -664,15 +656,11 @@ export default async function initSanity( const isCurrentDir = outputPath === process.cwd() if (isCurrentDir) { print(`\n${chalk.green('Success!')} Now, use this command to continue:\n`) - print( - `${chalk.cyan(devCommand)} - to run ${isStudioTemplate ? 'Sanity Studio' : 'your Sanity application'}\n`, - ) + print(`${chalk.cyan(devCommand)} - to run Sanity Studio\n`) } else { print(`\n${chalk.green('Success!')} Now, use these commands to continue:\n`) print(`First: ${chalk.cyan(`cd ${outputPath}`)} - to enter project’s directory`) - print( - `Then: ${chalk.cyan(devCommand)} -to run ${isStudioTemplate ? 'Sanity Studio' : 'your Sanity application'}\n`, - ) + print(`Then: ${chalk.cyan(devCommand)} - to run Sanity Studio\n`) } print(`Other helpful commands`) @@ -733,16 +721,6 @@ export default async function initSanity( return data } - // currently coreApps don't need this information. Return dummy data for now - if (!isStudioTemplate) { - return { - projectId: '', - displayName: '', - isFirstProject: false, - datasetName: '', - } - } - debug('Prompting user to select or create a project') const project = await getOrCreateProject() debug(`Project with name ${project.displayName} selected`)