File tree 1 file changed +4
-2
lines changed
packages/@sanity/cli/src/actions/init-project
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import path from 'node:path'
4
4
5
5
import { type DatasetAclMode , type SanityProject } from '@sanity/client'
6
6
import { type Framework } from '@vercel/frameworks'
7
+ import { type detectFrameworkRecord } from '@vercel/fs-detectors'
7
8
import dotenv from 'dotenv'
8
9
import execa , { type CommonOptions } from 'execa'
9
10
import { deburr , noop } from 'lodash'
@@ -112,7 +113,9 @@ export interface ProjectOrganization {
112
113
// eslint-disable-next-line max-statements, complexity
113
114
export default async function initSanity (
114
115
args : CliCommandArguments < InitFlags > ,
115
- context : CliCommandContext & { detectedFramework : Framework | null } ,
116
+ context : CliCommandContext & {
117
+ detectedFramework : Awaited < ReturnType < typeof detectFrameworkRecord > >
118
+ } ,
116
119
) : Promise < void > {
117
120
const {
118
121
output,
@@ -336,7 +339,6 @@ export default async function initSanity(
336
339
const isUsingReact19 = semver . coerce ( reactVersion ) ?. major === 19
337
340
if (
338
341
detectedFramework ?. slug === 'nextjs' &&
339
- // @ts -expect-error - Detected version is not typed into Framework interface
340
342
detectedFramework ?. detectedVersion ?. startsWith ( '15' ) &&
341
343
isUsingReact19
342
344
) {
You can’t perform that action at this time.
0 commit comments