@rspack/binding 1.4.7-alpha.1 → 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 +27 -0
- package/package.json +11 -11
package/binding.d.ts
CHANGED
|
@@ -441,6 +441,25 @@ export declare class ModuleGraphConnection {
|
|
|
441
441
|
get originModule(): Module | null
|
|
442
442
|
}
|
|
443
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
|
+
|
|
444
463
|
|
|
445
464
|
export declare class RawExternalItemFnCtx {
|
|
446
465
|
data(): RawExternalItemFnCtxData
|
|
@@ -1487,6 +1506,14 @@ export declare function minify(source: string, options: string): Promise<Transfo
|
|
|
1487
1506
|
|
|
1488
1507
|
export declare function minifySync(source: string, options: string): TransformOutput
|
|
1489
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
|
+
|
|
1490
1517
|
export interface NodeFsStats {
|
|
1491
1518
|
isFile: boolean
|
|
1492
1519
|
isDirectory: boolean
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.4.7
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@rspack/binding-
|
|
51
|
-
"@rspack/binding-
|
|
52
|
-
"@rspack/binding-linux-arm64-
|
|
53
|
-
"@rspack/binding-linux-arm64-
|
|
54
|
-
"@rspack/binding-win32-ia32-msvc": "1.4.7
|
|
55
|
-
"@rspack/binding-wasm32-wasi": "1.4.7
|
|
56
|
-
"@rspack/binding-darwin-x64": "1.4.7
|
|
57
|
-
"@rspack/binding-win32-x64-msvc": "1.4.7
|
|
58
|
-
"@rspack/binding-linux-x64-gnu": "1.4.7
|
|
59
|
-
"@rspack/binding-linux-x64-musl": "1.4.7
|
|
50
|
+
"@rspack/binding-win32-arm64-msvc": "1.4.7",
|
|
51
|
+
"@rspack/binding-darwin-arm64": "1.4.7",
|
|
52
|
+
"@rspack/binding-linux-arm64-gnu": "1.4.7",
|
|
53
|
+
"@rspack/binding-linux-arm64-musl": "1.4.7",
|
|
54
|
+
"@rspack/binding-win32-ia32-msvc": "1.4.7",
|
|
55
|
+
"@rspack/binding-wasm32-wasi": "1.4.7",
|
|
56
|
+
"@rspack/binding-darwin-x64": "1.4.7",
|
|
57
|
+
"@rspack/binding-win32-x64-msvc": "1.4.7",
|
|
58
|
+
"@rspack/binding-linux-x64-gnu": "1.4.7",
|
|
59
|
+
"@rspack/binding-linux-x64-musl": "1.4.7"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build:dev": "node scripts/build.js",
|