@lynx-js/web-worker-runtime-canary 0.18.3-canary-20251108-3bc8903d → 0.18.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/CHANGELOG.md +29 -29
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lynx-js/web-worker-runtime
|
|
2
2
|
|
|
3
|
-
## 0.18.3
|
|
3
|
+
## 0.18.3
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
- feat: add \_\_GetSourceMapRelease API for nativeApp. ([#1923](https://github.com/lynx-family/lynx-stack/pull/1923))
|
|
10
10
|
|
|
11
11
|
- Updated dependencies [[`fece7d0`](https://github.com/lynx-family/lynx-stack/commit/fece7d0a92fa76948488373757a27dff52a90437), [`ebc1a60`](https://github.com/lynx-family/lynx-stack/commit/ebc1a606318e9809e8a07457e18536b59be12a18)]:
|
|
12
|
-
- @lynx-js/web-mainthread-apis@0.18.3
|
|
13
|
-
- @lynx-js/web-constants@0.18.3
|
|
14
|
-
- @lynx-js/web-worker-rpc@0.18.3
|
|
12
|
+
- @lynx-js/web-mainthread-apis@0.18.3
|
|
13
|
+
- @lynx-js/web-constants@0.18.3
|
|
14
|
+
- @lynx-js/web-worker-rpc@0.18.3
|
|
15
15
|
|
|
16
16
|
## 0.18.2
|
|
17
17
|
|
|
@@ -217,14 +217,14 @@
|
|
|
217
217
|
Usage:
|
|
218
218
|
|
|
219
219
|
```ts
|
|
220
|
-
import { pluginWebPlatform } from
|
|
221
|
-
import { defineConfig } from
|
|
220
|
+
import { pluginWebPlatform } from '@lynx-js/web-platform-rsbuild-plugin';
|
|
221
|
+
import { defineConfig } from '@rsbuild/core';
|
|
222
222
|
|
|
223
223
|
export default defineConfig({
|
|
224
224
|
plugins: [
|
|
225
225
|
pluginWebPlatform({
|
|
226
226
|
// replace with your actual napi-modules file path
|
|
227
|
-
napiModulesPath: path.resolve(__dirname,
|
|
227
|
+
napiModulesPath: path.resolve(__dirname, './index.napi-modules.ts'),
|
|
228
228
|
}),
|
|
229
229
|
],
|
|
230
230
|
});
|
|
@@ -235,10 +235,10 @@
|
|
|
235
235
|
```ts
|
|
236
236
|
// index.napi-modules.ts
|
|
237
237
|
export default {
|
|
238
|
-
custom_module: function
|
|
238
|
+
custom_module: function(NapiModules, NapiModulesCall) {
|
|
239
239
|
return {
|
|
240
240
|
async test(name) {
|
|
241
|
-
console.log(
|
|
241
|
+
console.log('CustomModule', NapiModules, NapiModulesCall);
|
|
242
242
|
},
|
|
243
243
|
};
|
|
244
244
|
},
|
|
@@ -290,25 +290,25 @@
|
|
|
290
290
|
lynxView.initI18nResources = [
|
|
291
291
|
{
|
|
292
292
|
options: {
|
|
293
|
-
locale:
|
|
294
|
-
channel:
|
|
295
|
-
fallback_url:
|
|
293
|
+
locale: 'en',
|
|
294
|
+
channel: '1',
|
|
295
|
+
fallback_url: '',
|
|
296
296
|
},
|
|
297
297
|
resource: {
|
|
298
|
-
hello:
|
|
299
|
-
lynx:
|
|
298
|
+
hello: 'hello',
|
|
299
|
+
lynx: 'lynx web platform1',
|
|
300
300
|
},
|
|
301
301
|
},
|
|
302
302
|
];
|
|
303
|
-
lynxView.addEventListener(
|
|
303
|
+
lynxView.addEventListener('i18nResourceMissed', (e) => {
|
|
304
304
|
console.log(e);
|
|
305
305
|
});
|
|
306
306
|
|
|
307
307
|
// mts
|
|
308
308
|
_I18nResourceTranslation({
|
|
309
|
-
locale:
|
|
310
|
-
channel:
|
|
311
|
-
fallback_url:
|
|
309
|
+
locale: 'en',
|
|
310
|
+
channel: '1',
|
|
311
|
+
fallback_url: '',
|
|
312
312
|
});
|
|
313
313
|
```
|
|
314
314
|
|
|
@@ -558,8 +558,8 @@
|
|
|
558
558
|
}
|
|
559
559
|
};`,
|
|
560
560
|
],
|
|
561
|
-
{ type:
|
|
562
|
-
)
|
|
561
|
+
{ type: 'text/javascript' },
|
|
562
|
+
),
|
|
563
563
|
),
|
|
564
564
|
};
|
|
565
565
|
lynxView.nativeModulesMap = nativeModulesMap;
|
|
@@ -649,8 +649,8 @@
|
|
|
649
649
|
};
|
|
650
650
|
};`,
|
|
651
651
|
],
|
|
652
|
-
{ type:
|
|
653
|
-
)
|
|
652
|
+
{ type: 'text/javascript' },
|
|
653
|
+
),
|
|
654
654
|
);
|
|
655
655
|
|
|
656
656
|
const color_methods = URL.createObjectURL(
|
|
@@ -665,8 +665,8 @@
|
|
|
665
665
|
};
|
|
666
666
|
};`,
|
|
667
667
|
],
|
|
668
|
-
{ type:
|
|
669
|
-
)
|
|
668
|
+
{ type: 'text/javascript' },
|
|
669
|
+
),
|
|
670
670
|
);
|
|
671
671
|
|
|
672
672
|
lynxView.napiModuleMap = {
|
|
@@ -683,7 +683,7 @@
|
|
|
683
683
|
|
|
684
684
|
```js
|
|
685
685
|
lynxView.onNapiModulesCall = (name, data, moduleName) => {
|
|
686
|
-
if (name ===
|
|
686
|
+
if (name === 'getColor' && moduleName === 'color_methods') {
|
|
687
687
|
return data.color;
|
|
688
688
|
}
|
|
689
689
|
};
|
|
@@ -738,8 +738,8 @@
|
|
|
738
738
|
}
|
|
739
739
|
};`,
|
|
740
740
|
],
|
|
741
|
-
{ type:
|
|
742
|
-
)
|
|
741
|
+
{ type: 'text/javascript' },
|
|
742
|
+
),
|
|
743
743
|
);
|
|
744
744
|
```
|
|
745
745
|
|
|
@@ -751,7 +751,7 @@
|
|
|
751
751
|
|
|
752
752
|
```js
|
|
753
753
|
lynxView.onNativeModulesCall = (name, data, callback) => {
|
|
754
|
-
if (name ===
|
|
754
|
+
if (name === 'getColor') {
|
|
755
755
|
callback(data.color);
|
|
756
756
|
}
|
|
757
757
|
};
|
|
@@ -761,7 +761,7 @@
|
|
|
761
761
|
|
|
762
762
|
```js
|
|
763
763
|
lynxView.onNativeModulesCall = (name, data, moduleName) => {
|
|
764
|
-
if (name ===
|
|
764
|
+
if (name === 'getColor' && moduleName === 'bridge') {
|
|
765
765
|
return data.color;
|
|
766
766
|
}
|
|
767
767
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-worker-runtime-canary",
|
|
3
|
-
"version": "0.18.3
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
|
|
26
|
-
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.3
|
|
27
|
-
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.3
|
|
28
|
-
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.3
|
|
26
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.3",
|
|
27
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.3",
|
|
28
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@lynx-js/lynx-core": "0.1.3"
|