@nuxt/bridge-edge 3.0.0-27333314.c8e281e → 3.0.0-27333874.279bfdc
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/chunks/module.mjs
CHANGED
|
@@ -147,6 +147,12 @@ function setupNitroBridge() {
|
|
|
147
147
|
nuxt.addHooks(nitroDevContext.nuxtHooks);
|
|
148
148
|
nuxt.hook("close", () => nitroDevContext._internal.hooks.callHook("close"));
|
|
149
149
|
nitroDevContext._internal.hooks.hook("nitro:document", (template) => nuxt.callHook("nitro:document", template));
|
|
150
|
+
if (nuxt.options.appTemplatePath) {
|
|
151
|
+
nuxt.hook("nitro:document", async (template) => {
|
|
152
|
+
template.src = nuxt.options.appTemplatePath;
|
|
153
|
+
template.contents = await promises.readFile(nuxt.options.appTemplatePath, "utf-8");
|
|
154
|
+
});
|
|
155
|
+
}
|
|
150
156
|
nuxt.options.env.NITRO_PRESET = nitroContext.preset;
|
|
151
157
|
nuxt.options.extensions.push("ts");
|
|
152
158
|
if (nuxt.server) {
|
|
@@ -629,7 +635,8 @@ const Nuxt3AutoImports = [
|
|
|
629
635
|
"useState",
|
|
630
636
|
"useFetch",
|
|
631
637
|
"useLazyFetch",
|
|
632
|
-
"useCookie"
|
|
638
|
+
"useCookie",
|
|
639
|
+
"useRequestHeaders"
|
|
633
640
|
]
|
|
634
641
|
},
|
|
635
642
|
{
|
package/dist/chunks/module2.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { defineNuxtModule, addPluginTemplate } from '@nuxt/kit';
|
|
|
3
3
|
import hash from 'hash-sum';
|
|
4
4
|
import { resolve } from 'pathe';
|
|
5
5
|
|
|
6
|
-
const version = "3.0.0-
|
|
6
|
+
const version = "3.0.0-27333874.279bfdc";
|
|
7
7
|
|
|
8
8
|
const middlewareTemplate = {
|
|
9
9
|
filename: "middleware.js",
|
|
@@ -6,6 +6,7 @@ import type { RuntimeConfig } from '@nuxt/schema';
|
|
|
6
6
|
export { useLazyAsyncData } from './asyncData';
|
|
7
7
|
export { useLazyFetch } from './fetch';
|
|
8
8
|
export { useCookie } from './cookie';
|
|
9
|
+
export { useRequestHeaders } from './ssr';
|
|
9
10
|
export * from '@vue/composition-api';
|
|
10
11
|
export declare const useAsyncData: () => never;
|
|
11
12
|
export declare const useFetch: () => never;
|
|
@@ -3,6 +3,7 @@ import { useNuxtApp } from "./app.mjs";
|
|
|
3
3
|
export { useLazyAsyncData } from "./asyncData.mjs";
|
|
4
4
|
export { useLazyFetch } from "./fetch.mjs";
|
|
5
5
|
export { useCookie } from "./cookie.mjs";
|
|
6
|
+
export { useRequestHeaders } from "./ssr.mjs";
|
|
6
7
|
export * from "@vue/composition-api";
|
|
7
8
|
const mock = () => () => {
|
|
8
9
|
throw new Error("not implemented");
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useNuxtApp } from "#app";
|
|
2
|
+
export function useRequestHeaders(include) {
|
|
3
|
+
if (process.client) {
|
|
4
|
+
return {};
|
|
5
|
+
}
|
|
6
|
+
const headers = useNuxtApp().ssrContext?.req.headers ?? {};
|
|
7
|
+
if (!include) {
|
|
8
|
+
return headers;
|
|
9
|
+
}
|
|
10
|
+
return Object.fromEntries(include.map((key) => [key, headers[key]]));
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/bridge-edge",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-27333874.279bfdc",
|
|
4
4
|
"repository": "nuxt/framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@babel/plugin-transform-typescript": "^7.16.1",
|
|
22
|
-
"@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-
|
|
23
|
-
"@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27333874.279bfdc",
|
|
23
|
+
"@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27333874.279bfdc",
|
|
24
24
|
"@nuxt/postcss8": "^1.1.3",
|
|
25
|
-
"@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-
|
|
25
|
+
"@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-27333874.279bfdc",
|
|
26
26
|
"@vitejs/plugin-legacy": "^1.6.4",
|
|
27
|
-
"@vue/composition-api": "^1.4.
|
|
27
|
+
"@vue/composition-api": "^1.4.2",
|
|
28
28
|
"@vueuse/head": "^0.7.4",
|
|
29
29
|
"acorn": "^8.6.0",
|
|
30
30
|
"consola": "^2.15.3",
|
|
@@ -39,23 +39,23 @@
|
|
|
39
39
|
"h3": "^0.3.8",
|
|
40
40
|
"hash-sum": "^2.0.0",
|
|
41
41
|
"magic-string": "^0.25.7",
|
|
42
|
-
"mlly": "^0.3.
|
|
42
|
+
"mlly": "^0.3.16",
|
|
43
43
|
"murmurhash-es": "^0.1.1",
|
|
44
44
|
"node-fetch": "^3.1.0",
|
|
45
|
-
"nuxi": "npm:nuxi-edge@3.0.0-
|
|
45
|
+
"nuxi": "npm:nuxi-edge@3.0.0-27333874.279bfdc",
|
|
46
46
|
"p-debounce": "^4.0.0",
|
|
47
47
|
"pathe": "^0.2.0",
|
|
48
48
|
"postcss": "^8",
|
|
49
49
|
"postcss-import": "^14.0.2",
|
|
50
50
|
"postcss-import-resolver": "^2.0.0",
|
|
51
|
-
"postcss-preset-env": "^7.0.
|
|
51
|
+
"postcss-preset-env": "^7.0.2",
|
|
52
52
|
"postcss-url": "^10.1.3",
|
|
53
53
|
"scule": "^0.2.1",
|
|
54
54
|
"semver": "^7.3.5",
|
|
55
55
|
"ufo": "^0.7.9",
|
|
56
56
|
"unplugin": "^0.2.21",
|
|
57
|
-
"unplugin-vue2-script-setup": "0.8.
|
|
58
|
-
"vite": "^2.7.
|
|
57
|
+
"unplugin-vue2-script-setup": "0.8.3",
|
|
58
|
+
"vite": "^2.7.4",
|
|
59
59
|
"vite-plugin-vue2": "^1.9.0",
|
|
60
60
|
"vue-template-compiler": "^2.6.14"
|
|
61
61
|
},
|