@sanity/cli-test 0.2.0 → 0.2.2

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/index.d.ts CHANGED
@@ -1,38 +1,39 @@
1
- import {CliConfig} from '@sanity/cli-core'
2
- import {ClientConfig} from '@sanity/client'
3
- import {CLITelemetryStore} from '@sanity/cli-core'
4
- import {Command} from '@oclif/core'
5
- import {Config} from '@oclif/core'
6
- import {Errors} from '@oclif/core'
7
- import {Hook} from '@oclif/core/hooks'
8
- import {Hooks} from '@oclif/core/hooks'
9
- import nock from 'nock'
10
- import {ProjectRootResult} from '@sanity/cli-core'
11
- import {SanityClient} from '@sanity/client'
12
- import {SanityCommand} from '@sanity/cli-core'
13
- import {TestProject} from 'vitest/node'
14
- import {vi} from 'vitest'
1
+ import { CliConfig } from "@sanity/cli-core";
2
+ import { ClientConfig } from "@sanity/client";
3
+ import { CLITelemetryStore } from "@sanity/cli-core";
4
+ import { Command } from "@oclif/core";
5
+ import { Config } from "@oclif/core";
6
+ import { Errors } from "@oclif/core";
7
+ import { Hook } from "@oclif/core/hooks";
8
+ import { Hooks } from "@oclif/core/hooks";
9
+ import nock from "nock";
10
+ import { ProjectRootResult } from "@sanity/cli-core";
11
+ import { SanityClient } from "@sanity/client";
12
+ import { SanityCommand } from "@sanity/cli-core";
13
+ import { TestProject } from "vitest/node";
14
+ import { vi } from "vitest";
15
15
 
16
16
  declare interface CaptureOptions {
17
17
  /**
18
18
  * Whether to print the output to the console
19
19
  */
20
- print?: boolean
20
+ print?: boolean;
21
21
  /**
22
22
  * Whether to strip ANSI escape codes from the output
23
23
  */
24
- stripAnsi?: boolean
25
- testNodeEnv?: string
24
+ stripAnsi?: boolean;
25
+ testNodeEnv?: string;
26
26
  }
27
27
 
28
28
  declare interface CaptureResult<T = unknown> {
29
- stderr: string
30
- stdout: string
31
- error?: Error & Partial<Errors.CLIError>
32
- result?: T
29
+ stderr: string;
30
+ stdout: string;
31
+ error?: Error & Partial<Errors.CLIError>;
32
+ result?: T;
33
33
  }
34
34
 
35
- declare type CommandClass = (new (argv: string[], config: Config) => Command) & typeof Command
35
+ declare type CommandClass = (new (argv: string[], config: Config) => Command) &
36
+ typeof Command;
36
37
 
37
38
  /**
38
39
  * Converts Unix-style paths to platform-appropriate paths.
@@ -45,7 +46,7 @@ declare type CommandClass = (new (argv: string[], config: Config) => Command) &
45
46
  * @returns Platform-appropriate path
46
47
  * @internal
47
48
  */
48
- export declare function convertToSystemPath(pathStr: string): string
49
+ export declare function convertToSystemPath(pathStr: string): string;
49
50
 
50
51
  /**
51
52
  * Creates a real Sanity client instance for testing that makes actual HTTP requests.
@@ -79,9 +80,9 @@ export declare function convertToSystemPath(pathStr: string): string
79
80
  * ```
80
81
  */
81
82
  export declare function createTestClient(options: CreateTestClientOptions): {
82
- client: SanityClient
83
- request: ReturnType<typeof vi.fn>
84
- }
83
+ client: SanityClient;
84
+ request: ReturnType<typeof vi.fn>;
85
+ };
85
86
 
86
87
  /**
87
88
  * Options for createTestClient
@@ -92,11 +93,11 @@ export declare interface CreateTestClientOptions extends ClientConfig {
92
93
  /**
93
94
  * API version for the client
94
95
  */
95
- apiVersion: string
96
+ apiVersion: string;
96
97
  /**
97
98
  * Authentication token
98
99
  */
99
- token?: string
100
+ token?: string;
100
101
  }
