@fedify/nuxt 2.5.0-dev.2619 → 2.5.0-dev.2687

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/mod.cjs CHANGED
@@ -18,12 +18,12 @@ const contextDataFactory =
18
18
  contextFactoryModule.contextDataFactory;
19
19
  if (contextDataFactory == null) {
20
20
  throw new TypeError(
21
- \'@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory", but neither was found.\'
21
+ '@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory", but neither was found.'
22
22
  );
23
23
  }
24
24
  if (typeof contextDataFactory !== 'function') {
25
25
  throw new TypeError(
26
- \'@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory".\'
26
+ '@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory".'
27
27
  );
28
28
  }`;
29
29
  }
package/dist/mod.js CHANGED
@@ -18,12 +18,12 @@ const contextDataFactory =
18
18
  contextFactoryModule.contextDataFactory;
19
19
  if (contextDataFactory == null) {
20
20
  throw new TypeError(
21
- \'@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory", but neither was found.\'
21
+ '@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory", but neither was found.'
22
22
  );
23
23
  }
24
24
  if (typeof contextDataFactory !== 'function') {
25
25
  throw new TypeError(
26
- \'@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory".\'
26
+ '@fedify/nuxt: contextDataFactoryModule must export a function as "default" or named "contextDataFactory".'
27
27
  );
28
28
  }`;
29
29
  }
@@ -39,14 +39,15 @@ const fedifyPlugin = (nitroApp) => {
39
39
  const body = payload.body;
40
40
  if (!shouldConvert(event, body instanceof Response ? body.status : (0, h3.getResponseStatus)(event))) return;
41
41
  if (body instanceof Response) {
42
- body.headers.forEach((value, name) => {
42
+ for (const [name, headerValue] of body.headers) {
43
+ let value = headerValue;
43
44
  if (name === "set-cookie") {
44
45
  (0, h3.appendResponseHeader)(event, name, (0, h3.splitCookiesString)(value));
45
- return;
46
+ continue;
46
47
  }
47
48
  if (name === "vary") value = [(0, h3.getResponseHeader)(event, name), value].filter(Boolean).join(", ");
48
49
  (0, h3.setResponseHeader)(event, name, value);
49
- });
50
+ }
50
51
  body.body?.cancel().catch(() => {});
51
52
  }
52
53
  setNotAcceptable(event);
@@ -39,14 +39,15 @@ const fedifyPlugin = (nitroApp) => {
39
39
  const body = payload.body;
40
40
  if (!shouldConvert(event, body instanceof Response ? body.status : getResponseStatus(event))) return;
41
41
  if (body instanceof Response) {
42
- body.headers.forEach((value, name) => {
42
+ for (const [name, headerValue] of body.headers) {
43
+ let value = headerValue;
43
44
  if (name === "set-cookie") {
44
45
  appendResponseHeader(event, name, splitCookiesString(value));
45
- return;
46
+ continue;
46
47
  }
47
48
  if (name === "vary") value = [getResponseHeader(event, name), value].filter(Boolean).join(", ");
48
49
  setResponseHeader(event, name, value);
49
- });
50
+ }
50
51
  body.body?.cancel().catch(() => {});
51
52
  }
52
53
  setNotAcceptable(event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/nuxt",
3
- "version": "2.5.0-dev.2619+88aa7efd",
3
+ "version": "2.5.0-dev.2687+924da5ce",
4
4
  "description": "Integrate Fedify with Nuxt",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -50,7 +50,7 @@
50
50
  "@nuxt/schema": "^4.4.2",
51
51
  "h3": "^1.15.0",
52
52
  "nuxt": "^4.4.2",
53
- "@fedify/fedify": "^2.5.0-dev.2619+88aa7efd"
53
+ "@fedify/fedify": "^2.5.0-dev.2687+924da5ce"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^24.12.2",