@sanity/cli-core 0.1.0-alpha.8 → 1.0.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 (165) hide show
  1. package/dist/SanityCommand.js +88 -5
  2. package/dist/SanityCommand.js.map +1 -1
  3. package/dist/_exports/request.d.ts +77 -0
  4. package/dist/_exports/request.js +7 -0
  5. package/dist/_exports/request.js.map +1 -0
  6. package/dist/_exports/ux.d.ts +75 -4
  7. package/dist/_exports/ux.js +2 -1
  8. package/dist/_exports/ux.js.map +1 -1
  9. package/dist/config/cli/getCliConfig.js +33 -33
  10. package/dist/config/cli/getCliConfig.js.map +1 -1
  11. package/dist/config/cli/getCliConfigSync.js +1 -1
  12. package/dist/config/cli/getCliConfigSync.js.map +1 -1
  13. package/dist/config/cli/schemas.js +7 -0
  14. package/dist/config/cli/schemas.js.map +1 -1
  15. package/dist/config/cli/types/cliConfig.js.map +1 -1
  16. package/dist/config/findProjectRoot.js +8 -4
  17. package/dist/config/findProjectRoot.js.map +1 -1
  18. package/dist/config/findProjectRootSync.js +7 -3
  19. package/dist/config/findProjectRootSync.js.map +1 -1
  20. package/dist/config/studio/getStudioConfig.js +0 -3
  21. package/dist/config/studio/getStudioConfig.js.map +1 -1
  22. package/dist/config/studio/getStudioWorkspaces.js +63 -0
  23. package/dist/config/studio/getStudioWorkspaces.js.map +1 -0
  24. package/dist/config/studio/isStudioConfig.js +19 -0
  25. package/dist/config/studio/isStudioConfig.js.map +1 -0
  26. package/dist/config/studio/readStudioConfig.worker.js +8 -34
  27. package/dist/config/studio/readStudioConfig.worker.js.map +1 -1
  28. package/dist/config/util/findStudioConfigPath.js +24 -3
  29. package/dist/config/util/findStudioConfigPath.js.map +1 -1
  30. package/dist/config/util/recursivelyResolveProjectRoot.js.map +1 -1
  31. package/dist/errors/NonInteractiveError.js +18 -0
  32. package/dist/errors/NonInteractiveError.js.map +1 -0
  33. package/dist/{util → errors}/NotFoundError.js +1 -1
  34. package/dist/errors/NotFoundError.js.map +1 -0
  35. package/dist/errors/ProjectRootNotFoundError.js +35 -0
  36. package/dist/errors/ProjectRootNotFoundError.js.map +1 -0
  37. package/dist/index.d.ts +1247 -36
  38. package/dist/index.js +14 -9
  39. package/dist/index.js.map +1 -1
  40. package/dist/loaders/studio/studioWorkerLoader.worker.js +102 -23
  41. package/dist/loaders/studio/studioWorkerLoader.worker.js.map +1 -1
  42. package/dist/loaders/studio/studioWorkerTask.js +55 -34
  43. package/dist/loaders/studio/studioWorkerTask.js.map +1 -1
  44. package/dist/loaders/tsx/tsxWorkerLoader.worker.js +3 -4
  45. package/dist/loaders/tsx/tsxWorkerLoader.worker.js.map +1 -1
  46. package/dist/loaders/tsx/tsxWorkerTask.js +4 -31
  47. package/dist/loaders/tsx/tsxWorkerTask.js.map +1 -1
  48. package/dist/request/createRequester.js +83 -0
  49. package/dist/request/createRequester.js.map +1 -0
  50. package/dist/services/apiClient.js +8 -4
  51. package/dist/services/apiClient.js.map +1 -1
  52. package/dist/services/cliUserConfig.js +5 -5
  53. package/dist/services/cliUserConfig.js.map +1 -1
  54. package/dist/services/getCliToken.js +2 -2
  55. package/dist/services/getCliToken.js.map +1 -1
  56. package/dist/telemetry/getTelemetryBaseInfo.js +33 -0
  57. package/dist/telemetry/getTelemetryBaseInfo.js.map +1 -0
  58. package/dist/telemetry/types.js +5 -0
  59. package/dist/telemetry/types.js.map +1 -0
  60. package/dist/util/doImport.js +2 -1
  61. package/dist/util/doImport.js.map +1 -1
  62. package/dist/util/environment/mockBrowserEnvironment.js +1 -0
  63. package/dist/util/environment/mockBrowserEnvironment.js.map +1 -1
  64. package/dist/util/getCliTelemetry.js +34 -0
  65. package/dist/util/getCliTelemetry.js.map +1 -0
  66. package/dist/util/getSanityUrl.js +4 -3
  67. package/dist/util/getSanityUrl.js.map +1 -1
  68. package/dist/util/importModule.js +32 -0
  69. package/dist/util/importModule.js.map +1 -0
  70. package/dist/util/isInteractive.js +1 -1
  71. package/dist/util/isInteractive.js.map +1 -1
  72. package/dist/util/isStaging.js +10 -0
  73. package/dist/util/isStaging.js.map +1 -0
  74. package/dist/util/normalizePath.js +12 -0
  75. package/dist/util/normalizePath.js.map +1 -0
  76. package/dist/util/promisifyWorker.js +72 -0
  77. package/dist/util/promisifyWorker.js.map +1 -0
  78. package/dist/util/readNDJSON.js +18 -0
  79. package/dist/util/readNDJSON.js.map +1 -0
  80. package/dist/util/readPackageJson.js +74 -0
  81. package/dist/util/readPackageJson.js.map +1 -0
  82. package/dist/ux/boxen.js +3 -0
  83. package/dist/ux/boxen.js.map +1 -0
  84. package/dist/ux/colorizeJson.js +6 -6
  85. package/dist/ux/colorizeJson.js.map +1 -1
  86. package/dist/ux/prompts.js +49 -1
  87. package/dist/ux/prompts.js.map +1 -1
  88. package/package.json +39 -31
  89. package/dist/SanityCommand.d.ts +0 -78
  90. package/dist/_exports/tree.d.ts +0 -1
  91. package/dist/_exports/tree.js +0 -3
  92. package/dist/_exports/tree.js.map +0 -1
  93. package/dist/config/cli/getCliConfig.d.ts +0 -16
  94. package/dist/config/cli/getCliConfig.worker.d.ts +0 -1
  95. package/dist/config/cli/getCliConfig.worker.js +0 -15
  96. package/dist/config/cli/getCliConfig.worker.js.map +0 -1
  97. package/dist/config/cli/getCliConfigSync.d.ts +0 -12
  98. package/dist/config/cli/schemas.d.ts +0 -104
  99. package/dist/config/cli/types/cliConfig.d.ts +0 -83
  100. package/dist/config/cli/types/userViteConfig.d.ts +0 -5
  101. package/dist/config/findProjectRoot.d.ts +0 -14
  102. package/dist/config/findProjectRootSync.d.ts +0 -27
  103. package/dist/config/studio/getStudioConfig.d.ts +0 -14
  104. package/dist/config/studio/readStudioConfig.d.ts +0 -96
  105. package/dist/config/studio/readStudioConfig.worker.d.ts +0 -1
  106. package/dist/config/util/configPathsSync.d.ts +0 -17
  107. package/dist/config/util/findAppConfigPath.d.ts +0 -8
  108. package/dist/config/util/findConfigsPaths.d.ts +0 -16
  109. package/dist/config/util/findStudioConfigPath.d.ts +0 -9
  110. package/dist/config/util/isSanityV2StudioRoot.d.ts +0 -8
  111. package/dist/config/util/recursivelyResolveProjectRoot.d.ts +0 -27
  112. package/dist/debug.d.ts +0 -15
  113. package/dist/loaders/studio/studioWorkerLoader.worker.d.ts +0 -1
  114. package/dist/loaders/studio/studioWorkerTask.d.ts +0 -40
  115. package/dist/loaders/tsx/tsxWorkerLoader.worker.d.ts +0 -1
  116. package/dist/loaders/tsx/tsxWorkerTask.d.ts +0 -28
  117. package/dist/services/apiClient.d.ts +0 -53
  118. package/dist/services/cliUserConfig.d.ts +0 -40
  119. package/dist/services/getCliToken.d.ts +0 -7
  120. package/dist/types.d.ts +0 -15
  121. package/dist/util/NotFoundError.d.ts +0 -20
  122. package/dist/util/NotFoundError.js.map +0 -1
  123. package/dist/util/createExpiringConfig.d.ts +0 -37
  124. package/dist/util/createExpiringConfig.js +0 -60
  125. package/dist/util/createExpiringConfig.js.map +0 -1
  126. package/dist/util/doImport.d.ts +0 -7
  127. package/dist/util/environment/getStudioEnvironmentVariables.d.ts +0 -12
  128. package/dist/util/environment/mockBrowserEnvironment.d.ts +0 -17
  129. package/dist/util/environment/setupBrowserStubs.d.ts +0 -10
  130. package/dist/util/environment/stubs.d.ts +0 -254
  131. package/dist/util/fileExists.d.ts +0 -9
  132. package/dist/util/generateHelpUrl.d.ts +0 -8
  133. package/dist/util/getEmptyAuth.d.ts +0 -5
  134. package/dist/util/getSanityEnvVar.d.ts +0 -19
  135. package/dist/util/getSanityUrl.d.ts +0 -5
  136. package/dist/util/getUserConfig.d.ts +0 -2
  137. package/dist/util/isCi.d.ts +0 -1
  138. package/dist/util/isInteractive.d.ts +0 -1
  139. package/dist/util/isRecord.d.ts +0 -8
  140. package/dist/util/isTrueish.d.ts +0 -1
  141. package/dist/util/parseStringFlag.d.ts +0 -10
  142. package/dist/util/parseStringFlag.js +0 -19
  143. package/dist/util/parseStringFlag.js.map +0 -1
  144. package/dist/util/readJsonFile.d.ts +0 -14
  145. package/dist/util/resolveLocalPackage.d.ts +0 -18
  146. package/dist/util/safeStructuredClone.d.ts +0 -8
  147. package/dist/util/tree.d.ts +0 -31
  148. package/dist/util/tree.js +0 -108
  149. package/dist/util/tree.js.map +0 -1
  150. package/dist/util/tryGetDefaultExport.d.ts +0 -5
  151. package/dist/util/writeJsonFile.d.ts +0 -9
  152. package/dist/ux/chalk.d.ts +0 -2
  153. package/dist/ux/chalk.js +0 -4
  154. package/dist/ux/chalk.js.map +0 -1
  155. package/dist/ux/colorizeJson.d.ts +0 -1
  156. package/dist/ux/formatObject.d.ts +0 -1
  157. package/dist/ux/formatObject.js +0 -9
  158. package/dist/ux/formatObject.js.map +0 -1
  159. package/dist/ux/logSymbols.d.ts +0 -1
  160. package/dist/ux/printKeyValue.d.ts +0 -1
  161. package/dist/ux/printKeyValue.js +0 -16
  162. package/dist/ux/printKeyValue.js.map +0 -1
  163. package/dist/ux/prompts.d.ts +0 -1
  164. package/dist/ux/spinner.d.ts +0 -1
  165. package/dist/ux/timer.d.ts +0 -12
