@lynx-js/web-core-server 0.19.2 → 0.19.4
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/CHANGELOG.md +4 -0
- package/dist/27.js +11 -11
- package/dist/index.js +26 -7
- package/dist/legacy-wasm-chunk.js +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/27.js
CHANGED
|
@@ -3,7 +3,7 @@ export const __rspack_esm_ids = [
|
|
|
3
3
|
"27"
|
|
4
4
|
];
|
|
5
5
|
export const __webpack_modules__ = {
|
|
6
|
-
"../../../node_modules/.pnpm/hyphenate-style-name@1.1.0/node_modules/hyphenate-style-name/index.js" (
|
|
6
|
+
"../../../node_modules/.pnpm/hyphenate-style-name@1.1.0/node_modules/hyphenate-style-name/index.js" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
A: ()=>__rspack_default_export
|
|
9
9
|
});
|
|
@@ -20,7 +20,7 @@ export const __webpack_modules__ = {
|
|
|
20
20
|
}
|
|
21
21
|
const __rspack_default_export = hyphenateStyleName;
|
|
22
22
|
},
|
|
23
|
-
"../../../node_modules/.pnpm/wasm-feature-detect@1.8.0/node_modules/wasm-feature-detect/dist/esm/index.js" (
|
|
23
|
+
"../../../node_modules/.pnpm/wasm-feature-detect@1.8.0/node_modules/wasm-feature-detect/dist/esm/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24
24
|
__webpack_require__.d(__webpack_exports__, {
|
|
25
25
|
rO: ()=>referenceTypes
|
|
26
26
|
});
|
|
@@ -81,7 +81,7 @@ export const __webpack_modules__ = {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
|
-
"../web-mainthread-apis/binary/standard_bg.js" (
|
|
84
|
+
"../web-mainthread-apis/binary/standard_bg.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
85
85
|
__webpack_require__.d(__webpack_exports__, {
|
|
86
86
|
H4: ()=>__wbg___wbindgen_throw_b855445ff6a94295,
|
|
87
87
|
RS: ()=>__wbg_push_df81a39d04db858c,
|
|
@@ -681,7 +681,7 @@ export const __webpack_modules__ = {
|
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
683
|
},
|
|
684
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/createQueryComponent.js" (
|
|
684
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/createQueryComponent.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
685
685
|
__webpack_require__.d(__webpack_exports__, {
|
|
686
686
|
k: ()=>createQueryComponent
|
|
687
687
|
});
|
|
@@ -738,7 +738,7 @@ export const __webpack_modules__ = {
|
|
|
738
738
|
return __QueryComponentImpl;
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/registerCallLepusMethodHandler.js" (
|
|
741
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/registerCallLepusMethodHandler.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
742
742
|
__webpack_require__.d(__webpack_exports__, {
|
|
743
743
|
A: ()=>registerCallLepusMethodHandler
|
|
744
744
|
});
|
|
@@ -749,7 +749,7 @@ export const __webpack_modules__ = {
|
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
751
|
},
|
|
752
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/registerGetCustomSectionHandler.js" (
|
|
752
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/registerGetCustomSectionHandler.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
753
753
|
__webpack_require__.d(__webpack_exports__, {
|
|
754
754
|
m: ()=>registerGetCustomSectionHandler
|
|
755
755
|
});
|
|
@@ -1122,7 +1122,7 @@ export const __webpack_modules__ = {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
});
|
|
1124
1124
|
},
|
|
1125
|
-
"../web-mainthread-apis/dist/style/cssPropertyMap.js" (
|
|
1125
|
+
"../web-mainthread-apis/dist/style/cssPropertyMap.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1126
1126
|
__webpack_require__.d(__webpack_exports__, {
|
|
1127
1127
|
BH: ()=>queryCSSProperty
|
|
1128
1128
|
});
|
|
@@ -1385,7 +1385,7 @@ export const __webpack_modules__ = {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
});
|
|
1387
1387
|
},
|
|
1388
|
-
"../web-mainthread-apis/dist/utils/createCrossThreadEvent.js" (
|
|
1388
|
+
"../web-mainthread-apis/dist/utils/createCrossThreadEvent.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1389
1389
|
__webpack_require__.d(__webpack_exports__, {
|
|
1390
1390
|
X: ()=>createCrossThreadEvent
|
|
1391
1391
|
});
|
|
@@ -1471,7 +1471,7 @@ export const __webpack_modules__ = {
|
|
|
1471
1471
|
};
|
|
1472
1472
|
}
|
|
1473
1473
|
},
|
|
1474
|
-
"../web-mainthread-apis/dist/utils/createExposureService.js" (
|
|
1474
|
+
"../web-mainthread-apis/dist/utils/createExposureService.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1475
1475
|
__webpack_require__.d(__webpack_exports__, {
|
|
1476
1476
|
b: ()=>createExposureService
|
|
1477
1477
|
});
|
|
@@ -1536,7 +1536,7 @@ export const __webpack_modules__ = {
|
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
1538
|
},
|
|
1539
|
-
"../web-mainthread-apis/dist/utils/decodeCssOG.js" (
|
|
1539
|
+
"../web-mainthread-apis/dist/utils/decodeCssOG.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1540
1540
|
__webpack_require__.d(__webpack_exports__, {
|
|
1541
1541
|
y: ()=>decodeCssOG
|
|
1542
1542
|
});
|
|
@@ -1828,7 +1828,7 @@ export const __webpack_modules__ = {
|
|
|
1828
1828
|
},
|
|
1829
1829
|
"../web-mainthread-apis/binary/standard_bg.wasm" (module, exports, __webpack_require__) {
|
|
1830
1830
|
var rspack_import_0 = __webpack_require__("../web-mainthread-apis/binary/standard_bg.js");
|
|
1831
|
-
module.exports = __webpack_require__.v(exports, module.id, "
|
|
1831
|
+
module.exports = __webpack_require__.v(exports, module.id, "97be315d8e68b134", {
|
|
1832
1832
|
"./standard_bg.js": {
|
|
1833
1833
|
__wbg_new_e17d9f43105b08be: rspack_import_0.f,
|
|
1834
1834
|
__wbg_push_df81a39d04db858c: rspack_import_0.RS,
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import node_path from "node:path";
|
|
|
4
4
|
import node_vm from "node:vm";
|
|
5
5
|
import node_fs from "node:fs";
|
|
6
6
|
var __webpack_modules__ = {
|
|
7
|
-
"../web-constants/dist/index.js" (
|
|
7
|
+
"../web-constants/dist/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
8
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
tf: ()=>LynxCrossThreadContext,
|
|
10
10
|
iH: ()=>callLepusMethodEndpoint,
|
|
@@ -242,7 +242,7 @@ var __webpack_modules__ = {
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
|
-
"../web-worker-rpc/dist/index.js" (
|
|
245
|
+
"../web-worker-rpc/dist/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
246
246
|
__webpack_require__.d(__webpack_exports__, {
|
|
247
247
|
C: ()=>Rpc,
|
|
248
248
|
H: ()=>createRpcEndpoint
|
|
@@ -251,6 +251,7 @@ var __webpack_modules__ = {
|
|
|
251
251
|
port;
|
|
252
252
|
name;
|
|
253
253
|
incId = 0;
|
|
254
|
+
#messageQueue = [];
|
|
254
255
|
#messageCache = {};
|
|
255
256
|
#textEncoder = new TextEncoder();
|
|
256
257
|
#textDecoder = new TextDecoder();
|
|
@@ -258,8 +259,22 @@ var __webpack_modules__ = {
|
|
|
258
259
|
constructor(port, name){
|
|
259
260
|
this.port = port;
|
|
260
261
|
this.name = name;
|
|
262
|
+
if (port) port.onmessage = (ev)=>this.#onMessage(ev.data);
|
|
263
|
+
}
|
|
264
|
+
setMessagePort(port) {
|
|
265
|
+
if (this.port) throw new Error('Rpc port already set');
|
|
266
|
+
this.port = port;
|
|
267
|
+
for (const item of this.#messageQueue)this.postMessage(item.message, item.detail);
|
|
268
|
+
this.#messageQueue = [];
|
|
261
269
|
port.onmessage = (ev)=>this.#onMessage(ev.data);
|
|
262
270
|
}
|
|
271
|
+
postMessage(message, detail) {
|
|
272
|
+
if (this.port) this.port.postMessage(message, detail);
|
|
273
|
+
else this.#messageQueue.push({
|
|
274
|
+
message: message,
|
|
275
|
+
detail
|
|
276
|
+
});
|
|
277
|
+
}
|
|
263
278
|
get nextRetId() {
|
|
264
279
|
return `ret_${this.name}_${this.incId++}`;
|
|
265
280
|
}
|
|
@@ -362,7 +377,7 @@ var __webpack_modules__ = {
|
|
|
362
377
|
lock: lock,
|
|
363
378
|
buf: sharedBuffer
|
|
364
379
|
};
|
|
365
|
-
this.
|
|
380
|
+
this.postMessage(message, {
|
|
366
381
|
transfer
|
|
367
382
|
});
|
|
368
383
|
Atomics.wait(lockViewer, 0, 0);
|
|
@@ -378,7 +393,11 @@ var __webpack_modules__ = {
|
|
|
378
393
|
}
|
|
379
394
|
}
|
|
380
395
|
if (endpoint.hasReturn) {
|
|
381
|
-
|
|
396
|
+
let promise, resolve, reject;
|
|
397
|
+
promise = new Promise((res, rej)=>{
|
|
398
|
+
resolve = res;
|
|
399
|
+
reject = rej;
|
|
400
|
+
});
|
|
382
401
|
const retHandler = Rpc.createRetEndpoint(this.nextRetId);
|
|
383
402
|
this.registerHandler(retHandler, (returnValue, error)=>{
|
|
384
403
|
if (error) reject();
|
|
@@ -391,7 +410,7 @@ var __webpack_modules__ = {
|
|
|
391
410
|
retId: retHandler?.name,
|
|
392
411
|
hasTransfer: endpoint.hasReturnTransfer
|
|
393
412
|
};
|
|
394
|
-
this.
|
|
413
|
+
this.postMessage(message, {
|
|
395
414
|
transfer
|
|
396
415
|
});
|
|
397
416
|
return promise;
|
|
@@ -402,7 +421,7 @@ var __webpack_modules__ = {
|
|
|
402
421
|
data: parameters,
|
|
403
422
|
sync: false
|
|
404
423
|
};
|
|
405
|
-
this.
|
|
424
|
+
this.postMessage(message, {
|
|
406
425
|
transfer
|
|
407
426
|
});
|
|
408
427
|
}
|
|
@@ -565,7 +584,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
565
584
|
})();
|
|
566
585
|
(()=>{
|
|
567
586
|
__webpack_require__.r = (exports)=>{
|
|
568
|
-
if (
|
|
587
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
569
588
|
value: 'Module'
|
|
570
589
|
});
|
|
571
590
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -29,7 +29,7 @@ export const __webpack_modules__ = {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
"../web-mainthread-apis/binary/legacy_bg.js" (
|
|
32
|
+
"../web-mainthread-apis/binary/legacy_bg.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
33
33
|
__webpack_require__.d(__webpack_exports__, {
|
|
34
34
|
H4: ()=>__wbg___wbindgen_throw_b855445ff6a94295,
|
|
35
35
|
RS: ()=>__wbg_push_df81a39d04db858c,
|
|
@@ -210,7 +210,7 @@ export const __webpack_modules__ = {
|
|
|
210
210
|
},
|
|
211
211
|
"../web-mainthread-apis/binary/legacy_bg.wasm" (module, exports, __webpack_require__) {
|
|
212
212
|
var rspack_import_0 = __webpack_require__("../web-mainthread-apis/binary/legacy_bg.js");
|
|
213
|
-
module.exports = __webpack_require__.v(exports, module.id, "
|
|
213
|
+
module.exports = __webpack_require__.v(exports, module.id, "fbb8137e86a23335", {
|
|
214
214
|
"./legacy_bg.js": {
|
|
215
215
|
__wbg_new_e17d9f43105b08be: rspack_import_0.f,
|
|
216
216
|
__wbg_push_df81a39d04db858c: rspack_import_0.RS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-server",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
27
27
|
"rsbuild-plugin-publint": "0.3.3",
|
|
28
28
|
"@lynx-js/offscreen-document": "0.1.4",
|
|
29
|
-
"@lynx-js/web-constants": "0.19.
|
|
30
|
-
"@lynx-js/web-elements
|
|
31
|
-
"@lynx-js/web-mainthread-apis": "0.19.
|
|
32
|
-
"@lynx-js/web-worker-rpc": "0.19.
|
|
29
|
+
"@lynx-js/web-constants": "0.19.4",
|
|
30
|
+
"@lynx-js/web-elements": "0.10.1",
|
|
31
|
+
"@lynx-js/web-mainthread-apis": "0.19.4",
|
|
32
|
+
"@lynx-js/web-worker-rpc": "0.19.4"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rslib build",
|