101
102
 
102
103
  /**
@@ -107,41 +108,41 @@ export declare interface CreateTestClientOptions extends ClientConfig {
107
108
  * @param token - The token to create
108
109
  * @returns void
109
110
  */
110
- export declare function createTestToken(token: string): void
111
+ export declare function createTestToken(token: string): void;
111
112
 
112
113
  /**
113
114
  * Default fixtures bundled with the package and their options.
114
115
  *
115
116
  * @public
116
117
  */
117
- export declare const DEFAULT_FIXTURES: Record<FixtureName, FixtureOptions>
118
+ export declare const DEFAULT_FIXTURES: Record<FixtureName, FixtureOptions>;
118
119
 
119
120
  /**
120
121
  * @deprecated Use {@link FixtureName} instead. This type alias will be removed in a future release.
121
122
  * @public
122
123
  */
123
- export declare type ExampleName = FixtureName
124
+ export declare type ExampleName = FixtureName;
124
125
 
125
126
  /**
126
127
  * Valid fixture name type.
127
128
  * @public
128
129
  */
129
130
  export declare type FixtureName =
130
- | 'basic-app'
131
- | 'basic-functions'
132
- | 'basic-studio'
133
- | 'graphql-studio'
134
- | 'multi-workspace-studio'
135
- | 'prebuilt-app'
136
- | 'prebuilt-studio'
137
- | 'worst-case-studio'
131
+ | "basic-app"
132
+ | "basic-functions"
133
+ | "basic-studio"
134
+ | "graphql-studio"
135
+ | "multi-workspace-studio"
136
+ | "prebuilt-app"
137
+ | "prebuilt-studio"
138
+ | "worst-case-studio";
138
139
 
139
140
  /**
140
141
  * Options for each fixture.
141
142
  * @public
142
143
  */
143
144
  export declare interface FixtureOptions {
144
- includeDist?: boolean
145
+ includeDist?: boolean;
145
146
  }
146
147
 
147
148
  /**
@@ -151,7 +152,7 @@ export declare interface FixtureOptions {
151
152
  * @returns Drive letter with backslash (e.g., 'C:\\', 'D:\\') or empty string on Unix
152
153
  * @internal
153
154
  */
154
- export declare function getCurrentDrive(): string
155
+ export declare function getCurrentDrive(): string;
155
156
 
156
157
  /**
157
158
  * Gets the path to the fixtures directory bundled with this package.
@@ -163,7 +164,7 @@ export declare function getCurrentDrive(): string
163
164
  * @returns Absolute path to the fixtures directory
164
165
  * @internal
165
166
  */
166
- export declare function getFixturesPath(): string
167
+ export declare function getFixturesPath(): string;
167
168
 
168
169
  /**
169
170
  * Gets the path to the temporary directory for test fixtures.
@@ -175,7 +176,7 @@ export declare function getFixturesPath(): string
175
176
  * @returns Absolute path to temp directory (default: initial cwd/tmp)
176
177
  * @internal
177
178
  */
178
- export declare function getTempPath(customTempDir?: string): string
179
+ export declare function getTempPath(customTempDir?: string): string;
179
180
 
180
181
  /**
181
182
  * Mocks the API calls, add some defaults so it doesn't cause too much friction
@@ -190,7 +191,7 @@ export declare function mockApi({
190
191
  projectId,
191
192
  query,
192
193
  uri,
193
- }: MockApiOptions): nock.Interceptor
194
+ }: MockApiOptions): nock.Interceptor;
194
195
 
195
196
  /**
196
197
  * @internal
@@ -199,35 +200,35 @@ export declare interface MockApiOptions {
199
200
  /**
200
201
  * Uri to mock
201
202
  */
202
- uri: string
203
+ uri: string;
203
204
  /**
204
205
  * Api host to mock, defaults to `https://api.sanity.io`
205
206
  */
206
- apiHost?: string
207
+ apiHost?: string;
207
208
  /**
208
209
  * Api version to mock, defaults to `v2025-05-14`
209
210
  */
