@sanity/cli-core 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (34) hide show
  1. package/dist/SanityCommand.d.ts +11 -1
  2. package/dist/SanityCommand.js +14 -4
  3. package/dist/SanityCommand.js.map +1 -1
  4. package/dist/config/cli/schemas.d.ts +34 -185
  5. package/dist/config/cli/schemas.js +5 -2
  6. package/dist/config/cli/schemas.js.map +1 -1
  7. package/dist/config/cli/types/cliConfig.d.ts +9 -0
  8. package/dist/config/cli/types/cliConfig.js.map +1 -1
  9. package/dist/config/studio/readStudioConfig.d.ts +27 -381
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/loaders/studio/studioWorkerLoader.worker.js +9 -24
  14. package/dist/loaders/studio/studioWorkerLoader.worker.js.map +1 -1
  15. package/dist/services/apiClient.d.ts +2 -2
  16. package/dist/services/apiClient.js +6 -6
  17. package/dist/services/apiClient.js.map +1 -1
  18. package/dist/services/cliUserConfig.d.ts +8 -25
  19. package/dist/util/parseStringFlag.d.ts +10 -0
  20. package/dist/util/parseStringFlag.js +19 -0
  21. package/dist/util/parseStringFlag.js.map +1 -0
  22. package/package.json +27 -20
  23. package/dist/config/__tests__/cliToken.test.js +0 -74
  24. package/dist/config/__tests__/cliToken.test.js.map +0 -1
  25. package/dist/config/__tests__/cliUserConfig.test.js +0 -131
  26. package/dist/config/__tests__/cliUserConfig.test.js.map +0 -1
  27. package/dist/config/__tests__/findProjectRoot.test.js +0 -159
  28. package/dist/config/__tests__/findProjectRoot.test.js.map +0 -1
  29. package/dist/config/__tests__/findProjectRootSync.test.js +0 -112
  30. package/dist/config/__tests__/findProjectRootSync.test.js.map +0 -1
  31. package/dist/config/__tests__/getCliConfigSync.test.js +0 -31
  32. package/dist/config/__tests__/getCliConfigSync.test.js.map +0 -1
  33. package/dist/util/__tests__/createExpiringConfig.test.js +0 -400
  34. package/dist/util/__tests__/createExpiringConfig.test.js.map +0 -1
@@ -13,6 +13,8 @@ export declare abstract class SanityCommand<T extends typeof Command> extends Co
13
13
  *
14
14
  * @param args - The global API client options.
15
15
  * @returns The global API client.
16
+ *
17
+ * @deprecated use `getGlobalCliClient` function directly instead.
16
18
  */
17
19
  protected getGlobalApiClient: (args: GlobalCliClientOptions) => Promise<import("@sanity/client").SanityClient>;
18
20
  /**
@@ -20,6 +22,8 @@ export declare abstract class SanityCommand<T extends typeof Command> extends Co
20
22
  *
21
23
  * @param args - The project API client options.
22
24
  * @returns The project API client.
25
+ *
26
+ * @deprecated use `getProjectCliClient` function directly instead.
23
27
  */
24
28
  protected getProjectApiClient: (args: ProjectCliClientOptions) => Promise<import("@sanity/client").SanityClient>;
25
29
  /**
@@ -48,7 +52,7 @@ export declare abstract class SanityCommand<T extends typeof Command> extends Co
48
52
  /**
49
53
  * Get the project's root directory by resolving the config
50
54
  *
51
- * @returns The root project root.
55
+ * @returns The project root result.
52
56
  */
53
57
  protected getProjectRoot(): Promise<ProjectRootResult>;
54
58
  init(): Promise<void>;
@@ -64,5 +68,11 @@ export declare abstract class SanityCommand<T extends typeof Command> extends Co
64
68
  * (eg when running in a CI environment).
65
69
  */
66
70
  protected isUnattended(): boolean;
71
+ /**
72
+ * Resolver for checking if the terminal is interactive. Override in tests to provide mock values.
73
+ *
74
+ * @returns Whether the terminal is interactive.
75
+ */
76
+ protected resolveIsInteractive(): boolean;
67
77
  }
68
78
  export {};
