@utoo/web 1.0.1 → 1.0.3
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/esm/internalProject.js +5 -4
- package/esm/utoo/index.js +17 -17
- package/esm/utoo/index_bg.wasm +0 -0
- package/esm/webpackLoaders/worker/cjs.js +3 -0
- package/esm/webpackLoaders/worker/nodePolyFills.js +1 -1
- package/esm/webpackLoaders/workerContent.d.ts +1 -1
- package/esm/webpackLoaders/workerContent.js +1 -1
- package/package.json +2 -2
- /package/esm/webpackLoaders/loaders/{lessLoader → less-loader}/index.d.ts +0 -0
- /package/esm/webpackLoaders/loaders/{lessLoader → less-loader}/index.js +0 -0
- /package/esm/webpackLoaders/loaders/{lessLoader → less-loader}/options.json +0 -0
- /package/esm/webpackLoaders/loaders/{lessLoader → less-loader}/utils.d.ts +0 -0
- /package/esm/webpackLoaders/loaders/{lessLoader → less-loader}/utils.js +0 -0
package/esm/internalProject.js
CHANGED
|
@@ -20,9 +20,10 @@ const createOrScalePool = async (binding, loadersImportMap) => {
|
|
|
20
20
|
try {
|
|
21
21
|
let poolOptions = await recvPoolRequest();
|
|
22
22
|
const { filename: entrypoint, maxConcurrency } = poolOptions;
|
|
23
|
+
const concurrency = Math.max(maxConcurrency, navigator.hardwareConcurrency);
|
|
23
24
|
const workers = loaderWorkers[entrypoint] || (loaderWorkers[entrypoint] = []);
|
|
24
|
-
if (workers.length <
|
|
25
|
-
for (let i = workers.length; i <
|
|
25
|
+
if (workers.length < concurrency) {
|
|
26
|
+
for (let i = workers.length; i < concurrency; i++) {
|
|
26
27
|
nextWorkerId += 1;
|
|
27
28
|
const turbopackLoaderAssets = await getTurbopackLoaderAssets();
|
|
28
29
|
const blob = new Blob([webpackLoadersCode], {
|
|
@@ -51,8 +52,8 @@ const createOrScalePool = async (binding, loadersImportMap) => {
|
|
|
51
52
|
workers.push(worker);
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
else if (workers.length >
|
|
55
|
-
const workersToStop = workers.splice(0, workers.length -
|
|
55
|
+
else if (workers.length > concurrency) {
|
|
56
|
+
const workersToStop = workers.splice(0, workers.length - concurrency);
|
|
56
57
|
workersToStop.forEach((worker) => worker.terminate());
|
|
57
58
|
}
|
|
58
59
|
}
|
package/esm/utoo/index.js
CHANGED
|
@@ -315,15 +315,6 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
315
315
|
export function wasm_thread_entry_point(ptr) {
|
|
316
316
|
wasm.wasm_thread_entry_point(ptr);
|
|
317
317
|
}
|
|
318
|
-
function __wbg_adapter_4(arg0, arg1, arg2) {
|
|
319
|
-
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
|
|
320
|
-
}
|
|
321
|
-
function __wbg_adapter_7(arg0, arg1, arg2) {
|
|
322
|
-
wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
|
|
323
|
-
}
|
|
324
|
-
function __wbg_adapter_12(arg0, arg1) {
|
|
325
|
-
wasm.__wbindgen_export_8(arg0, arg1);
|
|
326
|
-
}
|
|
327
318
|
let stack_pointer = 128;
|
|
328
319
|
function addBorrowedObject(obj) {
|
|
329
320
|
if (stack_pointer == 1)
|
|
@@ -331,14 +322,23 @@ function addBorrowedObject(obj) {
|
|
|
331
322
|
heap[--stack_pointer] = obj;
|
|
332
323
|
return stack_pointer;
|
|
333
324
|
}
|
|
334
|
-
function
|
|
325
|
+
function __wbg_adapter_8(arg0, arg1, arg2) {
|
|
335
326
|
try {
|
|
336
|
-
wasm.
|
|
327
|
+
wasm.__wbindgen_export_6(arg0, arg1, addBorrowedObject(arg2));
|
|
337
328
|
}
|
|
338
329
|
finally {
|
|
339
330
|
heap[stack_pointer++] = undefined;
|
|
340
331
|
}
|
|
341
332
|
}
|
|
333
|
+
function __wbg_adapter_11(arg0, arg1, arg2) {
|
|
334
|
+
wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
|
|
335
|
+
}
|
|
336
|
+
function __wbg_adapter_14(arg0, arg1, arg2) {
|
|
337
|
+
wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2));
|
|
338
|
+
}
|
|
339
|
+
function __wbg_adapter_23(arg0, arg1) {
|
|
340
|
+
wasm.__wbindgen_export_9(arg0, arg1);
|
|
341
|
+
}
|
|
342
342
|
function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
|
|
343
343
|
wasm.__wbindgen_export_10(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
344
344
|
}
|
|
@@ -1627,12 +1627,12 @@ function __wbg_get_imports() {
|
|
|
1627
1627
|
};
|
|
1628
1628
|
imports.wbg.__wbindgen_cast_2aafe3a70f74f3e0 = function (arg0, arg1) {
|
|
1629
1629
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8681, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8682, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1630
|
-
const ret = makeMutClosure(arg0, arg1, 8681,
|
|
1630
|
+
const ret = makeMutClosure(arg0, arg1, 8681, __wbg_adapter_14);
|
|
1631
1631
|
return addHeapObject(ret);
|
|
1632
1632
|
};
|
|
1633
1633
|
imports.wbg.__wbindgen_cast_3bfef9a8628dc119 = function (arg0, arg1) {
|
|
1634
1634
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8688, function: Function { arguments: [], shim_idx: 600, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1635
|
-
const ret = makeMutClosure(arg0, arg1, 8688,
|
|
1635
|
+
const ret = makeMutClosure(arg0, arg1, 8688, __wbg_adapter_23);
|
|
1636
1636
|
return addHeapObject(ret);
|
|
1637
1637
|
};
|
|
1638
1638
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
|
|
@@ -1642,12 +1642,12 @@ function __wbg_get_imports() {
|
|
|
1642
1642
|
};
|
|
1643
1643
|
imports.wbg.__wbindgen_cast_4c807b347a3d0cbf = function (arg0, arg1) {
|
|
1644
1644
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 599, function: Function { arguments: [], shim_idx: 600, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1645
|
-
const ret = makeMutClosure(arg0, arg1, 599,
|
|
1645
|
+
const ret = makeMutClosure(arg0, arg1, 599, __wbg_adapter_23);
|
|
1646
1646
|
return addHeapObject(ret);
|
|
1647
1647
|
};
|
|
1648
1648
|
imports.wbg.__wbindgen_cast_5cc12922bca91779 = function (arg0, arg1) {
|
|
1649
1649
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8681, function: Function { arguments: [Externref], shim_idx: 8682, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1650
|
-
const ret = makeMutClosure(arg0, arg1, 8681,
|
|
1650
|
+
const ret = makeMutClosure(arg0, arg1, 8681, __wbg_adapter_14);
|
|
1651
1651
|
return addHeapObject(ret);
|
|
1652
1652
|
};
|
|
1653
1653
|
imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
|
|
@@ -1671,12 +1671,12 @@ function __wbg_get_imports() {
|
|
|
1671
1671
|
};
|
|
1672
1672
|
imports.wbg.__wbindgen_cast_9b1d89ef740b288c = function (arg0, arg1) {
|
|
1673
1673
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8662, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8686, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1674
|
-
const ret = makeMutClosure(arg0, arg1, 8662,
|
|
1674
|
+
const ret = makeMutClosure(arg0, arg1, 8662, __wbg_adapter_8);
|
|
1675
1675
|
return addHeapObject(ret);
|
|
1676
1676
|
};
|
|
1677
1677
|
imports.wbg.__wbindgen_cast_9c5a3d861803a5de = function (arg0, arg1) {
|
|
1678
1678
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8662, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8663, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1679
|
-
const ret = makeClosure(arg0, arg1, 8662,
|
|
1679
|
+
const ret = makeClosure(arg0, arg1, 8662, __wbg_adapter_11);
|
|
1680
1680
|
return addHeapObject(ret);
|
|
1681
1681
|
};
|
|
1682
1682
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
|
package/esm/utoo/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -50,6 +50,9 @@ export async function cjs(entrypoint, importMaps) {
|
|
|
50
50
|
return finalExports;
|
|
51
51
|
};
|
|
52
52
|
require.resolve = (request) => request;
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
// a hack for loader-runner resolving
|
|
55
|
+
self.__systemjs_require__ = require;
|
|
53
56
|
let entryPointCode;
|
|
54
57
|
for (const path in importMaps) {
|
|
55
58
|
const moduleCode = importMaps[path];
|
|
@@ -5,7 +5,7 @@ const path = require('path');
|
|
|
5
5
|
const url = require('url');
|
|
6
6
|
const util = require('util');
|
|
7
7
|
const less = require("less/lib/less-node/index.js").default;
|
|
8
|
-
const lessLoader = require("../loaders/
|
|
8
|
+
const lessLoader = require("../loaders/less-loader");
|
|
9
9
|
export default {
|
|
10
10
|
assert,
|
|
11
11
|
buffer,
|