@sanity/cli-test 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -169,6 +169,7 @@ export declare type FixtureName =
169
169
  | "basic-app"
170
170
  | "basic-functions"
171
171
  | "basic-studio"
172
+ | "federated-studio"
172
173
  | "graphql-studio"
173
174
  | "multi-workspace-studio"
174
175
  | "nextjs-app"
@@ -9,6 +9,7 @@
9
9
  'basic-app': {},
10
10
  'basic-functions': {},
11
11
  'basic-studio': {},
12
+ 'federated-studio': {},
12
13
  'graphql-studio': {},
13
14
  'multi-workspace-studio': {},
14
15
  'nextjs-app': {},
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test/constants.ts"],"sourcesContent":["/**\n * Options for each fixture.\n * @public\n */\nexport interface FixtureOptions {\n includeDist?: boolean\n}\n\n/**\n * Default fixtures bundled with the package and their options.\n *\n * @public\n */\nexport const DEFAULT_FIXTURES: Record<FixtureName, FixtureOptions> = {\n 'basic-app': {},\n 'basic-functions': {},\n 'basic-studio': {},\n 'graphql-studio': {},\n 'multi-workspace-studio': {},\n 'nextjs-app': {},\n 'prebuilt-app': {includeDist: true},\n 'prebuilt-studio': {includeDist: true},\n 'worst-case-studio': {},\n} as const\n\n/**\n * Valid fixture name type.\n * @public\n */\nexport type FixtureName =\n | 'basic-app'\n | 'basic-functions'\n | 'basic-studio'\n | 'graphql-studio'\n | 'multi-workspace-studio'\n | 'nextjs-app'\n | 'prebuilt-app'\n | 'prebuilt-studio'\n | 'worst-case-studio'\n\n/**\n * @deprecated Use {@link FixtureName} instead. This type alias will be removed in a future release.\n * @public\n */\nexport type ExampleName = FixtureName\n"],"names":["DEFAULT_FIXTURES","includeDist"],"mappings":"AAAA;;;CAGC,GAKD;;;;CAIC,GACD,OAAO,MAAMA,mBAAwD;IACnE,aAAa,CAAC;IACd,mBAAmB,CAAC;IACpB,gBAAgB,CAAC;IACjB,kBAAkB,CAAC;IACnB,0BAA0B,CAAC;IAC3B,cAAc,CAAC;IACf,gBAAgB;QAACC,aAAa;IAAI;IAClC,mBAAmB;QAACA,aAAa;IAAI;IACrC,qBAAqB,CAAC;AACxB,EAAU"}
1
+ {"version":3,"sources":["../../src/test/constants.ts"],"sourcesContent":["/**\n * Options for each fixture.\n * @public\n */\nexport interface FixtureOptions {\n includeDist?: boolean\n}\n\n/**\n * Default fixtures bundled with the package and their options.\n *\n * @public\n */\nexport const DEFAULT_FIXTURES: Record<FixtureName, FixtureOptions> = {\n 'basic-app': {},\n 'basic-functions': {},\n 'basic-studio': {},\n 'federated-studio': {},\n 'graphql-studio': {},\n 'multi-workspace-studio': {},\n 'nextjs-app': {},\n 'prebuilt-app': {includeDist: true},\n 'prebuilt-studio': {includeDist: true},\n 'worst-case-studio': {},\n} as const\n\n/**\n * Valid fixture name type.\n * @public\n */\nexport type FixtureName =\n | 'basic-app'\n | 'basic-functions'\n | 'basic-studio'\n | 'federated-studio'\n | 'graphql-studio'\n | 'multi-workspace-studio'\n | 'nextjs-app'\n | 'prebuilt-app'\n | 'prebuilt-studio'\n | 'worst-case-studio'\n\n/**\n * @deprecated Use {@link FixtureName} instead. This type alias will be removed in a future release.\n * @public\n */\nexport type ExampleName = FixtureName\n"],"names":["DEFAULT_FIXTURES","includeDist"],"mappings":"AAAA;;;CAGC,GAKD;;;;CAIC,GACD,OAAO,MAAMA,mBAAwD;IACnE,aAAa,CAAC;IACd,mBAAmB,CAAC;IACpB,gBAAgB,CAAC;IACjB,oBAAoB,CAAC;IACrB,kBAAkB,CAAC;IACnB,0BAA0B,CAAC;IAC3B,cAAc,CAAC;IACf,gBAAgB;QAACC,aAAa;IAAI;IAClC,mBAAmB;QAACA,aAAa;IAAI;IACrC,qBAAqB,CAAC;AACxB,EAAU"}
@@ -41,7 +41,7 @@ let buildContexts = [];
41
41
  packages: 'external',
