@sanity/cli-core 3.0.0 → 3.1.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.
Files changed (57) hide show
  1. package/README.md +7 -6
  2. package/dist/NonInteractiveError-CSLT5y93.d.ts +13 -0
  3. package/dist/ProjectRootNotFoundError-RgthN9uy.d.ts +47 -0
  4. package/dist/SanityCommand.d.ts +26 -355
  5. package/dist/SanityCommand.js +5 -0
  6. package/dist/SanityCommand.js.map +1 -1
  7. package/dist/_exports/browser.d.ts +2 -21
  8. package/dist/_exports/config.d.ts +5 -661
  9. package/dist/_exports/debug.d.ts +4 -8
  10. package/dist/_exports/debug.js +3 -3
  11. package/dist/_exports/debug.js.map +1 -1
  12. package/dist/_exports/errors.d.ts +12 -77
  13. package/dist/_exports/index.d.ts +34 -1674
  14. package/dist/_exports/package-manager.d.ts +14 -207
  15. package/dist/_exports/request.d.ts +52 -69
  16. package/dist/_exports/request.js +5 -4
  17. package/dist/_exports/request.js.map +1 -1
  18. package/dist/_exports/schemas.d.ts +2 -235
  19. package/dist/_exports/tasks.d.ts +2 -120
  20. package/dist/_exports/telemetry.d.ts +2 -156
  21. package/dist/_exports/types.d.ts +9 -475
  22. package/dist/_exports/undeploy.d.ts +38 -51
  23. package/dist/_exports/util.d.ts +6 -137
  24. package/dist/_exports/ux.d.ts +31 -102
  25. package/dist/apiClient-DXlF5ZV3.d.ts +65 -0
  26. package/dist/apiClient.d.ts +2 -79
  27. package/dist/apiClient.js +69 -47
  28. package/dist/apiClient.js.map +1 -1
  29. package/dist/cliConfig-CbW8neMv.d.ts +171 -0
  30. package/dist/errors/enrichAuthError.js +48 -0
  31. package/dist/errors/enrichAuthError.js.map +1 -0
  32. package/dist/errors/getErrorMessage.js +3 -1
  33. package/dist/errors/getErrorMessage.js.map +1 -1
  34. package/dist/executionContext.d.ts +21 -20
  35. package/dist/executionContext.js.map +1 -1
  36. package/dist/exitCodes.d.ts +3 -3
  37. package/dist/findStudioConfigPath-DcKlHhyW.d.ts +265 -0
  38. package/dist/getWorkspace-CU32E6Uo.d.ts +54 -0
  39. package/dist/mockBrowserEnvironment-BjFQPb2W.d.ts +19 -0
  40. package/dist/noopTelemetry-BJRIvASI.d.ts +64 -0
  41. package/dist/readPackageJson-Cr_lbjVR.d.ts +67 -0
  42. package/dist/recursivelyResolveProjectRoot-BE54uEP6.d.ts +18 -0
  43. package/dist/request/createRequester.js +39 -50
  44. package/dist/request/createRequester.js.map +1 -1
  45. package/dist/request/nodeReadableFromWeb.js +64 -0
  46. package/dist/request/nodeReadableFromWeb.js.map +1 -0
  47. package/dist/resolveLocalPackage-Dr-TNTyk.d.ts +78 -0
  48. package/dist/safeStructuredClone-CWB0MXmH.d.ts +58 -0
  49. package/dist/schemas-DRCVXpyW.d.ts +140 -0
  50. package/dist/timer-Dwu2TIgB.d.ts +14 -0
  51. package/dist/tsxWorkerTask-CxG3fWbU.d.ts +97 -0
  52. package/dist/types-CwJLTYDj.d.ts +23 -0
  53. package/dist/types-ZNH3prAd.d.ts +91 -0
  54. package/dist/workbenchApp-Dhtbsuhn.d.ts +22 -0
  55. package/package.json +9 -10
  56. package/dist/request/createIsolatedRequester.js +0 -75
  57. package/dist/request/createIsolatedRequester.js.map +0 -1
