@lynx-js/web-core-canary 0.19.1-canary-20251212-9c715ffe → 0.19.2-canary-20251215-6a1a5d3d

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 CHANGED
@@ -1,16 +1,28 @@
1
1
  # @lynx-js/web-core
2
2
 
3
- ## 0.19.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
3
+ ## 0.19.2-canary-20251215160846-6a1a5d3d36ba6281e5e54ef38244efc0a75ae271
4
+
5
+ ### Patch Changes
6
+
7
+ - fix csp issue for mts realm ([#1998](https://github.com/lynx-family/lynx-stack/pull/1998))
8
+
9
+ - Updated dependencies []:
10
+ - @lynx-js/web-constants@0.19.2-canary-20251215160846-6a1a5d3d36ba6281e5e54ef38244efc0a75ae271
11
+ - @lynx-js/web-mainthread-apis@0.19.2-canary-20251215160846-6a1a5d3d36ba6281e5e54ef38244efc0a75ae271
12
+ - @lynx-js/web-worker-rpc@0.19.2-canary-20251215160846-6a1a5d3d36ba6281e5e54ef38244efc0a75ae271
13
+ - @lynx-js/web-worker-runtime@0.19.2-canary-20251215160846-6a1a5d3d36ba6281e5e54ef38244efc0a75ae271
14
+
15
+ ## 0.19.1
4
16
 
5
17
  ### Patch Changes
6
18
 
7
19
  - fix: support CSP for mts ([#1994](https://github.com/lynx-family/lynx-stack/pull/1994))
8
20
 
9
21
  - Updated dependencies [[`f7256d5`](https://github.com/lynx-family/lynx-stack/commit/f7256d5bd920b2f6c0cadab44455585c35621b35)]:
10
- - @lynx-js/web-mainthread-apis@0.19.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
11
- - @lynx-js/web-worker-runtime@0.19.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
12
- - @lynx-js/web-constants@0.19.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
13
- - @lynx-js/web-worker-rpc@0.19.1-canary-20251212100312-9c715ffe5ee3eb738b473010f1b8151583fb9124
22
+ - @lynx-js/web-mainthread-apis@0.19.1
23
+ - @lynx-js/web-worker-runtime@0.19.1
24
+ - @lynx-js/web-constants@0.19.1
25
+ - @lynx-js/web-worker-rpc@0.19.1
14
26
 
15
27
  ## 0.19.0
16
28
 
@@ -6,7 +6,8 @@ import { Rpc } from '@lynx-js/web-worker-rpc';
6
6
  import { dispatchLynxViewEvent } from '../utils/dispatchLynxViewEvent.js';
7
7
  import { createExposureMonitor } from './crossThreadHandlers/createExposureMonitor.js';
8
8
  const existingScript = document.querySelector('script[nonce]');
9
- const nonce = existingScript?.nonce || existingScript?.getAttribute('nonce');
9
+ const nonce = existingScript?.nonce || existingScript?.getAttribute('nonce')
10
+ || '';
10
11
  const { prepareMainThreadAPIs, } = await import(
11
12
  /* webpackChunkName: "web-core-main-thread-apis" */
12
13
  /* webpackMode: "lazy-once" */
@@ -31,7 +32,7 @@ async function createIFrameRealm(parent) {
31
32
  });
32
33
  iframe.style.display = 'none';
33
34
  iframe.srcdoc =
34
- '<!DOCTYPE html><html><head><script>parent.postMessage("lynx:mtsready","*")</script></head><body style="display:none"></body></html>';
35
+ `<!DOCTYPE html><html><head><script nonce="${nonce}">parent.postMessage("lynx:mtsready","*")</script></head><body style="display:none"></body></html>`;
35
36
  iframe.sandbox = 'allow-same-origin allow-scripts'; // Restrict capabilities for security
36
37
  iframe.loading = 'eager';
37
38
  parent.appendChild(iframe);
@@ -42,7 +43,7 @@ async function createIFrameRealm(parent) {
42
43
  script.fetchPriority = 'high';
43
44
  script.defer = true;
44
45
  script.async = false;
45
- script.nonce = nonce || '';
46
+ script.nonce = nonce;
46
47
  iframe.contentDocument.head.appendChild(script);
47
48
  return new Promise(async (resolve, reject) => {
48
49
  script.onload = () => {
@@ -63,6 +64,7 @@ async function createIFrameRealm(parent) {
63
64
  xhr.send(null);
64
65
  if (xhr.status === 200) {
65
66
  const script = iframe.contentDocument.createElement('script');
67
+ script.nonce = nonce;
66
68
  script.textContent = xhr.responseText;
67
69
  // @ts-expect-error
68
70
  iframeWindow.module = { exports: undefined };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core-canary",
3
- "version": "0.19.1-canary-20251212-9c715ffe",
3
+ "version": "0.19.2-canary-20251215-6a1a5d3d",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -25,10 +25,10 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
28
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.1-canary-20251212-9c715ffe",
29
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.1-canary-20251212-9c715ffe",
30
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.1-canary-20251212-9c715ffe",
31
- "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.19.1-canary-20251212-9c715ffe"
28
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.2-canary-20251215-6a1a5d3d",
29
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.2-canary-20251215-6a1a5d3d",
30
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.2-canary-20251215-6a1a5d3d",
31
+ "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.19.2-canary-20251215-6a1a5d3d"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@lynx-js/lynx-core": "0.1.3",