210
- apiVersion?: string
211
+ apiVersion?: string;
211
212
  /**
212
213
  * Whether to include `tag: 'sanity.cli'` in query parameters.
213
214
  * Defaults to `true`. Set to `false` for endpoints that don't use CLI tagging.
214
215
  */
215
- includeQueryTag?: boolean
216
+ includeQueryTag?: boolean;
216
217
  /**
217
218
  * HTTP method to mock
218
219
  *
219
220
  * Defaults to 'get'
220
221
  */
221
- method?: 'delete' | 'get' | 'patch' | 'post' | 'put'
222
+ method?: "delete" | "get" | "patch" | "post" | "put";
222
223
  /**
223
224
  * Project ID to mock. When provided, constructs apiHost as `https://{projectId}.api.sanity.io`
224
225
  * Takes precedence over apiHost if both are provided.
225
226
  */
226
- projectId?: string
227
+ projectId?: string;
227
228
  /**
228
229
  * Query parameters to mock
229
230
  */
230
- query?: Record<string, string>
231
+ query?: Record<string, string>;
231
232
  }
232
233
 
233
234
  /**
@@ -256,10 +257,9 @@ export declare interface MockApiOptions {
256
257
  * expect(mockClient.getDocument).toHaveBeenCalledWith('doc1')
257
258
  * ```
258
259
  */
259
- export declare function mockSanityCommand<T extends typeof SanityCommand<typeof Command>>(
260
- CommandClass: T,
261
- options?: MockSanityCommandOptions,
262
- ): T
260
+ export declare function mockSanityCommand<
261
+ T extends typeof SanityCommand<typeof Command>,
262
+ >(CommandClass: T, options?: MockSanityCommandOptions): T;
263
263
 
264
264
  /**
265
265
  * @public
@@ -268,24 +268,24 @@ export declare interface MockSanityCommandOptions {
268
268
  /**
269
269
  * Mock CLI config (required if command uses getCliConfig or getProjectId)
270
270
  */
271
- cliConfig?: CliConfig
271
+ cliConfig?: CliConfig;
272
272
  /**
273
273
  * When provided, getCliConfig() will throw this error instead of returning a config.
274
274
  * Useful for simulating running outside a project directory.
275
275
  */
276
- cliConfigError?: Error
276
+ cliConfigError?: Error;
277
277
  /**
278
278
  * Mock whether the terminal is interactive (used by isUnattended)
279
279
  */
280
- isInteractive?: boolean
280
+ isInteractive?: boolean;
281
281
  /**
282
282
  * Mock project root result (required if command uses getProjectRoot)
283
283
  */
284
- projectRoot?: ProjectRootResult
284
+ projectRoot?: ProjectRootResult;
285
285
  /**
286
286
  * Mock authentication token (passed to API clients, bypasses getCliToken)
287
287
  */
288
- token?: string
288
+ token?: string;
289
289
  }
290
290
 
291
291
  /**
@@ -293,20 +293,22 @@ export declare interface MockSanityCommandOptions {
293
293
  * @param options - Options for mocking the telemetry store.
294
294
  * @returns The mocked telemetry store.
295
295
  */
296
- export declare const mockTelemetry: (options?: MockTelemetryOptions) => CLITelemetryStore
296
+ export declare const mockTelemetry: (
297
+ options?: MockTelemetryOptions,
298
+ ) => CLITelemetryStore;
297
299
 
298
300
  /**
299
301
  * @public
300
302
  */
301
303
  export declare interface MockTelemetryOptions {
302
- trace?: () => void
303
- updateUserProperties?: () => void
304
+ trace?: () => void;
305
+ updateUserProperties?: () => void;
304
306
  }
305
307
 
306
308
  declare interface Options {
307
- config: Config
308
- Command?: Command.Class
309
- context?: Hook.Context
309
+ config: Config;
310
+ Command?: Command.Class;
311
+ context?: Hook.Context;
310
312
  }
311
313
 
312
314
  /**
@@ -333,7 +335,10 @@ declare interface Options {
333
335
  * })
334
336
  * ```
335
337
  */
336
- export declare function setup(_: TestProject, options?: SetupTestFixturesOptions): Promise<void>
338
+ export declare function setup(
339
+ _: TestProject,
340
+ options?: SetupTestFixturesOptions,
341
+ ): Promise<void>;
337
342
 
