🔧
This commit is contained in:
63
node_modules/vite/dist/node/index.d.ts
generated
vendored
63
node_modules/vite/dist/node/index.d.ts
generated
vendored
@@ -31,7 +31,7 @@ export { LightningCSSOptions } from '../../types/internal/lightningcssOptions.js
|
||||
import { SassLegacyPreprocessBaseOptions, SassModernPreprocessBaseOptions, LessPreprocessorBaseOptions, StylusPreprocessorBaseOptions } from '../../types/internal/cssPreprocessorOptions.js';
|
||||
import { M as ModuleRunnerTransport } from './moduleRunnerTransport.d-CXw_Ws6P.js';
|
||||
export { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap } from '../../types/importGlob.js';
|
||||
export { ChunkMetadata } from '../../types/metadata.js';
|
||||
export { ChunkMetadata, CustomPluginOptionsVite } from '../../types/metadata.js';
|
||||
|
||||
interface Alias {
|
||||
find: string | RegExp
|
||||
@@ -848,7 +848,7 @@ declare class BaseEnvironment extends PartialEnvironment {
|
||||
* const isDev = environment.mode === 'dev' // good
|
||||
* ```
|
||||
*
|
||||
* You should also not check against `"unknown"` specfically. It's
|
||||
* You should also not check against `"unknown"` specifically. It's
|
||||
* a placeholder for more possible environment types.
|
||||
*/
|
||||
declare class UnknownEnvironment extends BaseEnvironment {
|
||||
@@ -3200,6 +3200,11 @@ type IndexHtmlTransform = IndexHtmlTransformHook | {
|
||||
handler: IndexHtmlTransformHook;
|
||||
};
|
||||
|
||||
type StringFilter<Value = string | RegExp> = Value | Array<Value> | {
|
||||
include?: Value | Array<Value>;
|
||||
exclude?: Value | Array<Value>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Vite plugins extends the Rollup plugin interface with a few extra
|
||||
* vite-specific options. A valid vite plugin is also a valid Rollup plugin.
|
||||
@@ -3280,13 +3285,26 @@ interface Plugin<A = any> extends rollup.Plugin<A> {
|
||||
custom?: CustomPluginOptions;
|
||||
ssr?: boolean;
|
||||
isEntry: boolean;
|
||||
}) => Promise<ResolveIdResult> | ResolveIdResult>;
|
||||
}) => Promise<ResolveIdResult> | ResolveIdResult, {
|
||||
filter?: {
|
||||
id?: StringFilter<RegExp>;
|
||||
};
|
||||
}>;
|
||||
load?: ObjectHook<(this: PluginContext, id: string, options?: {
|
||||
ssr?: boolean;
|
||||
}) => Promise<LoadResult> | LoadResult>;
|
||||
}) => Promise<LoadResult> | LoadResult, {
|
||||
filter?: {
|
||||
id?: StringFilter;
|
||||
};
|
||||
}>;
|
||||
transform?: ObjectHook<(this: TransformPluginContext, code: string, id: string, options?: {
|
||||
ssr?: boolean;
|
||||
}) => Promise<rollup.TransformResult> | rollup.TransformResult>;
|
||||
}) => Promise<rollup.TransformResult> | rollup.TransformResult, {
|
||||
filter?: {
|
||||
id?: StringFilter;
|
||||
code?: StringFilter;
|
||||
};
|
||||
}>;
|
||||
/**
|
||||
* Opt-in this plugin into the shared plugins pipeline.
|
||||
* For backward-compatibility, plugins are re-recreated for each environment
|
||||
@@ -3383,8 +3401,13 @@ interface Plugin<A = any> extends rollup.Plugin<A> {
|
||||
* The hook receives the following arguments:
|
||||
*
|
||||
* - html: string
|
||||
* - ctx?: vite.ServerContext (only present during serve)
|
||||
* - bundle?: rollup.OutputBundle (only present during build)
|
||||
* - ctx: IndexHtmlTransformContext, which contains:
|
||||
* - path: public path when served
|
||||
* - filename: filename on disk
|
||||
* - server?: ViteDevServer (only present during serve)
|
||||
* - bundle?: rollup.OutputBundle (only present during build)
|
||||
* - chunk?: rollup.OutputChunk
|
||||
* - originalUrl?: string
|
||||
*
|
||||
* It can either return a transformed string, or a list of html tag
|
||||
* descriptors that will be injected into the `<head>` or `<body>`.
|
||||
@@ -3427,7 +3450,7 @@ interface CSSOptions {
|
||||
/**
|
||||
* Using lightningcss is an experimental option to handle CSS modules,
|
||||
* assets and imports via Lightning CSS. It requires to install it as a
|
||||
* peer dependency. This is incompatible with the use of preprocessors.
|
||||
* peer dependency.
|
||||
*
|
||||
* @default 'postcss'
|
||||
* @experimental
|
||||
@@ -3484,7 +3507,7 @@ interface CSSModulesOptions {
|
||||
*/
|
||||
localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
|
||||
}
|
||||
type ResolvedCSSOptions = Omit<CSSOptions, 'lightningcss'> & Required<Pick<CSSOptions, 'transformer'>> & {
|
||||
type ResolvedCSSOptions = Omit<CSSOptions, 'lightningcss'> & Required<Pick<CSSOptions, 'transformer' | 'devSourcemap'>> & {
|
||||
lightningcss?: LightningCSSOptions;
|
||||
};
|
||||
interface PreprocessCSSResult {
|
||||
@@ -3723,7 +3746,7 @@ type ResolvedEnvironmentOptions = {
|
||||
dev: ResolvedDevEnvironmentOptions;
|
||||
build: ResolvedBuildEnvironmentOptions;
|
||||
};
|
||||
type DefaultEnvironmentOptions = Omit<EnvironmentOptions, 'consumer' | 'resolve'> & {
|
||||
type DefaultEnvironmentOptions = Omit<EnvironmentOptions, 'consumer' | 'resolve' | 'keepProcessEnv'> & {
|
||||
resolve?: AllResolveOptions;
|
||||
};
|
||||
interface UserConfig extends DefaultEnvironmentOptions {
|
||||
@@ -3837,7 +3860,7 @@ interface UserConfig extends DefaultEnvironmentOptions {
|
||||
* root.
|
||||
* @default root
|
||||
*/
|
||||
envDir?: string;
|
||||
envDir?: string | false;
|
||||
/**
|
||||
* Env variables starts with `envPrefix` will be exposed to your client source code via import.meta.env.
|
||||
* @default 'VITE_'
|
||||
@@ -3965,6 +3988,7 @@ interface InlineConfig extends UserConfig {
|
||||
configFile?: string | false;
|
||||
/** @experimental */
|
||||
configLoader?: 'bundle' | 'runner' | 'native';
|
||||
/** @deprecated */
|
||||
envFile?: false;
|
||||
forceOptimizeDeps?: boolean;
|
||||
}
|
||||
@@ -3980,7 +4004,7 @@ interface ResolvedConfig extends Readonly<Omit<UserConfig, 'plugins' | 'css' | '
|
||||
mode: string;
|
||||
isWorker: boolean;
|
||||
isProduction: boolean;
|
||||
envDir: string;
|
||||
envDir: string | false;
|
||||
env: Record<string, any>;
|
||||
resolve: Required<ResolveOptions> & {
|
||||
alias: Alias[];
|
||||
@@ -4081,6 +4105,17 @@ declare class RunnableDevEnvironment extends DevEnvironment {
|
||||
close(): Promise<void>;
|
||||
}
|
||||
|
||||
interface FetchableDevEnvironmentContext extends DevEnvironmentContext {
|
||||
handleRequest(request: Request): Promise<Response> | Response;
|
||||
}
|
||||
declare function createFetchableDevEnvironment(name: string, config: ResolvedConfig, context: FetchableDevEnvironmentContext): FetchableDevEnvironment;
|
||||
declare function isFetchableDevEnvironment(environment: Environment): environment is FetchableDevEnvironment;
|
||||
declare class FetchableDevEnvironment extends DevEnvironment {
|
||||
private _handleRequest;
|
||||
constructor(name: string, config: ResolvedConfig, context: FetchableDevEnvironmentContext);
|
||||
dispatchFetch(request: Request): Promise<Response>;
|
||||
}
|
||||
|
||||
interface RunnerImportResult<T> {
|
||||
module: T;
|
||||
dependencies: string[];
|
||||
@@ -4175,7 +4210,7 @@ declare function isFileServingAllowed(config: ResolvedConfig, url: string): bool
|
||||
declare function isFileServingAllowed(url: string, server: ViteDevServer): boolean;
|
||||
declare function isFileLoadingAllowed(config: ResolvedConfig, filePath: string): boolean;
|
||||
|
||||
declare function loadEnv(mode: string, envDir: string, prefixes?: string | string[]): Record<string, string>;
|
||||
declare function loadEnv(mode: string, envDir: string | false, prefixes?: string | string[]): Record<string, string>;
|
||||
declare function resolveEnvPrefix({ envPrefix, }: UserConfig): string[];
|
||||
|
||||
type Manifest = Record<string, ManifestChunk>;
|
||||
@@ -4191,4 +4226,4 @@ interface ManifestChunk {
|
||||
dynamicImports?: string[];
|
||||
}
|
||||
|
||||
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESBuildTransformResult, type Environment, EnvironmentModuleGraph, EnvironmentModuleNode, type EnvironmentOptions, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotUpdateOptions, type HtmlTagDescriptor, HttpProxy, type HttpServer, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHMRChannel, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions, type SkipInformation, SplitVendorChunkCache, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteBuilder, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
||||
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESBuildTransformResult, type Environment, EnvironmentModuleGraph, EnvironmentModuleNode, type EnvironmentOptions, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotUpdateOptions, type HtmlTagDescriptor, HttpProxy, type HttpServer, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHMRChannel, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions, type SkipInformation, SplitVendorChunkCache, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteBuilder, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
||||
|
||||
Reference in New Issue
Block a user