@nuxt/nitro-server-nightly 4.3.0-29436369.c02e32a0 → 4.3.0-29436444.647134eb

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.d.mts CHANGED
@@ -16,6 +16,7 @@ declare module 'nitropack' {
16
16
  /** @deprecated Use `noScripts` instead */
17
17
  experimentalNoScripts?: boolean;
18
18
  appMiddleware?: Record<string, boolean>;
19
+ appLayout?: string | false;
19
20
  }
20
21
  }
21
22
  declare module 'nitropack' {
@@ -52,6 +53,7 @@ declare module 'nitropack/types' {
52
53
  /** @deprecated Use `noScripts` instead */
53
54
  experimentalNoScripts?: boolean;
54
55
  appMiddleware?: Record<string, boolean>;
56
+ appLayout?: string | false;
55
57
  }
56
58
  }
57
59
  declare module 'nitropack/types' {
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ declare module 'nitropack' {
16
16
  /** @deprecated Use `noScripts` instead */
17
17
  experimentalNoScripts?: boolean;
18
18
  appMiddleware?: Record<string, boolean>;
19
+ appLayout?: string | false;
19
20
  }
20
21
  }
21
22
  declare module 'nitropack' {
@@ -52,6 +53,7 @@ declare module 'nitropack/types' {
52
53
  /** @deprecated Use `noScripts` instead */
53
54
  experimentalNoScripts?: boolean;
54
55
  appMiddleware?: Record<string, boolean>;
56
+ appLayout?: string | false;
55
57
  }
56
58
  }
57
59
  declare module 'nitropack/types' {
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-29436444.647134eb";
23
23
  const nitroBuilder = {
24
24
  version: version};
25
25
 
@@ -126,6 +126,7 @@ declare module 'nitropack' {
126
126
  /** @deprecated Use \`noScripts\` instead */
127
127
  experimentalNoScripts?: boolean
128
128
  appMiddleware?: Record<string, boolean>
129
+ appLayout?: string | false
129
130
  }
130
131
  interface NitroRuntimeHooks {
131
132
  'dev:ssr-logs': (ctx: { logs: LogObject[], path: string }) => void | Promise<void>
@@ -151,6 +152,7 @@ declare module 'nitropack/types' {
151
152
  /** @deprecated Use \`noScripts\` instead */
152
153
  experimentalNoScripts?: boolean
153
154
  appMiddleware?: Record<string, boolean>
155
+ appLayout?: string | false
154
156
  }
155
157
  interface NitroRuntimeHooks {
156
158
  'dev:ssr-logs': (ctx: { logs: LogObject[], path: string }) => void | Promise<void>
@@ -447,7 +449,7 @@ async function bundle(nuxt) {
447
449
  ...resolveIgnorePatterns(nitroConfig.srcDir),
448
450
  `!${join(nuxt.options.buildDir, "dist/client", nuxt.options.app.buildAssetsDir, "**/*")}`
449
451
  );
450
- const validManifestKeys = ["prerender", "redirect", "appMiddleware"];
452
+ const validManifestKeys = ["prerender", "redirect", "appMiddleware", "appLayout"];
451
453
  function getRouteRulesRouter() {
452
454
  const routeRulesRouter = createRouter();
453
455
  if (nuxt._nitro) {
@@ -471,7 +473,7 @@ async function bundle(nuxt) {
471
473
  if (cachedMatchers[key]) {
472
474
  return cachedMatchers[key];
473
475
  }
474
- return cachedMatchers[key] = `export default ${compileRouterToString(getRouteRulesRouter(), "", {
476
+ const matcher = compileRouterToString(getRouteRulesRouter(), "", {
475
477
  matchAll: true,
476
478
  serialize(routeRules) {
477
479
  return `{${Object.entries(routeRules).filter(([name, value]) => value !== void 0 && validManifestKeys.includes(name)).map(([name, value]) => {
@@ -494,7 +496,12 @@ async function bundle(nuxt) {
494
496
  return `${name}: ${JSON.stringify(value)}`;
495
497
  }).join(",")}}`;
496
498
  }
497
- })}`;
499
+ });
500
+ return cachedMatchers[key] = `
501
+ import { defu } from 'defu'
502
+ const matcher = ${matcher}
503
+ export default (path) => defu({}, ...matcher('', path).map(r => r.data).reverse())
504
+ `;
498
505
  }
499
506
  });
500
507
  if (nuxt.options.experimental.appManifest) {
@@ -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-29436444.647134eb",
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-29436444.647134eb",
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-29436444.647134eb"
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-29436444.647134eb",
54
+ "nuxt": "npm:nuxt-nightly@4.3.0-29436444.647134eb",
55
55
  "unbuild": "3.6.1",
56
56
  "vitest": "3.2.4"
57
57
  },