@@ -11,12 +11,16 @@ export class SanityCommand extends Command {
11
11
  *
12
12
  * @param args - The global API client options.
13
13
  * @returns The global API client.
14
+ *
15
+ * @deprecated use `getGlobalCliClient` function directly instead.
14
16
  */ getGlobalApiClient = (args)=>getGlobalCliClient(args);
15
17
  /**
16
18
  * Get the project API client.
17
19
  *
18
20
  * @param args - The project API client options.
19
21
  * @returns The project API client.
22
+ *
23
+ * @deprecated use `getProjectCliClient` function directly instead.
20
24
  */ getProjectApiClient = (args)=>getProjectCliClient(args);
21
25
  /**
22
26
  * Helper for outputting to the console.
@@ -38,8 +42,7 @@ export class SanityCommand extends Command {
38
42
  * @returns The CLI config.
39
43
  */ async getCliConfig() {
40
44
  const root = await this.getProjectRoot();
41
- const config = await getCliConfig(root.directory);
42
- return config;
45
+ return getCliConfig(root.directory);
43
46
  }
44
47
  /**
45
48
  * Get the project ID from the CLI config.
@@ -52,7 +55,7 @@ export class SanityCommand extends Command {
52
55
  /**
53
56
  * Get the project's root directory by resolving the config
54
57
  *
55
- * @returns The root project root.
58
+ * @returns The project root result.
56
59
  */ getProjectRoot() {
57
60
  return findProjectRoot(process.cwd());
58
61
  }
@@ -79,7 +82,14 @@ export class SanityCommand extends Command {
79
82
  * some commands may also be run in unattended mode if `process.stdin` is not a TTY
80
83
  * (eg when running in a CI environment).
81
84
  */ isUnattended() {
82
- return this.flags.yes || !isInteractive();
85
+ return this.flags.yes || !this.resolveIsInteractive();
86
+ }
87
+ /**
88
+ * Resolver for checking if the terminal is interactive. Override in tests to provide mock values.
89
+ *
90
+ * @returns Whether the terminal is interactive.
91
+ */ resolveIsInteractive() {
92
+ return isInteractive();
83
93
  }
84
94
  }
85
95
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SanityCommand.ts"],"sourcesContent":["import {Command, Interfaces} from '@oclif/core'\n\nimport {getCliConfig} from './config/cli/getCliConfig.js'\nimport {type CliConfig} from './config/cli/types/cliConfig.js'\nimport {findProjectRoot} from './config/findProjectRoot.js'\nimport {type ProjectRootResult} from './config/util/recursivelyResolveProjectRoot.js'\nimport {\n getGlobalCliClient,\n getProjectCliClient,\n type GlobalCliClientOptions,\n type ProjectCliClientOptions,\n} from './services/apiClient.js'\nimport {type Output} from './types.js'\nimport {isInteractive} from './util/isInteractive.js'\n\ntype Flags<T extends typeof Command> = Interfaces.InferredFlags<\n (typeof SanityCommand)['baseFlags'] & T['flags']\n>\n\ntype Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>\n\nexport abstract class SanityCommand<T extends typeof Command> extends Command {\n protected args!: Args<T>\n protected flags!: Flags<T>\n\n /**\n * Get the global API client.\n *\n * @param args - The global API client options.\n * @returns The global API client.\n */\n protected getGlobalApiClient = (args: GlobalCliClientOptions) => getGlobalCliClient(args)\n\n /**\n * Get the project API client.\n *\n * @param args - The project API client options.\n * @returns The project API client.\n */\n protected getProjectApiClient = (args: ProjectCliClientOptions) => getProjectCliClient(args)\n\n /**\n * Helper for outputting to the console.\n *\n * @example\n * ```ts\n * this.output.log('Hello')\n * this.output.warn('Warning')\n * this.output.error('Error')\n * ```\n */\n protected output: Output = {\n error: this.error.bind(this),\n log: this.log.bind(this),\n warn: this.warn.bind(this),\n }\n\n /**\n * Get the CLI config.\n *\n * @returns The CLI config.\n */\n protected async getCliConfig(): Promise<CliConfig> {\n const root = await this.getProjectRoot()\n const config = await getCliConfig(root.directory)\n\n return config\n }\n\n /**\n * Get the project ID from the CLI config.\n *\n * @returns The project ID or `undefined` if it's not set.\n */\n protected async getProjectId(): Promise<string | undefined> {\n const config = await this.getCliConfig()\n\n return config.api?.projectId\n }\n\n /**\n * Get the project's root directory by resolving the config\n *\n * @returns The root project root.\n */\n protected getProjectRoot(): Promise<ProjectRootResult> {\n return findProjectRoot(process.cwd())\n }\n\n public async init(): Promise<void> {\n const {args, flags} = await this.parse({\n args: this.ctor.args,\n baseFlags: (super.ctor as typeof SanityCommand).baseFlags,\n enableJsonFlag: this.ctor.enableJsonFlag,\n flags: this.ctor.flags,\n strict: this.ctor.strict,\n })\n\n this.args = args as Args<T>\n this.flags = flags as Flags<T>\n\n await super.init()\n }\n\n /**\n * Check if the command is running in unattended mode.\n *\n * This means the command should not ask for user input, instead using defaults where\n * possible, and if that does not make sense (eg there's missing information), then we\n * should error out (remember to exit with a non-zero code).\n *\n * Most commands should take an explicit `--yes` flag to enable unattended mode, but\n * some commands may also be run in unattended mode if `process.stdin` is not a TTY\n * (eg when running in a CI environment).\n */\n protected isUnattended(): boolean {\n return this.flags.yes || !isInteractive()\n }\n}\n"],"names":["Command","getCliConfig","findProjectRoot","getGlobalCliClient","getProjectCliClient","isInteractive","SanityCommand","args","flags","getGlobalApiClient","getProjectApiClient","output","error","bind","log","warn","root","getProjectRoot","config","directory","getProjectId","api","projectId","process","cwd","init","parse","ctor","baseFlags","enableJsonFlag","strict","isUnattended","yes"],"mappings":"AAAA,SAAQA,OAAO,QAAmB,cAAa;AAE/C,SAAQC,YAAY,QAAO,+BAA8B;AAEzD,SAAQC,eAAe,QAAO,8BAA6B;AAE3D,SACEC,kBAAkB,EAClBC,mBAAmB,QAGd,0BAAyB;AAEhC,SAAQC,aAAa,QAAO,0BAAyB;AAQrD,OAAO,MAAeC,sBAAgDN;IAC1DO,KAAc;IACdC,MAAgB;IAE1B;;;;;GAKC,GACD,AAAUC,qBAAqB,CAACF,OAAiCJ,mBAAmBI,MAAK;IAEzF;;;;;GAKC,GACD,AAAUG,sBAAsB,CAACH,OAAkCH,oBAAoBG,MAAK;IAE5F;;;;;;;;;GASC,GACD,AAAUI,SAAiB;QACzBC,OAAO,IAAI,CAACA,KAAK,CAACC,IAAI,CAAC,IAAI;QAC3BC,KAAK,IAAI,CAACA,GAAG,CAACD,IAAI,CAAC,IAAI;QACvBE,MAAM,IAAI,CAACA,IAAI,CAACF,IAAI,CAAC,IAAI;IAC3B,EAAC;IAED;;;;GAIC,GACD,MAAgBZ,eAAmC;QACjD,MAAMe,OAAO,MAAM,IAAI,CAACC,cAAc;QACtC,MAAMC,SAAS,MAAMjB,aAAae,KAAKG,SAAS;QAEhD,OAAOD;IACT;IAEA;;;;GAIC,GACD,MAAgBE,eAA4C;QAC1D,MAAMF,SAAS,MAAM,IAAI,CAACjB,YAAY;QAEtC,OAAOiB,OAAOG,GAAG,EAAEC;IACrB;IAEA;;;;GAIC,GACD,AAAUL,iBAA6C;QACrD,OAAOf,gBAAgBqB,QAAQC,GAAG;IACpC;IAEA,MAAaC,OAAsB;QACjC,MAAM,EAAClB,IAAI,EAAEC,KAAK,EAAC,GAAG,MAAM,IAAI,CAACkB,KAAK,CAAC;YACrCnB,MAAM,IAAI,CAACoB,IAAI,CAACpB,IAAI;YACpBqB,WAAW,AAAC,KAAK,CAACD,KAA8BC,SAAS;YACzDC,gBAAgB,IAAI,CAACF,IAAI,CAACE,cAAc;YACxCrB,OAAO,IAAI,CAACmB,IAAI,CAACnB,KAAK;YACtBsB,QAAQ,IAAI,CAACH,IAAI,CAACG,MAAM;QAC1B;QAEA,IAAI,CAACvB,IAAI,GAAGA;QACZ,IAAI,CAACC,KAAK,GAAGA;QAEb,MAAM,KAAK,CAACiB;IACd;IAEA;;;;;;;;;;GAUC,GACD,AAAUM,eAAwB;QAChC,OAAO,IAAI,CAACvB,KAAK,CAACwB,GAAG,IAAI,CAAC3B;IAC5B;AACF"}
1
+ {"version":3,"sources":["../src/SanityCommand.ts"],"sourcesContent":["import {Command, Interfaces} from '@oclif/core'\n\nimport {getCliConfig} from './config/cli/getCliConfig.js'\nimport {type CliConfig} from './config/cli/types/cliConfig.js'\nimport {findProjectRoot} from './config/findProjectRoot.js'\nimport {type ProjectRootResult} from './config/util/recursivelyResolveProjectRoot.js'\nimport {\n getGlobalCliClient,\n getProjectCliClient,\n type GlobalCliClientOptions,\n type ProjectCliClientOptions,\n} from './services/apiClient.js'\nimport {type Output} from './types.js'\nimport {isInteractive} from './util/isInteractive.js'\n\ntype Flags<T extends typeof Command> = Interfaces.InferredFlags<\n (typeof SanityCommand)['baseFlags'] & T['flags']\n>\n\ntype Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>\n\nexport abstract class SanityCommand<T extends typeof Command> extends Command {\n protected args!: Args<T>\n protected flags!: Flags<T>\n\n /**\n * Get the global API client.\n *\n * @param args - The global API client options.\n * @returns The global API client.\n *\n * @deprecated use `getGlobalCliClient` function directly instead.\n */\n protected getGlobalApiClient = (args: GlobalCliClientOptions) => getGlobalCliClient(args)\n\n /**\n * Get the project API client.\n *\n * @param args - The project API client options.\n * @returns The project API client.\n *\n * @deprecated use `getProjectCliClient` function directly instead.\n */\n protected getProjectApiClient = (args: ProjectCliClientOptions) => getProjectCliClient(args)\n\n /**\n * Helper for outputting to the console.\n *\n * @example\n * ```ts\n * this.output.log('Hello')\n * this.output.warn('Warning')\n * this.output.error('Error')\n * ```\n */\n protected output: Output = {\n error: this.error.bind(this),\n log: this.log.bind(this),\n warn: this.warn.bind(this),\n }\n\n /**\n * Get the CLI config.\n *\n * @returns The CLI config.\n */\n protected async getCliConfig(): Promise<CliConfig> {\n const root = await this.getProjectRoot()\n\n return getCliConfig(root.directory)\n }\n\n /**\n * Get the project ID from the CLI config.\n *\n * @returns The project ID or `undefined` if it's not set.\n */\n protected async getProjectId(): Promise<string | undefined> {\n const config = await this.getCliConfig()\n\n return config.api?.projectId\n }\n\n /**\n * Get the project's root directory by resolving the config\n *\n * @returns The project root result.\n */\n protected getProjectRoot(): Promise<ProjectRootResult> {\n return findProjectRoot(process.cwd())\n }\n\n public async init(): Promise<void> {\n const {args, flags} = await this.parse({\n args: this.ctor.args,\n baseFlags: (super.ctor as typeof SanityCommand).baseFlags,\n enableJsonFlag: this.ctor.enableJsonFlag,\n flags: this.ctor.flags,\n strict: this.ctor.strict,\n })\n\n this.args = args as Args<T>\n this.flags = flags as Flags<T>\n\n await super.init()\n }\n\n /**\n * Check if the command is running in unattended mode.\n *\n * This means the command should not ask for user input, instead using defaults where\n * possible, and if that does not make sense (eg there's missing information), then we\n * should error out (remember to exit with a non-zero code).\n *\n * Most commands should take an explicit `--yes` flag to enable unattended mode, but\n * some commands may also be run in unattended mode if `process.stdin` is not a TTY\n * (eg when running in a CI environment).\n */\n protected isUnattended(): boolean {\n return this.flags.yes || !this.resolveIsInteractive()\n }\n\n /**\n * Resolver for checking if the terminal is interactive. Override in tests to provide mock values.\n *\n * @returns Whether the terminal is interactive.\n */\n protected resolveIsInteractive(): boolean {\n return isInteractive()\n }\n}\n"],"names":["Command","getCliConfig","findProjectRoot","getGlobalCliClient","getProjectCliClient","isInteractive","SanityCommand","args","flags","getGlobalApiClient","getProjectApiClient","output","error","bind","log","warn","root","getProjectRoot","directory","getProjectId","config","api","projectId","process","cwd","init","parse","ctor","baseFlags","enableJsonFlag","strict","isUnattended","yes","resolveIsInteractive"],"mappings":"AAAA,SAAQA,OAAO,QAAmB,cAAa;AAE/C,SAAQC,YAAY,QAAO,+BAA8B;AAEzD,SAAQC,eAAe,QAAO,8BAA6B;AAE3D,SACEC,kBAAkB,EAClBC,mBAAmB,QAGd,0BAAyB;AAEhC,SAAQC,aAAa,QAAO,0BAAyB;AAQrD,OAAO,MAAeC,sBAAgDN;IAC1DO,KAAc;IACdC,MAAgB;IAE1B;;;;;;;GAOC,GACD,AAAUC,qBAAqB,CAACF,OAAiCJ,mBAAmBI,MAAK;IAEzF;;;;;;;GAOC,GACD,AAAUG,sBAAsB,CAACH,OAAkCH,oBAAoBG,MAAK;IAE5F;;;;;;;;;GASC,GACD,AAAUI,SAAiB;QACzBC,OAAO,IAAI,CAACA,KAAK,CAACC,IAAI,CAAC,IAAI;QAC3BC,KAAK,IAAI,CAACA,GAAG,CAACD,IAAI,CAAC,IAAI;QACvBE,MAAM,IAAI,CAACA,IAAI,CAACF,IAAI,CAAC,IAAI;IAC3B,EAAC;IAED;;;;GAIC,GACD,MAAgBZ,eAAmC;QACjD,MAAMe,OAAO,MAAM,IAAI,CAACC,cAAc;QAEtC,OAAOhB,aAAae,KAAKE,SAAS;IACpC;IAEA;;;;GAIC,GACD,MAAgBC,eAA4C;QAC1D,MAAMC,SAAS,MAAM,IAAI,CAACnB,YAAY;QAEtC,OAAOmB,OAAOC,GAAG,EAAEC;IACrB;IAEA;;;;GAIC,GACD,AAAUL,iBAA6C;QACrD,OAAOf,gBAAgBqB,QAAQC,GAAG;IACpC;IAEA,MAAaC,OAAsB;QACjC,MAAM,EAAClB,IAAI,EAAEC,KAAK,EAAC,GAAG,MAAM,IAAI,CAACkB,KAAK,CAAC;YACrCnB,MAAM,IAAI,CAACoB,IAAI,CAACpB,IAAI;YACpBqB,WAAW,AAAC,KAAK,CAACD,KAA8BC,SAAS;YACzDC,gBAAgB,IAAI,CAACF,IAAI,CAACE,cAAc;YACxCrB,OAAO,IAAI,CAACmB,IAAI,CAACnB,KAAK;YACtBsB,QAAQ,IAAI,CAACH,IAAI,CAACG,MAAM;QAC1B;QAEA,IAAI,CAACvB,IAAI,GAAGA;QACZ,IAAI,CAACC,KAAK,GAAGA;QAEb,MAAM,KAAK,CAACiB;IACd;IAEA;;;;;;;;;;GAUC,GACD,AAAUM,eAAwB;QAChC,OAAO,IAAI,CAACvB,KAAK,CAACwB,GAAG,IAAI,CAAC,IAAI,CAACC,oBAAoB;IACrD;IAEA;;;;GAIC,GACD,AAAUA,uBAAgC;QACxC,OAAO5B;IACT;AACF"}
@@ -7,89 +7,49 @@ export declare const cliConfigSchema: z.ZodObject<{
7
7
  api: z.ZodOptional<z.ZodObject<{
8
8
  dataset: z.ZodOptional<z.ZodString>;
9
9
  projectId: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- dataset?: string | undefined;
12
- projectId?: string | undefined;
13
- }, {
14
- dataset?: string | undefined;
15
- projectId?: string | undefined;
16
- }>>;
10
+ }, z.core.$strip>>;
17
11
  app: z.ZodOptional<z.ZodObject<{
18
12
  entry: z.ZodOptional<z.ZodString>;
13
+ icon: z.ZodOptional<z.ZodString>;
19
14
  id: z.ZodOptional<z.ZodString>;
20
15
  organizationId: z.ZodOptional<z.ZodString>;
21
- }, "strip", z.ZodTypeAny, {
22
- entry?: string | undefined;
23
- id?: string | undefined;
24
- organizationId?: string | undefined;
25
- }, {
26
- entry?: string | undefined;
27
- id?: string | undefined;
28
- organizationId?: string | undefined;
29
- }>>;
16
+ title: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>>;
30
18
  autoUpdates: z.ZodOptional<z.ZodBoolean>;
31
19
  deployment: z.ZodOptional<z.ZodObject<{
32
20
  appId: z.ZodOptional<z.ZodString>;
33
21
  autoUpdates: z.ZodOptional<z.ZodBoolean>;
34
- }, "strip", z.ZodTypeAny, {
35
- autoUpdates?: boolean | undefined;
36
- appId?: string | undefined;
37
- }, {
38
- autoUpdates?: boolean | undefined;
39
- appId?: string | undefined;
40
- }>>;
22
+ }, z.core.$strip>>;
41
23
  graphql: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
