@sanity/cli-core 2.3.0 → 2.4.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.
@@ -81,7 +81,7 @@ declare interface CliConfig {
81
81
  basePath?: string;
82
82
  };
83
83
  /** Configuration options for React Compiler */
84
- reactCompiler?: PluginOptions;
84
+ reactCompiler?: boolean | PluginOptions;
85
85
  /** Wraps the Studio in \<React.StrictMode\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE="true"|"false". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */
86
86
  reactStrictMode?: boolean;
87
87
  /**
@@ -84,7 +84,7 @@ export declare interface CliConfig {
84
84
  basePath?: string;
85
85
  };
86
86
  /** Configuration options for React Compiler */
87
- reactCompiler?: PluginOptions;
87
+ reactCompiler?: boolean | PluginOptions;
88
88
  /** Wraps the Studio in \<React.StrictMode\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE="true"|"false". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */
89
89
  reactStrictMode?: boolean;
90
90
  /**
@@ -123,7 +123,7 @@ export declare interface CliConfig {
123
123
  basePath?: string;
124
124
  };
125
125
  /** Configuration options for React Compiler */
126
- reactCompiler?: PluginOptions;
126
+ reactCompiler?: boolean | PluginOptions;
127
127
  /** Wraps the Studio in \<React.StrictMode\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE="true"|"false". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */
128
128
  reactStrictMode?: boolean;
129
129
  /**
@@ -85,7 +85,7 @@ export declare interface CliConfig {
85
85
  basePath?: string;
86
86
  };
87
87
  /** Configuration options for React Compiler */
88
- reactCompiler?: PluginOptions;
88
+ reactCompiler?: boolean | PluginOptions;
89
89
  /** Wraps the Studio in \<React.StrictMode\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE="true"|"false". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */
90
90
  reactStrictMode?: boolean;