42
42
  platform: 'node',
43
43
  sourcemap: false,
44
- target: 'node20'
44
+ target: 'node22'
45
45
  };
46
46
  }
47
47
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vitestWorker.ts"],"sourcesContent":["/**\n * Vitest worker setup for the Sanity CLI.\n *\n * This builds the worker TS files into JS files using esbuild bundling.\n * All internal dependencies are bundled inline, while npm packages remain external.\n */\nimport {unlink} from 'node:fs/promises'\n\nimport {build, type BuildContext, type BuildOptions, context} from 'esbuild'\n\nconst compiledFiles: Set<string> = new Set()\nlet buildContexts: BuildContext[] = []\n\n/**\n * Generate esbuild configuration for bundling worker files.\n *\n * @param filePath - The worker file path to bundle\n * @param outputFile - The output file path for the bundled worker\n * @returns esbuild configuration object\n */\nfunction esbuildOptions(filePath: string, outputFile: string): BuildOptions {\n return {\n bundle: true,\n conditions: ['node', 'import'],\n entryPoints: [filePath],\n // Marks cli-core as external to avoid bundling it inline\n // this is mostly necessary for the monorepo.\n external: ['@sanity/cli-core'],\n format: 'esm',\n loader: {'.json': 'json'},\n logLevel: 'warning',\n mainFields: ['module', 'main'],\n outfile: outputFile,\n packages: 'external',\n platform: 'node',\n sourcemap: false,\n target: 'node20',\n }\n}\n\n/**\n * Bundle a single worker file with esbuild.\n *\n * @param filePath - The worker file path to bundle\n * @param external - Array of package names to keep external\n * @returns The output file path\n */\nasync function bundleWorkerFile(filePath: string): Promise<string> {\n const outputFile = filePath.replace(/\\.ts$/, '.js')\n\n await build(esbuildOptions(filePath, outputFile))\n\n compiledFiles.add(outputFile)\n return outputFile\n}\n\n/**\n * Bundle all worker files with esbuild (non-watch mode).\n *\n * @param filePaths - Array of worker file paths to bundle\n */\nasync function setupBundling(filePaths: string[]) {\n console.log(`Found ${filePaths.length} worker files to bundle`)\n\n for (const workerFile of filePaths) {\n try {\n await bundleWorkerFile(workerFile)\n console.log(`✓ Bundled ${workerFile}`)\n } catch (error) {\n console.error(`✗ Failed to bundle ${workerFile}:`, error)\n throw error\n }\n }\n}\n\n/**\n * Set up watch mode for worker files using esbuild's native watch API.\n *\n * @param files - Array of worker file paths to watch\n */\nasync function setupWatchMode(files: string[]) {\n for (const filePath of files) {\n const outputFile = filePath.replace(/\\.ts$/, '.js')\n\n const ctx = await context(esbuildOptions(filePath, outputFile))\n\n await ctx.watch()\n buildContexts.push(ctx)\n compiledFiles.add(outputFile)\n\n console.log(`👀 Watching ${filePath}`)\n }\n}\n\n/**\n * Setup function to build the worker files with esbuild.\n *\n * Bundles the worker files with esbuild and sets up watch mode if in watch mode.\n * All npm packages are automatically marked as external (loaded from node_modules at runtime).\n * Only internal project code is bundled inline.\n *\n * @public\n *\n * @param filePaths - The paths to the worker files to build\n * @returns A promise that resolves when the worker build is setup\n * @throws If the worker files cannot be bundled\n * @throws If the watcher cannot be set up\n */\nexport async function setupWorkerBuild(filePaths: string[]) {\n const isWatchMode =\n (process.env.VITEST_WATCH === 'true' || !process.argv.includes('run')) &&\n process.env.CI !== 'true'\n\n await (isWatchMode ? setupWatchMode(filePaths) : setupBundling(filePaths))\n}\n\n/**\n * Teardown function to clean up the worker build.\n *\n * Closes all build contexts and deletes the compiled JavaScript files.\n *\n * @public\n *\n * @returns A promise that resolves when the worker build is teared down\n * @throws If the build contexts cannot be disposed\n * @throws If the compiled JavaScript files cannot be deleted\n */\nexport async function teardownWorkerBuild(): Promise<void> {\n // Dispose all build contexts (for watch mode)\n for (const ctx of buildContexts) {\n await ctx.dispose()\n }\n buildContexts = []\n\n // Clean up compiled JavaScript files\n console.log('Cleaning up compiled JavaScript files...')\n for (const filePath of compiledFiles) {\n try {\n await unlink(filePath)\n console.log(`✓ Deleted ${filePath}`)\n } catch (error) {\n console.error(`Failed to delete ${filePath}:`, error)\n }\n }\n compiledFiles.clear()\n}\n"],"names":["unlink","build","context","compiledFiles","Set","buildContexts","esbuildOptions","filePath","outputFile","bundle","conditions","entryPoints","external","format","loader","logLevel","mainFields","outfile","packages","platform","sourcemap","target","bundleWorkerFile","replace","add","setupBundling","filePaths","console","log","length","workerFile","error","setupWatchMode","files","ctx","watch","push","setupWorkerBuild","isWatchMode","process","env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AO,CAAC,SAAS;QAE7C,MAAMW,MAAM,MAAMhC,QAAQI,eAAeC,UAAUC;QAEnD,MAAM0B,IAAIC,KAAK;QACf9B,cAAc+B,IAAI,CAACF;QACnB/B,cAAcqB,GAAG,CAAChB;QAElBmB,QAAQC,GAAG,CAAC,CAAC,YAAY,EAAErB,UAAU;IACvC;AACF;AAEA;;;;;;;;;;;;;CAaC,GACD,OAAO,eAAe8B,iBAAiBX,SAAmB;IACxD,MAAMY,cACJ,AAACC,CAAAA,QAAQC,GAAG,CAACC,YAAY,KAAK,UAAU,CAACF,QAAQG,IAAI,CAACC,QAAQ,CAAC,MAAK,KACpEJ,QAAQC,GAAG,CAACI,EAAE,KAAK;IAErB,MAAON,CAAAA,cAAcN,eAAeN,aAAaD,cAAcC,UAAS;AAC1E;AAEA;;;;;;;;;;CAUC,GACD,OAAO,eAAemB;IACpB,8CAA8C;IAC9C,KAAK,MAAMX,OAAO7B,cAAe;QAC/B,MAAM6B,IAAIY,OAAO;IACnB;IACAzC,gBAAgB,EAAE;IAElB,qCAAqC;IACrCsB,QAAQC,GAAG,CAAC;IACZ,KAAK,MAAMrB,YAAYJ,cAAe;QACpC,IAAI;YACF,MAAMH,OAAOO;YACboB,QAAQC,GAAG,CAAC,CAAC,UAAU,EAAErB,UAAU;QACrC,EAAE,OAAOwB,OAAO;YACdJ,QAAQI,KAAK,CAAC,CAAC,iBAAiB,EAAExB,SAAS,CAAC,CAAC,EAAEwB;QACjD;IACF;IACA5B,cAAc4C,KAAK;AACrB"}
1
+ {"version":3,"sources":["../src/vitestWorker.ts"],"sourcesContent":["/**\n * Vitest worker setup for the Sanity CLI.\n *\n * This builds the worker TS files into JS files using esbuild bundling.\n * All internal dependencies are bundled inline, while npm packages remain external.\n */\nimport {unlink} from 'node:fs/promises'\n\nimport {build, type BuildContext, type BuildOptions, context} from 'esbuild'\n\nconst compiledFiles: Set<string> = new Set()\nlet buildContexts: BuildContext[] = []\n\n/**\n * Generate esbuild configuration for bundling worker files.\n *\n * @param filePath - The worker file path to bundle\n * @param outputFile - The output file path for the bundled worker\n * @returns esbuild configuration object\n */\nfunction esbuildOptions(filePath: string, outputFile: string): BuildOptions {\n return {\n bundle: true,\n conditions: ['node', 'import'],\n entryPoints: [filePath],\n // Marks cli-core as external to avoid bundling it inline\n // this is mostly necessary for the monorepo.\n external: ['@sanity/cli-core'],\n format: 'esm',\n loader: {'.json': 'json'},\n logLevel: 'warning',\n mainFields: ['module', 'main'],\n outfile: outputFile,\n packages: 'external',\n platform: 'node',\n sourcemap: false,\n target: 'node22',\n }\n}\n\n/**\n * Bundle a single worker file with esbuild.\n *\n * @param filePath - The worker file path to bundle\n * @param external - Array of package names to keep external\n * @returns The output file path\n */\nasync function bundleWorkerFile(filePath: string): Promise<string> {\n const outputFile = filePath.replace(/\\.ts$/, '.js')\n\n await build(esbuildOptions(filePath, outputFile))\n\n compiledFiles.add(outputFile)\n return outputFile\n}\n\n/**\n * Bundle all worker files with esbuild (non-watch mode).\n *\n * @param filePaths - Array of worker file paths to bundle\n */\nasync function setupBundling(filePaths: string[]) {\n console.log(`Found ${filePaths.length} worker files to bundle`)\n\n for (const workerFile of filePaths) {\n try {\n await bundleWorkerFile(workerFile)\n console.log(`✓ Bundled ${workerFile}`)\n } catch (error) {\n console.error(`✗ Failed to bundle ${workerFile}:`, error)\n throw error\n }\n }\n}\n\n/**\n * Set up watch mode for worker files using esbuild's native watch API.\n *\n * @param files - Array of worker file paths to watch\n */\nasync function setupWatchMode(files: string[]) {\n for (const filePath of files) {\n const outputFile = filePath.replace(/\\.ts$/, '.js')\n\n const ctx = await context(esbuildOptions(filePath, outputFile))\n\n await ctx.watch()\n buildContexts.push(ctx)\n compiledFiles.add(outputFile)\n\n console.log(`👀 Watching ${filePath}`)\n }\n}\n\n/**\n * Setup function to build the worker files with esbuild.\n *\n * Bundles the worker files with esbuild and sets up watch mode if in watch mode.\n * All npm packages are automatically marked as external (loaded from node_modules at runtime).\n * Only internal project code is bundled inline.\n *\n * @public\n *\n * @param filePaths - The paths to the worker files to build\n * @returns A promise that resolves when the worker build is setup\n * @throws If the worker files cannot be bundled\n * @throws If the watcher cannot be set up\n */\nexport async function setupWorkerBuild(filePaths: string[]) {\n const isWatchMode =\n (process.env.VITEST_WATCH === 'true' || !process.argv.includes('run')) &&\n process.env.CI !== 'true'\n\n await (isWatchMode ? setupWatchMode(filePaths) : setupBundling(filePaths))\n}\n\n/**\n * Teardown function to clean up the worker build.\n *\n * Closes all build contexts and deletes the compiled JavaScript files.\n *\n * @public\n *\n * @returns A promise that resolves when the worker build is teared down\n * @throws If the build contexts cannot be disposed\n * @throws If the compiled JavaScript files cannot be deleted\n */\nexport async function teardownWorkerBuild(): Promise<void> {\n // Dispose all build contexts (for watch mode)\n for (const ctx of buildContexts) {\n await ctx.dispose()\n }\n buildContexts = []\n\n // Clean up compiled JavaScript files\n console.log('Cleaning up compiled JavaScript files...')\n for (const filePath of compiledFiles) {\n try {\n await unlink(filePath)\n console.log(`✓ Deleted ${filePath}`)\n } catch (error) {\n console.error(`Failed to delete ${filePath}:`, error)\n }\n }\n compiledFiles.clear()\n}\n"],"names":["unlink","build","context","compiledFiles","Set","buildContexts","esbuildOptions","filePath","outputFile","bundle","conditions","entryPoints","external","format","loader","logLevel","mainFields","outfile","packages","platform","sourcemap","target","bundleWorkerFile","replace","add","setupBundling","filePaths","console","log","length","workerFile","error","setupWatchMode","files","ctx","watch","push","setupWorkerBuild","isWatchMode","process","env","VITEST_WATCH","argv","includes","CI","teardownWorkerBuild","dispose","clear"],"mappings":"AAAA;;;;;CAKC,GACD,SAAQA,MAAM,QAAO,mBAAkB;AAEvC,SAAQC,KAAK,EAAwCC,OAAO,QAAO,UAAS;AAE5E,MAAMC,gBAA6B,IAAIC;AACvC,IAAIC,gBAAgC,EAAE;AAEtC;;;;;;CAMC,GACD,SAASC,eAAeC,QAAgB,EAAEC,UAAkB;IAC1D,OAAO;QACLC,QAAQ;QACRC,YAAY;YAAC;YAAQ;SAAS;QAC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C,YAAY,KAAK,UAAU,CAACF,QAAQG,IAAI,CAACC,QAAQ,CAAC,MAAK,KACpEJ,QAAQC,GAAG,CAACI,EAAE,KAAK;IAErB,MAAON,CAAAA,cAAcN,eAAeN,aAAaD,cAAcC,UAAS;AAC1E;AAEA;;;;;;;;;;CAUC,GACD,OAAO,eAAemB;IACpB,8CAA8C;IAC9C,KAAK,MAAMX,OAAO7B,cAAe;QAC/B,MAAM6B,IAAIY,OAAO;IACnB;IACAzC,gBAAgB,EAAE;IAElB,qCAAqC;IACrCsB,QAAQC,GAAG,CAAC;IACZ,KAAK,MAAMrB,YAAYJ,cAAe;QACpC,IAAI;YACF,MAAMH,OAAOO;YACboB,QAAQC,GAAG,CAAC,CAAC,UAAU,EAAErB,UAAU;QACrC,EAAE,OAAOwB,OAAO;YACdJ,QAAQI,KAAK,CAAC,CAAC,iBAAiB,EAAExB,SAAS,CAAC,CAAC,EAAEwB;QACjD;IACF;IACA5B,cAAc4C,KAAK;AACrB"}
@@ -12,11 +12,11 @@
12
12
  "start": "sanity start"
13
13
  },
14
14
  "dependencies": {
15
- "@sanity/sdk": "^2.8.0",
16
- "@sanity/sdk-react": "^2.8.0",
15
+ "@sanity/sdk": "^2.13.0",
16
+ "@sanity/sdk-react": "^2.13.0",
17
17
  "react": "^19.2.5",
18
18
  "react-dom": "^19.2.5",
19
- "sanity": "^5.30.0"
19
+ "sanity": "^6.1.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^19.2.14",
@@ -5,10 +5,10 @@
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@sanity/blueprints": "^0.15.2",
8
+ "@sanity/blueprints": "^0.20.1",
9
9
  "@sanity/functions": "^1.3.1"
10
10
  },
11
11
  "devDependencies": {
12
- "sanity": "^5.30.0"
12
+ "sanity": "^6.1.0"
13
13
  }
14
14
  }
