@rspack-debug/binding 1.4.4 → 1.4.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.
- package/binding.d.ts +36 -0
- package/package.json +14 -14
package/binding.d.ts
CHANGED
|
@@ -317,6 +317,7 @@ export declare class JsCompilation {
|
|
|
317
317
|
addEntry(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
|
|
318
318
|
addInclude(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
|
|
319
319
|
get codeGenerationResults(): CodeGenerationResults
|
|
320
|
+
createStatsWarnings(warnings: Array<RspackError>, colored?: boolean | undefined | null): JsStatsError[]
|
|
320
321
|
}
|
|
321
322
|
|
|
322
323
|
export declare class JsCompiler {
|
|
@@ -440,6 +441,25 @@ export declare class ModuleGraphConnection {
|
|
|
440
441
|
get originModule(): Module | null
|
|
441
442
|
}
|
|
442
443
|
|
|
444
|
+
export declare class NativeWatcher {
|
|
445
|
+
constructor(options: NativeWatcherOptions)
|
|
446
|
+
watch(files: [Array<string>, Array<string>], directories: [Array<string>, Array<string>], missing: [Array<string>, Array<string>], callback: (err: Error | null, result: NativeWatchResult) => void, callbackUndelayed: (path: string) => void): void
|
|
447
|
+
/**
|
|
448
|
+
* # Safety
|
|
449
|
+
*
|
|
450
|
+
* This function is unsafe because it uses `&mut self` to call the watcher asynchronously.
|
|
451
|
+
* It's important to ensure that the watcher is not used in any other places before this function is finished.
|
|
452
|
+
* You must ensure that the watcher not call watch, close or pause in the same time, otherwise it may lead to undefined behavior.
|
|
453
|
+
*/
|
|
454
|
+
close(): Promise<void>
|
|
455
|
+
pause(): void
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export declare class NativeWatchResult {
|
|
459
|
+
changedFiles: Array<string>
|
|
460
|
+
removedFiles: Array<string>
|
|
461
|
+
}
|
|
462
|
+
|
|
443
463
|
|
|
444
464
|
export declare class RawExternalItemFnCtx {
|
|
445
465
|
data(): RawExternalItemFnCtxData
|
|
@@ -563,6 +583,12 @@ export interface CssChunkingPluginOptions {
|
|
|
563
583
|
exclude?: RegExp
|
|
564
584
|
}
|
|
565
585
|
|
|
586
|
+
/**
|
|
587
|
+
* Expected version of @rspack/core to the current binding version
|
|
588
|
+
* @internal
|
|
589
|
+
*/
|
|
590
|
+
export const EXPECTED_RSPACK_CORE_VERSION: string
|
|
591
|
+
|
|
566
592
|
export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'>
|
|
567
593
|
|
|
568
594
|
export interface JsAddingRuntimeModule {
|
|
@@ -1480,6 +1506,14 @@ export declare function minify(source: string, options: string): Promise<Transfo
|
|
|
1480
1506
|
|
|
1481
1507
|
export declare function minifySync(source: string, options: string): TransformOutput
|
|
1482
1508
|
|
|
1509
|
+
export interface NativeWatcherOptions {
|
|
1510
|
+
followSymlinks?: boolean
|
|
1511
|
+
pollInterval?: number
|
|
1512
|
+
aggregateTimeout?: number
|
|
1513
|
+
/** A function that will be called with the path of a file or directory that is ignored. */
|
|
1514
|
+
ignored?: (path: string) => boolean
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1483
1517
|
export interface NodeFsStats {
|
|
1484
1518
|
isFile: boolean
|
|
1485
1519
|
isDirectory: boolean
|
|
@@ -1489,6 +1523,7 @@ export interface NodeFsStats {
|
|
|
1489
1523
|
ctimeMs: number
|
|
1490
1524
|
birthtimeMs: number
|
|
1491
1525
|
size: number
|
|
1526
|
+
mode: number
|
|
1492
1527
|
}
|
|
1493
1528
|
|
|
1494
1529
|
export interface PathWithInfo {
|
|
@@ -2763,6 +2798,7 @@ export interface ThreadsafeNodeFS {
|
|
|
2763
2798
|
read: (fd: number, length: number, position: number) => Promise<Buffer | void>
|
|
2764
2799
|
readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void>
|
|
2765
2800
|
readToEnd: (fd: number, position: number) => Promise<Buffer | void>
|
|
2801
|
+
chmod?: (name: string, mode: number) => Promise<void>
|
|
2766
2802
|
}
|
|
2767
2803
|
|
|
2768
2804
|
export declare function transform(source: string, options: string): Promise<TransformOutput>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-debug/binding",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
18
18
|
"repository": "web-infra-dev/rspack",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@napi-rs/cli": "3.0.0-alpha.
|
|
21
|
-
"@napi-rs/wasm-runtime": "^0.2.
|
|
22
|
-
"emnapi": "^1.4.
|
|
20
|
+
"@napi-rs/cli": "3.0.0-alpha.95",
|
|
21
|
+
"@napi-rs/wasm-runtime": "^0.2.12",
|
|
22
|
+
"emnapi": "^1.4.4",
|
|
23
23
|
"typescript": "^5.8.3",
|
|
24
|
-
"@emnapi/core": "^1.4.
|
|
24
|
+
"@emnapi/core": "^1.4.4"
|
|
25
25
|
},
|
|
26
26
|
"napi": {
|
|
27
27
|
"binaryName": "rspack",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@rspack/binding-darwin-arm64": "npm:@rspack-debug/binding-darwin-arm64@1.4.
|
|
51
|
-
"@rspack/binding-
|
|
52
|
-
"@rspack/binding-win32-
|
|
53
|
-
"@rspack/binding-linux-arm64-musl": "npm:@rspack-debug/binding-linux-arm64-musl@1.4.
|
|
54
|
-
"@rspack/binding-
|
|
55
|
-
"@rspack/binding-
|
|
56
|
-
"@rspack/binding-
|
|
57
|
-
"@rspack/binding-
|
|
58
|
-
"@rspack/binding-linux-x64-
|
|
50
|
+
"@rspack/binding-darwin-arm64": "npm:@rspack-debug/binding-darwin-arm64@1.4.7",
|
|
51
|
+
"@rspack/binding-win32-arm64-msvc": "npm:@rspack-debug/binding-win32-arm64-msvc@1.4.7",
|
|
52
|
+
"@rspack/binding-win32-ia32-msvc": "npm:@rspack-debug/binding-win32-ia32-msvc@1.4.7",
|
|
53
|
+
"@rspack/binding-linux-arm64-musl": "npm:@rspack-debug/binding-linux-arm64-musl@1.4.7",
|
|
54
|
+
"@rspack/binding-linux-arm64-gnu": "npm:@rspack-debug/binding-linux-arm64-gnu@1.4.7",
|
|
55
|
+
"@rspack/binding-darwin-x64": "npm:@rspack-debug/binding-darwin-x64@1.4.7",
|
|
56
|
+
"@rspack/binding-linux-x64-gnu": "npm:@rspack-debug/binding-linux-x64-gnu@1.4.7",
|
|
57
|
+
"@rspack/binding-win32-x64-msvc": "npm:@rspack-debug/binding-win32-x64-msvc@1.4.7",
|
|
58
|
+
"@rspack/binding-linux-x64-musl": "npm:@rspack-debug/binding-linux-x64-musl@1.4.7"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build:dev": "node scripts/build.js",
|