24
  filterSuffix: z.ZodOptional<z.ZodString>;
43
- generation: z.ZodOptional<z.ZodEnum<["gen1", "gen2", "gen3"]>>;
25
+ generation: z.ZodOptional<z.ZodEnum<{
26
+ gen1: "gen1";
27
+ gen2: "gen2";
28
+ gen3: "gen3";
29
+ }>>;
44
30
  id: z.ZodOptional<z.ZodString>;
45
31
  nonNullDocumentFields: z.ZodOptional<z.ZodBoolean>;
46
32
  playground: z.ZodOptional<z.ZodBoolean>;
47
33
  source: z.ZodOptional<z.ZodString>;
48
34
  tag: z.ZodOptional<z.ZodString>;
49
35
  workspace: z.ZodOptional<z.ZodString>;
50
- }, "strip", z.ZodTypeAny, {
51
- id?: string | undefined;
52
- filterSuffix?: string | undefined;
53
- generation?: "gen1" | "gen2" | "gen3" | undefined;
54
- nonNullDocumentFields?: boolean | undefined;
55
- playground?: boolean | undefined;
56
- source?: string | undefined;
57
- tag?: string | undefined;
58
- workspace?: string | undefined;
59
- }, {
60
- id?: string | undefined;
61
- filterSuffix?: string | undefined;
62
- generation?: "gen1" | "gen2" | "gen3" | undefined;
63
- nonNullDocumentFields?: boolean | undefined;
64
- playground?: boolean | undefined;
65
- source?: string | undefined;
66
- tag?: string | undefined;
67
- workspace?: string | undefined;
68
- }>, "many">>;
36
+ }, z.core.$strip>>>;
69
37
  mediaLibrary: z.ZodOptional<z.ZodObject<{
70
38
  aspectsPath: z.ZodOptional<z.ZodString>;
71
- }, "strip", z.ZodTypeAny, {
72
- aspectsPath?: string | undefined;
73
- }, {
74
- aspectsPath?: string | undefined;
75
- }>>;
39
+ }, z.core.$strip>>;
76
40
  project: z.ZodOptional<z.ZodObject<{
77
41
  basePath: z.ZodOptional<z.ZodString>;
78
- }, "strip", z.ZodTypeAny, {
79
- basePath?: string | undefined;
80
- }, {
81
- basePath?: string | undefined;
82
- }>>;
83
- reactCompiler: z.ZodOptional<z.ZodType<Partial<{
42
+ }, z.core.$strip>>;
43
+ reactCompiler: z.ZodOptional<z.ZodCustom<Partial<{
84
44
  environment: Partial<import("babel-plugin-react-compiler").EnvironmentConfig>;
85
45
  logger: import("babel-plugin-react-compiler").Logger | null;
86
46
  gating: import("babel-plugin-react-compiler").ExternalFunction | null;
87
47
  dynamicGating: {
88
48
  source: string;
89
49
  } | null;
90
- panicThreshold: unknown;
50
+ panicThreshold: "none" | "all_errors" | "critical_errors";
91
51
  noEmit: boolean;
92
- compilationMode: unknown;
52
+ compilationMode: "syntax" | "infer" | "annotation" | "all";
93
53
  eslintSuppressionRules: Array<string> | null | undefined;
94
54
  flowSuppressions: boolean;
95
55
  ignoreUseNoForget: boolean;
@@ -100,16 +60,16 @@ export declare const cliConfigSchema: z.ZodObject<{
100
60
  kind: "donotuse_meta_internal";
101
61
  runtimeModule: string;
102
62
  };
103
- }>, z.ZodTypeDef, Partial<{
63
+ }>, Partial<{
104
64
  environment: Partial<import("babel-plugin-react-compiler").EnvironmentConfig>;
105
65
  logger: import("babel-plugin-react-compiler").Logger | null;
106
66
  gating: import("babel-plugin-react-compiler").ExternalFunction | null;
107
67
  dynamicGating: {
108
68
  source: string;
109
69
  } | null;
110
- panicThreshold: unknown;
70
+ panicThreshold: "none" | "all_errors" | "critical_errors";
111
71
  noEmit: boolean;
112
- compilationMode: unknown;
72
+ compilationMode: "syntax" | "infer" | "annotation" | "all";
113
73
  eslintSuppressionRules: Array<string> | null | undefined;
114
74
  flowSuppressions: boolean;
115
75
  ignoreUseNoForget: boolean;
@@ -125,131 +85,20 @@ export declare const cliConfigSchema: z.ZodObject<{
125
85
  server: z.ZodOptional<z.ZodObject<{
126
86
  hostname: z.ZodOptional<z.ZodString>;
127
87
  port: z.ZodOptional<z.ZodNumber>;
128
- }, "strip", z.ZodTypeAny, {
129
- hostname?: string | undefined;
130
- port?: number | undefined;
88
+ }, z.core.$strip>>;
89
+ studioHost: z.ZodOptional<z.ZodString>;
90
+ vite: z.ZodOptional<z.ZodCustom<UserViteConfig, UserViteConfig>>;
91
+ typegen: z.ZodOptional<z.ZodCustom<{
92
+ path: string | string[];
93
+ schema: string;
94
+ generates: string;
95
+ formatGeneratedCode: boolean;
96
+ overloadClientMethods: boolean;
131
97
  }, {
132
- hostname?: string | undefined;
133
- port?: number | undefined;
98
+ path: string | string[];
99
+ schema: string;
100
+ generates: string;
101
+ formatGeneratedCode: boolean;
102
+ overloadClientMethods: boolean;
134
103
  }>>;
135
- studioHost: z.ZodOptional<z.ZodString>;
136
- vite: z.ZodOptional<z.ZodType<UserViteConfig, z.ZodTypeDef, UserViteConfig>>;
137
- }, "strip", z.ZodTypeAny, {
138
- api?: {
139
- dataset?: string | undefined;
140
- projectId?: string | undefined;
141
- } | undefined;
142
- app?: {
143
- entry?: string | undefined;
144
- id?: string | undefined;
145
- organizationId?: string | undefined;
146
- } | undefined;
147
- autoUpdates?: boolean | undefined;
148
- deployment?: {
149
- autoUpdates?: boolean | undefined;
150
- appId?: string | undefined;
151
- } | undefined;
152
- graphql?: {
153
- id?: string | undefined;
154
- filterSuffix?: string | undefined;
155
- generation?: "gen1" | "gen2" | "gen3" | undefined;
156
- nonNullDocumentFields?: boolean | undefined;
157
- playground?: boolean | undefined;
158
- source?: string | undefined;
159
- tag?: string | undefined;
160
- workspace?: string | undefined;
161
- }[] | undefined;
162
- mediaLibrary?: {
163
- aspectsPath?: string | undefined;
164
- } | undefined;
165
- project?: {
166
- basePath?: string | undefined;
167
- } | undefined;
168
- reactCompiler?: Partial<{
169
- environment: Partial<import("babel-plugin-react-compiler").EnvironmentConfig>;
170
- logger: import("babel-plugin-react-compiler").Logger | null;
171
- gating: import("babel-plugin-react-compiler").ExternalFunction | null;
172
- dynamicGating: {
173
- source: string;
174
- } | null;
175
- panicThreshold: unknown;
176
- noEmit: boolean;
177
- compilationMode: unknown;
178
- eslintSuppressionRules: Array<string> | null | undefined;
179
- flowSuppressions: boolean;
180
- ignoreUseNoForget: boolean;
181
- customOptOutDirectives: string[] | null;
182
- sources: Array<string> | ((filename: string) => boolean) | null;
183
- enableReanimatedCheck: boolean;
184
- target: "17" | "18" | "19" | {
185
- kind: "donotuse_meta_internal";
186
- runtimeModule: string;
187
- };
188
- }> | undefined;
189
- reactStrictMode?: boolean | undefined;
190
- server?: {
191
- hostname?: string | undefined;
192
- port?: number | undefined;
193
- } | undefined;
194
- studioHost?: string | undefined;
195
- vite?: UserViteConfig | undefined;
196
- }, {
197
- api?: {
198
- dataset?: string | undefined;
199
- projectId?: string | undefined;
200
- } | undefined;
201
- app?: {
202
- entry?: string | undefined;
203
- id?: string | undefined;
204
- organizationId?: string | undefined;
205
- } | undefined;
206
- autoUpdates?: boolean | undefined;
207
- deployment?: {
208
- autoUpdates?: boolean | undefined;
209
- appId?: string | undefined;
210
- } | undefined;
211
- graphql?: {
212
- id?: string | undefined;
213
- filterSuffix?: string | undefined;
214
- generation?: "gen1" | "gen2" | "gen3" | undefined;
215
- nonNullDocumentFields?: boolean | undefined;
216
- playground?: boolean | undefined;
217
- source?: string | undefined;
218
- tag?: string | undefined;
219
- workspace?: string | undefined;
220
- }[] | undefined;
221
- mediaLibrary?: {
222
- aspectsPath?: string | undefined;
223
- } | undefined;
224
- project?: {
225
- basePath?: string | undefined;
226
- } | undefined;
227
- reactCompiler?: Partial<{
228
- environment: Partial<import("babel-plugin-react-compiler").EnvironmentConfig>;
229
- logger: import("babel-plugin-react-compiler").Logger | null;
230
- gating: import("babel-plugin-react-compiler").ExternalFunction | null;
231
- dynamicGating: {
232
- source: string;
233
- } | null;
234
- panicThreshold: unknown;
235
- noEmit: boolean;
236
- compilationMode: unknown;
237
- eslintSuppressionRules: Array<string> | null | undefined;
238
- flowSuppressions: boolean;
239
- ignoreUseNoForget: boolean;
240
- customOptOutDirectives: string[] | null;
241
- sources: Array<string> | ((filename: string) => boolean) | null;
242
- enableReanimatedCheck: boolean;
243
- target: "17" | "18" | "19" | {
244
- kind: "donotuse_meta_internal";
245
- runtimeModule: string;
246
- };
247
- }> | undefined;
248
- reactStrictMode?: boolean | undefined;
249
- server?: {
250
- hostname?: string | undefined;
251
- port?: number | undefined;
252
- } | undefined;
253
- studioHost?: string | undefined;
254
- vite?: UserViteConfig | undefined;
255
- }>;
104
+ }, z.core.$strip>;
@@ -8,8 +8,10 @@ import { z } from 'zod';
8
8
  }).optional(),