338
343
  /**
339
344
  * Options for setupTestFixtures
@@ -352,11 +357,11 @@ export declare interface SetupTestFixturesOptions {
352
357
  * ['fixtures/*', 'dev/*']
353
358
  * ```
354
359
  */
355
- additionalFixtures?: string[]
360
+ additionalFixtures?: string[];
356
361
  /**
357
362
  * Custom temp directory path. Defaults to process.cwd()/tmp
358
363
  */
359
- tempDir?: string
364
+ tempDir?: string;
360
365
  }
361
366
 
362
367
  /**
@@ -370,7 +375,9 @@ export declare interface SetupTestFixturesOptions {
370
375
  *
371
376
  * @param options - Configuration options
372
377
  */
373
- export declare function teardown(options?: TeardownTestFixturesOptions): Promise<void>
378
+ export declare function teardown(
379
+ options?: TeardownTestFixturesOptions,
380
+ ): Promise<void>;
374
381
 
375
382
  /**
376
383
  * Options for teardownTestFixtures
@@ -381,7 +388,7 @@ export declare interface TeardownTestFixturesOptions {
381
388
  /**
382
389
  * Custom temp directory path. Defaults to process.cwd()/tmp
383
390
  */
384
- tempDir?: string
391
+ tempDir?: string;
385
392
  }
386
393
 
387
394
  /**
@@ -391,7 +398,7 @@ export declare function testCommand(
391
398
  command: CommandClass,
392
399
  args?: string[],
393
400
  options?: TestCommandOptions,
394
- ): Promise<CaptureResult<unknown>>
401
+ ): Promise<CaptureResult<unknown>>;
395
402
 
396
403
  /**
397
404
  * @public
@@ -400,16 +407,16 @@ export declare interface TestCommandOptions {
400
407
  /**
401
408
  * Options for capturing output
402
409
  */
403
- capture?: CaptureOptions
410
+ capture?: CaptureOptions;
404
411
  /**
405
412
  * Partial oclif config overrides
406
413
  */
407
- config?: Partial<Config>
414
+ config?: Partial<Config>;
408
415
  /**
409
416
  * Mock options for SanityCommand dependencies (config, project root, API clients).
410
417
  * When provided, the command is automatically wrapped with mockSanityCommand.
411
418
  */
412
- mocks?: MockSanityCommandOptions & MockTelemetryOptions
419
+ mocks?: MockSanityCommandOptions & MockTelemetryOptions;
413
420
  }
414
421
 
415
422
  /**
@@ -424,7 +431,7 @@ export declare function testCopyDirectory(
424
431
  srcDir: string,
425
432
  destDir: string,
426
433
  skip?: string[],
427
- ): Promise<void>
434
+ ): Promise<void>;
428
435
 
429
436
  /**
430
437
  * @deprecated Use {@link testFixture} instead. This function will be removed in a future release.
@@ -440,13 +447,13 @@ export declare function testCopyDirectory(
440
447
  export declare function testExample(
441
448
  exampleName: FixtureName | (string & {}),
442
449
  options?: TestFixtureOptions,
443
- ): Promise<string>
450
+ ): Promise<string>;
444
451
 
445
452
  /**
446
453
  * @deprecated Use {@link TestFixtureOptions} instead. This type alias will be removed in a future release.
447
454
  * @public
448
455
  */
449
- export declare type TestExampleOptions = TestFixtureOptions
456
+ export declare type TestExampleOptions = TestFixtureOptions;
450
457
 
451
458
  /**
452
459
  * Clones a fixture directory into a temporary directory with an isolated copy.
@@ -481,7 +488,7 @@ export declare type TestExampleOptions = TestFixtureOptions
481
488
  export declare function testFixture(
482
489
  fixtureName: FixtureName | (string & {}),
483
490
  options?: TestFixtureOptions,
484
- ): Promise<string>
491
+ ): Promise<string>;
485
492
 
486
493
  /**
487
494
  * @public
@@ -490,7 +497,7 @@ export declare interface TestFixtureOptions {
490
497
  /**
491
498
  * Custom temp directory. Defaults to process.cwd()/tmp
492
499
  */