@@ -15,10 +15,10 @@
15
15
  "start": "sanity start"
16
16
  },
17
17
  "dependencies": {
18
- "@sanity/vision": "^5.30.0",
18
+ "@sanity/vision": "^6.1.0",
19
19
  "react": "^19.2.5",
20
20
  "react-dom": "^19.2.5",
21
- "sanity": "^5.30.0",
21
+ "sanity": "^6.1.0",
22
22
  "styled-components": "^6.4.0"
23
23
  },
24
24
  "devDependencies": {
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "federated-studio",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "keywords": [
6
+ "sanity"
7
+ ],
8
+ "license": "MIT",
9
+ "type": "module",
10
+ "scripts": {
11
+ "dev": "sanity dev",
12
+ "build:fixture": "sanity build"
13
+ },
14
+ "dependencies": {
15
+ "@sanity/federation": "0.1.0-alpha.10",
16
+ "react": "^19.2.5",
17
+ "react-dom": "^19.2.5",
18
+ "sanity": "workbench",
19
+ "styled-components": "^6.4.0"
20
+ },
21
+ "devDependencies": {
22
+ "@types/react": "^19.2.14",
23
+ "typescript": "^5.9.3"
24
+ }
25
+ }
@@ -0,0 +1,18 @@
1
+ import {unstable_defineApp} from '@sanity/federation'
2
+ import {defineCliConfig} from 'sanity/cli'
3
+
4
+ export default defineCliConfig({
5
+ api: {
6
+ dataset: 'test',
7
+ projectId: 'ppsg7ml5',
8
+ },
9
+ // Calling `unstable_defineApp` opts this studio into workbench (a
10
+ // `sanity.config.ts` is present, so it resolves to `applicationType: 'studio'`).
11
+ app: unstable_defineApp({
12
+ name: 'federated-studio',
13
+ organizationId: 'oSyH1iET5',
14
+ }),
15
+ deployment: {
16
+ autoUpdates: true,
17
+ },
18
+ })
@@ -0,0 +1,17 @@
1
+ import {defineConfig} from 'sanity'
2
+ import {structureTool} from 'sanity/structure'
3
+
4
+ import {schemaTypes} from './schemaTypes'
5
+
6
+ export default defineConfig({
7
+ title: 'Federated Studio',
8
+
9
+ dataset: 'test',
10
+ projectId: 'ppsg7ml5',
11
+
12
+ plugins: [structureTool()],
13
+
14
+ schema: {
15
+ types: schemaTypes,
16
+ },
17
+ })
@@ -0,0 +1 @@
1
+ export const schemaTypes = []
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "skipLibCheck": true,
6
+ "strict": true,
7
+ "forceConsistentCasingInFileNames": true,
8
+ "module": "Preserve",
9
+ "moduleDetection": "force",
10
+ "isolatedModules": true,
11
+ "jsx": "preserve",
12
+ "incremental": true
13
+ },
14
+ "include": ["**/*.ts", "**/*.tsx"],
15
+ "exclude": ["node_modules"]
16
+ }
@@ -12,10 +12,10 @@
12
12
  "deploy-graphql": "sanity graphql deploy"
