@sanity/cli-core 2.8.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/NonInteractiveError-CSLT5y93.d.ts +13 -0
- package/dist/ProjectRootNotFoundError-RgthN9uy.d.ts +47 -0
- package/dist/SanityCommand.d.ts +26 -355
- package/dist/SanityCommand.js +5 -0
- package/dist/SanityCommand.js.map +1 -1
- package/dist/_exports/browser.d.ts +2 -21
- package/dist/_exports/config.d.ts +5 -661
- package/dist/_exports/debug.d.ts +4 -8
- package/dist/_exports/debug.js +3 -3
- package/dist/_exports/debug.js.map +1 -1
- package/dist/_exports/errors.d.ts +12 -77
- package/dist/_exports/index.d.ts +34 -1674
- package/dist/_exports/package-manager.d.ts +14 -207
- package/dist/_exports/request.d.ts +52 -69
- package/dist/_exports/request.js +5 -4
- package/dist/_exports/request.js.map +1 -1
- package/dist/_exports/schemas.d.ts +2 -235
- package/dist/_exports/tasks.d.ts +2 -120
- package/dist/_exports/telemetry.d.ts +2 -156
- package/dist/_exports/types.d.ts +9 -475
- package/dist/_exports/undeploy.d.ts +45 -62
- package/dist/_exports/undeploy.js +1 -3
- package/dist/_exports/undeploy.js.map +1 -1
- package/dist/_exports/util.d.ts +6 -137
- package/dist/_exports/ux.d.ts +31 -102
- package/dist/apiClient-DXlF5ZV3.d.ts +65 -0
- package/dist/apiClient.d.ts +2 -79
- package/dist/apiClient.js +69 -47
- package/dist/apiClient.js.map +1 -1
- package/dist/cliConfig-CbW8neMv.d.ts +171 -0
- package/dist/errors/enrichAuthError.js +48 -0
- package/dist/errors/enrichAuthError.js.map +1 -0
- package/dist/errors/getErrorMessage.js +3 -1
- package/dist/errors/getErrorMessage.js.map +1 -1
- package/dist/executionContext.d.ts +21 -20
- package/dist/executionContext.js.map +1 -1
- package/dist/exitCodes.d.ts +3 -3
- package/dist/findStudioConfigPath-DcKlHhyW.d.ts +265 -0
- package/dist/getWorkspace-CU32E6Uo.d.ts +54 -0
- package/dist/mockBrowserEnvironment-BjFQPb2W.d.ts +19 -0
- package/dist/noopTelemetry-BJRIvASI.d.ts +64 -0
- package/dist/readPackageJson-Cr_lbjVR.d.ts +67 -0
- package/dist/recursivelyResolveProjectRoot-BE54uEP6.d.ts +18 -0
- package/dist/request/createRequester.js +39 -50
- package/dist/request/createRequester.js.map +1 -1
- package/dist/request/nodeReadableFromWeb.js +64 -0
- package/dist/request/nodeReadableFromWeb.js.map +1 -0
- package/dist/resolveLocalPackage-Dr-TNTyk.d.ts +78 -0
- package/dist/safeStructuredClone-CWB0MXmH.d.ts +58 -0
- package/dist/schemas-DRCVXpyW.d.ts +140 -0
- package/dist/timer-Dwu2TIgB.d.ts +14 -0
- package/dist/tsxWorkerTask-CxG3fWbU.d.ts +97 -0
- package/dist/types-CwJLTYDj.d.ts +23 -0
- package/dist/types-ZNH3prAd.d.ts +91 -0
- package/dist/ux/spinner.js +70 -9
- package/dist/ux/spinner.js.map +1 -1
- package/dist/workbenchApp-Dhtbsuhn.d.ts +22 -0
- package/package.json +7 -8
- package/dist/request/createIsolatedRequester.js +0 -75
- package/dist/request/createIsolatedRequester.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/_exports/debug.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../src/_exports/debug.ts"],"sourcesContent":["import {createDebug} from 'obug'\n\nimport {getCliExecutionContext} from '../executionContext.js'\n\n/**\n * `debug` instance for the CLI\n *\n * @internal\n */\nexport const debug = createDebug('sanity:cli')\n\nconst defaultLog: (...args: unknown[]) => void = debug.log.bind(debug)\ndebug.log = (...args: unknown[]) => {\n // DEBUG belongs to the embedding process, not to an individual invocation.\n // Suppress it inside the execution context so it cannot bypass output sinks or expose request details to unrelated host logs.\n if (getCliExecutionContext()) return\n defaultLog(...args)\n}\n\n/**\n * Get a `debug` instance which extends the CLI debug instance with the given namespace,\n * eg namespace would be `sanity:cli:<providedNamespace>`\n *\n * @param namespace - The namespace to extend the CLI debug instance with\n * @returns The extended `debug` instance\n */\nexport const subdebug = (namespace: string) => debug.extend(namespace)\n"],"names":["createDebug","getCliExecutionContext","debug","defaultLog","log","bind","args","subdebug","namespace","extend"],"mappings":"AAAA,SAAQA,WAAW,QAAO,OAAM;AAEhC,SAAQC,sBAAsB,QAAO,yBAAwB;AAE7D;;;;CAIC,GACD,OAAO,MAAMC,QAAQF,YAAY,cAAa;AAE9C,MAAMG,aAA2CD,MAAME,GAAG,CAACC,IAAI,CAACH;AAChEA,MAAME,GAAG,GAAG,CAAC,GAAGE;IACd,2EAA2E;IAC3E,8HAA8H;IAC9H,IAAIL,0BAA0B;IAC9BE,cAAcG;AAChB;AAEA;;;;;;CAMC,GACD,OAAO,MAAMC,WAAW,CAACC,YAAsBN,MAAMO,MAAM,CAACD,WAAU"}
|
|
@@ -1,85 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as NonInteractiveError } from "../NonInteractiveError-CSLT5y93.js";
|
|
2
|
+
import { i as isNotFoundError, n as isProjectRootNotFoundError, r as NotFoundError, t as ProjectRootNotFoundError } from "../ProjectRootNotFoundError-RgthN9uy.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param err - The error object
|
|
7
|
-
* @returns The error message
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare function getErrorMessage(err: unknown): string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Returns whether or not the given error is a `NotFoundError`
|
|
14
|
-
*
|
|
15
|
-
* @param err - The error to check
|
|
16
|
-
* @returns `true` if the error is a `NotFoundError`, `false` otherwise
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export declare function isNotFoundError(err: unknown): err is NotFoundError;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Returns whether or not the given error is a `ProjectRootNotFoundError`
|
|
23
|
-
*
|
|
24
|
-
* @param err - The error to check
|
|
25
|
-
* @returns `true` if the error is a `ProjectRootNotFoundError`, `false` otherwise
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
export declare function isProjectRootNotFoundError(
|
|
29
|
-
err: unknown,
|
|
30
|
-
): err is ProjectRootNotFoundError;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Error thrown when a prompt is attempted in a non-interactive environment
|
|
34
|
-
* (e.g., CI, non-TTY, piped stdin). Callers can catch this specific error
|
|
35
|
-
* to provide appropriate fallback behavior.
|
|
36
|
-
*
|
|
37
|
-
* Extends `CLIError` to suppress stack traces in user-facing output.
|
|
38
|
-
*/
|
|
39
|
-
export declare class NonInteractiveError extends CLIError {
|
|
40
|
-
constructor(promptName: string);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Error thrown when a file or directory is not found
|
|
45
|
-
*
|
|
46
|
-
* `code` is always `ENOENT` to mirror Node.js behavior when a file is not found
|
|
47
|
-
*
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
export declare class NotFoundError extends Error {
|
|
51
|
-
code: string;
|
|
52
|
-
path?: string;
|
|
53
|
-
constructor(message: string, path?: string);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Error thrown when a project root directory cannot be found.
|
|
58
|
-
*
|
|
59
|
-
* This occurs when the CLI is run outside a Sanity project directory
|
|
60
|
-
* (one containing `sanity.config.(ts|js)` or `sanity.cli.(ts|js)`).
|
|
61
|
-
*
|
|
62
|
-
* Extends `CLIError` to suppress stack traces in user-facing output.
|
|
4
|
+
* Coerce an unknown thrown value into an Error instance.
|
|
63
5
|
*
|
|
6
|
+
* @param value - The thrown value
|
|
7
|
+
* @returns An Error instance (the original if already an Error, otherwise a new one)
|
|
64
8
|
* @internal
|
|
65
9
|
*/
|
|
66
|
-
|
|
67
|
-
constructor(
|
|
68
|
-
message: string,
|
|
69
|
-
options?: {
|
|
70
|
-
cause?: Error;
|
|
71
|
-
suggestions?: string[];
|
|
72
|
-
},
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
10
|
+
declare function toError(value: unknown): Error;
|
|
76
11
|
/**
|
|
77
|
-
*
|
|
12
|
+
* Get the error message from an error object
|
|
78
13
|
*
|
|
79
|
-
* @param
|
|
80
|
-
* @returns
|
|
14
|
+
* @param err - The error object
|
|
15
|
+
* @returns The error message
|
|
81
16
|
* @internal
|
|
82
17
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
18
|
+
declare function getErrorMessage(err: unknown): string;
|
|
19
|
+
export { NonInteractiveError, NotFoundError, ProjectRootNotFoundError, getErrorMessage, isNotFoundError, isProjectRootNotFoundError, toError };
|
|
20
|
+
//# sourceMappingURL=errors.d.ts.map
|