493
- tempDir?: string
500
+ tempDir?: string;
494
501
  }
495
502
 
496
503
  /**
@@ -518,6 +525,6 @@ export declare interface TestFixtureOptions {
518
525
  export declare function testHook<T extends keyof Hooks>(
519
526
  hook: Hook<T>,
520
527
  options: Options,
521
- ): Promise<CaptureResult<Hooks[T]['return']>>
528
+ ): Promise<CaptureResult<Hooks[T]["return"]>>;
522
529
 
523
- export {}
530
+ export {};
@@ -15,7 +15,9 @@ import { vi } from 'vitest';
15
15
  updateUserProperties: vi.fn(),
16
16
  ...options
17
17
  };
18
- globalThis[Symbol.for('sanity.cli.telemetry')] = telemetry;
18
+ globalThis[Symbol.for('sanity.cli.telemetry')] = {
19
+ logger: telemetry
20
+ };
19
21
  return telemetry;
20
22
  };
21
23
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test/mockTelemetry.ts"],"sourcesContent":["import {type CLITelemetryStore} from '@sanity/cli-core'\nimport {vi} from 'vitest'\n\n/**\n * @public\n */\nexport interface MockTelemetryOptions {\n trace?: () => void\n updateUserProperties?: () => void\n}\n\n/**\n * @public\n * @param options - Options for mocking the telemetry store.\n * @returns The mocked telemetry store.\n */\nexport const mockTelemetry = (options: MockTelemetryOptions = {}): CLITelemetryStore => {\n const telemetry = {\n trace: vi.fn().mockReturnValue({\n complete: vi.fn(),\n error: vi.fn(),\n log: vi.fn(),\n newContext: vi.fn(),\n start: vi.fn(),\n }),\n updateUserProperties: vi.fn(),\n ...options,\n } as unknown as CLITelemetryStore\n\n // We are not using the export from @sanity/cli-core because\n // This can be used where `@sanity/cli-core` is mocked and vitest will run into issues.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(globalThis as any)[Symbol.for('sanity.cli.telemetry')] = telemetry\n\n return telemetry\n}\n"],"names":["vi","mockTelemetry","options","telemetry","trace","fn","mockReturnValue","complete","error","log","newContext","start","updateUserProperties","globalThis","Symbol","for"],"mappings":"AACA,SAAQA,EAAE,QAAO,SAAQ;AAUzB;;;;CAIC,GACD,OAAO,MAAMC,gBAAgB,CAACC,UAAgC,CAAC,CAAC;IAC9D,MAAMC,YAAY;QAChBC,OAAOJ,GAAGK,EAAE,GAAGC,eAAe,CAAC;YAC7BC,UAAUP,GAAGK,EAAE;YACfG,OAAOR,GAAGK,EAAE;YACZI,KAAKT,GAAGK,EAAE;YACVK,YAAYV,GAAGK,EAAE;YACjBM,OAAOX,GAAGK,EAAE;QACd;QACAO,sBAAsBZ,GAAGK,EAAE;QAC3B,GAAGH,OAAO;IACZ;IAKEW,UAAkB,CAACC,OAAOC,GAAG,CAAC,wBAAwB,GAAGZ;IAE3D,OAAOA;AACT,EAAC"}
1
+ {"version":3,"sources":["../../src/test/mockTelemetry.ts"],"sourcesContent":["import {type CLITelemetryStore} from '@sanity/cli-core'\nimport {vi} from 'vitest'\n\n/**\n * @public\n */\nexport interface MockTelemetryOptions {\n trace?: () => void\n updateUserProperties?: () => void\n}\n\n/**\n * @public\n * @param options - Options for mocking the telemetry store.\n * @returns The mocked telemetry store.\n */\nexport const mockTelemetry = (options: MockTelemetryOptions = {}): CLITelemetryStore => {\n const telemetry = {\n trace: vi.fn().mockReturnValue({\n complete: vi.fn(),\n error: vi.fn(),\n log: vi.fn(),\n newContext: vi.fn(),\n start: vi.fn(),\n }),\n updateUserProperties: vi.fn(),\n ...options,\n } as unknown as CLITelemetryStore\n\n // We are not using the export from @sanity/cli-core because\n // This can be used where `@sanity/cli-core` is mocked and vitest will run into issues.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(globalThis as any)[Symbol.for('sanity.cli.telemetry')] = {logger: telemetry}\n\n return telemetry\n}\n"],"names":["vi","mockTelemetry","options","telemetry","trace","fn","mockReturnValue","complete","error","log","newContext","start","updateUserProperties","globalThis","Symbol","for","logger"],"mappings":"AACA,SAAQA,EAAE,QAAO,SAAQ;AAUzB;;;;CAIC,GACD,OAAO,MAAMC,gBAAgB,CAACC,UAAgC,CAAC,CAAC;IAC9D,MAAMC,YAAY;QAChBC,OAAOJ,GAAGK,EAAE,GAAGC,eAAe,CAAC;YAC7BC,UAAUP,GAAGK,EAAE;YACfG,OAAOR,GAAGK,EAAE;YACZI,KAAKT,GAAGK,EAAE;YACVK,YAAYV,GAAGK,EAAE;YACjBM,OAAOX,GAAGK,EAAE;QACd;QACAO,sBAAsBZ,GAAGK,EAAE;QAC3B,GAAGH,OAAO;IACZ;IAKEW,UAAkB,CAACC,OAAOC,GAAG,CAAC,wBAAwB,GAAG;QAACC,QAAQb;IAAS;IAE7E,OAAOA;AACT,EAAC"}
package/dist/vitest.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {TestProject} from 'vitest/node'
1
+ import { TestProject } from "vitest/node";
2
2
 
3
3
  /**
4
4
  * Global setup function for initializing test fixtures.
@@ -24,7 +24,10 @@ import {TestProject} from 'vitest/node'
24
24
  * })
25
25
  * ```
26
26
  */
27
- export declare function setup(_: TestProject, options?: SetupTestFixturesOptions): Promise<void>
27
+ export declare function setup(
28
+ _: TestProject,
29
+ options?: SetupTestFixturesOptions,
30
+ ): Promise<void>;
28
31
 
29
32
  /**
30
33
  * Options for setupTestFixtures
@@ -43,11 +46,11 @@ declare interface SetupTestFixturesOptions {
43
46
  * ['fixtures/*', 'dev/*']
44
47
  * ```
45
48
  */
46
- additionalFixtures?: string[]
49
+ additionalFixtures?: string[];
47
50
  /**
48
51
  * Custom temp directory path. Defaults to process.cwd()/tmp
49
52
  */
50
- tempDir?: string
53
+ tempDir?: string;
51
54
  }