91
91
  /**
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The parts of an undeploy that differ per application backend. The shared
3
+ * sequence — mode selection, target reporting, confirmation, error handling —
4
+ * lives in the host CLI's runner; adapters only resolve and delete.
5
+ */
6
+ export declare interface UndeployAdapter<
7
+ TTarget extends UndeployTarget = UndeployTarget,
8
+ > {
9
+ /** Resolves what an undeploy would delete; read-only. */
10
+ resolveTarget(): Promise<UndeployTargetResolution<TTarget>>;
11
+ type: "coreApp" | "studio";
12
+ /** Deletes the target — the only mutating step, never run on a dry run. */
13
+ undeploy(target: TTarget): Promise<void>;
14
+ }
15
+
16
+ /** An undeploy that deletes the application, along with all its deployments. */
17
+ export declare interface UndeployApplicationTarget extends UndeployTargetDetails {
18
+ deletes: "application";
19
+ id: string;
20
+ }
21
+
22
+ /** An undeploy that deletes an installation's deployed config; the installation stays installed. */
23
+ export declare interface UndeployConfigTarget extends UndeployTargetDetails {
24
+ deletes: "config";
25
+ id: null;
26
+ }
27
+
28
+ /**
29
+ * What an undeploy deletes, resolved once and read by every report — the
30
+ * dry-run plan, the `--json` payloads, and the real run's confirmation prompt —
31
+ * so the human and machine outputs can't drift. Adapters may extend the
32
+ * variants with backend-specific fields; they serialize into `--json` as-is,
33
+ * except the report-only `summary`.
34
+ */
35
+ export declare type UndeployTarget =
36
+ | UndeployApplicationTarget
37
+ | UndeployConfigTarget;
38
+
39
+ declare interface UndeployTargetDetails {
40
+ /** Details of the deployment currently being served; `null` when none is live. */
41
+ activeDeployment: {
42
+ deployedAt: string;
43
+ deployedBy: string;
44
+ } | null;
45
+ /** Hostname the application is served from; freed for anyone to claim after undeploy. */
46
+ appHost: string | null;
47
+ createdAt: string | null;
48
+ organizationId: string | null;
49
+ projectId: string | null;
50
+ title: string | null;
51
+ type: "coreApp" | "studio";
52
+ /** Where the deployed studio/app is currently reachable. */
53
+ url: string | null;
54
+ /**
55
+ * Adapter-authored report lines about what gets deleted (interfaces, config
56
+ * snapshots, …), rendered under the target details. Built from the same data
57
+ * the adapter puts on its target, so the report can't drift from the payload.
58
+ */
59
+ summary?: string[];
60
+ }
61
+
62
+ export declare type UndeployTargetResolution<
63
+ TTarget extends UndeployTarget = UndeployTarget,
64
+ > =
65
+ | {
66
+ message: string;
67
+ solution?: string;
68
+ type: "none";
69
+ }
70
+ | {
71
+ target: TTarget;
72
+ type: "found";
73
+ };
74
+
75
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * What an undeploy deletes, resolved once and read by every report — the
3
+ * dry-run plan, the `--json` payloads, and the real run's confirmation prompt —
4
+ * so the human and machine outputs can't drift. Adapters may extend the
5
+ * variants with backend-specific fields; they serialize into `--json` as-is,
6
+ * except the report-only `summary`.
7
+ */ /**
8
+ * The parts of an undeploy that differ per application backend. The shared
9
+ * sequence — mode selection, target reporting, confirmation, error handling —
10
+ * lives in the host CLI's runner; adapters only resolve and delete.
11
+ */ export { };
12
+
13
+ //# sourceMappingURL=undeploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/_exports/undeploy.ts"],"sourcesContent":["/**\n * What an undeploy deletes, resolved once and read by every report — the\n * dry-run plan, the `--json` payloads, and the real run's confirmation prompt —\n * so the human and machine outputs can't drift. Adapters may extend the\n * variants with backend-specific fields; they serialize into `--json` as-is,\n * except the report-only `summary`.\n */\nexport type UndeployTarget = UndeployApplicationTarget | UndeployConfigTarget\n\n/** An undeploy that deletes the application, along with all its deployments. */\nexport interface UndeployApplicationTarget extends UndeployTargetDetails {\n deletes: 'application'\n id: string\n}\n\n/** An undeploy that deletes an installation's deployed config; the installation stays installed. */\nexport interface UndeployConfigTarget extends UndeployTargetDetails {\n deletes: 'config'\n id: null\n}\n\ninterface UndeployTargetDetails {\n /** Details of the deployment currently being served; `null` when none is live. */\n activeDeployment: {deployedAt: string; deployedBy: string} | null\n /** Hostname the application is served from; freed for anyone to claim after undeploy. */\n appHost: string | null\n createdAt: string | null\n organizationId: string | null\n projectId: string | null\n title: string | null\n type: 'coreApp' | 'studio'\n /** Where the deployed studio/app is currently reachable. */\n url: string | null\n\n /**\n * Adapter-authored report lines about what gets deleted (interfaces, config\n * snapshots, …), rendered under the target details. Built from the same data\n * the adapter puts on its target, so the report can't drift from the payload.\n */\n summary?: string[]\n}\n\nexport type UndeployTargetResolution<TTarget extends UndeployTarget = UndeployTarget> =\n | {message: string; solution?: string; type: 'none'}\n | {target: TTarget; type: 'found'}\n\n/**\n * The parts of an undeploy that differ per application backend. The shared\n * sequence — mode selection, target reporting, confirmation, error handling —\n * lives in the host CLI's runner; adapters only resolve and delete.\n */\nexport interface UndeployAdapter<TTarget extends UndeployTarget = UndeployTarget> {\n /** Resolves what an undeploy would delete; read-only. */\n resolveTarget(): Promise<UndeployTargetResolution<TTarget>>\n type: 'coreApp' | 'studio'\n /** Deletes the target — the only mutating step, never run on a dry run. */\n undeploy(target: TTarget): Promise<void>\n}\n"],"names":[],"mappings":"AAAA;;;;;;CAMC,GAwCD;;;;CAIC,GACD,WAMC"}
@@ -6,6 +6,11 @@
6
6
  */
7
7
  export declare function doImport(source: string): Promise<any>;
8
8
 
