@rspack/binding 0.1.11 → 0.1.12
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 +73 -7
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export class JsCompilation {
|
|
|
27
27
|
getBuildDependencies(): Array<string>
|
|
28
28
|
pushDiagnostic(severity: "error" | "warning", title: string, message: string): void
|
|
29
29
|
getStats(): JsStats
|
|
30
|
+
getAssetPath(filename: string, data: PathData): string
|
|
31
|
+
getAssetPathWithInfo(filename: string, data: PathData): PathWithInfo
|
|
32
|
+
getPath(filename: string, data: PathData): string
|
|
33
|
+
getPathWithInfo(filename: string, data: PathData): PathWithInfo
|
|
30
34
|
addFileDependencies(deps: Array<string>): void
|
|
31
35
|
addContextDependencies(deps: Array<string>): void
|
|
32
36
|
addMissingDependencies(deps: Array<string>): void
|
|
@@ -81,6 +85,14 @@ export class Rspack {
|
|
|
81
85
|
unsafe_drop(): void
|
|
82
86
|
}
|
|
83
87
|
|
|
88
|
+
export interface AfterResolveData {
|
|
89
|
+
request: string
|
|
90
|
+
context?: string
|
|
91
|
+
fileDependencies: Array<string>
|
|
92
|
+
contextDependencies: Array<string>
|
|
93
|
+
missingDependencies: Array<string>
|
|
94
|
+
}
|
|
95
|
+
|
|
84
96
|
export interface BeforeResolveData {
|
|
85
97
|
request: string
|
|
86
98
|
context?: string
|
|
@@ -102,10 +114,9 @@ export interface JsAsset {
|
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
export interface JsAssetInfo {
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*/
|
|
117
|
+
/** if the asset can be long term cached forever (contains a hash) */
|
|
118
|
+
immutable: boolean
|
|
119
|
+
/** whether the asset is minimized */
|
|
109
120
|
minimized: boolean
|
|
110
121
|
/**
|
|
111
122
|
* the value(s) of the full hash used for this asset
|
|
@@ -172,8 +183,10 @@ export interface JsHooks {
|
|
|
172
183
|
optimizeModules: (...args: any[]) => any
|
|
173
184
|
optimizeChunkModule: (...args: any[]) => any
|
|
174
185
|
beforeCompile: (...args: any[]) => any
|
|
186
|
+
afterCompile: (...args: any[]) => any
|
|
175
187
|
finishModules: (...args: any[]) => any
|
|
176
188
|
beforeResolve: (...args: any[]) => any
|
|
189
|
+
afterResolve: (...args: any[]) => any
|
|
177
190
|
contextModuleBeforeResolve: (...args: any[]) => any
|
|
178
191
|
normalModuleFactoryResolveForScheme: (...args: any[]) => any
|
|
179
192
|
chunkAsset: (...args: any[]) => any
|
|
@@ -223,6 +236,16 @@ export interface JsModule {
|
|
|
223
236
|
moduleIdentifier: string
|
|
224
237
|
}
|
|
225
238
|
|
|
239
|
+
export interface JsResolveForSchemeInput {
|
|
240
|
+
resourceData: JsResourceData
|
|
241
|
+
scheme: string
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface JsResolveForSchemeResult {
|
|
245
|
+
resourceData: JsResourceData
|
|
246
|
+
stop: boolean
|
|
247
|
+
}
|
|
248
|
+
|
|
226
249
|
export interface JsResourceData {
|
|
227
250
|
/** Resource with absolute path, query and fragment */
|
|
228
251
|
resource: string
|
|
@@ -326,6 +349,26 @@ export interface JsStatsWarning {
|
|
|
326
349
|
formatted: string
|
|
327
350
|
}
|
|
328
351
|
|
|
352
|
+
export interface NodeFS {
|
|
353
|
+
writeFile: (...args: any[]) => any
|
|
354
|
+
mkdir: (...args: any[]) => any
|
|
355
|
+
mkdirp: (...args: any[]) => any
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface PathData {
|
|
359
|
+
filename?: string
|
|
360
|
+
hash?: string
|
|
361
|
+
contentHash?: string
|
|
362
|
+
runtime?: string
|
|
363
|
+
url?: string
|
|
364
|
+
id?: string
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface PathWithInfo {
|
|
368
|
+
path: string
|
|
369
|
+
info: JsAssetInfo
|
|
370
|
+
}
|
|
371
|
+
|
|
329
372
|
export interface RawAssetParserDataUrlOption {
|
|
330
373
|
maxSize?: number
|
|
331
374
|
}
|
|
@@ -386,6 +429,9 @@ export interface RawCacheGroupOptions {
|
|
|
386
429
|
chunks?: string
|
|
387
430
|
minChunks?: number
|
|
388
431
|
minSize?: number
|
|
432
|
+
maxSize?: number
|
|
433
|
+
maxAsyncSize?: number
|
|
434
|
+
maxInitialSize?: number
|
|
389
435
|
name?: string
|
|
390
436
|
reuseExistingChunk?: boolean
|
|
391
437
|
enforce?: boolean
|
|
@@ -480,6 +526,14 @@ export interface RawExternalsPresets {
|
|
|
480
526
|
web: boolean
|
|
481
527
|
}
|
|
482
528
|
|
|
529
|
+
export interface RawFallbackCacheGroupOptions {
|
|
530
|
+
chunks?: string
|
|
531
|
+
minSize?: number
|
|
532
|
+
maxSize?: number
|
|
533
|
+
maxAsyncSize?: number
|
|
534
|
+
maxInitialSize?: number
|
|
535
|
+
}
|
|
536
|
+
|
|
483
537
|
export interface RawGlobOptions {
|
|
484
538
|
caseSensitiveMatch?: boolean
|
|
485
539
|
dot?: boolean
|
|
@@ -551,6 +605,7 @@ export interface RawModuleRule {
|
|
|
551
605
|
resource?: RawRuleSetCondition
|
|
552
606
|
/** A condition matcher against the resource query. */
|
|
553
607
|
resourceQuery?: RawRuleSetCondition
|
|
608
|
+
resourceFragment?: RawRuleSetCondition
|
|
554
609
|
descriptionData?: Record<string, RawRuleSetCondition>
|
|
555
610
|
sideEffects?: boolean
|
|
556
611
|
use?: Array<RawModuleRuleUse>
|
|
@@ -560,6 +615,8 @@ export interface RawModuleRule {
|
|
|
560
615
|
resolve?: RawResolveOptions
|
|
561
616
|
issuer?: RawRuleSetCondition
|
|
562
617
|
dependency?: RawRuleSetCondition
|
|
618
|
+
scheme?: RawRuleSetCondition
|
|
619
|
+
mimetype?: RawRuleSetCondition
|
|
563
620
|
oneOf?: Array<RawModuleRule>
|
|
564
621
|
/** Specifies the category of the loader. No value means normal loader. */
|
|
565
622
|
enforce?: 'pre' | 'post'
|
|
@@ -646,6 +703,8 @@ export interface RawOutputOptions {
|
|
|
646
703
|
crossOriginLoading: RawCrossOriginLoading
|
|
647
704
|
cssFilename: string
|
|
648
705
|
cssChunkFilename: string
|
|
706
|
+
hotUpdateMainFilename: string
|
|
707
|
+
hotUpdateChunkFilename: string
|
|
649
708
|
uniqueName: string
|
|
650
709
|
chunkLoadingGlobal: string
|
|
651
710
|
library?: RawLibraryOptions
|
|
@@ -744,6 +803,7 @@ export interface RawResolveOptions {
|
|
|
744
803
|
modules?: Array<string>
|
|
745
804
|
byDependency?: Record<string, RawResolveOptions>
|
|
746
805
|
fullySpecified?: boolean
|
|
806
|
+
exportsFields?: Array<string>
|
|
747
807
|
}
|
|
748
808
|
|
|
749
809
|
export interface RawRuleSetCondition {
|
|
@@ -772,6 +832,7 @@ export interface RawSnapshotStrategy {
|
|
|
772
832
|
}
|
|
773
833
|
|
|
774
834
|
export interface RawSplitChunksOptions {
|
|
835
|
+
fallbackCacheGroup?: RawFallbackCacheGroupOptions
|
|
775
836
|
name?: string
|
|
776
837
|
cacheGroups?: Record<string, RawCacheGroupOptions>
|
|
777
838
|
/** What kind of chunks should be selected. */
|
|
@@ -782,6 +843,9 @@ export interface RawSplitChunksOptions {
|
|
|
782
843
|
minSize?: number
|
|
783
844
|
enforceSizeThreshold?: number
|
|
784
845
|
minRemainingSize?: number
|
|
846
|
+
maxSize?: number
|
|
847
|
+
maxAsyncSize?: number
|
|
848
|
+
maxInitialSize?: number
|
|
785
849
|
}
|
|
786
850
|
|
|
787
851
|
export interface RawStatsOptions {
|
|
@@ -799,8 +863,10 @@ export interface RawTrustedTypes {
|
|
|
799
863
|
policyName?: string
|
|
800
864
|
}
|
|
801
865
|
|
|
802
|
-
export interface
|
|
803
|
-
|
|
804
|
-
|
|
866
|
+
export interface ThreadsafeNodeFS {
|
|
867
|
+
writeFile: (...args: any[]) => any
|
|
868
|
+
mkdir: (...args: any[]) => any
|
|
869
|
+
mkdirp: (...args: any[]) => any
|
|
870
|
+
removeDirAll: (...args: any[]) => any
|
|
805
871
|
}
|
|
806
872
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"binaryName": "rspack"
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@rspack/binding-darwin-arm64": "0.1.
|
|
29
|
-
"@rspack/binding-win32-arm64-msvc": "0.1.
|
|
30
|
-
"@rspack/binding-linux-arm64-gnu": "0.1.
|
|
31
|
-
"@rspack/binding-linux-arm64-musl": "0.1.
|
|
32
|
-
"@rspack/binding-win32-ia32-msvc": "0.1.
|
|
33
|
-
"@rspack/binding-darwin-x64": "0.1.
|
|
34
|
-
"@rspack/binding-win32-x64-msvc": "0.1.
|
|
35
|
-
"@rspack/binding-linux-x64-gnu": "0.1.
|
|
36
|
-
"@rspack/binding-linux-x64-musl": "0.1.
|
|
28
|
+
"@rspack/binding-darwin-arm64": "0.1.12",
|
|
29
|
+
"@rspack/binding-win32-arm64-msvc": "0.1.12",
|
|
30
|
+
"@rspack/binding-linux-arm64-gnu": "0.1.12",
|
|
31
|
+
"@rspack/binding-linux-arm64-musl": "0.1.12",
|
|
32
|
+
"@rspack/binding-win32-ia32-msvc": "0.1.12",
|
|
33
|
+
"@rspack/binding-darwin-x64": "0.1.12",
|
|
34
|
+
"@rspack/binding-win32-x64-msvc": "0.1.12",
|
|
35
|
+
"@rspack/binding-linux-x64-gnu": "0.1.12",
|
|
36
|
+
"@rspack/binding-linux-x64-musl": "0.1.12"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build:debug": "node scripts/build.js",
|