@rspack/core 1.3.4 → 1.3.6
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 +1 -2
- package/compiled/@swc/types/index.d.ts +11 -2
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/enhanced-resolve/CachedInputFileSystem.d.ts +0 -0
- package/compiled/enhanced-resolve/index.d.ts +3 -2
- package/compiled/zod/index.d.ts +10 -8
- package/compiled/zod/index.js +30 -30
- package/compiled/zod/package.json +1 -1
- package/dist/ChunkGraph.d.ts +1 -0
- package/dist/Chunks.d.ts +13 -0
- package/dist/Compilation.d.ts +4 -7
- package/dist/Module.d.ts +1 -0
- package/dist/NormalModule.d.ts +2 -2
- package/dist/builtin-loader/swc/pluginImport.d.ts +35 -0
- package/dist/builtin-loader/swc/types.d.ts +4434 -2
- package/dist/builtin-plugin/html-plugin/options.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +1 -1
- package/dist/config/devServer.d.ts +207 -0
- package/dist/config/types.d.ts +12 -5
- package/dist/config/utils.d.ts +3 -3
- package/dist/config/zod.d.ts +711 -695
- package/dist/cssExtractHmr.js +112 -211
- package/dist/cssExtractLoader.js +129 -246
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +13061 -21111
- package/dist/loader-runner/service.d.ts +1 -1
- package/dist/loader-runner/utils.d.ts +1 -0
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/trace/index.d.ts +35 -0
- package/dist/util/hash/BatchedHash.d.ts +2 -6
- package/dist/util/hash/index.d.ts +15 -6
- package/dist/util/validate.d.ts +4 -1
- package/dist/worker.js +909 -1874
- package/package.json +12 -24
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Tinypool } from "../../compiled/tinypool" with { "resolution-mode": "import" };
|
1
|
+
import type { Tinypool } from "../../compiled/tinypool/dist/index.js" with { "resolution-mode": "import" };
|
2
2
|
type RunOptions = Parameters<Tinypool["run"]>[1];
|
3
3
|
export interface WorkerResponseMessage {
|
4
4
|
type: "response";
|
@@ -3,3 +3,4 @@ import type { LoaderContext } from "../config/adapterRuleUse";
|
|
3
3
|
export declare function convertArgs(args: any[], raw: boolean): void;
|
4
4
|
export declare const loadLoader: (loaderObject: LoaderObject) => Promise<void>;
|
5
5
|
export declare const runSyncOrAsync: (arg1: Function, arg2: LoaderContext<{}>, arg3: any[]) => Promise<any[]>;
|
6
|
+
export declare function extractLoaderName(loaderPath: string, cwd?: string): string;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import inspector from "node:inspector";
|
2
|
+
export interface ChromeEvent {
|
3
|
+
name: string;
|
4
|
+
ph?: string;
|
5
|
+
cat?: string;
|
6
|
+
ts?: number;
|
7
|
+
pid?: number;
|
8
|
+
tid?: number;
|
9
|
+
id?: number;
|
10
|
+
args?: {
|
11
|
+
[key: string]: any;
|
12
|
+
};
|
13
|
+
id2?: {
|
14
|
+
local?: string;
|
15
|
+
global?: string;
|
16
|
+
};
|
17
|
+
}
|
18
|
+
export declare class JavaScriptTracer {
|
19
|
+
static startTime: number;
|
20
|
+
static events: ChromeEvent[];
|
21
|
+
static layer: string;
|
22
|
+
static output: string;
|
23
|
+
static session: inspector.Session;
|
24
|
+
static initJavaScriptTrace(layer: string, output: string): void;
|
25
|
+
static cleanupJavaScriptTrace(): Promise<void>;
|
26
|
+
static getTs(): number;
|
27
|
+
static getCommonEv(): {
|
28
|
+
tid: number;
|
29
|
+
pid: number;
|
30
|
+
ts: number;
|
31
|
+
};
|
32
|
+
static pushEvent(event: ChromeEvent): void;
|
33
|
+
static startAsync(events: ChromeEvent): void;
|
34
|
+
static endAsync(events: ChromeEvent): void;
|
35
|
+
}
|
@@ -20,10 +20,6 @@ export default class BatchedHash extends Hash {
|
|
20
20
|
* @returns updated hash
|
21
21
|
*/
|
22
22
|
update(data: string | Buffer, inputEncoding?: string): this;
|
23
|
-
|
24
|
-
|
25
|
-
* @param encoding encoding of the return value
|
26
|
-
* @returns digest
|
27
|
-
*/
|
28
|
-
digest(encoding?: string): string | Buffer;
|
23
|
+
digest(): Buffer;
|
24
|
+
digest(encoding: string): string;
|
29
25
|
}
|
@@ -1,17 +1,26 @@
|
|
1
1
|
export default class Hash {
|
2
2
|
/**
|
3
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4
|
-
* @abstract
|
5
3
|
* @param data data
|
6
4
|
* @param inputEncoding data encoding
|
7
5
|
* @returns updated hash
|
8
6
|
*/
|
9
|
-
update(data: string
|
7
|
+
update(data: string, inputEncoding: string): this;
|
8
|
+
/**
|
9
|
+
* @param data data
|
10
|
+
* @returns updated hash
|
11
|
+
*/
|
12
|
+
update(data: Buffer): this;
|
13
|
+
/**
|
14
|
+
* Calculates the digest without encoding
|
15
|
+
* @abstract
|
16
|
+
* @returns {Buffer} digest
|
17
|
+
*/
|
18
|
+
digest(): Buffer;
|
10
19
|
/**
|
11
|
-
* Calculates the digest
|
20
|
+
* Calculates the digest with encoding
|
12
21
|
* @abstract
|
13
22
|
* @param encoding encoding of the return value
|
14
|
-
* @returns
|
23
|
+
* @returns {string} digest
|
15
24
|
*/
|
16
|
-
digest(encoding
|
25
|
+
digest(encoding: string): string;
|
17
26
|
}
|
package/dist/util/validate.d.ts
CHANGED
@@ -2,5 +2,8 @@ import type { z } from "../../compiled/zod";
|
|
2
2
|
export declare class ValidationError extends Error {
|
3
3
|
constructor(message: string);
|
4
4
|
}
|
5
|
-
export declare function validate<T extends z.ZodType>(opts: any, schema: T
|
5
|
+
export declare function validate<T extends z.ZodType>(opts: any, schema: T, options?: {
|
6
|
+
output?: boolean;
|
7
|
+
strategy?: "strict" | "loose-unrecognized-keys" | "loose-silent" | "loose";
|
8
|
+
}): string | null;
|
6
9
|
export declare function isValidate<T extends z.ZodType>(opts: any, schema: T): boolean;
|