@rspack/binding 0.3.2 → 0.3.3-canary-0f5a67f-20230913040612
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 +98 -94
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -110,24 +110,30 @@ export interface BeforeResolveData {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export interface BuiltinPlugin {
|
|
113
|
-
|
|
113
|
+
name: BuiltinPluginName
|
|
114
114
|
options: unknown
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
export const enum
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
117
|
+
export const enum BuiltinPluginName {
|
|
118
|
+
DefinePlugin = 'DefinePlugin',
|
|
119
|
+
ProvidePlugin = 'ProvidePlugin',
|
|
120
|
+
BannerPlugin = 'BannerPlugin',
|
|
121
|
+
ProgressPlugin = 'ProgressPlugin',
|
|
122
|
+
EntryPlugin = 'EntryPlugin',
|
|
123
|
+
ExternalsPlugin = 'ExternalsPlugin',
|
|
124
|
+
NodeTargetPlugin = 'NodeTargetPlugin',
|
|
125
|
+
ElectronTargetPlugin = 'ElectronTargetPlugin',
|
|
126
|
+
EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin',
|
|
127
|
+
EnableLibraryPlugin = 'EnableLibraryPlugin',
|
|
128
|
+
EnableWasmLoadingPlugin = 'EnableWasmLoadingPlugin',
|
|
129
|
+
CommonJsChunkFormatPlugin = 'CommonJsChunkFormatPlugin',
|
|
130
|
+
ArrayPushCallbackChunkFormatPlugin = 'ArrayPushCallbackChunkFormatPlugin',
|
|
131
|
+
ModuleChunkFormatPlugin = 'ModuleChunkFormatPlugin',
|
|
132
|
+
HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
|
|
133
|
+
CopyRspackPlugin = 'CopyRspackPlugin',
|
|
134
|
+
HtmlRspackPlugin = 'HtmlRspackPlugin',
|
|
135
|
+
SwcJsMinimizerRspackPlugin = 'SwcJsMinimizerRspackPlugin',
|
|
136
|
+
SwcCssMinimizerRspackPlugin = 'SwcCssMinimizerRspackPlugin'
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
export function cleanupGlobalTrace(): void
|
|
@@ -188,6 +194,7 @@ export interface JsAssetInfoRelated {
|
|
|
188
194
|
}
|
|
189
195
|
|
|
190
196
|
export interface JsChunk {
|
|
197
|
+
name?: string
|
|
191
198
|
files: Array<string>
|
|
192
199
|
}
|
|
193
200
|
|
|
@@ -233,6 +240,7 @@ export interface JsHooks {
|
|
|
233
240
|
afterEmit: (...args: any[]) => any
|
|
234
241
|
make: (...args: any[]) => any
|
|
235
242
|
optimizeModules: (...args: any[]) => any
|
|
243
|
+
optimizeTree: (...args: any[]) => any
|
|
236
244
|
optimizeChunkModule: (...args: any[]) => any
|
|
237
245
|
beforeCompile: (...args: any[]) => any
|
|
238
246
|
afterCompile: (...args: any[]) => any
|
|
@@ -432,13 +440,6 @@ export interface JsStatsWarning {
|
|
|
432
440
|
formatted: string
|
|
433
441
|
}
|
|
434
442
|
|
|
435
|
-
export interface NodeFS {
|
|
436
|
-
writeFile: (...args: any[]) => any
|
|
437
|
-
removeFile: (...args: any[]) => any
|
|
438
|
-
mkdir: (...args: any[]) => any
|
|
439
|
-
mkdirp: (...args: any[]) => any
|
|
440
|
-
}
|
|
441
|
-
|
|
442
443
|
export interface PathData {
|
|
443
444
|
filename?: string
|
|
444
445
|
hash?: string
|
|
@@ -491,27 +492,39 @@ export interface RawAssetResourceGeneratorOptions {
|
|
|
491
492
|
publicPath?: string
|
|
492
493
|
}
|
|
493
494
|
|
|
494
|
-
export interface
|
|
495
|
+
export interface RawBannerContent {
|
|
496
|
+
type: "string" | "function"
|
|
497
|
+
stringPayload?: string
|
|
498
|
+
fnPayload?: (...args: any[]) => any
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface RawBannerContentFnCtx {
|
|
502
|
+
hash: string
|
|
503
|
+
chunk: JsChunk
|
|
504
|
+
filename: string
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export interface RawBannerPluginOptions {
|
|
508
|
+
banner: RawBannerContent
|
|
509
|
+
entryOnly?: boolean
|
|
510
|
+
footer?: boolean
|
|
511
|
+
raw?: boolean
|
|
512
|
+
test?: RawBannerRules
|
|
513
|
+
include?: RawBannerRules
|
|
514
|
+
exclude?: RawBannerRules
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface RawBannerRule {
|
|
495
518
|
type: "string" | "regexp"
|
|
496
519
|
stringMatcher?: string
|
|
497
520
|
regexpMatcher?: string
|
|
498
521
|
}
|
|
499
522
|
|
|
500
|
-
export interface
|
|
523
|
+
export interface RawBannerRules {
|
|
501
524
|
type: "string" | "regexp" | "array"
|
|
502
525
|
stringMatcher?: string
|
|
503
526
|
regexpMatcher?: string
|
|
504
|
-
arrayMatcher?: Array<
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
export interface RawBannerConfig {
|
|
508
|
-
banner: string
|
|
509
|
-
entryOnly?: boolean
|
|
510
|
-
footer?: boolean
|
|
511
|
-
raw?: boolean
|
|
512
|
-
test?: RawBannerConditions
|
|
513
|
-
include?: RawBannerConditions
|
|
514
|
-
exclude?: RawBannerConditions
|
|
527
|
+
arrayMatcher?: Array<RawBannerRule>
|
|
515
528
|
}
|
|
516
529
|
|
|
517
530
|
export interface RawBuiltins {
|
|
@@ -556,8 +569,25 @@ export interface RawCacheOptions {
|
|
|
556
569
|
version: string
|
|
557
570
|
}
|
|
558
571
|
|
|
559
|
-
export interface
|
|
560
|
-
|
|
572
|
+
export interface RawCopyGlobOptions {
|
|
573
|
+
caseSensitiveMatch?: boolean
|
|
574
|
+
dot?: boolean
|
|
575
|
+
ignore?: Array<string>
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export interface RawCopyPattern {
|
|
579
|
+
from: string
|
|
580
|
+
to?: string
|
|
581
|
+
context?: string
|
|
582
|
+
toType?: string
|
|
583
|
+
noErrorOnMissing: boolean
|
|
584
|
+
force: boolean
|
|
585
|
+
priority: number
|
|
586
|
+
globOptions: RawCopyGlobOptions
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export interface RawCopyRspackPluginOptions {
|
|
590
|
+
patterns: Array<RawCopyPattern>
|
|
561
591
|
}
|
|
562
592
|
|
|
563
593
|
export interface RawCrossOriginLoading {
|
|
@@ -672,13 +702,7 @@ export interface RawGeneratorOptions {
|
|
|
672
702
|
assetResource?: RawAssetResourceGeneratorOptions
|
|
673
703
|
}
|
|
674
704
|
|
|
675
|
-
export interface
|
|
676
|
-
caseSensitiveMatch?: boolean
|
|
677
|
-
dot?: boolean
|
|
678
|
-
ignore?: Array<string>
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
export interface RawHtmlPluginConfig {
|
|
705
|
+
export interface RawHtmlRspackPluginOptions {
|
|
682
706
|
/** emitted file name in output path */
|
|
683
707
|
filename?: string
|
|
684
708
|
/** template html file */
|
|
@@ -701,7 +725,7 @@ export interface RawHtmlPluginConfig {
|
|
|
701
725
|
meta?: Record<string, Record<string, string>>
|
|
702
726
|
}
|
|
703
727
|
|
|
704
|
-
export interface
|
|
728
|
+
export interface RawHttpExternalsRspackPluginOptions {
|
|
705
729
|
css: boolean
|
|
706
730
|
}
|
|
707
731
|
|
|
@@ -731,31 +755,6 @@ export interface RawLibraryOptions {
|
|
|
731
755
|
auxiliaryComment?: RawLibraryAuxiliaryComment
|
|
732
756
|
}
|
|
733
757
|
|
|
734
|
-
export interface RawMinification {
|
|
735
|
-
passes: number
|
|
736
|
-
dropConsole: boolean
|
|
737
|
-
comments: "all" | "some" | "false"
|
|
738
|
-
asciiOnly: boolean
|
|
739
|
-
pureFuncs: Array<string>
|
|
740
|
-
extractComments?: string
|
|
741
|
-
test?: RawMinificationConditions
|
|
742
|
-
include?: RawMinificationConditions
|
|
743
|
-
exclude?: RawMinificationConditions
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
export interface RawMinificationCondition {
|
|
747
|
-
type: "string" | "regexp"
|
|
748
|
-
stringMatcher?: string
|
|
749
|
-
regexpMatcher?: string
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
export interface RawMinificationConditions {
|
|
753
|
-
type: "string" | "regexp" | "array"
|
|
754
|
-
stringMatcher?: string
|
|
755
|
-
regexpMatcher?: string
|
|
756
|
-
arrayMatcher?: Array<RawMinificationCondition>
|
|
757
|
-
}
|
|
758
|
-
|
|
759
758
|
export interface RawModuleOptions {
|
|
760
759
|
rules: Array<RawModuleRule>
|
|
761
760
|
parser?: Record<string, RawParserOptions>
|
|
@@ -797,9 +796,7 @@ export interface RawModuleRule {
|
|
|
797
796
|
}
|
|
798
797
|
|
|
799
798
|
/**
|
|
800
|
-
* `loader` is for
|
|
801
|
-
* which is mapped to real rust side loader by [get_builtin_loader].
|
|
802
|
-
*
|
|
799
|
+
* `loader` is for both JS and Rust loaders.
|
|
803
800
|
* `options` is
|
|
804
801
|
* - a `None` on rust side and handled by js side `getOptions` when
|
|
805
802
|
* using with `loader`.
|
|
@@ -878,7 +875,6 @@ export interface RawOutputOptions {
|
|
|
878
875
|
importFunctionName: string
|
|
879
876
|
iife: boolean
|
|
880
877
|
module: boolean
|
|
881
|
-
chunkFormat: string
|
|
882
878
|
chunkLoading: string
|
|
883
879
|
enabledChunkLoadingTypes?: Array<string>
|
|
884
880
|
trustedTypes?: RawTrustedTypes
|
|
@@ -898,17 +894,6 @@ export interface RawParserOptions {
|
|
|
898
894
|
asset?: RawAssetParserOptions
|
|
899
895
|
}
|
|
900
896
|
|
|
901
|
-
export interface RawPattern {
|
|
902
|
-
from: string
|
|
903
|
-
to?: string
|
|
904
|
-
context?: string
|
|
905
|
-
toType?: string
|
|
906
|
-
noErrorOnMissing: boolean
|
|
907
|
-
force: boolean
|
|
908
|
-
priority: number
|
|
909
|
-
globOptions: RawGlobOptions
|
|
910
|
-
}
|
|
911
|
-
|
|
912
897
|
export interface RawPluginImportConfig {
|
|
913
898
|
libraryName: string
|
|
914
899
|
libraryDirectory?: string
|
|
@@ -927,7 +912,7 @@ export interface RawPresetEnv {
|
|
|
927
912
|
coreJs?: string
|
|
928
913
|
}
|
|
929
914
|
|
|
930
|
-
export interface
|
|
915
|
+
export interface RawProgressPluginOptions {
|
|
931
916
|
prefix?: string
|
|
932
917
|
}
|
|
933
918
|
|
|
@@ -1023,6 +1008,33 @@ export interface RawStyleConfig {
|
|
|
1023
1008
|
bool?: boolean
|
|
1024
1009
|
}
|
|
1025
1010
|
|
|
1011
|
+
export interface RawSwcJsMinimizerRspackPluginOptions {
|
|
1012
|
+
passes: number
|
|
1013
|
+
dropConsole: boolean
|
|
1014
|
+
keepClassNames: boolean
|
|
1015
|
+
keepFnNames: boolean
|
|
1016
|
+
comments: "all" | "some" | "false"
|
|
1017
|
+
asciiOnly: boolean
|
|
1018
|
+
pureFuncs: Array<string>
|
|
1019
|
+
extractComments?: string
|
|
1020
|
+
test?: RawSwcJsMinimizerRules
|
|
1021
|
+
include?: RawSwcJsMinimizerRules
|
|
1022
|
+
exclude?: RawSwcJsMinimizerRules
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
export interface RawSwcJsMinimizerRule {
|
|
1026
|
+
type: "string" | "regexp"
|
|
1027
|
+
stringMatcher?: string
|
|
1028
|
+
regexpMatcher?: string
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
export interface RawSwcJsMinimizerRules {
|
|
1032
|
+
type: "string" | "regexp" | "array"
|
|
1033
|
+
stringMatcher?: string
|
|
1034
|
+
regexpMatcher?: string
|
|
1035
|
+
arrayMatcher?: Array<RawSwcJsMinimizerRule>
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1026
1038
|
export interface RawTrustedTypes {
|
|
1027
1039
|
policyName?: string
|
|
1028
1040
|
}
|
|
@@ -1039,11 +1051,3 @@ export function registerGlobalTrace(filter: string, layer: "chrome" | "logger",
|
|
|
1039
1051
|
/** Builtin loader runner */
|
|
1040
1052
|
export function runBuiltinLoader(builtin: string, options: string | undefined | null, loaderContext: JsLoaderContext): Promise<JsLoaderContext>
|
|
1041
1053
|
|
|
1042
|
-
export interface ThreadsafeNodeFS {
|
|
1043
|
-
writeFile: (...args: any[]) => any
|
|
1044
|
-
removeFile: (...args: any[]) => any
|
|
1045
|
-
mkdir: (...args: any[]) => any
|
|
1046
|
-
mkdirp: (...args: any[]) => any
|
|
1047
|
-
removeDirAll: (...args: any[]) => any
|
|
1048
|
-
}
|
|
1049
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3-canary-0f5a67f-20230913040612",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"binaryName": "rspack"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@rspack/binding-darwin-arm64": "0.3.
|
|
26
|
-
"@rspack/binding-
|
|
27
|
-
"@rspack/binding-linux-arm64-gnu": "0.3.
|
|
28
|
-
"@rspack/binding-linux-arm64-musl": "0.3.
|
|
29
|
-
"@rspack/binding-
|
|
30
|
-
"@rspack/binding-
|
|
31
|
-
"@rspack/binding-win32-
|
|
32
|
-
"@rspack/binding-
|
|
33
|
-
"@rspack/binding-
|
|
25
|
+
"@rspack/binding-darwin-arm64": "0.3.3-canary-0f5a67f-20230913040612",
|
|
26
|
+
"@rspack/binding-darwin-x64": "0.3.3-canary-0f5a67f-20230913040612",
|
|
27
|
+
"@rspack/binding-linux-arm64-gnu": "0.3.3-canary-0f5a67f-20230913040612",
|
|
28
|
+
"@rspack/binding-linux-arm64-musl": "0.3.3-canary-0f5a67f-20230913040612",
|
|
29
|
+
"@rspack/binding-linux-x64-gnu": "0.3.3-canary-0f5a67f-20230913040612",
|
|
30
|
+
"@rspack/binding-linux-x64-musl": "0.3.3-canary-0f5a67f-20230913040612",
|
|
31
|
+
"@rspack/binding-win32-arm64-msvc": "0.3.3-canary-0f5a67f-20230913040612",
|
|
32
|
+
"@rspack/binding-win32-ia32-msvc": "0.3.3-canary-0f5a67f-20230913040612",
|
|
33
|
+
"@rspack/binding-win32-x64-msvc": "0.3.3-canary-0f5a67f-20230913040612"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build:debug": "node scripts/build.js",
|