@@ -1,10 +0,0 @@
1
- /**
2
- * Sets up browser globals (window, document, etc.) in the global scope.
3
- *
4
- * This is used by both mockBrowserEnvironment (for child processes) and
5
- * studioWorkerLoader (for worker threads) to provide a browser-like environment.
6
- *
7
- * @returns A cleanup function that removes the injected globals
8
- * @internal
9
- */
10
- export declare function setupBrowserStubs(): Promise<() => void>;
@@ -1,254 +0,0 @@
1
- export declare const alert: (message?: any) => void;
2
- export declare const atob: (data: string) => string;
3
- export declare const blur: () => void;
4
- export declare const btoa: (data: string) => string;
5
- export declare const cancelAnimationFrame: (handle: number) => void;
6
- export declare const captureEvents: () => void;
7
- export declare const clearInterval: (id: number | undefined) => void;
8
- export declare const clearTimeout: (id: number | undefined) => void;
9
- export declare const close: () => void;
10
- export declare const confirm: (message?: string) => boolean;
11
- export declare const console: any;
12
- export declare const crypto: Crypto;
13
- export declare const CSSImportRule: {
14
- new (): CSSImportRule;
15
- prototype: CSSImportRule;
16
- };
17
- export declare const CSSMediaRule: {
18
- new (): CSSMediaRule;
19
- prototype: CSSMediaRule;
20
- };
21
- export declare const CSSRule: {
22
- new (): CSSRule;
23
- prototype: CSSRule;
24
- readonly STYLE_RULE: 1;
25
- readonly CHARSET_RULE: 2;
26
- readonly IMPORT_RULE: 3;
27
- readonly MEDIA_RULE: 4;
28
- readonly FONT_FACE_RULE: 5;
29
- readonly PAGE_RULE: 6;
30
- readonly NAMESPACE_RULE: 10;
31
- readonly KEYFRAMES_RULE: 7;
32
- readonly KEYFRAME_RULE: 8;
33
- readonly SUPPORTS_RULE: 12;
34
- readonly COUNTER_STYLE_RULE: 11;
35
- readonly FONT_FEATURE_VALUES_RULE: 14;
36
- };
37
- export declare const CSSStyleDeclaration: {
38
- new (): CSSStyleDeclaration;
39
- prototype: CSSStyleDeclaration;
40
- };
41
- export declare const CSSStyleRule: {
42
- new (): CSSStyleRule;
43
- prototype: CSSStyleRule;
44
- };
45
- export declare const CSSStyleSheet: {
46
- new (options?: CSSStyleSheetInit): CSSStyleSheet;
47
- prototype: CSSStyleSheet;
48
- };
49
- export declare const customElements: CustomElementRegistry;
50
- export declare const devicePixelRatio: number;
51
- export declare const document: Document;
52
- export declare const event: Event | undefined;
53
- export declare const external: External;
54
- export declare const focus: () => void;
55
- export declare const frameElement: Element | null;
56
- export declare const frames: Window;
57
- export declare const getComputedStyle: (elt: Element, pseudoElt?: string | null) => CSSStyleDeclaration;
58
- export declare const getSelection: () => Selection | null;
59
- export declare const history: History;
60
- export declare const innerHeight: number;
61
- export declare const innerWidth: number;
62
- export declare const length: number;
63
- export declare const localStorage: Storage;
64
- export declare const location: Location;
65
- export declare const locationbar: BarProp;
66
- export declare const MediaList: {
67
- new (): MediaList;
68
- prototype: MediaList;
69
- };
70
- export declare const menubar: BarProp;
71
- export declare const moveBy: (x: number, y: number) => void;
72
- export declare const moveTo: (x: number, y: number) => void;
73
- export declare const name: string;
74
- export declare const navigator: Navigator;
75
- export declare const onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
76
- export declare const onafterprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
77
- export declare const onautocomplete: any;
78
- export declare const onautocompleteerror: any;
79
- export declare const onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
80
- export declare const onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
81
- export declare const onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
82
- export declare const onbeforeprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
83
- export declare const onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
84
- export declare const onbeforeunload: ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any) | null;
85
- export declare const onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
86
- export declare const oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
87
- export declare const oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
88
- export declare const oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
89
- export declare const onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
90
- export declare const onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
91
- export declare const onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
92
- export declare const oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
93
- export declare const oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
94
- export declare const oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
95
- export declare const oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
96
- export declare const oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
97
- export declare const oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
98
- export declare const ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
99
- export declare const ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
100
- export declare const ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
101
- export declare const ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
102
- export declare const ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
103
- export declare const ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
104
- export declare const ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
105
- export declare const ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
106
- export declare const ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
107
- export declare const onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
108
- export declare const onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
109
- export declare const onerror: OnErrorEventHandler;
110
- export declare const onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
111
- export declare const onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
112
- export declare const onhashchange: ((this: WindowEventHandlers, ev: HashChangeEvent) => any) | null;
113
- export declare const oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
114
- export declare const oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
115
- export declare const onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
116
- export declare const onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
117
- export declare const onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
118
- export declare const onlanguagechange: ((this: WindowEventHandlers, ev: Event) => any) | null;
119
- export declare const onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
120
- export declare const onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
121
- export declare const onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
122
- export declare const onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
123
- export declare const onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
124
- export declare const onmessageerror: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
125
- export declare const onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
126
- export declare const onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
127
- export declare const onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
128
- export declare const onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
129
- export declare const onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
130
- export declare const onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
131
- export declare const onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
132
- export declare const onoffline: ((this: WindowEventHandlers, ev: Event) => any) | null;
133
- export declare const ononline: ((this: WindowEventHandlers, ev: Event) => any) | null;
134
- export declare const onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
135
- export declare const onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
136
- export declare const onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
137
- export declare const onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
138
- export declare const onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
139
- export declare const onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
140
- export declare const onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
141
- export declare const onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
142
- export declare const onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
143
- export declare const onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
144
- export declare const onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
145
- export declare const onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
146
- export declare const onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
147
- export declare const onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
148
- export declare const onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
149
- export declare const onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
150
- export declare const onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
151
- export declare const onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
152
- export declare const onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
153
- export declare const onsort: any;
154
- export declare const onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
155
- export declare const onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null;
156
- export declare const onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
157
- export declare const onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
158
- export declare const ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
159
- export declare const ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
160
- export declare const ontouchcancel: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
161
- export declare const ontouchend: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
162
- export declare const ontouchmove: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
163
- export declare const ontouchstart: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
164
- export declare const onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
165
- export declare const onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
166
- export declare const onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
167
- export declare const onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
168
- export declare const onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
169
- export declare const onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
170
- export declare const onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
171
- export declare const onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
172
- export declare const onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
173
- export declare const open: (url?: string | URL, target?: string, features?: string) => WindowProxy | null;
174
- export declare const origin: string;
175
- export declare const outerHeight: number;
176
- export declare const outerWidth: number;
177
- export declare const pageXOffset: number;
178
- export declare const pageYOffset: number;
179
- export declare const parent: Window;
180
- export declare const performance: Performance;
181
- export declare const personalbar: BarProp;
182
- export declare const postMessage: {
183
- (message: any, targetOrigin: string, transfer?: Transferable[]): void;
184
- (message: any, options?: WindowPostMessageOptions): void;
185
- };
186
- export declare const print: () => void;
187
- export declare const prompt: (message?: string, _default?: string) => string | null;
188
- export declare const queueMicrotask: (callback: VoidFunction) => void;
189
- export declare const releaseEvents: () => void;
190
- export declare const requestAnimationFrame: (callback: FrameRequestCallback) => number;
191
- export declare const resizeBy: (x: number, y: number) => void;
192
- export declare const resizeTo: (width: number, height: number) => void;
193
- export declare const screen: Screen;
194
- export declare const screenLeft: number;
195
- export declare const screenTop: number;
196
- export declare const screenX: number;
197
- export declare const screenY: number;
198
- export declare const scroll: {
199
- (options?: ScrollToOptions): void;
200
- (x: number, y: number): void;
201
- };
202
- export declare const scrollbars: BarProp;
203
- export declare const scrollBy: {
204
- (options?: ScrollToOptions): void;
205
- (x: number, y: number): void;
206
- };
207
- export declare const scrollTo: {
208
- (options?: ScrollToOptions): void;
209
- (x: number, y: number): void;
210
- };
211
- export declare const scrollX: number;
212
- export declare const scrollY: number;
213
- export declare const self: import("jsdom").DOMWindow;
214
- export declare const sessionStorage: Storage;
215
- export declare const setInterval: (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number;
216
- export declare const setTimeout: (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number;
217
- export declare const status: string;
218
- export declare const statusbar: BarProp;
219
- export declare const stop: () => void;
220
- export declare const StyleSheet: {
221
- new (): StyleSheet;
222
- prototype: StyleSheet;
223
- };
224
- export declare const toolbar: BarProp;
225
- export declare const top: import("jsdom").DOMWindow;
226
- export declare const window: import("jsdom").DOMWindow;
227
- export declare const XPathEvaluator: {
228
- new (): XPathEvaluator;
229
- prototype: XPathEvaluator;
230
- };
231
- export declare const XPathException: any;
232
- export declare const XPathExpression: {
233
- new (): XPathExpression;
234
- prototype: XPathExpression;
235
- };
236
- export declare const XPathResult: {
237
- new (): XPathResult;
238
- prototype: XPathResult;
239
- readonly ANY_TYPE: 0;
240
- readonly NUMBER_TYPE: 1;
241
- readonly STRING_TYPE: 2;
242
- readonly BOOLEAN_TYPE: 3;
243
- readonly UNORDERED_NODE_ITERATOR_TYPE: 4;
244
- readonly ORDERED_NODE_ITERATOR_TYPE: 5;
245
- readonly UNORDERED_NODE_SNAPSHOT_TYPE: 6;
246
- readonly ORDERED_NODE_SNAPSHOT_TYPE: 7;
247
- readonly ANY_UNORDERED_NODE_TYPE: 8;
248
- readonly FIRST_ORDERED_NODE_TYPE: 9;
249
- };
250
- export declare const requestIdleCallback: (callback: IdleRequestCallback, options?: IdleRequestOptions) => number;
251
- export declare const cancelIdleCallback: (handle: number) => void;
252
- export declare const ResizeObserver: any;
253
- export declare const IntersectionObserver: any;
254
- export declare const matchMedia: (query: string) => MediaQueryList;
@@ -1,9 +0,0 @@
1
- /**
2
- * Checks if a file exists and can be "accessed".
3
- * Prone to race conditions, but good enough for our use cases.
4
- *
5
- * @param filePath - The path to the file to check
6
- * @returns A promise that resolves to true if the file exists, false otherwise
7
- * @internal
8
- */
9
- export declare function fileExists(filePath: string): Promise<boolean>;
@@ -1,8 +0,0 @@
1
- /**
2
- * Generate a help URL for the given slug
3
- *
4
- * @param slug - The slug to generate a help URL for
5
- * @returns The generated help URL
6
- * @internal
7
- */
8
- export declare function generateHelpUrl(slug: string): string;
@@ -1,5 +0,0 @@
1
- export declare function getEmptyAuth(): {
2
- authenticated: boolean;
3
- client: import("@sanity/client").SanityClient;
4
- currentUser: null;
5
- };
@@ -1,19 +0,0 @@
1
- /**
2
- * Gets an environment variable with the appropriate Sanity prefix based on whether it's an app or studio.
3
- *
4
- * @param suffix - The suffix for the environment variable (e.g., 'SERVER_HOSTNAME')
5
- * @param isApp - Whether to use the app prefix (SANITY_APP_) or studio prefix (SANITY_STUDIO_)
6
- * @returns The value of the environment variable, or undefined if not set
7
- *
8
- * @example
9
- * ```ts
10
- * // For studio: SANITY_STUDIO_SERVER_HOSTNAME
11
- * const studioHostname = getSanityEnvVar('SERVER_HOSTNAME', false)
12
- *
13
- * // For app: SANITY_APP_SERVER_HOSTNAME
14
- * const appHostname = getSanityEnvVar('SERVER_HOSTNAME', true)
15
- * ```
16
- *
17
- * @internal
18
- */
19
- export declare function getSanityEnvVar(suffix: string, isApp: boolean): string | undefined;
@@ -1,5 +0,0 @@
1
- /**
2
- * @internal
3
- * @returns The domain for sanity depending on the environment
4
- */
5
- export declare function getSanityUrl(): "https://www.sanity.work" | "https://www.sanity.io";
@@ -1,2 +0,0 @@
1
- import ConfigStore from 'configstore';
2
- export declare const getUserConfig: () => ConfigStore;
@@ -1 +0,0 @@
1
- export declare const isCi: () => boolean;
@@ -1 +0,0 @@
1
- export declare function isInteractive(): boolean;
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if the given value is a record (javascript objectish)
3
- *
4
- * @param value - Value to check
5
- * @returns True if the value is a record, false otherwise
6
- * @internal
7
- */
8
- export declare function isRecord(value: unknown): value is Record<string, unknown>;
@@ -1 +0,0 @@
1
- export declare function isTrueish(value: string | undefined): boolean;
@@ -1,10 +0,0 @@
1
- /**
2
- * Parses an optional string flag from oclif.
3
- * If the input is undefined, return undefined
4
- * but if the input is empty, throw an error.
5
- *
6
- *
7
- * @param input - The input to parse
8
- * Throws an error if the input is empty
9
- */
10
- export declare function parseStringFlag(flagName: string, input?: string): Promise<string | undefined>;
@@ -1,19 +0,0 @@
1
- /**
2
- * Parses an optional string flag from oclif.
3
- * If the input is undefined, return undefined
4
- * but if the input is empty, throw an error.
5
- *
6
- *
7
- * @param input - The input to parse
8
- * Throws an error if the input is empty
9
- */ export async function parseStringFlag(flagName, input) {
10
- if (input === undefined) {
11
- return input;
12
- }
13
- if (!input) {
14
- throw new Error(`${flagName} argument is empty`);
15
- }
16
- return input;
17
- }
18
-
19
- //# sourceMappingURL=parseStringFlag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/parseStringFlag.ts"],"sourcesContent":["/**\n * Parses an optional string flag from oclif.\n * If the input is undefined, return undefined\n * but if the input is empty, throw an error.\n *\n *\n * @param input - The input to parse\n * Throws an error if the input is empty\n */\nexport async function parseStringFlag(flagName: string, input?: string) {\n if (input === undefined) {\n return input\n }\n\n if (!input) {\n throw new Error(`${flagName} argument is empty`)\n }\n\n return input\n}\n"],"names":["parseStringFlag","flagName","input","undefined","Error"],"mappings":"AAAA;;;;;;;;CAQC,GACD,OAAO,eAAeA,gBAAgBC,QAAgB,EAAEC,KAAc;IACpE,IAAIA,UAAUC,WAAW;QACvB,OAAOD;IACT;IAEA,IAAI,CAACA,OAAO;QACV,MAAM,IAAIE,MAAM,GAAGH,SAAS,kBAAkB,CAAC;IACjD;IAEA,OAAOC;AACT"}
@@ -1,14 +0,0 @@
1
- type JSONValue = boolean | JSONArray | JSONObject | number | string | null;
2
- type JSONObject = {
3
- [key: string]: JSONValue;
4
- };
5
- type JSONArray = Array<JSONValue>;
6
- /**
7
- * Read the file at the given path and parse it as JSON.
8
- *
9
- * @param filePath - Path to JSON file to read
10
- * @returns The parsed file
11
- * @internal
12
- */
13
- export declare function readJsonFile(filePath: string): Promise<JSONValue>;
14
- export {};
@@ -1,18 +0,0 @@
1
- /**
2
- * Resolves and imports a package from the local project's node_modules,
3
- * relative to the given working directory. This avoids circular dependencies
4
- * and ensures the correct version of the package is used.
5
- *
6
- * @param packageName - The name of the package to resolve (e.g., 'sanity')
7
- * @param workDir - The working directory to resolve the package from
8
- * @returns The imported module
9
- * @throws If the package cannot be resolved or imported
10
- *
11
- * @example
12
- * ```ts
13
- * const {createSchema} = await resolveLocalPackage('sanity', workDir)
14
- * ```
15
- *
16
- * @internal
17
- */
18
- export declare function resolveLocalPackage<T = unknown>(packageName: string, workDir: string): Promise<T>;
@@ -1,8 +0,0 @@
1
- /**
2
- * `structuredClone()`, but doesn't throw on non-clonable values - instead it drops them.
3
- *
4
- * @param obj - The object to clone.
5
- * @returns The cloned object.
6
- * @internal
7
- */
8
- export declare function safeStructuredClone<T>(obj: T): T;
@@ -1,31 +0,0 @@
1
- import { type Path } from '@sanity/types';
2
- interface BaseNode {
3
- path: Path;
4
- }
5
- export interface Tree<Node extends BaseNode> {
6
- children?: Record<string, Tree<Node>>;
7
- nodes?: Node[];
8
- }
9
- /**
10
- * Recursively calculates the max length of all the keys in the given validation
11
- * tree respecting extra length due to indentation depth. Used to calculate the
12
- * padding for the rest of the tree.
13
- */
14
- export declare const maxKeyLength: (children?: Record<string, Tree<BaseNode>>, depth?: number) => number;
15
- interface Options<Node extends BaseNode> {
16
- getMessage: (node: Node) => string;
17
- paddingLength: number;
18
- getNodes?: (node: Tree<Node>) => Node[] | undefined;
19
- indent?: string;
20
- node?: Record<string, Tree<Node>>;
21
- }
22
- /**
23
- * Recursively formats a given tree into a printed user-friendly tree structure
24
- */
25
- export declare const formatTree: <Node extends BaseNode>({ getMessage, getNodes: getLeaves, indent, node, paddingLength, }: Options<Node>) => string;
26
- /**
27
- * Converts a set of markers with paths into a tree of markers where the paths
28
- * are embedded in the tree
29
- */
30
- export declare function convertToTree<const Node extends BaseNode>(nodes: Node[]): Tree<Node>;
31
- export {};
package/dist/util/tree.js DELETED
@@ -1,108 +0,0 @@
1
- import { isIndexSegment, isIndexTuple, isKeySegment } from '@sanity/types';
2
- // FIXME: de-dupe this
3
- // copy/paste of `pathToString` from 'sanity' to prevent circular imports
4
- function pathToString(path) {
5
- if (!Array.isArray(path)) {
6
- throw new TypeError('Path is not an array');
7
- }
8
- let target = '';
9
- let i = 0;
10
- for (const segment of path){
11
- if (isIndexSegment(segment)) {
12
- target = `${target}[${segment}]`;
13
- } else if (isKeySegment(segment) && segment._key) {
14
- target = `${target}[_key=="${segment._key}"]`;
15
- } else if (isIndexTuple(segment)) {
16
- const [from, to] = segment;
17
- target = `${target}[${from}:${to}]`;
18
- } else if (typeof segment === 'string') {
19
- const separator = i === 0 ? '' : '.';
20
- target = `${target}${separator}${segment}`;
21
- } else {
22
- throw new TypeError(`Unsupported path segment \`${JSON.stringify(segment)}\``);
23
- }
24
- i++;
25
- }
26
- return target;
27
- }
28
- /**
29
- * Recursively calculates the max length of all the keys in the given validation
30
- * tree respecting extra length due to indentation depth. Used to calculate the
31
- * padding for the rest of the tree.
32
- */ export const maxKeyLength = (children = {}, depth = 0)=>{
33
- let max = 0;
34
- for (const [key, child] of Object.entries(children)){
35
- const currentMax = Math.max(key.length + depth * 2, maxKeyLength(child.children, depth + 1));
36
- max = Math.max(max, currentMax);
37
- }
38
- return max;
39
- };
40
- /**
41
- * Recursively formats a given tree into a printed user-friendly tree structure
42
- */ export const formatTree = ({ getMessage, getNodes: getLeaves = ({ nodes })=>nodes, indent = '', node = {}, paddingLength })=>{
43
- const entries = Object.entries(node);
44
- return entries.map(([key, child], index)=>{
45
- const isLast = index === entries.length - 1;
46
- const nextIndent = `${indent}${isLast ? ' ' : '│ '}`;
47
- const leaves = getLeaves(child);
48
- const nested = formatTree({
49
- getMessage,
50
- getNodes: getLeaves,
51
- indent: nextIndent,
52
- node: child.children,
53
- paddingLength
54
- });
55
- if (!leaves?.length) {
56
- const current = `${indent}${isLast ? '└' : '├'}─ ${key}`;
57
- return [
58
- current,
59
- nested
60
- ].filter(Boolean).join('\n');
61
- }
62
- const [first, ...rest] = leaves;
63
- const firstPadding = '.'.repeat(paddingLength - indent.length - key.length);
64
- const elbow = isLast ? '└' : '├';
65
- const subsequentPadding = ' '.repeat(paddingLength - indent.length + 2);
66
- const firstMessage = `${indent}${elbow}─ ${key} ${firstPadding} ${getMessage(first)}`;
67
- const subsequentMessages = rest.map((marker)=>`${nextIndent}${subsequentPadding} ${getMessage(marker)}`).join('\n');
68
- const current = [
69
- firstMessage,
70
- subsequentMessages
71
- ].filter(Boolean).join('\n');
72
- return [
73
- current,
74
- nested
75
- ].filter(Boolean).join('\n');
76
- }).join('\n');
77
- };
78
- /**
79
- * Converts a set of markers with paths into a tree of markers where the paths
80
- * are embedded in the tree
81
- */ export function convertToTree(nodes) {
82
- const root = {};
83
- // add the markers to the tree
84
- function addNode(node, tree = root) {
85
- // if we've traversed the whole path
86
- if (node.path.length === 0) {
87
- if (!tree.nodes) tree.nodes = []; // ensure markers is defined
88
- // then add the marker to the front
89
- tree.nodes.push(node);
90
- return;
91
- }
92
- const [current, ...rest] = node.path;
93
- const key = pathToString([
94
- current
95
- ]);
96
- // ensure the current node has children and the next node
97
- if (!tree.children) tree.children = {};
98
- if (!(key in tree.children)) tree.children[key] = {};
99
- addNode({
100
- ...node,
101
- path: rest
102
- }, tree.children[key]);
103
- }
104
- for (const node of nodes)addNode(node);
105
- return root;
106
- }
107
-
108
- //# sourceMappingURL=tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/tree.ts"],"sourcesContent":["import {isIndexSegment, isIndexTuple, isKeySegment, type Path} from '@sanity/types'\n\n// FIXME: de-dupe this\n// copy/paste of `pathToString` from 'sanity' to prevent circular imports\nfunction pathToString(path: Path): string {\n if (!Array.isArray(path)) {\n throw new TypeError('Path is not an array')\n }\n\n let target = ''\n let i = 0\n for (const segment of path) {\n if (isIndexSegment(segment)) {\n target = `${target}[${segment}]`\n } else if (isKeySegment(segment) && segment._key) {\n target = `${target}[_key==\"${segment._key}\"]`\n } else if (isIndexTuple(segment)) {\n const [from, to] = segment\n target = `${target}[${from}:${to}]`\n } else if (typeof segment === 'string') {\n const separator = i === 0 ? '' : '.'\n target = `${target}${separator}${segment}`\n } else {\n throw new TypeError(`Unsupported path segment \\`${JSON.stringify(segment)}\\``)\n }\n i++\n }\n return target\n}\n\ninterface BaseNode {\n path: Path\n}\n\nexport interface Tree<Node extends BaseNode> {\n children?: Record<string, Tree<Node>>\n nodes?: Node[]\n}\n\n/**\n * Recursively calculates the max length of all the keys in the given validation\n * tree respecting extra length due to indentation depth. Used to calculate the\n * padding for the rest of the tree.\n */\nexport const maxKeyLength = (children: Record<string, Tree<BaseNode>> = {}, depth = 0): number => {\n let max = 0\n for (const [key, child] of Object.entries(children)) {\n const currentMax = Math.max(key.length + depth * 2, maxKeyLength(child.children, depth + 1))\n max = Math.max(max, currentMax)\n }\n return max\n}\n\ninterface Options<Node extends BaseNode> {\n getMessage: (node: Node) => string\n paddingLength: number\n\n getNodes?: (node: Tree<Node>) => Node[] | undefined\n indent?: string\n node?: Record<string, Tree<Node>>\n}\n\n/**\n * Recursively formats a given tree into a printed user-friendly tree structure\n */\nexport const formatTree = <Node extends BaseNode>({\n getMessage,\n getNodes: getLeaves = ({nodes}) => nodes,\n indent = '',\n node = {},\n paddingLength,\n}: Options<Node>): string => {\n const entries = Object.entries(node)\n\n return entries\n .map(([key, child], index) => {\n const isLast = index === entries.length - 1\n const nextIndent = `${indent}${isLast ? ' ' : '│ '}`\n const leaves = getLeaves(child)\n\n const nested = formatTree({\n getMessage,\n getNodes: getLeaves,\n indent: nextIndent,\n node: child.children,\n paddingLength,\n })\n\n if (!leaves?.length) {\n const current = `${indent}${isLast ? '└' : '├'}─ ${key}`\n return [current, nested].filter(Boolean).join('\\n')\n }\n\n const [first, ...rest] = leaves\n const firstPadding = '.'.repeat(paddingLength - indent.length - key.length)\n const elbow = isLast ? '└' : '├'\n const subsequentPadding = ' '.repeat(paddingLength - indent.length + 2)\n\n const firstMessage = `${indent}${elbow}─ ${key} ${firstPadding} ${getMessage(first)}`\n const subsequentMessages = rest\n .map((marker) => `${nextIndent}${subsequentPadding} ${getMessage(marker)}`)\n .join('\\n')\n\n const current = [firstMessage, subsequentMessages].filter(Boolean).join('\\n')\n return [current, nested].filter(Boolean).join('\\n')\n })\n .join('\\n')\n}\n\n/**\n * Converts a set of markers with paths into a tree of markers where the paths\n * are embedded in the tree\n */\nexport function convertToTree<const Node extends BaseNode>(nodes: Node[]): Tree<Node> {\n const root: Tree<Node> = {}\n\n // add the markers to the tree\n function addNode(node: Node, tree: Tree<Node> = root) {\n // if we've traversed the whole path\n if (node.path.length === 0) {\n if (!tree.nodes) tree.nodes = [] // ensure markers is defined\n\n // then add the marker to the front\n tree.nodes.push(node)\n return\n }\n\n const [current, ...rest] = node.path\n const key = pathToString([current])\n\n // ensure the current node has children and the next node\n if (!tree.children) tree.children = {}\n if (!(key in tree.children)) tree.children[key] = {}\n\n addNode({...node, path: rest}, tree.children[key])\n }\n\n for (const node of nodes) addNode(node)\n return root\n}\n"],"names":["isIndexSegment","isIndexTuple","isKeySegment","pathToString","path","Array","isArray","TypeError","target","i","segment","_key","from","to","separator","JSON","stringify","maxKeyLength","children","depth","max","key","child","Object","entries","currentMax","Math","length","formatTree","getMessage","getNodes","getLeaves","nodes","indent","node","paddingLength","map","index","isLast","nextIndent","leaves","nested","current","filter","Boolean","join","first","rest","firstPadding","repeat","elbow","subsequentPadding","firstMessage","subsequentMessages","marker","convertToTree","root","addNode","tree","push"],"mappings":"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"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Try to get the default export of a module of the cli config.
3
- * This can be either ESM or CJS.
4
- */
5
- export declare function tryGetDefaultExport(mod: unknown): unknown;
@@ -1,9 +0,0 @@
1
- /**
2
- * Serialize the given `data` as JSON and write it to the given path.
3
- *
4
- * @param filePath - Path to JSON file to read
5
- * @internal
6
- */
7
- export declare function writeJsonFile(filePath: string, data: unknown, options?: {
8
- pretty?: boolean;
9
- }): Promise<void>;
@@ -1,2 +0,0 @@
1
- export { default as chalk } from 'chalk';
2
- export * from 'chalk';
package/dist/ux/chalk.js DELETED
@@ -1,4 +0,0 @@
1
- export { default as chalk } from 'chalk';
2
- export * from 'chalk';
3
-
4
- //# sourceMappingURL=chalk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ux/chalk.ts"],"sourcesContent":["export {default as chalk} from 'chalk'\nexport * from 'chalk'\n"],"names":["default","chalk"],"mappings":"AAAA,SAAQA,WAAWC,KAAK,QAAO,QAAO;AACtC,cAAc,QAAO"}
@@ -1 +0,0 @@
1
- export declare function colorizeJson(input: unknown): string;
@@ -1 +0,0 @@
1
- export declare function formatObject(obj: unknown): string;
@@ -1,9 +0,0 @@
1
- import { inspect } from 'node:util';
2
- export function formatObject(obj) {
3
- return inspect(obj, {
4
- colors: true,
5
- depth: +Infinity
6
- });
7
- }
8
-
9
- //# sourceMappingURL=formatObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ux/formatObject.ts"],"sourcesContent":["import {inspect} from 'node:util'\n\nexport function formatObject(obj: unknown): string {\n return inspect(obj, {colors: true, depth: +Infinity})\n}\n"],"names":["inspect","formatObject","obj","colors","depth","Infinity"],"mappings":"AAAA,SAAQA,OAAO,QAAO,YAAW;AAEjC,OAAO,SAASC,aAAaC,GAAY;IACvC,OAAOF,QAAQE,KAAK;QAACC,QAAQ;QAAMC,OAAO,CAACC;IAAQ;AACrD"}
@@ -1 +0,0 @@
1
- export { default as logSymbols } from 'log-symbols';
@@ -1 +0,0 @@
1
- export declare function printKeyValue(obj: Record<string, unknown>): void;