@rspack/binding 1.1.8 → 1.2.0-alpha.0
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 +148 -141
- package/package.json +12 -12
package/binding.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class EntryOptionsDto {
|
|
|
32
32
|
get runtime(): false | string | undefined
|
|
33
33
|
set runtime(chunkLoading: boolean | string | undefined)
|
|
34
34
|
get chunkLoading(): string | undefined
|
|
35
|
-
set chunkLoading(chunkLoading: string | undefined)
|
|
35
|
+
set chunkLoading(chunkLoading: string | false | undefined)
|
|
36
36
|
get asyncChunks(): boolean | undefined
|
|
37
37
|
set asyncChunks(asyncChunks: boolean | undefined)
|
|
38
38
|
get baseUri(): string | undefined
|
|
@@ -46,6 +46,49 @@ export declare class EntryOptionsDto {
|
|
|
46
46
|
}
|
|
47
47
|
export type EntryOptionsDTO = EntryOptionsDto
|
|
48
48
|
|
|
49
|
+
export declare class JsChunk {
|
|
50
|
+
get name(): string | undefined
|
|
51
|
+
get id(): string | undefined
|
|
52
|
+
get ids(): Array<string>
|
|
53
|
+
get idNameHints(): Array<string>
|
|
54
|
+
get filenameTemplate(): string | undefined
|
|
55
|
+
get cssFilenameTemplate(): string | undefined
|
|
56
|
+
get files(): Array<string>
|
|
57
|
+
get runtime(): Array<string>
|
|
58
|
+
get hash(): string | undefined
|
|
59
|
+
get contentHash(): Record<string, string>
|
|
60
|
+
get renderedHash(): string | undefined
|
|
61
|
+
get chunkReason(): string | undefined
|
|
62
|
+
get auxiliaryFiles(): Array<string>
|
|
63
|
+
isOnlyInitial(): boolean
|
|
64
|
+
canBeInitial(): boolean
|
|
65
|
+
hasRuntime(): boolean
|
|
66
|
+
getAllAsyncChunks(): JsChunk[]
|
|
67
|
+
getAllInitialChunks(): JsChunk[]
|
|
68
|
+
getAllReferencedChunks(): JsChunk[]
|
|
69
|
+
groups(): JsChunkGroup[]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare class JsChunkGraph {
|
|
73
|
+
getChunkModules(chunk: JsChunk): JsModule[]
|
|
74
|
+
getChunkEntryModules(chunk: JsChunk): JsModule[]
|
|
75
|
+
getChunkEntryDependentChunksIterable(chunk: JsChunk): JsChunk[]
|
|
76
|
+
getChunkModulesIterableBySourceType(chunk: JsChunk, sourceType: string): JsModule[]
|
|
77
|
+
getModuleChunks(module: JsModule): JsChunk[]
|
|
78
|
+
getModuleId(jsModule: JsModule): string | null
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare class JsChunkGroup {
|
|
82
|
+
get chunks(): JsChunk[]
|
|
83
|
+
get index(): number | undefined
|
|
84
|
+
get name(): string | undefined
|
|
85
|
+
get origins(): Array<JsChunkGroupOrigin>
|
|
86
|
+
isInitial(): boolean
|
|
87
|
+
getParents(): JsChunkGroup[]
|
|
88
|
+
getRuntimeChunk(): JsChunk
|
|
89
|
+
getFiles(): Array<string>
|
|
90
|
+
}
|
|
91
|
+
|
|
49
92
|
export declare class JsCompilation {
|
|
50
93
|
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSourceOwned) => JsCompatSourceOwned), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
|
|
51
94
|
getAssets(): Readonly<JsAsset>[]
|
|
@@ -54,11 +97,11 @@ export declare class JsCompilation {
|
|
|
54
97
|
get modules(): Array<JsModule>
|
|
55
98
|
get builtModules(): Array<JsModule>
|
|
56
99
|
getOptimizationBailout(): Array<JsStatsOptimizationBailout>
|
|
57
|
-
getChunks():
|
|
100
|
+
getChunks(): JsChunk[]
|
|
58
101
|
getNamedChunkKeys(): Array<string>
|
|
59
|
-
getNamedChunk(name: string): JsChunk
|
|
102
|
+
getNamedChunk(name: string): JsChunk
|
|
60
103
|
getNamedChunkGroupKeys(): Array<string>
|
|
61
|
-
getNamedChunkGroup(name: string): JsChunkGroup
|
|
104
|
+
getNamedChunkGroup(name: string): JsChunkGroup
|
|
62
105
|
setAssetSource(name: string, source: JsCompatSource): void
|
|
63
106
|
deleteAssetSource(name: string): void
|
|
64
107
|
getAssetFilenames(): Array<string>
|
|
@@ -68,7 +111,7 @@ export declare class JsCompilation {
|
|
|
68
111
|
deleteAsset(filename: string): void
|
|
69
112
|
renameAsset(filename: string, newName: string): void
|
|
70
113
|
get entrypoints(): Record<string, JsChunkGroup>
|
|
71
|
-
get chunkGroups():
|
|
114
|
+
get chunkGroups(): JsChunkGroup[]
|
|
72
115
|
get hash(): string | null
|
|
73
116
|
dependencies(): JsDependencies
|
|
74
117
|
pushDiagnostic(diagnostic: JsRspackDiagnostic): void
|
|
@@ -94,8 +137,10 @@ export declare class JsCompilation {
|
|
|
94
137
|
rebuildModule(moduleIdentifiers: Array<string>, f: any): void
|
|
95
138
|
importModule(request: string, layer: string | undefined | null, publicPath: JsFilename | undefined | null, baseUri: string | undefined | null, originalModule: string | undefined | null, originalModuleContext: string | undefined | null, callback: any): void
|
|
96
139
|
get entries(): JsEntries
|
|
97
|
-
addRuntimeModule(
|
|
140
|
+
addRuntimeModule(chunk: JsChunk, runtimeModule: JsAddingRuntimeModule): void
|
|
98
141
|
get moduleGraph(): JsModuleGraph
|
|
142
|
+
get chunkGraph(): JsChunkGraph
|
|
143
|
+
addInclude(args: [string, RawDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, JsModule][]) => void): void
|
|
99
144
|
}
|
|
100
145
|
|
|
101
146
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -162,6 +207,13 @@ export declare class JsEntries {
|
|
|
162
207
|
values(): Array<EntryDataDto>
|
|
163
208
|
}
|
|
164
209
|
|
|
210
|
+
export declare class JsExportsInfo {
|
|
211
|
+
isUsed(runtime: string | string[] | undefined): boolean
|
|
212
|
+
isModuleUsed(runtime: string | string[] | undefined): boolean
|
|
213
|
+
setUsedInUnknownWay(runtime: string | string[] | undefined): boolean
|
|
214
|
+
getUsed(name: string | string[], runtime: string | string[] | undefined): 0 | 1 | 2 | 3 | 4
|
|
215
|
+
}
|
|
216
|
+
|
|
165
217
|
export declare class JsModule {
|
|
166
218
|
get context(): string | undefined
|
|
167
219
|
get originalSource(): JsCompatSource | undefined
|
|
@@ -184,8 +236,18 @@ export declare class JsModule {
|
|
|
184
236
|
|
|
185
237
|
export declare class JsModuleGraph {
|
|
186
238
|
getModule(jsDependency: JsDependency): JsModule | null
|
|
239
|
+
getResolvedModule(jsDependency: JsDependency): JsModule | null
|
|
187
240
|
getUsedExports(jsModule: JsModule, jsRuntime: string | Array<string>): boolean | Array<string> | null
|
|
188
241
|
getIssuer(module: JsModule): JsModule | null
|
|
242
|
+
getExportsInfo(module: JsModule): JsExportsInfo
|
|
243
|
+
getConnection(dependency: JsDependency): JsModuleGraphConnection | null
|
|
244
|
+
getOutgoingConnections(module: JsModule): JsModuleGraphConnection[]
|
|
245
|
+
getIncomingConnections(module: JsModule): JsModuleGraphConnection[]
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export declare class JsModuleGraphConnection {
|
|
249
|
+
get dependency(): JsDependency
|
|
250
|
+
get module(): JsModule | null
|
|
189
251
|
}
|
|
190
252
|
|
|
191
253
|
export declare class JsResolver {
|
|
@@ -211,7 +273,7 @@ export declare class RawExternalItemFnCtx {
|
|
|
211
273
|
}
|
|
212
274
|
|
|
213
275
|
export declare class Rspack {
|
|
214
|
-
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS, resolverFactoryReference: JsResolverFactory)
|
|
276
|
+
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory)
|
|
215
277
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
216
278
|
/** Build with the given option passed to the constructor */
|
|
217
279
|
build(callback: (err: null | Error) => void): void
|
|
@@ -219,30 +281,6 @@ export declare class Rspack {
|
|
|
219
281
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
220
282
|
}
|
|
221
283
|
|
|
222
|
-
export declare function __chunk_graph_inner_get_chunk_entry_dependent_chunks_iterable(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
223
|
-
|
|
224
|
-
export declare function __chunk_graph_inner_get_chunk_entry_modules(jsChunkUkey: number, jsCompilation: JsCompilation): JsModule[]
|
|
225
|
-
|
|
226
|
-
export declare function __chunk_graph_inner_get_chunk_modules(jsChunkUkey: number, jsCompilation: JsCompilation): JsModule[]
|
|
227
|
-
|
|
228
|
-
export declare function __chunk_graph_inner_get_chunk_modules_iterable_by_source_type(jsChunkUkey: number, sourceType: string, jsCompilation: JsCompilation): JsModule[]
|
|
229
|
-
|
|
230
|
-
export declare function __chunk_group_inner_get_chunk_group(ukey: number, jsCompilation: JsCompilation): JsChunkGroup
|
|
231
|
-
|
|
232
|
-
export declare function __chunk_inner_can_be_initial(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
233
|
-
|
|
234
|
-
export declare function __chunk_inner_get_all_async_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
235
|
-
|
|
236
|
-
export declare function __chunk_inner_get_all_initial_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
237
|
-
|
|
238
|
-
export declare function __chunk_inner_get_all_referenced_chunks(jsChunkUkey: number, jsCompilation: JsCompilation): Array<JsChunk>
|
|
239
|
-
|
|
240
|
-
export declare function __chunk_inner_has_runtime(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
241
|
-
|
|
242
|
-
export declare function __chunk_inner_is_only_initial(jsChunkUkey: number, jsCompilation: JsCompilation): boolean
|
|
243
|
-
|
|
244
|
-
export declare function __entrypoint_inner_get_runtime_chunk(ukey: number, jsCompilation: JsCompilation): JsChunk
|
|
245
|
-
|
|
246
284
|
export interface BuiltinPlugin {
|
|
247
285
|
name: BuiltinPluginName
|
|
248
286
|
options: unknown
|
|
@@ -287,6 +325,7 @@ export declare enum BuiltinPluginName {
|
|
|
287
325
|
NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
|
|
288
326
|
NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
|
|
289
327
|
DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin',
|
|
328
|
+
OccurrenceChunkIdsPlugin = 'OccurrenceChunkIdsPlugin',
|
|
290
329
|
RealContentHashPlugin = 'RealContentHashPlugin',
|
|
291
330
|
RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin',
|
|
292
331
|
EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin',
|
|
@@ -332,6 +371,7 @@ export declare function cleanupGlobalTrace(): void
|
|
|
332
371
|
|
|
333
372
|
export interface ContextInfo {
|
|
334
373
|
issuer: string
|
|
374
|
+
issuerLayer?: string
|
|
335
375
|
}
|
|
336
376
|
|
|
337
377
|
export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'>
|
|
@@ -444,6 +484,12 @@ export interface JsAssetInfoRelated {
|
|
|
444
484
|
sourceMap?: string
|
|
445
485
|
}
|
|
446
486
|
|
|
487
|
+
export interface JsBannerContentFnCtx {
|
|
488
|
+
hash: string
|
|
489
|
+
chunk: JsChunk
|
|
490
|
+
filename: string
|
|
491
|
+
}
|
|
492
|
+
|
|
447
493
|
export interface JsBeforeAssetTagGenerationData {
|
|
448
494
|
assets: JsHtmlPluginAssets
|
|
449
495
|
outputName: string
|
|
@@ -485,44 +531,22 @@ export interface JsCacheGroupTestCtx {
|
|
|
485
531
|
module: JsModule
|
|
486
532
|
}
|
|
487
533
|
|
|
488
|
-
export interface JsChunk {
|
|
489
|
-
__inner_ukey: number
|
|
490
|
-
__inner_groups: Array<number>
|
|
491
|
-
name?: string
|
|
492
|
-
id?: string
|
|
493
|
-
ids: Array<string>
|
|
494
|
-
idNameHints: Array<string>
|
|
495
|
-
filenameTemplate?: string
|
|
496
|
-
cssFilenameTemplate?: string
|
|
497
|
-
files: Array<string>
|
|
498
|
-
runtime: Array<string>
|
|
499
|
-
hash?: string
|
|
500
|
-
contentHash: Record<string, string>
|
|
501
|
-
renderedHash?: string
|
|
502
|
-
chunkReason?: string
|
|
503
|
-
auxiliaryFiles: Array<string>
|
|
504
|
-
}
|
|
505
|
-
|
|
506
534
|
export interface JsChunkAssetArgs {
|
|
507
535
|
chunk: JsChunk
|
|
508
536
|
filename: string
|
|
509
537
|
}
|
|
510
538
|
|
|
511
|
-
export interface JsChunkGroup {
|
|
512
|
-
__inner_parents: Array<number>
|
|
513
|
-
__inner_ukey: number
|
|
514
|
-
chunks: Array<JsChunk>
|
|
515
|
-
index?: number
|
|
516
|
-
name?: string
|
|
517
|
-
isInitial: boolean
|
|
518
|
-
origins: Array<JsChunkGroupOrigin>
|
|
519
|
-
}
|
|
520
|
-
|
|
521
539
|
export interface JsChunkGroupOrigin {
|
|
522
540
|
module?: JsModule | undefined
|
|
523
541
|
request?: string
|
|
524
542
|
}
|
|
525
543
|
|
|
544
|
+
export interface JsChunkOptionNameCtx {
|
|
545
|
+
module: JsModule
|
|
546
|
+
chunks: JsChunk[]
|
|
547
|
+
cacheGroupKey: string
|
|
548
|
+
}
|
|
549
|
+
|
|
526
550
|
/**
|
|
527
551
|
* File clean options
|
|
528
552
|
*
|
|
@@ -598,7 +622,7 @@ export interface JsEntryData {
|
|
|
598
622
|
export interface JsEntryOptions {
|
|
599
623
|
name?: string
|
|
600
624
|
runtime?: false | string
|
|
601
|
-
chunkLoading?: string
|
|
625
|
+
chunkLoading?: false | string
|
|
602
626
|
asyncChunks?: boolean
|
|
603
627
|
publicPath?: "auto" | JsFilename
|
|
604
628
|
baseUri?: string
|
|
@@ -629,6 +653,7 @@ export interface JsExecuteModuleResult {
|
|
|
629
653
|
cacheable: boolean
|
|
630
654
|
assets: Array<string>
|
|
631
655
|
id: number
|
|
656
|
+
error?: string
|
|
632
657
|
}
|
|
633
658
|
|
|
634
659
|
export interface JsFactorizeArgs {
|
|
@@ -672,7 +697,7 @@ export interface JsLibraryAuxiliaryComment {
|
|
|
672
697
|
export interface JsLibraryCustomUmdObject {
|
|
673
698
|
amd?: string
|
|
674
699
|
commonjs?: string
|
|
675
|
-
root?: Array<string>
|
|
700
|
+
root?: Array<string> | string
|
|
676
701
|
}
|
|
677
702
|
|
|
678
703
|
export interface JsLibraryName {
|
|
@@ -683,11 +708,11 @@ export interface JsLibraryName {
|
|
|
683
708
|
}
|
|
684
709
|
|
|
685
710
|
export interface JsLibraryOptions {
|
|
686
|
-
name?:
|
|
687
|
-
export?: Array<string>
|
|
688
|
-
|
|
711
|
+
name?: string | Array<string> | JsLibraryCustomUmdObject
|
|
712
|
+
export?: Array<string> | string
|
|
713
|
+
type: string
|
|
689
714
|
umdNamedDefine?: boolean
|
|
690
|
-
auxiliaryComment?: JsLibraryAuxiliaryComment
|
|
715
|
+
auxiliaryComment?: string | JsLibraryAuxiliaryComment
|
|
691
716
|
amdContainer?: string
|
|
692
717
|
}
|
|
693
718
|
|
|
@@ -1081,6 +1106,7 @@ export interface JsTap {
|
|
|
1081
1106
|
export interface NodeFsStats {
|
|
1082
1107
|
isFile: boolean
|
|
1083
1108
|
isDirectory: boolean
|
|
1109
|
+
isSymlink: boolean
|
|
1084
1110
|
atimeMs: number
|
|
1085
1111
|
mtimeMs: number
|
|
1086
1112
|
ctimeMs: number
|
|
@@ -1098,9 +1124,9 @@ export interface RawAliasOptionItem {
|
|
|
1098
1124
|
redirect: Array<string | false>
|
|
1099
1125
|
}
|
|
1100
1126
|
|
|
1101
|
-
export interface
|
|
1127
|
+
export interface RawAssetGeneratorDataUrlFnCtx {
|
|
1102
1128
|
filename: string
|
|
1103
|
-
|
|
1129
|
+
module: JsModule
|
|
1104
1130
|
}
|
|
1105
1131
|
|
|
1106
1132
|
export interface RawAssetGeneratorDataUrlOptions {
|
|
@@ -1111,12 +1137,13 @@ export interface RawAssetGeneratorDataUrlOptions {
|
|
|
1111
1137
|
export interface RawAssetGeneratorOptions {
|
|
1112
1138
|
emit?: boolean
|
|
1113
1139
|
filename?: JsFilename
|
|
1140
|
+
outputPath?: JsFilename
|
|
1114
1141
|
publicPath?: "auto" | JsFilename
|
|
1115
|
-
dataUrl?: RawAssetGeneratorDataUrlOptions | ((
|
|
1142
|
+
dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
|
|
1116
1143
|
}
|
|
1117
1144
|
|
|
1118
1145
|
export interface RawAssetInlineGeneratorOptions {
|
|
1119
|
-
dataUrl?: RawAssetGeneratorDataUrlOptions | ((
|
|
1146
|
+
dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
|
|
1120
1147
|
}
|
|
1121
1148
|
|
|
1122
1149
|
export interface RawAssetParserDataUrl {
|
|
@@ -1135,15 +1162,10 @@ export interface RawAssetParserOptions {
|
|
|
1135
1162
|
export interface RawAssetResourceGeneratorOptions {
|
|
1136
1163
|
emit?: boolean
|
|
1137
1164
|
filename?: JsFilename
|
|
1165
|
+
outputPath?: JsFilename
|
|
1138
1166
|
publicPath?: "auto" | JsFilename
|
|
1139
1167
|
}
|
|
1140
1168
|
|
|
1141
|
-
export interface RawBannerContentFnCtx {
|
|
1142
|
-
hash: string
|
|
1143
|
-
chunk: JsChunk
|
|
1144
|
-
filename: string
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1169
|
export interface RawBannerPluginOptions {
|
|
1148
1170
|
banner: string | ((...args: any[]) => any)
|
|
1149
1171
|
entryOnly?: boolean
|
|
@@ -1165,7 +1187,7 @@ export interface RawCacheGroupOptions {
|
|
|
1165
1187
|
key: string
|
|
1166
1188
|
priority?: number
|
|
1167
1189
|
test?: RegExp | string | Function
|
|
1168
|
-
filename?:
|
|
1190
|
+
filename?: JsFilename
|
|
1169
1191
|
idHint?: string
|
|
1170
1192
|
/** What kind of chunks should be selected. */
|
|
1171
1193
|
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
@@ -1187,20 +1209,6 @@ export interface RawCacheGroupOptions {
|
|
|
1187
1209
|
|
|
1188
1210
|
export interface RawCacheOptions {
|
|
1189
1211
|
type: string
|
|
1190
|
-
maxGenerations: number
|
|
1191
|
-
maxAge: number
|
|
1192
|
-
profile: boolean
|
|
1193
|
-
buildDependencies: Array<string>
|
|
1194
|
-
cacheDirectory: string
|
|
1195
|
-
cacheLocation: string
|
|
1196
|
-
name: string
|
|
1197
|
-
version: string
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
export interface RawChunkOptionNameCtx {
|
|
1201
|
-
module: JsModule
|
|
1202
|
-
chunks: Array<JsChunk>
|
|
1203
|
-
cacheGroupKey: string
|
|
1204
1212
|
}
|
|
1205
1213
|
|
|
1206
1214
|
export interface RawConsumeOptions {
|
|
@@ -1269,12 +1277,6 @@ export interface RawCopyRspackPluginOptions {
|
|
|
1269
1277
|
patterns: Array<RawCopyPattern>
|
|
1270
1278
|
}
|
|
1271
1279
|
|
|
1272
|
-
export interface RawCrossOriginLoading {
|
|
1273
|
-
type: "bool" | "string"
|
|
1274
|
-
stringPayload?: string
|
|
1275
|
-
boolPayload?: boolean
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
1280
|
export interface RawCssAutoGeneratorOptions {
|
|
1279
1281
|
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
|
|
1280
1282
|
exportsOnly?: boolean
|
|
@@ -1317,6 +1319,10 @@ export interface RawCssParserOptions {
|
|
|
1317
1319
|
namedExports?: boolean
|
|
1318
1320
|
}
|
|
1319
1321
|
|
|
1322
|
+
export interface RawDependency {
|
|
1323
|
+
request: string
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1320
1326
|
export interface RawDllEntryPluginOptions {
|
|
1321
1327
|
context: string
|
|
1322
1328
|
entries: Array<string>
|
|
@@ -1372,22 +1378,19 @@ export interface RawEvalDevToolModulePluginOptions {
|
|
|
1372
1378
|
sourceUrlComment?: string
|
|
1373
1379
|
}
|
|
1374
1380
|
|
|
1375
|
-
export interface RawExperimentCacheOptionsCommon {
|
|
1376
|
-
type: "disable"|"memory"
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
1381
|
export interface RawExperimentCacheOptionsPersistent {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1382
|
+
buildDependencies?: Array<string>
|
|
1383
|
+
version?: string
|
|
1384
|
+
snapshot?: RawExperimentSnapshotOptions
|
|
1385
|
+
storage?: RawStorageOptions
|
|
1383
1386
|
}
|
|
1384
1387
|
|
|
1385
1388
|
export interface RawExperiments {
|
|
1386
1389
|
layers: boolean
|
|
1387
1390
|
topLevelAwait: boolean
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
+
incremental?: false | { [key: string]: boolean }
|
|
1392
|
+
rspackFuture?: RawRspackFuture
|
|
1393
|
+
cache: boolean | { type: "persistent" } & RawExperimentCacheOptionsPersistent | { type: "memory" }
|
|
1391
1394
|
}
|
|
1392
1395
|
|
|
1393
1396
|
export interface RawExperimentSnapshotOptions {
|
|
@@ -1511,6 +1514,7 @@ export interface RawIncremental {
|
|
|
1511
1514
|
inferAsyncModules: boolean
|
|
1512
1515
|
providedExports: boolean
|
|
1513
1516
|
dependenciesDiagnostics: boolean
|
|
1517
|
+
sideEffects: boolean
|
|
1514
1518
|
buildChunkGraph: boolean
|
|
1515
1519
|
moduleIds: boolean
|
|
1516
1520
|
chunkIds: boolean
|
|
@@ -1572,6 +1576,10 @@ export interface RawJavascriptParserOptions {
|
|
|
1572
1576
|
importDynamic?: boolean
|
|
1573
1577
|
}
|
|
1574
1578
|
|
|
1579
|
+
export interface RawJsonParserOptions {
|
|
1580
|
+
exportsDepth?: number
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1575
1583
|
export interface RawLazyCompilationOption {
|
|
1576
1584
|
module: ((err: Error | null, arg: RawModuleArg) => RawModuleInfo)
|
|
1577
1585
|
test?: RawLazyCompilationTest
|
|
@@ -1728,28 +1736,30 @@ export interface RawNonStandard {
|
|
|
1728
1736
|
deepSelectorCombinator: boolean
|
|
1729
1737
|
}
|
|
1730
1738
|
|
|
1739
|
+
export interface RawOccurrenceChunkIdsPluginOptions {
|
|
1740
|
+
prioritiseInitial?: boolean
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1731
1743
|
export interface RawOptimizationOptions {
|
|
1732
1744
|
removeAvailableModules: boolean
|
|
1733
|
-
sideEffects: string
|
|
1734
|
-
usedExports: string
|
|
1745
|
+
sideEffects: boolean | string
|
|
1746
|
+
usedExports: boolean | string
|
|
1735
1747
|
providedExports: boolean
|
|
1736
1748
|
innerGraph: boolean
|
|
1737
|
-
mangleExports: string
|
|
1749
|
+
mangleExports: boolean | string
|
|
1738
1750
|
concatenateModules: boolean
|
|
1751
|
+
avoidEntryIife: boolean
|
|
1739
1752
|
}
|
|
1740
1753
|
|
|
1741
1754
|
export interface RawOptions {
|
|
1742
1755
|
mode?: undefined | 'production' | 'development' | 'none'
|
|
1743
|
-
target: Array<string>
|
|
1744
1756
|
context: string
|
|
1745
1757
|
output: RawOutputOptions
|
|
1746
1758
|
resolve: RawResolveOptions
|
|
1747
1759
|
resolveLoader: RawResolveOptions
|
|
1748
1760
|
module: RawModuleOptions
|
|
1749
|
-
devtool: string
|
|
1750
1761
|
optimization: RawOptimizationOptions
|
|
1751
1762
|
stats: RawStatsOptions
|
|
1752
|
-
snapshot: RawSnapshotOptions
|
|
1753
1763
|
cache: RawCacheOptions
|
|
1754
1764
|
experiments: RawExperiments
|
|
1755
1765
|
node?: RawNodeOption
|
|
@@ -1765,12 +1775,12 @@ export interface RawOutputOptions {
|
|
|
1765
1775
|
clean: boolean | JsCleanOptions
|
|
1766
1776
|
publicPath: "auto" | JsFilename
|
|
1767
1777
|
assetModuleFilename: JsFilename
|
|
1768
|
-
wasmLoading: string
|
|
1778
|
+
wasmLoading: string | false
|
|
1769
1779
|
enabledWasmLoadingTypes: Array<string>
|
|
1770
1780
|
webassemblyModuleFilename: string
|
|
1771
1781
|
filename: JsFilename
|
|
1772
1782
|
chunkFilename: JsFilename
|
|
1773
|
-
crossOriginLoading:
|
|
1783
|
+
crossOriginLoading: string | false
|
|
1774
1784
|
cssFilename: JsFilename
|
|
1775
1785
|
cssChunkFilename: JsFilename
|
|
1776
1786
|
hotUpdateMainFilename: string
|
|
@@ -1786,7 +1796,7 @@ export interface RawOutputOptions {
|
|
|
1786
1796
|
importMetaName: string
|
|
1787
1797
|
iife: boolean
|
|
1788
1798
|
module: boolean
|
|
1789
|
-
chunkLoading: string
|
|
1799
|
+
chunkLoading: string | false
|
|
1790
1800
|
chunkLoadTimeout: number
|
|
1791
1801
|
charset: boolean
|
|
1792
1802
|
enabledChunkLoadingTypes?: Array<string>
|
|
@@ -1797,21 +1807,22 @@ export interface RawOutputOptions {
|
|
|
1797
1807
|
hashDigestLength: number
|
|
1798
1808
|
hashSalt?: string
|
|
1799
1809
|
asyncChunks: boolean
|
|
1800
|
-
workerChunkLoading: string
|
|
1801
|
-
workerWasmLoading: string
|
|
1810
|
+
workerChunkLoading: string | false
|
|
1811
|
+
workerWasmLoading: string | false
|
|
1802
1812
|
workerPublicPath: string
|
|
1803
|
-
scriptType: "module" | "text/javascript" |
|
|
1813
|
+
scriptType: "module" | "text/javascript" | false
|
|
1804
1814
|
environment: RawEnvironment
|
|
1805
1815
|
compareBeforeEmit: boolean
|
|
1806
1816
|
}
|
|
1807
1817
|
|
|
1808
1818
|
export interface RawParserOptions {
|
|
1809
|
-
type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm"
|
|
1819
|
+
type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json"
|
|
1810
1820
|
asset?: RawAssetParserOptions
|
|
1811
1821
|
css?: RawCssParserOptions
|
|
1812
1822
|
cssAuto?: RawCssAutoParserOptions
|
|
1813
1823
|
cssModule?: RawCssModuleParserOptions
|
|
1814
1824
|
javascript?: RawJavascriptParserOptions
|
|
1825
|
+
json?: RawJsonParserOptions
|
|
1815
1826
|
}
|
|
1816
1827
|
|
|
1817
1828
|
export interface RawPathData {
|
|
@@ -1948,10 +1959,6 @@ export interface RawSizeLimitsPluginOptions {
|
|
|
1948
1959
|
maxEntrypointSize?: number
|
|
1949
1960
|
}
|
|
1950
1961
|
|
|
1951
|
-
export interface RawSnapshotOptions {
|
|
1952
|
-
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
1962
|
export interface RawSourceMapDevToolPluginOptions {
|
|
1956
1963
|
append?: (false | null) | string | Function
|
|
1957
1964
|
columns?: boolean
|
|
@@ -2036,7 +2043,7 @@ export interface RawTrustedTypes {
|
|
|
2036
2043
|
* Author Donny/강동윤
|
|
2037
2044
|
* Copyright (c)
|
|
2038
2045
|
*/
|
|
2039
|
-
export declare function registerGlobalTrace(filter: string, layer: "chrome" | "logger"
|
|
2046
|
+
export declare function registerGlobalTrace(filter: string, layer: "chrome" | "logger", output: string): void
|
|
2040
2047
|
|
|
2041
2048
|
export declare enum RegisterJsTapKind {
|
|
2042
2049
|
CompilerThisCompilation = 0,
|
|
@@ -2127,21 +2134,21 @@ export interface RegisterJsTaps {
|
|
|
2127
2134
|
}
|
|
2128
2135
|
|
|
2129
2136
|
export interface ThreadsafeNodeFS {
|
|
2130
|
-
writeFile: (name: string, content: Buffer) => Promise<void>
|
|
2131
|
-
removeFile: (name: string) => Promise<void>
|
|
2132
|
-
mkdir: (name: string) => Promise<void>
|
|
2133
|
-
mkdirp: (name: string) => Promise<string | void>
|
|
2134
|
-
removeDirAll: (name: string) => Promise<string | void>
|
|
2135
|
-
readDir: (name: string) => Promise<string[] | void>
|
|
2136
|
-
readFile: (name: string) => Promise<Buffer | string | void>
|
|
2137
|
-
stat: (name: string) => Promise<NodeFsStats | void>
|
|
2138
|
-
lstat: (name: string) => Promise<NodeFsStats | void>
|
|
2139
|
-
open: (name: string, flags: string) => Promise<number | void>
|
|
2140
|
-
rename: (from: string, to: string) => Promise<void>
|
|
2141
|
-
close: (fd: number) => Promise<void>
|
|
2142
|
-
write: (fd: number, content: Buffer, position: number) => Promise<number | void>
|
|
2143
|
-
writeAll: (fd: number, content: Buffer) => Promise<number | void>
|
|
2144
|
-
read: (fd: number, length: number, position: number) => Promise<Buffer | void>
|
|
2145
|
-
readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void>
|
|
2146
|
-
readToEnd: (fd: number, position: number) => Promise<Buffer | void>
|
|
2137
|
+
writeFile: (name: string, content: Buffer) => Promise<void>
|
|
2138
|
+
removeFile: (name: string) => Promise<void>
|
|
2139
|
+
mkdir: (name: string) => Promise<void>
|
|
2140
|
+
mkdirp: (name: string) => Promise<string | void>
|
|
2141
|
+
removeDirAll: (name: string) => Promise<string | void>
|
|
2142
|
+
readDir: (name: string) => Promise<string[] | void>
|
|
2143
|
+
readFile: (name: string) => Promise<Buffer | string | void>
|
|
2144
|
+
stat: (name: string) => Promise<NodeFsStats | void>
|
|
2145
|
+
lstat: (name: string) => Promise<NodeFsStats | void>
|
|
2146
|
+
open: (name: string, flags: string) => Promise<number | void>
|
|
2147
|
+
rename: (from: string, to: string) => Promise<void>
|
|
2148
|
+
close: (fd: number) => Promise<void>
|
|
2149
|
+
write: (fd: number, content: Buffer, position: number) => Promise<number | void>
|
|
2150
|
+
writeAll: (fd: number, content: Buffer) => Promise<number | void>
|
|
2151
|
+
read: (fd: number, length: number, position: number) => Promise<Buffer | void>
|
|
2152
|
+
readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void>
|
|
2153
|
+
readToEnd: (fd: number, position: number) => Promise<Buffer | void>
|
|
2147
2154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -17,22 +17,22 @@
|
|
|
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
|
-
"typescript": "^5.
|
|
20
|
+
"@napi-rs/cli": "3.0.0-alpha.65",
|
|
21
|
+
"typescript": "^5.7.2"
|
|
22
22
|
},
|
|
23
23
|
"napi": {
|
|
24
24
|
"binaryName": "rspack"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@rspack/binding-darwin-arm64": "1.
|
|
28
|
-
"@rspack/binding-win32-arm64-msvc": "1.
|
|
29
|
-
"@rspack/binding-linux-arm64-gnu": "1.
|
|
30
|
-
"@rspack/binding-linux-arm64-musl": "1.
|
|
31
|
-
"@rspack/binding-win32-ia32-msvc": "1.
|
|
32
|
-
"@rspack/binding-
|
|
33
|
-
"@rspack/binding-
|
|
34
|
-
"@rspack/binding-linux-x64-gnu": "1.
|
|
35
|
-
"@rspack/binding-linux-x64-musl": "1.
|
|
27
|
+
"@rspack/binding-darwin-arm64": "1.2.0-alpha.0",
|
|
28
|
+
"@rspack/binding-win32-arm64-msvc": "1.2.0-alpha.0",
|
|
29
|
+
"@rspack/binding-linux-arm64-gnu": "1.2.0-alpha.0",
|
|
30
|
+
"@rspack/binding-linux-arm64-musl": "1.2.0-alpha.0",
|
|
31
|
+
"@rspack/binding-win32-ia32-msvc": "1.2.0-alpha.0",
|
|
32
|
+
"@rspack/binding-darwin-x64": "1.2.0-alpha.0",
|
|
33
|
+
"@rspack/binding-win32-x64-msvc": "1.2.0-alpha.0",
|
|
34
|
+
"@rspack/binding-linux-x64-gnu": "1.2.0-alpha.0",
|
|
35
|
+
"@rspack/binding-linux-x64-musl": "1.2.0-alpha.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build:debug": "node scripts/build.js",
|