9
9
  app: z.object({
10
10
  entry: z.string().optional(),
11
+ icon: z.string().optional(),
11
12
  id: z.string().optional(),
12
- organizationId: z.string().optional()
13
+ organizationId: z.string().optional(),
14
+ title: z.string().optional()
13
15
  }).optional(),
14
16
  autoUpdates: z.boolean().optional(),
15
17
  deployment: z.object({
@@ -43,7 +45,8 @@ import { z } from 'zod';
43
45
  port: z.number().optional()
44
46
  }).optional(),
45
47
  studioHost: z.string().optional(),
46
- vite: z.custom().optional()
48
+ vite: z.custom().optional(),
49
+ typegen: z.custom().optional()
47
50
  });
48
51
 
49
52
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {type PluginOptions as ReactCompilerConfig} from 'babel-plugin-react-compiler'\nimport {z} from 'zod'\n\nimport {type CliConfig} from './types/cliConfig'\nimport {type UserViteConfig} from './types/userViteConfig'\n\n/**\n * @public\n */\nexport const cliConfigSchema = z.object({\n api: z\n .object({\n dataset: z.string().optional(),\n projectId: z.string().optional(),\n })\n .optional(),\n\n app: z\n .object({\n entry: z.string().optional(),\n id: z.string().optional(),\n organizationId: z.string().optional(),\n })\n .optional(),\n\n autoUpdates: z.boolean().optional(),\n\n deployment: z\n .object({\n appId: z.string().optional(),\n autoUpdates: z.boolean().optional(),\n })\n .optional(),\n\n graphql: z\n .array(\n z.object({\n filterSuffix: z.string().optional(),\n generation: z.enum(['gen1', 'gen2', 'gen3']).optional(),\n id: z.string().optional(),\n nonNullDocumentFields: z.boolean().optional(),\n playground: z.boolean().optional(),\n source: z.string().optional(),\n tag: z.string().optional(),\n workspace: z.string().optional(),\n }),\n )\n .optional(),\n\n mediaLibrary: z\n .object({\n aspectsPath: z.string().optional(),\n })\n .optional(),\n\n project: z\n .object({\n basePath: z.string().optional(),\n })\n .optional(),\n\n reactCompiler: z.custom<ReactCompilerConfig>().optional(),\n\n reactStrictMode: z.boolean().optional(),\n\n server: z\n .object({\n hostname: z.string().optional(),\n port: z.number().optional(),\n })\n .optional(),\n\n studioHost: z.string().optional(),\n\n vite: z.custom<UserViteConfig>().optional(),\n}) satisfies z.ZodType<CliConfig>\n"],"names":["z","cliConfigSchema","object","api","dataset","string","optional","projectId","app","entry","id","organizationId","autoUpdates","boolean","deployment","appId","graphql","array","filterSuffix","generation","enum","nonNullDocumentFields","playground","source","tag","workspace","mediaLibrary","aspectsPath","project","basePath","reactCompiler","custom","reactStrictMode","server","hostname","port","number","studioHost","vite"],"mappings":"AACA,SAAQA,CAAC,QAAO,MAAK;AAKrB;;CAEC,GACD,OAAO,MAAMC,kBAAkBD,EAAEE,MAAM,CAAC;IACtCC,KAAKH,EACFE,MAAM,CAAC;QACNE,SAASJ,EAAEK,MAAM,GAAGC,QAAQ;QAC5BC,WAAWP,EAAEK,MAAM,GAAGC,QAAQ;IAChC,GACCA,QAAQ;IAEXE,KAAKR,EACFE,MAAM,CAAC;QACNO,OAAOT,EAAEK,MAAM,GAAGC,QAAQ;QAC1BI,IAAIV,EAAEK,MAAM,GAAGC,QAAQ;QACvBK,gBAAgBX,EAAEK,MAAM,GAAGC,QAAQ;IACrC,GACCA,QAAQ;IAEXM,aAAaZ,EAAEa,OAAO,GAAGP,QAAQ;IAEjCQ,YAAYd,EACTE,MAAM,CAAC;QACNa,OAAOf,EAAEK,MAAM,GAAGC,QAAQ;QAC1BM,aAAaZ,EAAEa,OAAO,GAAGP,QAAQ;IACnC,GACCA,QAAQ;IAEXU,SAAShB,EACNiB,KAAK,CACJjB,EAAEE,MAAM,CAAC;QACPgB,cAAclB,EAAEK,MAAM,GAAGC,QAAQ;QACjCa,YAAYnB,EAAEoB,IAAI,CAAC;YAAC;YAAQ;YAAQ;SAAO,EAAEd,QAAQ;QACrDI,IAAIV,EAAEK,MAAM,GAAGC,QAAQ;QACvBe,uBAAuBrB,EAAEa,OAAO,GAAGP,QAAQ;QAC3CgB,YAAYtB,EAAEa,OAAO,GAAGP,QAAQ;QAChCiB,QAAQvB,EAAEK,MAAM,GAAGC,QAAQ;QAC3BkB,KAAKxB,EAAEK,MAAM,GAAGC,QAAQ;QACxBmB,WAAWzB,EAAEK,MAAM,GAAGC,QAAQ;IAChC,IAEDA,QAAQ;IAEXoB,cAAc1B,EACXE,MAAM,CAAC;QACNyB,aAAa3B,EAAEK,MAAM,GAAGC,QAAQ;IAClC,GACCA,QAAQ;IAEXsB,SAAS5B,EACNE,MAAM,CAAC;QACN2B,UAAU7B,EAAEK,MAAM,GAAGC,QAAQ;IAC/B,GACCA,QAAQ;IAEXwB,eAAe9B,EAAE+B,MAAM,GAAwBzB,QAAQ;IAEvD0B,iBAAiBhC,EAAEa,OAAO,GAAGP,QAAQ;IAErC2B,QAAQjC,EACLE,MAAM,CAAC;QACNgC,UAAUlC,EAAEK,MAAM,GAAGC,QAAQ;QAC7B6B,MAAMnC,EAAEoC,MAAM,GAAG9B,QAAQ;IAC3B,GACCA,QAAQ;IAEX+B,YAAYrC,EAAEK,MAAM,GAAGC,QAAQ;IAE/BgC,MAAMtC,EAAE+B,MAAM,GAAmBzB,QAAQ;AAC3C,GAAiC"}
1
+ {"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {type TypeGenConfig} from '@sanity/codegen'\nimport {type PluginOptions as ReactCompilerConfig} from 'babel-plugin-react-compiler'\nimport {z} from 'zod'\n\nimport {type CliConfig} from './types/cliConfig'\nimport {type UserViteConfig} from './types/userViteConfig'\n\n/**\n * @public\n */\nexport const cliConfigSchema = z.object({\n api: z\n .object({\n dataset: z.string().optional(),\n projectId: z.string().optional(),\n })\n .optional(),\n\n app: z\n .object({\n entry: z.string().optional(),\n icon: z.string().optional(),\n id: z.string().optional(),\n organizationId: z.string().optional(),\n title: z.string().optional(),\n })\n .optional(),\n\n autoUpdates: z.boolean().optional(),\n\n deployment: z\n .object({\n appId: z.string().optional(),\n autoUpdates: z.boolean().optional(),\n })\n .optional(),\n\n graphql: z\n .array(\n z.object({\n filterSuffix: z.string().optional(),\n generation: z.enum(['gen1', 'gen2', 'gen3']).optional(),\n id: z.string().optional(),\n nonNullDocumentFields: z.boolean().optional(),\n playground: z.boolean().optional(),\n source: z.string().optional(),\n tag: z.string().optional(),\n workspace: z.string().optional(),\n }),\n )\n .optional(),\n\n mediaLibrary: z\n .object({\n aspectsPath: z.string().optional(),\n })\n .optional(),\n\n project: z\n .object({\n basePath: z.string().optional(),\n })\n .optional(),\n\n reactCompiler: z.custom<ReactCompilerConfig>().optional(),\n\n reactStrictMode: z.boolean().optional(),\n\n server: z\n .object({\n hostname: z.string().optional(),\n port: z.number().optional(),\n })\n .optional(),\n\n studioHost: z.string().optional(),\n\n vite: z.custom<UserViteConfig>().optional(),\n\n typegen: z.custom<TypeGenConfig>().optional(),\n}) satisfies z.ZodType<CliConfig>\n"],"names":["z","cliConfigSchema","object","api","dataset","string","optional","projectId","app","entry","icon","id","organizationId","title","autoUpdates","boolean","deployment","appId","graphql","array","filterSuffix","generation","enum","nonNullDocumentFields","playground","source","tag","workspace","mediaLibrary","aspectsPath","project","basePath","reactCompiler","custom","reactStrictMode","server","hostname","port","number","studioHost","vite","typegen"],"mappings":"AAEA,SAAQA,CAAC,QAAO,MAAK;AAKrB;;CAEC,GACD,OAAO,MAAMC,kBAAkBD,EAAEE,MAAM,CAAC;IACtCC,KAAKH,EACFE,MAAM,CAAC;QACNE,SAASJ,EAAEK,MAAM,GAAGC,QAAQ;QAC5BC,WAAWP,EAAEK,MAAM,GAAGC,QAAQ;IAChC,GACCA,QAAQ;IAEXE,KAAKR,EACFE,MAAM,CAAC;QACNO,OAAOT,EAAEK,MAAM,GAAGC,QAAQ;QAC1BI,MAAMV,EAAEK,MAAM,GAAGC,QAAQ;QACzBK,IAAIX,EAAEK,MAAM,GAAGC,QAAQ;QACvBM,gBAAgBZ,EAAEK,MAAM,GAAGC,QAAQ;QACnCO,OAAOb,EAAEK,MAAM,GAAGC,QAAQ;IAC5B,GACCA,QAAQ;IAEXQ,aAAad,EAAEe,OAAO,GAAGT,QAAQ;IAEjCU,YAAYhB,EACTE,MAAM,CAAC;QACNe,OAAOjB,EAAEK,MAAM,GAAGC,QAAQ;QAC1BQ,aAAad,EAAEe,OAAO,GAAGT,QAAQ;IACnC,GACCA,QAAQ;IAEXY,SAASlB,EACNmB,KAAK,CACJnB,EAAEE,MAAM,CAAC;QACPkB,cAAcpB,EAAEK,MAAM,GAAGC,QAAQ;QACjCe,YAAYrB,EAAEsB,IAAI,CAAC;YAAC;YAAQ;YAAQ;SAAO,EAAEhB,QAAQ;QACrDK,IAAIX,EAAEK,MAAM,GAAGC,QAAQ;QACvBiB,uBAAuBvB,EAAEe,OAAO,GAAGT,QAAQ;QAC3CkB,YAAYxB,EAAEe,OAAO,GAAGT,QAAQ;QAChCmB,QAAQzB,EAAEK,MAAM,GAAGC,QAAQ;QAC3BoB,KAAK1B,EAAEK,MAAM,GAAGC,QAAQ;QACxBqB,WAAW3B,EAAEK,MAAM,GAAGC,QAAQ;IAChC,IAEDA,QAAQ;IAEXsB,cAAc5B,EACXE,MAAM,CAAC;QACN2B,aAAa7B,EAAEK,MAAM,GAAGC,QAAQ;IAClC,GACCA,QAAQ;IAEXwB,SAAS9B,EACNE,MAAM,CAAC;QACN6B,UAAU/B,EAAEK,MAAM,GAAGC,QAAQ;IAC/B,GACCA,QAAQ;IAEX0B,eAAehC,EAAEiC,MAAM,GAAwB3B,QAAQ;IAEvD4B,iBAAiBlC,EAAEe,OAAO,GAAGT,QAAQ;IAErC6B,QAAQnC,EACLE,MAAM,CAAC;QACNkC,UAAUpC,EAAEK,MAAM,GAAGC,QAAQ;QAC7B+B,MAAMrC,EAAEsC,MAAM,GAAGhC,QAAQ;IAC3B,GACCA,QAAQ;IAEXiC,YAAYvC,EAAEK,MAAM,GAAGC,QAAQ;IAE/BkC,MAAMxC,EAAEiC,MAAM,GAAmB3B,QAAQ;IAEzCmC,SAASzC,EAAEiC,MAAM,GAAkB3B,QAAQ;AAC7C,GAAiC"}
@@ -1,3 +1,4 @@
1
+ import { type TypeGenConfig } from '@sanity/codegen';
1
2
  import { type PluginOptions as ReactCompilerConfig } from 'babel-plugin-react-compiler';
