@floatingpixels/supabase-nuxt 0.2.1 → 0.2.2
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.d.mts
CHANGED
|
@@ -82,6 +82,7 @@ interface ModuleOptions {
|
|
|
82
82
|
*/
|
|
83
83
|
clientOptions?: SupabaseClientOptions<string>;
|
|
84
84
|
}
|
|
85
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
87
|
+
|
|
88
|
+
export { type ModuleOptions, type RedirectOptions, _default as default };
|
package/dist/module.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ interface ModuleOptions {
|
|
|
82
82
|
*/
|
|
83
83
|
clientOptions?: SupabaseClientOptions<string>;
|
|
84
84
|
}
|
|
85
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
87
|
+
|
|
88
|
+
export { type ModuleOptions, type RedirectOptions, _default as default };
|
package/dist/module.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useSupabaseClient } from "./useSupabaseClient.js";
|
|
2
2
|
export const useSupabaseUser = async () => {
|
|
3
3
|
const supabase = useSupabaseClient();
|
|
4
|
-
const {
|
|
5
|
-
|
|
4
|
+
const {
|
|
5
|
+
data: { user }
|
|
6
|
+
} = await supabase.auth.getUser();
|
|
7
|
+
return user;
|
|
6
8
|
};
|
|
@@ -7,8 +7,7 @@ export default defineNuxtPlugin({
|
|
|
7
7
|
const config = useRuntimeConfig().public.supabase;
|
|
8
8
|
const { url, key, cookieOptions } = config;
|
|
9
9
|
const supabaseBrowserClient = createBrowserClient(url, key, {
|
|
10
|
-
cookieOptions
|
|
11
|
-
isSingleton: true
|
|
10
|
+
cookieOptions
|
|
12
11
|
});
|
|
13
12
|
return {
|
|
14
13
|
provide: {
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module.js'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { default } from './module.js'
|
|
1
|
+
export { type ModuleOptions, type RedirectOptions, default } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { default } from './module'
|
|
1
|
+
export { type ModuleOptions, type RedirectOptions, default } from './module'
|
package/package.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floatingpixels/supabase-nuxt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Supabase module for Nuxt",
|
|
5
5
|
"repository": "floatingpixels/supabase-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types.d.ts",
|
|
11
|
+
"import": "./dist/module.mjs",
|
|
12
|
+
"require": "./dist/module.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/module.cjs",
|
|
16
|
+
"types": "./dist/types.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
8
20
|
"release-it": {
|
|
9
21
|
"github": {
|
|
10
22
|
"release": true,
|
|
@@ -21,18 +33,6 @@
|
|
|
21
33
|
]
|
|
22
34
|
}
|
|
23
35
|
},
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./dist/types.d.ts",
|
|
27
|
-
"import": "./dist/module.mjs",
|
|
28
|
-
"require": "./dist/module.cjs"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"main": "./dist/module.cjs",
|
|
32
|
-
"types": "./dist/types.d.ts",
|
|
33
|
-
"files": [
|
|
34
|
-
"dist"
|
|
35
|
-
],
|
|
36
36
|
"scripts": {
|
|
37
37
|
"prepack": "nuxt-module-build build",
|
|
38
38
|
"dev": "nuxi dev playground",
|
|
@@ -40,38 +40,53 @@
|
|
|
40
40
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
41
41
|
"release": "pnpm run lint && pnpm run prepack && release-it",
|
|
42
42
|
"lint": "eslint .",
|
|
43
|
-
"test": "vitest
|
|
44
|
-
"test:watch": "vitest watch"
|
|
43
|
+
"test": "nuxi prepare playground && pnpm vitest",
|
|
44
|
+
"test:watch": "vitest watch",
|
|
45
|
+
"test:pw": "playwright test test/playwright/",
|
|
46
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
47
|
+
"supa": "./node_modules/supabase/bin/supabase",
|
|
48
|
+
"db:fullreset": "pnpm run --silent db:reset && pnpm run --silent db:types && pnpm run --silent db:sync && pnpm run --silent db:seed",
|
|
49
|
+
"db:start": "pnpm run --silent supa start",
|
|
50
|
+
"db:stop": "pnpm run --silent supa stop",
|
|
51
|
+
"db:types": "pnpm run --silent supa gen types --lang=typescript --local > ./playground/types/supabase.d.ts",
|
|
52
|
+
"db:lint": "sqlfluff lint --dialect postgres ./supabase/migrations/*.sql",
|
|
53
|
+
"db:format": "sqlfluff format --dialect postgres ./supabase/migrations/*.sql",
|
|
54
|
+
"db:reset": "pnpm run --silent supa db reset",
|
|
55
|
+
"db:seed": "npx tsx seed.ts",
|
|
56
|
+
"db:sync": "npx @snaplet/seed sync",
|
|
57
|
+
"db:fullseed": "(npx @snaplet/seed sync) -and (npx tsx seed.ts)"
|
|
45
58
|
},
|
|
46
59
|
"dependencies": {
|
|
47
|
-
"@nuxt/kit": "^3.
|
|
48
|
-
"@supabase/ssr": "^0.
|
|
49
|
-
"@supabase/supabase-js": "^2.
|
|
60
|
+
"@nuxt/kit": "^3.14.159",
|
|
61
|
+
"@supabase/ssr": "^0.5.1",
|
|
62
|
+
"@supabase/supabase-js": "^2.46.1",
|
|
50
63
|
"defu": "^6.1.4"
|
|
51
64
|
},
|
|
52
65
|
"devDependencies": {
|
|
53
|
-
"@nuxt/devtools": "^1.
|
|
54
|
-
"@nuxt/eslint-config": "^0.
|
|
55
|
-
"@nuxt/module-builder": "^0.8.
|
|
56
|
-
"@nuxt/schema": "^3.
|
|
57
|
-
"@nuxt/test-utils": "^3.
|
|
58
|
-
"@
|
|
66
|
+
"@nuxt/devtools": "^1.6.0",
|
|
67
|
+
"@nuxt/eslint-config": "^0.6.1",
|
|
68
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
69
|
+
"@nuxt/schema": "^3.14.159",
|
|
70
|
+
"@nuxt/test-utils": "^3.14.4",
|
|
71
|
+
"@playwright/test": "^1.48.2",
|
|
72
|
+
"@snaplet/copycat": "^5.1.0",
|
|
73
|
+
"@snaplet/seed": "^0.98.0",
|
|
74
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
75
|
+
"@types/node": "^22.9.0",
|
|
76
|
+
"@vitest/coverage-v8": "2.1.4",
|
|
59
77
|
"@vue/test-utils": "^2.4.6",
|
|
60
|
-
"changelogen": "^0.5.
|
|
61
|
-
"eslint": "^9.
|
|
78
|
+
"changelogen": "^0.5.7",
|
|
79
|
+
"eslint": "^9.14.0",
|
|
62
80
|
"eslint-config-prettier": "^9.1.0",
|
|
63
|
-
"happy-dom": "^
|
|
64
|
-
"nuxt": "^3.
|
|
65
|
-
"playwright-core": "^1.
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"overrides": {
|
|
74
|
-
"vite-plugin-checker": "0.7.0"
|
|
75
|
-
}
|
|
81
|
+
"happy-dom": "^15.11.0",
|
|
82
|
+
"nuxt": "^3.14.159",
|
|
83
|
+
"playwright-core": "^1.48.2",
|
|
84
|
+
"postgres": "^3.4.5",
|
|
85
|
+
"prettier": "^3.3.3",
|
|
86
|
+
"release-it": "^17.10.0",
|
|
87
|
+
"supabase": "^1.219.2",
|
|
88
|
+
"typescript": "^5.6.3",
|
|
89
|
+
"vitest": "^2.1.4",
|
|
90
|
+
"vue-tsc": "^2.1.10"
|
|
76
91
|
}
|
|
77
92
|
}
|