9
+ export declare function getCoreAppUrl(
10
+ organizationId: string,
11
+ appId: string,
12
+ ): string;
13
+
9
14
  /**
10
15
  * Returns the base Sanity configuration directory for the current user.
11
16
  * For persistent user settings (auth tokens, preferences, etc.).
@@ -1,6 +1,7 @@
1
1
  // Pure in-memory and zero dep utilities
2
2
  //
3
3
  export { doImport } from '../util/doImport.js';
4
+ export { getCoreAppUrl } from '../util/getCoreAppUrl.js';
4
5
  export { getSanityConfigDir, getSanityDataDir } from '../util/getSanityConfigDir.js';
5
6
  export { getSanityEnvVar } from '../util/getSanityEnvVar.js';
6
7
  export { getSanityUrl } from '../util/getSanityUrl.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/util.ts"],"sourcesContent":["// Pure in-memory and zero dep utilities\n//\nexport {doImport} from '../util/doImport.js'\nexport {getSanityConfigDir, getSanityDataDir} from '../util/getSanityConfigDir.js'\nexport {getSanityEnvVar} from '../util/getSanityEnvVar.js'\nexport {getSanityUrl} from '../util/getSanityUrl.js'\nexport {getWorkspace} from '../util/getWorkspace.js'\nexport {importModule} from '../util/importModule.js'\nexport {isCi} from '../util/isCi.js'\nexport {isInteractive} from '../util/isInteractive.js'\nexport {isStaging} from '../util/isStaging.js'\nexport {isTrueish} from '../util/isTrueish.js'\nexport {normalizePath} from '../util/normalizePath.js'\nexport {safeStructuredClone} from '../util/safeStructuredClone.js'\n"],"names":["doImport","getSanityConfigDir","getSanityDataDir","getSanityEnvVar","getSanityUrl","getWorkspace","importModule","isCi","isInteractive","isStaging","isTrueish","normalizePath","safeStructuredClone"],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,SAAQA,QAAQ,QAAO,sBAAqB;AAC5C,SAAQC,kBAAkB,EAAEC,gBAAgB,QAAO,gCAA+B;AAClF,SAAQC,eAAe,QAAO,6BAA4B;AAC1D,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,IAAI,QAAO,kBAAiB;AACpC,SAAQC,aAAa,QAAO,2BAA0B;AACtD,SAAQC,SAAS,QAAO,uBAAsB;AAC9C,SAAQC,SAAS,QAAO,uBAAsB;AAC9C,SAAQC,aAAa,QAAO,2BAA0B;AACtD,SAAQC,mBAAmB,QAAO,iCAAgC"}
1
+ {"version":3,"sources":["../../src/_exports/util.ts"],"sourcesContent":["// Pure in-memory and zero dep utilities\n//\nexport {doImport} from '../util/doImport.js'\nexport {getCoreAppUrl} from '../util/getCoreAppUrl.js'\nexport {getSanityConfigDir, getSanityDataDir} from '../util/getSanityConfigDir.js'\nexport {getSanityEnvVar} from '../util/getSanityEnvVar.js'\nexport {getSanityUrl} from '../util/getSanityUrl.js'\nexport {getWorkspace} from '../util/getWorkspace.js'\nexport {importModule} from '../util/importModule.js'\nexport {isCi} from '../util/isCi.js'\nexport {isInteractive} from '../util/isInteractive.js'\nexport {isStaging} from '../util/isStaging.js'\nexport {isTrueish} from '../util/isTrueish.js'\nexport {normalizePath} from '../util/normalizePath.js'\nexport {safeStructuredClone} from '../util/safeStructuredClone.js'\n"],"names":["doImport","getCoreAppUrl","getSanityConfigDir","getSanityDataDir","getSanityEnvVar","getSanityUrl","getWorkspace","importModule","isCi","isInteractive","isStaging","isTrueish","normalizePath","safeStructuredClone"],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,SAAQA,QAAQ,QAAO,sBAAqB;AAC5C,SAAQC,aAAa,QAAO,2BAA0B;AACtD,SAAQC,kBAAkB,EAAEC,gBAAgB,QAAO,gCAA+B;AAClF,SAAQC,eAAe,QAAO,6BAA4B;AAC1D,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,IAAI,QAAO,kBAAiB;AACpC,SAAQC,aAAa,QAAO,2BAA0B;AACtD,SAAQC,SAAS,QAAO,uBAAsB;AAC9C,SAAQC,SAAS,QAAO,uBAAsB;AAC9C,SAAQC,aAAa,QAAO,2BAA0B;AACtD,SAAQC,mBAAmB,QAAO,iCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/config/cli/types/cliConfig.ts"],"sourcesContent":["import {type PluginOptions as ReactCompilerConfig} from 'babel-plugin-react-compiler'\n\nimport {type UserViteConfig} from './userViteConfig'\n\nexport interface TypeGenConfig {\n formatGeneratedCode: boolean\n generates: string\n overloadClientMethods: boolean\n path: string | string[]\n schema: string\n}\n\n/**\n * @public\n */\nexport interface CliConfig {\n /** The project ID and dataset the Sanity CLI should use to run its commands */\n api?: {\n dataset?: string\n projectId?: string\n }\n\n /** Configuration for custom Sanity apps built with the App SDK */\n app?: {\n /** The entrypoint for your custom app. By default, `src/App.tsx` */\n entry?: string\n /** Dock group the app renders in. Defaults to `dock.applications`. */\n group?: 'dock.applications' | 'dock.system' | 'dock.user'\n /**\n * Path to an icon file relative to project root.\n * The file must be an SVG.\n */\n icon?: string\n /** @deprecated Use deployment.appId */\n id?: string\n /** The ID for the Sanity organization that manages this application */\n organizationId?: string\n /** Sort position within the dock group, ascending. Defaults to `100`. */\n priority?: number\n /** The title of the custom app, as it is seen in Dashboard UI */\n title?: string\n }\n\n /** @deprecated Use deployment.autoUpdates */\n autoUpdates?: boolean\n\n /** Options for custom app and Studio deployments */\n deployment?: {\n /**\n * The ID for your custom app or Studio. Generated when deploying your app or Studio for the first time.\n * Get your app ID by either:\n * 1. Checking the output of `sanity deploy`, or\n * 2. Checking your project’s Studio tab at https://sanity.io/manage\n *\n * @remarks This is required for all custom app deployments, and for Studios opting in to fine grained version control.\n * {@link https://www.sanity.io/docs/studio/latest-version-of-sanity#k0896ed4574b7}\n */\n appId?: string\n /**\n * Enable automatic updates for your Studio or custom app’s Sanity dependencies.\n * {@link https://www.sanity.io/docs/studio/latest-version-of-sanity}\n */\n autoUpdates?: boolean\n }\n\n /** Define the GraphQL APIs that the CLI can deploy and interact with */\n graphql?: Array<{\n filterSuffix?: string\n generation?: 'gen1' | 'gen2' | 'gen3'\n id?: string\n nonNullDocumentFields?: boolean\n playground?: boolean\n source?: string\n tag?: string\n workspace?: string\n }>\n\n /** Configuration for the Media Library */\n mediaLibrary?: {\n /** The path to the Media Library aspects directory. When using the CLI to manage aspects, this is the directory they will be read from and written to. */\n aspectsPath?: string\n }\n\n /** Contains the property `basePath` which lets you change the top-level slug for the Studio. You typically need to set this if you embed the Studio in another application where it is one of many routes. Defaults to an empty string. */\n project?: {\n basePath?: string\n }\n\n /** Configuration options for React Compiler */\n reactCompiler?: ReactCompilerConfig\n\n /** Wraps the Studio in \\<React.StrictMode\\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE=\"true\"|\"false\". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */\n reactStrictMode?: boolean\n\n /**\n * Configuration for schema extraction (`sanity schema extract`)\n */\n schemaExtraction?: {\n /**\n * Enable schema extraction as part of sanity dev and sanity build\n */\n enabled?: boolean\n\n /**\n * When true, schema fields marked as required will be non-optional in the output.\n * Defaults to `false`\n */\n enforceRequiredFields?: boolean\n\n /**\n * Output path for the extracted schema file.\n * Defaults to `schema.json` in the working directory.\n */\n path?: string\n\n /**\n * Additional glob patterns to watch for schema changes in watch mode.\n * These extend the default patterns:\n * - `sanity.config.{js,jsx,ts,tsx,mjs}`\n * - `schema*\\/**\\/*.{js,jsx,ts,tsx,mjs}`\n */\n watchPatterns?: string[]\n\n /**\n * The name of the workspace to generate a schema for. Required if your Sanity project has more than one\n * workspace.\n */\n workspace?: string\n }\n\n /** Defines the hostname and port that the development server should run on. hostname defaults to localhost, and port to 3333. */\n server?: {\n hostname?: string\n port?: number\n }\n\n /** @deprecated Use deployment.appId */\n studioHost?: string\n\n /**\n * Configuration for Sanity typegen\n */\n typegen?: Partial<TypeGenConfig> & {\n /**\n * Enable typegen as part of sanity dev and sanity build.\n * When enabled, types are generated on startup and when files change.\n * Defaults to `false`\n */\n enabled?: boolean\n }\n\n /**\n * Enable Vite's experimental bundled dev mode for `sanity dev`. This serves bundled\n * files during development, which can speed up startup and reloads for large projects.\n * Defaults to `false`.\n *\n * Unstable: may change or be removed without notice while the underlying Vite\n * feature (`experimental.bundledDev`) is experimental.\n * {@link https://vite.dev/guide/rolldown#full-bundle-mode}\n */\n unstable_bundledDev?: boolean\n\n /** Exposes the default Vite configuration for custom apps and the Studio so it can be changed and extended. */\n vite?: UserViteConfig\n}\n\n/**\n * A raw key-value store for CLI user configuration.\n * Unlike the typed `getCliUserConfig`/`setCliUserConfig`, this operates on\n * arbitrary keys without schema validation.\n *\n * @public\n */\nexport interface ConfigStore {\n /** Remove a key from the config file. */\n delete: (key: string) => void\n /** Read a value by key. Returns `undefined` if the key does not exist. */\n get: (key: string) => unknown\n /** Write a value by key, merging it into the existing config. */\n set: (key: string, value: unknown) => void\n}\n"],"names":[],"mappings":"AAsKA;;;;;;CAMC,GACD,WAOC"}
1
+ {"version":3,"sources":["../../../../src/config/cli/types/cliConfig.ts"],"sourcesContent":["import {type PluginOptions as ReactCompilerConfig} from 'babel-plugin-react-compiler'\n\nimport {type UserViteConfig} from './userViteConfig'\n\nexport interface TypeGenConfig {\n formatGeneratedCode: boolean\n generates: string\n overloadClientMethods: boolean\n path: string | string[]\n schema: string\n}\n\n/**\n * @public\n */\nexport interface CliConfig {\n /** The project ID and dataset the Sanity CLI should use to run its commands */\n api?: {\n dataset?: string\n projectId?: string\n }\n\n /** Configuration for custom Sanity apps built with the App SDK */\n app?: {\n /** The entrypoint for your custom app. By default, `src/App.tsx` */\n entry?: string\n /** Dock group the app renders in. Defaults to `dock.applications`. */\n group?: 'dock.applications' | 'dock.system' | 'dock.user'\n /**\n * Path to an icon file relative to project root.\n * The file must be an SVG.\n */\n icon?: string\n /** @deprecated Use deployment.appId */\n id?: string\n /** The ID for the Sanity organization that manages this application */\n organizationId?: string\n /** Sort position within the dock group, ascending. Defaults to `100`. */\n priority?: number\n /** The title of the custom app, as it is seen in Dashboard UI */\n title?: string\n }\n\n /** @deprecated Use deployment.autoUpdates */\n autoUpdates?: boolean\n\n /** Options for custom app and Studio deployments */\n deployment?: {\n /**\n * The ID for your custom app or Studio. Generated when deploying your app or Studio for the first time.\n * Get your app ID by either:\n * 1. Checking the output of `sanity deploy`, or\n * 2. Checking your project’s Studio tab at https://sanity.io/manage\n *\n * @remarks This is required for all custom app deployments, and for Studios opting in to fine grained version control.\n * {@link https://www.sanity.io/docs/studio/latest-version-of-sanity#k0896ed4574b7}\n */\n appId?: string\n /**\n * Enable automatic updates for your Studio or custom app’s Sanity dependencies.\n * {@link https://www.sanity.io/docs/studio/latest-version-of-sanity}\n */\n autoUpdates?: boolean\n }\n\n /** Define the GraphQL APIs that the CLI can deploy and interact with */\n graphql?: Array<{\n filterSuffix?: string\n generation?: 'gen1' | 'gen2' | 'gen3'\n id?: string\n nonNullDocumentFields?: boolean\n playground?: boolean\n source?: string\n tag?: string\n workspace?: string\n }>\n\n /** Configuration for the Media Library */\n mediaLibrary?: {\n /** The path to the Media Library aspects directory. When using the CLI to manage aspects, this is the directory they will be read from and written to. */\n aspectsPath?: string\n }\n\n /** Contains the property `basePath` which lets you change the top-level slug for the Studio. You typically need to set this if you embed the Studio in another application where it is one of many routes. Defaults to an empty string. */\n project?: {\n basePath?: string\n }\n\n /** Configuration options for React Compiler */\n reactCompiler?: boolean | ReactCompilerConfig\n\n /** Wraps the Studio in \\<React.StrictMode\\> root to aid in flagging potential problems related to concurrent features (startTransition, useTransition, useDeferredValue, Suspense). Can also be enabled by setting SANITY_STUDIO_REACT_STRICT_MODE=\"true\"|\"false\". It only applies to sanity dev in development mode and is ignored in sanity build and in production. Defaults to true. */\n reactStrictMode?: boolean\n\n /**\n * Configuration for schema extraction (`sanity schema extract`)\n */\n schemaExtraction?: {\n /**\n * Enable schema extraction as part of sanity dev and sanity build\n */\n enabled?: boolean\n\n /**\n * When true, schema fields marked as required will be non-optional in the output.\n * Defaults to `false`\n */\n enforceRequiredFields?: boolean\n\n /**\n * Output path for the extracted schema file.\n * Defaults to `schema.json` in the working directory.\n */\n path?: string\n\n /**\n * Additional glob patterns to watch for schema changes in watch mode.\n * These extend the default patterns:\n * - `sanity.config.{js,jsx,ts,tsx,mjs}`\n * - `schema*\\/**\\/*.{js,jsx,ts,tsx,mjs}`\n */\n watchPatterns?: string[]\n\n /**\n * The name of the workspace to generate a schema for. Required if your Sanity project has more than one\n * workspace.\n */\n workspace?: string\n }\n\n /** Defines the hostname and port that the development server should run on. hostname defaults to localhost, and port to 3333. */\n server?: {\n hostname?: string\n port?: number\n }\n\n /** @deprecated Use deployment.appId */\n studioHost?: string\n\n /**\n * Configuration for Sanity typegen\n */\n typegen?: Partial<TypeGenConfig> & {\n /**\n * Enable typegen as part of sanity dev and sanity build.\n * When enabled, types are generated on startup and when files change.\n * Defaults to `false`\n */\n enabled?: boolean\n }\n\n /**\n * Enable Vite's experimental bundled dev mode for `sanity dev`. This serves bundled\n * files during development, which can speed up startup and reloads for large projects.\n * Defaults to `false`.\n *\n * Unstable: may change or be removed without notice while the underlying Vite\n * feature (`experimental.bundledDev`) is experimental.\n * {@link https://vite.dev/guide/rolldown#full-bundle-mode}\n */\n unstable_bundledDev?: boolean\n\n /** Exposes the default Vite configuration for custom apps and the Studio so it can be changed and extended. */\n vite?: UserViteConfig\n}\n\n/**\n * A raw key-value store for CLI user configuration.\n * Unlike the typed `getCliUserConfig`/`setCliUserConfig`, this operates on\n * arbitrary keys without schema validation.\n *\n * @public\n */\nexport interface ConfigStore {\n /** Remove a key from the config file. */\n delete: (key: string) => void\n /** Read a value by key. Returns `undefined` if the key does not exist. */\n get: (key: string) => unknown\n /** Write a value by key, merging it into the existing config. */\n set: (key: string, value: unknown) => void\n}\n"],"names":[],"mappings":"AAsKA;;;;;;CAMC,GACD,WAOC"}
@@ -0,0 +1,6 @@
1
+ import { getSanityUrl } from './getSanityUrl.js';
2
+ export function getCoreAppUrl(organizationId, appId) {
3
+ return getSanityUrl(`/@${organizationId}/application/${appId}`);
4
+ }
5
+
6
+ //# sourceMappingURL=getCoreAppUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/util/getCoreAppUrl.ts"],"sourcesContent":["import {getSanityUrl} from './getSanityUrl.js'\n\nexport function getCoreAppUrl(organizationId: string, appId: string): string {\n return getSanityUrl(`/@${organizationId}/application/${appId}`)\n}\n"],"names":["getSanityUrl","getCoreAppUrl","organizationId","appId"],"mappings":"AAAA,SAAQA,YAAY,QAAO,oBAAmB;AAE9C,OAAO,SAASC,cAAcC,cAAsB,EAAEC,KAAa;IACjE,OAAOH,aAAa,CAAC,EAAE,EAAEE,eAAe,aAAa,EAAEC,OAAO;AAChE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli-core",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Sanity CLI core package",
5
5
  "keywords": [
6
6
  "cli",
@@ -77,6 +77,10 @@
77
77
  "source": "./src/_exports/types.ts",
78
78
  "default": "./dist/_exports/types.js"
79
79
  },
80
+ "./undeploy": {
81
+ "source": "./src/_exports/undeploy.ts",
82
+ "default": "./dist/_exports/undeploy.js"
83
+ },
80
84
  "./util": {
81
85
  "source": "./src/_exports/util.ts",
82
86
  "default": "./dist/_exports/util.js"