@sanity/cli-core 3.0.0 → 3.2.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/types.js.map +1 -1
- package/dist/_exports/undeploy.d.ts +38 -51
- 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-DrUV6Wp6.d.ts +197 -0
- package/dist/config/cli/schemas.js.map +1 -1
- package/dist/config/cli/types/cliConfig.js.map +1 -1
- package/dist/errors/NonInteractiveError.js +2 -1
- package/dist/errors/NonInteractiveError.js.map +1 -1
- package/dist/errors/ProjectRootNotFoundError.js +2 -1
- package/dist/errors/ProjectRootNotFoundError.js.map +1 -1
- 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-DeBa0pMT.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-Y-KwP413.d.ts +100 -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/workbenchApp-CSYpReA-.d.ts +22 -0
- package/package.json +16 -12
- package/dist/request/createIsolatedRequester.js +0 -75
- package/dist/request/createIsolatedRequester.js.map +0 -1
package/dist/_exports/util.d.ts
CHANGED
|
@@ -1,137 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare function doImport(source: string): Promise<any>;
|
|
8
|
-
|
|
9
|
-
export declare function getCoreAppUrl(
|
|
10
|
-
organizationId: string,
|
|
11
|
-
appId: string,
|
|
12
|
-
): string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Returns the base Sanity configuration directory for the current user.
|
|
16
|
-
* For persistent user settings (auth tokens, preferences, etc.).
|
|
17
|
-
* Respects `SANITY_INTERNAL_ENV=staging` to isolate staging instances.
|
|
18
|
-
*
|
|
19
|
-
* Layout: `~/.config/sanity{-staging}/`
|
|
20
|
-
*
|
|
21
|
-
* @returns Absolute path to the config directory
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
export declare function getSanityConfigDir(): string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Returns the base Sanity data directory for the current user.
|
|
28
|
-
* For ephemeral runtime state (dev-server registries, caches, etc.).
|
|
29
|
-
* Respects `SANITY_INTERNAL_ENV=staging` to isolate staging instances.
|
|
30
|
-
*
|
|
31
|
-
* Layout: `~/.sanity{-staging}/`
|
|
32
|
-
*
|
|
33
|
-
* @returns Absolute path to the data directory
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
export declare function getSanityDataDir(): string;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Gets an environment variable with the appropriate Sanity prefix based on whether it's an app or studio.
|
|
40
|
-
*
|
|
41
|
-
* @param suffix - The suffix for the environment variable (e.g., 'SERVER_HOSTNAME')
|
|
42
|
-
* @param isApp - Whether to use the app prefix (SANITY_APP_) or studio prefix (SANITY_STUDIO_)
|
|
43
|
-
* @returns The value of the environment variable, or undefined if not set
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* // For studio: SANITY_STUDIO_SERVER_HOSTNAME
|
|
48
|
-
* const studioHostname = getSanityEnvVar('SERVER_HOSTNAME', false)
|
|
49
|
-
*
|
|
50
|
-
* // For app: SANITY_APP_SERVER_HOSTNAME
|
|
51
|
-
* const appHostname = getSanityEnvVar('SERVER_HOSTNAME', true)
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @internal
|
|
55
|
-
*/
|
|
56
|
-
export declare function getSanityEnvVar(
|
|
57
|
-
suffix: string,
|
|
58
|
-
isApp: boolean,
|
|
59
|
-
): string | undefined;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
* @returns The Sanity URL for the given path, using the correct domain based on the environment
|
|
64
|
-
*/
|
|
65
|
-
export declare function getSanityUrl(path?: string): string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
export declare function getWorkspace<
|
|
71
|
-
T extends {
|
|
72
|
-
name: string;
|
|
73
|
-
},
|
|
74
|
-
>(workspaces: T[], workspaceName?: string): T;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Imports a module using jiti and returns its exports.
|
|
78
|
-
* This is a thin wrapper around tsx to allow swapping out the underlying implementation in the future if needed.
|
|
79
|
-
*
|
|
80
|
-
* @param filePath - Path to the module to import.
|
|
81
|
-
* @param options - Options for the importModule function.
|
|
82
|
-
* @returns The exported module.
|
|
83
|
-
*
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
export declare function importModule<T = unknown>(
|
|
87
|
-
filePath: string | URL,
|
|
88
|
-
options?: ImportModuleOptions,
|
|
89
|
-
): Promise<T>;
|
|
90
|
-
|
|
91
|
-
declare interface ImportModuleOptions {
|
|
92
|
-
/**
|
|
93
|
-
* Whether to return the default export of the module.
|
|
94
|
-
* Default: true
|
|
95
|
-
*/
|
|
96
|
-
default?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Path to the tsconfig file to use for the import. If not provided, the tsconfig
|
|
99
|
-
* will be inferred from the nearest `tsconfig.json` file.
|
|
100
|
-
*/
|
|
101
|
-
tsconfigPath?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export declare const isCi: () => boolean;
|
|
105
|
-
|
|
106
|
-
export declare function isInteractive(): boolean;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Checks if the environment is staging.
|
|
110
|
-
*
|
|
111
|
-
* @returns True if the environment is staging, false otherwise
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
export declare function isStaging(): boolean;
|
|
115
|
-
|
|
116
|
-
export declare function isTrueish(value: string | undefined): boolean;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Normalizes a path for cross-platform comparison by converting backslashes to forward slashes.
|
|
120
|
-
* Useful for converting windows paths to unix paths.
|
|
121
|
-
*
|
|
122
|
-
* @param path - Path to normalize
|
|
123
|
-
* @returns Normalized path with forward slashes
|
|
124
|
-
* @public
|
|
125
|
-
*/
|
|
126
|
-
export declare function normalizePath(path: string): string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* `structuredClone()`, but doesn't throw on non-clonable values - instead it drops them.
|
|
130
|
-
*
|
|
131
|
-
* @param obj - The object to clone.
|
|
132
|
-
* @returns The cloned object.
|
|
133
|
-
* @internal
|
|
134
|
-
*/
|
|
135
|
-
export declare function safeStructuredClone<T>(obj: T): T;
|
|
136
|
-
|
|
137
|
-
export {};
|
|
1
|
+
import { a as getSanityDataDir, i as getSanityConfigDir, n as getSanityUrl, r as getSanityEnvVar, t as getWorkspace } from "../getWorkspace-CU32E6Uo.js";
|
|
2
|
+
import { a as isCi, i as isInteractive, n as normalizePath, o as importModule, r as isStaging, s as doImport, t as safeStructuredClone } from "../safeStructuredClone-CWB0MXmH.js";
|
|
3
|
+
declare function getCoreAppUrl(organizationId: string, appId: string): string;
|
|
4
|
+
declare function isTrueish(value: string | undefined): boolean;
|
|
5
|
+
export { doImport, getCoreAppUrl, getSanityConfigDir, getSanityDataDir, getSanityEnvVar, getSanityUrl, getWorkspace, importModule, isCi, isInteractive, isStaging, isTrueish, normalizePath, safeStructuredClone };
|
|
6
|
+
//# sourceMappingURL=util.d.ts.map
|
package/dist/_exports/ux.d.ts
CHANGED
|
@@ -1,39 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Boxes } from "boxen";
|
|
4
|
-
import
|
|
5
|
-
import { CustomBorderStyle } from "boxen";
|
|
1
|
+
import { t as NonInteractiveError } from "../NonInteractiveError-CSLT5y93.js";
|
|
2
|
+
import { n as colorizeJson, t as getTimer } from "../timer-Dwu2TIgB.js";
|
|
3
|
+
import boxen, { Boxes, CustomBorderStyle, Options as BoxenOptions, Spacing } from "boxen";
|
|
4
|
+
import logSymbols from "log-symbols";
|
|
6
5
|
import * as inquirer from "@inquirer/prompts";
|
|
7
|
-
import { default as logSymbols } from "log-symbols";
|
|
8
|
-
import { Options } from "ora";
|
|
9
|
-
import { Ora } from "ora";
|
|
10
|
-
import { PromiseOptions } from "ora";
|
|
11
6
|
import { Separator } from "@inquirer/prompts";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { boxen };
|
|
16
|
-
|
|
17
|
-
export { BoxenOptions };
|
|
18
|
-
|
|
19
|
-
export { Boxes };
|
|
20
|
-
|
|
21
|
-
export declare const checkbox: typeof inquirer.checkbox;
|
|
22
|
-
|
|
23
|
-
export declare function colorizeJson(input: unknown): string;
|
|
24
|
-
|
|
25
|
-
export declare const confirm: typeof inquirer.confirm;
|
|
26
|
-
|
|
27
|
-
/** Create a {@link Flow} that writes rail lines through `log`. */
|
|
28
|
-
export declare function createFlow(log: LogFn): Flow;
|
|
29
|
-
|
|
30
|
-
export { CustomBorderStyle };
|
|
31
|
-
|
|
32
|
-
export declare const editor: typeof inquirer.editor;
|
|
33
|
-
|
|
34
|
-
export declare const expand: typeof inquirer.expand;
|
|
35
|
-
|
|
36
|
-
export declare interface Flow {
|
|
7
|
+
import { Options, Ora, PromiseOptions, Spinner as Spinner$1 } from "ora";
|
|
8
|
+
type LogFn = (message?: string) => void;
|
|
9
|
+
interface Flow {
|
|
37
10
|
/** A copyable command belonging to the preceding action. */
|
|
38
11
|
command(command: string): void;
|
|
39
12
|
/** `│` — a blank rail line separating steps. */
|
|
@@ -45,13 +18,10 @@ export declare interface Flow {
|
|
|
45
18
|
/** `│ <text>` — a continuation line belonging to the previous step. */
|
|
46
19
|
line(text: string): void;
|
|
47
20
|
/** A copy-safe URL. Long URLs are never hard-wrapped. */
|
|
48
|
-
link(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
outro?: boolean;
|
|
53
|
-
},
|
|
54
|
-
): void;
|
|
21
|
+
link(url: string, options?: {
|
|
22
|
+
label?: string;
|
|
23
|
+
outro?: boolean;
|
|
24
|
+
}): void;
|
|
55
25
|
/** `●` — a step happening behind the scenes, or a tip. */
|
|
56
26
|
note(text: string): void;
|
|
57
27
|
/** `└` — closing line of the story. */
|
|
@@ -67,64 +37,23 @@ export declare interface Flow {
|
|
|
67
37
|
succeed(text: string): void;
|
|
68
38
|
};
|
|
69
39
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
declare
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
export declare class NonInteractiveError extends CLIError {
|
|
92
|
-
constructor(promptName: string);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export declare const number: typeof inquirer.number;
|
|
96
|
-
|
|
97
|
-
export declare const password: typeof inquirer.password;
|
|
98
|
-
|
|
99
|
-
export declare const rawlist: typeof inquirer.rawlist;
|
|
100
|
-
|
|
101
|
-
export declare const search: typeof inquirer.search;
|
|
102
|
-
|
|
103
|
-
export declare const select: typeof inquirer.select;
|
|
104
|
-
|
|
105
|
-
export { Separator };
|
|
106
|
-
|
|
107
|
-
export { Spacing };
|
|
108
|
-
|
|
109
|
-
export declare type Spinner = Spinner_2;
|
|
110
|
-
|
|
111
|
-
export declare function spinner(options?: Options | string): Ora;
|
|
112
|
-
|
|
113
|
-
export declare type SpinnerInstance = Ora;
|
|
114
|
-
|
|
115
|
-
export declare type SpinnerOptions = Options;
|
|
116
|
-
|
|
117
|
-
export declare function spinnerPromise<T>(
|
|
118
|
-
action: ((instance: Ora) => PromiseLike<T>) | PromiseLike<T>,
|
|
119
|
-
options?: PromiseOptions<T> | string,
|
|
120
|
-
): Promise<T>;
|
|
121
|
-
|
|
122
|
-
export declare type SpinnerPromiseOptions<T> = PromiseOptions<T>;
|
|
123
|
-
|
|
124
|
-
declare interface TimeMeasurer {
|
|
125
|
-
end: (name: string) => number;
|
|
126
|
-
getTimings: () => Record<string, number>;
|
|
127
|
-
start: (name: string) => void;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export {};
|
|
40
|
+
/** Create a {@link Flow} that writes rail lines through `log`. */
|
|
41
|
+
declare function createFlow(log: LogFn): Flow;
|
|
42
|
+
declare const checkbox: typeof inquirer.checkbox;
|
|
43
|
+
declare const confirm: typeof inquirer.confirm;
|
|
44
|
+
declare const editor: typeof inquirer.editor;
|
|
45
|
+
declare const expand: typeof inquirer.expand;
|
|
46
|
+
declare const input: typeof inquirer.input;
|
|
47
|
+
declare const number: typeof inquirer.number;
|
|
48
|
+
declare const password: typeof inquirer.password;
|
|
49
|
+
declare const rawlist: typeof inquirer.rawlist;
|
|
50
|
+
declare const search: typeof inquirer.search;
|
|
51
|
+
declare const select: typeof inquirer.select;
|
|
52
|
+
declare function spinner(options?: Options | string): Ora;
|
|
53
|
+
declare function spinnerPromise<T>(action: ((instance: Ora) => PromiseLike<T>) | PromiseLike<T>, options?: PromiseOptions<T> | string): Promise<T>;
|
|
54
|
+
type Spinner = Spinner$1;
|
|
55
|
+
type SpinnerInstance = Ora;
|
|
56
|
+
type SpinnerOptions = Options;
|
|
57
|
+
type SpinnerPromiseOptions<T> = PromiseOptions<T>;
|
|
58
|
+
export { type BoxenOptions, type Boxes, type CustomBorderStyle, type Flow, NonInteractiveError, Separator, type Spacing, type Spinner, type SpinnerInstance, type SpinnerOptions, type SpinnerPromiseOptions, boxen, checkbox, colorizeJson, confirm, createFlow, editor, expand, getTimer, input, logSymbols, number, password, rawlist, search, select, spinner, spinnerPromise };
|
|
59
|
+
//# sourceMappingURL=ux.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ClientConfig, SanityClient } from "@sanity/client";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
interface GlobalCliClientOptions extends ClientConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The API version to use for this client.
|
|
8
|
+
*/
|
|
9
|
+
apiVersion: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to require a user to be authenticated to use this client.
|
|
12
|
+
* Default: `false`.
|
|
13
|
+
* Throws an error if `true` and user is not authenticated.
|
|
14
|
+
*/
|
|
15
|
+
requireUser?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to skip reading the stored CLI token. When `true`, the client will
|
|
18
|
+
* have no token unless one is explicitly provided.
|
|
19
|
+
* Default: `false`.
|
|
20
|
+
*/
|
|
21
|
+
unauthenticated?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create a "global" (unscoped) Sanity API client.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*
|
|
28
|
+
* @param options - The options to use for the client.
|
|
29
|
+
* @returns Promise that resolves to a configured Sanity API client.
|
|
30
|
+
*/
|
|
31
|
+
declare function getGlobalCliClient({ requestHandler, requireUser, token: providedToken, unauthenticated, ...config }: GlobalCliClientOptions): Promise<SanityClient>;
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
interface ProjectCliClientOptions extends ClientConfig {
|
|
36
|
+
/**
|
|
37
|
+
* The API version to use for this client.
|
|
38
|
+
*/
|
|
39
|
+
apiVersion: string;
|
|
40
|
+
/**
|
|
41
|
+
* The project ID to use for this client.
|
|
42
|
+
*/
|
|
43
|
+
projectId: string;
|
|
44
|
+
/**
|
|
45
|
+
* The dataset to use for this client.
|
|
46
|
+
*/
|
|
47
|
+
dataset?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to require a user to be authenticated to use this client.
|
|
50
|
+
* Default: `false`.
|
|
51
|
+
* Throws an error if `true` and user is not authenticated.
|
|
52
|
+
*/
|
|
53
|
+
requireUser?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create a "project" (scoped) Sanity API client.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*
|
|
60
|
+
* @param options - The options to use for the client.
|
|
61
|
+
* @returns Promise that resolves to a configured Sanity API client.
|
|
62
|
+
*/
|
|
63
|
+
declare function getProjectCliClient({ requestHandler, requireUser, token: providedToken, ...config }: ProjectCliClientOptions): Promise<SanityClient>;
|
|
64
|
+
export { getProjectCliClient as i, ProjectCliClientOptions as n, getGlobalCliClient as r, GlobalCliClientOptions as t };
|
|
65
|
+
//# sourceMappingURL=apiClient-DXlF5ZV3.d.ts.map
|
package/dist/apiClient.d.ts
CHANGED
|
@@ -1,79 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Create a "global" (unscoped) Sanity API client.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*
|
|
9
|
-
* @param options - The options to use for the client.
|
|
10
|
-
* @returns Promise that resolves to a configured Sanity API client.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getGlobalCliClient({
|
|
13
|
-
requireUser,
|
|
14
|
-
token: providedToken,
|
|
15
|
-
unauthenticated,
|
|
16
|
-
...config
|
|
17
|
-
}: GlobalCliClientOptions): Promise<SanityClient>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Create a "project" (scoped) Sanity API client.
|
|
21
|
-
*
|
|
22
|
-
* @public
|
|
23
|
-
*
|
|
24
|
-
* @param options - The options to use for the client.
|
|
25
|
-
* @returns Promise that resolves to a configured Sanity API client.
|
|
26
|
-
*/
|
|
27
|
-
export declare function getProjectCliClient({
|
|
28
|
-
requireUser,
|
|
29
|
-
token: providedToken,
|
|
30
|
-
...config
|
|
31
|
-
}: ProjectCliClientOptions): Promise<SanityClient>;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
export declare interface GlobalCliClientOptions extends ClientConfig {
|
|
37
|
-
/**
|
|
38
|
-
* The API version to use for this client.
|
|
39
|
-
*/
|
|
40
|
-
apiVersion: string;
|
|
41
|
-
/**
|
|
42
|
-
* Whether to require a user to be authenticated to use this client.
|
|
43
|
-
* Default: `false`.
|
|
44
|
-
* Throws an error if `true` and user is not authenticated.
|
|
45
|
-
*/
|
|
46
|
-
requireUser?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to skip reading the stored CLI token. When `true`, the client will
|
|
49
|
-
* have no token unless one is explicitly provided.
|
|
50
|
-
* Default: `false`.
|
|
51
|
-
*/
|
|
52
|
-
unauthenticated?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
export declare interface ProjectCliClientOptions extends ClientConfig {
|
|
59
|
-
/**
|
|
60
|
-
* The API version to use for this client.
|
|
61
|
-
*/
|
|
62
|
-
apiVersion: string;
|
|
63
|
-
/**
|
|
64
|
-
* The project ID to use for this client.
|
|
65
|
-
*/
|
|
66
|
-
projectId: string;
|
|
67
|
-
/**
|
|
68
|
-
* The dataset to use for this client.
|
|
69
|
-
*/
|
|
70
|
-
dataset?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Whether to require a user to be authenticated to use this client.
|
|
73
|
-
* Default: `false`.
|
|
74
|
-
* Throws an error if `true` and user is not authenticated.
|
|
75
|
-
*/
|
|
76
|
-
requireUser?: boolean;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export {};
|
|
1
|
+
import { i as getProjectCliClient, n as ProjectCliClientOptions, r as getGlobalCliClient, t as GlobalCliClientOptions } from "./apiClient-DXlF5ZV3.js";
|
|
2
|
+
export { GlobalCliClientOptions, ProjectCliClientOptions, getGlobalCliClient, getProjectCliClient };
|
package/dist/apiClient.js
CHANGED
|
@@ -1,13 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createClient } from '@sanity/client';
|
|
2
|
+
import { createNodeFetch } from 'get-it/node';
|
|
3
3
|
import { getCliToken } from './config/cli/cliUserConfig.js';
|
|
4
|
+
import { enrichAuthError } from './errors/enrichAuthError.js';
|
|
4
5
|
import { getCliExecutionContext } from './executionContext.js';
|
|
5
|
-
import { createIsolatedRequester } from './request/createIsolatedRequester.js';
|
|
6
|
-
import { generateHelpUrl } from './util/generateHelpUrl.js';
|
|
7
|
-
import { getSanityUrl } from './util/getSanityUrl.js';
|
|
8
6
|
import { isStaging } from './util/isStaging.js';
|
|
9
7
|
const STAGING_API_HOST = 'https://api.sanity.work';
|
|
10
8
|
const CLI_REQUEST_TAG_PREFIX = 'sanity.cli';
|
|
9
|
+
// One default transport per proxy URL, mirroring the client's own
|
|
10
|
+
// environment resolver.
|
|
11
|
+
const defaultBaseFetchCache = new Map();
|
|
12
|
+
function defaultBaseFetch(proxyUrl) {
|
|
13
|
+
const key = proxyUrl ?? '';
|
|
14
|
+
const cached = defaultBaseFetchCache.get(key);
|
|
15
|
+
if (cached) return cached;
|
|
16
|
+
const base = createNodeFetch(proxyUrl ? {
|
|
17
|
+
connections: 30,
|
|
18
|
+
proxy: proxyUrl
|
|
19
|
+
} : undefined);
|
|
20
|
+
defaultBaseFetchCache.set(key, base);
|
|
21
|
+
return base;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Build the transport resolver for clients created inside a CLI execution
|
|
25
|
+
* context.
|
|
26
|
+
*
|
|
27
|
+
* Uses the context's own fetch when the embedding host supplies one,
|
|
28
|
+
* otherwise the client's default Node transport (get-it's undici-backed,
|
|
29
|
+
* proxy-aware fetch). Either way the transport strips the
|
|
30
|
+
* `x-sanity-lineage` header the client's Node middleware adds from
|
|
31
|
+
* `X_SANITY_LINEAGE` — that variable belongs to the embedding process, not
|
|
32
|
+
* to this CLI invocation. Note that unlike the client v7 isolated requester,
|
|
33
|
+
* the client's `sanity:client` debug logging cannot be detached per-client
|
|
34
|
+
* in v8, so a host `DEBUG` setting still applies to it.
|
|
35
|
+
*/ function isolatedFetchResolver(context) {
|
|
36
|
+
return (proxyUrl)=>{
|
|
37
|
+
const base = context.fetch ?? defaultBaseFetch(proxyUrl);
|
|
38
|
+
return (url, init)=>{
|
|
39
|
+
const headers = new Headers(init?.headers);
|
|
40
|
+
headers.delete('x-sanity-lineage');
|
|
41
|
+
return base(url, {
|
|
42
|
+
...init,
|
|
43
|
+
headers
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const authErrorHandler = async (request, next)=>{
|
|
49
|
+
try {
|
|
50
|
+
return await next(request);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
throw enrichAuthError(error);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Add the CLI's authentication guidance inside any caller-provided request
|
|
57
|
+
* handler. This lets the caller observe enriched client errors while
|
|
58
|
+
* preserving its control over the request and response pipeline.
|
|
59
|
+
*/ function withAuthErrorHints(requestHandler) {
|
|
60
|
+
if (!requestHandler) return authErrorHandler;
|
|
61
|
+
return (request, next)=>requestHandler(request, (nextRequest)=>authErrorHandler(nextRequest, next));
|
|
62
|
+
}
|
|
11
63
|
/**
|
|
12
64
|
* Create a "global" (unscoped) Sanity API client.
|
|
13
65
|
*
|
|
@@ -15,10 +67,8 @@ const CLI_REQUEST_TAG_PREFIX = 'sanity.cli';
|
|
|
15
67
|
*
|
|
16
68
|
* @param options - The options to use for the client.
|
|
17
69
|
* @returns Promise that resolves to a configured Sanity API client.
|
|
18
|
-
*/ export async function getGlobalCliClient({ requireUser, token: providedToken, unauthenticated, ...config }) {
|
|
70
|
+
*/ export async function getGlobalCliClient({ requestHandler, requireUser, token: providedToken, unauthenticated, ...config }) {
|
|
19
71
|
const context = getCliExecutionContext();
|
|
20
|
-
const requester = context ? createIsolatedRequester() : defaultRequester.clone();
|
|
21
|
-
requester.use(authErrors());
|
|
22
72
|
const apiHost = isStaging() ? STAGING_API_HOST : undefined;
|
|
23
73
|
// Use the provided token if set, otherwise fall back to the stored CLI token (unless unauthenticated)
|
|
24
74
|
const token = providedToken || (unauthenticated ? undefined : await getCliToken());
|
|
@@ -32,12 +82,15 @@ const CLI_REQUEST_TAG_PREFIX = 'sanity.cli';
|
|
|
32
82
|
} : {},
|
|
33
83
|
// Suppress browser token warning since we mock browser environment in workers
|
|
34
84
|
ignoreBrowserTokenWarning: true,
|
|
35
|
-
|
|
85
|
+
...context ? {
|
|
86
|
+
resolveFetch: isolatedFetchResolver(context)
|
|
87
|
+
} : {},
|
|
36
88
|
requestTagPrefix: CLI_REQUEST_TAG_PREFIX,
|
|
37
89
|
token,
|
|
38
90
|
useCdn: false,
|
|
39
91
|
useProjectHostname: false,
|
|
40
|
-
...config
|
|
92
|
+
...config,
|
|
93
|
+
requestHandler: withAuthErrorHints(requestHandler)
|
|
41
94
|
});
|
|
42
95
|
}
|
|
43
96
|
/**
|
|
@@ -47,10 +100,8 @@ const CLI_REQUEST_TAG_PREFIX = 'sanity.cli';
|
|
|
47
100
|
*
|
|
48
101
|
* @param options - The options to use for the client.
|
|
49
102
|
* @returns Promise that resolves to a configured Sanity API client.
|
|
50
|
-
*/ export async function getProjectCliClient({ requireUser, token: providedToken, ...config }) {
|
|
103
|
+
*/ export async function getProjectCliClient({ requestHandler, requireUser, token: providedToken, ...config }) {
|
|
51
104
|
const context = getCliExecutionContext();
|
|
52
|
-
const requester = context ? createIsolatedRequester() : defaultRequester.clone();
|
|
53
|
-
requester.use(authErrors(config.projectId));
|
|
54
105
|
const apiHost = isStaging() ? STAGING_API_HOST : undefined;
|
|
55
106
|
// Use the provided token if it is set, otherwise get the token from the config file
|
|
56
107
|
const token = providedToken || await getCliToken();
|
|
@@ -64,45 +115,16 @@ const CLI_REQUEST_TAG_PREFIX = 'sanity.cli';
|
|
|
64
115
|
} : {},
|
|
65
116
|
// Suppress browser token warning since we mock browser environment in workers
|
|
66
117
|
ignoreBrowserTokenWarning: true,
|
|
67
|
-
|
|
118
|
+
...context ? {
|
|
119
|
+
resolveFetch: isolatedFetchResolver(context)
|
|
120
|
+
} : {},
|
|
68
121
|
requestTagPrefix: CLI_REQUEST_TAG_PREFIX,
|
|
69
122
|
token,
|
|
70
123
|
useCdn: false,
|
|
71
124
|
useProjectHostname: true,
|
|
72
|
-
...config
|
|
125
|
+
...config,
|
|
126
|
+
requestHandler: withAuthErrorHints(requestHandler)
|
|
73
127
|
});
|
|
74
128
|
}
|
|
75
|
-
/**
|
|
76
|
-
* `get-it` middleware that checks for 401 authentication errors and extends the error with more
|
|
77
|
-
* helpful guidance on what to do next.
|
|
78
|
-
*
|
|
79
|
-
* @returns get-it middleware with `onError` handler
|
|
80
|
-
* @internal
|
|
81
|
-
*/ function authErrors(projectId) {
|
|
82
|
-
return {
|
|
83
|
-
onError: (err)=>{
|
|
84
|
-
if (!err || !isReqResError(err)) {
|
|
85
|
-
return err;
|
|
86
|
-
}
|
|
87
|
-
const statusCode = isHttpError(err) && err.statusCode;
|
|
88
|
-
if (statusCode === 401) {
|
|
89
|
-
if (projectId && isProjectUserNotFoundError(err.response.body)) {
|
|
90
|
-
err.message = `${err.message}. Add this account as a project member: ${getSanityUrl(`/manage/project/${encodeURIComponent(projectId)}/members`)}.`;
|
|
91
|
-
return err;
|
|
92
|
-
}
|
|
93
|
-
err.message = `${err.message}. You may need to login again with ${styleText('cyan', 'sanity login')}.\nFor more information, see ${generateHelpUrl('cli-errors')}.`;
|
|
94
|
-
}
|
|
95
|
-
return err;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function isProjectUserNotFoundError(body) {
|
|
100
|
-
if (typeof body !== 'object' || body === null || !('error' in body)) return false;
|
|
101
|
-
const { error } = body;
|
|
102
|
-
return typeof error === 'object' && error !== null && 'type' in error && error.type === 'projectUserNotFoundError';
|
|
103
|
-
}
|
|
104
|
-
function isReqResError(err) {
|
|
105
|
-
return Object.prototype.hasOwnProperty.call(err, 'response');
|
|
106
|
-
}
|
|
107
129
|
|
|
108
130
|
//# sourceMappingURL=apiClient.js.map
|
package/dist/apiClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/apiClient.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../src/apiClient.ts"],"sourcesContent":["import {\n type ClientConfig,\n createClient,\n type RequestHandler,\n type SanityClient,\n} from '@sanity/client'\nimport {type FetchFunction} from 'get-it'\nimport {createNodeFetch} from 'get-it/node'\n\nimport {getCliToken} from './config/cli/cliUserConfig.js'\nimport {enrichAuthError} from './errors/enrichAuthError.js'\nimport {type CliExecutionContext, getCliExecutionContext} from './executionContext.js'\nimport {isStaging} from './util/isStaging.js'\n\nconst STAGING_API_HOST = 'https://api.sanity.work'\n\nconst CLI_REQUEST_TAG_PREFIX = 'sanity.cli'\n\n// One default transport per proxy URL, mirroring the client's own\n// environment resolver.\nconst defaultBaseFetchCache = new Map<string, FetchFunction>()\n\nfunction defaultBaseFetch(proxyUrl?: string): FetchFunction {\n const key = proxyUrl ?? ''\n const cached = defaultBaseFetchCache.get(key)\n if (cached) return cached\n\n const base = createNodeFetch(proxyUrl ? {connections: 30, proxy: proxyUrl} : undefined)\n defaultBaseFetchCache.set(key, base)\n return base\n}\n\n/**\n * Build the transport resolver for clients created inside a CLI execution\n * context.\n *\n * Uses the context's own fetch when the embedding host supplies one,\n * otherwise the client's default Node transport (get-it's undici-backed,\n * proxy-aware fetch). Either way the transport strips the\n * `x-sanity-lineage` header the client's Node middleware adds from\n * `X_SANITY_LINEAGE` — that variable belongs to the embedding process, not\n * to this CLI invocation. Note that unlike the client v7 isolated requester,\n * the client's `sanity:client` debug logging cannot be detached per-client\n * in v8, so a host `DEBUG` setting still applies to it.\n */\nfunction isolatedFetchResolver(context: CliExecutionContext): (proxyUrl?: string) => FetchFunction {\n return (proxyUrl) => {\n const base = context.fetch ?? defaultBaseFetch(proxyUrl)\n return (url, init) => {\n const headers = new Headers(init?.headers)\n headers.delete('x-sanity-lineage')\n return base(url, {...init, headers})\n }\n }\n}\n\nconst authErrorHandler: RequestHandler = async (request, next) => {\n try {\n return await next(request)\n } catch (error) {\n throw enrichAuthError(error)\n }\n}\n\n/**\n * Add the CLI's authentication guidance inside any caller-provided request\n * handler. This lets the caller observe enriched client errors while\n * preserving its control over the request and response pipeline.\n */\nfunction withAuthErrorHints(requestHandler?: RequestHandler): RequestHandler {\n if (!requestHandler) return authErrorHandler\n\n return (request, next) =>\n requestHandler(request, (nextRequest) => authErrorHandler(nextRequest, next))\n}\n\n/**\n * @public\n */\nexport interface GlobalCliClientOptions extends ClientConfig {\n /**\n * The API version to use for this client.\n */\n apiVersion: string\n\n /**\n * Whether to require a user to be authenticated to use this client.\n * Default: `false`.\n * Throws an error if `true` and user is not authenticated.\n */\n requireUser?: boolean\n\n /**\n * Whether to skip reading the stored CLI token. When `true`, the client will\n * have no token unless one is explicitly provided.\n * Default: `false`.\n */\n unauthenticated?: boolean\n}\n\n/**\n * Create a \"global\" (unscoped) Sanity API client.\n *\n * @public\n *\n * @param options - The options to use for the client.\n * @returns Promise that resolves to a configured Sanity API client.\n */\nexport async function getGlobalCliClient({\n requestHandler,\n requireUser,\n token: providedToken,\n unauthenticated,\n ...config\n}: GlobalCliClientOptions): Promise<SanityClient> {\n const context = getCliExecutionContext()\n\n const apiHost = isStaging() ? STAGING_API_HOST : undefined\n\n // Use the provided token if set, otherwise fall back to the stored CLI token (unless unauthenticated)\n const token = providedToken || (unauthenticated ? undefined : await getCliToken())\n\n // If the token is not set and requireUser is true, throw an error\n if (!token && requireUser) {\n throw new Error('You must login first - run \"sanity login\"')\n }\n\n return createClient({\n ...(apiHost ? {apiHost} : {}),\n // Suppress browser token warning since we mock browser environment in workers\n ignoreBrowserTokenWarning: true,\n ...(context ? {resolveFetch: isolatedFetchResolver(context)} : {}),\n requestTagPrefix: CLI_REQUEST_TAG_PREFIX,\n token,\n useCdn: false,\n useProjectHostname: false,\n ...config,\n requestHandler: withAuthErrorHints(requestHandler),\n })\n}\n\n/**\n * @public\n */\nexport interface ProjectCliClientOptions extends ClientConfig {\n /**\n * The API version to use for this client.\n */\n apiVersion: string\n\n /**\n * The project ID to use for this client.\n */\n projectId: string\n\n /**\n * The dataset to use for this client.\n */\n dataset?: string\n\n /**\n * Whether to require a user to be authenticated to use this client.\n * Default: `false`.\n * Throws an error if `true` and user is not authenticated.\n */\n requireUser?: boolean\n}\n\n/**\n * Create a \"project\" (scoped) Sanity API client.\n *\n * @public\n *\n * @param options - The options to use for the client.\n * @returns Promise that resolves to a configured Sanity API client.\n */\nexport async function getProjectCliClient({\n requestHandler,\n requireUser,\n token: providedToken,\n ...config\n}: ProjectCliClientOptions): Promise<SanityClient> {\n const context = getCliExecutionContext()\n\n const apiHost = isStaging() ? STAGING_API_HOST : undefined\n\n // Use the provided token if it is set, otherwise get the token from the config file\n const token = providedToken || (await getCliToken())\n\n // If the token is not set and requireUser is true, throw an error\n if (!token && requireUser) {\n throw new Error('You must login first - run \"sanity login\"')\n }\n\n return createClient({\n ...(apiHost ? {apiHost} : {}),\n // Suppress browser token warning since we mock browser environment in workers\n ignoreBrowserTokenWarning: true,\n ...(context ? {resolveFetch: isolatedFetchResolver(context)} : {}),\n requestTagPrefix: CLI_REQUEST_TAG_PREFIX,\n token,\n useCdn: false,\n useProjectHostname: true,\n ...config,\n requestHandler: withAuthErrorHints(requestHandler),\n })\n}\n"],"names":["createClient","createNodeFetch","getCliToken","enrichAuthError","getCliExecutionContext","isStaging","STAGING_API_HOST","CLI_REQUEST_TAG_PREFIX","defaultBaseFetchCache","Map","defaultBaseFetch","proxyUrl","key","cached","get","base","connections","proxy","undefined","set","isolatedFetchResolver","context","fetch","url","init","headers","Headers","delete","authErrorHandler","request","next","error","withAuthErrorHints","requestHandler","nextRequest","getGlobalCliClient","requireUser","token","providedToken","unauthenticated","config","apiHost","Error","ignoreBrowserTokenWarning","resolveFetch","requestTagPrefix","useCdn","useProjectHostname","getProjectCliClient"],"mappings":"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"}
|