@rspack/core 1.3.15 → 1.4.0-beta.1
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/compiled/@swc/types/index.d.ts +18 -2
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/tinypool/README.md +4 -196
- package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
- package/compiled/tinypool/dist/entry/process.d.ts +1 -2
- package/compiled/tinypool/dist/entry/process.js +63 -83
- package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
- package/compiled/tinypool/dist/entry/utils.js +3 -9
- package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
- package/compiled/tinypool/dist/entry/worker.js +66 -94
- package/compiled/tinypool/dist/index.d.ts +132 -125
- package/compiled/tinypool/dist/index.js +771 -1035
- package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
- package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
- package/compiled/tinypool/package.json +6 -22
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +19 -14
- package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
- package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
- package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
- package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
- package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
- package/compiled/zod/index.js +33 -33
- package/compiled/zod/package.json +1 -1
- package/dist/BuildInfo.d.ts +17 -0
- package/dist/FileSystem.d.ts +26 -3
- package/dist/Module.d.ts +1 -13
- package/dist/MultiCompiler.d.ts +4 -1
- package/dist/MultiWatching.d.ts +1 -0
- package/dist/builtin-loader/swc/types.d.ts +315 -296
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/config/devServer.d.ts +10 -10
- package/dist/config/normalization.d.ts +2 -0
- package/dist/config/types.d.ts +17 -1
- package/dist/config/utils.d.ts +1 -0
- package/dist/config/zod.d.ts +1707 -1086
- package/dist/cssExtractLoader.js +5 -5
- package/dist/exports.d.ts +5 -2
- package/dist/index.js +1130 -982
- package/dist/loader-runner/index.d.ts +0 -9
- package/dist/swc.d.ts +2 -0
- package/dist/trace/index.d.ts +16 -18
- package/dist/worker.js +2 -2
- package/module.d.ts +1 -1
- package/package.json +10 -10
- package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
- package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
- package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -53
- package/compiled/tinypool/dist/chunk-UBWFVGJX.js +0 -38
@@ -1,4 +1,4 @@
|
|
1
|
-
import type
|
2
|
-
import type {
|
1
|
+
import { type Compiler, MultiCompiler } from "../..";
|
2
|
+
import type { MiddlewareHandler } from "../../config/devServer";
|
3
3
|
export declare const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
4
|
-
export declare const lazyCompilationMiddleware: (compiler: Compiler
|
4
|
+
export declare const lazyCompilationMiddleware: (compiler: Compiler | MultiCompiler) => MiddlewareHandler;
|
@@ -11,9 +11,9 @@ import type { Compiler, MultiCompiler, MultiStats, Stats, Watching } from "..";
|
|
11
11
|
type Logger = ReturnType<Compiler["getInfrastructureLogger"]>;
|
12
12
|
type MultiWatching = MultiCompiler["watch"];
|
13
13
|
type BasicServer = import("net").Server | import("tls").Server;
|
14
|
-
type ReadStream =
|
15
|
-
type IncomingMessage =
|
16
|
-
type ServerResponse =
|
14
|
+
type ReadStream = import("fs").ReadStream;
|
15
|
+
type IncomingMessage = import("http").IncomingMessage;
|
16
|
+
type ServerResponse = import("http").ServerResponse;
|
17
17
|
type ServerOptions = import("https").ServerOptions & {
|
18
18
|
spdy?: {
|
19
19
|
plain?: boolean | undefined;
|
@@ -112,8 +112,8 @@ type Static = {
|
|
112
112
|
poll?: number | boolean;
|
113
113
|
}) | undefined;
|
114
114
|
};
|
115
|
-
type ServerType<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<IncomingMessage, ServerResponse>> = "http" | "https" | "spdy" | "http2" | string | ((arg0: ServerOptions, arg1: A) => S);
|
116
|
-
type ServerConfiguration<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<IncomingMessage, ServerResponse>> = {
|
115
|
+
type ServerType<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = "http" | "https" | "spdy" | "http2" | string | ((arg0: ServerOptions, arg1: A) => S);
|
116
|
+
type ServerConfiguration<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = {
|
117
117
|
type?: ServerType<A, S> | undefined;
|
118
118
|
options?: ServerOptions | undefined;
|
119
119
|
};
|
@@ -144,13 +144,13 @@ type DevMiddlewareContext<RequestInternal extends IncomingMessage = IncomingMess
|
|
144
144
|
outputFileSystem: OutputFileSystem;
|
145
145
|
};
|
146
146
|
type Server = any;
|
147
|
-
type MiddlewareHandler =
|
148
|
-
type MiddlewareObject = {
|
147
|
+
export type MiddlewareHandler<RequestInternal extends Request = Request, ResponseInternal extends Response = Response> = (req: RequestInternal, res: ResponseInternal, next: NextFunction) => void | Promise<void>;
|
148
|
+
type MiddlewareObject<RequestInternal extends Request = Request, ResponseInternal extends Response = Response> = {
|
149
149
|
name?: string;
|
150
150
|
path?: string;
|
151
|
-
middleware: MiddlewareHandler
|
151
|
+
middleware: MiddlewareHandler<RequestInternal, ResponseInternal>;
|
152
152
|
};
|
153
|
-
export type Middleware = MiddlewareObject | MiddlewareHandler
|
153
|
+
export type Middleware<RequestInternal extends Request = Request, ResponseInternal extends Response = Response> = MiddlewareObject<RequestInternal, ResponseInternal> | MiddlewareHandler<RequestInternal, ResponseInternal>;
|
154
154
|
type OpenApp = {
|
155
155
|
name?: string | undefined;
|
156
156
|
arguments?: string[] | undefined;
|
@@ -180,7 +180,7 @@ type ClientConfiguration = {
|
|
180
180
|
webSocketTransport?: string | undefined;
|
181
181
|
webSocketURL?: string | WebSocketURL | undefined;
|
182
182
|
};
|
183
|
-
export type DevServerOptions<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<IncomingMessage, ServerResponse>> = {
|
183
|
+
export type DevServerOptions<A extends BasicApplication = BasicApplication, S extends BasicServer = import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>> = {
|
184
184
|
ipc?: string | boolean | undefined;
|
185
185
|
host?: string | undefined;
|
186
186
|
port?: Port | undefined;
|
@@ -106,6 +106,8 @@ export interface ExperimentsNormalized {
|
|
106
106
|
rspackFuture?: RspackFutureOptions;
|
107
107
|
buildHttp?: HttpUriPluginOptions;
|
108
108
|
parallelLoader?: boolean;
|
109
|
+
useInputFileSystem?: false | RegExp[];
|
110
|
+
inlineConst?: boolean;
|
109
111
|
}
|
110
112
|
export type IgnoreWarningsNormalized = ((warning: Error, compilation: Compilation) => boolean)[];
|
111
113
|
export type OptimizationRuntimeChunkNormalized = false | {
|
package/dist/config/types.d.ts
CHANGED
@@ -787,6 +787,8 @@ export type JavascriptParserOptions = {
|
|
787
787
|
requireDynamic?: boolean;
|
788
788
|
requireResolve?: boolean;
|
789
789
|
importDynamic?: boolean;
|
790
|
+
/** Inline const values in this module */
|
791
|
+
inlineConst?: boolean;
|
790
792
|
};
|
791
793
|
export type JsonParserOptions = {
|
792
794
|
/**
|
@@ -1945,6 +1947,10 @@ export type IncrementalPresets = boolean | "none" | "safe" | "advance" | "advanc
|
|
1945
1947
|
* Options for experiments.buildHttp
|
1946
1948
|
*/
|
1947
1949
|
export type HttpUriOptions = HttpUriPluginOptions;
|
1950
|
+
/**
|
1951
|
+
* Options for experiments.useInputFileSystem
|
1952
|
+
*/
|
1953
|
+
export type UseInputFileSystem = false | RegExp[];
|
1948
1954
|
/**
|
1949
1955
|
* Experimental features configuration.
|
1950
1956
|
*/
|
@@ -2019,6 +2025,16 @@ export type Experiments = {
|
|
2019
2025
|
* @default false
|
2020
2026
|
*/
|
2021
2027
|
parallelLoader?: boolean;
|
2028
|
+
/**
|
2029
|
+
* Enable Node.js input file system
|
2030
|
+
* @default false
|
2031
|
+
*/
|
2032
|
+
useInputFileSystem?: UseInputFileSystem;
|
2033
|
+
/**
|
2034
|
+
* Enable inline constants
|
2035
|
+
* @default false
|
2036
|
+
*/
|
2037
|
+
inlineConst?: boolean;
|
2022
2038
|
};
|
2023
2039
|
export type Watch = boolean;
|
2024
2040
|
/** Options for watch mode. */
|
@@ -2053,6 +2069,7 @@ export type WatchOptions = {
|
|
2053
2069
|
* */
|
2054
2070
|
export interface DevServer extends DevServerOptions {
|
2055
2071
|
}
|
2072
|
+
export type { Middleware as DevServerMiddleware } from "./devServer";
|
2056
2073
|
/**
|
2057
2074
|
* An array of either regular expressions or functions that determine if a warning should be ignored.
|
2058
2075
|
*/
|
@@ -2225,4 +2242,3 @@ export type RspackOptions = {
|
|
2225
2242
|
};
|
2226
2243
|
/** Configuration for Rspack */
|
2227
2244
|
export type Configuration = RspackOptions;
|
2228
|
-
export {};
|
package/dist/config/utils.d.ts
CHANGED
@@ -14,3 +14,4 @@ export declare class ZodRspackCrossChecker<T> extends ZodType<T> {
|
|
14
14
|
_parse(input: z.ParseInput): z.ParseReturnType<T>;
|
15
15
|
_getRootData(ctx: z.ParseContext): any;
|
16
16
|
}
|
17
|
+
export declare const anyFunction: ZodType<(...args: unknown[]) => any, ZodTypeDef, (...args: unknown[]) => any>;
|