@nuxt/nitro-server-nightly 4.3.0-29436369.c02e32a0 → 4.3.0-29436426.3cbdaef5

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/index.mjs CHANGED
@@ -19,7 +19,7 @@ import { isWindows } from 'std-env';
19
19
  import { ImpoundPlugin } from 'impound';
20
20
  import { resolveModulePath } from 'exsolve';
21
21
 
22
- const version = "4.3.0-29436369.c02e32a0";
22
+ const version = "4.3.0-29436426.3cbdaef5";
23
23
  const nitroBuilder = {
24
24
  version: version};
25
25
 
@@ -74,6 +74,15 @@ const iframeStorageBridge = (nonce) => (
74
74
  type: 'storage-sync-request',
75
75
  nonce: NONCE
76
76
  }, '*');
77
+
78
+ // Clipboard API is unavailable in data: URL iframe, so we use postMessage
79
+ document.addEventListener('DOMContentLoaded', function() {
80
+ window.copyErrorMessage = function(button) {
81
+ window.parent.postMessage({ type: 'clipboard-copy', text: button.dataset.errorText, nonce: NONCE }, '*');
82
+ button.classList.add('copied');
83
+ setTimeout(function() { button.classList.remove('copied'); }, 2000);
84
+ };
85
+ });
77
86
  })();
78
87
  `
79
88
  );
@@ -81,6 +90,15 @@ const parentStorageBridge = (nonce) => (
81
90
  /* js */
82
91
  `
83
92
  (function() {
93
+ const NONCE = ${JSON.stringify(nonce)}
94
+
95
+ // Handle clipboard copy from iframe
96
+ window.addEventListener('message', function(e) {
97
+ if (e.data && e.data.type === 'clipboard-copy' && e.data.nonce === NONCE) {
98
+ navigator.clipboard.writeText(e.data.text).catch(function() {});
99
+ }
100
+ });
101
+
84
102
  const host = document.querySelector('nuxt-error-overlay');
85
103
  if (!host) return;
86
104
 
@@ -90,8 +108,6 @@ const parentStorageBridge = (nonce) => (
90
108
  clearInterval(checkShadow);
91
109
  const iframe = host.shadowRoot.getElementById('frame');
92
110
  if (!iframe) return;
93
-
94
- const NONCE = ${JSON.stringify(nonce)}
95
111
 
96
112
  window.addEventListener('message', function(event) {
97
113
  if (!event.data || event.data.nonce !== NONCE) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/nitro-server-nightly",
3
- "version": "4.3.0-29436369.c02e32a0",
3
+ "version": "4.3.0-29436426.3cbdaef5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@nuxt/devalue": "^2.0.2",
22
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29436369.c02e32a0",
22
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29436426.3cbdaef5",
23
23
  "@unhead/vue": "^2.0.19",
24
24
  "@vue/shared": "^3.5.25",
25
25
  "consola": "^3.4.2",
@@ -47,11 +47,11 @@
47
47
  "vue-devtools-stub": "^0.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "nuxt": "npm:nuxt-nightly@4.3.0-29436369.c02e32a0"
50
+ "nuxt": "npm:nuxt-nightly@4.3.0-29436426.3cbdaef5"
51
51
  },
52
52
  "devDependencies": {
53
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29436369.c02e32a0",
54
- "nuxt": "npm:nuxt-nightly@4.3.0-29436369.c02e32a0",
53
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29436426.3cbdaef5",
54
+ "nuxt": "npm:nuxt-nightly@4.3.0-29436426.3cbdaef5",
55
55
  "unbuild": "3.6.1",
56
56
  "vitest": "3.2.4"
57
57
  },