52
55
 
53
56
  /**
@@ -64,16 +67,16 @@ declare interface SetupTestFixturesOptions {
64
67
  * @throws If the worker files cannot be bundled
65
68
  * @throws If the watcher cannot be set up
66
69
  */
67
- export declare function setupWorkerBuild(filePaths: string[]): Promise<void>
70
+ export declare function setupWorkerBuild(filePaths: string[]): Promise<void>;
68
71
 
69
72
  /**
70
73
  * Serializer for snapshot tests to normalize line endings and Windows ^ to Unix `\`
71
74
  * @public
72
75
  */
73
76
  export declare const snapshotSerializer: {
74
- serialize: (val: string) => string
75
- test: (val: unknown) => val is string
76
- }
77
+ serialize: (val: string) => string;
78
+ test: (val: unknown) => val is string;
79
+ };
77
80
 
78
81
  /**
79
82
  * Teardown function to clean up test fixtures.
@@ -86,7 +89,9 @@ export declare const snapshotSerializer: {
86
89
  *
87
90
  * @param options - Configuration options
88
91
  */
89
- export declare function teardown(options?: TeardownTestFixturesOptions): Promise<void>
92
+ export declare function teardown(
93
+ options?: TeardownTestFixturesOptions,
94
+ ): Promise<void>;
90
95
 
