@sanity/cli-core 3.8.2 → 3.9.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/SanityCommand.d.ts +1 -1
- package/dist/_exports/config.d.ts +4 -4
- package/dist/_exports/config.js.map +1 -1
- package/dist/_exports/index.d.ts +4 -4
- package/dist/_exports/schemas.d.ts +1 -1
- package/dist/_exports/types.d.ts +4 -4
- package/dist/_exports/types.js.map +1 -1
- package/dist/{cliConfig-DUt8uaF6.d.ts → cliConfig-BZgn8ge1.d.ts} +40 -2
- package/dist/config/cli/schemas.js.map +1 -1
- package/dist/config/cli/types/cliConfig.js.map +1 -1
- package/dist/{findStudioConfigPath-CeSHbV0N.d.ts → findStudioConfigPath-B35la6W9.d.ts} +2 -2
- package/dist/{schemas-DDpPtgia.d.ts → schemas-CCgh6idL.d.ts} +4 -2
- package/dist/{workbenchApp-DVKwpTyU.d.ts → workbenchApp-DFUFhE7a.d.ts} +2 -2
- package/package.json +5 -5
package/dist/SanityCommand.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ProjectCliClientOptions, t as GlobalCliClientOptions } from "./apiClient-DXlF5ZV3.js";
|
|
2
|
-
import { r as CliConfig } from "./cliConfig-
|
|
2
|
+
import { r as CliConfig } from "./cliConfig-BZgn8ge1.js";
|
|
3
3
|
import { t as ProjectRootResult } from "./recursivelyResolveProjectRoot-BE54uEP6.js";
|
|
4
4
|
import { t as CLITelemetryStore } from "./types-ZNH3prAd.js";
|
|
5
5
|
import { t as Output } from "./types-CwJLTYDj.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ConfigStore, o as TypeGenConfig, r as CliConfig } from "../cliConfig-
|
|
2
|
-
import { _ as CliTokenInfo, a as getStudioWorkspaces, c as findProjectRoot, d as getCliConfigUncached, f as getCliToken, g as setCliUserConfig, h as getUserConfig, i as isStudioConfig, l as getCliConfigSync, m as getCliUserConfig, n as tryFindStudioConfigPath, o as getStudioConfig, p as getCliTokenInfo, r as findPathForFiles, s as findProjectRootSync, t as findStudioConfigPath, u as getCliConfig, v as clearCliTokenCache } from "../findStudioConfigPath-
|
|
3
|
-
import { n as isWorkbenchApp, r as parseWorkbenchCliConfig } from "../workbenchApp-
|
|
1
|
+
import { i as ConfigStore, o as TypeGenConfig, r as CliConfig, s as TypeGenResource } from "../cliConfig-BZgn8ge1.js";
|
|
2
|
+
import { _ as CliTokenInfo, a as getStudioWorkspaces, c as findProjectRoot, d as getCliConfigUncached, f as getCliToken, g as setCliUserConfig, h as getUserConfig, i as isStudioConfig, l as getCliConfigSync, m as getCliUserConfig, n as tryFindStudioConfigPath, o as getStudioConfig, p as getCliTokenInfo, r as findPathForFiles, s as findProjectRootSync, t as findStudioConfigPath, u as getCliConfig, v as clearCliTokenCache } from "../findStudioConfigPath-B35la6W9.js";
|
|
3
|
+
import { n as isWorkbenchApp, r as parseWorkbenchCliConfig } from "../workbenchApp-DFUFhE7a.js";
|
|
4
4
|
import { a as getSanityDataDir, i as getSanityConfigDir, n as getSanityUrl, r as getSanityEnvVar, t as getWorkspace } from "../getWorkspace-CU32E6Uo.js";
|
|
5
|
-
export { type CliConfig, type CliTokenInfo, type ConfigStore, type TypeGenConfig, clearCliTokenCache, findPathForFiles, findProjectRoot, findProjectRootSync, findStudioConfigPath, getCliConfig, getCliConfigSync, getCliConfigUncached, getCliToken, getCliTokenInfo, getCliUserConfig, getSanityConfigDir, getSanityDataDir, getSanityEnvVar, getSanityUrl, getStudioConfig, getStudioWorkspaces, getUserConfig, getWorkspace, isStudioConfig, isWorkbenchApp, parseWorkbenchCliConfig, setCliUserConfig, tryFindStudioConfigPath };
|
|
5
|
+
export { type CliConfig, type CliTokenInfo, type ConfigStore, type TypeGenConfig, type TypeGenResource, clearCliTokenCache, findPathForFiles, findProjectRoot, findProjectRootSync, findStudioConfigPath, getCliConfig, getCliConfigSync, getCliConfigUncached, getCliToken, getCliTokenInfo, getCliUserConfig, getSanityConfigDir, getSanityDataDir, getSanityEnvVar, getSanityUrl, getStudioConfig, getStudioWorkspaces, getUserConfig, getWorkspace, isStudioConfig, isWorkbenchApp, parseWorkbenchCliConfig, setCliUserConfig, tryFindStudioConfigPath };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/_exports/config.ts"],"sourcesContent":["// Exports related to retrieving CLI, studio, app or workbench configuration or paths.\n\nexport {\n clearCliTokenCache,\n type CliTokenInfo,\n getCliToken,\n getCliTokenInfo,\n getCliUserConfig,\n getUserConfig,\n setCliUserConfig,\n} from '../config/cli/cliUserConfig.js'\nexport {getCliConfig, getCliConfigUncached} from '../config/cli/getCliConfig.js'\nexport {getCliConfigSync} from '../config/cli/getCliConfigSync.js'\nexport {\n type CliConfig,\n type ConfigStore,\n type TypeGenConfig,\n} from '../config/cli/types/cliConfig.js'\nexport {isWorkbenchApp, parseWorkbenchCliConfig} from '../config/cli/workbenchApp.js'\nexport {findProjectRoot} from '../config/findProjectRoot.js'\nexport {findProjectRootSync} from '../config/findProjectRootSync.js'\nexport {getStudioConfig} from '../config/studio/getStudioConfig.js'\nexport {getStudioWorkspaces} from '../config/studio/getStudioWorkspaces.js'\nexport {isStudioConfig} from '../config/studio/isStudioConfig.js'\nexport {findPathForFiles} from '../config/util/findConfigsPaths.js'\nexport {findStudioConfigPath, tryFindStudioConfigPath} from '../config/util/findStudioConfigPath.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'\n"],"names":["clearCliTokenCache","getCliToken","getCliTokenInfo","getCliUserConfig","getUserConfig","setCliUserConfig","getCliConfig","getCliConfigUncached","getCliConfigSync","isWorkbenchApp","parseWorkbenchCliConfig","findProjectRoot","findProjectRootSync","getStudioConfig","getStudioWorkspaces","isStudioConfig","findPathForFiles","findStudioConfigPath","tryFindStudioConfigPath","getSanityConfigDir","getSanityDataDir","getSanityEnvVar","getSanityUrl","getWorkspace"],"mappings":"AAAA,sFAAsF;AAEtF,SACEA,kBAAkB,EAElBC,WAAW,EACXC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,QACX,iCAAgC;AACvC,SAAQC,YAAY,EAAEC,oBAAoB,QAAO,gCAA+B;AAChF,SAAQC,gBAAgB,QAAO,oCAAmC;
|
|
1
|
+
{"version":3,"sources":["../../src/_exports/config.ts"],"sourcesContent":["// Exports related to retrieving CLI, studio, app or workbench configuration or paths.\n\nexport {\n clearCliTokenCache,\n type CliTokenInfo,\n getCliToken,\n getCliTokenInfo,\n getCliUserConfig,\n getUserConfig,\n setCliUserConfig,\n} from '../config/cli/cliUserConfig.js'\nexport {getCliConfig, getCliConfigUncached} from '../config/cli/getCliConfig.js'\nexport {getCliConfigSync} from '../config/cli/getCliConfigSync.js'\nexport {\n type CliConfig,\n type ConfigStore,\n type TypeGenConfig,\n type TypeGenResource,\n} from '../config/cli/types/cliConfig.js'\nexport {isWorkbenchApp, parseWorkbenchCliConfig} from '../config/cli/workbenchApp.js'\nexport {findProjectRoot} from '../config/findProjectRoot.js'\nexport {findProjectRootSync} from '../config/findProjectRootSync.js'\nexport {getStudioConfig} from '../config/studio/getStudioConfig.js'\nexport {getStudioWorkspaces} from '../config/studio/getStudioWorkspaces.js'\nexport {isStudioConfig} from '../config/studio/isStudioConfig.js'\nexport {findPathForFiles} from '../config/util/findConfigsPaths.js'\nexport {findStudioConfigPath, tryFindStudioConfigPath} from '../config/util/findStudioConfigPath.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'\n"],"names":["clearCliTokenCache","getCliToken","getCliTokenInfo","getCliUserConfig","getUserConfig","setCliUserConfig","getCliConfig","getCliConfigUncached","getCliConfigSync","isWorkbenchApp","parseWorkbenchCliConfig","findProjectRoot","findProjectRootSync","getStudioConfig","getStudioWorkspaces","isStudioConfig","findPathForFiles","findStudioConfigPath","tryFindStudioConfigPath","getSanityConfigDir","getSanityDataDir","getSanityEnvVar","getSanityUrl","getWorkspace"],"mappings":"AAAA,sFAAsF;AAEtF,SACEA,kBAAkB,EAElBC,WAAW,EACXC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,QACX,iCAAgC;AACvC,SAAQC,YAAY,EAAEC,oBAAoB,QAAO,gCAA+B;AAChF,SAAQC,gBAAgB,QAAO,oCAAmC;AAOlE,SAAQC,cAAc,EAAEC,uBAAuB,QAAO,gCAA+B;AACrF,SAAQC,eAAe,QAAO,+BAA8B;AAC5D,SAAQC,mBAAmB,QAAO,mCAAkC;AACpE,SAAQC,eAAe,QAAO,sCAAqC;AACnE,SAAQC,mBAAmB,QAAO,0CAAyC;AAC3E,SAAQC,cAAc,QAAO,qCAAoC;AACjE,SAAQC,gBAAgB,QAAO,qCAAoC;AACnE,SAAQC,oBAAoB,EAAEC,uBAAuB,QAAO,yCAAwC;AACpG,SAAQC,kBAAkB,EAAEC,gBAAgB,QAAO,gCAA+B;AAClF,SAAQC,eAAe,QAAO,6BAA4B;AAC1D,SAAQC,YAAY,QAAO,0BAAyB;AACpD,SAAQC,YAAY,QAAO,0BAAyB"}
|
package/dist/_exports/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as getProjectCliClient, n as ProjectCliClientOptions, r as getGlobalCliClient, t as GlobalCliClientOptions } from "../apiClient-DXlF5ZV3.js";
|
|
2
|
-
import { i as ConfigStore, n as AppVisibility, r as CliConfig,
|
|
2
|
+
import { c as UserViteConfig, i as ConfigStore, n as AppVisibility, r as CliConfig, t as APP_VISIBILITIES } from "../cliConfig-BZgn8ge1.js";
|
|
3
3
|
import { t as ProjectRootResult } from "../recursivelyResolveProjectRoot-BE54uEP6.js";
|
|
4
4
|
import { n as ConsentInformation, r as TelemetryUserProperties, t as CLITelemetryStore } from "../types-ZNH3prAd.js";
|
|
5
5
|
import { n as RequireProps, r as SanityOrgUser, t as Output } from "../types-CwJLTYDj.js";
|
|
6
6
|
import { SanityCommand, SanityCommandInterface } from "../SanityCommand.js";
|
|
7
7
|
import { t as mockBrowserEnvironment } from "../mockBrowserEnvironment-BjFQPb2W.js";
|
|
8
|
-
import { _ as CliTokenInfo, a as getStudioWorkspaces, c as findProjectRoot, d as getCliConfigUncached, f as getCliToken, g as setCliUserConfig, h as getUserConfig, i as isStudioConfig, l as getCliConfigSync, m as getCliUserConfig, n as tryFindStudioConfigPath, o as getStudioConfig, p as getCliTokenInfo, r as findPathForFiles, s as findProjectRootSync, t as findStudioConfigPath, u as getCliConfig, v as clearCliTokenCache } from "../findStudioConfigPath-
|
|
9
|
-
import { n as isWorkbenchApp, t as ApplicationType } from "../workbenchApp-
|
|
8
|
+
import { _ as CliTokenInfo, a as getStudioWorkspaces, c as findProjectRoot, d as getCliConfigUncached, f as getCliToken, g as setCliUserConfig, h as getUserConfig, i as isStudioConfig, l as getCliConfigSync, m as getCliUserConfig, n as tryFindStudioConfigPath, o as getStudioConfig, p as getCliTokenInfo, r as findPathForFiles, s as findProjectRootSync, t as findStudioConfigPath, u as getCliConfig, v as clearCliTokenCache } from "../findStudioConfigPath-B35la6W9.js";
|
|
9
|
+
import { n as isWorkbenchApp, t as ApplicationType } from "../workbenchApp-DFUFhE7a.js";
|
|
10
10
|
import { a as getSanityDataDir, i as getSanityConfigDir, n as getSanityUrl, r as getSanityEnvVar, t as getWorkspace } from "../getWorkspace-CU32E6Uo.js";
|
|
11
11
|
import { debug, subdebug } from "./debug.js";
|
|
12
12
|
import { t as NonInteractiveError } from "../NonInteractiveError-CSLT5y93.js";
|
|
@@ -18,7 +18,7 @@ import { a as isCi, i as isInteractive, n as normalizePath, o as importModule, r
|
|
|
18
18
|
import { a as getLocalPackageVersion, i as getLocalPackageDir, n as resolveLocalPackageFrom, r as resolveLocalPackagePath, t as resolveLocalPackage } from "../resolveLocalPackage-Dr-TNTyk.js";
|
|
19
19
|
import { n as ReadPackageJsonOptions, r as readPackageJson, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
|
|
20
20
|
import { n as colorizeJson, t as getTimer } from "../timer-Dwu2TIgB.js";
|
|
21
|
-
import { i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-
|
|
21
|
+
import { i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-CCgh6idL.js";
|
|
22
22
|
import { WorkerOptions } from "node:worker_threads";
|
|
23
23
|
interface PromisifyWorkerOptions extends WorkerOptions {
|
|
24
24
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as cliConfigSchema, i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-
|
|
1
|
+
import { a as cliConfigSchema, i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-CCgh6idL.js";
|
|
2
2
|
export { type CoreAppManifest, type StudioManifest, cliConfigSchema, coreAppManifestSchema, studioManifestSchema };
|
package/dist/_exports/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as ReactCompilerConfig, i as ConfigStore, o as TypeGenConfig, r as CliConfig, s as
|
|
1
|
+
import { a as ReactCompilerConfig, c as UserViteConfig, i as ConfigStore, o as TypeGenConfig, r as CliConfig, s as TypeGenResource } from "../cliConfig-BZgn8ge1.js";
|
|
2
2
|
import { t as ProjectRootResult } from "../recursivelyResolveProjectRoot-BE54uEP6.js";
|
|
3
3
|
import { n as ConsentInformation, r as TelemetryUserProperties, t as CLITelemetryStore } from "../types-ZNH3prAd.js";
|
|
4
4
|
import { n as RequireProps, r as SanityOrgUser, t as Output } from "../types-CwJLTYDj.js";
|
|
5
5
|
import { SanityCommandInterface } from "../SanityCommand.js";
|
|
6
|
-
import { t as ApplicationType } from "../workbenchApp-
|
|
6
|
+
import { t as ApplicationType } from "../workbenchApp-DFUFhE7a.js";
|
|
7
7
|
import { n as ReadPackageJsonOptions, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
|
|
8
|
-
import { n as StudioManifest, t as CoreAppManifest } from "../schemas-
|
|
9
|
-
export type { ApplicationType, CLITelemetryStore, CliConfig, ConfigStore, ConsentInformation, CoreAppManifest, Output, PackageJson, ProjectRootResult, ReactCompilerConfig, ReadPackageJsonOptions, RequireProps, SanityCommandInterface, SanityOrgUser, StudioManifest, TelemetryUserProperties, TypeGenConfig, UserViteConfig };
|
|
8
|
+
import { n as StudioManifest, t as CoreAppManifest } from "../schemas-CCgh6idL.js";
|
|
9
|
+
export type { ApplicationType, CLITelemetryStore, CliConfig, ConfigStore, ConsentInformation, CoreAppManifest, Output, PackageJson, ProjectRootResult, ReactCompilerConfig, ReadPackageJsonOptions, RequireProps, SanityCommandInterface, SanityOrgUser, StudioManifest, TelemetryUserProperties, TypeGenConfig, TypeGenResource, UserViteConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/_exports/types.ts"],"sourcesContent":["export {\n type CliConfig,\n type ConfigStore,\n type ReactCompilerConfig,\n type TypeGenConfig,\n} from '../config/cli/types/cliConfig.js'\nexport {type UserViteConfig} from '../config/cli/types/userViteConfig.js'\nexport {type ApplicationType} from '../config/cli/workbenchApp.js'\nexport {type ProjectRootResult} from '../config/util/recursivelyResolveProjectRoot.js'\nexport {type SanityCommandInterface} from '../SanityCommand.js'\nexport {\n type CLITelemetryStore,\n type ConsentInformation,\n type TelemetryUserProperties,\n} from '../telemetry/types.js'\nexport {type Output, type RequireProps, type SanityOrgUser} from '../types.js'\nexport {type PackageJson, type ReadPackageJsonOptions} from '../util/readPackageJson.js'\nexport {type CoreAppManifest, type StudioManifest} from './schemas.js'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/_exports/types.ts"],"sourcesContent":["export {\n type CliConfig,\n type ConfigStore,\n type ReactCompilerConfig,\n type TypeGenConfig,\n type TypeGenResource,\n} from '../config/cli/types/cliConfig.js'\nexport {type UserViteConfig} from '../config/cli/types/userViteConfig.js'\nexport {type ApplicationType} from '../config/cli/workbenchApp.js'\nexport {type ProjectRootResult} from '../config/util/recursivelyResolveProjectRoot.js'\nexport {type SanityCommandInterface} from '../SanityCommand.js'\nexport {\n type CLITelemetryStore,\n type ConsentInformation,\n type TelemetryUserProperties,\n} from '../telemetry/types.js'\nexport {type Output, type RequireProps, type SanityOrgUser} from '../types.js'\nexport {type PackageJson, type ReadPackageJsonOptions} from '../util/readPackageJson.js'\nexport {type CoreAppManifest, type StudioManifest} from './schemas.js'\n"],"names":[],"mappings":"AAkBA,WAAsE"}
|
|
@@ -57,6 +57,37 @@ interface TypeGenConfig {
|
|
|
57
57
|
path: string | string[];
|
|
58
58
|
schema: string;
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* A dataset to generate types for. Each resource gets its own output file, with its schema
|
|
62
|
+
* and query types registered under its `projectId.dataset` key.
|
|
63
|
+
*
|
|
64
|
+
* @beta
|
|
65
|
+
*/
|
|
66
|
+
interface TypeGenResource {
|
|
67
|
+
/** The dataset name. */
|
|
68
|
+
dataset: string;
|
|
69
|
+
/** Where to write this resource's generated types. Must be unique across resources. */
|
|
70
|
+
generates: string;
|
|
71
|
+
/** The project ID. */
|
|
72
|
+
projectId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Treat fields with a required rule as non-optional, like
|
|
75
|
+
* `sanity schema extract --enforce-required-fields`. Only applies to a schema fetched from
|
|
76
|
+
* the dataset; a local `schema` file already records this.
|
|
77
|
+
* Defaults to `false`
|
|
78
|
+
*/
|
|
79
|
+
enforceRequiredFields?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Glob pattern(s) for the files whose queries belong to this resource.
|
|
82
|
+
* Defaults to the top-level `typegen.path`.
|
|
83
|
+
*/
|
|
84
|
+
path?: string | string[];
|
|
85
|
+
/**
|
|
86
|
+
* Path to a schema extracted with `sanity schema extract`. When omitted, the schema bound to
|
|
87
|
+
* the dataset is fetched.
|
|
88
|
+
*/
|
|
89
|
+
schema?: string;
|
|
90
|
+
}
|
|
60
91
|
/**
|
|
61
92
|
* Dashboard visibility an application can declare. Mirrors Brett's canonical
|
|
62
93
|
* `VISIBILITIES` — the source of truth lives in the application service.
|
|
@@ -189,6 +220,13 @@ interface CliConfig {
|
|
|
189
220
|
* Defaults to `false`
|
|
190
221
|
*/
|
|
191
222
|
enabled?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Generate types separately for each listed dataset. When set, the top-level `schema` and
|
|
225
|
+
* `generates` are not used, and `overloadClientMethods` defaults to `false`.
|
|
226
|
+
*
|
|
227
|
+
* @beta
|
|
228
|
+
*/
|
|
229
|
+
resources?: TypeGenResource[];
|
|
192
230
|
};
|
|
193
231
|
/**
|
|
194
232
|
* Enable Vite's experimental bundled dev mode for `sanity dev`. This serves bundled
|
|
@@ -218,5 +256,5 @@ interface ConfigStore {
|
|
|
218
256
|
/** Write a value by key, merging it into the existing config. */
|
|
219
257
|
set: (key: string, value: unknown) => void;
|
|
220
258
|
}
|
|
221
|
-
export { ReactCompilerConfig as a, ConfigStore as i, AppVisibility as n, TypeGenConfig as o, CliConfig as r,
|
|
222
|
-
//# sourceMappingURL=cliConfig-
|
|
259
|
+
export { ReactCompilerConfig as a, UserViteConfig as c, ConfigStore as i, AppVisibility as n, TypeGenConfig as o, CliConfig as r, TypeGenResource as s, APP_VISIBILITIES as t };
|
|
260
|
+
//# sourceMappingURL=cliConfig-BZgn8ge1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {z} from 'zod/mini'\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {z} from 'zod/mini'\n\nimport {APP_VISIBILITIES, type CliConfig, type ReactCompilerConfig} from './types/cliConfig.js'\nimport {type UserViteConfig} from './types/userViteConfig'\n\n/**\n * @public\n */\nexport const cliConfigSchema = z.object({\n api: z.optional(\n z.object({\n dataset: z.optional(z.string()),\n projectId: z.optional(z.string()),\n }),\n ),\n\n app: z.optional(\n z.object({\n entry: z.optional(z.string()),\n icon: z.optional(z.string()),\n id: z.optional(z.string()),\n organizationId: z.optional(z.string()),\n title: z.optional(z.string()),\n visibility: z.optional(z.enum(APP_VISIBILITIES)),\n }),\n ),\n\n autoUpdates: z.optional(z.boolean()),\n\n deployment: z.optional(\n z.object({\n appId: z.optional(z.string()),\n autoUpdates: z.optional(z.boolean()),\n studioHost: z.optional(\n z.never({\n error:\n 'deployment.studioHost is not supported. Move studioHost to the top level of sanity.cli.ts, or pass --url <hostname> to sanity deploy.',\n }),\n ),\n }),\n ),\n\n graphql: z.optional(\n z.array(\n z.object({\n filterSuffix: z.optional(z.string()),\n generation: z.optional(z.enum(['gen1', 'gen2', 'gen3'])),\n id: z.optional(z.string()),\n nonNullDocumentFields: z.optional(z.boolean()),\n playground: z.optional(z.boolean()),\n source: z.optional(z.string()),\n tag: z.optional(z.string()),\n workspace: z.optional(z.string()),\n }),\n ),\n ),\n\n mediaLibrary: z.optional(\n z.object({\n aspectsPath: z.optional(z.string()),\n }),\n ),\n\n project: z.optional(\n z.object({\n basePath: z.optional(z.string()),\n }),\n ),\n\n reactCompiler: z.optional(z.custom<boolean | ReactCompilerConfig>()),\n\n reactStrictMode: z.optional(z.boolean()),\n\n schemaExtraction: z.optional(\n z.object({\n enabled: z.optional(z.boolean()),\n enforceRequiredFields: z.optional(z.boolean()),\n path: z.optional(z.string()),\n watchPatterns: z.optional(z.array(z.string())),\n workspace: z.optional(z.string()),\n }),\n ),\n\n server: z.optional(\n z.object({\n hostname: z.optional(z.string()),\n port: z.optional(z.number()),\n }),\n ),\n\n studioHost: z.optional(z.string()),\n\n unstable_bundledDev: z.optional(z.boolean()),\n\n vite: z.optional(z.custom<UserViteConfig>()),\n\n typegen: z.optional(z.custom<NonNullable<CliConfig['typegen']>>()),\n}) satisfies z.core.$ZodType<CliConfig>\n"],"names":["z","APP_VISIBILITIES","cliConfigSchema","object","api","optional","dataset","string","projectId","app","entry","icon","id","organizationId","title","visibility","enum","autoUpdates","boolean","deployment","appId","studioHost","never","error","graphql","array","filterSuffix","generation","nonNullDocumentFields","playground","source","tag","workspace","mediaLibrary","aspectsPath","project","basePath","reactCompiler","custom","reactStrictMode","schemaExtraction","enabled","enforceRequiredFields","path","watchPatterns","server","hostname","port","number","unstable_bundledDev","vite","typegen"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/config/cli/types/cliConfig.ts"],"sourcesContent":["import {type PluginOptions as BabelReactCompilerOptions} from 'babel-plugin-react-compiler'\nimport {type ReactCompilerOptions as OxcReactCompilerOptions} from 'oxc-transform-react'\n\nimport {type UserViteConfig} from './userViteConfig'\n\n/**\n * An optional peer dependency's options type, or `unknown` when the peer's\n * typings did not resolve.\n *\n * `babel-plugin-react-compiler` and `oxc-transform-react` are optional peer\n * dependencies, so the type-only imports above only resolve in projects that\n * install them. When one is missing, TypeScript degrades its import to `any`\n * (the unresolved-module error is suppressed inside declaration files under\n * `skipLibCheck`), and intersecting `any` into a {@link ReactCompilerConfig}\n * branch would collapse the whole union to `any` — silently disabling type\n * checking of the `reactCompiler` option, including for the compiler that IS\n * installed. Mapping a missing peer's options to `unknown` (the identity\n * under intersection) instead reduces that branch to just its `transform`\n * discriminator, keeping the other branch fully checked.\n *\n * `unknown extends T` is only true when `T` degraded to `any`/`unknown`;\n * resolved options types pass through untouched. (`0 extends 1 & T` — the\n * usual any-detector — does not work here: an unresolved import produces the\n * checker's error type, which that intersection propagates.)\n */\ntype OptionalPeerOptions<T> = unknown extends T ? unknown : T\n\n/**\n * Configuration for React Compiler.\n *\n * The `transform` field selects which React Compiler transform to run; the\n * remaining options are passed to the selected transform:\n *\n * - `'babel'` (default) - the Babel plugin\n * ({@link https://www.npmjs.com/package/babel-plugin-react-compiler | babel-plugin-react-compiler}\n * must be installed in your project)\n * - `'oxc'` (experimental) - the native Rust port\n * ({@link https://www.npmjs.com/package/oxc-transform-react | oxc-transform-react}\n * must be installed in your project)\n *\n * Each branch's options are only type-checked when the corresponding package\n * is installed; a missing package reduces its branch to just the `transform`\n * discriminator.\n *\n * @public\n */\nexport type ReactCompilerConfig =\n | (OptionalPeerOptions<BabelReactCompilerOptions> & {transform?: 'babel'})\n | (OptionalPeerOptions<OxcReactCompilerOptions> & {transform: 'oxc'})\n\nexport interface TypeGenConfig {\n formatGeneratedCode: boolean\n generates: string\n overloadClientMethods: boolean\n path: string | string[]\n schema: string\n}\n\n/**\n * Dashboard visibility an application can declare. Mirrors Brett's canonical\n * `VISIBILITIES` — the source of truth lives in the application service.\n * @public\n */\nexport const APP_VISIBILITIES = ['default', 'unlisted', 'disabled'] as const\n/** @public */\nexport type AppVisibility = (typeof APP_VISIBILITIES)[number]\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 /**\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 /** The title of the custom app, as it is seen in Dashboard UI */\n title?: string\n /** Dashboard visibility of the application. Defaults to `default`. */\n visibility?: AppVisibility\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 /**\n * Configuration options for React Compiler. Pass `true` to enable it with\n * the default (babel) transform, or an object to configure it — see\n * {@link ReactCompilerConfig} for choosing between the babel and the\n * experimental oxc transform.\n */\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":["APP_VISIBILITIES"],"mappings":"AA0DA;;;;CAIC,GACD,OAAO,MAAMA,mBAAmB;IAAC;IAAW;IAAY;CAAW,CAAS"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/config/cli/types/cliConfig.ts"],"sourcesContent":["import {type PluginOptions as BabelReactCompilerOptions} from 'babel-plugin-react-compiler'\nimport {type ReactCompilerOptions as OxcReactCompilerOptions} from 'oxc-transform-react'\n\nimport {type UserViteConfig} from './userViteConfig'\n\n/**\n * An optional peer dependency's options type, or `unknown` when the peer's\n * typings did not resolve.\n *\n * `babel-plugin-react-compiler` and `oxc-transform-react` are optional peer\n * dependencies, so the type-only imports above only resolve in projects that\n * install them. When one is missing, TypeScript degrades its import to `any`\n * (the unresolved-module error is suppressed inside declaration files under\n * `skipLibCheck`), and intersecting `any` into a {@link ReactCompilerConfig}\n * branch would collapse the whole union to `any` — silently disabling type\n * checking of the `reactCompiler` option, including for the compiler that IS\n * installed. Mapping a missing peer's options to `unknown` (the identity\n * under intersection) instead reduces that branch to just its `transform`\n * discriminator, keeping the other branch fully checked.\n *\n * `unknown extends T` is only true when `T` degraded to `any`/`unknown`;\n * resolved options types pass through untouched. (`0 extends 1 & T` — the\n * usual any-detector — does not work here: an unresolved import produces the\n * checker's error type, which that intersection propagates.)\n */\ntype OptionalPeerOptions<T> = unknown extends T ? unknown : T\n\n/**\n * Configuration for React Compiler.\n *\n * The `transform` field selects which React Compiler transform to run; the\n * remaining options are passed to the selected transform:\n *\n * - `'babel'` (default) - the Babel plugin\n * ({@link https://www.npmjs.com/package/babel-plugin-react-compiler | babel-plugin-react-compiler}\n * must be installed in your project)\n * - `'oxc'` (experimental) - the native Rust port\n * ({@link https://www.npmjs.com/package/oxc-transform-react | oxc-transform-react}\n * must be installed in your project)\n *\n * Each branch's options are only type-checked when the corresponding package\n * is installed; a missing package reduces its branch to just the `transform`\n * discriminator.\n *\n * @public\n */\nexport type ReactCompilerConfig =\n | (OptionalPeerOptions<BabelReactCompilerOptions> & {transform?: 'babel'})\n | (OptionalPeerOptions<OxcReactCompilerOptions> & {transform: 'oxc'})\n\nexport interface TypeGenConfig {\n formatGeneratedCode: boolean\n generates: string\n overloadClientMethods: boolean\n path: string | string[]\n schema: string\n}\n\n/**\n * A dataset to generate types for. Each resource gets its own output file, with its schema\n * and query types registered under its `projectId.dataset` key.\n *\n * @beta\n */\nexport interface TypeGenResource {\n /** The dataset name. */\n dataset: string\n\n /** Where to write this resource's generated types. Must be unique across resources. */\n generates: string\n\n /** The project ID. */\n projectId: string\n\n /**\n * Treat fields with a required rule as non-optional, like\n * `sanity schema extract --enforce-required-fields`. Only applies to a schema fetched from\n * the dataset; a local `schema` file already records this.\n * Defaults to `false`\n */\n enforceRequiredFields?: boolean\n\n /**\n * Glob pattern(s) for the files whose queries belong to this resource.\n * Defaults to the top-level `typegen.path`.\n */\n path?: string | string[]\n\n /**\n * Path to a schema extracted with `sanity schema extract`. When omitted, the schema bound to\n * the dataset is fetched.\n */\n schema?: string\n}\n\n/**\n * Dashboard visibility an application can declare. Mirrors Brett's canonical\n * `VISIBILITIES` — the source of truth lives in the application service.\n * @public\n */\nexport const APP_VISIBILITIES = ['default', 'unlisted', 'disabled'] as const\n/** @public */\nexport type AppVisibility = (typeof APP_VISIBILITIES)[number]\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 /**\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 /** The title of the custom app, as it is seen in Dashboard UI */\n title?: string\n /** Dashboard visibility of the application. Defaults to `default`. */\n visibility?: AppVisibility\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 /**\n * Configuration options for React Compiler. Pass `true` to enable it with\n * the default (babel) transform, or an object to configure it — see\n * {@link ReactCompilerConfig} for choosing between the babel and the\n * experimental oxc transform.\n */\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 * Generate types separately for each listed dataset. When set, the top-level `schema` and\n * `generates` are not used, and `overloadClientMethods` defaults to `false`.\n *\n * @beta\n */\n resources?: TypeGenResource[]\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":["APP_VISIBILITIES"],"mappings":"AA+FA;;;;CAIC,GACD,OAAO,MAAMA,mBAAmB;IAAC;IAAW;IAAY;CAAW,CAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ConfigStore, r as CliConfig } from "./cliConfig-
|
|
1
|
+
import { i as ConfigStore, r as CliConfig } from "./cliConfig-BZgn8ge1.js";
|
|
2
2
|
import { t as ProjectRootResult } from "./recursivelyResolveProjectRoot-BE54uEP6.js";
|
|
3
3
|
import { z } from "zod/mini";
|
|
4
4
|
import { Workspace } from "sanity";
|
|
@@ -280,4 +280,4 @@ declare function findStudioConfigPath(basePath: string): Promise<string>;
|
|
|
280
280
|
*/
|
|
281
281
|
declare function tryFindStudioConfigPath(basePath: string): Promise<string | undefined>;
|
|
282
282
|
export { CliTokenInfo as _, getStudioWorkspaces as a, findProjectRoot as c, getCliConfigUncached as d, getCliToken as f, setCliUserConfig as g, getUserConfig as h, isStudioConfig as i, getCliConfigSync as l, getCliUserConfig as m, tryFindStudioConfigPath as n, getStudioConfig as o, getCliTokenInfo as p, findPathForFiles as r, findProjectRootSync as s, findStudioConfigPath as t, getCliConfig as u, clearCliTokenCache as v };
|
|
283
|
-
//# sourceMappingURL=findStudioConfigPath-
|
|
283
|
+
//# sourceMappingURL=findStudioConfigPath-B35la6W9.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ReactCompilerConfig, o as TypeGenConfig, s as
|
|
1
|
+
import { a as ReactCompilerConfig, c as UserViteConfig, o as TypeGenConfig, s as TypeGenResource } from "./cliConfig-BZgn8ge1.js";
|
|
2
2
|
import { z } from "zod/mini";
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
@@ -64,8 +64,10 @@ declare const cliConfigSchema: z.ZodMiniObject<{
|
|
|
64
64
|
vite: z.ZodMiniOptional<z.ZodMiniCustom<UserViteConfig, UserViteConfig>>;
|
|
65
65
|
typegen: z.ZodMiniOptional<z.ZodMiniCustom<Partial<TypeGenConfig> & {
|
|
66
66
|
enabled?: boolean;
|
|
67
|
+
resources?: TypeGenResource[];
|
|
67
68
|
}, Partial<TypeGenConfig> & {
|
|
68
69
|
enabled?: boolean;
|
|
70
|
+
resources?: TypeGenResource[];
|
|
69
71
|
}>>;
|
|
70
72
|
}, z.core.$strip>;
|
|
71
73
|
/**
|
|
@@ -104,4 +106,4 @@ type CoreAppManifest = z.infer<typeof coreAppManifestSchema>;
|
|
|
104
106
|
declare const studioManifestSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
|
|
105
107
|
type StudioManifest = z.infer<typeof studioManifestSchema>;
|
|
106
108
|
export { cliConfigSchema as a, studioManifestSchema as i, StudioManifest as n, coreAppManifestSchema as r, CoreAppManifest as t };
|
|
107
|
-
//# sourceMappingURL=schemas-
|
|
109
|
+
//# sourceMappingURL=schemas-CCgh6idL.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CliConfig } from "./cliConfig-
|
|
1
|
+
import { r as CliConfig } from "./cliConfig-BZgn8ge1.js";
|
|
2
2
|
import { z } from "zod/mini";
|
|
3
3
|
/**
|
|
4
4
|
* Boolean brand check — used for config-load routing, kept exported for
|
|
@@ -25,4 +25,4 @@ type ApplicationType = z.infer<typeof applicationTypeSchema>;
|
|
|
25
25
|
*/
|
|
26
26
|
declare function parseWorkbenchCliConfig(cliConfig: unknown, projectDir: string): CliConfig;
|
|
27
27
|
export { isWorkbenchApp as n, parseWorkbenchCliConfig as r, ApplicationType as t };
|
|
28
|
-
//# sourceMappingURL=workbenchApp-
|
|
28
|
+
//# sourceMappingURL=workbenchApp-DFUFhE7a.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Sanity CLI core package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"dependencies": {
|
|
122
122
|
"@inquirer/prompts": "^8.5.2",
|
|
123
123
|
"@oclif/core": "^4.11.14",
|
|
124
|
-
"@sanity/client": "^8.
|
|
124
|
+
"@sanity/client": "^8.9.0",
|
|
125
125
|
"boxen": "^8.0.1",
|
|
126
126
|
"empathic": "^2.0.1",
|
|
127
127
|
"get-it": "^9.5.4",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"obug": "^3.0.0",
|
|
135
135
|
"ora": "^9.0.0",
|
|
136
136
|
"rxjs": "^7.8.2",
|
|
137
|
-
"vite": "^8.3.
|
|
137
|
+
"vite": "^8.3.3",
|
|
138
138
|
"wrap-ansi": "^9.0.2",
|
|
139
139
|
"zod": "^4.5.2"
|
|
140
140
|
},
|
|
@@ -151,9 +151,9 @@
|
|
|
151
151
|
"@types/node": "^22.20.0",
|
|
152
152
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
153
153
|
"eslint": "^10.7.0",
|
|
154
|
-
"oxc-transform-react": "^0.
|
|
154
|
+
"oxc-transform-react": "^0.153.0",
|
|
155
155
|
"publint": "^0.3.21",
|
|
156
|
-
"sanity": "^6.
|
|
156
|
+
"sanity": "^6.17.0",
|
|
157
157
|
"typescript": "^6.0.3",
|
|
158
158
|
"vitest": "^4.1.11"
|
|
159
159
|
},
|