@sanity/cli-test 9.0.0 → 9.0.1

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.
@@ -22,6 +22,7 @@ import { vi } from 'vitest';
22
22
  throw new Error('Function not implemented.');
23
23
  },
24
24
  interval: 0,
25
+ isEnabled: true,
25
26
  isSpinning: false,
26
27
  prefixText: '',
27
28
  render: function() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test/createMockSpinner.ts"],"sourcesContent":["import {type SpinnerInstance} from '@sanity/cli-core/ux'\nimport {Mock, vi} from 'vitest'\n\n/**\n * Creates a mock spinner function to avoid writing output to stdout.\n * @param overrides - Pass any mocks or stubs for test expectations\n * @internal\n * @deprecated Use mocks/cli-core/ux/spinner instead\n */\nexport function createMockSpinner(\n overrides?: Partial<SpinnerInstance>,\n): Mock<(options: string) => SpinnerInstance> {\n return vi.fn(() => {\n return {\n clear: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n color: false,\n fail: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n frame: function (): string {\n throw new Error('Function not implemented.')\n },\n indent: 0,\n info: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n interval: 0,\n isSpinning: false,\n prefixText: '',\n render: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n spinner: {\n frames: [],\n interval: undefined,\n },\n start: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n stop: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n stopAndPersist: function (_options?: any): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n succeed: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n suffixText: '',\n text: '',\n warn: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n ...overrides,\n }\n })\n}\n"],"names":["vi","createMockSpinner","overrides","fn","clear","Error","color","fail","_text","frame","indent","info","interval","isSpinning","prefixText","render","spinner","frames","undefined","start","stop","stopAndPersist","_options","succeed","suffixText","text","warn"],"mappings":"AACA,SAAcA,EAAE,QAAO,SAAQ;AAE/B;;;;;CAKC,GACD,OAAO,SAASC,kBACdC,SAAoC;IAEpC,OAAOF,GAAGG,EAAE,CAAC;QACX,OAAO;YACLC,OAAO;gBACL,MAAM,IAAIC,MAAM;YAClB;YACAC,OAAO;YACPC,MAAM,SAAUC,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACAI,OAAO;gBACL,MAAM,IAAIJ,MAAM;YAClB;YACAK,QAAQ;YACRC,MAAM,SAAUH,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACAO,UAAU;YACVC,YAAY;YACZC,YAAY;YACZC,QAAQ;gBACN,MAAM,IAAIV,MAAM;YAClB;YACAW,SAAS;gBACPC,QAAQ,EAAE;gBACVL,UAAUM;YACZ;YACAC,OAAO,SAAUX,KAAc;gBAC7B,MAAM,IAAIH,MAAM;YAClB;YACAe,MAAM;gBACJ,MAAM,IAAIf,MAAM;YAClB;YACAgB,gBAAgB,SAAUC,QAAc;gBACtC,MAAM,IAAIjB,MAAM;YAClB;YACAkB,SAAS,SAAUf,KAAc;gBAC/B,MAAM,IAAIH,MAAM;YAClB;YACAmB,YAAY;YACZC,MAAM;YACNC,MAAM,SAAUlB,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACA,GAAGH,SAAS;QACd;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/test/createMockSpinner.ts"],"sourcesContent":["import {type SpinnerInstance} from '@sanity/cli-core/ux'\nimport {Mock, vi} from 'vitest'\n\n/**\n * Creates a mock spinner function to avoid writing output to stdout.\n * @param overrides - Pass any mocks or stubs for test expectations\n * @internal\n * @deprecated Use mocks/cli-core/ux/spinner instead\n */\nexport function createMockSpinner(\n overrides?: Partial<SpinnerInstance>,\n): Mock<(options: string) => SpinnerInstance> {\n return vi.fn(() => {\n return {\n clear: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n color: false,\n fail: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n frame: function (): string {\n throw new Error('Function not implemented.')\n },\n indent: 0,\n info: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n interval: 0,\n isEnabled: true,\n isSpinning: false,\n prefixText: '',\n render: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n spinner: {\n frames: [],\n interval: undefined,\n },\n start: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n stop: function (): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n stopAndPersist: function (_options?: any): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n succeed: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n suffixText: '',\n text: '',\n warn: function (_text?: string): SpinnerInstance {\n throw new Error('Function not implemented.')\n },\n ...overrides,\n } as SpinnerInstance\n })\n}\n"],"names":["vi","createMockSpinner","overrides","fn","clear","Error","color","fail","_text","frame","indent","info","interval","isEnabled","isSpinning","prefixText","render","spinner","frames","undefined","start","stop","stopAndPersist","_options","succeed","suffixText","text","warn"],"mappings":"AACA,SAAcA,EAAE,QAAO,SAAQ;AAE/B;;;;;CAKC,GACD,OAAO,SAASC,kBACdC,SAAoC;IAEpC,OAAOF,GAAGG,EAAE,CAAC;QACX,OAAO;YACLC,OAAO;gBACL,MAAM,IAAIC,MAAM;YAClB;YACAC,OAAO;YACPC,MAAM,SAAUC,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACAI,OAAO;gBACL,MAAM,IAAIJ,MAAM;YAClB;YACAK,QAAQ;YACRC,MAAM,SAAUH,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACAO,UAAU;YACVC,WAAW;YACXC,YAAY;YACZC,YAAY;YACZC,QAAQ;gBACN,MAAM,IAAIX,MAAM;YAClB;YACAY,SAAS;gBACPC,QAAQ,EAAE;gBACVN,UAAUO;YACZ;YACAC,OAAO,SAAUZ,KAAc;gBAC7B,MAAM,IAAIH,MAAM;YAClB;YACAgB,MAAM;gBACJ,MAAM,IAAIhB,MAAM;YAClB;YACAiB,gBAAgB,SAAUC,QAAc;gBACtC,MAAM,IAAIlB,MAAM;YAClB;YACAmB,SAAS,SAAUhB,KAAc;gBAC/B,MAAM,IAAIH,MAAM;YAClB;YACAoB,YAAY;YACZC,MAAM;YACNC,MAAM,SAAUnB,KAAc;gBAC5B,MAAM,IAAIH,MAAM;YAClB;YACA,GAAGH,SAAS;QACd;IACF;AACF"}
@@ -28,6 +28,6 @@
28
28
  "@sanity/color": "^3.0.6",
29
29
  "@types/react": "^19.2.14",
30
30
  "typescript": "^6.0.3",
31
- "vite": "^8.1.5"
31
+ "vite": "^8.2.0"
32
32
  }
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli-test",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Sanity CLI test helpers and utilities",
5
5
  "keywords": [
6
6
  "cli",