91
96
  /**
92
97
  * Options for teardownTestFixtures
@@ -97,7 +102,7 @@ declare interface TeardownTestFixturesOptions {
97
102
  /**
98
103
  * Custom temp directory path. Defaults to process.cwd()/tmp
99
104
  */
100
- tempDir?: string
105
+ tempDir?: string;
101
106
  }
102
107
 
103
108
  /**
@@ -111,6 +116,6 @@ declare interface TeardownTestFixturesOptions {
111
116
  * @throws If the build contexts cannot be disposed
112
117
  * @throws If the compiled JavaScript files cannot be deleted
113
118
  */
114
- export declare function teardownWorkerBuild(): Promise<void>
119
+ export declare function teardownWorkerBuild(): Promise<void>;
115
120
 
116
- export {}
121
+ export {};
@@ -16,11 +16,11 @@
16
16
  "@sanity/sdk-react": "^2.6.0",
17
17
  "react": "^19.2.3",
18
18
  "react-dom": "^19.2.3",
19
- "sanity": "^5.13.0"
19
+ "sanity": "^5.14.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^19.2.9",
23
- "sanity": "^5.13.0",
23
+ "sanity": "^5.14.1",
24
24
  "typescript": "^5.9.3"
25
25
  }
26
26
  }
@@ -9,6 +9,6 @@
9
9
  "@sanity/functions": "^1.2.0"
10
10
  },
11
11
  "devDependencies": {
12
- "sanity": "^5.13.0"
12
+ "sanity": "^5.14.1"
13
13
  }
14
14
  }
@@ -15,10 +15,10 @@
15
15
  "start": "sanity start"
16
16
  },
17
17
  "dependencies": {
18
- "@sanity/vision": "^5.13.0",
18
+ "@sanity/vision": "^5.14.1",
19
19
  "react": "^19.2.3",
20
20
  "react-dom": "^19.2.3",
21
- "sanity": "^5.13.0",
21
+ "sanity": "^5.14.1",
22
22
  "styled-components": "^6.3.8"
23
23
  },
24
24
  "devDependencies": {
@@ -12,10 +12,10 @@
12
12
  "deploy-graphql": "sanity graphql deploy"
13
13
  },
14
14
  "dependencies": {
15
- "@sanity/vision": "^5.13.0",
15
+ "@sanity/vision": "^5.14.1",
16
16
  "react": "^19.2.3",
17
17
  "react-dom": "^19.2.3",
18
- "sanity": "^5.13.0",
18
+ "sanity": "^5.14.1",
19
19
  "styled-components": "^6.3.8"
20
20
  },
21
21
  "devDependencies": {
@@ -15,10 +15,10 @@
15
15
  "start": "sanity start"
16
16
  },
17
17
  "dependencies": {
18
- "@sanity/vision": "^5.13.0",
18
+ "@sanity/vision": "^5.14.1",
19
19
  "react": "^19.2.3",
20
20
  "react-dom": "^19.2.3",
21
- "sanity": "^5.13.0",
21
+ "sanity": "^5.14.1",
22
22
  "styled-components": "^6.3.8"
23
23
  },
24
24
  "devDependencies": {
@@ -16,11 +16,11 @@
16
16
  "@sanity/sdk-react": "^2.6.0",
17
17
  "react": "^19.2.3",
18
18
  "react-dom": "^19.2.3",
19
- "sanity": "^5.13.0"
19
+ "sanity": "^5.14.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^19.2.9",
23
- "sanity": "^5.13.0",
23
+ "sanity": "^5.14.1",
24
24
  "typescript": "^5.9.3"
25
25
  }
26
26
  }
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "react": "^19.2.3",
17
17
  "react-dom": "^19.2.3",
18
- "sanity": "^5.13.0",
18
+ "sanity": "^5.14.1",
19
19
  "styled-components": "^6.3.8"
20
20
  },
