better-auth-nuxt 0.0.8 → 0.0.9
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/README.md +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +7 -6
- package/dist/runtime/middleware/auth.d.ts +1 -1
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/server.d.ts +1 -1
- package/dist/runtime/server.js +2 -2
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -212,9 +212,9 @@ Create a `*.better-auth.ts` file to configure server-side auth:
|
|
|
212
212
|
// server/my-auth.better-auth.ts
|
|
213
213
|
import type { BetterAuthOptions } from 'better-auth'
|
|
214
214
|
|
|
215
|
-
export default {
|
|
215
|
+
export default () => ({
|
|
216
216
|
// Custom server-side auth configuration
|
|
217
|
-
} satisfies BetterAuthOptions
|
|
217
|
+
} satisfies BetterAuthOptions)
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
### Client Configuration
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -13,6 +13,11 @@ async function serverAuth({ options }) {
|
|
|
13
13
|
...options.configs.map((config) => {
|
|
14
14
|
return `import ${config.key} from "${config.path}"`;
|
|
15
15
|
}),
|
|
16
|
+
"",
|
|
17
|
+
"let _auth",
|
|
18
|
+
"",
|
|
19
|
+
"export function useAuth() {",
|
|
20
|
+
" if (!_auth) {",
|
|
16
21
|
"const betterAuthConfigs = mergeDeep({all: true})({},",
|
|
17
22
|
"{",
|
|
18
23
|
...options.moduleOptions?.options?.server ? Object.entries(options.moduleOptions.options.server).map(([key, value]) => {
|
|
@@ -20,14 +25,10 @@ async function serverAuth({ options }) {
|
|
|
20
25
|
}) : [],
|
|
21
26
|
"},",
|
|
22
27
|
...options.configs.map((config) => {
|
|
23
|
-
return `${config.key},`;
|
|
28
|
+
return `${config.key}(),`;
|
|
24
29
|
}),
|
|
25
30
|
")",
|
|
26
31
|
"",
|
|
27
|
-
"let _auth",
|
|
28
|
-
"",
|
|
29
|
-
"export function useAuth() {",
|
|
30
|
-
" if (!_auth) {",
|
|
31
32
|
" _auth = betterAuth(betterAuthConfigs)",
|
|
32
33
|
" }",
|
|
33
34
|
" return _auth",
|
|
@@ -253,7 +254,7 @@ const module = defineNuxtModule({
|
|
|
253
254
|
}),
|
|
254
255
|
"const betterAuthConfigs = mergeDeep({all: true})({},",
|
|
255
256
|
...serverConfigs.map((config) => {
|
|
256
|
-
return `${config.key},`;
|
|
257
|
+
return `${config.key}(),`;
|
|
257
258
|
}),
|
|
258
259
|
")",
|
|
259
260
|
"export type BetterAuth = ReturnType<typeof betterAuth<typeof betterAuthConfigs>>",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/runtime/server.d.ts
CHANGED
package/dist/runtime/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth-nuxt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Better Auth Nuxt Module",
|
|
5
5
|
"repository": "productdevbook/better-auth-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@fastify/deepmerge": "^3.1.0",
|
|
30
|
-
"@nuxt/kit": "^3.17.
|
|
30
|
+
"@nuxt/kit": "^3.17.3",
|
|
31
31
|
"defu": "^6.1.4",
|
|
32
32
|
"ohash": "^2.0.11",
|
|
33
33
|
"pathe": "^2.0.3",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"tinyglobby": "^0.2.13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@nuxt/devtools": "^2.4.
|
|
39
|
-
"@nuxt/eslint-config": "^1.
|
|
38
|
+
"@nuxt/devtools": "^2.4.1",
|
|
39
|
+
"@nuxt/eslint-config": "^1.4.0",
|
|
40
40
|
"@nuxt/module-builder": "^1.0.1",
|
|
41
|
-
"@nuxt/schema": "^3.17.
|
|
42
|
-
"@nuxt/test-utils": "^3.
|
|
43
|
-
"@tailwindcss/vite": "^4.1.
|
|
41
|
+
"@nuxt/schema": "^3.17.3",
|
|
42
|
+
"@nuxt/test-utils": "^3.19.0",
|
|
43
|
+
"@tailwindcss/vite": "^4.1.7",
|
|
44
44
|
"@types/better-sqlite3": "^7.6.13",
|
|
45
45
|
"@types/node": "latest",
|
|
46
|
-
"better-auth": "^1.2.
|
|
47
|
-
"better-sqlite3": "^11.
|
|
46
|
+
"better-auth": "^1.2.8",
|
|
47
|
+
"better-sqlite3": "^11.10.0",
|
|
48
48
|
"changelogen": "^0.6.1",
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"nuxt": "^3.17.
|
|
49
|
+
"eslint": "^9.26.0",
|
|
50
|
+
"nuxt": "^3.17.3",
|
|
51
51
|
"typescript": "~5.8.3",
|
|
52
|
-
"vitest": "^3.1.
|
|
52
|
+
"vitest": "^3.1.3",
|
|
53
53
|
"vue-tsc": "^2.2.10"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|