@nuxt/bridge-edge 3.0.0-27296409.955fa36 → 3.0.0-27303085.ae6f095
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/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-27303085.ae6f095";
|
|
7
7
|
|
|
8
8
|
const middlewareTemplate = {
|
|
9
9
|
filename: "middleware.js",
|
|
@@ -49,11 +49,11 @@ export default (ctx, inject) => {
|
|
|
49
49
|
nuxtApp.callHook = nuxtApp.hooks.callHook
|
|
50
50
|
|
|
51
51
|
if (!Array.isArray(ctx.app.created)) {
|
|
52
|
-
ctx.app.created = [ctx.app.created]
|
|
52
|
+
ctx.app.created = [ctx.app.created].filter(Boolean)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (!Array.isArray(ctx.app.mounted)) {
|
|
56
|
-
ctx.app.mounted = [ctx.app.mounted]
|
|
56
|
+
ctx.app.mounted = [ctx.app.mounted].filter(Boolean)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (process.server) {
|
|
@@ -49,11 +49,11 @@ export default (ctx, inject) => {
|
|
|
49
49
|
nuxtApp.callHook = nuxtApp.hooks.callHook
|
|
50
50
|
|
|
51
51
|
if (!Array.isArray(ctx.app.created)) {
|
|
52
|
-
ctx.app.created = [ctx.app.created]
|
|
52
|
+
ctx.app.created = [ctx.app.created].filter(Boolean)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (!Array.isArray(ctx.app.mounted)) {
|
|
56
|
-
ctx.app.mounted = [ctx.app.mounted]
|
|
56
|
+
ctx.app.mounted = [ctx.app.mounted].filter(Boolean)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (process.server) {
|
package/dist/runtime/cookie.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ declare type _CookieOptions = Omit<CookieSerializeOptions & CookieParseOptions,
|
|
|
4
4
|
export interface CookieOptions<T = any> extends _CookieOptions {
|
|
5
5
|
decode?(value: string): T;
|
|
6
6
|
encode?(value: T): string;
|
|
7
|
+
default?: () => T;
|
|
7
8
|
}
|
|
8
9
|
export interface CookieRef<T> extends Ref<T> {
|
|
9
10
|
}
|
package/dist/runtime/cookie.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const CookieDefaults = {
|
|
|
10
10
|
export function useCookie(name, _opts) {
|
|
11
11
|
const opts = { ...CookieDefaults, ..._opts };
|
|
12
12
|
const cookies = readRawCookies(opts);
|
|
13
|
-
const cookie = ref(cookies[name]);
|
|
13
|
+
const cookie = ref(cookies[name] ?? _opts.default?.());
|
|
14
14
|
if (process.client) {
|
|
15
15
|
watch(cookie, () => {
|
|
16
16
|
writeClientCookie(name, cookie.value, opts);
|
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-27303085.ae6f095",
|
|
4
4
|
"repository": "nuxt/framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,10 +19,10 @@
|
|
|
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-27303085.ae6f095",
|
|
23
|
+
"@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27303085.ae6f095",
|
|
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-27303085.ae6f095",
|
|
26
26
|
"@vitejs/plugin-legacy": "^1.6.3",
|
|
27
27
|
"@vue/composition-api": "^1.4.0",
|
|
28
28
|
"@vueuse/head": "^0.7.2",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"mlly": "^0.3.13",
|
|
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-27303085.ae6f095",
|
|
46
46
|
"p-debounce": "^4.0.0",
|
|
47
47
|
"pathe": "^0.2.0",
|
|
48
48
|
"postcss": "^8",
|