21
21
  "devDependencies": {
@@ -16,10 +16,10 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@sanity/code-input": "^7.0.6",
19
- "@sanity/vision": "^5.13.0",
19
+ "@sanity/vision": "^5.14.1",
20
20
  "react": "^19.2.3",
21
21
  "react-dom": "^19.2.3",
22
- "sanity": "^5.13.0",
22
+ "sanity": "^5.14.1",
23
23
  "sanity-plugin-media": "^4.1.1",
24
24
  "styled-components": "^6.3.8",
25
25
  "vite-tsconfig-paths": "^6.0.5"
@@ -1,7 +1,7 @@
1
1
  import {defineCliConfig} from 'sanity/cli'
2
2
  import tsconfigPaths from 'vite-tsconfig-paths'
3
3
 
4
- // eslint-disable-next-line import/no-unresolved
4
+ // eslint-disable-next-line import-x/no-unresolved
5
5
  import {defines} from '@/defines'
6
6
 
7
7
  export default defineCliConfig({
@@ -1,6 +1,6 @@
1
1
  import {codeInput} from '@sanity/code-input'
2
2
  import {visionTool} from '@sanity/vision'
3
- // eslint-disable-next-line import/no-unresolved
3
+ // eslint-disable-next-line import-x/no-unresolved
4
4
  import {theme} from 'https://themer.sanity.build/api/hues?preset=dew'
5
5
  import {defineConfig, defineField, defineType} from 'sanity'
6
6
  import {media} from 'sanity-plugin-media'
package/package.json CHANGED
@@ -1,27 +1,33 @@
1
1
  {
2
2
  "name": "@sanity/cli-test",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Sanity CLI test helpers and utilities",
5
5
  "keywords": [
6
- "sanity",
6
+ "cli",
7
7
  "cms",
8
+ "content",
8
9
  "headless",
9
10
  "realtime",
10
- "content",
11
- "cli",
11
+ "sanity",
12
12
  "tool"
13
13
  ],
14
14
  "homepage": "https://github.com/sanity-io/cli",
15
15
  "bugs": "https://github.com/sanity-io/cli/issues",
16
+ "license": "MIT",
17
+ "author": "Sanity.io <hello@sanity.io>",
16
18
  "repository": {
17
19
  "type": "git",
18
20
  "url": "git+https://github.com/sanity-io/cli.git",
19
21
  "directory": "packages/@sanity/cli-test"
20
22
  },
21
- "license": "MIT",
22
- "author": "Sanity.io <hello@sanity.io>",
23
- "sideEffects": false,
23
+ "files": [
24
+ "./dist",
25
+ "./fixtures"
26
+ ],
24
27
  "type": "module",
28
+ "sideEffects": false,
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
25
31
  "exports": {
26
32
  ".": {
27
33
  "source": "./src/index.ts",
@@ -33,12 +39,9 @@
33
39
  },
34
40
  "./package.json": "./package.json"
35
41
  },
36
- "main": "./dist/index.js",
37
- "types": "./dist/index.d.ts",
38
- "files": [
39
- "./dist",
40
- "./fixtures"
41
- ],
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
42
45
  "dependencies": {
43
46
  "@swc/core": "^1.15.18",
44
47
  "ansis": "^4.2.0",
@@ -61,23 +64,20 @@
61
64
  "typescript": "^5.9.3",
62
65
  "vitest": "^4.0.18",
63
66
  "yaml": "^2.8.2",
64
- "@repo/tsconfig": "3.70.0",
65
- "@sanity/cli-core": "1.0.0",
66
67
  "@repo/package.config": "0.0.1",
68
+ "@repo/tsconfig": "3.70.0",
69
+ "@sanity/cli-core": "1.1.0",
67
70
  "@sanity/eslint-config-cli": "1.0.0"
68
71
  },
69
72
  "peerDependencies": {
70
73
  "@oclif/core": "^4.0.0",
71
74
  "@sanity/client": "^7.0.0",
72
75
  "vitest": ">=3.0.0 <5.0.0",
73
- "@sanity/cli-core": "1.0.0"
76
+ "@sanity/cli-core": "1.1.0"
74
77
  },
75
78
  "engines": {
76
79
  "node": ">=20.19.1 <22 || >=22.12"
77
80
  },
78
- "publishConfig": {
79
- "access": "public"
80
- },
81
81
  "scripts": {
82
82
  "prebuild": "pnpm run clean",
83
83
  "build": "pnpm run build:js && pnpm run copy:fixtures",