@sanity/cli-core 0.1.0-alpha.7 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SanityCommand.js +7 -0
- package/dist/SanityCommand.js.map +1 -1
- package/dist/_exports/tree.d.ts +47 -1
- package/dist/_exports/ux.d.ts +40 -4
- package/dist/_exports/ux.js +1 -1
- package/dist/_exports/ux.js.map +1 -1
- package/dist/config/cli/getCliConfig.worker.js +2 -1
- package/dist/config/cli/getCliConfig.worker.js.map +1 -1
- package/dist/config/findProjectRoot.js +2 -2
- package/dist/config/findProjectRoot.js.map +1 -1
- package/dist/config/studio/getStudioConfig.js +0 -3
- package/dist/config/studio/getStudioConfig.js.map +1 -1
- package/dist/config/studio/getStudioWorkspaces.js +50 -0
- package/dist/config/studio/getStudioWorkspaces.js.map +1 -0
- package/dist/config/studio/isStudioConfig.js +19 -0
- package/dist/config/studio/isStudioConfig.js.map +1 -0
- package/dist/config/studio/readStudioConfig.worker.js +4 -30
- package/dist/config/studio/readStudioConfig.worker.js.map +1 -1
- package/dist/config/util/findStudioConfigPath.js +24 -3
- package/dist/config/util/findStudioConfigPath.js.map +1 -1
- package/dist/config/util/recursivelyResolveProjectRoot.js.map +1 -1
- package/dist/index.d.ts +6027 -35
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/loaders/studio/studioWorkerTask.js +41 -11
- package/dist/loaders/studio/studioWorkerTask.js.map +1 -1
- package/dist/loaders/tsx/tsxWorkerTask.js +3 -0
- package/dist/loaders/tsx/tsxWorkerTask.js.map +1 -1
- package/dist/services/apiClient.js +13 -11
- package/dist/services/apiClient.js.map +1 -1
- package/dist/telemetry/cleanupOldTelemetryFiles.js +30 -0
- package/dist/telemetry/cleanupOldTelemetryFiles.js.map +1 -0
- package/dist/telemetry/createTelemetryStore.js +95 -0
- package/dist/telemetry/createTelemetryStore.js.map +1 -0
- package/dist/telemetry/createTraceId.js +10 -0
- package/dist/telemetry/createTraceId.js.map +1 -0
- package/dist/telemetry/findTelemetryFiles.js +36 -0
- package/dist/telemetry/findTelemetryFiles.js.map +1 -0
- package/dist/telemetry/flushTelemetryFiles.js +107 -0
- package/dist/telemetry/flushTelemetryFiles.js.map +1 -0
- package/dist/telemetry/generateTelemetryFilePath.js +30 -0
- package/dist/telemetry/generateTelemetryFilePath.js.map +1 -0
- package/dist/telemetry/getTelemetryBaseInfo.js +33 -0
- package/dist/telemetry/getTelemetryBaseInfo.js.map +1 -0
- package/dist/telemetry/logger.js +54 -0
- package/dist/telemetry/logger.js.map +1 -0
- package/dist/telemetry/telemetryStoreDebug.js +7 -0
- package/dist/telemetry/telemetryStoreDebug.js.map +1 -0
- package/dist/telemetry/trace.js +150 -0
- package/dist/telemetry/trace.js.map +1 -0
- package/dist/telemetry/types.js +5 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/util/doImport.js +16 -0
- package/dist/util/doImport.js.map +1 -0
- package/dist/util/environment/getStudioEnvironmentVariables.js +2 -1
- package/dist/util/environment/getStudioEnvironmentVariables.js.map +1 -1
- package/dist/util/getCliTelemetry.js +36 -0
- package/dist/util/getCliTelemetry.js.map +1 -0
- package/dist/util/isStaging.js +10 -0
- package/dist/util/isStaging.js.map +1 -0
- package/dist/util/normalizePath.js +12 -0
- package/dist/util/normalizePath.js.map +1 -0
- package/dist/util/readNDJSON.js +18 -0
- package/dist/util/readNDJSON.js.map +1 -0
- package/dist/util/resolveLocalPackage.js +2 -1
- package/dist/util/resolveLocalPackage.js.map +1 -1
- package/dist/util/waitForAsync.js +5 -0
- package/dist/util/waitForAsync.js.map +1 -0
- package/dist/ux/boxen.js +3 -0
- package/dist/ux/boxen.js.map +1 -0
- package/dist/ux/colorizeJson.js +6 -6
- package/dist/ux/colorizeJson.js.map +1 -1
- package/package.json +29 -22
- package/dist/SanityCommand.d.ts +0 -78
- package/dist/config/cli/getCliConfig.d.ts +0 -16
- package/dist/config/cli/getCliConfig.worker.d.ts +0 -1
- package/dist/config/cli/getCliConfigSync.d.ts +0 -12
- package/dist/config/cli/schemas.d.ts +0 -104
- package/dist/config/cli/types/cliConfig.d.ts +0 -83
- package/dist/config/cli/types/userViteConfig.d.ts +0 -5
- package/dist/config/findProjectRoot.d.ts +0 -14
- package/dist/config/findProjectRootSync.d.ts +0 -27
- package/dist/config/studio/getStudioConfig.d.ts +0 -14
- package/dist/config/studio/readStudioConfig.d.ts +0 -96
- package/dist/config/studio/readStudioConfig.worker.d.ts +0 -1
- package/dist/config/util/configPathsSync.d.ts +0 -17
- package/dist/config/util/findAppConfigPath.d.ts +0 -8
- package/dist/config/util/findConfigsPaths.d.ts +0 -16
- package/dist/config/util/findStudioConfigPath.d.ts +0 -9
- package/dist/config/util/isSanityV2StudioRoot.d.ts +0 -8
- package/dist/config/util/recursivelyResolveProjectRoot.d.ts +0 -27
- package/dist/debug.d.ts +0 -15
- package/dist/loaders/studio/studioWorkerLoader.worker.d.ts +0 -1
- package/dist/loaders/studio/studioWorkerTask.d.ts +0 -40
- package/dist/loaders/tsx/tsxWorkerLoader.worker.d.ts +0 -1
- package/dist/loaders/tsx/tsxWorkerTask.d.ts +0 -28
- package/dist/services/apiClient.d.ts +0 -53
- package/dist/services/cliUserConfig.d.ts +0 -40
- package/dist/services/getCliToken.d.ts +0 -7
- package/dist/types.d.ts +0 -15
- package/dist/util/NotFoundError.d.ts +0 -20
- package/dist/util/createExpiringConfig.d.ts +0 -37
- package/dist/util/environment/getStudioEnvironmentVariables.d.ts +0 -12
- package/dist/util/environment/mockBrowserEnvironment.d.ts +0 -17
- package/dist/util/environment/setupBrowserStubs.d.ts +0 -10
- package/dist/util/environment/stubs.d.ts +0 -254
- package/dist/util/fileExists.d.ts +0 -9
- package/dist/util/generateHelpUrl.d.ts +0 -8
- package/dist/util/getEmptyAuth.d.ts +0 -5
- package/dist/util/getSanityEnvVar.d.ts +0 -19
- package/dist/util/getSanityUrl.d.ts +0 -5
- package/dist/util/getUserConfig.d.ts +0 -2
- package/dist/util/isCi.d.ts +0 -1
- package/dist/util/isInteractive.d.ts +0 -1
- package/dist/util/isRecord.d.ts +0 -8
- package/dist/util/isTrueish.d.ts +0 -1
- package/dist/util/parseStringFlag.d.ts +0 -10
- package/dist/util/readJsonFile.d.ts +0 -14
- package/dist/util/resolveLocalPackage.d.ts +0 -18
- package/dist/util/safeStructuredClone.d.ts +0 -8
- package/dist/util/tree.d.ts +0 -31
- package/dist/util/tryGetDefaultExport.d.ts +0 -5
- package/dist/util/writeJsonFile.d.ts +0 -9
- package/dist/ux/chalk.d.ts +0 -2
- package/dist/ux/chalk.js +0 -4
- package/dist/ux/chalk.js.map +0 -1
- package/dist/ux/colorizeJson.d.ts +0 -1
- package/dist/ux/formatObject.d.ts +0 -1
- package/dist/ux/logSymbols.d.ts +0 -1
- package/dist/ux/printKeyValue.d.ts +0 -1
- package/dist/ux/prompts.d.ts +0 -1
- package/dist/ux/spinner.d.ts +0 -1
- package/dist/ux/timer.d.ts +0 -12
package/dist/debug.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import debugIt from 'debug';
|
|
2
|
-
/**
|
|
3
|
-
* `debug` instance for the CLI
|
|
4
|
-
*
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare const debug: debugIt.Debugger;
|
|
8
|
-
/**
|
|
9
|
-
* Get a `debug` instance which extends the CLI debug instance with the given namespace,
|
|
10
|
-
* eg namespace would be `sanity:cli:<providedNamespace>`
|
|
11
|
-
*
|
|
12
|
-
* @param namespace - The namespace to extend the CLI debug instance with
|
|
13
|
-
* @returns The extended `debug` instance
|
|
14
|
-
*/
|
|
15
|
-
export declare const subdebug: (namespace: string) => debugIt.Debugger;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type WorkerOptions } from 'node:worker_threads';
|
|
2
|
-
import { type RequireProps } from '../../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Options for the studio worker task
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
interface StudioWorkerTaskOptions extends RequireProps<WorkerOptions, 'name'> {
|
|
9
|
-
studioRootPath: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Executes a worker file in a Sanity Studio browser context.
|
|
13
|
-
*
|
|
14
|
-
* This uses a combination of vite for "bundling" + jsdom for emulating a browser
|
|
15
|
-
* environment under the hood, which means that the same thing that will work in vite
|
|
16
|
-
* _should_ work in the worker - to a degree. If the user has defined any typescript
|
|
17
|
-
* path aliases, these will have to be added as aliases to the vite config - the same
|
|
18
|
-
* behavior as you would see with regular vite. Other things that are accounted for:
|
|
19
|
-
*
|
|
20
|
-
* - TypeScript support (+JSX, enums and other "compilation needed" features)
|
|
21
|
-
* - CSS, font and other file imports will resolve to a file path
|
|
22
|
-
* - CSS module imports will resolve to a javascript object of class names
|
|
23
|
-
* - Environment variables are available both as `import.meta.env` and `process.env`,
|
|
24
|
-
* and `.env` files are loaded in the same way that they would in a Sanity studio.
|
|
25
|
-
* - Browser globals not available in a Node.js environment but _are_ provided by JSDOM
|
|
26
|
-
* are defined directly to the Node environment as globals. While this polutes the
|
|
27
|
-
* global namespace, it is done only in the worker thread.
|
|
28
|
-
* - Certain browser globals that are _not_ available in JSDOM are also provided to the
|
|
29
|
-
* global namespace - things like `requestIdleCallback`, `IntersectionObserver` etc.
|
|
30
|
-
* These are provided with a minimal stub implementation to make them not crash.
|
|
31
|
-
*
|
|
32
|
-
* @param filePath - Path to the worker file (`.ts` works and is encouraged)
|
|
33
|
-
* @param options - Options to pass to the worker
|
|
34
|
-
* @returns A promise that resolves with the message from the worker
|
|
35
|
-
* @throws If the file does not exist
|
|
36
|
-
* @throws If the worker exits with a non-zero code
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
export declare function studioWorkerTask(filePath: URL, options: StudioWorkerTaskOptions): Promise<unknown>;
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { URL } from 'node:url';
|
|
2
|
-
import { type WorkerOptions } from 'node:worker_threads';
|
|
3
|
-
import { type RequireProps } from '../../types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Options for the tsx worker task
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
interface TsxWorkerTaskOptions extends RequireProps<WorkerOptions, 'name'> {
|
|
10
|
-
rootPath: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Executes a worker file with tsx registered. This means you can import other
|
|
14
|
-
* typescript with fairly rich syntax, and still have that only apply to the worker
|
|
15
|
-
* thread instead of the full parent process. The worker should emit a message when
|
|
16
|
-
* complete using `parentPort`. Once it has received a single message will resolve the
|
|
17
|
-
* returned promise with that message. If you are expecting multiple messages, you will
|
|
18
|
-
* have to implement another method ;)
|
|
19
|
-
*
|
|
20
|
-
* @param filePath - Path to the worker file
|
|
21
|
-
* @param options - Options to pass to the worker
|
|
22
|
-
* @returns A promise that resolves with the message from the worker
|
|
23
|
-
* @throws If the file does not exist
|
|
24
|
-
* @throws If the worker exits with a non-zero code
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export declare function tsxWorkerTask<T = unknown>(filePath: URL, options: TsxWorkerTaskOptions): Promise<T>;
|
|
28
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { type ClientConfig, type SanityClient } from '@sanity/client';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export 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
|
-
/**
|
|
18
|
-
* Create a "global" (unscoped) Sanity API client.
|
|
19
|
-
*
|
|
20
|
-
* @param options - The options to use for the client.
|
|
21
|
-
* @returns Promise that resolves to a configured Sanity API client.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getGlobalCliClient({ requireUser, token: providedToken, ...config }: GlobalCliClientOptions): Promise<SanityClient>;
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export interface ProjectCliClientOptions extends ClientConfig {
|
|
28
|
-
/**
|
|
29
|
-
* The API version to use for this client.
|
|
30
|
-
*/
|
|
31
|
-
apiVersion: string;
|
|
32
|
-
/**
|
|
33
|
-
* The project ID to use for this client.
|
|
34
|
-
*/
|
|
35
|
-
projectId: string;
|
|
36
|
-
/**
|
|
37
|
-
* The dataset to use for this client.
|
|
38
|
-
*/
|
|
39
|
-
dataset?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to require a user to be authenticated to use this client.
|
|
42
|
-
* Default: `false`.
|
|
43
|
-
* Throws an error if `true` and user is not authenticated.
|
|
44
|
-
*/
|
|
45
|
-
requireUser?: boolean;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Create a "global" (unscoped) Sanity API client.
|
|
49
|
-
*
|
|
50
|
-
* @param options - The options to use for the client.
|
|
51
|
-
* @returns Promise that resolves to a configured Sanity API client.
|
|
52
|
-
*/
|
|
53
|
-
export declare function getProjectCliClient({ requireUser, token: providedToken, ...config }: ProjectCliClientOptions): Promise<SanityClient>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const cliUserConfigSchema: {
|
|
3
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
4
|
-
telemetryConsent: z.ZodOptional<z.ZodObject<{
|
|
5
|
-
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
value: z.ZodObject<{
|
|
7
|
-
status: z.ZodEnum<{
|
|
8
|
-
undetermined: "undetermined";
|
|
9
|
-
unset: "unset";
|
|
10
|
-
granted: "granted";
|
|
11
|
-
denied: "denied";
|
|
12
|
-
}>;
|
|
13
|
-
type: z.ZodString;
|
|
14
|
-
}, z.core.$loose>;
|
|
15
|
-
}, z.core.$strip>>;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* The CLI user configuration schema.
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
type CliUserConfig = z.infer<z.ZodObject<typeof cliUserConfigSchema>>;
|
|
23
|
-
/**
|
|
24
|
-
* Set the config value for the given property.
|
|
25
|
-
* Validates that the passed value adheres to the defined CLI config schema.
|
|
26
|
-
*
|
|
27
|
-
* @param prop - The property to set the value for
|
|
28
|
-
* @param value - The value to set
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
export declare function setConfig<P extends keyof CliUserConfig>(prop: P, value: CliUserConfig[P]): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Get the config value for the given property
|
|
34
|
-
*
|
|
35
|
-
* @param prop - The property to get the value for
|
|
36
|
-
* @returns The value of the given property
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
export declare function getConfig<P extends keyof CliUserConfig>(prop: P): Promise<CliUserConfig[P]>;
|
|
40
|
-
export {};
|
package/dist/types.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Command } from '@oclif/core';
|
|
2
|
-
export interface Output {
|
|
3
|
-
error: Command['error'];
|
|
4
|
-
log: Command['log'];
|
|
5
|
-
warn: Command['warn'];
|
|
6
|
-
}
|
|
7
|
-
export type RequireProps<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
8
|
-
export type SanityOrgUser = {
|
|
9
|
-
email: string;
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
profileImage?: string;
|
|
13
|
-
provider: 'github' | 'google' | 'sanity' | `saml-${string}`;
|
|
14
|
-
tosAcceptedAt?: string;
|
|
15
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error thrown when a file or directory is not found
|
|
3
|
-
*
|
|
4
|
-
* `code` is always `ENOENT` to mirror Node.js behavior when a file is not found
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class NotFoundError extends Error {
|
|
9
|
-
code: string;
|
|
10
|
-
path?: string;
|
|
11
|
-
constructor(message: string, path?: string);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Returns whether or not the given error is a `NotFoundError`
|
|
15
|
-
*
|
|
16
|
-
* @param err - The error to check
|
|
17
|
-
* @returns `true` if the error is a `NotFoundError`, `false` otherwise
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
export declare function isNotFoundError(err: unknown): err is NotFoundError;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type ConfigStore from 'configstore';
|
|
2
|
-
export interface ExpiringConfigOptions<Type> {
|
|
3
|
-
/** Fetch value */
|
|
4
|
-
fetchValue: () => Promise<Type> | Type;
|
|
5
|
-
/** Config key */
|
|
6
|
-
key: string;
|
|
7
|
-
/** Config store */
|
|
8
|
-
store: ConfigStore;
|
|
9
|
-
/** TTL (milliseconds) */
|
|
10
|
-
ttl: number;
|
|
11
|
-
/** Subscribe to cache hit event */
|
|
12
|
-
onCacheHit?: () => void;
|
|
13
|
-
/** Subscribe to fetch event */
|
|
14
|
-
onFetch?: () => void;
|
|
15
|
-
/** Subscribe to revalidate event */
|
|
16
|
-
onRevalidate?: () => void;
|
|
17
|
-
/**
|
|
18
|
-
* Assert the fetched value is valid, or throw if invalid.
|
|
19
|
-
* If none is provided, it will always accept the fetched value.
|
|
20
|
-
*/
|
|
21
|
-
validateValue?: (value: unknown) => value is Type;
|
|
22
|
-
}
|
|
23
|
-
export interface ExpiringConfigApi<Type> {
|
|
24
|
-
/**
|
|
25
|
-
* Delete the cached value.
|
|
26
|
-
*/
|
|
27
|
-
delete: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Attempt to get the cached value. If there is no cached value, or the cached value has expired,
|
|
30
|
-
* fetch, cache, and return the value.
|
|
31
|
-
*/
|
|
32
|
-
get: () => Promise<Type>;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Create a config in the provided config store that expires after the provided TTL.
|
|
36
|
-
*/
|
|
37
|
-
export declare function createExpiringConfig<Type>({ fetchValue, key, onCacheHit, onFetch, onRevalidate, store, ttl, validateValue, }: ExpiringConfigOptions<Type>): ExpiringConfigApi<Type>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loads the `getStudioEnvironmentVariables` function from the studio's
|
|
3
|
-
* installed `sanity` package and returns the environment variables.
|
|
4
|
-
*
|
|
5
|
-
* This is used to ensure we're using the same version of environment variable
|
|
6
|
-
* logic as the studio itself.
|
|
7
|
-
*
|
|
8
|
-
* @param rootPath - The root path of the Sanity Studio project
|
|
9
|
-
* @returns Object containing studio environment variables
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare function getStudioEnvironmentVariables(rootPath: string): Promise<Record<string, string>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mocks a browser-like environment for processes in the main thread by:
|
|
3
|
-
* - Injecting browser globals (window, document, ResizeObserver, etc.)
|
|
4
|
-
* - Loading studio environment variables from the project's sanity installation into process.env
|
|
5
|
-
*
|
|
6
|
-
* This is useful for commands like `sanity exec` that have to run user scripts
|
|
7
|
-
* in the main thread of the process (but in a child process).
|
|
8
|
-
*
|
|
9
|
-
* Be cautious when using this, since it will pollute the global namespace with browser globals.
|
|
10
|
-
*
|
|
11
|
-
* If your code can run in a worker thread, you should use the `studioWorkerTask` function instead.
|
|
12
|
-
*
|
|
13
|
-
* @param basePath - The root path of the Sanity Studio project
|
|
14
|
-
* @returns A cleanup function that removes the injected globals and environment variables
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare function mockBrowserEnvironment(basePath: string): Promise<() => void>;
|
|
@@ -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,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;
|
package/dist/util/isCi.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isCi: () => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isInteractive(): boolean;
|
package/dist/util/isRecord.d.ts
DELETED
|
@@ -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>;
|
package/dist/util/isTrueish.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isTrueish(value: string | undefined): boolean;
|