@rspack/core 1.3.5 → 1.3.7

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.
@@ -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;
@@ -11,4 +11,4 @@ interface WorkerOptions {
11
11
  };
12
12
  }
13
13
  declare function worker(workerOptions: WorkerOptions): void;
14
- export = worker;
14
+ export default worker;
@@ -0,0 +1,37 @@
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 initCpuProfiler(): void;
26
+ static cleanupJavaScriptTrace(): Promise<void>;
27
+ static getTs(): number;
28
+ static getCommonEv(): {
29
+ tid: number;
30
+ pid: number;
31
+ ts: number;
32
+ cat: string;
33
+ };
34
+ static pushEvent(event: ChromeEvent): void;
35
+ static startAsync(events: ChromeEvent): void;
36
+ static endAsync(events: ChromeEvent): void;
37
+ }
@@ -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): void;
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;