@floatingpixels/supabase-nuxt 0.6.0 → 0.6.1
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/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig, useRequestEvent } from "nuxt/app";
|
|
2
2
|
import { createServerClient } from "@supabase/ssr";
|
|
3
|
-
import { setCookie, parseCookies } from "h3";
|
|
3
|
+
import { setCookie, parseCookies, setResponseHeaders } from "h3";
|
|
4
4
|
export default defineNuxtPlugin({
|
|
5
5
|
name: "supabase",
|
|
6
6
|
enforce: "pre",
|
|
@@ -20,11 +20,12 @@ export default defineNuxtPlugin({
|
|
|
20
20
|
value
|
|
21
21
|
}));
|
|
22
22
|
},
|
|
23
|
-
setAll(cookiesToSet) {
|
|
23
|
+
setAll(cookiesToSet, headers = {}) {
|
|
24
24
|
try {
|
|
25
25
|
cookiesToSet.forEach(({ name, value, options }) => {
|
|
26
26
|
setCookie(event, name, value, options);
|
|
27
27
|
});
|
|
28
|
+
setResponseHeaders(event, headers);
|
|
28
29
|
} catch {
|
|
29
30
|
console.error("Error setting cookies", cookiesToSet);
|
|
30
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createServerClient } from "@supabase/ssr";
|
|
2
|
-
import { setCookie, parseCookies } from "h3";
|
|
2
|
+
import { setCookie, parseCookies, setResponseHeaders } from "h3";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
export const supabaseServerClient = async (event) => {
|
|
5
5
|
const {
|
|
@@ -18,11 +18,12 @@ export const supabaseServerClient = async (event) => {
|
|
|
18
18
|
value
|
|
19
19
|
}));
|
|
20
20
|
},
|
|
21
|
-
setAll(cookiesToSet) {
|
|
21
|
+
setAll(cookiesToSet, headers = {}) {
|
|
22
22
|
try {
|
|
23
23
|
cookiesToSet.forEach(({ name, value, options }) => {
|
|
24
24
|
setCookie(event, name, value, options);
|
|
25
25
|
});
|
|
26
|
+
setResponseHeaders(event, headers);
|
|
26
27
|
} catch {
|
|
27
28
|
console.error("Error setting cookies", cookiesToSet);
|
|
28
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createServerClient } from "@supabase/ssr";
|
|
2
|
-
import { setCookie, parseCookies } from "h3";
|
|
2
|
+
import { setCookie, parseCookies, setResponseHeaders } from "h3";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
export const supabaseServiceRole = async (event) => {
|
|
5
5
|
const {
|
|
@@ -24,11 +24,12 @@ export const supabaseServiceRole = async (event) => {
|
|
|
24
24
|
value
|
|
25
25
|
}));
|
|
26
26
|
},
|
|
27
|
-
setAll(cookiesToSet) {
|
|
27
|
+
setAll(cookiesToSet, headers = {}) {
|
|
28
28
|
try {
|
|
29
29
|
cookiesToSet.forEach(({ name, value, options }) => {
|
|
30
30
|
setCookie(event, name, value, options);
|
|
31
31
|
});
|
|
32
|
+
setResponseHeaders(event, headers);
|
|
32
33
|
} catch {
|
|
33
34
|
console.error("Error setting cookies", cookiesToSet);
|
|
34
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floatingpixels/supabase-nuxt",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Supabase module for Nuxt",
|
|
5
5
|
"repository": "floatingpixels/supabase-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,14 +43,13 @@
|
|
|
43
43
|
"test:pw": "playwright test test/playwright/",
|
|
44
44
|
"test:e2e": "pnpm run --silent db:start && pnpm run --silent db:reset && pnpm run --silent test:pw && pnpm run --silent db:stop",
|
|
45
45
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
46
|
-
"supa": "./node_modules/supabase/bin/supabase",
|
|
47
46
|
"db:fullreset": "pnpm run --silent db:reset && pnpm run --silent db:types && pnpm run --silent db:sync && pnpm run --silent db:seed",
|
|
48
|
-
"db:start": "
|
|
49
|
-
"db:stop": "
|
|
50
|
-
"db:types": "
|
|
47
|
+
"db:start": "supabase start",
|
|
48
|
+
"db:stop": "supabase stop",
|
|
49
|
+
"db:types": "supabase gen types --lang=typescript --local > ./playground/types/supabase.d.ts",
|
|
51
50
|
"db:lint": "sqlfluff lint --dialect postgres ./supabase/migrations/*.sql",
|
|
52
51
|
"db:format": "sqlfluff format --dialect postgres ./supabase/migrations/*.sql",
|
|
53
|
-
"db:reset": "
|
|
52
|
+
"db:reset": "supabase db reset",
|
|
54
53
|
"db:seed": "npx tsx seed.ts",
|
|
55
54
|
"db:sync": "npx @snaplet/seed sync",
|
|
56
55
|
"db:fullseed": "(npx @snaplet/seed sync) -and (npx tsx seed.ts)",
|
|
@@ -58,37 +57,38 @@
|
|
|
58
57
|
"cleanup": "pnpm nuxi cleanup && rm -rf node_modules pnpm-lock.yaml && pnpm i"
|
|
59
58
|
},
|
|
60
59
|
"dependencies": {
|
|
61
|
-
"@supabase/ssr": "^0.
|
|
62
|
-
"@supabase/supabase-js": "^2.
|
|
60
|
+
"@supabase/ssr": "^0.10.3",
|
|
61
|
+
"@supabase/supabase-js": "^2.106.2",
|
|
63
62
|
"cookie": "^1.1.1"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
|
-
"@nuxt/devtools": "
|
|
65
|
+
"@nuxt/devtools": "4.0.0-alpha.6",
|
|
67
66
|
"@nuxt/eslint-config": "^1.15.2",
|
|
68
|
-
"@nuxt/kit": "^4.4.
|
|
67
|
+
"@nuxt/kit": "^4.4.6",
|
|
69
68
|
"@nuxt/module-builder": "^1.0.2",
|
|
70
|
-
"@nuxt/schema": "^4.4.
|
|
71
|
-
"@nuxt/test-utils": "4.0.
|
|
72
|
-
"@playwright/test": "^1.
|
|
69
|
+
"@nuxt/schema": "^4.4.6",
|
|
70
|
+
"@nuxt/test-utils": "4.0.3",
|
|
71
|
+
"@playwright/test": "^1.60.0",
|
|
73
72
|
"@snaplet/copycat": "^6.0.0",
|
|
74
73
|
"@snaplet/seed": "^0.98.0",
|
|
75
74
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
76
|
-
"@types/node": "^25.
|
|
77
|
-
"@vitest/coverage-v8": "4.1.
|
|
78
|
-
"@vue/test-utils": "^2.4.
|
|
75
|
+
"@types/node": "^25.9.1",
|
|
76
|
+
"@vitest/coverage-v8": "4.1.7",
|
|
77
|
+
"@vue/test-utils": "^2.4.10",
|
|
79
78
|
"changelogen": "^0.6.2",
|
|
80
|
-
"eslint": "^10.
|
|
79
|
+
"eslint": "^10.4.1",
|
|
81
80
|
"eslint-config-prettier": "^10.1.8",
|
|
82
|
-
"happy-dom": "^20.
|
|
83
|
-
"nuxt": "^4.4.
|
|
84
|
-
"playwright-core": "^1.
|
|
85
|
-
"postgres": "^3.4.
|
|
86
|
-
"prettier": "^3.8.
|
|
87
|
-
"release-it": "^
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
81
|
+
"happy-dom": "^20.9.0",
|
|
82
|
+
"nuxt": "^4.4.6",
|
|
83
|
+
"playwright-core": "^1.60.0",
|
|
84
|
+
"postgres": "^3.4.9",
|
|
85
|
+
"prettier": "^3.8.3",
|
|
86
|
+
"release-it": "^20.2.0",
|
|
87
|
+
"std-env": "^4.1.0",
|
|
88
|
+
"supabase": "^2.102.0",
|
|
89
|
+
"typescript": "6.0.3",
|
|
90
|
+
"vitest": "^4.1.7",
|
|
91
|
+
"vue-tsc": "^3.3.3"
|
|
92
92
|
},
|
|
93
93
|
"pnpm": {
|
|
94
94
|
"onlyBuiltDependencies": [
|