@sanity/cli 8.0.0 → 8.0.1

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.
@@ -7,7 +7,7 @@ export const sdkAppDependencies = {
7
7
  'react-dom': '^19.2.4'
8
8
  },
9
9
  devDependencies: {
10
- '@sanity/eslint-config-studio': 'latest',
10
+ '@sanity/eslint-config-studio': '^6',
11
11
  '@types/react': '^19.2.14',
12
12
  eslint: '^9.28',
13
13
  prettier: '^3.5',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/init/sdkAppDependencies.ts"],"sourcesContent":["export const sdkAppDependencies = {\n dependencies: {\n // change these to 'latest' as in studioDependencies.ts once SDK v3 is released\n '@sanity/sdk': '^2',\n '@sanity/sdk-react': '^2',\n react: '^19.2.4',\n 'react-dom': '^19.2.4',\n },\n\n devDependencies: {\n '@sanity/eslint-config-studio': 'latest',\n '@types/react': '^19.2.14',\n eslint: '^9.28',\n prettier: '^3.5',\n sanity: 'latest',\n typescript: '^5.8', // Peer dependency of eslint-config-studio (implicitly)\n },\n}\n"],"names":["sdkAppDependencies","dependencies","react","devDependencies","eslint","prettier","sanity","typescript"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB;IAChCC,cAAc;QACZ,+EAA+E;QAC/E,eAAe;QACf,qBAAqB;QACrBC,OAAO;QACP,aAAa;IACf;IAEAC,iBAAiB;QACf,gCAAgC;QAChC,gBAAgB;QAChBC,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC,YAAY;IACd;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/actions/init/sdkAppDependencies.ts"],"sourcesContent":["export const sdkAppDependencies = {\n dependencies: {\n // change these to 'latest' as in studioDependencies.ts once SDK v3 is released\n '@sanity/sdk': '^2',\n '@sanity/sdk-react': '^2',\n react: '^19.2.4',\n 'react-dom': '^19.2.4',\n },\n\n devDependencies: {\n '@sanity/eslint-config-studio': '^6',\n '@types/react': '^19.2.14',\n eslint: '^9.28',\n prettier: '^3.5',\n sanity: 'latest',\n typescript: '^5.8', // Peer dependency of eslint-config-studio (implicitly)\n },\n}\n"],"names":["sdkAppDependencies","dependencies","react","devDependencies","eslint","prettier","sanity","typescript"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB;IAChCC,cAAc;QACZ,+EAA+E;QAC/E,eAAe;QACf,qBAAqB;QACrBC,OAAO;QACP,aAAa;IACf;IAEAC,iBAAiB;QACf,gCAAgC;QAChC,gBAAgB;QAChBC,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC,YAAY;IACd;AACF,EAAC"}
@@ -12,7 +12,7 @@ export const studioDependencies = {
12
12
  },
13
13
  devDependencies: {
14
14
  // Linting/tooling
15
- '@sanity/eslint-config-studio': 'latest',
15
+ '@sanity/eslint-config-studio': '^6',
16
16
  // When using typescript, we'll want the these types too, so might as well install them
17
17
  '@types/react': '^19.2.14',
18
18
  eslint: '^9.28',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/init/studioDependencies.ts"],"sourcesContent":["export const studioDependencies = {\n // Dependencies for a default Sanity installation\n dependencies: {\n // Official studio dependencies\n sanity: 'latest',\n\n // Official studio plugin dependencies\n '@sanity/vision': 'latest',\n\n // Non-Sanity dependencies\n react: '^19.2.4',\n 'react-dom': '^19.2.4',\n 'styled-components': '^6.1.18',\n },\n\n devDependencies: {\n // Linting/tooling\n '@sanity/eslint-config-studio': 'latest',\n // When using typescript, we'll want the these types too, so might as well install them\n '@types/react': '^19.2.14',\n eslint: '^9.28',\n prettier: '^3.5',\n typescript: '^5.8', // Peer dependency of eslint-config-studio (implicitly)\n },\n}\n"],"names":["studioDependencies","dependencies","sanity","react","devDependencies","eslint","prettier","typescript"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB;IAChC,iDAAiD;IACjDC,cAAc;QACZ,+BAA+B;QAC/BC,QAAQ;QAER,sCAAsC;QACtC,kBAAkB;QAElB,0BAA0B;QAC1BC,OAAO;QACP,aAAa;QACb,qBAAqB;IACvB;IAEAC,iBAAiB;QACf,kBAAkB;QAClB,gCAAgC;QAChC,uFAAuF;QACvF,gBAAgB;QAChBC,QAAQ;QACRC,UAAU;QACVC,YAAY;IACd;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/actions/init/studioDependencies.ts"],"sourcesContent":["export const studioDependencies = {\n // Dependencies for a default Sanity installation\n dependencies: {\n // Official studio dependencies\n sanity: 'latest',\n\n // Official studio plugin dependencies\n '@sanity/vision': 'latest',\n\n // Non-Sanity dependencies\n react: '^19.2.4',\n 'react-dom': '^19.2.4',\n 'styled-components': '^6.1.18',\n },\n\n devDependencies: {\n // Linting/tooling\n '@sanity/eslint-config-studio': '^6',\n // When using typescript, we'll want the these types too, so might as well install them\n '@types/react': '^19.2.14',\n eslint: '^9.28',\n prettier: '^3.5',\n typescript: '^5.8', // Peer dependency of eslint-config-studio (implicitly)\n },\n}\n"],"names":["studioDependencies","dependencies","sanity","react","devDependencies","eslint","prettier","typescript"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB;IAChC,iDAAiD;IACjDC,cAAc;QACZ,+BAA+B;QAC/BC,QAAQ;QAER,sCAAsC;QACtC,kBAAkB;QAElB,0BAA0B;QAC1BC,OAAO;QACP,aAAa;QACb,qBAAqB;IACvB;IAEAC,iBAAiB;QACf,kBAAkB;QAClB,gCAAgC;QAChC,uFAAuF;QACvF,gBAAgB;QAChBC,QAAQ;QACRC,UAAU;QACVC,YAAY;IACd;AACF,EAAC"}
@@ -1,12 +1,46 @@
1
1
  import { basename, resolve } from 'node:path';
2
2
  import { Flags } from '@oclif/core';
3
3
  import { exitCodes, SanityCommand, subdebug } from '@sanity/cli-core';
4
+ import { getErrorMessage } from '@sanity/cli-core/errors';
5
+ import { isHttpError } from '@sanity/client';
4
6
  import { AssetFileError } from '../../actions/assets/assetFileError.js';
5
7
  import { uploadAssetWithProgress } from '../../actions/assets/uploadAssetWithProgress.js';
6
8
  import { promptForProject } from '../../prompts/promptForProject.js';
7
9
  import { getDatasetFlag, getProjectIdFlag } from '../../util/sharedFlags.js';
8
10
  import { defineCommandTelemetry } from '../../util/telemetry/commandTelemetry.js';
9
11
  const uploadAssetDebug = subdebug('assets:upload');
12
+ const DATASET_ASSET_LIMITS_URL = 'https://www.sanity.io/docs/content-lake/technical-limits#k2c53dc30e24b';
13
+ function isProjectUserNotFoundError(body) {
14
+ const responseError = body.error;
15
+ return typeof responseError === 'object' && responseError !== null && 'type' in responseError && responseError.type === 'projectUserNotFoundError';
16
+ }
17
+ function getAssetUploadErrorMessage(error) {
18
+ if (!isHttpError(error)) {
19
+ return `Asset upload failed: ${getErrorMessage(error)}`;
20
+ }
21
+ const body = typeof error.response.body === 'object' && error.response.body !== null && !Array.isArray(error.response.body) ? error.response.body : {};
22
+ const responseError = typeof body.error === 'string' ? body.error : error.response.statusMessage || 'HTTP error';
23
+ const statusCode = typeof body.statusCode === 'number' || typeof body.statusCode === 'string' ? body.statusCode : error.statusCode;
24
+ const projectUserNotFound = isProjectUserNotFoundError(body);
25
+ const responseMessage = projectUserNotFound ? error.message : getErrorMessage(error);
26
+ const message = /[.!?]$/.test(responseMessage) ? responseMessage : `${responseMessage}.`;
27
+ const details = typeof body.details === 'string' ? `\n\nDetails:\n${body.details}` : '';
28
+ const response = `Asset upload failed: HTTP ${statusCode} - ${responseError}\n${message}${details}`;
29
+ if (error.statusCode === 401 && !projectUserNotFound) {
30
+ return `${response}\n\nRun \`sanity login\` to authenticate, then try again.`;
31
+ }
32
+ if (error.statusCode === 403) {
33
+ return `${response}\n\nCheck that your account has write access to this dataset, then try again.`;
34
+ }
35
+ if ([
36
+ 400,
37
+ 413,
38
+ 422
39
+ ].includes(error.statusCode)) {
40
+ return `${response}\n\nCheck the asset requirements and current technical limits, then try again: ${DATASET_ASSET_LIMITS_URL}`;
41
+ }
42
+ return `${response}\n\nTry again.`;
43
+ }
10
44
  const flags = {
11
45
  ...getProjectIdFlag({
12
46
  description: 'Project ID to upload the asset to',
@@ -116,7 +150,7 @@ export class UploadAssetCommand extends SanityCommand {
116
150
  });
117
151
  }
118
152
  uploadAssetDebug('Asset upload failed', error);
119
- this.error('Asset upload failed. Check authentication, write access, and that the local file is still readable, then retry.', {
153
+ this.error(getAssetUploadErrorMessage(error), {
120
154
  exit: exitCodes.RUNTIME_ERROR
121
155
  });
122
156
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/commands/assets/upload.ts"],"sourcesContent":["import {basename, resolve} from 'node:path'\n\nimport {Flags} from '@oclif/core'\nimport {type FlagInput} from '@oclif/core/interfaces'\nimport {exitCodes, SanityCommand, subdebug} from '@sanity/cli-core'\n\nimport {AssetFileError} from '../../actions/assets/assetFileError.js'\nimport {uploadAssetWithProgress} from '../../actions/assets/uploadAssetWithProgress.js'\nimport {promptForProject} from '../../prompts/promptForProject.js'\nimport {type AssetType} from '../../services/assets.js'\nimport {getDatasetFlag, getProjectIdFlag} from '../../util/sharedFlags.js'\nimport {defineCommandTelemetry} from '../../util/telemetry/commandTelemetry.js'\n\nconst uploadAssetDebug = subdebug('assets:upload')\n\nconst flags = {\n ...getProjectIdFlag({\n description: 'Project ID to upload the asset to',\n semantics: 'override',\n }),\n ...getDatasetFlag({description: 'Dataset to upload the asset to', semantics: 'override'}),\n 'content-type': Flags.string({\n description: 'MIME type of the asset, such as image/png or application/pdf',\n helpValue: '<mime-type>',\n }),\n file: Flags.string({\n description: 'Path to the local file to upload',\n helpValue: '<path>',\n required: true,\n }),\n filename: Flags.string({\n description: 'Original filename stored on the asset document. Defaults to the local filename',\n helpValue: '<filename>',\n }),\n type: Flags.custom<AssetType>({\n default: 'image',\n description: 'Asset type to create',\n options: ['image', 'file'],\n })(),\n} satisfies FlagInput\n\nexport class UploadAssetCommand extends SanityCommand<typeof UploadAssetCommand> {\n static override description =\n 'Upload one local image or file to a Sanity dataset and print the asset document as JSON'\n\n static override examples = [\n {\n command:\n '<%= config.bin %> <%= command.id %> --file ./hero.png --type image --dataset production',\n description: 'Upload an image using the configured project',\n },\n {\n command:\n '<%= config.bin %> <%= command.id %> --file ./brief.pdf --type file --content-type application/pdf --project-id abc123 --dataset production',\n description: 'Upload a file with explicit project, dataset, and MIME type',\n },\n ]\n\n static override flags = flags\n\n static override hiddenAliases: string[] = ['asset:upload']\n\n static telemetry = defineCommandTelemetry(flags, {\n redact: ['file', 'filename'],\n })\n\n public async run(): Promise<void> {\n const {flags} = await this.parse(UploadAssetCommand)\n const filePath = resolve(flags.file)\n\n const cliConfig = await this.tryGetCliConfig()\n const projectId = await this.getProjectId({fallback: () => promptForProject({})})\n const dataset = flags.dataset ?? cliConfig.api?.dataset\n if (!dataset) {\n this.error(\n 'Asset upload failed: Dataset is required. Pass --dataset <name> or configure a dataset in sanity.cli.ts.',\n {exit: exitCodes.USAGE_ERROR},\n )\n }\n\n try {\n const asset = await uploadAssetWithProgress({\n assetType: flags.type,\n contentType: flags['content-type'],\n dataset,\n filename: flags.filename ?? basename(filePath),\n filePath,\n isInteractive: this.resolveIsInteractive(),\n logToStderr: (message) => this.logToStderr(message),\n projectId,\n })\n const fieldType = flags.type === 'image' ? 'image' : 'file'\n\n this.log(\n JSON.stringify(\n {\n asset: {\n _id: asset._id,\n _type: asset._type,\n extension: asset.extension,\n mimeType: asset.mimeType,\n originalFilename: asset.originalFilename,\n size: asset.size,\n url: asset.url,\n },\n reference: {\n _type: fieldType,\n asset: {_ref: asset._id, _type: 'reference'},\n },\n },\n null,\n 2,\n ),\n )\n } catch (error) {\n if (error instanceof Error && error.message === 'SIGINT') throw error\n if (error instanceof AssetFileError) {\n if (error.reason === 'not-file') {\n this.error('Asset upload failed: --file must point to a file, not a directory.', {\n exit: exitCodes.USAGE_ERROR,\n })\n }\n this.error(\n 'Asset upload failed: Cannot read the local file. Check that --file points to a readable file, then retry.',\n {exit: exitCodes.USAGE_ERROR},\n )\n }\n uploadAssetDebug('Asset upload failed', error)\n this.error(\n 'Asset upload failed. Check authentication, write access, and that the local file is still readable, then retry.',\n {\n exit: exitCodes.RUNTIME_ERROR,\n },\n )\n }\n }\n}\n"],"names":["basename","resolve","Flags","exitCodes","SanityCommand","subdebug","AssetFileError","uploadAssetWithProgress","promptForProject","getDatasetFlag","getProjectIdFlag","defineCommandTelemetry","uploadAssetDebug","flags","description","semantics","string","helpValue","file","required","filename","type","custom","default","options","UploadAssetCommand","examples","command","hiddenAliases","telemetry","redact","run","parse","filePath","cliConfig","tryGetCliConfig","projectId","getProjectId","fallback","dataset","api","error","exit","USAGE_ERROR","asset","assetType","contentType","isInteractive","resolveIsInteractive","logToStderr","message","fieldType","log","JSON","stringify","_id","_type","extension","mimeType","originalFilename","size","url","reference","_ref","Error","reason","RUNTIME_ERROR"],"mappings":"AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,YAAW;AAE3C,SAAQC,KAAK,QAAO,cAAa;AAEjC,SAAQC,SAAS,EAAEC,aAAa,EAAEC,QAAQ,QAAO,mBAAkB;AAEnE,SAAQC,cAAc,QAAO,yCAAwC;AACrE,SAAQC,uBAAuB,QAAO,kDAAiD;AACvF,SAAQC,gBAAgB,QAAO,oCAAmC;AAElE,SAAQC,cAAc,EAAEC,gBAAgB,QAAO,4BAA2B;AAC1E,SAAQC,sBAAsB,QAAO,2CAA0C;AAE/E,MAAMC,mBAAmBP,SAAS;AAElC,MAAMQ,QAAQ;IACZ,GAAGH,iBAAiB;QAClBI,aAAa;QACbC,WAAW;IACb,EAAE;IACF,GAAGN,eAAe;QAACK,aAAa;QAAkCC,WAAW;IAAU,EAAE;IACzF,gBAAgBb,MAAMc,MAAM,CAAC;QAC3BF,aAAa;QACbG,WAAW;IACb;IACAC,MAAMhB,MAAMc,MAAM,CAAC;QACjBF,aAAa;QACbG,WAAW;QACXE,UAAU;IACZ;IACAC,UAAUlB,MAAMc,MAAM,CAAC;QACrBF,aAAa;QACbG,WAAW;IACb;IACAI,MAAMnB,MAAMoB,MAAM,CAAY;QAC5BC,SAAS;QACTT,aAAa;QACbU,SAAS;YAAC;YAAS;SAAO;IAC5B;AACF;AA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AC1BC,UAAUd,MAAMc,QAAQ;oBACxBC,kBAAkBf,MAAMe,gBAAgB;oBACxCC,MAAMhB,MAAMgB,IAAI;oBAChBC,KAAKjB,MAAMiB,GAAG;gBAChB;gBACAC,WAAW;oBACTN,OAAOL;oBACPP,OAAO;wBAACmB,MAAMnB,MAAMW,GAAG;wBAAEC,OAAO;oBAAW;gBAC7C;YACF,GACA,MACA;QAGN,EAAE,OAAOf,OAAO;YACd,IAAIA,iBAAiBuB,SAASvB,MAAMS,OAAO,KAAK,UAAU,MAAMT;YAChE,IAAIA,iBAAiBnC,gBAAgB;gBACnC,IAAImC,MAAMwB,MAAM,KAAK,YAAY;oBAC/B,IAAI,CAACxB,KAAK,CAAC,sEAAsE;wBAC/EC,MAAMvC,UAAUwC,WAAW;oBAC7B;gBACF;gBACA,IAAI,CAACF,KAAK,CACR,6GACA;oBAACC,MAAMvC,UAAUwC,WAAW;gBAAA;YAEhC;YACA/B,iBAAiB,uBAAuB6B;YACxC,IAAI,CAACA,KAAK,CACR,mHACA;gBACEC,MAAMvC,UAAU+D,aAAa;YAC/B;QAEJ;IACF;AACF"}
1
+ {"version":3,"sources":["../../../src/commands/assets/upload.ts"],"sourcesContent":["import {basename, resolve} from 'node:path'\n\nimport {Flags} from '@oclif/core'\nimport {type FlagInput} from '@oclif/core/interfaces'\nimport {exitCodes, SanityCommand, subdebug} from '@sanity/cli-core'\nimport {getErrorMessage} from '@sanity/cli-core/errors'\nimport {isHttpError} from '@sanity/client'\n\nimport {AssetFileError} from '../../actions/assets/assetFileError.js'\nimport {uploadAssetWithProgress} from '../../actions/assets/uploadAssetWithProgress.js'\nimport {promptForProject} from '../../prompts/promptForProject.js'\nimport {type AssetType} from '../../services/assets.js'\nimport {getDatasetFlag, getProjectIdFlag} from '../../util/sharedFlags.js'\nimport {defineCommandTelemetry} from '../../util/telemetry/commandTelemetry.js'\n\nconst uploadAssetDebug = subdebug('assets:upload')\nconst DATASET_ASSET_LIMITS_URL =\n 'https://www.sanity.io/docs/content-lake/technical-limits#k2c53dc30e24b'\n\nfunction isProjectUserNotFoundError(body: Record<string, unknown>): boolean {\n const responseError = body.error\n return (\n typeof responseError === 'object' &&\n responseError !== null &&\n 'type' in responseError &&\n responseError.type === 'projectUserNotFoundError'\n )\n}\n\nfunction getAssetUploadErrorMessage(error: unknown): string {\n if (!isHttpError(error)) {\n return `Asset upload failed: ${getErrorMessage(error)}`\n }\n\n const body =\n typeof error.response.body === 'object' &&\n error.response.body !== null &&\n !Array.isArray(error.response.body)\n ? (error.response.body as Record<string, unknown>)\n : {}\n const responseError =\n typeof body.error === 'string' ? body.error : error.response.statusMessage || 'HTTP error'\n const statusCode =\n typeof body.statusCode === 'number' || typeof body.statusCode === 'string'\n ? body.statusCode\n : error.statusCode\n const projectUserNotFound = isProjectUserNotFoundError(body)\n const responseMessage = projectUserNotFound ? error.message : getErrorMessage(error)\n const message = /[.!?]$/.test(responseMessage) ? responseMessage : `${responseMessage}.`\n const details = typeof body.details === 'string' ? `\\n\\nDetails:\\n${body.details}` : ''\n const response = `Asset upload failed: HTTP ${statusCode} - ${responseError}\\n${message}${details}`\n\n if (error.statusCode === 401 && !projectUserNotFound) {\n return `${response}\\n\\nRun \\`sanity login\\` to authenticate, then try again.`\n }\n if (error.statusCode === 403) {\n return `${response}\\n\\nCheck that your account has write access to this dataset, then try again.`\n }\n if ([400, 413, 422].includes(error.statusCode)) {\n return `${response}\\n\\nCheck the asset requirements and current technical limits, then try again: ${DATASET_ASSET_LIMITS_URL}`\n }\n return `${response}\\n\\nTry again.`\n}\n\nconst flags = {\n ...getProjectIdFlag({\n description: 'Project ID to upload the asset to',\n semantics: 'override',\n }),\n ...getDatasetFlag({description: 'Dataset to upload the asset to', semantics: 'override'}),\n 'content-type': Flags.string({\n description: 'MIME type of the asset, such as image/png or application/pdf',\n helpValue: '<mime-type>',\n }),\n file: Flags.string({\n description: 'Path to the local file to upload',\n helpValue: '<path>',\n required: true,\n }),\n filename: Flags.string({\n description: 'Original filename stored on the asset document. Defaults to the local filename',\n helpValue: '<filename>',\n }),\n type: Flags.custom<AssetType>({\n default: 'image',\n description: 'Asset type to create',\n options: ['image', 'file'],\n })(),\n} satisfies FlagInput\n\nexport class UploadAssetCommand extends SanityCommand<typeof UploadAssetCommand> {\n static override description =\n 'Upload one local image or file to a Sanity dataset and print the asset document as JSON'\n\n static override examples = [\n {\n command:\n '<%= config.bin %> <%= command.id %> --file ./hero.png --type image --dataset production',\n description: 'Upload an image using the configured project',\n },\n {\n command:\n '<%= config.bin %> <%= command.id %> --file ./brief.pdf --type file --content-type application/pdf --project-id abc123 --dataset production',\n description: 'Upload a file with explicit project, dataset, and MIME type',\n },\n ]\n\n static override flags = flags\n\n static override hiddenAliases: string[] = ['asset:upload']\n\n static telemetry = defineCommandTelemetry(flags, {\n redact: ['file', 'filename'],\n })\n\n public async run(): Promise<void> {\n const {flags} = await this.parse(UploadAssetCommand)\n const filePath = resolve(flags.file)\n\n const cliConfig = await this.tryGetCliConfig()\n const projectId = await this.getProjectId({fallback: () => promptForProject({})})\n const dataset = flags.dataset ?? cliConfig.api?.dataset\n if (!dataset) {\n this.error(\n 'Asset upload failed: Dataset is required. Pass --dataset <name> or configure a dataset in sanity.cli.ts.',\n {exit: exitCodes.USAGE_ERROR},\n )\n }\n\n try {\n const asset = await uploadAssetWithProgress({\n assetType: flags.type,\n contentType: flags['content-type'],\n dataset,\n filename: flags.filename ?? basename(filePath),\n filePath,\n isInteractive: this.resolveIsInteractive(),\n logToStderr: (message) => this.logToStderr(message),\n projectId,\n })\n const fieldType = flags.type === 'image' ? 'image' : 'file'\n\n this.log(\n JSON.stringify(\n {\n asset: {\n _id: asset._id,\n _type: asset._type,\n extension: asset.extension,\n mimeType: asset.mimeType,\n originalFilename: asset.originalFilename,\n size: asset.size,\n url: asset.url,\n },\n reference: {\n _type: fieldType,\n asset: {_ref: asset._id, _type: 'reference'},\n },\n },\n null,\n 2,\n ),\n )\n } catch (error) {\n if (error instanceof Error && error.message === 'SIGINT') throw error\n if (error instanceof AssetFileError) {\n if (error.reason === 'not-file') {\n this.error('Asset upload failed: --file must point to a file, not a directory.', {\n exit: exitCodes.USAGE_ERROR,\n })\n }\n this.error(\n 'Asset upload failed: Cannot read the local file. Check that --file points to a readable file, then retry.',\n {exit: exitCodes.USAGE_ERROR},\n )\n }\n uploadAssetDebug('Asset upload failed', error)\n this.error(getAssetUploadErrorMessage(error), {exit: exitCodes.RUNTIME_ERROR})\n }\n }\n}\n"],"names":["basename","resolve","Flags","exitCodes","SanityCommand","subdebug","getErrorMessage","isHttpError","AssetFileError","uploadAssetWithProgress","promptForProject","getDatasetFlag","getProjectIdFlag","defineCommandTelemetry","uploadAssetDebug","DATASET_ASSET_LIMITS_URL","isProjectUserNotFoundError","body","responseError","error","type","getAssetUploadErrorMessage","response","Array","isArray","statusMessage","statusCode","projectUserNotFound","responseMessage","message","test","details","includes","flags","description","semantics","string","helpValue","file","required","filename","custom","default","options","UploadAssetCommand","examples","command","hiddenAliases","telemetry","redact","run","parse","filePath","cliConfig","tryGetCliConfig","projectId","getProjectId","fallback","dataset","api","exit","USAGE_ERROR","asset","assetType","contentType","isInteractive","resolveIsInteractive","logToStderr","fieldType","log","JSON","stringify","_id","_type","extension","mimeType","originalFilename","size","url","reference","_ref","Error","reason","RUNTIME_ERROR"],"mappings":"AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,YAAW;AAE3C,SAAQC,KAAK,QAAO,cAAa;AAEjC,SAAQC,SAAS,EAAEC,aAAa,EAAEC,QAAQ,QAAO,mBAAkB;AACnE,SAAQC,eAAe,QAAO,0BAAyB;AACvD,SAAQC,WAAW,QAAO,iBAAgB;AAE1C,SAAQC,cAAc,QAAO,yCAAwC;AACrE,SAAQC,uBAAuB,QAAO,kDAAiD;AACvF,SAAQC,gBAAgB,QAAO,oCAAmC;AAElE,SAAQC,cAAc,EAAEC,gBAAgB,QAAO,4BAA2B;AAC1E,SAAQC,sBAAsB,QAAO,2CAA0C;AAE/E,M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K,CACR,6GACA;oBAACyC,MAAMzD,UAAU0D,WAAW;gBAAA;YAEhC;YACA/C,iBAAiB,uBAAuBK;YACxC,IAAI,CAACA,KAAK,CAACE,2BAA2BF,QAAQ;gBAACyC,MAAMzD,UAAUgF,aAAa;YAAA;QAC9E;IACF;AACF"}
@@ -1713,167 +1713,6 @@
1713
1713
  "list.js"
1714
1714
  ]
1715
1715
  },
1716
- "cors:add": {
1717
- "aliases": [],
1718
- "args": {
1719
- "origin": {
1720
- "description": "Origin to allow (e.g., https://example.com)",
1721
- "name": "origin",
1722
- "required": true
1723
- }
1724
- },
1725
- "description": "Add a CORS origin to the project",
1726
- "examples": [
1727
- {
1728
- "command": "<%= config.bin %> <%= command.id %>",
1729
- "description": "Interactively add a CORS origin"
1730
- },
1731
- {
1732
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1733
- "description": "Add a localhost origin without credentials"
1734
- },
1735
- {
1736
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1737
- "description": "Add a production origin with credentials allowed"
1738
- },
1739
- {
1740
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1741
- "description": "Add a CORS origin for a specific project"
1742
- }
1743
- ],
1744
- "flags": {
1745
- "project-id": {
1746
- "char": "p",
1747
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1748
- "helpGroup": "OVERRIDE",
1749
- "name": "project-id",
1750
- "hasDynamicHelp": false,
1751
- "helpValue": "<id>",
1752
- "multiple": false,
1753
- "type": "option"
1754
- },
1755
- "credentials": {
1756
- "description": "Allow credentials (token/cookie) to be sent from this origin",
1757
- "name": "credentials",
1758
- "required": false,
1759
- "allowNo": true,
1760
- "type": "boolean"
1761
- },
1762
- "yes": {
1763
- "char": "y",
1764
- "description": "Confirm risky wildcard origins without prompting",
1765
- "name": "yes",
1766
- "allowNo": false,
1767
- "type": "boolean"
1768
- }
1769
- },
1770
- "hasDynamicHelp": false,
1771
- "hiddenAliases": [],
1772
- "id": "cors:add",
1773
- "pluginAlias": "@sanity/cli",
1774
- "pluginName": "@sanity/cli",
1775
- "pluginType": "core",
1776
- "strict": true,
1777
- "isESM": true,
1778
- "relativePath": [
1779
- "dist",
1780
- "commands",
1781
- "cors",
1782
- "add.js"
1783
- ]
1784
- },
1785
- "cors:delete": {
1786
- "aliases": [],
1787
- "args": {
1788
- "origin": {
1789
- "description": "Origin to delete (will prompt if not provided)",
1790
- "name": "origin",
1791
- "required": false
1792
- }
1793
- },
1794
- "description": "Delete a CORS origin from the project",
1795
- "examples": [
1796
- {
1797
- "command": "<%= config.bin %> <%= command.id %>",
1798
- "description": "Interactively select and delete a CORS origin"
1799
- },
1800
- {
1801
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
1802
- "description": "Delete a specific CORS origin"
1803
- },
1804
- {
1805
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1806
- "description": "Delete a CORS origin from a specific project"
1807
- }
1808
- ],
1809
- "flags": {
1810
- "project-id": {
1811
- "char": "p",
1812
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1813
- "helpGroup": "OVERRIDE",
1814
- "name": "project-id",
1815
- "hasDynamicHelp": false,
1816
- "helpValue": "<id>",
1817
- "multiple": false,
1818
- "type": "option"
1819
- }
1820
- },
1821
- "hasDynamicHelp": false,
1822
- "hiddenAliases": [],
1823
- "id": "cors:delete",
1824
- "pluginAlias": "@sanity/cli",
1825
- "pluginName": "@sanity/cli",
1826
- "pluginType": "core",
1827
- "strict": true,
1828
- "isESM": true,
1829
- "relativePath": [
1830
- "dist",
1831
- "commands",
1832
- "cors",
1833
- "delete.js"
1834
- ]
1835
- },
1836
- "cors:list": {
1837
- "aliases": [],
1838
- "args": {},
1839
- "description": "List CORS origins for the project",
1840
- "examples": [
1841
- {
1842
- "command": "<%= config.bin %> <%= command.id %>",
1843
- "description": "List CORS origins for the project"
1844
- },
1845
- {
1846
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1847
- "description": "List CORS origins for a specific project"
1848
- }
1849
- ],
1850
- "flags": {
1851
- "project-id": {
1852
- "char": "p",
1853
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1854
- "helpGroup": "OVERRIDE",
1855
- "name": "project-id",
1856
- "hasDynamicHelp": false,
1857
- "helpValue": "<id>",
1858
- "multiple": false,
1859
- "type": "option"
1860
- }
1861
- },
1862
- "hasDynamicHelp": false,
1863
- "hiddenAliases": [],
1864
- "id": "cors:list",
1865
- "pluginAlias": "@sanity/cli",
1866
- "pluginName": "@sanity/cli",
1867
- "pluginType": "core",
1868
- "strict": true,
1869
- "isESM": true,
1870
- "relativePath": [
1871
- "dist",
1872
- "commands",
1873
- "cors",
1874
- "list.js"
1875
- ]
1876
- },
1877
1716
  "datasets:copy": {
1878
1717
  "aliases": [],
1879
1718
  "args": {
@@ -2497,69 +2336,63 @@
2497
2336
  "list.js"
2498
2337
  ]
2499
2338
  },
2500
- "docs:browse": {
2501
- "aliases": [],
2502
- "args": {},
2503
- "description": "Open Sanity docs in your browser",
2504
- "flags": {},
2505
- "hasDynamicHelp": false,
2506
- "hiddenAliases": [],
2507
- "id": "docs:browse",
2508
- "pluginAlias": "@sanity/cli",
2509
- "pluginName": "@sanity/cli",
2510
- "pluginType": "core",
2511
- "strict": true,
2512
- "enableJsonFlag": false,
2513
- "isESM": true,
2514
- "relativePath": [
2515
- "dist",
2516
- "commands",
2517
- "docs",
2518
- "browse.js"
2519
- ]
2520
- },
2521
- "docs:read": {
2339
+ "cors:add": {
2522
2340
  "aliases": [],
2523
2341
  "args": {
2524
- "path": {
2525
- "description": "Path or URL to article, found in search results and docs content as links",
2526
- "name": "path",
2342
+ "origin": {
2343
+ "description": "Origin to allow (e.g., https://example.com)",
2344
+ "name": "origin",
2527
2345
  "required": true
2528
2346
  }
2529
2347
  },
2530
- "description": "Read an article in terminal",
2348
+ "description": "Add a CORS origin to the project",
2531
2349
  "examples": [
2532
2350
  {
2533
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2534
- "description": "Read as markdown in terminal"
2351
+ "command": "<%= config.bin %> <%= command.id %>",
2352
+ "description": "Interactively add a CORS origin"
2535
2353
  },
2536
2354
  {
2537
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2538
- "description": "Read using full URL"
2355
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2356
+ "description": "Add a localhost origin without credentials"
2539
2357
  },
2540
2358
  {
2541
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2542
- "description": "Open in web browser"
2359
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2360
+ "description": "Add a production origin with credentials allowed"
2543
2361
  },
2544
2362
  {
2545
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2546
- "description": "Open using full URL in web browser"
2363
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2364
+ "description": "Add a CORS origin for a specific project"
2547
2365
  }
2548
2366
  ],
2549
2367
  "flags": {
2550
- "web": {
2551
- "aliases": [
2552
- "w"
2553
- ],
2554
- "description": "Open in a web browser",
2555
- "name": "web",
2368
+ "project-id": {
2369
+ "char": "p",
2370
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2371
+ "helpGroup": "OVERRIDE",
2372
+ "name": "project-id",
2373
+ "hasDynamicHelp": false,
2374
+ "helpValue": "<id>",
2375
+ "multiple": false,
2376
+ "type": "option"
2377
+ },
2378
+ "credentials": {
2379
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2380
+ "name": "credentials",
2381
+ "required": false,
2382
+ "allowNo": true,
2383
+ "type": "boolean"
2384
+ },
2385
+ "yes": {
2386
+ "char": "y",
2387
+ "description": "Confirm risky wildcard origins without prompting",
2388
+ "name": "yes",
2556
2389
  "allowNo": false,
2557
2390
  "type": "boolean"
2558
2391
  }
2559
2392
  },
2560
2393
  "hasDynamicHelp": false,
2561
2394
  "hiddenAliases": [],
2562
- "id": "docs:read",
2395
+ "id": "cors:add",
2563
2396
  "pluginAlias": "@sanity/cli",
2564
2397
  "pluginName": "@sanity/cli",
2565
2398
  "pluginType": "core",
@@ -2568,25 +2401,192 @@
2568
2401
  "relativePath": [
2569
2402
  "dist",
2570
2403
  "commands",
2571
- "docs",
2572
- "read.js"
2404
+ "cors",
2405
+ "add.js"
2573
2406
  ]
2574
2407
  },
2575
- "docs:search": {
2408
+ "cors:delete": {
2576
2409
  "aliases": [],
2577
2410
  "args": {
2578
- "query": {
2579
- "description": "Search query for documentation",
2580
- "name": "query",
2581
- "required": true
2411
+ "origin": {
2412
+ "description": "Origin to delete (will prompt if not provided)",
2413
+ "name": "origin",
2414
+ "required": false
2582
2415
  }
2583
2416
  },
2584
- "description": "Search Sanity docs",
2417
+ "description": "Delete a CORS origin from the project",
2585
2418
  "examples": [
2586
2419
  {
2587
- "command": "<%= config.bin %> <%= command.id %> schema",
2588
- "description": "Search for documentation about schemas"
2589
- },
2420
+ "command": "<%= config.bin %> <%= command.id %>",
2421
+ "description": "Interactively select and delete a CORS origin"
2422
+ },
2423
+ {
2424
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2425
+ "description": "Delete a specific CORS origin"
2426
+ },
2427
+ {
2428
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2429
+ "description": "Delete a CORS origin from a specific project"
2430
+ }
2431
+ ],
2432
+ "flags": {
2433
+ "project-id": {
2434
+ "char": "p",
2435
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2436
+ "helpGroup": "OVERRIDE",
2437
+ "name": "project-id",
2438
+ "hasDynamicHelp": false,
2439
+ "helpValue": "<id>",
2440
+ "multiple": false,
2441
+ "type": "option"
2442
+ }
2443
+ },
2444
+ "hasDynamicHelp": false,
2445
+ "hiddenAliases": [],
2446
+ "id": "cors:delete",
2447
+ "pluginAlias": "@sanity/cli",
2448
+ "pluginName": "@sanity/cli",
2449
+ "pluginType": "core",
2450
+ "strict": true,
2451
+ "isESM": true,
2452
+ "relativePath": [
2453
+ "dist",
2454
+ "commands",
2455
+ "cors",
2456
+ "delete.js"
2457
+ ]
2458
+ },
2459
+ "cors:list": {
2460
+ "aliases": [],
2461
+ "args": {},
2462
+ "description": "List CORS origins for the project",
2463
+ "examples": [
2464
+ {
2465
+ "command": "<%= config.bin %> <%= command.id %>",
2466
+ "description": "List CORS origins for the project"
2467
+ },
2468
+ {
2469
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2470
+ "description": "List CORS origins for a specific project"
2471
+ }
2472
+ ],
2473
+ "flags": {
2474
+ "project-id": {
2475
+ "char": "p",
2476
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2477
+ "helpGroup": "OVERRIDE",
2478
+ "name": "project-id",
2479
+ "hasDynamicHelp": false,
2480
+ "helpValue": "<id>",
2481
+ "multiple": false,
2482
+ "type": "option"
2483
+ }
2484
+ },
2485
+ "hasDynamicHelp": false,
2486
+ "hiddenAliases": [],
2487
+ "id": "cors:list",
2488
+ "pluginAlias": "@sanity/cli",
2489
+ "pluginName": "@sanity/cli",
2490
+ "pluginType": "core",
2491
+ "strict": true,
2492
+ "isESM": true,
2493
+ "relativePath": [
2494
+ "dist",
2495
+ "commands",
2496
+ "cors",
2497
+ "list.js"
2498
+ ]
2499
+ },
2500
+ "docs:browse": {
2501
+ "aliases": [],
2502
+ "args": {},
2503
+ "description": "Open Sanity docs in your browser",
2504
+ "flags": {},
2505
+ "hasDynamicHelp": false,
2506
+ "hiddenAliases": [],
2507
+ "id": "docs:browse",
2508
+ "pluginAlias": "@sanity/cli",
2509
+ "pluginName": "@sanity/cli",
2510
+ "pluginType": "core",
2511
+ "strict": true,
2512
+ "enableJsonFlag": false,
2513
+ "isESM": true,
2514
+ "relativePath": [
2515
+ "dist",
2516
+ "commands",
2517
+ "docs",
2518
+ "browse.js"
2519
+ ]
2520
+ },
2521
+ "docs:read": {
2522
+ "aliases": [],
2523
+ "args": {
2524
+ "path": {
2525
+ "description": "Path or URL to article, found in search results and docs content as links",
2526
+ "name": "path",
2527
+ "required": true
2528
+ }
2529
+ },
2530
+ "description": "Read an article in terminal",
2531
+ "examples": [
2532
+ {
2533
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2534
+ "description": "Read as markdown in terminal"
2535
+ },
2536
+ {
2537
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2538
+ "description": "Read using full URL"
2539
+ },
2540
+ {
2541
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2542
+ "description": "Open in web browser"
2543
+ },
2544
+ {
2545
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2546
+ "description": "Open using full URL in web browser"
2547
+ }
2548
+ ],
2549
+ "flags": {
2550
+ "web": {
2551
+ "aliases": [
2552
+ "w"
2553
+ ],
2554
+ "description": "Open in a web browser",
2555
+ "name": "web",
2556
+ "allowNo": false,
2557
+ "type": "boolean"
2558
+ }
2559
+ },
2560
+ "hasDynamicHelp": false,
2561
+ "hiddenAliases": [],
2562
+ "id": "docs:read",
2563
+ "pluginAlias": "@sanity/cli",
2564
+ "pluginName": "@sanity/cli",
2565
+ "pluginType": "core",
2566
+ "strict": true,
2567
+ "isESM": true,
2568
+ "relativePath": [
2569
+ "dist",
2570
+ "commands",
2571
+ "docs",
2572
+ "read.js"
2573
+ ]
2574
+ },
2575
+ "docs:search": {
2576
+ "aliases": [],
2577
+ "args": {
2578
+ "query": {
2579
+ "description": "Search query for documentation",
2580
+ "name": "query",
2581
+ "required": true
2582
+ }
2583
+ },
2584
+ "description": "Search Sanity docs",
2585
+ "examples": [
2586
+ {
2587
+ "command": "<%= config.bin %> <%= command.id %> schema",
2588
+ "description": "Search for documentation about schemas"
2589
+ },
2590
2590
  {
2591
2591
  "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
2592
2592
  "description": "Search with phrase"
@@ -3633,32 +3633,6 @@
3633
3633
  "extract.js"
3634
3634
  ]
3635
3635
  },
3636
- "mcp:configure": {
3637
- "aliases": [],
3638
- "args": {},
3639
- "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3640
- "examples": [
3641
- {
3642
- "command": "<%= config.bin %> <%= command.id %>",
3643
- "description": "Configure Sanity MCP server for detected AI editors"
3644
- }
3645
- ],
3646
- "flags": {},
3647
- "hasDynamicHelp": false,
3648
- "hiddenAliases": [],
3649
- "id": "mcp:configure",
3650
- "pluginAlias": "@sanity/cli",
3651
- "pluginName": "@sanity/cli",
3652
- "pluginType": "core",
3653
- "strict": true,
3654
- "isESM": true,
3655
- "relativePath": [
3656
- "dist",
3657
- "commands",
3658
- "mcp",
3659
- "configure.js"
3660
- ]
3661
- },
3662
3636
  "media:create-aspect": {
3663
3637
  "aliases": [],
3664
3638
  "args": {},
@@ -3964,6 +3938,32 @@
3964
3938
  "import.js"
3965
3939
  ]
3966
3940
  },
3941
+ "mcp:configure": {
3942
+ "aliases": [],
3943
+ "args": {},
3944
+ "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3945
+ "examples": [
3946
+ {
3947
+ "command": "<%= config.bin %> <%= command.id %>",
3948
+ "description": "Configure Sanity MCP server for detected AI editors"
3949
+ }
3950
+ ],
3951
+ "flags": {},
3952
+ "hasDynamicHelp": false,
3953
+ "hiddenAliases": [],
3954
+ "id": "mcp:configure",
3955
+ "pluginAlias": "@sanity/cli",
3956
+ "pluginName": "@sanity/cli",
3957
+ "pluginType": "core",
3958
+ "strict": true,
3959
+ "isESM": true,
3960
+ "relativePath": [
3961
+ "dist",
3962
+ "commands",
3963
+ "mcp",
3964
+ "configure.js"
3965
+ ]
3966
+ },
3967
3967
  "migrations:create": {
3968
3968
  "aliases": [],
3969
3969
  "args": {
@@ -4239,284 +4239,36 @@
4239
4239
  "list.js"
4240
4240
  ]
4241
4241
  },
4242
- "organizations:create": {
4242
+ "projects:create": {
4243
4243
  "aliases": [],
4244
- "args": {},
4245
- "description": "Create a new organization",
4244
+ "args": {
4245
+ "projectName": {
4246
+ "description": "Name of the project to create",
4247
+ "name": "projectName",
4248
+ "required": false
4249
+ }
4250
+ },
4251
+ "description": "Create a new Sanity project",
4246
4252
  "examples": [
4247
4253
  {
4248
4254
  "command": "<%= config.bin %> <%= command.id %>",
4249
- "description": "Interactively create an organization"
4255
+ "description": "Interactively create a project"
4250
4256
  },
4251
4257
  {
4252
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
4253
- "description": "Create an organization named \"Acme Corp\""
4258
+ "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
4259
+ "description": "Create a project named \"My New Project\""
4254
4260
  },
4255
4261
  {
4256
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
4257
- "description": "Create an organization with a default member role"
4258
- }
4259
- ],
4260
- "flags": {
4261
- "default-role": {
4262
- "description": "Default role assigned to new members",
4263
- "name": "default-role",
4264
- "required": false,
4265
- "hasDynamicHelp": false,
4266
- "multiple": false,
4267
- "type": "option"
4268
- },
4269
- "name": {
4270
- "description": "Organization name",
4271
- "name": "name",
4272
- "required": false,
4273
- "hasDynamicHelp": false,
4274
- "multiple": false,
4275
- "type": "option"
4276
- }
4277
- },
4278
- "hasDynamicHelp": false,
4279
- "hiddenAliases": [
4280
- "organization:create",
4281
- "organisations:create",
4282
- "organisation:create",
4283
- "org:create",
4284
- "orgs:create"
4285
- ],
4286
- "id": "organizations:create",
4287
- "pluginAlias": "@sanity/cli",
4288
- "pluginName": "@sanity/cli",
4289
- "pluginType": "core",
4290
- "strict": true,
4291
- "isESM": true,
4292
- "relativePath": [
4293
- "dist",
4294
- "commands",
4295
- "organizations",
4296
- "create.js"
4297
- ]
4298
- },
4299
- "organizations:delete": {
4300
- "aliases": [],
4301
- "args": {
4302
- "organizationId": {
4303
- "description": "Organization ID to delete",
4304
- "name": "organizationId",
4305
- "required": true
4306
- }
4307
- },
4308
- "description": "Delete an organization",
4309
- "examples": [
4310
- {
4311
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
4312
- "description": "Delete an organization (prompts for confirmation)"
4313
- },
4314
- {
4315
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
4316
- "description": "Delete an organization without confirmation"
4317
- }
4318
- ],
4319
- "flags": {
4320
- "force": {
4321
- "description": "Do not prompt for delete confirmation - forcefully delete",
4322
- "name": "force",
4323
- "required": false,
4324
- "allowNo": false,
4325
- "type": "boolean"
4326
- }
4327
- },
4328
- "hasDynamicHelp": false,
4329
- "hiddenAliases": [
4330
- "organization:delete",
4331
- "organisations:delete",
4332
- "organisation:delete",
4333
- "org:delete",
4334
- "orgs:delete"
4335
- ],
4336
- "id": "organizations:delete",
4337
- "pluginAlias": "@sanity/cli",
4338
- "pluginName": "@sanity/cli",
4339
- "pluginType": "core",
4340
- "strict": true,
4341
- "isESM": true,
4342
- "relativePath": [
4343
- "dist",
4344
- "commands",
4345
- "organizations",
4346
- "delete.js"
4347
- ]
4348
- },
4349
- "organizations:get": {
4350
- "aliases": [],
4351
- "args": {
4352
- "organizationId": {
4353
- "description": "Organization ID",
4354
- "name": "organizationId",
4355
- "required": true
4356
- }
4357
- },
4358
- "description": "Get details of an organization",
4359
- "examples": [
4360
- {
4361
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
4362
- "description": "Get details of a specific organization"
4363
- }
4364
- ],
4365
- "flags": {},
4366
- "hasDynamicHelp": false,
4367
- "hiddenAliases": [
4368
- "organization:get",
4369
- "organisations:get",
4370
- "organisation:get",
4371
- "org:get",
4372
- "orgs:get"
4373
- ],
4374
- "id": "organizations:get",
4375
- "pluginAlias": "@sanity/cli",
4376
- "pluginName": "@sanity/cli",
4377
- "pluginType": "core",
4378
- "strict": true,
4379
- "isESM": true,
4380
- "relativePath": [
4381
- "dist",
4382
- "commands",
4383
- "organizations",
4384
- "get.js"
4385
- ]
4386
- },
4387
- "organizations:list": {
4388
- "aliases": [],
4389
- "args": {},
4390
- "description": "List organizations you are a member of",
4391
- "examples": [
4392
- {
4393
- "command": "<%= config.bin %> <%= command.id %>",
4394
- "description": "List all your organizations"
4395
- }
4396
- ],
4397
- "flags": {},
4398
- "hasDynamicHelp": false,
4399
- "hiddenAliases": [
4400
- "organization:list",
4401
- "organisations:list",
4402
- "organisation:list",
4403
- "org:list",
4404
- "orgs:list"
4405
- ],
4406
- "id": "organizations:list",
4407
- "pluginAlias": "@sanity/cli",
4408
- "pluginName": "@sanity/cli",
4409
- "pluginType": "core",
4410
- "strict": true,
4411
- "isESM": true,
4412
- "relativePath": [
4413
- "dist",
4414
- "commands",
4415
- "organizations",
4416
- "list.js"
4417
- ]
4418
- },
4419
- "organizations:update": {
4420
- "aliases": [],
4421
- "args": {
4422
- "organizationId": {
4423
- "description": "Organization ID",
4424
- "name": "organizationId",
4425
- "required": true
4426
- }
4427
- },
4428
- "description": "Update an organization",
4429
- "examples": [
4430
- {
4431
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
4432
- "description": "Rename an organization"
4433
- },
4434
- {
4435
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
4436
- "description": "Set the organization slug (requires authSAML feature)"
4437
- },
4438
- {
4439
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
4440
- "description": "Change the default member role"
4441
- }
4442
- ],
4443
- "flags": {
4444
- "default-role": {
4445
- "description": "New default role for new members",
4446
- "name": "default-role",
4447
- "required": false,
4448
- "hasDynamicHelp": false,
4449
- "multiple": false,
4450
- "type": "option"
4451
- },
4452
- "name": {
4453
- "description": "New organization name",
4454
- "name": "name",
4455
- "required": false,
4456
- "hasDynamicHelp": false,
4457
- "multiple": false,
4458
- "type": "option"
4459
- },
4460
- "slug": {
4461
- "description": "New URL slug (requires authSAML feature on the organization)",
4462
- "name": "slug",
4463
- "required": false,
4464
- "hasDynamicHelp": false,
4465
- "multiple": false,
4466
- "type": "option"
4467
- }
4468
- },
4469
- "hasDynamicHelp": false,
4470
- "hiddenAliases": [
4471
- "organization:update",
4472
- "organisations:update",
4473
- "organisation:update",
4474
- "org:update",
4475
- "orgs:update"
4476
- ],
4477
- "id": "organizations:update",
4478
- "pluginAlias": "@sanity/cli",
4479
- "pluginName": "@sanity/cli",
4480
- "pluginType": "core",
4481
- "strict": true,
4482
- "isESM": true,
4483
- "relativePath": [
4484
- "dist",
4485
- "commands",
4486
- "organizations",
4487
- "update.js"
4488
- ]
4489
- },
4490
- "projects:create": {
4491
- "aliases": [],
4492
- "args": {
4493
- "projectName": {
4494
- "description": "Name of the project to create",
4495
- "name": "projectName",
4496
- "required": false
4497
- }
4498
- },
4499
- "description": "Create a new Sanity project",
4500
- "examples": [
4501
- {
4502
- "command": "<%= config.bin %> <%= command.id %>",
4503
- "description": "Interactively create a project"
4504
- },
4505
- {
4506
- "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
4507
- "description": "Create a project named \"My New Project\""
4508
- },
4509
- {
4510
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
4511
- "description": "Create a project in a specific organization"
4512
- },
4513
- {
4514
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
4515
- "description": "Create a project with a private dataset named \"staging\""
4516
- },
4517
- {
4518
- "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
4519
- "description": "Create a project non-interactively with JSON output"
4262
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
4263
+ "description": "Create a project in a specific organization"
4264
+ },
4265
+ {
4266
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
4267
+ "description": "Create a project with a private dataset named \"staging\""
4268
+ },
4269
+ {
4270
+ "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
4271
+ "description": "Create a project non-interactively with JSON output"
4520
4272
  }
4521
4273
  ],
4522
4274
  "flags": {
@@ -5076,6 +4828,254 @@
5076
4828
  "validate.js"
5077
4829
  ]
5078
4830
  },
4831
+ "organizations:create": {
4832
+ "aliases": [],
4833
+ "args": {},
4834
+ "description": "Create a new organization",
4835
+ "examples": [
4836
+ {
4837
+ "command": "<%= config.bin %> <%= command.id %>",
4838
+ "description": "Interactively create an organization"
4839
+ },
4840
+ {
4841
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
4842
+ "description": "Create an organization named \"Acme Corp\""
4843
+ },
4844
+ {
4845
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
4846
+ "description": "Create an organization with a default member role"
4847
+ }
4848
+ ],
4849
+ "flags": {
4850
+ "default-role": {
4851
+ "description": "Default role assigned to new members",
4852
+ "name": "default-role",
4853
+ "required": false,
4854
+ "hasDynamicHelp": false,
4855
+ "multiple": false,
4856
+ "type": "option"
4857
+ },
4858
+ "name": {
4859
+ "description": "Organization name",
4860
+ "name": "name",
4861
+ "required": false,
4862
+ "hasDynamicHelp": false,
4863
+ "multiple": false,
4864
+ "type": "option"
4865
+ }
4866
+ },
4867
+ "hasDynamicHelp": false,
4868
+ "hiddenAliases": [
4869
+ "organization:create",
4870
+ "organisations:create",
4871
+ "organisation:create",
4872
+ "org:create",
4873
+ "orgs:create"
4874
+ ],
4875
+ "id": "organizations:create",
4876
+ "pluginAlias": "@sanity/cli",
4877
+ "pluginName": "@sanity/cli",
4878
+ "pluginType": "core",
4879
+ "strict": true,
4880
+ "isESM": true,
4881
+ "relativePath": [
4882
+ "dist",
4883
+ "commands",
4884
+ "organizations",
4885
+ "create.js"
4886
+ ]
4887
+ },
4888
+ "organizations:delete": {
4889
+ "aliases": [],
4890
+ "args": {
4891
+ "organizationId": {
4892
+ "description": "Organization ID to delete",
4893
+ "name": "organizationId",
4894
+ "required": true
4895
+ }
4896
+ },
4897
+ "description": "Delete an organization",
4898
+ "examples": [
4899
+ {
4900
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
4901
+ "description": "Delete an organization (prompts for confirmation)"
4902
+ },
4903
+ {
4904
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
4905
+ "description": "Delete an organization without confirmation"
4906
+ }
4907
+ ],
4908
+ "flags": {
4909
+ "force": {
4910
+ "description": "Do not prompt for delete confirmation - forcefully delete",
4911
+ "name": "force",
4912
+ "required": false,
4913
+ "allowNo": false,
4914
+ "type": "boolean"
4915
+ }
4916
+ },
4917
+ "hasDynamicHelp": false,
4918
+ "hiddenAliases": [
4919
+ "organization:delete",
4920
+ "organisations:delete",
4921
+ "organisation:delete",
4922
+ "org:delete",
4923
+ "orgs:delete"
4924
+ ],
4925
+ "id": "organizations:delete",
4926
+ "pluginAlias": "@sanity/cli",
4927
+ "pluginName": "@sanity/cli",
4928
+ "pluginType": "core",
4929
+ "strict": true,
4930
+ "isESM": true,
4931
+ "relativePath": [
4932
+ "dist",
4933
+ "commands",
4934
+ "organizations",
4935
+ "delete.js"
4936
+ ]
4937
+ },
4938
+ "organizations:get": {
4939
+ "aliases": [],
4940
+ "args": {
4941
+ "organizationId": {
4942
+ "description": "Organization ID",
4943
+ "name": "organizationId",
4944
+ "required": true
4945
+ }
4946
+ },
4947
+ "description": "Get details of an organization",
4948
+ "examples": [
4949
+ {
4950
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
4951
+ "description": "Get details of a specific organization"
4952
+ }
4953
+ ],
4954
+ "flags": {},
4955
+ "hasDynamicHelp": false,
4956
+ "hiddenAliases": [
4957
+ "organization:get",
4958
+ "organisations:get",
4959
+ "organisation:get",
4960
+ "org:get",
4961
+ "orgs:get"
4962
+ ],
4963
+ "id": "organizations:get",
4964
+ "pluginAlias": "@sanity/cli",
4965
+ "pluginName": "@sanity/cli",
4966
+ "pluginType": "core",
4967
+ "strict": true,
4968
+ "isESM": true,
4969
+ "relativePath": [
4970
+ "dist",
4971
+ "commands",
4972
+ "organizations",
4973
+ "get.js"
4974
+ ]
4975
+ },
4976
+ "organizations:list": {
4977
+ "aliases": [],
4978
+ "args": {},
4979
+ "description": "List organizations you are a member of",
4980
+ "examples": [
4981
+ {
4982
+ "command": "<%= config.bin %> <%= command.id %>",
4983
+ "description": "List all your organizations"
4984
+ }
4985
+ ],
4986
+ "flags": {},
4987
+ "hasDynamicHelp": false,
4988
+ "hiddenAliases": [
4989
+ "organization:list",
4990
+ "organisations:list",
4991
+ "organisation:list",
4992
+ "org:list",
4993
+ "orgs:list"
4994
+ ],
4995
+ "id": "organizations:list",
4996
+ "pluginAlias": "@sanity/cli",
4997
+ "pluginName": "@sanity/cli",
4998
+ "pluginType": "core",
4999
+ "strict": true,
5000
+ "isESM": true,
5001
+ "relativePath": [
5002
+ "dist",
5003
+ "commands",
5004
+ "organizations",
5005
+ "list.js"
5006
+ ]
5007
+ },
5008
+ "organizations:update": {
5009
+ "aliases": [],
5010
+ "args": {
5011
+ "organizationId": {
5012
+ "description": "Organization ID",
5013
+ "name": "organizationId",
5014
+ "required": true
5015
+ }
5016
+ },
5017
+ "description": "Update an organization",
5018
+ "examples": [
5019
+ {
5020
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
5021
+ "description": "Rename an organization"
5022
+ },
5023
+ {
5024
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
5025
+ "description": "Set the organization slug (requires authSAML feature)"
5026
+ },
5027
+ {
5028
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
5029
+ "description": "Change the default member role"
5030
+ }
5031
+ ],
5032
+ "flags": {
5033
+ "default-role": {
5034
+ "description": "New default role for new members",
5035
+ "name": "default-role",
5036
+ "required": false,
5037
+ "hasDynamicHelp": false,
5038
+ "multiple": false,
5039
+ "type": "option"
5040
+ },
5041
+ "name": {
5042
+ "description": "New organization name",
5043
+ "name": "name",
5044
+ "required": false,
5045
+ "hasDynamicHelp": false,
5046
+ "multiple": false,
5047
+ "type": "option"
5048
+ },
5049
+ "slug": {
5050
+ "description": "New URL slug (requires authSAML feature on the organization)",
5051
+ "name": "slug",
5052
+ "required": false,
5053
+ "hasDynamicHelp": false,
5054
+ "multiple": false,
5055
+ "type": "option"
5056
+ }
5057
+ },
5058
+ "hasDynamicHelp": false,
5059
+ "hiddenAliases": [
5060
+ "organization:update",
5061
+ "organisations:update",
5062
+ "organisation:update",
5063
+ "org:update",
5064
+ "orgs:update"
5065
+ ],
5066
+ "id": "organizations:update",
5067
+ "pluginAlias": "@sanity/cli",
5068
+ "pluginName": "@sanity/cli",
5069
+ "pluginType": "core",
5070
+ "strict": true,
5071
+ "isESM": true,
5072
+ "relativePath": [
5073
+ "dist",
5074
+ "commands",
5075
+ "organizations",
5076
+ "update.js"
5077
+ ]
5078
+ },
5079
5079
  "skills:install": {
5080
5080
  "aliases": [],
5081
5081
  "args": {},
@@ -6161,5 +6161,5 @@
6161
6161
  ]
6162
6162
  }
6163
6163
  },
6164
- "version": "8.0.0"
6164
+ "version": "8.0.1"
6165
6165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "cli",
@@ -126,7 +126,7 @@
126
126
  "yaml": "^2.9.0",
127
127
  "zod": "^4.4.3",
128
128
  "@sanity/cli-build": "^5.2.0",
129
- "@sanity/workbench-cli": "^2.0.0",
129
+ "@sanity/workbench-cli": "^2.0.1",
130
130
  "@sanity/cli-core": "^3.0.0"
131
131
  },
132
132
  "devDependencies": {