@rspack/core 1.3.4 → 1.3.5
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/compiled/enhanced-resolve/index.d.ts +2 -1
- package/compiled/zod/index.d.ts +8 -6
- package/dist/Compilation.d.ts +3 -1
- package/dist/NormalModule.d.ts +2 -2
- package/dist/config/zod.d.ts +2 -2
- package/dist/index.js +290 -310
- package/dist/util/hash/BatchedHash.d.ts +2 -6
- package/dist/util/hash/index.d.ts +15 -6
- package/dist/worker.js +53 -93
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -833,6 +833,7 @@ __export(exports_exports, {
|
|
833
833
|
var import_package = require("../package.json");
|
834
834
|
|
835
835
|
// src/Compilation.ts
|
836
|
+
var binding = __toESM(require("@rspack/binding"));
|
836
837
|
var import_binding = require("@rspack/binding");
|
837
838
|
var liteTapable = __toESM(require("@rspack/lite-tapable"));
|
838
839
|
|
@@ -840,13 +841,13 @@ var liteTapable = __toESM(require("@rspack/lite-tapable"));
|
|
840
841
|
var CHUNK_GROUP_MAPPINGS = /* @__PURE__ */ new WeakMap();
|
841
842
|
var ChunkGroup = class _ChunkGroup {
|
842
843
|
#inner;
|
843
|
-
static __from_binding(
|
844
|
-
let chunkGroup = CHUNK_GROUP_MAPPINGS.get(
|
844
|
+
static __from_binding(binding15) {
|
845
|
+
let chunkGroup = CHUNK_GROUP_MAPPINGS.get(binding15);
|
845
846
|
if (chunkGroup) {
|
846
847
|
return chunkGroup;
|
847
848
|
}
|
848
|
-
chunkGroup = new _ChunkGroup(
|
849
|
-
CHUNK_GROUP_MAPPINGS.set(
|
849
|
+
chunkGroup = new _ChunkGroup(binding15);
|
850
|
+
CHUNK_GROUP_MAPPINGS.set(binding15, chunkGroup);
|
850
851
|
return chunkGroup;
|
851
852
|
}
|
852
853
|
constructor(inner) {
|
@@ -856,7 +857,7 @@ var ChunkGroup = class _ChunkGroup {
|
|
856
857
|
enumerable: true,
|
857
858
|
get: () => {
|
858
859
|
return this.#inner.chunks.map(
|
859
|
-
(
|
860
|
+
(binding15) => Chunk.__from_binding(binding15)
|
860
861
|
);
|
861
862
|
}
|
862
863
|
},
|
@@ -895,7 +896,7 @@ var ChunkGroup = class _ChunkGroup {
|
|
895
896
|
return this.#inner.getFiles();
|
896
897
|
}
|
897
898
|
getParents() {
|
898
|
-
return this.#inner.getParents().map((
|
899
|
+
return this.#inner.getParents().map((binding15) => _ChunkGroup.__from_binding(binding15));
|
899
900
|
}
|
900
901
|
isInitial() {
|
901
902
|
return this.#inner.isInitial();
|
@@ -912,97 +913,97 @@ var ChunkGroup = class _ChunkGroup {
|
|
912
913
|
var CHUNK_MAPPINGS = /* @__PURE__ */ new WeakMap();
|
913
914
|
var Chunk = class _Chunk {
|
914
915
|
#inner;
|
915
|
-
static __from_binding(
|
916
|
-
let chunk = CHUNK_MAPPINGS.get(
|
916
|
+
static __from_binding(binding15) {
|
917
|
+
let chunk = CHUNK_MAPPINGS.get(binding15);
|
917
918
|
if (chunk) {
|
918
919
|
return chunk;
|
919
920
|
}
|
920
|
-
chunk = new _Chunk(
|
921
|
-
CHUNK_MAPPINGS.set(
|
921
|
+
chunk = new _Chunk(binding15);
|
922
|
+
CHUNK_MAPPINGS.set(binding15, chunk);
|
922
923
|
return chunk;
|
923
924
|
}
|
924
925
|
static __to_binding(chunk) {
|
925
926
|
return chunk.#inner;
|
926
927
|
}
|
927
|
-
constructor(
|
928
|
-
this.#inner =
|
928
|
+
constructor(binding15) {
|
929
|
+
this.#inner = binding15;
|
929
930
|
Object.defineProperties(this, {
|
930
931
|
name: {
|
931
932
|
enumerable: true,
|
932
933
|
get: () => {
|
933
|
-
return
|
934
|
+
return binding15.name;
|
934
935
|
}
|
935
936
|
},
|
936
937
|
id: {
|
937
938
|
enumerable: true,
|
938
939
|
get: () => {
|
939
|
-
return
|
940
|
+
return binding15.id;
|
940
941
|
}
|
941
942
|
},
|
942
943
|
ids: {
|
943
944
|
enumerable: true,
|
944
945
|
get: () => {
|
945
|
-
return
|
946
|
+
return binding15.ids;
|
946
947
|
}
|
947
948
|
},
|
948
949
|
idNameHints: {
|
949
950
|
enumerable: true,
|
950
951
|
get: () => {
|
951
|
-
return
|
952
|
+
return binding15.idNameHints;
|
952
953
|
}
|
953
954
|
},
|
954
955
|
filenameTemplate: {
|
955
956
|
enumerable: true,
|
956
957
|
get: () => {
|
957
|
-
return
|
958
|
+
return binding15.filenameTemplate;
|
958
959
|
}
|
959
960
|
},
|
960
961
|
cssFilenameTemplate: {
|
961
962
|
enumerable: true,
|
962
963
|
get: () => {
|
963
|
-
return
|
964
|
+
return binding15.cssFilenameTemplate;
|
964
965
|
}
|
965
966
|
},
|
966
967
|
files: {
|
967
968
|
enumerable: true,
|
968
969
|
get: () => {
|
969
|
-
return new Set(
|
970
|
+
return new Set(binding15.files);
|
970
971
|
}
|
971
972
|
},
|
972
973
|
runtime: {
|
973
974
|
enumerable: true,
|
974
975
|
get: () => {
|
975
|
-
return new Set(
|
976
|
+
return new Set(binding15.runtime);
|
976
977
|
}
|
977
978
|
},
|
978
979
|
hash: {
|
979
980
|
enumerable: true,
|
980
981
|
get: () => {
|
981
|
-
return
|
982
|
+
return binding15.hash;
|
982
983
|
}
|
983
984
|
},
|
984
985
|
contentHash: {
|
985
986
|
enumerable: true,
|
986
987
|
get: () => {
|
987
|
-
return
|
988
|
+
return binding15.contentHash;
|
988
989
|
}
|
989
990
|
},
|
990
991
|
renderedHash: {
|
991
992
|
enumerable: true,
|
992
993
|
get: () => {
|
993
|
-
return
|
994
|
+
return binding15.renderedHash;
|
994
995
|
}
|
995
996
|
},
|
996
997
|
chunkReason: {
|
997
998
|
enumerable: true,
|
998
999
|
get: () => {
|
999
|
-
return
|
1000
|
+
return binding15.chunkReason;
|
1000
1001
|
}
|
1001
1002
|
},
|
1002
1003
|
auxiliaryFiles: {
|
1003
1004
|
enumerable: true,
|
1004
1005
|
get: () => {
|
1005
|
-
return new Set(
|
1006
|
+
return new Set(binding15.auxiliaryFiles);
|
1006
1007
|
}
|
1007
1008
|
}
|
1008
1009
|
});
|
@@ -1018,7 +1019,7 @@ var Chunk = class _Chunk {
|
|
1018
1019
|
}
|
1019
1020
|
get groupsIterable() {
|
1020
1021
|
return new Set(
|
1021
|
-
this.#inner.groups().map((
|
1022
|
+
this.#inner.groups().map((binding15) => ChunkGroup.__from_binding(binding15))
|
1022
1023
|
);
|
1023
1024
|
}
|
1024
1025
|
getChunkMaps(realHash) {
|
@@ -1050,17 +1051,17 @@ var Chunk = class _Chunk {
|
|
1050
1051
|
}
|
1051
1052
|
getAllAsyncChunks() {
|
1052
1053
|
return new Set(
|
1053
|
-
this.#inner.getAllAsyncChunks().map((
|
1054
|
+
this.#inner.getAllAsyncChunks().map((binding15) => _Chunk.__from_binding(binding15))
|
1054
1055
|
);
|
1055
1056
|
}
|
1056
1057
|
getAllInitialChunks() {
|
1057
1058
|
return new Set(
|
1058
|
-
this.#inner.getAllInitialChunks().map((
|
1059
|
+
this.#inner.getAllInitialChunks().map((binding15) => _Chunk.__from_binding(binding15))
|
1059
1060
|
);
|
1060
1061
|
}
|
1061
1062
|
getAllReferencedChunks() {
|
1062
1063
|
return new Set(
|
1063
|
-
this.#inner.getAllReferencedChunks().map((
|
1064
|
+
this.#inner.getAllReferencedChunks().map((binding15) => _Chunk.__from_binding(binding15))
|
1064
1065
|
);
|
1065
1066
|
}
|
1066
1067
|
getEntryOptions() {
|
@@ -1079,11 +1080,11 @@ function toJsRuntimeSpec(runtime) {
|
|
1079
1080
|
// src/ChunkGraph.ts
|
1080
1081
|
var ChunkGraph = class _ChunkGraph {
|
1081
1082
|
#inner;
|
1082
|
-
static __from_binding(
|
1083
|
-
return new _ChunkGraph(
|
1083
|
+
static __from_binding(binding15) {
|
1084
|
+
return new _ChunkGraph(binding15);
|
1084
1085
|
}
|
1085
|
-
constructor(
|
1086
|
-
this.#inner =
|
1086
|
+
constructor(binding15) {
|
1087
|
+
this.#inner = binding15;
|
1087
1088
|
}
|
1088
1089
|
getChunkModules(chunk) {
|
1089
1090
|
return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
|
@@ -1098,7 +1099,7 @@ var ChunkGraph = class _ChunkGraph {
|
|
1098
1099
|
return this.#inner.getNumberOfEntryModules(Chunk.__to_binding(chunk));
|
1099
1100
|
}
|
1100
1101
|
getChunkEntryDependentChunksIterable(chunk) {
|
1101
|
-
return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((
|
1102
|
+
return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((binding15) => Chunk.__from_binding(binding15));
|
1102
1103
|
}
|
1103
1104
|
getChunkModulesIterableBySourceType(chunk, sourceType) {
|
1104
1105
|
return this.#inner.getChunkModulesIterableBySourceType(
|
@@ -1107,10 +1108,10 @@ var ChunkGraph = class _ChunkGraph {
|
|
1107
1108
|
);
|
1108
1109
|
}
|
1109
1110
|
getModuleChunks(module2) {
|
1110
|
-
return this.#inner.getModuleChunks(module2).map((
|
1111
|
+
return this.#inner.getModuleChunks(module2).map((binding15) => Chunk.__from_binding(binding15));
|
1111
1112
|
}
|
1112
1113
|
getModuleChunksIterable(module2) {
|
1113
|
-
return this.#inner.getModuleChunks(module2).map((
|
1114
|
+
return this.#inner.getModuleChunks(module2).map((binding15) => Chunk.__from_binding(binding15));
|
1114
1115
|
}
|
1115
1116
|
getModuleId(module2) {
|
1116
1117
|
return this.#inner.getModuleId(module2);
|
@@ -1119,8 +1120,8 @@ var ChunkGraph = class _ChunkGraph {
|
|
1119
1120
|
return this.#inner.getModuleHash(module2, toJsRuntimeSpec(runtime));
|
1120
1121
|
}
|
1121
1122
|
getBlockChunkGroup(depBlock) {
|
1122
|
-
const
|
1123
|
-
return
|
1123
|
+
const binding15 = this.#inner.getBlockChunkGroup(depBlock);
|
1124
|
+
return binding15 ? ChunkGroup.__from_binding(binding15) : null;
|
1124
1125
|
}
|
1125
1126
|
};
|
1126
1127
|
|
@@ -1128,18 +1129,18 @@ var ChunkGraph = class _ChunkGraph {
|
|
1128
1129
|
var ENTRYPOINT_MAPPINGS = /* @__PURE__ */ new WeakMap();
|
1129
1130
|
var Entrypoint = class _Entrypoint extends ChunkGroup {
|
1130
1131
|
#inner;
|
1131
|
-
static __from_binding(
|
1132
|
-
let entrypoint = ENTRYPOINT_MAPPINGS.get(
|
1132
|
+
static __from_binding(binding15) {
|
1133
|
+
let entrypoint = ENTRYPOINT_MAPPINGS.get(binding15);
|
1133
1134
|
if (entrypoint) {
|
1134
1135
|
return entrypoint;
|
1135
1136
|
}
|
1136
|
-
entrypoint = new _Entrypoint(
|
1137
|
-
ENTRYPOINT_MAPPINGS.set(
|
1137
|
+
entrypoint = new _Entrypoint(binding15);
|
1138
|
+
ENTRYPOINT_MAPPINGS.set(binding15, entrypoint);
|
1138
1139
|
return entrypoint;
|
1139
1140
|
}
|
1140
|
-
constructor(
|
1141
|
-
super(
|
1142
|
-
this.#inner =
|
1141
|
+
constructor(binding15) {
|
1142
|
+
super(binding15);
|
1143
|
+
this.#inner = binding15;
|
1143
1144
|
}
|
1144
1145
|
getRuntimeChunk() {
|
1145
1146
|
const chunkBinding = this.#inner.getRuntimeChunk();
|
@@ -1167,11 +1168,11 @@ var cutOffLoaderExecution = (stack) => cutOffByFlag(stack, loaderFlag);
|
|
1167
1168
|
// src/ExportsInfo.ts
|
1168
1169
|
var ExportsInfo = class _ExportsInfo {
|
1169
1170
|
#inner;
|
1170
|
-
static __from_binding(
|
1171
|
-
return new _ExportsInfo(
|
1171
|
+
static __from_binding(binding15) {
|
1172
|
+
return new _ExportsInfo(binding15);
|
1172
1173
|
}
|
1173
|
-
constructor(
|
1174
|
-
this.#inner =
|
1174
|
+
constructor(binding15) {
|
1175
|
+
this.#inner = binding15;
|
1175
1176
|
}
|
1176
1177
|
isUsed(runtime) {
|
1177
1178
|
return this.#inner.isUsed(toJsRuntimeSpec(runtime));
|
@@ -1189,12 +1190,12 @@ var ExportsInfo = class _ExportsInfo {
|
|
1189
1190
|
|
1190
1191
|
// src/ModuleGraph.ts
|
1191
1192
|
var ModuleGraph = class _ModuleGraph {
|
1192
|
-
static __from_binding(
|
1193
|
-
return new _ModuleGraph(
|
1193
|
+
static __from_binding(binding15) {
|
1194
|
+
return new _ModuleGraph(binding15);
|
1194
1195
|
}
|
1195
1196
|
#inner;
|
1196
|
-
constructor(
|
1197
|
-
this.#inner =
|
1197
|
+
constructor(binding15) {
|
1198
|
+
this.#inner = binding15;
|
1198
1199
|
}
|
1199
1200
|
getModule(dependency) {
|
1200
1201
|
return this.#inner.getModule(dependency);
|
@@ -2515,6 +2516,7 @@ var checkCompilation = (compilation) => {
|
|
2515
2516
|
}
|
2516
2517
|
};
|
2517
2518
|
var _inner, _shutdown, _addIncludeDispatcher, _Compilation_instances, createCachedAssets_fn, _rebuildModuleTask;
|
2519
|
+
binding.COMPILATION_HOOKS_MAP_SYMBOL;
|
2518
2520
|
var _Compilation = class _Compilation {
|
2519
2521
|
constructor(compiler, inner) {
|
2520
2522
|
__privateAdd(this, _Compilation_instances);
|
@@ -2565,12 +2567,12 @@ var _Compilation = class _Compilation {
|
|
2565
2567
|
const errorMessage = (reason) => `Can't automatically convert plugin using Compilation.hooks.${name2} to Compilation.hooks.processAssets because ${reason}.
|
2566
2568
|
BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`;
|
2567
2569
|
const getOptions = (options) => {
|
2568
|
-
const
|
2569
|
-
if (!
|
2570
|
+
const isString = typeof options === "string";
|
2571
|
+
if (!isString && options.stage) {
|
2570
2572
|
throw new Error(errorMessage("it's using the 'stage' option"));
|
2571
2573
|
}
|
2572
2574
|
return {
|
2573
|
-
...
|
2575
|
+
...isString ? { name: options } : options,
|
2574
2576
|
stage
|
2575
2577
|
};
|
2576
2578
|
};
|
@@ -2659,6 +2661,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2659
2661
|
__privateSet(this, _addIncludeDispatcher, new AddIncludeDispatcher(
|
2660
2662
|
inner.addInclude.bind(inner)
|
2661
2663
|
));
|
2664
|
+
this[binding.COMPILATION_HOOKS_MAP_SYMBOL] = /* @__PURE__ */ new WeakMap();
|
2662
2665
|
}
|
2663
2666
|
get hash() {
|
2664
2667
|
return __privateGet(this, _inner).hash;
|
@@ -2677,15 +2680,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2677
2680
|
*/
|
2678
2681
|
get entrypoints() {
|
2679
2682
|
return new Map(
|
2680
|
-
__privateGet(this, _inner).entrypoints.map((
|
2681
|
-
const entrypoint = Entrypoint.__from_binding(
|
2683
|
+
__privateGet(this, _inner).entrypoints.map((binding15) => {
|
2684
|
+
const entrypoint = Entrypoint.__from_binding(binding15);
|
2682
2685
|
return [entrypoint.name, entrypoint];
|
2683
2686
|
})
|
2684
2687
|
);
|
2685
2688
|
}
|
2686
2689
|
get chunkGroups() {
|
2687
2690
|
return __privateGet(this, _inner).chunkGroups.map(
|
2688
|
-
(
|
2691
|
+
(binding15) => ChunkGroup.__from_binding(binding15)
|
2689
2692
|
);
|
2690
2693
|
}
|
2691
2694
|
/**
|
@@ -2701,8 +2704,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2701
2704
|
},
|
2702
2705
|
get: (property) => {
|
2703
2706
|
if (typeof property === "string") {
|
2704
|
-
const
|
2705
|
-
return ChunkGroup.__from_binding(
|
2707
|
+
const binding15 = __privateGet(this, _inner).getNamedChunkGroup(property);
|
2708
|
+
return ChunkGroup.__from_binding(binding15);
|
2706
2709
|
}
|
2707
2710
|
}
|
2708
2711
|
});
|
@@ -2729,8 +2732,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2729
2732
|
},
|
2730
2733
|
get: (property) => {
|
2731
2734
|
if (typeof property === "string") {
|
2732
|
-
const
|
2733
|
-
return
|
2735
|
+
const binding15 = __privateGet(this, _inner).getNamedChunk(property);
|
2736
|
+
return binding15 ? Chunk.__from_binding(binding15) : void 0;
|
2734
2737
|
}
|
2735
2738
|
}
|
2736
2739
|
});
|
@@ -3250,7 +3253,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3250
3253
|
* @internal
|
3251
3254
|
*/
|
3252
3255
|
__internal__getChunks() {
|
3253
|
-
return __privateGet(this, _inner).getChunks().map((
|
3256
|
+
return __privateGet(this, _inner).getChunks().map((binding15) => Chunk.__from_binding(binding15));
|
3254
3257
|
}
|
3255
3258
|
/**
|
3256
3259
|
* Note: This is not a webpack public API, maybe removed in future.
|
@@ -3365,8 +3368,8 @@ var AddIncludeDispatcher = class {
|
|
3365
3368
|
}
|
3366
3369
|
});
|
3367
3370
|
};
|
3368
|
-
constructor(
|
3369
|
-
this.#inner =
|
3371
|
+
constructor(binding15) {
|
3372
|
+
this.#inner = binding15;
|
3370
3373
|
this.#running = false;
|
3371
3374
|
}
|
3372
3375
|
call(context2, dependency, options, callback) {
|
@@ -3378,13 +3381,13 @@ var AddIncludeDispatcher = class {
|
|
3378
3381
|
}
|
3379
3382
|
};
|
3380
3383
|
var EntryData = class _EntryData {
|
3381
|
-
static __from_binding(
|
3382
|
-
return new _EntryData(
|
3384
|
+
static __from_binding(binding15) {
|
3385
|
+
return new _EntryData(binding15);
|
3383
3386
|
}
|
3384
|
-
constructor(
|
3385
|
-
this.dependencies =
|
3386
|
-
this.includeDependencies =
|
3387
|
-
this.options =
|
3387
|
+
constructor(binding15) {
|
3388
|
+
this.dependencies = binding15.dependencies;
|
3389
|
+
this.includeDependencies = binding15.includeDependencies;
|
3390
|
+
this.options = binding15.options;
|
3388
3391
|
}
|
3389
3392
|
};
|
3390
3393
|
var Entries = class {
|
@@ -3396,8 +3399,8 @@ var Entries = class {
|
|
3396
3399
|
this.#data.clear();
|
3397
3400
|
}
|
3398
3401
|
forEach(callback, thisArg) {
|
3399
|
-
for (const [key,
|
3400
|
-
const value = EntryData.__from_binding(
|
3402
|
+
for (const [key, binding15] of this) {
|
3403
|
+
const value = EntryData.__from_binding(binding15);
|
3401
3404
|
callback.call(thisArg, value, key, this);
|
3402
3405
|
}
|
3403
3406
|
}
|
@@ -3429,8 +3432,8 @@ var Entries = class {
|
|
3429
3432
|
return this.#data.delete(key);
|
3430
3433
|
}
|
3431
3434
|
get(key) {
|
3432
|
-
const
|
3433
|
-
return
|
3435
|
+
const binding15 = this.#data.get(key);
|
3436
|
+
return binding15 ? EntryData.__from_binding(binding15) : void 0;
|
3434
3437
|
}
|
3435
3438
|
keys() {
|
3436
3439
|
return this.#data.keys()[Symbol.iterator]();
|
@@ -3761,9 +3764,8 @@ var Hash = class {
|
|
3761
3764
|
/* istanbul ignore next */
|
3762
3765
|
/**
|
3763
3766
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
3764
|
-
* @
|
3765
|
-
* @
|
3766
|
-
* @returns digest
|
3767
|
+
* @param {string=} encoding encoding of the return value
|
3768
|
+
* @returns {string|Buffer} digest
|
3767
3769
|
*/
|
3768
3770
|
digest(encoding) {
|
3769
3771
|
throw new AbstractMethodError_default();
|
@@ -3917,55 +3919,6 @@ var create = (wasmModule, instancesPool, chunkSize, digestSize) => {
|
|
3917
3919
|
};
|
3918
3920
|
var wasm_hash_default = create;
|
3919
3921
|
|
3920
|
-
// src/util/hash/BatchedHash.ts
|
3921
|
-
var BatchedHash = class extends Hash {
|
3922
|
-
constructor(hash) {
|
3923
|
-
super();
|
3924
|
-
this.string = void 0;
|
3925
|
-
this.encoding = void 0;
|
3926
|
-
this.hash = hash;
|
3927
|
-
}
|
3928
|
-
/**
|
3929
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
3930
|
-
* @param data data
|
3931
|
-
* @param inputEncoding data encoding
|
3932
|
-
* @returns updated hash
|
3933
|
-
*/
|
3934
|
-
update(data, inputEncoding) {
|
3935
|
-
if (this.string !== void 0) {
|
3936
|
-
if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
|
3937
|
-
this.string += data;
|
3938
|
-
return this;
|
3939
|
-
}
|
3940
|
-
this.hash.update(this.string, this.encoding);
|
3941
|
-
this.string = void 0;
|
3942
|
-
}
|
3943
|
-
if (typeof data === "string") {
|
3944
|
-
if (data.length < MAX_SHORT_STRING && // base64 encoding is not valid since it may contain padding chars
|
3945
|
-
(!inputEncoding || !inputEncoding.startsWith("ba"))) {
|
3946
|
-
this.string = data;
|
3947
|
-
this.encoding = inputEncoding;
|
3948
|
-
} else {
|
3949
|
-
this.hash.update(data, inputEncoding);
|
3950
|
-
}
|
3951
|
-
} else {
|
3952
|
-
this.hash.update(data);
|
3953
|
-
}
|
3954
|
-
return this;
|
3955
|
-
}
|
3956
|
-
/**
|
3957
|
-
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
3958
|
-
* @param encoding encoding of the return value
|
3959
|
-
* @returns digest
|
3960
|
-
*/
|
3961
|
-
digest(encoding) {
|
3962
|
-
if (this.string !== void 0) {
|
3963
|
-
this.hash.update(this.string, this.encoding);
|
3964
|
-
}
|
3965
|
-
return this.hash.digest(encoding);
|
3966
|
-
}
|
3967
|
-
};
|
3968
|
-
|
3969
3922
|
// src/util/hash/md4.ts
|
3970
3923
|
var createMd4;
|
3971
3924
|
var md4_default = () => {
|
@@ -4018,25 +3971,23 @@ var BulkUpdateDecorator = class extends Hash {
|
|
4018
3971
|
}
|
4019
3972
|
this.buffer = "";
|
4020
3973
|
}
|
4021
|
-
/**
|
4022
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4023
|
-
* @param data data
|
4024
|
-
* @param inputEncoding data encoding
|
4025
|
-
* @returns updated hash
|
4026
|
-
*/
|
4027
3974
|
update(data, inputEncoding) {
|
4028
3975
|
if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
|
4029
3976
|
if (this.hash === void 0) this.hash = this.hashFactory();
|
4030
3977
|
if (this.buffer.length > 0) {
|
4031
|
-
this.hash.update(this.buffer);
|
3978
|
+
this.hash.update(Buffer.from(this.buffer));
|
4032
3979
|
this.buffer = "";
|
4033
3980
|
}
|
4034
|
-
|
3981
|
+
if (Buffer.isBuffer(data)) {
|
3982
|
+
this.hash.update(data);
|
3983
|
+
} else {
|
3984
|
+
this.hash.update(data, inputEncoding);
|
3985
|
+
}
|
4035
3986
|
} else {
|
4036
3987
|
this.buffer += data;
|
4037
3988
|
if (this.buffer.length > BULK_SIZE) {
|
4038
3989
|
if (this.hash === void 0) this.hash = this.hashFactory();
|
4039
|
-
this.hash.update(this.buffer);
|
3990
|
+
this.hash.update(Buffer.from(this.buffer));
|
4040
3991
|
this.buffer = "";
|
4041
3992
|
}
|
4042
3993
|
}
|
@@ -4044,8 +3995,8 @@ var BulkUpdateDecorator = class extends Hash {
|
|
4044
3995
|
}
|
4045
3996
|
/**
|
4046
3997
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4047
|
-
* @param encoding encoding of the return value
|
4048
|
-
* @returns digest
|
3998
|
+
* @param {string=} encoding encoding of the return value
|
3999
|
+
* @returns {string|Buffer} digest
|
4049
4000
|
*/
|
4050
4001
|
digest(encoding) {
|
4051
4002
|
let digestCache;
|
@@ -4057,15 +4008,15 @@ var BulkUpdateDecorator = class extends Hash {
|
|
4057
4008
|
digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
|
4058
4009
|
}
|
4059
4010
|
const cacheEntry = digestCache.get(buffer);
|
4060
|
-
if (cacheEntry !== void 0)
|
4011
|
+
if (cacheEntry !== void 0)
|
4012
|
+
return encoding ? cacheEntry : Buffer.from(cacheEntry, "hex");
|
4061
4013
|
this.hash = this.hashFactory();
|
4062
4014
|
}
|
4063
4015
|
if (buffer.length > 0) {
|
4064
|
-
this.hash.update(buffer);
|
4016
|
+
this.hash.update(Buffer.from(buffer));
|
4065
4017
|
}
|
4066
|
-
const
|
4067
|
-
|
4068
|
-
if (digestCache !== void 0) {
|
4018
|
+
const result2 = encoding ? this.hash.digest(encoding) : this.hash.digest();
|
4019
|
+
if (digestCache !== void 0 && typeof result2 === "string") {
|
4069
4020
|
digestCache.set(buffer, result2);
|
4070
4021
|
}
|
4071
4022
|
return result2;
|
@@ -4076,16 +4027,10 @@ var DebugHash = class extends Hash {
|
|
4076
4027
|
super();
|
4077
4028
|
this.string = "";
|
4078
4029
|
}
|
4079
|
-
|
4080
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4081
|
-
* @param data data
|
4082
|
-
* @param _inputEncoding data encoding
|
4083
|
-
* @returns updated hash
|
4084
|
-
*/
|
4085
|
-
update(data, _inputEncoding) {
|
4030
|
+
update(data, inputEncoding) {
|
4086
4031
|
var _a;
|
4087
4032
|
let normalizedData;
|
4088
|
-
if (
|
4033
|
+
if (Buffer.isBuffer(data)) {
|
4089
4034
|
normalizedData = data.toString("utf-8");
|
4090
4035
|
} else {
|
4091
4036
|
normalizedData = data;
|
@@ -4102,11 +4047,34 @@ var DebugHash = class extends Hash {
|
|
4102
4047
|
}
|
4103
4048
|
/**
|
4104
4049
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4105
|
-
* @param encoding encoding of the return value
|
4106
|
-
* @returns digest
|
4050
|
+
* @param {string=} encoding encoding of the return value
|
4051
|
+
* @returns {string|Buffer} digest
|
4052
|
+
*/
|
4053
|
+
digest(encoding) {
|
4054
|
+
const result2 = `debug-digest-${Buffer.from(this.string).toString("hex")}`;
|
4055
|
+
return encoding ? result2 : Buffer.from(result2);
|
4056
|
+
}
|
4057
|
+
};
|
4058
|
+
var WasmHashAdapter = class extends Hash {
|
4059
|
+
constructor(wasmHash) {
|
4060
|
+
super();
|
4061
|
+
this.wasmHash = wasmHash;
|
4062
|
+
}
|
4063
|
+
update(data, inputEncoding) {
|
4064
|
+
if (Buffer.isBuffer(data)) {
|
4065
|
+
this.wasmHash.update(data);
|
4066
|
+
} else {
|
4067
|
+
this.wasmHash.update(data, inputEncoding);
|
4068
|
+
}
|
4069
|
+
return this;
|
4070
|
+
}
|
4071
|
+
/**
|
4072
|
+
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4073
|
+
* @param {string=} encoding encoding of the return value
|
4074
|
+
* @returns {string|Buffer} digest
|
4107
4075
|
*/
|
4108
4076
|
digest(encoding) {
|
4109
|
-
return
|
4077
|
+
return encoding ? this.wasmHash.digest(encoding) : this.wasmHash.digest();
|
4110
4078
|
}
|
4111
4079
|
};
|
4112
4080
|
var createHash = (algorithm) => {
|
@@ -4117,10 +4085,14 @@ var createHash = (algorithm) => {
|
|
4117
4085
|
// TODO add non-cryptographic algorithm here
|
4118
4086
|
case "debug":
|
4119
4087
|
return new DebugHash();
|
4120
|
-
case "xxhash64":
|
4121
|
-
|
4122
|
-
|
4123
|
-
|
4088
|
+
case "xxhash64": {
|
4089
|
+
const hash = xxhash64_default();
|
4090
|
+
return new WasmHashAdapter(hash);
|
4091
|
+
}
|
4092
|
+
case "md4": {
|
4093
|
+
const hash = md4_default();
|
4094
|
+
return new WasmHashAdapter(hash);
|
4095
|
+
}
|
4124
4096
|
case "native-md4":
|
4125
4097
|
return new BulkUpdateDecorator(() => import_node_crypto.default.createHash("md4"), "md4");
|
4126
4098
|
default:
|
@@ -4791,7 +4763,7 @@ var NormalModuleFactory = class {
|
|
4791
4763
|
};
|
4792
4764
|
|
4793
4765
|
// src/ResolverFactory.ts
|
4794
|
-
var
|
4766
|
+
var binding4 = __toESM(require("@rspack/binding"));
|
4795
4767
|
|
4796
4768
|
// src/config/adapter.ts
|
4797
4769
|
var import_node_assert3 = __toESM(require("assert"));
|
@@ -5107,17 +5079,17 @@ var import_webpack_sources2 = require("../compiled/webpack-sources/index.js");
|
|
5107
5079
|
|
5108
5080
|
// src/NormalModule.ts
|
5109
5081
|
var import_node_util3 = __toESM(require("util"));
|
5110
|
-
var
|
5082
|
+
var binding2 = __toESM(require("@rspack/binding"));
|
5111
5083
|
var liteTapable4 = __toESM(require("@rspack/lite-tapable"));
|
5112
5084
|
var import_binding2 = require("@rspack/binding");
|
5113
|
-
Object.defineProperty(
|
5085
|
+
Object.defineProperty(binding2.NormalModule.prototype, "identifier", {
|
5114
5086
|
enumerable: true,
|
5115
5087
|
configurable: true,
|
5116
5088
|
value() {
|
5117
|
-
return this[
|
5089
|
+
return this[binding2.MODULE_IDENTIFIER_SYMBOL];
|
5118
5090
|
}
|
5119
5091
|
});
|
5120
|
-
Object.defineProperty(
|
5092
|
+
Object.defineProperty(binding2.NormalModule.prototype, "originalSource", {
|
5121
5093
|
enumerable: true,
|
5122
5094
|
configurable: true,
|
5123
5095
|
value() {
|
@@ -5128,14 +5100,13 @@ Object.defineProperty(binding.NormalModule.prototype, "originalSource", {
|
|
5128
5100
|
return null;
|
5129
5101
|
}
|
5130
5102
|
});
|
5131
|
-
Object.defineProperty(
|
5103
|
+
Object.defineProperty(binding2.NormalModule.prototype, "emitFile", {
|
5132
5104
|
enumerable: true,
|
5133
5105
|
configurable: true,
|
5134
5106
|
value(filename2, source, assetInfo) {
|
5135
5107
|
return this._emitFile(filename2, JsSource.__to_binding(source), assetInfo);
|
5136
5108
|
}
|
5137
5109
|
});
|
5138
|
-
var compilationHooksMap = /* @__PURE__ */ new WeakMap();
|
5139
5110
|
var createFakeHook = (fakeHook, message, code) => {
|
5140
5111
|
return Object.freeze(
|
5141
5112
|
Object.assign(
|
@@ -5172,12 +5143,17 @@ var deprecateAllProperties = (obj, message, code) => {
|
|
5172
5143
|
}
|
5173
5144
|
return newObj;
|
5174
5145
|
};
|
5175
|
-
Object.defineProperty(
|
5146
|
+
Object.defineProperty(binding2.NormalModule, "getCompilationHooks", {
|
5176
5147
|
enumerable: true,
|
5177
5148
|
configurable: true,
|
5178
5149
|
value(compilation) {
|
5179
|
-
|
5180
|
-
|
5150
|
+
if (!(binding2.COMPILATION_HOOKS_MAP_SYMBOL in compilation)) {
|
5151
|
+
throw new TypeError(
|
5152
|
+
"The 'compilation' argument must be an instance of Compilation"
|
5153
|
+
);
|
5154
|
+
}
|
5155
|
+
const compilationHooksMap5 = compilation[binding2.COMPILATION_HOOKS_MAP_SYMBOL];
|
5156
|
+
let hooks = compilationHooksMap5.get(compilation);
|
5181
5157
|
if (hooks === void 0) {
|
5182
5158
|
hooks = {
|
5183
5159
|
loader: new liteTapable4.SyncHook(["loaderContext", "module"]),
|
@@ -5203,7 +5179,7 @@ Object.defineProperty(binding.NormalModule, "getCompilationHooks", {
|
|
5203
5179
|
() => new liteTapable4.AsyncSeriesBailHook(["loaderContext"])
|
5204
5180
|
)
|
5205
5181
|
};
|
5206
|
-
|
5182
|
+
compilationHooksMap5.set(compilation, hooks);
|
5207
5183
|
}
|
5208
5184
|
return hooks;
|
5209
5185
|
}
|
@@ -6934,7 +6910,7 @@ function getRawGeneratorOptions(generator, type) {
|
|
6934
6910
|
].includes(type)) {
|
6935
6911
|
return void 0;
|
6936
6912
|
}
|
6937
|
-
throw new Error(`unreachable:
|
6913
|
+
throw new Error(`unreachable: unknown module type: ${type}`);
|
6938
6914
|
}
|
6939
6915
|
function getRawAssetGeneratorOptions(options) {
|
6940
6916
|
return {
|
@@ -8035,10 +8011,10 @@ var import_binding35 = require("@rspack/binding");
|
|
8035
8011
|
|
8036
8012
|
// src/builtin-plugin/html-plugin/hooks.ts
|
8037
8013
|
var liteTapable5 = __toESM(require("@rspack/lite-tapable"));
|
8038
|
-
var
|
8014
|
+
var compilationHooksMap = /* @__PURE__ */ new WeakMap();
|
8039
8015
|
var getPluginHooks = (compilation) => {
|
8040
8016
|
checkCompilation(compilation);
|
8041
|
-
let hooks =
|
8017
|
+
let hooks = compilationHooksMap.get(compilation);
|
8042
8018
|
if (hooks === void 0) {
|
8043
8019
|
hooks = {
|
8044
8020
|
beforeAssetTagGeneration: new liteTapable5.AsyncSeriesWaterfallHook([
|
@@ -8052,12 +8028,12 @@ var getPluginHooks = (compilation) => {
|
|
8052
8028
|
beforeEmit: new liteTapable5.AsyncSeriesWaterfallHook(["data"]),
|
8053
8029
|
afterEmit: new liteTapable5.AsyncSeriesWaterfallHook(["data"])
|
8054
8030
|
};
|
8055
|
-
|
8031
|
+
compilationHooksMap.set(compilation, hooks);
|
8056
8032
|
}
|
8057
8033
|
return hooks;
|
8058
8034
|
};
|
8059
8035
|
var cleanPluginHooks = (compilation) => {
|
8060
|
-
|
8036
|
+
compilationHooksMap.delete(compilation);
|
8061
8037
|
};
|
8062
8038
|
|
8063
8039
|
// src/builtin-plugin/html-plugin/options.ts
|
@@ -8664,7 +8640,7 @@ var InferAsyncModulesPlugin = create2(
|
|
8664
8640
|
// src/builtin-plugin/JavascriptModulesPlugin.ts
|
8665
8641
|
var import_binding40 = require("@rspack/binding");
|
8666
8642
|
var liteTapable6 = __toESM(require("@rspack/lite-tapable"));
|
8667
|
-
var
|
8643
|
+
var compilationHooksMap2 = /* @__PURE__ */ new WeakMap();
|
8668
8644
|
var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
8669
8645
|
constructor() {
|
8670
8646
|
super(...arguments);
|
@@ -8676,12 +8652,12 @@ var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
|
|
8676
8652
|
}
|
8677
8653
|
static getCompilationHooks(compilation) {
|
8678
8654
|
checkCompilation(compilation);
|
8679
|
-
let hooks =
|
8655
|
+
let hooks = compilationHooksMap2.get(compilation);
|
8680
8656
|
if (hooks === void 0) {
|
8681
8657
|
hooks = {
|
8682
8658
|
chunkHash: new liteTapable6.SyncHook(["chunk", "hash"])
|
8683
8659
|
};
|
8684
|
-
|
8660
|
+
compilationHooksMap2.set(compilation, hooks);
|
8685
8661
|
}
|
8686
8662
|
return hooks;
|
8687
8663
|
}
|
@@ -9050,33 +9026,33 @@ var RuntimeChunkPlugin = create2(
|
|
9050
9026
|
);
|
9051
9027
|
|
9052
9028
|
// src/builtin-plugin/RuntimePlugin.ts
|
9053
|
-
var
|
9029
|
+
var binding3 = __toESM(require("@rspack/binding"));
|
9054
9030
|
var liteTapable7 = __toESM(require("@rspack/lite-tapable"));
|
9055
9031
|
var RuntimePluginImpl = create2(
|
9056
|
-
|
9032
|
+
binding3.BuiltinPluginName.RuntimePlugin,
|
9057
9033
|
() => {
|
9058
9034
|
},
|
9059
9035
|
"compilation"
|
9060
9036
|
);
|
9061
9037
|
var RuntimePlugin = RuntimePluginImpl;
|
9062
|
-
var
|
9038
|
+
var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
|
9063
9039
|
RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation) => {
|
9064
9040
|
checkCompilation(compilation);
|
9065
|
-
let hooks =
|
9041
|
+
let hooks = compilationHooksMap3.get(compilation);
|
9066
9042
|
if (hooks === void 0) {
|
9067
9043
|
hooks = {
|
9068
9044
|
createScript: new liteTapable7.SyncWaterfallHook(["code", "chunk"]),
|
9069
9045
|
linkPreload: new liteTapable7.SyncWaterfallHook(["code", "chunk"]),
|
9070
9046
|
linkPrefetch: new liteTapable7.SyncWaterfallHook(["code", "chunk"])
|
9071
9047
|
};
|
9072
|
-
|
9048
|
+
compilationHooksMap3.set(compilation, hooks);
|
9073
9049
|
}
|
9074
9050
|
return hooks;
|
9075
9051
|
};
|
9076
9052
|
var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
9077
9053
|
return {
|
9078
9054
|
registerRuntimePluginCreateScriptTaps: createTap(
|
9079
|
-
|
9055
|
+
binding3.RegisterJsTapKind.RuntimePluginCreateScript,
|
9080
9056
|
function() {
|
9081
9057
|
return RuntimePlugin.getCompilationHooks(
|
9082
9058
|
getCompiler().__internal__get_compilation()
|
@@ -9089,7 +9065,7 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
|
|
9089
9065
|
}
|
9090
9066
|
),
|
9091
9067
|
registerRuntimePluginLinkPreloadTaps: createTap(
|
9092
|
-
|
9068
|
+
binding3.RegisterJsTapKind.RuntimePluginLinkPreload,
|
9093
9069
|
function() {
|
9094
9070
|
return RuntimePlugin.getCompilationHooks(
|
9095
9071
|
getCompiler().__internal__get_compilation()
|
@@ -9102,7 +9078,7 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
|
|
9102
9078
|
}
|
9103
9079
|
),
|
9104
9080
|
registerRuntimePluginLinkPrefetchTaps: createTap(
|
9105
|
-
|
9081
|
+
binding3.RegisterJsTapKind.RuntimePluginLinkPrefetch,
|
9106
9082
|
function() {
|
9107
9083
|
return RuntimePlugin.getCompilationHooks(
|
9108
9084
|
getCompiler().__internal__get_compilation()
|
@@ -9538,11 +9514,11 @@ var RsdoctorPluginImpl = create2(
|
|
9538
9514
|
};
|
9539
9515
|
}
|
9540
9516
|
);
|
9541
|
-
var
|
9517
|
+
var compilationHooksMap4 = /* @__PURE__ */ new WeakMap();
|
9542
9518
|
var RsdoctorPlugin = RsdoctorPluginImpl;
|
9543
9519
|
RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) => {
|
9544
9520
|
checkCompilation(compilation);
|
9545
|
-
let hooks =
|
9521
|
+
let hooks = compilationHooksMap4.get(compilation);
|
9546
9522
|
if (hooks === void 0) {
|
9547
9523
|
hooks = {
|
9548
9524
|
moduleGraph: new liteTapable8.AsyncSeriesBailHook(["moduleGraph"]),
|
@@ -9551,7 +9527,7 @@ RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) =>
|
|
9551
9527
|
moduleSources: new liteTapable8.AsyncSeriesBailHook(["moduleSourcesPatch"]),
|
9552
9528
|
assets: new liteTapable8.AsyncSeriesBailHook(["assetPatch"])
|
9553
9529
|
};
|
9554
|
-
|
9530
|
+
compilationHooksMap4.set(compilation, hooks);
|
9555
9531
|
}
|
9556
9532
|
return hooks;
|
9557
9533
|
};
|
@@ -12008,12 +11984,9 @@ var keyedNestedConfig = (value, fn2, customKeys) => {
|
|
12008
11984
|
};
|
12009
11985
|
|
12010
11986
|
// src/Resolver.ts
|
12011
|
-
function isString(value) {
|
12012
|
-
return typeof value === "string";
|
12013
|
-
}
|
12014
11987
|
var Resolver = class _Resolver {
|
12015
|
-
constructor(
|
12016
|
-
this.binding =
|
11988
|
+
constructor(binding15) {
|
11989
|
+
this.binding = binding15;
|
12017
11990
|
}
|
12018
11991
|
resolveSync(context2, path13, request) {
|
12019
11992
|
const data = this.binding.resolveSync(path13, request);
|
@@ -12038,15 +12011,12 @@ var Resolver = class _Resolver {
|
|
12038
12011
|
...resolve2
|
12039
12012
|
}) {
|
12040
12013
|
const rawResolve = getRawResolve(resolve2);
|
12041
|
-
|
12042
|
-
rawResolve.restrictions = rawResolve.restrictions.filter(isString);
|
12043
|
-
}
|
12044
|
-
const binding14 = this.binding.withOptions({
|
12014
|
+
const binding15 = this.binding.withOptions({
|
12045
12015
|
dependencyCategory,
|
12046
12016
|
resolveToContext,
|
12047
12017
|
...rawResolve
|
12048
12018
|
});
|
12049
|
-
return new _Resolver(
|
12019
|
+
return new _Resolver(binding15);
|
12050
12020
|
}
|
12051
12021
|
};
|
12052
12022
|
|
@@ -12057,16 +12027,16 @@ var ResolverFactory = class {
|
|
12057
12027
|
return resolver_factory.#binding;
|
12058
12028
|
}
|
12059
12029
|
constructor(pnp) {
|
12060
|
-
this.#binding = new
|
12030
|
+
this.#binding = new binding4.JsResolverFactory(pnp);
|
12061
12031
|
}
|
12062
12032
|
get(type, resolveOptions2) {
|
12063
12033
|
const { dependencyCategory, resolveToContext, ...resolve2 } = resolveOptions2 || {};
|
12064
|
-
const
|
12034
|
+
const binding15 = this.#binding.get(type, {
|
12065
12035
|
...getRawResolve(resolve2),
|
12066
12036
|
dependencyCategory,
|
12067
12037
|
resolveToContext
|
12068
12038
|
});
|
12069
|
-
return new Resolver(
|
12039
|
+
return new Resolver(binding15);
|
12070
12040
|
}
|
12071
12041
|
};
|
12072
12042
|
|
@@ -12415,19 +12385,19 @@ var BINDING_VERSION = require("@rspack/binding/package.json").version;
|
|
12415
12385
|
var CORE_VERSION = require("../package.json").version;
|
12416
12386
|
var getAddonPlatformArchAbi = () => {
|
12417
12387
|
const { platform, arch } = process;
|
12418
|
-
let
|
12419
|
-
|
12388
|
+
let binding15 = "";
|
12389
|
+
binding15 += platform;
|
12420
12390
|
const abi = NodePlatformArchToAbi[platform][arch];
|
12421
12391
|
if (abi === void 0) return new Error(`unsupported cpu arch: ${arch}`);
|
12422
|
-
|
12392
|
+
binding15 += `-${arch}`;
|
12423
12393
|
if (typeof abi === "string") {
|
12424
|
-
|
12394
|
+
binding15 += abi.length ? `-${abi}` : "";
|
12425
12395
|
} else if (typeof abi === "object") {
|
12426
|
-
|
12396
|
+
binding15 += `-${abi[isMusl() ? "musl" : "gnu"]}`;
|
12427
12397
|
} else {
|
12428
12398
|
return new Error(`unsupported abi: ${abi}`);
|
12429
12399
|
}
|
12430
|
-
return
|
12400
|
+
return binding15;
|
12431
12401
|
};
|
12432
12402
|
var result;
|
12433
12403
|
var checkVersion = () => {
|
@@ -12474,11 +12444,11 @@ Rspack requires these versions to be the same or you may have installed the wron
|
|
12474
12444
|
};
|
12475
12445
|
|
12476
12446
|
// src/builtin-plugin/html-plugin/taps.ts
|
12477
|
-
var
|
12447
|
+
var binding5 = __toESM(require("@rspack/binding"));
|
12478
12448
|
var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
12479
12449
|
return {
|
12480
12450
|
registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(
|
12481
|
-
|
12451
|
+
binding5.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration,
|
12482
12452
|
function() {
|
12483
12453
|
return HtmlRspackPlugin.getCompilationHooks(
|
12484
12454
|
getCompiler().__internal__get_compilation()
|
@@ -12501,7 +12471,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12501
12471
|
}
|
12502
12472
|
),
|
12503
12473
|
registerHtmlPluginAlterAssetTagsTaps: createTap(
|
12504
|
-
|
12474
|
+
binding5.RegisterJsTapKind.HtmlPluginAlterAssetTags,
|
12505
12475
|
function() {
|
12506
12476
|
return HtmlRspackPlugin.getCompilationHooks(
|
12507
12477
|
getCompiler().__internal__get_compilation()
|
@@ -12517,7 +12487,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12517
12487
|
}
|
12518
12488
|
),
|
12519
12489
|
registerHtmlPluginAlterAssetTagGroupsTaps: createTap(
|
12520
|
-
|
12490
|
+
binding5.RegisterJsTapKind.HtmlPluginAlterAssetTagGroups,
|
12521
12491
|
function() {
|
12522
12492
|
return HtmlRspackPlugin.getCompilationHooks(
|
12523
12493
|
getCompiler().__internal__get_compilation()
|
@@ -12540,7 +12510,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12540
12510
|
}
|
12541
12511
|
),
|
12542
12512
|
registerHtmlPluginAfterTemplateExecutionTaps: createTap(
|
12543
|
-
|
12513
|
+
binding5.RegisterJsTapKind.HtmlPluginAfterTemplateExecution,
|
12544
12514
|
function() {
|
12545
12515
|
return HtmlRspackPlugin.getCompilationHooks(
|
12546
12516
|
getCompiler().__internal__get_compilation()
|
@@ -12563,7 +12533,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12563
12533
|
}
|
12564
12534
|
),
|
12565
12535
|
registerHtmlPluginBeforeEmitTaps: createTap(
|
12566
|
-
|
12536
|
+
binding5.RegisterJsTapKind.HtmlPluginBeforeEmit,
|
12567
12537
|
function() {
|
12568
12538
|
return HtmlRspackPlugin.getCompilationHooks(
|
12569
12539
|
getCompiler().__internal__get_compilation()
|
@@ -12586,7 +12556,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12586
12556
|
}
|
12587
12557
|
),
|
12588
12558
|
registerHtmlPluginAfterEmitTaps: createTap(
|
12589
|
-
|
12559
|
+
binding5.RegisterJsTapKind.HtmlPluginAfterEmit,
|
12590
12560
|
function() {
|
12591
12561
|
return HtmlRspackPlugin.getCompilationHooks(
|
12592
12562
|
getCompiler().__internal__get_compilation()
|
@@ -12612,56 +12582,56 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
12612
12582
|
};
|
12613
12583
|
|
12614
12584
|
// src/taps/compilation.ts
|
12615
|
-
var
|
12585
|
+
var binding7 = __toESM(require("@rspack/binding"));
|
12616
12586
|
|
12617
12587
|
// src/Module.ts
|
12618
|
-
var
|
12588
|
+
var binding6 = __toESM(require("@rspack/binding"));
|
12619
12589
|
var import_binding79 = require("@rspack/binding");
|
12620
12590
|
var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeResolveData {
|
12621
12591
|
#inner;
|
12622
|
-
static __from_binding(
|
12623
|
-
return new _ContextModuleFactoryBeforeResolveData(
|
12592
|
+
static __from_binding(binding15) {
|
12593
|
+
return new _ContextModuleFactoryBeforeResolveData(binding15);
|
12624
12594
|
}
|
12625
12595
|
static __to_binding(data) {
|
12626
12596
|
return data.#inner;
|
12627
12597
|
}
|
12628
|
-
constructor(
|
12629
|
-
this.#inner =
|
12598
|
+
constructor(binding15) {
|
12599
|
+
this.#inner = binding15;
|
12630
12600
|
Object.defineProperties(this, {
|
12631
12601
|
context: {
|
12632
12602
|
enumerable: true,
|
12633
12603
|
get() {
|
12634
|
-
return
|
12604
|
+
return binding15.context;
|
12635
12605
|
},
|
12636
12606
|
set(val) {
|
12637
|
-
|
12607
|
+
binding15.context = val;
|
12638
12608
|
}
|
12639
12609
|
},
|
12640
12610
|
request: {
|
12641
12611
|
enumerable: true,
|
12642
12612
|
get() {
|
12643
|
-
return
|
12613
|
+
return binding15.request;
|
12644
12614
|
},
|
12645
12615
|
set(val) {
|
12646
|
-
|
12616
|
+
binding15.request = val;
|
12647
12617
|
}
|
12648
12618
|
},
|
12649
12619
|
regExp: {
|
12650
12620
|
enumerable: true,
|
12651
12621
|
get() {
|
12652
|
-
return
|
12622
|
+
return binding15.regExp;
|
12653
12623
|
},
|
12654
12624
|
set(val) {
|
12655
|
-
|
12625
|
+
binding15.regExp = val;
|
12656
12626
|
}
|
12657
12627
|
},
|
12658
12628
|
recursive: {
|
12659
12629
|
enumerable: true,
|
12660
12630
|
get() {
|
12661
|
-
return
|
12631
|
+
return binding15.recursive;
|
12662
12632
|
},
|
12663
12633
|
set(val) {
|
12664
|
-
|
12634
|
+
binding15.recursive = val;
|
12665
12635
|
}
|
12666
12636
|
}
|
12667
12637
|
});
|
@@ -12669,77 +12639,77 @@ var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeRes
|
|
12669
12639
|
};
|
12670
12640
|
var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResolveData {
|
12671
12641
|
#inner;
|
12672
|
-
static __from_binding(
|
12673
|
-
return new _ContextModuleFactoryAfterResolveData(
|
12642
|
+
static __from_binding(binding15) {
|
12643
|
+
return new _ContextModuleFactoryAfterResolveData(binding15);
|
12674
12644
|
}
|
12675
12645
|
static __to_binding(data) {
|
12676
12646
|
return data.#inner;
|
12677
12647
|
}
|
12678
|
-
constructor(
|
12679
|
-
this.#inner =
|
12648
|
+
constructor(binding15) {
|
12649
|
+
this.#inner = binding15;
|
12680
12650
|
Object.defineProperties(this, {
|
12681
12651
|
resource: {
|
12682
12652
|
enumerable: true,
|
12683
12653
|
get() {
|
12684
|
-
return
|
12654
|
+
return binding15.resource;
|
12685
12655
|
},
|
12686
12656
|
set(val) {
|
12687
|
-
|
12657
|
+
binding15.resource = val;
|
12688
12658
|
}
|
12689
12659
|
},
|
12690
12660
|
context: {
|
12691
12661
|
enumerable: true,
|
12692
12662
|
get() {
|
12693
|
-
return
|
12663
|
+
return binding15.context;
|
12694
12664
|
},
|
12695
12665
|
set(val) {
|
12696
|
-
|
12666
|
+
binding15.context = val;
|
12697
12667
|
}
|
12698
12668
|
},
|
12699
12669
|
request: {
|
12700
12670
|
enumerable: true,
|
12701
12671
|
get() {
|
12702
|
-
return
|
12672
|
+
return binding15.request;
|
12703
12673
|
},
|
12704
12674
|
set(val) {
|
12705
|
-
|
12675
|
+
binding15.request = val;
|
12706
12676
|
}
|
12707
12677
|
},
|
12708
12678
|
regExp: {
|
12709
12679
|
enumerable: true,
|
12710
12680
|
get() {
|
12711
|
-
return
|
12681
|
+
return binding15.regExp;
|
12712
12682
|
},
|
12713
12683
|
set(val) {
|
12714
|
-
|
12684
|
+
binding15.regExp = val;
|
12715
12685
|
}
|
12716
12686
|
},
|
12717
12687
|
recursive: {
|
12718
12688
|
enumerable: true,
|
12719
12689
|
get() {
|
12720
|
-
return
|
12690
|
+
return binding15.recursive;
|
12721
12691
|
},
|
12722
12692
|
set(val) {
|
12723
|
-
|
12693
|
+
binding15.recursive = val;
|
12724
12694
|
}
|
12725
12695
|
},
|
12726
12696
|
dependencies: {
|
12727
12697
|
enumerable: true,
|
12728
12698
|
get() {
|
12729
|
-
return
|
12699
|
+
return binding15.dependencies;
|
12730
12700
|
}
|
12731
12701
|
}
|
12732
12702
|
});
|
12733
12703
|
}
|
12734
12704
|
};
|
12735
|
-
Object.defineProperty(
|
12705
|
+
Object.defineProperty(binding6.Module.prototype, "identifier", {
|
12736
12706
|
enumerable: true,
|
12737
12707
|
configurable: true,
|
12738
12708
|
value() {
|
12739
|
-
return this[
|
12709
|
+
return this[binding6.MODULE_IDENTIFIER_SYMBOL];
|
12740
12710
|
}
|
12741
12711
|
});
|
12742
|
-
Object.defineProperty(
|
12712
|
+
Object.defineProperty(binding6.Module.prototype, "originalSource", {
|
12743
12713
|
enumerable: true,
|
12744
12714
|
configurable: true,
|
12745
12715
|
value() {
|
@@ -12750,7 +12720,7 @@ Object.defineProperty(binding5.Module.prototype, "originalSource", {
|
|
12750
12720
|
return null;
|
12751
12721
|
}
|
12752
12722
|
});
|
12753
|
-
Object.defineProperty(
|
12723
|
+
Object.defineProperty(binding6.Module.prototype, "emitFile", {
|
12754
12724
|
enumerable: true,
|
12755
12725
|
configurable: true,
|
12756
12726
|
value(filename2, source, assetInfo) {
|
@@ -13115,7 +13085,7 @@ var isReservedRuntimeGlobal = (r) => RESERVED_RUNTIME_GLOBALS.has(r);
|
|
13115
13085
|
var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
13116
13086
|
return {
|
13117
13087
|
registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap(
|
13118
|
-
|
13088
|
+
binding7.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements,
|
13119
13089
|
function() {
|
13120
13090
|
return getCompiler().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
13121
13091
|
},
|
@@ -13133,7 +13103,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13133
13103
|
}
|
13134
13104
|
),
|
13135
13105
|
registerCompilationRuntimeRequirementInTreeTaps: createMapTap(
|
13136
|
-
|
13106
|
+
binding7.RegisterJsTapKind.CompilationRuntimeRequirementInTree,
|
13137
13107
|
function() {
|
13138
13108
|
return getCompiler().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
13139
13109
|
},
|
@@ -13168,7 +13138,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13168
13138
|
}
|
13169
13139
|
),
|
13170
13140
|
registerCompilationRuntimeModuleTaps: createTap(
|
13171
|
-
|
13141
|
+
binding7.RegisterJsTapKind.CompilationRuntimeModule,
|
13172
13142
|
function() {
|
13173
13143
|
return getCompiler().__internal__get_compilation().hooks.runtimeModule;
|
13174
13144
|
},
|
@@ -13186,7 +13156,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13186
13156
|
}
|
13187
13157
|
),
|
13188
13158
|
registerCompilationBuildModuleTaps: createTap(
|
13189
|
-
|
13159
|
+
binding7.RegisterJsTapKind.CompilationBuildModule,
|
13190
13160
|
function() {
|
13191
13161
|
return getCompiler().__internal__get_compilation().hooks.buildModule;
|
13192
13162
|
},
|
@@ -13197,7 +13167,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13197
13167
|
}
|
13198
13168
|
),
|
13199
13169
|
registerCompilationStillValidModuleTaps: createTap(
|
13200
|
-
|
13170
|
+
binding7.RegisterJsTapKind.CompilationStillValidModule,
|
13201
13171
|
function() {
|
13202
13172
|
return getCompiler().__internal__get_compilation().hooks.stillValidModule;
|
13203
13173
|
},
|
@@ -13208,7 +13178,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13208
13178
|
}
|
13209
13179
|
),
|
13210
13180
|
registerCompilationSucceedModuleTaps: createTap(
|
13211
|
-
|
13181
|
+
binding7.RegisterJsTapKind.CompilationSucceedModule,
|
13212
13182
|
function() {
|
13213
13183
|
return getCompiler().__internal__get_compilation().hooks.succeedModule;
|
13214
13184
|
},
|
@@ -13219,7 +13189,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13219
13189
|
}
|
13220
13190
|
),
|
13221
13191
|
registerCompilationExecuteModuleTaps: createTap(
|
13222
|
-
|
13192
|
+
binding7.RegisterJsTapKind.CompilationExecuteModule,
|
13223
13193
|
function() {
|
13224
13194
|
return getCompiler().__internal__get_compilation().hooks.executeModule;
|
13225
13195
|
},
|
@@ -13287,7 +13257,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13287
13257
|
}
|
13288
13258
|
),
|
13289
13259
|
registerCompilationFinishModulesTaps: createTap(
|
13290
|
-
|
13260
|
+
binding7.RegisterJsTapKind.CompilationFinishModules,
|
13291
13261
|
function() {
|
13292
13262
|
return getCompiler().__internal__get_compilation().hooks.finishModules;
|
13293
13263
|
},
|
@@ -13300,7 +13270,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13300
13270
|
}
|
13301
13271
|
),
|
13302
13272
|
registerCompilationOptimizeModulesTaps: createTap(
|
13303
|
-
|
13273
|
+
binding7.RegisterJsTapKind.CompilationOptimizeModules,
|
13304
13274
|
function() {
|
13305
13275
|
return getCompiler().__internal__get_compilation().hooks.optimizeModules;
|
13306
13276
|
},
|
@@ -13313,7 +13283,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13313
13283
|
}
|
13314
13284
|
),
|
13315
13285
|
registerCompilationAfterOptimizeModulesTaps: createTap(
|
13316
|
-
|
13286
|
+
binding7.RegisterJsTapKind.CompilationAfterOptimizeModules,
|
13317
13287
|
function() {
|
13318
13288
|
return getCompiler().__internal__get_compilation().hooks.afterOptimizeModules;
|
13319
13289
|
},
|
@@ -13326,7 +13296,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13326
13296
|
}
|
13327
13297
|
),
|
13328
13298
|
registerCompilationOptimizeTreeTaps: createTap(
|
13329
|
-
|
13299
|
+
binding7.RegisterJsTapKind.CompilationOptimizeTree,
|
13330
13300
|
function() {
|
13331
13301
|
return getCompiler().__internal__get_compilation().hooks.optimizeTree;
|
13332
13302
|
},
|
@@ -13340,7 +13310,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13340
13310
|
}
|
13341
13311
|
),
|
13342
13312
|
registerCompilationOptimizeChunkModulesTaps: createTap(
|
13343
|
-
|
13313
|
+
binding7.RegisterJsTapKind.CompilationOptimizeChunkModules,
|
13344
13314
|
function() {
|
13345
13315
|
return getCompiler().__internal__get_compilation().hooks.optimizeChunkModules;
|
13346
13316
|
},
|
@@ -13354,7 +13324,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13354
13324
|
}
|
13355
13325
|
),
|
13356
13326
|
registerCompilationChunkHashTaps: createTap(
|
13357
|
-
|
13327
|
+
binding7.RegisterJsTapKind.CompilationChunkHash,
|
13358
13328
|
function() {
|
13359
13329
|
return getCompiler().__internal__get_compilation().hooks.chunkHash;
|
13360
13330
|
},
|
@@ -13365,15 +13335,20 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13365
13335
|
}
|
13366
13336
|
const hash = createHash(getCompiler().options.output.hashFunction);
|
13367
13337
|
queried.call(Chunk.__from_binding(chunk), hash);
|
13368
|
-
|
13369
|
-
|
13370
|
-
|
13371
|
-
|
13338
|
+
let digestResult;
|
13339
|
+
if (getCompiler().options.output.hashDigest) {
|
13340
|
+
digestResult = hash.digest(
|
13341
|
+
getCompiler().options.output.hashDigest
|
13342
|
+
);
|
13343
|
+
} else {
|
13344
|
+
digestResult = hash.digest();
|
13345
|
+
}
|
13346
|
+
return typeof digestResult === "string" ? Buffer.from(digestResult) : digestResult;
|
13372
13347
|
};
|
13373
13348
|
}
|
13374
13349
|
),
|
13375
13350
|
registerCompilationChunkAssetTaps: createTap(
|
13376
|
-
|
13351
|
+
binding7.RegisterJsTapKind.CompilationChunkAsset,
|
13377
13352
|
function() {
|
13378
13353
|
return getCompiler().__internal__get_compilation().hooks.chunkAsset;
|
13379
13354
|
},
|
@@ -13384,7 +13359,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13384
13359
|
}
|
13385
13360
|
),
|
13386
13361
|
registerCompilationProcessAssetsTaps: createTap(
|
13387
|
-
|
13362
|
+
binding7.RegisterJsTapKind.CompilationProcessAssets,
|
13388
13363
|
function() {
|
13389
13364
|
return getCompiler().__internal__get_compilation().hooks.processAssets;
|
13390
13365
|
},
|
@@ -13397,7 +13372,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13397
13372
|
}
|
13398
13373
|
),
|
13399
13374
|
registerCompilationAfterProcessAssetsTaps: createTap(
|
13400
|
-
|
13375
|
+
binding7.RegisterJsTapKind.CompilationAfterProcessAssets,
|
13401
13376
|
function() {
|
13402
13377
|
return getCompiler().__internal__get_compilation().hooks.afterProcessAssets;
|
13403
13378
|
},
|
@@ -13410,7 +13385,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13410
13385
|
}
|
13411
13386
|
),
|
13412
13387
|
registerCompilationSealTaps: createTap(
|
13413
|
-
|
13388
|
+
binding7.RegisterJsTapKind.CompilationSeal,
|
13414
13389
|
function() {
|
13415
13390
|
return getCompiler().__internal__get_compilation().hooks.seal;
|
13416
13391
|
},
|
@@ -13421,7 +13396,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13421
13396
|
}
|
13422
13397
|
),
|
13423
13398
|
registerCompilationAfterSealTaps: createTap(
|
13424
|
-
|
13399
|
+
binding7.RegisterJsTapKind.CompilationAfterSeal,
|
13425
13400
|
function() {
|
13426
13401
|
return getCompiler().__internal__get_compilation().hooks.afterSeal;
|
13427
13402
|
},
|
@@ -13435,11 +13410,11 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
|
|
13435
13410
|
};
|
13436
13411
|
|
13437
13412
|
// src/taps/compiler.ts
|
13438
|
-
var
|
13413
|
+
var binding8 = __toESM(require("@rspack/binding"));
|
13439
13414
|
var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
13440
13415
|
return {
|
13441
13416
|
registerCompilerThisCompilationTaps: createTap(
|
13442
|
-
|
13417
|
+
binding8.RegisterJsTapKind.CompilerThisCompilation,
|
13443
13418
|
function() {
|
13444
13419
|
return getCompiler().hooks.thisCompilation;
|
13445
13420
|
},
|
@@ -13454,7 +13429,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13454
13429
|
}
|
13455
13430
|
),
|
13456
13431
|
registerCompilerCompilationTaps: createTap(
|
13457
|
-
|
13432
|
+
binding8.RegisterJsTapKind.CompilerCompilation,
|
13458
13433
|
function() {
|
13459
13434
|
return getCompiler().hooks.compilation;
|
13460
13435
|
},
|
@@ -13468,7 +13443,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13468
13443
|
}
|
13469
13444
|
),
|
13470
13445
|
registerCompilerMakeTaps: createTap(
|
13471
|
-
|
13446
|
+
binding8.RegisterJsTapKind.CompilerMake,
|
13472
13447
|
function() {
|
13473
13448
|
return getCompiler().hooks.make;
|
13474
13449
|
},
|
@@ -13481,7 +13456,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13481
13456
|
}
|
13482
13457
|
),
|
13483
13458
|
registerCompilerFinishMakeTaps: createTap(
|
13484
|
-
|
13459
|
+
binding8.RegisterJsTapKind.CompilerFinishMake,
|
13485
13460
|
function() {
|
13486
13461
|
return getCompiler().hooks.finishMake;
|
13487
13462
|
},
|
@@ -13494,7 +13469,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13494
13469
|
}
|
13495
13470
|
),
|
13496
13471
|
registerCompilerShouldEmitTaps: createTap(
|
13497
|
-
|
13472
|
+
binding8.RegisterJsTapKind.CompilerShouldEmit,
|
13498
13473
|
function() {
|
13499
13474
|
return getCompiler().hooks.shouldEmit;
|
13500
13475
|
},
|
@@ -13505,7 +13480,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13505
13480
|
}
|
13506
13481
|
),
|
13507
13482
|
registerCompilerEmitTaps: createTap(
|
13508
|
-
|
13483
|
+
binding8.RegisterJsTapKind.CompilerEmit,
|
13509
13484
|
function() {
|
13510
13485
|
return getCompiler().hooks.emit;
|
13511
13486
|
},
|
@@ -13518,7 +13493,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13518
13493
|
}
|
13519
13494
|
),
|
13520
13495
|
registerCompilerAfterEmitTaps: createTap(
|
13521
|
-
|
13496
|
+
binding8.RegisterJsTapKind.CompilerAfterEmit,
|
13522
13497
|
function() {
|
13523
13498
|
return getCompiler().hooks.afterEmit;
|
13524
13499
|
},
|
@@ -13531,7 +13506,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13531
13506
|
}
|
13532
13507
|
),
|
13533
13508
|
registerCompilerAssetEmittedTaps: createTap(
|
13534
|
-
|
13509
|
+
binding8.RegisterJsTapKind.CompilerAssetEmitted,
|
13535
13510
|
function() {
|
13536
13511
|
return getCompiler().hooks.assetEmitted;
|
13537
13512
|
},
|
@@ -13561,11 +13536,11 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
|
13561
13536
|
};
|
13562
13537
|
|
13563
13538
|
// src/taps/contextModuleFactory.ts
|
13564
|
-
var
|
13539
|
+
var binding9 = __toESM(require("@rspack/binding"));
|
13565
13540
|
var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
13566
13541
|
return {
|
13567
13542
|
registerContextModuleFactoryBeforeResolveTaps: createTap(
|
13568
|
-
|
13543
|
+
binding9.RegisterJsTapKind.ContextModuleFactoryBeforeResolve,
|
13569
13544
|
function() {
|
13570
13545
|
return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
|
13571
13546
|
},
|
@@ -13578,7 +13553,7 @@ var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMa
|
|
13578
13553
|
}
|
13579
13554
|
),
|
13580
13555
|
registerContextModuleFactoryAfterResolveTaps: createTap(
|
13581
|
-
|
13556
|
+
binding9.RegisterJsTapKind.ContextModuleFactoryAfterResolve,
|
13582
13557
|
function() {
|
13583
13558
|
return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
|
13584
13559
|
},
|
@@ -13594,11 +13569,11 @@ var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMa
|
|
13594
13569
|
};
|
13595
13570
|
|
13596
13571
|
// src/taps/javascriptModules.ts
|
13597
|
-
var
|
13572
|
+
var binding10 = __toESM(require("@rspack/binding"));
|
13598
13573
|
var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
13599
13574
|
return {
|
13600
13575
|
registerJavascriptModulesChunkHashTaps: createTap(
|
13601
|
-
|
13576
|
+
binding10.RegisterJsTapKind.JavascriptModulesChunkHash,
|
13602
13577
|
function() {
|
13603
13578
|
return JavascriptModulesPlugin.getCompilationHooks(
|
13604
13579
|
getCompiler().__internal__get_compilation()
|
@@ -13611,10 +13586,15 @@ var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTa
|
|
13611
13586
|
}
|
13612
13587
|
const hash = createHash(getCompiler().options.output.hashFunction);
|
13613
13588
|
queried.call(Chunk.__from_binding(chunk), hash);
|
13614
|
-
|
13615
|
-
|
13616
|
-
|
13617
|
-
|
13589
|
+
let digestResult;
|
13590
|
+
if (getCompiler().options.output.hashDigest) {
|
13591
|
+
digestResult = hash.digest(
|
13592
|
+
getCompiler().options.output.hashDigest
|
13593
|
+
);
|
13594
|
+
} else {
|
13595
|
+
digestResult = hash.digest();
|
13596
|
+
}
|
13597
|
+
return typeof digestResult === "string" ? Buffer.from(digestResult) : digestResult;
|
13618
13598
|
};
|
13619
13599
|
}
|
13620
13600
|
)
|
@@ -13622,11 +13602,11 @@ var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTa
|
|
13622
13602
|
};
|
13623
13603
|
|
13624
13604
|
// src/taps/normalModuleFactory.ts
|
13625
|
-
var
|
13605
|
+
var binding11 = __toESM(require("@rspack/binding"));
|
13626
13606
|
var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap) => {
|
13627
13607
|
return {
|
13628
13608
|
registerNormalModuleFactoryBeforeResolveTaps: createTap(
|
13629
|
-
|
13609
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryBeforeResolve,
|
13630
13610
|
function() {
|
13631
13611
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
|
13632
13612
|
},
|
@@ -13651,7 +13631,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
13651
13631
|
}
|
13652
13632
|
),
|
13653
13633
|
registerNormalModuleFactoryFactorizeTaps: createTap(
|
13654
|
-
|
13634
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryFactorize,
|
13655
13635
|
function() {
|
13656
13636
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
|
13657
13637
|
},
|
@@ -13676,7 +13656,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
13676
13656
|
}
|
13677
13657
|
),
|
13678
13658
|
registerNormalModuleFactoryResolveTaps: createTap(
|
13679
|
-
|
13659
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryResolve,
|
13680
13660
|
function() {
|
13681
13661
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
|
13682
13662
|
},
|
@@ -13701,7 +13681,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
13701
13681
|
}
|
13702
13682
|
),
|
13703
13683
|
registerNormalModuleFactoryResolveForSchemeTaps: createMapTap(
|
13704
|
-
|
13684
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryResolveForScheme,
|
13705
13685
|
function() {
|
13706
13686
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
|
13707
13687
|
},
|
@@ -13713,7 +13693,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
13713
13693
|
}
|
13714
13694
|
),
|
13715
13695
|
registerNormalModuleFactoryAfterResolveTaps: createTap(
|
13716
|
-
|
13696
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryAfterResolve,
|
13717
13697
|
function() {
|
13718
13698
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
|
13719
13699
|
},
|
@@ -13737,7 +13717,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
|
|
13737
13717
|
}
|
13738
13718
|
),
|
13739
13719
|
registerNormalModuleFactoryCreateModuleTaps: createTap(
|
13740
|
-
|
13720
|
+
binding11.RegisterJsTapKind.NormalModuleFactoryCreateModule,
|
13741
13721
|
function() {
|
13742
13722
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
|
13743
13723
|
},
|
@@ -18317,16 +18297,16 @@ var RspackOptionsApply = class {
|
|
18317
18297
|
};
|
18318
18298
|
|
18319
18299
|
// src/ContextModule.ts
|
18320
|
-
var
|
18300
|
+
var binding12 = __toESM(require("@rspack/binding"));
|
18321
18301
|
var import_binding80 = require("@rspack/binding");
|
18322
|
-
Object.defineProperty(
|
18302
|
+
Object.defineProperty(binding12.ContextModule.prototype, "identifier", {
|
18323
18303
|
enumerable: true,
|
18324
18304
|
configurable: true,
|
18325
18305
|
value() {
|
18326
|
-
return this[
|
18306
|
+
return this[binding12.MODULE_IDENTIFIER_SYMBOL];
|
18327
18307
|
}
|
18328
18308
|
});
|
18329
|
-
Object.defineProperty(
|
18309
|
+
Object.defineProperty(binding12.ContextModule.prototype, "originalSource", {
|
18330
18310
|
enumerable: true,
|
18331
18311
|
configurable: true,
|
18332
18312
|
value() {
|
@@ -18337,7 +18317,7 @@ Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
|
|
18337
18317
|
return null;
|
18338
18318
|
}
|
18339
18319
|
});
|
18340
|
-
Object.defineProperty(
|
18320
|
+
Object.defineProperty(binding12.ContextModule.prototype, "emitFile", {
|
18341
18321
|
enumerable: true,
|
18342
18322
|
configurable: true,
|
18343
18323
|
value(filename2, source, assetInfo) {
|
@@ -18346,16 +18326,16 @@ Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
|
|
18346
18326
|
});
|
18347
18327
|
|
18348
18328
|
// src/ConcatenatedModule.ts
|
18349
|
-
var
|
18329
|
+
var binding13 = __toESM(require("@rspack/binding"));
|
18350
18330
|
var import_binding81 = require("@rspack/binding");
|
18351
|
-
Object.defineProperty(
|
18331
|
+
Object.defineProperty(binding13.ConcatenatedModule.prototype, "identifier", {
|
18352
18332
|
enumerable: true,
|
18353
18333
|
configurable: true,
|
18354
18334
|
value() {
|
18355
|
-
return this[
|
18335
|
+
return this[binding13.MODULE_IDENTIFIER_SYMBOL];
|
18356
18336
|
}
|
18357
18337
|
});
|
18358
|
-
Object.defineProperty(
|
18338
|
+
Object.defineProperty(binding13.ConcatenatedModule.prototype, "originalSource", {
|
18359
18339
|
enumerable: true,
|
18360
18340
|
configurable: true,
|
18361
18341
|
value() {
|
@@ -18366,7 +18346,7 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource",
|
|
18366
18346
|
return null;
|
18367
18347
|
}
|
18368
18348
|
});
|
18369
|
-
Object.defineProperty(
|
18349
|
+
Object.defineProperty(binding13.ConcatenatedModule.prototype, "emitFile", {
|
18370
18350
|
enumerable: true,
|
18371
18351
|
configurable: true,
|
18372
18352
|
value(filename2, source, assetInfo) {
|
@@ -18375,16 +18355,16 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
|
|
18375
18355
|
});
|
18376
18356
|
|
18377
18357
|
// src/ExternalModule.ts
|
18378
|
-
var
|
18358
|
+
var binding14 = __toESM(require("@rspack/binding"));
|
18379
18359
|
var import_binding82 = require("@rspack/binding");
|
18380
|
-
Object.defineProperty(
|
18360
|
+
Object.defineProperty(binding14.ExternalModule.prototype, "identifier", {
|
18381
18361
|
enumerable: true,
|
18382
18362
|
configurable: true,
|
18383
18363
|
value() {
|
18384
|
-
return this[
|
18364
|
+
return this[binding14.MODULE_IDENTIFIER_SYMBOL];
|
18385
18365
|
}
|
18386
18366
|
});
|
18387
|
-
Object.defineProperty(
|
18367
|
+
Object.defineProperty(binding14.ExternalModule.prototype, "originalSource", {
|
18388
18368
|
enumerable: true,
|
18389
18369
|
configurable: true,
|
18390
18370
|
value() {
|
@@ -18395,7 +18375,7 @@ Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
|
|
18395
18375
|
return null;
|
18396
18376
|
}
|
18397
18377
|
});
|
18398
|
-
Object.defineProperty(
|
18378
|
+
Object.defineProperty(binding14.ExternalModule.prototype, "emitFile", {
|
18399
18379
|
enumerable: true,
|
18400
18380
|
configurable: true,
|
18401
18381
|
value(filename2, source, assetInfo) {
|