13
13
  },
14
14
  "dependencies": {
15
- "@sanity/vision": "^5.30.0",
15
+ "@sanity/vision": "^6.1.0",
16
16
  "react": "^19.2.5",
17
17
  "react-dom": "^19.2.5",
18
- "sanity": "^5.30.0",
18
+ "sanity": "^6.1.0",
19
19
  "styled-components": "^6.4.0"
20
20
  },
21
21
  "devDependencies": {
@@ -15,10 +15,10 @@
15
15
  "start": "sanity start"
16
16
  },
17
17
  "dependencies": {
18
- "@sanity/vision": "^5.30.0",
18
+ "@sanity/vision": "^6.1.0",
19
19
  "react": "^19.2.5",
20
20
  "react-dom": "^19.2.5",
21
- "sanity": "^5.30.0",
21
+ "sanity": "^6.1.0",
22
22
  "styled-components": "^6.4.0"
23
23
  },
24
24
  "devDependencies": {
@@ -12,11 +12,11 @@
12
12
  "preview": "sanity preview"
13
13
  },
14
14
  "dependencies": {
15
- "@sanity/sdk": "^2.8.0",
16
- "@sanity/sdk-react": "^2.8.0",
15
+ "@sanity/sdk": "^2.13.0",
16
+ "@sanity/sdk-react": "^2.13.0",
17
17
  "react": "^19.2.5",
18
18
  "react-dom": "^19.2.5",
19
- "sanity": "^5.30.0"
19
+ "sanity": "^6.1.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^19.2.14",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "react": "^19.2.5",
17
17
  "react-dom": "^19.2.5",
18
- "sanity": "^5.30.0",
18
+ "sanity": "^6.1.0",
19
19
  "styled-components": "^6.4.0"
20
20
  },
