@rspack/browser 2.1.0 → 2.1.2
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/dist/config/types.d.ts
CHANGED
|
@@ -615,6 +615,10 @@ export type RuleSetLogicalConditions = {
|
|
|
615
615
|
export type RuleSetLoader = string;
|
|
616
616
|
export type RuleSetLoaderOptions = string | Record<string, any>;
|
|
617
617
|
export type RuleSetLoaderWithOptions = {
|
|
618
|
+
/**
|
|
619
|
+
* Stable identifier used to reference object-form loader options.
|
|
620
|
+
* When provided, Rspack passes object options to the loader request as `??${ident}`.
|
|
621
|
+
*/
|
|
618
622
|
ident?: string;
|
|
619
623
|
loader: RuleSetLoader;
|
|
620
624
|
/**
|
|
@@ -970,7 +974,8 @@ export type JsonParserOptions = {
|
|
|
970
974
|
*/
|
|
971
975
|
exportsDepth?: number;
|
|
972
976
|
/**
|
|
973
|
-
*
|
|
977
|
+
* Custom synchronous parser for json modules. It receives the module source and should return JSON-serializable data.
|
|
978
|
+
* Can be configured through module.parser.json or through Rule.parser when Rule.type is 'json'.
|
|
974
979
|
*/
|
|
975
980
|
parse?: (source: string) => any;
|
|
976
981
|
};
|
package/dist/index.js
CHANGED
|
@@ -8626,7 +8626,7 @@ __webpack_require__.add({
|
|
|
8626
8626
|
module.exports = modes;
|
|
8627
8627
|
},
|
|
8628
8628
|
37481 (__unused_rspack_module, exports, __webpack_require__) {
|
|
8629
|
-
var Buffer = __webpack_require__(
|
|
8629
|
+
var Buffer = __webpack_require__(98041).h;
|
|
8630
8630
|
var xor = __webpack_require__(10460);
|
|
8631
8631
|
function getBlock(self1) {
|
|
8632
8632
|
self1._prev = self1._cipher.encryptBlock(self1._prev);
|
|
@@ -9143,7 +9143,7 @@ __webpack_require__.add({
|
|
|
9143
9143
|
module.exports = verify;
|
|
9144
9144
|
},
|
|
9145
9145
|
46025 (__unused_rspack_module, exports, __webpack_require__) {
|
|
9146
|
-
var Buffer = __webpack_require__(
|
|
9146
|
+
var Buffer = __webpack_require__(98041).h;
|
|
9147
9147
|
var process = __webpack_require__(85409);
|
|
9148
9148
|
var assert = __webpack_require__(46732);
|
|
9149
9149
|
var Zstream = __webpack_require__(84179);
|
|
@@ -9818,7 +9818,7 @@ __webpack_require__.add({
|
|
|
9818
9818
|
util.inherits(Unzip, Zlib);
|
|
9819
9819
|
},
|
|
9820
9820
|
10460 (module, __unused_rspack_exports, __webpack_require__) {
|
|
9821
|
-
var Buffer = __webpack_require__(
|
|
9821
|
+
var Buffer = __webpack_require__(98041).h;
|
|
9822
9822
|
module.exports = function(a, b) {
|
|
9823
9823
|
var length = Math.min(a.length, b.length);
|
|
9824
9824
|
var buffer = new Buffer(length);
|
|
@@ -11184,7 +11184,7 @@ __webpack_require__.add({
|
|
|
11184
11184
|
}
|
|
11185
11185
|
},
|
|
11186
11186
|
29520 (module, __unused_rspack_exports, __webpack_require__) {
|
|
11187
|
-
var Buffer = __webpack_require__(
|
|
11187
|
+
var Buffer = __webpack_require__(98041).h;
|
|
11188
11188
|
var elliptic = __webpack_require__(23071);
|
|
11189
11189
|
var BN = __webpack_require__(5630);
|
|
11190
11190
|
module.exports = function(curve) {
|
|
@@ -12569,8 +12569,8 @@ __webpack_require__.add({
|
|
|
12569
12569
|
};
|
|
12570
12570
|
},
|
|
12571
12571
|
58216 (__unused_rspack_module, exports, __webpack_require__) {
|
|
12572
|
-
var Buffer = __webpack_require__(
|
|
12573
|
-
var generatePrime = __webpack_require__(
|
|
12572
|
+
var Buffer = __webpack_require__(98041).h;
|
|
12573
|
+
var generatePrime = __webpack_require__(2741);
|
|
12574
12574
|
var primes = __webpack_require__(37821);
|
|
12575
12575
|
var DH = __webpack_require__(29242);
|
|
12576
12576
|
function getDiffieHellman(mod) {
|
|
@@ -12599,7 +12599,7 @@ __webpack_require__.add({
|
|
|
12599
12599
|
exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman;
|
|
12600
12600
|
},
|
|
12601
12601
|
29242 (module, __unused_rspack_exports, __webpack_require__) {
|
|
12602
|
-
var Buffer = __webpack_require__(
|
|
12602
|
+
var Buffer = __webpack_require__(98041).h;
|
|
12603
12603
|
var BN = __webpack_require__(5630);
|
|
12604
12604
|
var MillerRabin = __webpack_require__(74442);
|
|
12605
12605
|
var millerRabin = new MillerRabin();
|
|
@@ -12608,7 +12608,7 @@ __webpack_require__.add({
|
|
|
12608
12608
|
var TEN = new BN(10);
|
|
12609
12609
|
var THREE = new BN(3);
|
|
12610
12610
|
var SEVEN = new BN(7);
|
|
12611
|
-
var primes = __webpack_require__(
|
|
12611
|
+
var primes = __webpack_require__(2741);
|
|
12612
12612
|
var randomBytes = __webpack_require__(82869);
|
|
12613
12613
|
module.exports = DH;
|
|
12614
12614
|
function setPublicKey(pub, enc) {
|
|
@@ -12721,7 +12721,7 @@ __webpack_require__.add({
|
|
|
12721
12721
|
return buf.toString(enc);
|
|
12722
12722
|
}
|
|
12723
12723
|
},
|
|
12724
|
-
|
|
12724
|
+
2741 (module, __unused_rspack_exports, __webpack_require__) {
|
|
12725
12725
|
var randomBytes = __webpack_require__(82869);
|
|
12726
12726
|
module.exports = findPrime;
|
|
12727
12727
|
findPrime.simpleSieve = simpleSieve;
|
|
@@ -15724,9 +15724,9 @@ __webpack_require__.add({
|
|
|
15724
15724
|
}
|
|
15725
15725
|
utils.intFromLE = intFromLE;
|
|
15726
15726
|
},
|
|
15727
|
-
|
|
15728
|
-
var Buffer = __webpack_require__(
|
|
15729
|
-
const { nextTick } = __webpack_require__(
|
|
15727
|
+
16229 (module, __unused_rspack_exports, __webpack_require__) {
|
|
15728
|
+
var Buffer = __webpack_require__(98041).h;
|
|
15729
|
+
const { nextTick } = __webpack_require__(46417);
|
|
15730
15730
|
const dirname = (path)=>{
|
|
15731
15731
|
let idx = path.length - 1;
|
|
15732
15732
|
while(idx >= 0){
|
|
@@ -16053,7 +16053,7 @@ __webpack_require__.add({
|
|
|
16053
16053
|
}
|
|
16054
16054
|
};
|
|
16055
16055
|
},
|
|
16056
|
-
|
|
16056
|
+
46417 (module) {
|
|
16057
16057
|
module.exports = {
|
|
16058
16058
|
versions: {},
|
|
16059
16059
|
nextTick (fn) {
|
|
@@ -17031,7 +17031,7 @@ __webpack_require__.add({
|
|
|
17031
17031
|
},
|
|
17032
17032
|
70627 (module, __unused_rspack_exports, __webpack_require__) {
|
|
17033
17033
|
var process = __webpack_require__(85409);
|
|
17034
|
-
var fs = __webpack_require__(
|
|
17034
|
+
var fs = __webpack_require__(55016);
|
|
17035
17035
|
var polyfills = __webpack_require__(58254);
|
|
17036
17036
|
var legacy = __webpack_require__(60111);
|
|
17037
17037
|
var clone = __webpack_require__(58359);
|
|
@@ -30981,7 +30981,7 @@ __webpack_require__.add({
|
|
|
30981
30981
|
xhr = null;
|
|
30982
30982
|
},
|
|
30983
30983
|
3040 (module, __unused_rspack_exports, __webpack_require__) {
|
|
30984
|
-
var Buffer = __webpack_require__(
|
|
30984
|
+
var Buffer = __webpack_require__(98041).h;
|
|
30985
30985
|
var process = __webpack_require__(85409);
|
|
30986
30986
|
var capability = __webpack_require__(89771);
|
|
30987
30987
|
var inherits = __webpack_require__(91193);
|
|
@@ -31233,7 +31233,7 @@ __webpack_require__.add({
|
|
|
31233
31233
|
},
|
|
31234
31234
|
40506 (__unused_rspack_module, exports, __webpack_require__) {
|
|
31235
31235
|
var process = __webpack_require__(85409);
|
|
31236
|
-
var Buffer = __webpack_require__(
|
|
31236
|
+
var Buffer = __webpack_require__(98041).h;
|
|
31237
31237
|
var capability = __webpack_require__(89771);
|
|
31238
31238
|
var inherits = __webpack_require__(91193);
|
|
31239
31239
|
var stream = __webpack_require__(51094);
|
|
@@ -33690,7 +33690,7 @@ __webpack_require__.add({
|
|
|
33690
33690
|
},
|
|
33691
33691
|
7097 (module, __unused_rspack_exports, __webpack_require__) {
|
|
33692
33692
|
var process = __webpack_require__(85409);
|
|
33693
|
-
const fs = __webpack_require__(
|
|
33693
|
+
const fs = __webpack_require__(55016);
|
|
33694
33694
|
const path = __webpack_require__(13078);
|
|
33695
33695
|
const EXPECTED_ERRORS = new Set([
|
|
33696
33696
|
"EINVAL",
|
|
@@ -34309,7 +34309,7 @@ __webpack_require__.add({
|
|
|
34309
34309
|
2071 (module, __unused_rspack_exports, __webpack_require__) {
|
|
34310
34310
|
var process = __webpack_require__(85409);
|
|
34311
34311
|
const { EventEmitter } = __webpack_require__(80381);
|
|
34312
|
-
const fs = __webpack_require__(
|
|
34312
|
+
const fs = __webpack_require__(55016);
|
|
34313
34313
|
const path = __webpack_require__(13078);
|
|
34314
34314
|
const reducePlan = __webpack_require__(92322);
|
|
34315
34315
|
const IS_OSX = "darwin" === __webpack_require__(35207).iD();
|
|
@@ -34554,7 +34554,7 @@ __webpack_require__.add({
|
|
|
34554
34554
|
};
|
|
34555
34555
|
},
|
|
34556
34556
|
45250 (module, __unused_rspack_exports, __webpack_require__) {
|
|
34557
|
-
var Buffer = __webpack_require__(
|
|
34557
|
+
var Buffer = __webpack_require__(98041).h;
|
|
34558
34558
|
const Source = __webpack_require__(16604);
|
|
34559
34559
|
const streamAndGetSourceAndMap = __webpack_require__(57404);
|
|
34560
34560
|
const streamChunksOfRawSource = __webpack_require__(16689);
|
|
@@ -34845,7 +34845,7 @@ __webpack_require__.add({
|
|
|
34845
34845
|
module.exports = CompatSource;
|
|
34846
34846
|
},
|
|
34847
34847
|
40884 (module, __unused_rspack_exports, __webpack_require__) {
|
|
34848
|
-
var Buffer = __webpack_require__(
|
|
34848
|
+
var Buffer = __webpack_require__(98041).h;
|
|
34849
34849
|
const RawSource = __webpack_require__(82386);
|
|
34850
34850
|
const Source = __webpack_require__(16604);
|
|
34851
34851
|
const { getMap, getSourceAndMap } = __webpack_require__(34681);
|
|
@@ -35069,7 +35069,7 @@ __webpack_require__.add({
|
|
|
35069
35069
|
module.exports = ConcatSource;
|
|
35070
35070
|
},
|
|
35071
35071
|
65963 (module, __unused_rspack_exports, __webpack_require__) {
|
|
35072
|
-
var Buffer = __webpack_require__(
|
|
35072
|
+
var Buffer = __webpack_require__(98041).h;
|
|
35073
35073
|
const Source = __webpack_require__(16604);
|
|
35074
35074
|
const { getMap, getSourceAndMap } = __webpack_require__(34681);
|
|
35075
35075
|
const getGeneratedSourceInfo = __webpack_require__(68811);
|
|
@@ -35196,7 +35196,7 @@ __webpack_require__.add({
|
|
|
35196
35196
|
module.exports = OriginalSource;
|
|
35197
35197
|
},
|
|
35198
35198
|
55424 (module, __unused_rspack_exports, __webpack_require__) {
|
|
35199
|
-
var Buffer = __webpack_require__(
|
|
35199
|
+
var Buffer = __webpack_require__(98041).h;
|
|
35200
35200
|
const RawSource = __webpack_require__(82386);
|
|
35201
35201
|
const Source = __webpack_require__(16604);
|
|
35202
35202
|
const { getMap, getSourceAndMap } = __webpack_require__(34681);
|
|
@@ -35267,7 +35267,7 @@ __webpack_require__.add({
|
|
|
35267
35267
|
module.exports = PrefixSource;
|
|
35268
35268
|
},
|
|
35269
35269
|
82386 (module, __unused_rspack_exports, __webpack_require__) {
|
|
35270
|
-
var Buffer = __webpack_require__(
|
|
35270
|
+
var Buffer = __webpack_require__(98041).h;
|
|
35271
35271
|
const Source = __webpack_require__(16604);
|
|
35272
35272
|
const streamChunksOfRawSource = __webpack_require__(16689);
|
|
35273
35273
|
const { internString, isDualStringBufferCachingEnabled } = __webpack_require__(5895);
|
|
@@ -35667,7 +35667,7 @@ __webpack_require__.add({
|
|
|
35667
35667
|
module.exports = SizeOnlySource;
|
|
35668
35668
|
},
|
|
35669
35669
|
16604 (module, __unused_rspack_exports, __webpack_require__) {
|
|
35670
|
-
var Buffer = __webpack_require__(
|
|
35670
|
+
var Buffer = __webpack_require__(98041).h;
|
|
35671
35671
|
class Source {
|
|
35672
35672
|
source() {
|
|
35673
35673
|
throw new Error("Abstract");
|
|
@@ -35702,7 +35702,7 @@ __webpack_require__.add({
|
|
|
35702
35702
|
module.exports = Source;
|
|
35703
35703
|
},
|
|
35704
35704
|
17061 (module, __unused_rspack_exports, __webpack_require__) {
|
|
35705
|
-
var Buffer = __webpack_require__(
|
|
35705
|
+
var Buffer = __webpack_require__(98041).h;
|
|
35706
35706
|
const Source = __webpack_require__(16604);
|
|
35707
35707
|
const { getMap, getSourceAndMap } = __webpack_require__(34681);
|
|
35708
35708
|
const streamChunksOfCombinedSourceMap = __webpack_require__(50226);
|
|
@@ -36848,16 +36848,16 @@ __webpack_require__.add({
|
|
|
36848
36848
|
return target;
|
|
36849
36849
|
}
|
|
36850
36850
|
},
|
|
36851
|
-
|
|
36852
|
-
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__(
|
|
36851
|
+
98041 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
36852
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__(50860);
|
|
36853
36853
|
__webpack_require__.d(__webpack_exports__, {
|
|
36854
36854
|
h: ()=>_napi_rs_wasm_runtime_fs__rspack_import_0.hp
|
|
36855
36855
|
});
|
|
36856
36856
|
},
|
|
36857
|
-
|
|
36857
|
+
55016 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
36858
36858
|
__webpack_require__.r(__webpack_exports__);
|
|
36859
|
-
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__(
|
|
36860
|
-
var _rspack_binding__rspack_import_1 = __webpack_require__(
|
|
36859
|
+
var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__(50860);
|
|
36860
|
+
var _rspack_binding__rspack_import_1 = __webpack_require__(30977);
|
|
36861
36861
|
const fs = _rspack_binding__rspack_import_1.__fs;
|
|
36862
36862
|
const volume = _rspack_binding__rspack_import_1.__volume;
|
|
36863
36863
|
const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
|
|
@@ -36876,7 +36876,7 @@ __webpack_require__.add({
|
|
|
36876
36876
|
watch: watch
|
|
36877
36877
|
});
|
|
36878
36878
|
},
|
|
36879
|
-
|
|
36879
|
+
30977 (module) {
|
|
36880
36880
|
module.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
|
|
36881
36881
|
},
|
|
36882
36882
|
39699 () {},
|
|
@@ -36896,7 +36896,7 @@ __webpack_require__.add({
|
|
|
36896
36896
|
return out;
|
|
36897
36897
|
};
|
|
36898
36898
|
},
|
|
36899
|
-
|
|
36899
|
+
50860 (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36900
36900
|
function _mergeNamespaces(n, m) {
|
|
36901
36901
|
m.forEach(function(e) {
|
|
36902
36902
|
e && 'string' != typeof e && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
@@ -56657,7 +56657,7 @@ function createFakeCompilationDependencies(getDeps, addDeps) {
|
|
|
56657
56657
|
};
|
|
56658
56658
|
}
|
|
56659
56659
|
const webpack_sources_lib = __webpack_require__("72105");
|
|
56660
|
-
var Buffer = __webpack_require__(
|
|
56660
|
+
var Buffer = __webpack_require__(98041).h;
|
|
56661
56661
|
class SourceAdapter {
|
|
56662
56662
|
static fromBinding(source) {
|
|
56663
56663
|
if (!source.map) return new webpack_sources_lib.RawSource(source.source);
|
|
@@ -58241,7 +58241,7 @@ function applyLimits(options) {
|
|
|
58241
58241
|
base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EsmNodeTargetPlugin, ()=>void 0);
|
|
58242
58242
|
const EvalDevToolModulePlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, 'compilation');
|
|
58243
58243
|
const EvalSourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, 'compilation');
|
|
58244
|
-
var util_Buffer = __webpack_require__(
|
|
58244
|
+
var util_Buffer = __webpack_require__(98041).h;
|
|
58245
58245
|
function isNil(value) {
|
|
58246
58246
|
return null == value;
|
|
58247
58247
|
}
|
|
@@ -59382,7 +59382,7 @@ const memoizeFn = (fn)=>{
|
|
|
59382
59382
|
return cache(...args);
|
|
59383
59383
|
};
|
|
59384
59384
|
};
|
|
59385
|
-
var HttpUriPlugin_Buffer = __webpack_require__(
|
|
59385
|
+
var HttpUriPlugin_Buffer = __webpack_require__(98041).h;
|
|
59386
59386
|
memoize(()=>__webpack_require__(87069));
|
|
59387
59387
|
memoize(()=>__webpack_require__(84033));
|
|
59388
59388
|
const defaultHttpClientForBrowser = async (url, headers)=>{
|
|
@@ -59468,7 +59468,7 @@ const getPluginHooks = (compilation)=>{
|
|
|
59468
59468
|
const cleanPluginHooks = (compilation)=>{
|
|
59469
59469
|
hooks_compilationHooksMap.delete(compilation);
|
|
59470
59470
|
};
|
|
59471
|
-
const fs_0 = __webpack_require__("
|
|
59471
|
+
const fs_0 = __webpack_require__("55016");
|
|
59472
59472
|
var plugin_process = __webpack_require__(85409);
|
|
59473
59473
|
let HTML_PLUGIN_UID = 0;
|
|
59474
59474
|
const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
|
@@ -59951,7 +59951,7 @@ class Hash {
|
|
|
59951
59951
|
throw new AbstractMethodError();
|
|
59952
59952
|
}
|
|
59953
59953
|
}
|
|
59954
|
-
var wasm_hash_Buffer = __webpack_require__(
|
|
59954
|
+
var wasm_hash_Buffer = __webpack_require__(98041).h;
|
|
59955
59955
|
const MAX_SHORT_STRING = -4 & Math.floor(16368);
|
|
59956
59956
|
class WasmHash {
|
|
59957
59957
|
exports;
|
|
@@ -60070,7 +60070,7 @@ const wasm_hash_create = (wasmModule, instancesPool, chunkSize, digestSize)=>{
|
|
|
60070
60070
|
return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
|
|
60071
60071
|
};
|
|
60072
60072
|
const wasm_hash = wasm_hash_create;
|
|
60073
|
-
var md4_Buffer = __webpack_require__(
|
|
60073
|
+
var md4_Buffer = __webpack_require__(98041).h;
|
|
60074
60074
|
let createMd4;
|
|
60075
60075
|
const hash_md4 = ()=>{
|
|
60076
60076
|
if (!createMd4) {
|
|
@@ -60079,7 +60079,7 @@ const hash_md4 = ()=>{
|
|
|
60079
60079
|
}
|
|
60080
60080
|
return createMd4();
|
|
60081
60081
|
};
|
|
60082
|
-
var xxhash64_Buffer = __webpack_require__(
|
|
60082
|
+
var xxhash64_Buffer = __webpack_require__(98041).h;
|
|
60083
60083
|
let createXxhash64;
|
|
60084
60084
|
const hash_xxhash64 = ()=>{
|
|
60085
60085
|
if (!createXxhash64) {
|
|
@@ -60088,7 +60088,7 @@ const hash_xxhash64 = ()=>{
|
|
|
60088
60088
|
}
|
|
60089
60089
|
return createXxhash64();
|
|
60090
60090
|
};
|
|
60091
|
-
var createHash_Buffer = __webpack_require__(
|
|
60091
|
+
var createHash_Buffer = __webpack_require__(98041).h;
|
|
60092
60092
|
const BULK_SIZE = 2000;
|
|
60093
60093
|
const digestCaches = {};
|
|
60094
60094
|
class BulkUpdateDecorator extends Hash {
|
|
@@ -60243,7 +60243,7 @@ function handleResult(loader, module, callback) {
|
|
|
60243
60243
|
if ('function' != typeof loader.normal && 'function' != typeof loader.pitch) return callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`));
|
|
60244
60244
|
callback();
|
|
60245
60245
|
}
|
|
60246
|
-
var utils_Buffer = __webpack_require__(
|
|
60246
|
+
var utils_Buffer = __webpack_require__(98041).h;
|
|
60247
60247
|
const decoder = new TextDecoder();
|
|
60248
60248
|
function utf8BufferToString(buf) {
|
|
60249
60249
|
const isShared = buf.buffer instanceof SharedArrayBuffer || buf.buffer.constructor?.name === 'SharedArrayBuffer';
|
|
@@ -61387,7 +61387,7 @@ const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPlug
|
|
|
61387
61387
|
};
|
|
61388
61388
|
});
|
|
61389
61389
|
const SourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, 'compilation');
|
|
61390
|
-
var SubresourceIntegrityPlugin_Buffer = __webpack_require__(
|
|
61390
|
+
var SubresourceIntegrityPlugin_Buffer = __webpack_require__(98041).h;
|
|
61391
61391
|
const SubresourceIntegrityPlugin_PLUGIN_NAME = 'SubresourceIntegrityPlugin';
|
|
61392
61392
|
const NATIVE_HTML_PLUGIN = 'HtmlRspackPlugin';
|
|
61393
61393
|
const HTTP_PROTOCOL_REGEX = /^https?:/;
|
|
@@ -63610,7 +63610,7 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
|
|
|
63610
63610
|
});
|
|
63611
63611
|
D(output, 'bundlerInfo', {});
|
|
63612
63612
|
if ('object' == typeof output.bundlerInfo) {
|
|
63613
|
-
D(output.bundlerInfo, 'version', "2.1.
|
|
63613
|
+
D(output.bundlerInfo, 'version', "2.1.2");
|
|
63614
63614
|
D(output.bundlerInfo, 'bundler', 'rspack');
|
|
63615
63615
|
D(output.bundlerInfo, 'force', false);
|
|
63616
63616
|
}
|
|
@@ -64631,7 +64631,7 @@ const mkdirp = (fs, p, callback)=>{
|
|
|
64631
64631
|
callback();
|
|
64632
64632
|
});
|
|
64633
64633
|
};
|
|
64634
|
-
var FileSystem_Buffer = __webpack_require__(
|
|
64634
|
+
var FileSystem_Buffer = __webpack_require__(98041).h;
|
|
64635
64635
|
const BUFFER_SIZE = 1000;
|
|
64636
64636
|
const ASYNC_NOOP = async ()=>{};
|
|
64637
64637
|
const NOOP_FILESYSTEM = {
|
|
@@ -65318,7 +65318,7 @@ class MultiStats {
|
|
|
65318
65318
|
return obj;
|
|
65319
65319
|
});
|
|
65320
65320
|
if (childOptions.version) {
|
|
65321
|
-
obj.rspackVersion = "2.1.
|
|
65321
|
+
obj.rspackVersion = "2.1.2";
|
|
65322
65322
|
obj.version = "5.75.0";
|
|
65323
65323
|
}
|
|
65324
65324
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -66274,7 +66274,7 @@ function nodeConsole({ colors, appendOnly, stream }) {
|
|
|
66274
66274
|
}
|
|
66275
66275
|
};
|
|
66276
66276
|
}
|
|
66277
|
-
const CachedInputFileSystem = __webpack_require__("
|
|
66277
|
+
const CachedInputFileSystem = __webpack_require__("16229");
|
|
66278
66278
|
var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
|
|
66279
66279
|
class NodeEnvironmentPlugin {
|
|
66280
66280
|
options;
|
|
@@ -67103,7 +67103,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
67103
67103
|
},
|
|
67104
67104
|
version: (object)=>{
|
|
67105
67105
|
object.version = "5.75.0";
|
|
67106
|
-
object.rspackVersion = "2.1.
|
|
67106
|
+
object.rspackVersion = "2.1.2";
|
|
67107
67107
|
},
|
|
67108
67108
|
env: (object, _compilation, _context, { _env })=>{
|
|
67109
67109
|
object.env = _env;
|
|
@@ -69000,7 +69000,7 @@ const createHtmlPluginHooksRegisters = (getCompiler, createTap)=>{
|
|
|
69000
69000
|
})
|
|
69001
69001
|
};
|
|
69002
69002
|
};
|
|
69003
|
-
var compilation_Buffer = __webpack_require__(
|
|
69003
|
+
var compilation_Buffer = __webpack_require__(98041).h;
|
|
69004
69004
|
class CodeGenerationResult {
|
|
69005
69005
|
#inner;
|
|
69006
69006
|
constructor(result){
|
|
@@ -69477,7 +69477,7 @@ const createContextModuleFactoryHooksRegisters = (getCompiler, createTap)=>({
|
|
|
69477
69477
|
};
|
|
69478
69478
|
})
|
|
69479
69479
|
});
|
|
69480
|
-
var javascriptModules_Buffer = __webpack_require__(
|
|
69480
|
+
var javascriptModules_Buffer = __webpack_require__(98041).h;
|
|
69481
69481
|
const createJavaScriptModulesHooksRegisters = (getCompiler, createTap)=>({
|
|
69482
69482
|
registerJavascriptModulesChunkHashTaps: createTap(rspack_wasi_browser.RegisterJsTapKind.JavascriptModulesChunkHash, function() {
|
|
69483
69483
|
return JavascriptModulesPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).chunkHash;
|
|
@@ -70392,7 +70392,7 @@ class Compiler {
|
|
|
70392
70392
|
this.#rawOptions = getRawOptions(options, this);
|
|
70393
70393
|
this.#rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
|
|
70394
70394
|
this.#rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
70395
|
-
const instanceBinding = __webpack_require__(
|
|
70395
|
+
const instanceBinding = __webpack_require__(30977);
|
|
70396
70396
|
this.#registers = this.#createHooksRegisters();
|
|
70397
70397
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
70398
70398
|
try {
|
|
@@ -71862,13 +71862,9 @@ function getDefaultEntryRuntimeSource(paths, options, compiler, treeShakingShare
|
|
|
71862
71862
|
const paramsCode = void 0 === pluginParams ? 'undefined' : JSON.stringify(pluginParams);
|
|
71863
71863
|
runtimePluginVars.push(`{ plugin: ${runtimePluginVar}, params: ${paramsCode} }`);
|
|
71864
71864
|
}
|
|
71865
|
-
const defaultRuntimeSource =
|
|
71866
|
-
var e = new Error("Cannot find module './moduleFederationDefaultRuntime.js'");
|
|
71867
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
71868
|
-
throw e;
|
|
71869
|
-
}())));
|
|
71865
|
+
const defaultRuntimeSource = 'const runtimeRequire=__module_federation_runtime_require__;if((runtimeRequire.initializeSharingData||runtimeRequire.initializeExposesData)&&runtimeRequire.federation){var _ref,_ref1,_ref2,_ref3,_ref4;var _runtimeRequire_remotesLoadingData,_runtimeRequire_remotesLoadingData1,_runtimeRequire_initializeSharingData,_runtimeRequire_consumesLoadingData,_runtimeRequire_consumesLoadingData1,_runtimeRequire_initializeExposesData,_runtimeRequire_consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1,_1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};const remotesLoadingChunkMapping=(_ref=(_runtimeRequire_remotesLoadingData=runtimeRequire.remotesLoadingData)===null||_runtimeRequire_remotesLoadingData===void 0?void 0:_runtimeRequire_remotesLoadingData.chunkMapping)!==null&&_ref!==void 0?_ref:{};const remotesLoadingModuleIdToRemoteDataMapping=(_ref1=(_runtimeRequire_remotesLoadingData1=runtimeRequire.remotesLoadingData)===null||_runtimeRequire_remotesLoadingData1===void 0?void 0:_runtimeRequire_remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&_ref1!==void 0?_ref1:{};const initializeSharingScopeToInitDataMapping=(_ref2=(_runtimeRequire_initializeSharingData=runtimeRequire.initializeSharingData)===null||_runtimeRequire_initializeSharingData===void 0?void 0:_runtimeRequire_initializeSharingData.scopeToSharingDataMapping)!==null&&_ref2!==void 0?_ref2:{};const consumesLoadingChunkMapping=(_ref3=(_runtimeRequire_consumesLoadingData=runtimeRequire.consumesLoadingData)===null||_runtimeRequire_consumesLoadingData===void 0?void 0:_runtimeRequire_consumesLoadingData.chunkMapping)!==null&&_ref3!==void 0?_ref3:{};const consumesLoadingModuleToConsumeDataMapping=(_ref4=(_runtimeRequire_consumesLoadingData1=runtimeRequire.consumesLoadingData)===null||_runtimeRequire_consumesLoadingData1===void 0?void 0:_runtimeRequire_consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&_ref4!==void 0?_ref4:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(_runtimeRequire_initializeExposesData=runtimeRequire.initializeExposesData)===null||_runtimeRequire_initializeExposesData===void 0?void 0:_runtimeRequire_initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){runtimeRequire.federation[key]=__module_federation_bundler_runtime__[key]}early(runtimeRequire.federation,"libraryType",()=>__module_federation_library_type__);early(runtimeRequire.federation,"sharedFallback",()=>__module_federation_share_fallbacks__);const sharedFallback=runtimeRequire.federation.sharedFallback;early(runtimeRequire.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){var _runtimeRequire_federation_bundlerRuntime;consumesLoadingModuleToHandlerMapping[moduleId]={getter:sharedFallback?(_runtimeRequire_federation_bundlerRuntime=runtimeRequire.federation.bundlerRuntime)===null||_runtimeRequire_federation_bundlerRuntime===void 0?void 0:_runtimeRequire_federation_bundlerRuntime.getSharedFallbackGetter({shareKey:data.shareKey,factory:data.fallback,webpackRequire:runtimeRequire,libraryType:runtimeRequire.federation.libraryType}):data.fallback,treeShakingGetter:sharedFallback?data.fallback:undefined,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey,treeShaking:runtimeRequire.federation.sharedFallback?{get:data.fallback,mode:data.treeShakingMode}:undefined}}return consumesLoadingModuleToHandlerMapping});early(runtimeRequire.federation,"initOptions",()=>({}));early(runtimeRequire.federation.initOptions,"name",()=>__module_federation_container_name__);early(runtimeRequire.federation.initOptions,"shareStrategy",()=>__module_federation_share_strategy__);early(runtimeRequire.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion,treeShakingMode}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!=="undefined"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory,treeShaking:treeShakingMode?{mode:treeShakingMode}:undefined};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(runtimeRequire.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(runtimeRequire.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(runtimeRequire.federation,"bundlerRuntimeOptions",()=>({}));early(runtimeRequire.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(runtimeRequire.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(runtimeRequire.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>__module_federation_remote_infos__);early(runtimeRequire.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(runtimeRequire.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>runtimeRequire);merge(runtimeRequire.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(runtimeRequire,"S",runtimeRequire.federation.bundlerRuntime.S);if(runtimeRequire.federation.attachShareScopeMap){runtimeRequire.federation.attachShareScopeMap(runtimeRequire)}override(runtimeRequire.f,"remotes",(chunkId,promises)=>runtimeRequire.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:runtimeRequire.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:runtimeRequire.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:runtimeRequire}));override(runtimeRequire.f,"consumes",(chunkId,promises)=>runtimeRequire.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:runtimeRequire.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:runtimeRequire}));override(runtimeRequire,"I",(name,initScope)=>runtimeRequire.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:runtimeRequire}));override(runtimeRequire,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>runtimeRequire.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:runtimeRequire}));override(runtimeRequire,"getContainer",(module,getScope)=>{var moduleMap=runtimeRequire.initializeExposesData.moduleMap;runtimeRequire.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module)?moduleMap[module]():Promise.resolve().then(()=>{throw new Error(\'Module "\'+module+\'" does not exist in container.\')});runtimeRequire.R=undefined;return getScope});runtimeRequire.federation.instance=runtimeRequire.federation.bundlerRuntime.init({webpackRequire:runtimeRequire});if((_runtimeRequire_consumesLoadingData2=runtimeRequire.consumesLoadingData)===null||_runtimeRequire_consumesLoadingData2===void 0?void 0:_runtimeRequire_consumesLoadingData2.initialConsumes){runtimeRequire.federation.bundlerRuntime.installInitialConsumes({webpackRequire:runtimeRequire,installedModules:consumesLoadinginstalledModules,initialConsumes:runtimeRequire.consumesLoadingData.initialConsumes,moduleToHandlerMapping:runtimeRequire.federation.consumesLoadingModuleToHandlerMapping})}}';
|
|
71870
71866
|
const compilerRuntimeGlobals = createCompilerRuntimeGlobals(compiler.options);
|
|
71871
|
-
getDefaultRuntimeSource(defaultRuntimeSource, 'rspack' === compiler.options.experiments.runtimeMode ? `new Proxy(function (moduleId) {
|
|
71867
|
+
const runtimeSource = getDefaultRuntimeSource(defaultRuntimeSource, 'rspack' === compiler.options.experiments.runtimeMode ? `new Proxy(function (moduleId) {
|
|
71872
71868
|
return ${compilerRuntimeGlobals.require}(moduleId);
|
|
71873
71869
|
}, {
|
|
71874
71870
|
get(_target, key) {
|
|
@@ -71889,7 +71885,7 @@ function getDefaultEntryRuntimeSource(paths, options, compiler, treeShakingShare
|
|
|
71889
71885
|
`const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? 'version-first')}`,
|
|
71890
71886
|
`const __module_federation_share_fallbacks__ = ${JSON.stringify(treeShakingShareFallbacks)}`,
|
|
71891
71887
|
`const __module_federation_library_type__ = ${JSON.stringify(libraryType)}`,
|
|
71892
|
-
|
|
71888
|
+
runtimeSource
|
|
71893
71889
|
].join(';');
|
|
71894
71890
|
return content;
|
|
71895
71891
|
}
|
|
@@ -72063,7 +72059,7 @@ function transformSync(source, options) {
|
|
|
72063
72059
|
const _options = JSON.stringify(options || {});
|
|
72064
72060
|
return rspack_wasi_browser.transformSync(source, _options);
|
|
72065
72061
|
}
|
|
72066
|
-
const exports_rspackVersion = "2.1.
|
|
72062
|
+
const exports_rspackVersion = "2.1.2";
|
|
72067
72063
|
const exports_version = "5.75.0";
|
|
72068
72064
|
const exports_WebpackError = Error;
|
|
72069
72065
|
const exports_config = {
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -1189,7 +1189,7 @@ export interface JsRsdoctorModuleGraph {
|
|
|
1189
1189
|
dependencies: Array<JsRsdoctorDependency>
|
|
1190
1190
|
chunkModules: Array<JsRsdoctorChunkModules>
|
|
1191
1191
|
connectionsOnlyImports: Array<JsRsdoctorConnectionsOnlyImport>
|
|
1192
|
-
exportUsageEdges: Array<[number, Array<string> | null, number, Array<string> | null]>
|
|
1192
|
+
exportUsageEdges: Array<[number, Array<string> | null, number, Array<string> | null, string, string | null]>
|
|
1193
1193
|
}
|
|
1194
1194
|
|
|
1195
1195
|
export interface JsRsdoctorModuleGraphModule {
|
|
Binary file
|
package/dist/util/hash/md4.d.ts
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
declare const _default: () => import("./wasm-hash").WasmHash;
|
|
11
10
|
export default _default;
|
|
11
|
+
declare function _default(): import("./wasm-hash").WasmHash;
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
declare const _default: () => import("./wasm-hash").WasmHash;
|
|
11
10
|
export default _default;
|
|
11
|
+
declare function _default(): import("./wasm-hash").WasmHash;
|
|
@@ -7851,8 +7851,18 @@
|
|
|
7851
7851
|
const _memory = new WeakMap();
|
|
7852
7852
|
const _wasi = new WeakMap();
|
|
7853
7853
|
const _fs = new WeakMap();
|
|
7854
|
-
function
|
|
7855
|
-
|
|
7854
|
+
function ensureMemoryFor(memory, end) {
|
|
7855
|
+
let buffer = memory.buffer;
|
|
7856
|
+
if (end > buffer.byteLength) {
|
|
7857
|
+
memory.grow(0);
|
|
7858
|
+
buffer = memory.buffer;
|
|
7859
|
+
}
|
|
7860
|
+
return buffer;
|
|
7861
|
+
}
|
|
7862
|
+
function wasm_util_esm_bundler_getMemory(wasi, end = 0) {
|
|
7863
|
+
const memory = _memory.get(wasi);
|
|
7864
|
+
ensureMemoryFor(memory, end);
|
|
7865
|
+
return memory;
|
|
7856
7866
|
}
|
|
7857
7867
|
function getFs(wasi) {
|
|
7858
7868
|
const fs = _fs.get(wasi);
|
|
@@ -7965,9 +7975,10 @@
|
|
|
7965
7975
|
argv = Number(argv);
|
|
7966
7976
|
argv_buf = Number(argv_buf);
|
|
7967
7977
|
if (0 === argv || 0 === argv_buf) return 28;
|
|
7968
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
7969
7978
|
const wasi = _wasi.get(this);
|
|
7970
7979
|
const args = wasi.args;
|
|
7980
|
+
const argsSize = wasm_util_esm_bundler_encoder.encode(args.join('\0') + '\0').length;
|
|
7981
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(argv + 4 * args.length, argv_buf + argsSize));
|
|
7971
7982
|
for(let i = 0; i < args.length; ++i){
|
|
7972
7983
|
const arg = args[i];
|
|
7973
7984
|
view.setInt32(argv, argv_buf, true);
|
|
@@ -7982,7 +7993,7 @@
|
|
|
7982
7993
|
argc = Number(argc);
|
|
7983
7994
|
argv_buf_size = Number(argv_buf_size);
|
|
7984
7995
|
if (0 === argc || 0 === argv_buf_size) return 28;
|
|
7985
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
7996
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, Math.max(argc + 4, argv_buf_size + 4));
|
|
7986
7997
|
const wasi = _wasi.get(this);
|
|
7987
7998
|
const args = wasi.args;
|
|
7988
7999
|
view.setUint32(argc, args.length, true);
|
|
@@ -7993,9 +8004,10 @@
|
|
|
7993
8004
|
environ = Number(environ);
|
|
7994
8005
|
environ_buf = Number(environ_buf);
|
|
7995
8006
|
if (0 === environ || 0 === environ_buf) return 28;
|
|
7996
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
7997
8007
|
const wasi = _wasi.get(this);
|
|
7998
8008
|
const env = wasi.env;
|
|
8009
|
+
const envSize = wasm_util_esm_bundler_encoder.encode(env.join('\0') + '\0').length;
|
|
8010
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(environ + 4 * env.length, environ_buf + envSize));
|
|
7999
8011
|
for(let i = 0; i < env.length; ++i){
|
|
8000
8012
|
const pair = env[i];
|
|
8001
8013
|
view.setInt32(environ, environ_buf, true);
|
|
@@ -8010,7 +8022,7 @@
|
|
|
8010
8022
|
len = Number(len);
|
|
8011
8023
|
buflen = Number(buflen);
|
|
8012
8024
|
if (0 === len || 0 === buflen) return 28;
|
|
8013
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8025
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, Math.max(len + 4, buflen + 4));
|
|
8014
8026
|
const wasi = _wasi.get(this);
|
|
8015
8027
|
view.setUint32(len, wasi.env.length, true);
|
|
8016
8028
|
view.setUint32(buflen, wasm_util_esm_bundler_encoder.encode(wasi.env.join('\0') + '\0').length, true);
|
|
@@ -8019,7 +8031,7 @@
|
|
|
8019
8031
|
this.clock_res_get = syscallWrap(this, 'clock_res_get', function(id, resolution) {
|
|
8020
8032
|
resolution = Number(resolution);
|
|
8021
8033
|
if (0 === resolution) return 28;
|
|
8022
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8034
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, resolution + 8);
|
|
8023
8035
|
switch(id){
|
|
8024
8036
|
case 0:
|
|
8025
8037
|
view.setBigUint64(resolution, BigInt(1000000), true);
|
|
@@ -8036,7 +8048,7 @@
|
|
|
8036
8048
|
this.clock_time_get = syscallWrap(this, 'clock_time_get', function(id, _percision, time) {
|
|
8037
8049
|
time = Number(time);
|
|
8038
8050
|
if (0 === time) return 28;
|
|
8039
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8051
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, time + 8);
|
|
8040
8052
|
switch(id){
|
|
8041
8053
|
case 0:
|
|
8042
8054
|
view.setBigUint64(time, BigInt(Date.now()) * BigInt(1000000), true);
|
|
@@ -8064,7 +8076,7 @@
|
|
|
8064
8076
|
if (0 === fdstat) return 28;
|
|
8065
8077
|
const wasi = _wasi.get(this);
|
|
8066
8078
|
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
8067
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8079
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, fdstat + 24);
|
|
8068
8080
|
view.setUint16(fdstat, fileDescriptor.type, true);
|
|
8069
8081
|
view.setUint16(fdstat + 2, 0, true);
|
|
8070
8082
|
view.setBigUint64(fdstat + 8, fileDescriptor.rightsBase, true);
|
|
@@ -8095,7 +8107,7 @@
|
|
|
8095
8107
|
throw err;
|
|
8096
8108
|
}
|
|
8097
8109
|
if (1 !== fileDescriptor.preopen) return 28;
|
|
8098
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8110
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, prestat + 8);
|
|
8099
8111
|
view.setUint32(prestat, 0, true);
|
|
8100
8112
|
view.setUint32(prestat + 4, wasm_util_esm_bundler_encoder.encode(fileDescriptor.path).length, true);
|
|
8101
8113
|
return 0;
|
|
@@ -8110,7 +8122,7 @@
|
|
|
8110
8122
|
const buffer = wasm_util_esm_bundler_encoder.encode(fileDescriptor.path);
|
|
8111
8123
|
const size = buffer.length;
|
|
8112
8124
|
if (size > path_len) return 42;
|
|
8113
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8125
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + size);
|
|
8114
8126
|
HEAPU8.set(buffer, path);
|
|
8115
8127
|
return 0;
|
|
8116
8128
|
});
|
|
@@ -8121,7 +8133,7 @@
|
|
|
8121
8133
|
const wasi = _wasi.get(this);
|
|
8122
8134
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_SEEK, BigInt(0));
|
|
8123
8135
|
const r = fileDescriptor.seek(offset, whence);
|
|
8124
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8136
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, newOffset + 8);
|
|
8125
8137
|
view.setBigUint64(newOffset, r, true);
|
|
8126
8138
|
return 0;
|
|
8127
8139
|
});
|
|
@@ -8129,7 +8141,7 @@
|
|
|
8129
8141
|
const wasi = _wasi.get(this);
|
|
8130
8142
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_TELL, BigInt(0));
|
|
8131
8143
|
const pos = BigInt(fileDescriptor.pos);
|
|
8132
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8144
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, Number(offset) + 8);
|
|
8133
8145
|
view.setBigUint64(Number(offset), pos, true);
|
|
8134
8146
|
return 0;
|
|
8135
8147
|
});
|
|
@@ -8140,7 +8152,7 @@
|
|
|
8140
8152
|
nsubscriptions = Number(nsubscriptions);
|
|
8141
8153
|
nsubscriptions >>>= 0;
|
|
8142
8154
|
if (0 === in_ptr || 0 === out_ptr || 0 === nsubscriptions || 0 === nevents) return 28;
|
|
8143
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8155
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, Math.max(in_ptr + 48 * nsubscriptions, out_ptr + 32 * nsubscriptions, nevents + 4));
|
|
8144
8156
|
view.setUint32(nevents, 0, true);
|
|
8145
8157
|
let i = 0;
|
|
8146
8158
|
let timer_userdata = BigInt(0);
|
|
@@ -8235,7 +8247,7 @@
|
|
|
8235
8247
|
buf = Number(buf);
|
|
8236
8248
|
if (0 === buf) return 28;
|
|
8237
8249
|
buf_len = Number(buf_len);
|
|
8238
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8250
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, buf + buf_len);
|
|
8239
8251
|
if ('function' == typeof SharedArrayBuffer && HEAPU8.buffer instanceof SharedArrayBuffer || '[object SharedArrayBuffer]' === Object.prototype.toString.call(HEAPU8.buffer)) {
|
|
8240
8252
|
for(let i = buf; i < buf + buf_len; ++i)view.setUint8(i, Math.floor(256 * Math.random()));
|
|
8241
8253
|
return 0;
|
|
@@ -8249,7 +8261,7 @@
|
|
|
8249
8261
|
buf = Number(buf);
|
|
8250
8262
|
if (0 === buf) return 28;
|
|
8251
8263
|
buf_len = Number(buf_len);
|
|
8252
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8264
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, buf + buf_len);
|
|
8253
8265
|
for(let i = buf; i < buf + buf_len; ++i)view.setUint8(i, Math.floor(256 * Math.random()));
|
|
8254
8266
|
return 0;
|
|
8255
8267
|
});
|
|
@@ -8345,7 +8357,7 @@
|
|
|
8345
8357
|
const stat = fs.fstatSync(fileDescriptor.fd, {
|
|
8346
8358
|
bigint: true
|
|
8347
8359
|
});
|
|
8348
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8360
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, buf + 64);
|
|
8349
8361
|
toFileStat(view, buf, stat);
|
|
8350
8362
|
return 0;
|
|
8351
8363
|
}, async function(fd, buf) {
|
|
@@ -8357,7 +8369,7 @@
|
|
|
8357
8369
|
const stat = await h.stat({
|
|
8358
8370
|
bigint: true
|
|
8359
8371
|
});
|
|
8360
|
-
const { view } = wasm_util_esm_bundler_getMemory(this);
|
|
8372
|
+
const { view } = wasm_util_esm_bundler_getMemory(this, buf + 64);
|
|
8361
8373
|
toFileStat(view, buf, stat);
|
|
8362
8374
|
return 0;
|
|
8363
8375
|
}, [
|
|
@@ -8419,7 +8431,7 @@
|
|
|
8419
8431
|
iovs = Number(iovs);
|
|
8420
8432
|
size = Number(size);
|
|
8421
8433
|
if (0 === iovs && iovslen || 0 === size || offset > INT64_MAX) return 28;
|
|
8422
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8434
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8423
8435
|
const wasi = _wasi.get(this);
|
|
8424
8436
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ | WasiRights.FD_SEEK, BigInt(0));
|
|
8425
8437
|
if (!iovslen) {
|
|
@@ -8454,7 +8466,7 @@
|
|
|
8454
8466
|
iovs = Number(iovs);
|
|
8455
8467
|
size = Number(size);
|
|
8456
8468
|
if (0 === iovs && iovslen || 0 === size || offset > INT64_MAX) return 28;
|
|
8457
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8469
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8458
8470
|
const wasi = _wasi.get(this);
|
|
8459
8471
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ | WasiRights.FD_SEEK, BigInt(0));
|
|
8460
8472
|
if (!iovslen) {
|
|
@@ -8491,7 +8503,7 @@
|
|
|
8491
8503
|
iovs = Number(iovs);
|
|
8492
8504
|
size = Number(size);
|
|
8493
8505
|
if (0 === iovs && iovslen || 0 === size || offset > INT64_MAX) return 28;
|
|
8494
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8506
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8495
8507
|
const wasi = _wasi.get(this);
|
|
8496
8508
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE | WasiRights.FD_SEEK, BigInt(0));
|
|
8497
8509
|
if (!iovslen) {
|
|
@@ -8514,7 +8526,7 @@
|
|
|
8514
8526
|
iovs = Number(iovs);
|
|
8515
8527
|
size = Number(size);
|
|
8516
8528
|
if (0 === iovs && iovslen || 0 === size || offset > INT64_MAX) return 28;
|
|
8517
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8529
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8518
8530
|
const wasi = _wasi.get(this);
|
|
8519
8531
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE | WasiRights.FD_SEEK, BigInt(0));
|
|
8520
8532
|
if (!iovslen) {
|
|
@@ -8545,7 +8557,7 @@
|
|
|
8545
8557
|
iovs = Number(iovs);
|
|
8546
8558
|
size = Number(size);
|
|
8547
8559
|
if (0 === iovs && iovslen || 0 === size) return 28;
|
|
8548
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8560
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8549
8561
|
const wasi = _wasi.get(this);
|
|
8550
8562
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ, BigInt(0));
|
|
8551
8563
|
if (!iovslen) {
|
|
@@ -8588,7 +8600,7 @@
|
|
|
8588
8600
|
iovs = Number(iovs);
|
|
8589
8601
|
size = Number(size);
|
|
8590
8602
|
if (0 === iovs && iovslen || 0 === size) return 28;
|
|
8591
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8603
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8592
8604
|
const wasi = _wasi.get(this);
|
|
8593
8605
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ, BigInt(0));
|
|
8594
8606
|
if (!iovslen) {
|
|
@@ -8639,7 +8651,7 @@
|
|
|
8639
8651
|
const entries = fs.readdirSync(fileDescriptor.realPath, {
|
|
8640
8652
|
withFileTypes: true
|
|
8641
8653
|
});
|
|
8642
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8654
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(buf + buf_len, bufused + 4));
|
|
8643
8655
|
let bufferUsed = 0;
|
|
8644
8656
|
for(let i = Number(cookie); i < entries.length; i++){
|
|
8645
8657
|
const nameData = wasm_util_esm_bundler_encoder.encode(entries[i].name);
|
|
@@ -8672,7 +8684,7 @@
|
|
|
8672
8684
|
const entries = await fs.promises.readdir(fileDescriptor.realPath, {
|
|
8673
8685
|
withFileTypes: true
|
|
8674
8686
|
});
|
|
8675
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8687
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(buf + buf_len, bufused + 4));
|
|
8676
8688
|
let bufferUsed = 0;
|
|
8677
8689
|
for(let i = Number(cookie); i < entries.length; i++){
|
|
8678
8690
|
const nameData = wasm_util_esm_bundler_encoder.encode(entries[i].name);
|
|
@@ -8737,7 +8749,7 @@
|
|
|
8737
8749
|
iovs = Number(iovs);
|
|
8738
8750
|
size = Number(size);
|
|
8739
8751
|
if (0 === iovs && iovslen || 0 === size) return 28;
|
|
8740
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8752
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8741
8753
|
const wasi = _wasi.get(this);
|
|
8742
8754
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE, BigInt(0));
|
|
8743
8755
|
if (!iovslen) {
|
|
@@ -8765,7 +8777,7 @@
|
|
|
8765
8777
|
iovs = Number(iovs);
|
|
8766
8778
|
size = Number(size);
|
|
8767
8779
|
if (0 === iovs && iovslen || 0 === size) return 28;
|
|
8768
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8780
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(iovs + 8 * Number(iovslen), size + 4));
|
|
8769
8781
|
const wasi = _wasi.get(this);
|
|
8770
8782
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE, BigInt(0));
|
|
8771
8783
|
if (!iovslen) {
|
|
@@ -8800,7 +8812,7 @@
|
|
|
8800
8812
|
path = Number(path);
|
|
8801
8813
|
path_len = Number(path_len);
|
|
8802
8814
|
if (0 === path) return 28;
|
|
8803
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8815
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
8804
8816
|
const wasi = _wasi.get(this);
|
|
8805
8817
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_CREATE_DIRECTORY, BigInt(0));
|
|
8806
8818
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -8812,7 +8824,7 @@
|
|
|
8812
8824
|
path = Number(path);
|
|
8813
8825
|
path_len = Number(path_len);
|
|
8814
8826
|
if (0 === path) return 28;
|
|
8815
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8827
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
8816
8828
|
const wasi = _wasi.get(this);
|
|
8817
8829
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_CREATE_DIRECTORY, BigInt(0));
|
|
8818
8830
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -8832,7 +8844,7 @@
|
|
|
8832
8844
|
path_len = Number(path_len);
|
|
8833
8845
|
filestat = Number(filestat);
|
|
8834
8846
|
if (0 === path || 0 === filestat) return 28;
|
|
8835
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8847
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, filestat + 64));
|
|
8836
8848
|
const wasi = _wasi.get(this);
|
|
8837
8849
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_GET, BigInt(0));
|
|
8838
8850
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -8851,7 +8863,7 @@
|
|
|
8851
8863
|
path_len = Number(path_len);
|
|
8852
8864
|
filestat = Number(filestat);
|
|
8853
8865
|
if (0 === path || 0 === filestat) return 28;
|
|
8854
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
8866
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, filestat + 64));
|
|
8855
8867
|
const wasi = _wasi.get(this);
|
|
8856
8868
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_GET, BigInt(0));
|
|
8857
8869
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -8878,7 +8890,7 @@
|
|
|
8878
8890
|
path = Number(path);
|
|
8879
8891
|
path_len = Number(path_len);
|
|
8880
8892
|
if (0 === path) return 28;
|
|
8881
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8893
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
8882
8894
|
const wasi = _wasi.get(this);
|
|
8883
8895
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_SET_TIMES, BigInt(0));
|
|
8884
8896
|
if (validateFstFlagsOrReturn(fst_flags)) return 28;
|
|
@@ -8892,7 +8904,7 @@
|
|
|
8892
8904
|
path = Number(path);
|
|
8893
8905
|
path_len = Number(path_len);
|
|
8894
8906
|
if (0 === path) return 28;
|
|
8895
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8907
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
8896
8908
|
const wasi = _wasi.get(this);
|
|
8897
8909
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_SET_TIMES, BigInt(0));
|
|
8898
8910
|
if (validateFstFlagsOrReturn(fst_flags)) return 28;
|
|
@@ -8927,7 +8939,7 @@
|
|
|
8927
8939
|
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE, BigInt(0));
|
|
8928
8940
|
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
8929
8941
|
}
|
|
8930
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8942
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
8931
8943
|
const fs = getFs(this);
|
|
8932
8944
|
const resolvedOldPath = resolvePathSync(fs, oldWrap, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)), old_flags);
|
|
8933
8945
|
const resolvedNewPath = wasm_util_esm_bundler_resolve(newWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
@@ -8947,7 +8959,7 @@
|
|
|
8947
8959
|
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE, BigInt(0));
|
|
8948
8960
|
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
8949
8961
|
}
|
|
8950
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
8962
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
8951
8963
|
const fs = getFs(this);
|
|
8952
8964
|
const resolvedOldPath = await resolvePathAsync(fs, oldWrap, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)), old_flags);
|
|
8953
8965
|
const resolvedNewPath = wasm_util_esm_bundler_resolve(newWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
@@ -9008,7 +9020,7 @@
|
|
|
9008
9020
|
const { flags: flagsRes, needed_base: neededBase, needed_inheriting: neededInheriting } = pathOpen(o_flags, fs_rights_base, fs_rights_inheriting, fs_flags);
|
|
9009
9021
|
const wasi = _wasi.get(this);
|
|
9010
9022
|
const fileDescriptor = wasi.fds.get(dirfd, neededBase, neededInheriting);
|
|
9011
|
-
const memory = wasm_util_esm_bundler_getMemory(this);
|
|
9023
|
+
const memory = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, fd + 4));
|
|
9012
9024
|
const HEAPU8 = memory.HEAPU8;
|
|
9013
9025
|
const pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
9014
9026
|
const fs = getFs(this);
|
|
@@ -9038,7 +9050,7 @@
|
|
|
9038
9050
|
const { flags: flagsRes, needed_base: neededBase, needed_inheriting: neededInheriting } = pathOpen(o_flags, fs_rights_base, fs_rights_inheriting, fs_flags);
|
|
9039
9051
|
const wasi = _wasi.get(this);
|
|
9040
9052
|
const fileDescriptor = wasi.fds.get(dirfd, neededBase, neededInheriting);
|
|
9041
|
-
const memory = wasm_util_esm_bundler_getMemory(this);
|
|
9053
|
+
const memory = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, fd + 4));
|
|
9042
9054
|
const HEAPU8 = memory.HEAPU8;
|
|
9043
9055
|
const pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
9044
9056
|
const fs = getFs(this);
|
|
@@ -9078,7 +9090,7 @@
|
|
|
9078
9090
|
buf_len = Number(buf_len);
|
|
9079
9091
|
bufused = Number(bufused);
|
|
9080
9092
|
if (0 === path || 0 === buf || 0 === bufused) return 28;
|
|
9081
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
9093
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, buf + buf_len, bufused + 4));
|
|
9082
9094
|
const wasi = _wasi.get(this);
|
|
9083
9095
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_READLINK, BigInt(0));
|
|
9084
9096
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -9099,7 +9111,7 @@
|
|
|
9099
9111
|
buf_len = Number(buf_len);
|
|
9100
9112
|
bufused = Number(bufused);
|
|
9101
9113
|
if (0 === path || 0 === buf || 0 === bufused) return 28;
|
|
9102
|
-
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this);
|
|
9114
|
+
const { HEAPU8, view } = wasm_util_esm_bundler_getMemory(this, Math.max(path + path_len, buf + buf_len, bufused + 4));
|
|
9103
9115
|
const wasi = _wasi.get(this);
|
|
9104
9116
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_READLINK, BigInt(0));
|
|
9105
9117
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -9127,7 +9139,7 @@
|
|
|
9127
9139
|
path = Number(path);
|
|
9128
9140
|
path_len = Number(path_len);
|
|
9129
9141
|
if (0 === path) return 28;
|
|
9130
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9142
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
9131
9143
|
const wasi = _wasi.get(this);
|
|
9132
9144
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_REMOVE_DIRECTORY, BigInt(0));
|
|
9133
9145
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -9139,7 +9151,7 @@
|
|
|
9139
9151
|
path = Number(path);
|
|
9140
9152
|
path_len = Number(path_len);
|
|
9141
9153
|
if (0 === path) return 28;
|
|
9142
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9154
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
9143
9155
|
const wasi = _wasi.get(this);
|
|
9144
9156
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_REMOVE_DIRECTORY, BigInt(0));
|
|
9145
9157
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -9168,7 +9180,7 @@
|
|
|
9168
9180
|
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE, BigInt(0));
|
|
9169
9181
|
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
9170
9182
|
}
|
|
9171
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9183
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
9172
9184
|
const resolvedOldPath = wasm_util_esm_bundler_resolve(oldWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)));
|
|
9173
9185
|
const resolvedNewPath = wasm_util_esm_bundler_resolve(newWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
9174
9186
|
const fs = getFs(this);
|
|
@@ -9188,7 +9200,7 @@
|
|
|
9188
9200
|
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE, BigInt(0));
|
|
9189
9201
|
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
9190
9202
|
}
|
|
9191
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9203
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
9192
9204
|
const resolvedOldPath = wasm_util_esm_bundler_resolve(oldWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)));
|
|
9193
9205
|
const resolvedNewPath = wasm_util_esm_bundler_resolve(newWrap.realPath, wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
9194
9206
|
const fs = getFs(this);
|
|
@@ -9210,7 +9222,7 @@
|
|
|
9210
9222
|
new_path = Number(new_path);
|
|
9211
9223
|
new_path_len = Number(new_path_len);
|
|
9212
9224
|
if (0 === old_path || 0 === new_path) return 28;
|
|
9213
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9225
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
9214
9226
|
const wasi = _wasi.get(this);
|
|
9215
9227
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_SYMLINK, BigInt(0));
|
|
9216
9228
|
const oldPath = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len));
|
|
@@ -9226,7 +9238,7 @@
|
|
|
9226
9238
|
new_path = Number(new_path);
|
|
9227
9239
|
new_path_len = Number(new_path_len);
|
|
9228
9240
|
if (0 === old_path || 0 === new_path) return 28;
|
|
9229
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9241
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, Math.max(old_path + old_path_len, new_path + new_path_len));
|
|
9230
9242
|
const wasi = _wasi.get(this);
|
|
9231
9243
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_SYMLINK, BigInt(0));
|
|
9232
9244
|
const oldPath = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len));
|
|
@@ -9248,7 +9260,7 @@
|
|
|
9248
9260
|
path = Number(path);
|
|
9249
9261
|
path_len = Number(path_len);
|
|
9250
9262
|
if (0 === path) return 28;
|
|
9251
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9263
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
9252
9264
|
const wasi = _wasi.get(this);
|
|
9253
9265
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_UNLINK_FILE, BigInt(0));
|
|
9254
9266
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
@@ -9260,7 +9272,7 @@
|
|
|
9260
9272
|
path = Number(path);
|
|
9261
9273
|
path_len = Number(path_len);
|
|
9262
9274
|
if (0 === path) return 28;
|
|
9263
|
-
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this);
|
|
9275
|
+
const { HEAPU8 } = wasm_util_esm_bundler_getMemory(this, path + path_len);
|
|
9264
9276
|
const wasi = _wasi.get(this);
|
|
9265
9277
|
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_UNLINK_FILE, BigInt(0));
|
|
9266
9278
|
let pathString = wasm_util_esm_bundler_decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/browser",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@emnapi/core": "1.11.1",
|
|
33
33
|
"@emnapi/runtime": "1.11.1",
|
|
34
|
-
"@napi-rs/wasm-runtime": "1.1.
|
|
34
|
+
"@napi-rs/wasm-runtime": "1.1.6",
|
|
35
35
|
"@rspack/lite-tapable": "1.1.2",
|
|
36
36
|
"@swc/types": "0.1.27",
|
|
37
|
-
"memfs": "4.57.
|
|
37
|
+
"memfs": "4.57.8",
|
|
38
38
|
"webpack-sources": "3.5.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|