@nuxt/nitro-server-nightly 5.0.0-29644680.78bc1fc6 → 5.0.0-29650370.d985bf09

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
@@ -18,7 +18,7 @@ import { ImpoundPlugin } from "impound";
18
18
  import { resolveModulePath } from "exsolve";
19
19
  import { runtimeDependencies } from "nitro/meta";
20
20
  import { resolveModuleExportNames } from "mlly";
21
- var version = "5.0.0-29644680.78bc1fc6";
21
+ var version = "5.0.0-29650370.d985bf09";
22
22
  function toArray(value) {
23
23
  return Array.isArray(value) ? value : [value];
24
24
  }
@@ -4,6 +4,7 @@ import { HTTPError, defineEventHandler, getQuery, readBody } from "nitro/h3";
4
4
  import { resolveUnrefHeadInput } from "@unhead/vue";
5
5
  import { getRequestDependencies } from "vue-bundle-renderer/runtime";
6
6
  import { getQuery as getURLQuery } from "ufo";
7
+ import { computeIslandHash, filterIslandProps } from "#app/island-hash";
7
8
  import { islandCache, islandPropCache } from "../utils/cache.mjs";
8
9
  import { createSSRContext } from "../utils/renderer/app.mjs";
9
10
  import { getSSRRenderer } from "../utils/renderer/build-files.mjs";
@@ -102,6 +103,7 @@ async function getIslandContext(event) {
102
103
  const islandPath = event.url.pathname;
103
104
  if (import.meta.prerender && await islandPropCache.hasItem(islandPath)) {
104
105
 
106
+
105
107
  url = await islandPropCache.getItem(islandPath);
106
108
  }
107
109
  if (!url.startsWith(ISLAND_PATH_PREFIX)) {
@@ -119,13 +121,33 @@ async function getIslandContext(event) {
119
121
  statusText: "Invalid island component name"
120
122
  });
121
123
  }
122
- const context = event.req.method === "GET" ? getQuery(event) : await readBody(event);
124
+ const rawContext = event.req.method === "GET" ? getQuery(event) : await readBody(event);
125
+ const rawProps = destr(rawContext?.props) || {};
126
+ const filteredProps = filterIslandProps(rawProps);
127
+
128
+
129
+ const clientContext = {};
130
+ if (rawContext && typeof rawContext === "object") {
131
+ for (const key in rawContext) {
132
+ if (key !== "props") {
133
+ clientContext[key] = rawContext[key];
134
+ }
135
+ }
136
+ }
123
137
 
138
+
139
+ const expectedHash = computeIslandHash(componentName, filteredProps, clientContext, undefined);
140
+ if (!hashId || hashId !== expectedHash) {
141
+ throw new HTTPError({
142
+ status: 400,
143
+ statusText: "Invalid island request hash"
144
+ });
145
+ }
124
146
  return {
125
- url: typeof context?.url === "string" ? context.url : "/",
147
+ url: typeof rawContext?.url === "string" ? rawContext.url : "/",
126
148
  id: hashId,
127
149
  name: componentName,
128
- props: destr(context?.props) || {},
150
+ props: rawProps,
129
151
  slots: {},
130
152
  components: {}
131
153
  };
@@ -171,6 +171,7 @@ async function renderRoute(event, ssrError) {
171
171
  }
172
172
  ssrContext.head.push({ script: [{
173
173
  type: "importmap",
174
+
174
175
  innerHTML: { imports: { "#entry": path } }
175
176
  }] });
176
177
  }
@@ -226,6 +227,7 @@ async function renderRoute(event, ssrError) {
226
227
  data: splitPayload(ssrContext).initial,
227
228
  src: payloadURL
228
229
  }) }, {
230
+
229
231
  tagPosition: "bodyClose",
230
232
  tagPriority: "high"
231
233
  });
@@ -236,6 +238,8 @@ async function renderRoute(event, ssrError) {
236
238
  type: resource.module ? "module" : null,
237
239
  src: renderer.rendererContext.buildAssetsURL(resource.file),
238
240
  defer: resource.module ? null : true,
241
+
242
+
239
243
  tagPosition: "head",
240
244
  crossorigin: ""
241
245
  })) });
@@ -64,7 +64,9 @@ const plugin = definePlugin((nitroApp) => {
64
64
  }
65
65
  const log = {
66
66
  ..._log,
67
+
67
68
  filename,
69
+
68
70
  stack: trace
69
71
  };
70
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/nitro-server-nightly",
3
- "version": "5.0.0-29644680.78bc1fc6",
3
+ "version": "5.0.0-29650370.d985bf09",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29644680.78bc1fc6",
29
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29650370.d985bf09",
30
30
  "@unhead/vue": "^3.1.0",
31
31
  "@vue/shared": "3.5.34",
32
32
  "consola": "^3.4.2",
@@ -42,6 +42,7 @@
42
42
  "mlly": "^1.8.2",
43
43
  "mocked-exports": "^0.1.1",
44
44
  "nitro": "^3.0.260311-beta",
45
+ "ohash": "^2.0.11",
45
46
  "pathe": "^2.0.3",
46
47
  "srvx": "^0.11.15",
47
48
  "std-env": "^4.1.0",
@@ -56,7 +57,7 @@
56
57
  "@babel/plugin-proposal-decorators": "^7.25.0",
57
58
  "@babel/plugin-syntax-typescript": "^7.25.0",
58
59
  "@rollup/plugin-babel": "^6.0.0 || ^7.0.0",
59
- "nuxt": "npm:nuxt-nightly@5.0.0-29644680.78bc1fc6"
60
+ "nuxt": "npm:nuxt-nightly@5.0.0-29650370.d985bf09"
60
61
  },
61
62
  "peerDependenciesMeta": {
62
63
  "@babel/plugin-proposal-decorators": {
@@ -72,11 +73,11 @@
72
73
  "devDependencies": {
73
74
  "@babel/plugin-proposal-decorators": "7.29.0",
74
75
  "@babel/plugin-syntax-typescript": "7.28.6",
75
- "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29644680.78bc1fc6",
76
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29650370.d985bf09",
76
77
  "@rollup/plugin-babel": "7.0.0",
77
78
  "hookable": "6.1.1",
78
- "nuxt": "npm:nuxt-nightly@5.0.0-29644680.78bc1fc6",
79
- "obuild": "0.4.33",
79
+ "nuxt": "npm:nuxt-nightly@5.0.0-29650370.d985bf09",
80
+ "obuild": "0.4.35",
80
81
  "vitest": "4.1.6"
81
82
  },
82
83
  "engines": {
@@ -1,11 +0,0 @@
1
- # Licenses of Bundled Dependencies
2
-
3
- The published artifact additionally contains code with the following licenses:
4
- MIT
5
-
6
- # Bundled Dependencies
7
-
8
- ## nuxt-nightly
9
-
10
- License: MIT
11
- Repository: https://github.com/nuxt/nuxt