21
21
  "devDependencies": {
@@ -15,12 +15,12 @@
15
15
  "start": "sanity start"
16
16
  },
17
17
  "dependencies": {
18
- "@sanity/code-input": "^7.1.0",
19
- "@sanity/vision": "^5.30.0",
18
+ "@sanity/code-input": "^7.1.2",
19
+ "@sanity/vision": "^6.1.0",
20
20
  "react": "^19.2.5",
21
21
  "react-dom": "^19.2.5",
22
- "sanity": "^5.30.0",
23
- "sanity-plugin-media": "^4.1.1",
22
+ "sanity": "^6.1.0",
23
+ "sanity-plugin-media": "^4.3.1",
24
24
  "styled-components": "^6.4.0",
25
25
  "vite-tsconfig-paths": "^6.1.1"
26
26
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli-test",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "Sanity CLI test helpers and utilities",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,27 +43,27 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@swc/core": "^1.15.40",
46
+ "@swc/core": "^1.15.41",
47
47
  "ansis": "^4.2.0",
48
48
  "esbuild": "^0.28.0",
49
49
  "nock": "^14.0.15",
50
50
  "ora": "^9.0.0",
51
51
  "tinyglobby": "^0.2.17",
52
- "@sanity/cli-core": "2.0.1"
52
+ "@sanity/cli-core": "2.1.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@eslint/compat": "^2.1.0",
56
56
  "@oclif/core": "^4.11.4",
57
- "@sanity/client": "^7.22.1",
58
- "@sanity/pkg-utils": "^10.5.2",
57
+ "@sanity/client": "^7.23.0",
58
+ "@sanity/pkg-utils": "^10.5.8",
59
59
  "@swc/cli": "^0.8.1",
60
- "@types/node": "^20.19.41",
60
+ "@types/node": "^22.20.0",
61
61
  "eslint": "^10.4.1",
62
62
  "publint": "^0.3.21",
63
63
  "rimraf": "^6.0.1",
64
64
  "tsx": "^4.22.4",
65
65
  "typescript": "^5.9.3",
66
- "vitest": "^4.1.8",
66
+ "vitest": "^4.1.9",
67
67
  "yaml": "^2.9.0",
68
68
  "@repo/package.config": "0.0.1",
69
69
  "@repo/tsconfig": "3.70.0",
@@ -73,10 +73,13 @@
73
73
  "@oclif/core": "^4.0.0",
74
74
  "@sanity/client": "^7.0.0",
75
75
  "vitest": ">=3.0.0 <5.0.0",
76
- "@sanity/cli-core": "2.0.1"
76
+ "@sanity/cli-core": "2.1.0"
77
+ },
78
+ "overrides": {
79
+ "rolldown": "1.0.0"
77
80
  },
78
81
  "engines": {
79
- "node": ">=20.19.1 <22 || >=22.12"
82
+ "node": ">=22.12"
80
83
  },
81
84
  "scripts": {
82
85
  "prebuild": "pnpm run clean",