@rspack/binding 1.3.9 → 1.3.11
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 -29
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -65,17 +65,33 @@ export declare class ExternalObject<T> {
|
|
|
65
65
|
[K: symbol]: T
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
export declare class Assets {
|
|
69
|
+
keys(): Array<string>
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
export declare class AsyncDependenciesBlock {
|
|
69
73
|
get dependencies(): Dependency[]
|
|
70
74
|
get blocks(): AsyncDependenciesBlock[]
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
export declare class BuildInfo {
|
|
78
|
+
get _assets(): Assets
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
export declare class Chunks {
|
|
74
82
|
get size(): number
|
|
75
83
|
_values(): JsChunk[]
|
|
76
84
|
_has(chunk: JsChunk): boolean
|
|
77
85
|
}
|
|
78
86
|
|
|
87
|
+
export declare class CodeGenerationResult {
|
|
88
|
+
get sources(): Sources
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare class CodeGenerationResults {
|
|
92
|
+
get(module: Module, runtime: string | string[] | undefined): CodeGenerationResult
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
export declare class ConcatenatedModule {
|
|
80
96
|
get rootModule(): Module
|
|
81
97
|
get modules(): Module[]
|
|
@@ -108,6 +124,14 @@ export declare class Dependency {
|
|
|
108
124
|
get ids(): Array<string> | undefined
|
|
109
125
|
}
|
|
110
126
|
|
|
127
|
+
export declare class Diagnostics {
|
|
128
|
+
get length(): number
|
|
129
|
+
values(): Array<JsRspackError>
|
|
130
|
+
get(index: number): JsRspackError | undefined
|
|
131
|
+
set(index: number, error: JsRspackError): void
|
|
132
|
+
spliceWithArray(index: number, deleteCount?: number | undefined | null, newItems?: Array<JsRspackError> | undefined | null): Array<JsRspackError>
|
|
133
|
+
}
|
|
134
|
+
|
|
111
135
|
export declare class EntryDataDto {
|
|
112
136
|
get dependencies(): Dependency[]
|
|
113
137
|
get includeDependencies(): Dependency[]
|
|
@@ -177,6 +201,7 @@ export declare class JsChunk {
|
|
|
177
201
|
}
|
|
178
202
|
|
|
179
203
|
export declare class JsChunkGraph {
|
|
204
|
+
hasChunkEntryDependentChunks(chunk: JsChunk): boolean
|
|
180
205
|
getChunkModules(chunk: JsChunk): Module[]
|
|
181
206
|
getChunkEntryModules(chunk: JsChunk): Module[]
|
|
182
207
|
getNumberOfEntryModules(chunk: JsChunk): number
|
|
@@ -231,13 +256,14 @@ export declare class JsCompilation {
|
|
|
231
256
|
spliceDiagnostic(start: number, end: number, replaceWith: Array<JsRspackDiagnostic>): void
|
|
232
257
|
pushNativeDiagnostic(diagnostic: ExternalObject<'Diagnostic'>): void
|
|
233
258
|
pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
|
|
259
|
+
get errors(): Diagnostics
|
|
234
260
|
getErrors(): Array<JsRspackError>
|
|
235
261
|
getWarnings(): Array<JsRspackError>
|
|
236
262
|
getStats(): JsStats
|
|
237
|
-
getAssetPath(filename:
|
|
238
|
-
getAssetPathWithInfo(filename:
|
|
239
|
-
getPath(filename:
|
|
240
|
-
getPathWithInfo(filename:
|
|
263
|
+
getAssetPath(filename: string, data: JsPathData): string
|
|
264
|
+
getAssetPathWithInfo(filename: string, data: JsPathData): PathWithInfo
|
|
265
|
+
getPath(filename: string, data: JsPathData): string
|
|
266
|
+
getPathWithInfo(filename: string, data: JsPathData): PathWithInfo
|
|
241
267
|
addFileDependencies(deps: Array<string>): void
|
|
242
268
|
addContextDependencies(deps: Array<string>): void
|
|
243
269
|
addMissingDependencies(deps: Array<string>): void
|
|
@@ -253,7 +279,9 @@ export declare class JsCompilation {
|
|
|
253
279
|
addRuntimeModule(chunk: JsChunk, runtimeModule: JsAddingRuntimeModule): void
|
|
254
280
|
get moduleGraph(): JsModuleGraph
|
|
255
281
|
get chunkGraph(): JsChunkGraph
|
|
282
|
+
addEntry(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
|
|
256
283
|
addInclude(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
|
|
284
|
+
get codeGenerationResults(): CodeGenerationResults
|
|
257
285
|
}
|
|
258
286
|
|
|
259
287
|
export declare class JsCompiler {
|
|
@@ -377,6 +405,10 @@ export declare class RawExternalItemFnCtx {
|
|
|
377
405
|
getResolver(): JsResolver
|
|
378
406
|
}
|
|
379
407
|
|
|
408
|
+
export declare class Sources {
|
|
409
|
+
_get(sourceType: string): JsCompatSourceOwned | null
|
|
410
|
+
}
|
|
411
|
+
|
|
380
412
|
export interface BuiltinPlugin {
|
|
381
413
|
name: BuiltinPluginName
|
|
382
414
|
options: unknown
|
|
@@ -465,7 +497,8 @@ export declare enum BuiltinPluginName {
|
|
|
465
497
|
JsLoaderRspackPlugin = 'JsLoaderRspackPlugin',
|
|
466
498
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
467
499
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
468
|
-
HttpUriPlugin = 'HttpUriPlugin'
|
|
500
|
+
HttpUriPlugin = 'HttpUriPlugin',
|
|
501
|
+
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
469
502
|
}
|
|
470
503
|
|
|
471
504
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -475,6 +508,11 @@ export interface ContextInfo {
|
|
|
475
508
|
issuerLayer?: string
|
|
476
509
|
}
|
|
477
510
|
|
|
511
|
+
export interface CssChunkingPluginOptions {
|
|
512
|
+
strict?: boolean
|
|
513
|
+
exclude?: RegExp
|
|
514
|
+
}
|
|
515
|
+
|
|
478
516
|
export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'>
|
|
479
517
|
|
|
480
518
|
export interface JsAddingRuntimeModule {
|
|
@@ -836,7 +874,11 @@ export interface JsLoaderContext {
|
|
|
836
874
|
loaderIndex: number
|
|
837
875
|
loaderState: Readonly<JsLoaderState>
|
|
838
876
|
__internal__error?: JsRspackError
|
|
839
|
-
|
|
877
|
+
/**
|
|
878
|
+
* UTF-8 hint for `content`
|
|
879
|
+
* - Some(true): `content` is a `UTF-8` encoded sequence
|
|
880
|
+
*/
|
|
881
|
+
__internal__utf8Hint?: boolean
|
|
840
882
|
}
|
|
841
883
|
|
|
842
884
|
export interface JsLoaderItem {
|
|
@@ -1454,10 +1496,12 @@ export interface RawAssetGeneratorOptions {
|
|
|
1454
1496
|
publicPath?: "auto" | JsFilename
|
|
1455
1497
|
dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
|
|
1456
1498
|
importMode?: "url" | "preserve"
|
|
1499
|
+
binary?: boolean
|
|
1457
1500
|
}
|
|
1458
1501
|
|
|
1459
1502
|
export interface RawAssetInlineGeneratorOptions {
|
|
1460
1503
|
dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
|
|
1504
|
+
binary?: boolean
|
|
1461
1505
|
}
|
|
1462
1506
|
|
|
1463
1507
|
export interface RawAssetParserDataUrl {
|
|
@@ -1479,6 +1523,7 @@ export interface RawAssetResourceGeneratorOptions {
|
|
|
1479
1523
|
outputPath?: JsFilename
|
|
1480
1524
|
publicPath?: "auto" | JsFilename
|
|
1481
1525
|
importMode?: "url" | "preserve"
|
|
1526
|
+
binary?: boolean
|
|
1482
1527
|
}
|
|
1483
1528
|
|
|
1484
1529
|
export interface RawBannerPluginOptions {
|
|
@@ -1605,7 +1650,7 @@ export interface RawCopyPattern {
|
|
|
1605
1650
|
* @default false
|
|
1606
1651
|
*/
|
|
1607
1652
|
copyPermissions?: boolean
|
|
1608
|
-
transform?: { transformer: (input:
|
|
1653
|
+
transform?: { transformer: (input: Buffer, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer> } | ((input: Buffer, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer>)
|
|
1609
1654
|
}
|
|
1610
1655
|
|
|
1611
1656
|
export interface RawCopyRspackPluginOptions {
|
|
@@ -1621,6 +1666,7 @@ export interface RawCssAutoGeneratorOptions {
|
|
|
1621
1666
|
|
|
1622
1667
|
export interface RawCssAutoParserOptions {
|
|
1623
1668
|
namedExports?: boolean
|
|
1669
|
+
url?: boolean
|
|
1624
1670
|
}
|
|
1625
1671
|
|
|
1626
1672
|
export interface RawCssExtractPluginOption {
|
|
@@ -1649,10 +1695,12 @@ export interface RawCssModuleGeneratorOptions {
|
|
|
1649
1695
|
|
|
1650
1696
|
export interface RawCssModuleParserOptions {
|
|
1651
1697
|
namedExports?: boolean
|
|
1698
|
+
url?: boolean
|
|
1652
1699
|
}
|
|
1653
1700
|
|
|
1654
1701
|
export interface RawCssParserOptions {
|
|
1655
1702
|
namedExports?: boolean
|
|
1703
|
+
url?: boolean
|
|
1656
1704
|
}
|
|
1657
1705
|
|
|
1658
1706
|
export interface RawDllEntryPluginOptions {
|
|
@@ -2339,24 +2387,6 @@ export interface RawSizeLimitsPluginOptions {
|
|
|
2339
2387
|
maxEntrypointSize?: number
|
|
2340
2388
|
}
|
|
2341
2389
|
|
|
2342
|
-
export interface RawSourceMapDevToolPluginOptions {
|
|
2343
|
-
append?: (false | null) | string | Function
|
|
2344
|
-
columns?: boolean
|
|
2345
|
-
fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
2346
|
-
fileContext?: string
|
|
2347
|
-
filename?: (false | null) | string
|
|
2348
|
-
module?: boolean
|
|
2349
|
-
moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
2350
|
-
namespace?: string
|
|
2351
|
-
noSources?: boolean
|
|
2352
|
-
publicPath?: string
|
|
2353
|
-
sourceRoot?: string
|
|
2354
|
-
test?: string | RegExp | (string | RegExp)[]
|
|
2355
|
-
include?: string | RegExp | (string | RegExp)[]
|
|
2356
|
-
exclude?: string | RegExp | (string | RegExp)[]
|
|
2357
|
-
debugIds?: boolean
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
2390
|
export interface RawSplitChunkSizes {
|
|
2361
2391
|
sizes: Record<string, number>
|
|
2362
2392
|
}
|
|
@@ -2420,10 +2450,6 @@ export interface RawToOptions {
|
|
|
2420
2450
|
absoluteFilename?: string
|
|
2421
2451
|
}
|
|
2422
2452
|
|
|
2423
|
-
export interface RawTransformOptions {
|
|
2424
|
-
transformer: { transformer: (input: string, absoluteFilename: string) => string | Buffer | Promise<string> | Promise<Buffer> }
|
|
2425
|
-
}
|
|
2426
|
-
|
|
2427
2453
|
export interface RawTrustedTypes {
|
|
2428
2454
|
policyName?: string
|
|
2429
2455
|
onPolicyCreationFailure?: string
|
|
@@ -2550,6 +2576,24 @@ export interface RegisterJsTaps {
|
|
|
2550
2576
|
*/
|
|
2551
2577
|
export declare function shutdownAsyncRuntime(): void
|
|
2552
2578
|
|
|
2579
|
+
export interface SourceMapDevToolPluginOptions {
|
|
2580
|
+
append?: (false | null) | string | Function
|
|
2581
|
+
columns?: boolean
|
|
2582
|
+
fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
2583
|
+
fileContext?: string
|
|
2584
|
+
filename?: (false | null) | string
|
|
2585
|
+
module?: boolean
|
|
2586
|
+
moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
|
|
2587
|
+
namespace?: string
|
|
2588
|
+
noSources?: boolean
|
|
2589
|
+
publicPath?: string
|
|
2590
|
+
sourceRoot?: string
|
|
2591
|
+
test?: string | RegExp | (string | RegExp)[]
|
|
2592
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
2593
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
2594
|
+
debugIds?: boolean
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2553
2597
|
/**
|
|
2554
2598
|
* Start the async runtime manually.
|
|
2555
2599
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@rspack/binding-darwin-arm64": "1.3.
|
|
52
|
-
"@rspack/binding-linux-arm64-gnu": "1.3.
|
|
53
|
-
"@rspack/binding-win32-arm64-msvc": "1.3.
|
|
54
|
-
"@rspack/binding-
|
|
55
|
-
"@rspack/binding-
|
|
56
|
-
"@rspack/binding-
|
|
57
|
-
"@rspack/binding-win32-x64-msvc": "1.3.
|
|
58
|
-
"@rspack/binding-linux-x64-
|
|
59
|
-
"@rspack/binding-linux-x64-
|
|
51
|
+
"@rspack/binding-darwin-arm64": "1.3.11",
|
|
52
|
+
"@rspack/binding-linux-arm64-gnu": "1.3.11",
|
|
53
|
+
"@rspack/binding-win32-arm64-msvc": "1.3.11",
|
|
54
|
+
"@rspack/binding-darwin-x64": "1.3.11",
|
|
55
|
+
"@rspack/binding-linux-arm64-musl": "1.3.11",
|
|
56
|
+
"@rspack/binding-win32-ia32-msvc": "1.3.11",
|
|
57
|
+
"@rspack/binding-win32-x64-msvc": "1.3.11",
|
|
58
|
+
"@rspack/binding-linux-x64-gnu": "1.3.11",
|
|
59
|
+
"@rspack/binding-linux-x64-musl": "1.3.11"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build:dev": "node scripts/build.js",
|