@@ -1,223 +1,30 @@
1
- import { z } from "zod/mini";
2
-
1
+ import { a as getLocalPackageVersion, i as getLocalPackageDir, n as resolveLocalPackageFrom, r as resolveLocalPackagePath, t as resolveLocalPackage } from "../resolveLocalPackage-Dr-TNTyk.js";
2
+ import { n as ReadPackageJsonOptions, r as readPackageJson, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
3
3
  /**
4
4
  * Runtime-detectable package managers (excludes 'manual' which is a UI-only choice).
5
5
  */
6
- export declare type DetectedPackageManager = "bun" | "npm" | "pnpm" | "yarn";
7
-
8
- /**
9
- * Return the CLI invocation command for the detected (or provided) package manager.
10
- *
11
- * @param options - Optional `bin` (defaults to `'sanity'`) and `userAgent` override.
12
- * @returns A string like `"npx sanity"`, `"pnpm exec sanity"`, etc.
13
- */
14
- export declare function getBinCommand(options?: {
15
- bin?: string;
16
- userAgent?: string;
17
- }): string;
18
-
19
- /**
20
- * Resolve the filesystem directory of a locally installed package using Node
21
- * module resolution. Works correctly with hoisted packages in monorepos/workspaces,
22
- * pnpm symlinks, and other non-standard node_modules layouts.
23
- *
24
- * @param moduleName - The name of the package in npm.
25
- * @param workDir - The working directory to resolve the module from. (aka project root)
26
- * @returns The absolute path to the package directory.
27
- * @internal
28
- */
29
- export declare function getLocalPackageDir(
30
- moduleName: string,
31
- workDir: string,
32
- ): string;
33
-
34
- /**
35
- * Get the version of a package installed locally.
36
- *
37
- * @param moduleName - The name of the package in npm.
38
- * @param workDir - The working directory to resolve the module from. (aka project root)
39
- * @returns The version of the package installed locally.
40
- * @internal
41
- */
42
- export declare function getLocalPackageVersion(
43
- moduleName: string,
44
- workDir: string,
45
- ): Promise<string | null>;
46
-
6
+ type DetectedPackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn';
47
7
  /**
48
8
  * Convenience wrapper that reads `process.env.npm_config_user_agent` and returns
49
9
  * the detected package manager.
50
10
  */
51
- export declare function getRunningPackageManager():
52
- DetectedPackageManager | undefined;
53
-
11
+ declare function getRunningPackageManager(): DetectedPackageManager | undefined;
54
12
  /**
55
13
  * Extract the yarn major version from a `npm_config_user_agent` string.
56
14
  *
57
15
  * @param ua - User-agent string. Defaults to `process.env.npm_config_user_agent`.
58
16
  * @returns The major version number, or `undefined` if yarn isn't detected.
59
17
  */
60
- export declare function getYarnMajorVersion(ua?: string): number | undefined;
61
-
62
- /**
63
- * Comprehensive representation of a package.json file.
64
- * Consolidates all properties from previous type definitions.
65
- *
66
- * @public
67
- */
68
- export declare type PackageJson = z.infer<typeof packageJsonSchema>;
69
-
70
- /**
71
- * Comprehensive package.json schema including all common properties.
72
- * Feel free to add properties to this,
73
- * 🟠ℹ️ BUT ENSURE OPTIONAL STUFF IS ACTUALLY OPTIONAL ℹ️🟠
74
- * 🟠ℹ️ SINCE THIS IS USED IN A NUMBER OF LOCATIONS WHERE ℹ️🟠
75
- * 🟠ℹ️ WE CANNOT ENFORCE/GUARANTEE ANY PARTICULAR PROPS ℹ️🟠
76
- */
77
- declare const packageJsonSchema: z.ZodMiniObject<
78
- {
79
- name: z.ZodMiniString<string>;
80
- version: z.ZodMiniString<string>;
81
- dependencies: z.ZodMiniOptional<
82
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>
83
- >;
84
- devDependencies: z.ZodMiniOptional<
85
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>
86
- >;
87
- peerDependencies: z.ZodMiniOptional<
88
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>
89
- >;
90
- exports: z.ZodMiniOptional<
91
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>
92
- >;
93
- main: z.ZodMiniOptional<z.ZodMiniString<string>>;
94
- types: z.ZodMiniOptional<z.ZodMiniString<string>>;
95
- author: z.ZodMiniOptional<z.ZodMiniString<string>>;
96
- description: z.ZodMiniOptional<z.ZodMiniString<string>>;
97
- engines: z.ZodMiniOptional<
98
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>
99
- >;
100
- license: z.ZodMiniOptional<z.ZodMiniString<string>>;
101
- private: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
102
- repository: z.ZodMiniOptional<
103
- z.ZodMiniObject<
104
- {
105
- type: z.ZodMiniString<string>;
106
- url: z.ZodMiniString<string>;
107
- },
108
- z.core.$strip
109
- >
110
- >;
111
- scripts: z.ZodMiniOptional<
112
- z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>
113
- >;
114
- type: z.ZodMiniOptional<
115
- z.ZodMiniEnum<{
116
- module: "module";
117
- commonjs: "commonjs";
118
- }>
119
- >;
120
- },
121
- z.core.$loose
122
- >;
123
-
124
- /**
125
- * Read the `package.json` file at the given path
126
- *
127
- * @param filePath - Path to package.json to read
128
- * @param options - Options object for controlling read behavior
129
- * @returns The parsed package.json
130
- * @public
131
- */
132
- export declare function readPackageJson(
133
- filePath: string | URL,
134
- options?: ReadPackageJsonOptions,
135
- ): Promise<PackageJson>;
136
-
137
- /**
138
- * Options for reading package.json files
139
- *
140
- * @public
141
- */
142
- export declare interface ReadPackageJsonOptions {
143
- /**
144
- * Default values to merge with the parsed package.json.
145
- * Parsed values take precedence over defaults.
146
- */
147
- defaults?: Partial<PackageJson>;
148
- /**
149
- * Skip Zod schema validation. When true, the file is parsed but not validated.
150
- * Defaults to false.
151
- */
152
- skipSchemaValidation?: boolean;
153
- }
154
-
155
- /**
156
- * Resolves and imports a package from the local project's node_modules,
157
- * relative to the given working directory. This avoids circular dependencies
158
- * and ensures the correct version of the package is used.
159
- *
160
- * @param packageName - The name of the package to resolve (e.g., 'sanity')
161
- * @param workDir - The working directory to resolve the package from
162
- * @returns The imported module
163
- * @throws If the package cannot be resolved or imported
164
- *
165
- * @example
166
- * ```ts
167
- * const {createSchema} = await resolveLocalPackage('sanity', workDir)
168
- * ```
169
- *
170
- * @internal
171
- */
172
- export declare function resolveLocalPackage<T = unknown>(
173
- packageName: string,
174
- workDir: string,
175
- ): Promise<T>;
176
-
177
- /**
178
- * Resolves and imports a package relative to another resolved module URL.
179
- * Useful for resolving transitive dependencies that may not be directly
180
- * accessible from the project root (e.g., in pnpm strict mode).
181
- *
182
- * @param packageName - The name of the package to resolve
183
- * @param parentUrl - The URL of the parent module to resolve from
184
- * @returns The imported module
185
- * @throws If the package cannot be resolved or imported
186
- *
187
- * @example
188
- * ```ts
189
- * const sanityUrl = resolveLocalPackagePath('sanity', workDir)
190
- * const ui = await resolveLocalPackageFrom<typeof import('@sanity/ui')>('@sanity/ui', sanityUrl)
191
- * ```
192
- *
193
- * @internal
194
- */
195
- export declare function resolveLocalPackageFrom<T = unknown>(
196
- packageName: string,
197
- parentUrl: URL,
198
- ): Promise<T>;
199
-
18
+ declare function getYarnMajorVersion(ua?: string): number | undefined;
200
19
  /**
201
- * Resolves the URL of a package from the local project's node_modules,
202
- * relative to the given working directory, without importing it.
203
- *
204
- * @param packageName - The name of the package to resolve (e.g., 'sanity')
205
- * @param workDir - The working directory to resolve the package from
206
- * @returns The resolved URL of the package entry point
207
- * @throws If the package cannot be resolved
208
- *
209
- * @example
210
- * ```ts
211
- * // Resolve a transitive dependency via its parent package:
212
- * const sanityUrl = resolveLocalPackagePath('sanity', workDir)
213
- * const uiUrl = resolveLocalPackagePathFrom('@sanity/ui', sanityUrl)
214
- * ```
20
+ * Return the CLI invocation command for the detected (or provided) package manager.
215
21
  *
216
- * @internal
22
+ * @param options - Optional `bin` (defaults to `'sanity'`) and `userAgent` override.
23
+ * @returns A string like `"npx sanity"`, `"pnpm exec sanity"`, etc.
217
24
  */
218
- export declare function resolveLocalPackagePath(
219
- packageName: string,
220
- workDir: string,
221
- ): URL;
222
-
223
- export {};
25
+ declare function getBinCommand(options?: {
26
+ bin?: string;
27
+ userAgent?: string;
28
+ }): string;
29
+ export { type DetectedPackageManager, type PackageJson, type ReadPackageJsonOptions, getBinCommand, getLocalPackageDir, getLocalPackageVersion, getRunningPackageManager, getYarnMajorVersion, readPackageJson, resolveLocalPackage, resolveLocalPackageFrom, resolveLocalPackagePath };
30
+ //# sourceMappingURL=package-manager.d.ts.map
@@ -1,79 +1,62 @@
1
- import { agent } from "get-it/middleware";
2
- import { base } from "get-it/middleware";
3
- import { injectResponse } from "get-it/middleware";
4
- import { jsonRequest } from "get-it/middleware";
5
- import { jsonResponse } from "get-it/middleware";
6
- import { keepAlive } from "get-it/middleware";
7
- import { observable } from "get-it/middleware";
8
- import { progress } from "get-it/middleware";
9
- import { proxy } from "get-it/middleware";
10
- import { Requester } from "get-it";
11
- import { retry } from "get-it/middleware";
12
- import { urlEncoded } from "get-it/middleware";
13
-
14
- export { agent };
15
-
16
- export { base };
17
-
1
+ import { BufferedResponse, FetchFunction, HttpError, HttpErrorLike, JsonResponse, RequestFunction, RequestFunction as RequestFunction$1, RequestOptions, RequesterOptions, StreamResponse, TextResponse, TimeoutError, TimeoutErrorLike, TimeoutOptions, TransformMiddleware, WrappingMiddleware, isHttpError, isTimeoutError } from "get-it";
2
+ import { Readable } from "node:stream";
3
+ import { debug, retry } from "get-it/middleware";
18
4
  /**
19
- * Creates a `get-it` requester with a standard set of middleware.
5
+ * Options for creating a Sanity CLI requester.
20
6
  *
21
- * Default middleware (in order):
22
- * 1. `httpErrors()` — throw on HTTP error status codes
23
- * 2. `headers({'User-Agent': '@sanity/cli-core@<version>'})` — identify CLI requests
24
- * 3. `debug({verbose: true, namespace: 'sanity:cli'})` — debug logging
25
- * 4. `promise({onlyBody: true})` — return body directly (must be last)
7
+ * Extends get-it v9's {@link RequesterOptions} with Sanity CLI defaults for
8
+ * User-Agent headers and debug logging.
26
9
  *
27
- * @param options - Optional configuration to disable or customize middleware
28
- * @returns A configured `get-it` requester
29
10
  * @public
30
11
  */
31
- export declare function createRequester(options?: {
32
- middleware?: MiddlewareOptions;
33
- }): Requester;
34
-
35
- export { injectResponse };
36
-
37
- export { jsonRequest };
38
-
39
- export { jsonResponse };
40
-
41
- export { keepAlive };
42
-
12
+ type CreateRequesterOptions = Omit<RequesterOptions, 'headers'> & {
13
+ /**
14
+ * Debug logging middleware. Defaults to enabled with namespace `sanity:cli`.
15
+ * Pass `false` to disable.
16
+ */
17
+ debug?: false | {
18
+ namespace?: string;
19
+ verbose?: boolean;
20
+ };
21
+ /**
22
+ * Default headers for all requests.
23
+ * Omitting uses a lazy User-Agent of `@sanity/cli-core@<version>`.
24
+ * Pass `false` to send no default headers.
25
+ */
26
+ headers?: false | Record<string, string>;
27
+ };
43
28
  /**
44
- * Options for configuring individual middleware in {@link createRequester}.
29
+ * Creates a get-it requester with Sanity CLI defaults.
45
30
  *
46
- * Each key corresponds to a middleware. Omitting a key uses the default,
47
- * `false` disables it, and an object merges with the defaults.
31
+ * Defaults:
32
+ * - User-Agent header: `@sanity/cli-core@<version>` (lazy)
33
+ * - Debug logging via `DEBUG=sanity:cli` (verbose)
34
+ * - HTTP error throwing on (get-it default)
48
35
  *
36
+ * @param options - Optional configuration to customize or disable defaults
37
+ * @returns A configured get-it request function
49
38
  * @public
50
39
  */
51
- export declare type MiddlewareOptions = {
52
- debug?:
53
- | false
54
- | {
55
- namespace?: string;
56
- verbose?: boolean;
57
- };
58
- headers?: false | Record<string, string>;
59
- httpErrors?: false;
60
- promise?:
61
- | false
62
- | {
63
- onlyBody?: boolean;
64
- };
65
- };
66
-
67
- export { observable };
68
-
69
- export { progress };
70
-
71
- export { proxy };
72
-
73
- export { Requester };
74
-
75
- export { retry };
76
-
77
- export { urlEncoded };
78
-
79
- export {};
40
+ declare function createRequester(options: CreateRequesterOptions & {
41
+ as: 'json';
42
+ }): RequestFunction$1<'json'>;
43
+ declare function createRequester(options: CreateRequesterOptions & {
44
+ as: 'text';
45
+ }): RequestFunction$1<'text'>;
46
+ declare function createRequester(options: CreateRequesterOptions & {
47
+ as: 'stream';
48
+ }): RequestFunction$1<'stream'>;
49
+ declare function createRequester(options?: CreateRequesterOptions): RequestFunction$1;
50
+ /**
51
+ * Convert a Web `ReadableStream` to a Node.js `Readable`.
52
+ *
53
+ * Prefer this over `Readable.fromWeb()` while the CLI engines range includes
54
+ * Node versions where `fromWeb` is still experimental (`>=22.12 <22.17`).
55
+ *
56
+ * @param stream - Web readable stream of bytes
57
+ * @returns A Node.js readable stream yielding the same chunks
58
+ * @public
59
+ */
60
+ declare function nodeReadableFromWeb(stream: ReadableStream<Uint8Array>): Readable;
61
+ export { type BufferedResponse, type CreateRequesterOptions, type FetchFunction, HttpError, type HttpErrorLike, type JsonResponse, type RequestFunction, type RequestOptions, type StreamResponse, type TextResponse, TimeoutError, type TimeoutErrorLike, type TimeoutOptions, type TransformMiddleware, type WrappingMiddleware, createRequester, debug, isHttpError, isTimeoutError, nodeReadableFromWeb, retry };
62
+ //# sourceMappingURL=request.d.ts.map
@@ -1,7 +1,8 @@
1
1
  export { createRequester } from '../request/createRequester.js';
2
- // Re-export non-default middleware from get-it for use alongside createRequester.
3
- // Default middleware (httpErrors, headers, debug, promise) are applied automatically
4
- // by createRequester and don't need to be imported separately.
5
- export { agent, base, injectResponse, jsonRequest, jsonResponse, keepAlive, observable, progress, proxy, retry, urlEncoded } from 'get-it/middleware';
2
+ export { nodeReadableFromWeb } from '../request/nodeReadableFromWeb.js';
3
+ // Re-export get-it types and helpers used by consumers of createRequester
4
+ export { HttpError, isHttpError, isTimeoutError, TimeoutError } from 'get-it';
5
+ // Re-export middleware still available in get-it v9
6
+ export { debug, retry } from 'get-it/middleware';
6
7
 
7
8
  //# sourceMappingURL=request.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/request.ts"],"sourcesContent":["export {createRequester, type MiddlewareOptions} from '../request/createRequester.js'\n\n// Re-export get-it types used by consumers of createRequester\nexport {type Requester} from 'get-it'\n\n// Re-export non-default middleware from get-it for use alongside createRequester.\n// Default middleware (httpErrors, headers, debug, promise) are applied automatically\n// by createRequester and don't need to be imported separately.\nexport {\n agent,\n base,\n injectResponse,\n jsonRequest,\n jsonResponse,\n keepAlive,\n observable,\n progress,\n proxy,\n retry,\n urlEncoded,\n} from 'get-it/middleware'\n"],"names":["createRequester","agent","base","injectResponse","jsonRequest","jsonResponse","keepAlive","observable","progress","proxy","retry","urlEncoded"],"mappings":"AAAA,SAAQA,eAAe,QAA+B,gCAA+B;AAKrF,kFAAkF;AAClF,qFAAqF;AACrF,+DAA+D;AAC/D,SACEC,KAAK,EACLC,IAAI,EACJC,cAAc,EACdC,WAAW,EACXC,YAAY,EACZC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,UAAU,QACL,oBAAmB"}
1
+ {"version":3,"sources":["../../src/_exports/request.ts"],"sourcesContent":["export {createRequester, type CreateRequesterOptions} from '../request/createRequester.js'\nexport {nodeReadableFromWeb} from '../request/nodeReadableFromWeb.js'\n\n// Re-export get-it types and helpers used by consumers of createRequester\nexport {\n type BufferedResponse,\n type FetchFunction,\n HttpError,\n type HttpErrorLike,\n isHttpError,\n isTimeoutError,\n type JsonResponse,\n type RequestFunction,\n type RequestOptions,\n type StreamResponse,\n type TextResponse,\n TimeoutError,\n type TimeoutErrorLike,\n type TimeoutOptions,\n type TransformMiddleware,\n type WrappingMiddleware,\n} from 'get-it'\n\n// Re-export middleware still available in get-it v9\nexport {debug, retry} from 'get-it/middleware'\n"],"names":["createRequester","nodeReadableFromWeb","HttpError","isHttpError","isTimeoutError","TimeoutError","debug","retry"],"mappings":"AAAA,SAAQA,eAAe,QAAoC,gCAA+B;AAC1F,SAAQC,mBAAmB,QAAO,oCAAmC;AAErE,0EAA0E;AAC1E,SAGEC,SAAS,EAETC,WAAW,EACXC,cAAc,EAMdC,YAAY,QAKP,SAAQ;AAEf,oDAAoD;AACpD,SAAQC,KAAK,EAAEC,KAAK,QAAO,oBAAmB"}
@@ -1,235 +1,2 @@
1
- import { ConfigEnv } from "vite";
2
- import { EnvironmentConfig } from "babel-plugin-react-compiler";
3
- import { ExternalFunction } from "babel-plugin-react-compiler";
4
- import { InlineConfig } from "vite";
5
- import { Logger } from "babel-plugin-react-compiler";
6
- import { z } from "zod/mini";
7
-
8
- /**
9
- * @public
10
- */
11
- export declare const cliConfigSchema: z.ZodMiniObject<
12
- {
13
- api: z.ZodMiniOptional<
14
- z.ZodMiniObject<
15
- {
16
- dataset: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
- projectId: z.ZodMiniOptional<z.ZodMiniString<string>>;
18
- },
19
- z.core.$strip
20
- >
21
- >;
22
- app: z.ZodMiniOptional<
23
- z.ZodMiniObject<
24
- {
25
- entry: z.ZodMiniOptional<z.ZodMiniString<string>>;
26
- icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
27
- id: z.ZodMiniOptional<z.ZodMiniString<string>>;
28
- organizationId: z.ZodMiniOptional<z.ZodMiniString<string>>;
29
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
30
- visibility: z.ZodMiniOptional<
31
- z.ZodMiniEnum<{
32
- default: "default";
33
- unlisted: "unlisted";
34
- disabled: "disabled";
35
- }>
36
- >;
37
- },
38
- z.core.$strip
39
- >
40
- >;
41
- autoUpdates: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
42
- deployment: z.ZodMiniOptional<
43
- z.ZodMiniObject<
44
- {
45
- appId: z.ZodMiniOptional<z.ZodMiniString<string>>;
46
- autoUpdates: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
47
- },
48
- z.core.$strip
49
- >
50
- >;
51
- graphql: z.ZodMiniOptional<
52
- z.ZodMiniArray<
53
- z.ZodMiniObject<
54
- {
55
- filterSuffix: z.ZodMiniOptional<z.ZodMiniString<string>>;
56
- generation: z.ZodMiniOptional<
57
- z.ZodMiniEnum<{
58
- gen1: "gen1";
59
- gen2: "gen2";
60
- gen3: "gen3";
61
- }>
62
- >;
63
- id: z.ZodMiniOptional<z.ZodMiniString<string>>;
64
- nonNullDocumentFields: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
65
- playground: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
66
- source: z.ZodMiniOptional<z.ZodMiniString<string>>;
67
- tag: z.ZodMiniOptional<z.ZodMiniString<string>>;
68
- workspace: z.ZodMiniOptional<z.ZodMiniString<string>>;
69
- },
70
- z.core.$strip
71
- >
72
- >
73
- >;
74
- mediaLibrary: z.ZodMiniOptional<
75
- z.ZodMiniObject<
76
- {
77
- aspectsPath: z.ZodMiniOptional<z.ZodMiniString<string>>;
78
- },
79
- z.core.$strip
80
- >
81
- >;
82
- project: z.ZodMiniOptional<
83
- z.ZodMiniObject<
84
- {
85
- basePath: z.ZodMiniOptional<z.ZodMiniString<string>>;
86
- },
87
- z.core.$strip
88
- >
89
- >;
90
- reactCompiler: z.ZodMiniOptional<
91
- z.ZodMiniCustom<
92
- Partial<{
93
- environment: Partial<EnvironmentConfig>;
94
- logger: Logger | null;
95
- gating: ExternalFunction | null;
96
- dynamicGating: {
97
- source: string;
98
- } | null;
99
- panicThreshold: "none" | "all_errors" | "critical_errors";
100
- noEmit: boolean;
101
- compilationMode: "syntax" | "infer" | "annotation" | "all";
102
- eslintSuppressionRules: Array<string> | null | undefined;
103
- flowSuppressions: boolean;
104
- ignoreUseNoForget: boolean;
105
- customOptOutDirectives: string[] | null;
106
- sources: Array<string> | ((filename: string) => boolean) | null;
107
- enableReanimatedCheck: boolean;
108
- target:
109
- | "17"
110
- | "18"
111
- | "19"
112
- | {
113
- kind: "donotuse_meta_internal";
114
- runtimeModule: string;
115
- };
116
- }>,
117
- Partial<{
118
- environment: Partial<EnvironmentConfig>;
119
- logger: Logger | null;
120
- gating: ExternalFunction | null;
121
- dynamicGating: {
122
- source: string;
123
- } | null;
124
- panicThreshold: "none" | "all_errors" | "critical_errors";
125
- noEmit: boolean;
126
- compilationMode: "syntax" | "infer" | "annotation" | "all";
127
- eslintSuppressionRules: Array<string> | null | undefined;
128
- flowSuppressions: boolean;
129
- ignoreUseNoForget: boolean;
130
- customOptOutDirectives: string[] | null;
131
- sources: Array<string> | ((filename: string) => boolean) | null;
132
- enableReanimatedCheck: boolean;
133
- target:
134
- | "17"
135
- | "18"
136
- | "19"
137
- | {
138
- kind: "donotuse_meta_internal";
139
- runtimeModule: string;
140
- };
141
- }>
142
- >
143
- >;
144
- reactStrictMode: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
145
- schemaExtraction: z.ZodMiniOptional<
146
- z.ZodMiniObject<
147
- {
148
- enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
149
- enforceRequiredFields: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
150
- path: z.ZodMiniOptional<z.ZodMiniString<string>>;
151
- watchPatterns: z.ZodMiniOptional<
152
- z.ZodMiniArray<z.ZodMiniString<string>>
153
- >;
154
- workspace: z.ZodMiniOptional<z.ZodMiniString<string>>;
155
- },
156
- z.core.$strip
157
- >
158
- >;
159
- server: z.ZodMiniOptional<
160
- z.ZodMiniObject<
161
- {
162
- hostname: z.ZodMiniOptional<z.ZodMiniString<string>>;
163
- port: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
164
- },
165
- z.core.$strip
166
- >
167
- >;
168
- studioHost: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
- unstable_bundledDev: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
170
- vite: z.ZodMiniOptional<z.ZodMiniCustom<UserViteConfig, UserViteConfig>>;
171
- typegen: z.ZodMiniOptional<
172
- z.ZodMiniCustom<
173
- Partial<TypeGenConfig> & {
174
- enabled?: boolean;
175
- },
176
- Partial<TypeGenConfig> & {
177
- enabled?: boolean;
178
- }
179
- >
180
- >;
181
- },
182
- z.core.$strip
183
- >;
184
-
185
- export declare type CoreAppManifest = z.infer<typeof coreAppManifestSchema>;
186
-
187
- /**
188
- * Core-app application manifest. Mirrors the workbench's
189
- * `CoreAppUserApplicationManifest` schema. Strictly validated via zod since the
190
- * CLI produces the payload in full.
191
- */
192
- export declare const coreAppManifestSchema: z.ZodMiniObject<
193
- {
194
- group: z.ZodMiniOptional<z.ZodMiniString<string>>;
195
- icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
196
- priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
197
- slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
198
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
199
- version: z.ZodMiniString<string>;
200
- },
201
- z.core.$strip
202
- >;
203
-
204
- export declare type StudioManifest = z.infer<typeof studioManifestSchema>;
205
-
206
- /**
207
- * Studio application manifest (serialized `create-manifest.json`). Kept loose so
208
- * the CLI isn't coupled to the workbench's evolving client-side schema — the
209
- * workbench consumer is authoritative on the inner shape. See its
210
- * `ClientManifest` for the fields clients expect.
211
- */
212
- export declare const studioManifestSchema: z.ZodMiniRecord<
213
- z.ZodMiniString<string>,
214
- z.ZodMiniUnknown
215
- >;
216
-
217
- declare interface TypeGenConfig {
218
- formatGeneratedCode: boolean;
219
- generates: string;
220
- overloadClientMethods: boolean;
221
- path: string | string[];
222
- schema: string;
223
- }
224
-
225
- /**
226
- * @public
227
- */
228
- declare type UserViteConfig =
229
- | ((
230
- config: InlineConfig,
231
- env: ConfigEnv,
232
- ) => InlineConfig | Promise<InlineConfig>)
233
- | InlineConfig;
234
-
235
- export {};
1
+ import { a as cliConfigSchema, i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-DRCVXpyW.js";
2
+ export { type CoreAppManifest, type StudioManifest, cliConfigSchema, coreAppManifestSchema, studioManifestSchema };