2
3
  import { type UserViteConfig } from './userViteConfig';
3
4
  /**
@@ -13,10 +14,14 @@ export interface CliConfig {
13
14
  app?: {
14
15
  /** The entrypoint for your custom app. By default, `src/App.tsx` */
15
16
  entry?: string;
17
+ /** String encoding of an icon (typically an SVG) */
18
+ icon?: string;
16
19
  /** @deprecated Use deployment.appId */
17
20
  id?: string;
18
21
  /** The ID for the Sanity organization that manages this application */
19
22
  organizationId?: string;
23
+ /** The title of the custom app. Used in Dashboard and in the browser tab */
24
+ title?: string;
20
25
  };
21
26
  /** @deprecated Use deployment.autoUpdates */
22
27
  autoUpdates?: boolean;
@@ -69,6 +74,10 @@ export interface CliConfig {
69
74
  };
70
75
  /** @deprecated Use deployment.appId */
71
76
  studioHost?: string;
77
+ /**
78
+ * Configuration for Sanity typegen
79
+ */
80
+ typegen?: Partial<TypeGenConfig>;
72
81
  /** Exposes the default Vite configuration for custom apps and the Studio so it can be changed and extended. */
73
82
  vite?: UserViteConfig;
74
83
  }
@@ -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\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 /** @deprecated Use deployment.appId */\n id?: string\n /** The ID for the Sanity organization that manages this application */\n organizationId?: 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 false. */\n reactStrictMode?: boolean\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 /** Exposes the default Vite configuration for custom apps and the Studio so it can be changed and extended. */\n vite?: UserViteConfig\n}\n"],"names":[],"mappings":"AAIA;;CAEC,GACD,WA+EC"}
1
+ {"version":3,"sources":["../../../../src/config/cli/types/cliConfig.ts"],"sourcesContent":["import {type TypeGenConfig} from '@sanity/codegen'\nimport {type PluginOptions as ReactCompilerConfig} from 'babel-plugin-react-compiler'\n\nimport {type UserViteConfig} from './userViteConfig'\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 /** String encoding of an icon (typically an SVG) */\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. Used in Dashboard and in the browser tab */\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 false. */\n reactStrictMode?: boolean\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 /** Exposes the default Vite configuration for custom apps and the Studio so it can be changed and extended. */\n vite?: UserViteConfig\n}\n"],"names":[],"mappings":"AAKA;;CAEC,GACD,WAwFC"}