@onmax/nuxt-better-auth 0.0.2-alpha.9 → 0.0.3
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 +57 -17
- package/dist/module.d.mts +28 -1
- package/dist/module.json +3 -3
- package/dist/module.mjs +1258 -351
- package/dist/runtime/app/components/BetterAuthState.d.vue.ts +4 -4
- package/dist/runtime/app/components/BetterAuthState.vue +1 -0
- package/dist/runtime/app/components/BetterAuthState.vue.d.ts +4 -4
- package/dist/runtime/app/composables/runWithSessionRefresh.d.ts +1 -0
- package/dist/runtime/app/composables/runWithSessionRefresh.js +12 -0
- package/dist/runtime/app/composables/useAction.d.ts +2 -0
- package/dist/runtime/app/composables/useAction.js +6 -0
- package/dist/runtime/app/composables/useAuthAsyncData.d.ts +6 -0
- package/dist/runtime/app/composables/useAuthAsyncData.js +16 -0
- package/dist/runtime/app/composables/useAuthClient.d.ts +9 -0
- package/dist/runtime/app/composables/useAuthClient.js +34 -0
- package/dist/runtime/app/composables/useAuthClientAction.d.ts +3 -0
- package/dist/runtime/app/composables/useAuthClientAction.js +15 -0
- package/dist/runtime/app/composables/useAuthRequestFetch.d.ts +11 -0
- package/dist/runtime/app/composables/useAuthRequestFetch.js +4 -0
- package/dist/runtime/app/composables/useSignIn.d.ts +16 -0
- package/dist/runtime/app/composables/useSignIn.js +8 -0
- package/dist/runtime/app/composables/useSignUp.d.ts +5 -0
- package/dist/runtime/app/composables/useSignUp.js +8 -0
- package/dist/runtime/app/composables/useUserSession.d.ts +6 -5
- package/dist/runtime/app/composables/useUserSession.js +189 -100
- package/dist/runtime/app/composables/useUserSessionState.d.ts +3 -0
- package/dist/runtime/app/composables/useUserSessionState.js +4 -0
- package/dist/runtime/app/internal/auth-action-error.d.ts +3 -0
- package/dist/runtime/app/internal/auth-action-error.js +33 -0
- package/dist/runtime/app/internal/auth-action-handles.d.ts +21 -0
- package/dist/runtime/app/internal/auth-action-handles.js +105 -0
- package/dist/runtime/app/internal/redirect-helpers.d.ts +4 -0
- package/dist/runtime/app/internal/redirect-helpers.js +37 -0
- package/dist/runtime/app/internal/session-fetch.d.ts +12 -0
- package/dist/runtime/app/internal/session-fetch.js +56 -0
- package/dist/runtime/app/internal/utils.d.ts +1 -0
- package/dist/runtime/app/internal/utils.js +3 -0
- package/dist/runtime/app/internal/vue-safe-auth-proxy.d.ts +3 -0
- package/dist/runtime/app/internal/vue-safe-auth-proxy.js +68 -0
- package/dist/runtime/app/internal/wrap-auth-method.d.ts +18 -0
- package/dist/runtime/app/internal/wrap-auth-method.js +69 -0
- package/dist/runtime/app/middleware/auth.global.js +80 -15
- package/dist/runtime/app/pages/__better-auth-devtools.vue +293 -339
- package/dist/runtime/composables.d.ts +12 -0
- package/dist/runtime/composables.js +10 -0
- package/dist/runtime/config.d.ts +69 -15
- package/dist/runtime/config.js +9 -2
- package/dist/runtime/internal/auth-route-rules.d.ts +1 -0
- package/dist/runtime/internal/auth-route-rules.js +24 -0
- package/dist/runtime/server/api/_better-auth/_schema.d.ts +1 -5
- package/dist/runtime/server/api/_better-auth/_schema.js +2 -1
- package/dist/runtime/server/api/_better-auth/accounts.get.d.ts +2 -2
- package/dist/runtime/server/api/_better-auth/accounts.get.js +3 -2
- package/dist/runtime/server/api/_better-auth/config.get.d.ts +9 -3
- package/dist/runtime/server/api/_better-auth/config.get.js +18 -6
- package/dist/runtime/server/api/_better-auth/sessions.delete.js +3 -2
- package/dist/runtime/server/api/_better-auth/sessions.get.d.ts +5 -3
- package/dist/runtime/server/api/_better-auth/sessions.get.js +3 -2
- package/dist/runtime/server/api/_better-auth/users.get.d.ts +2 -2
- package/dist/runtime/server/api/_better-auth/users.get.js +3 -2
- package/dist/runtime/server/api/auth/[...all].js +1 -1
- package/dist/runtime/server/middleware/route-access.js +4 -2
- package/dist/runtime/server/tsconfig.json +9 -1
- package/dist/runtime/server/utils/auth.d.ts +16 -8
- package/dist/runtime/server/utils/auth.js +229 -23
- package/dist/runtime/server/utils/custom-secondary-storage.d.ts +6 -0
- package/dist/runtime/server/utils/custom-secondary-storage.js +8 -0
- package/dist/runtime/server/utils/session.d.ts +7 -8
- package/dist/runtime/server/utils/session.js +256 -5
- package/dist/runtime/server/virtual-modules.d.ts +27 -0
- package/dist/runtime/types/augment.d.ts +18 -4
- package/dist/runtime/types.d.ts +12 -13
- package/dist/types.d.mts +1 -1
- package/package.json +53 -47
package/package.json
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onmax/nuxt-better-auth",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"packageManager": "pnpm@11.1.0",
|
|
6
6
|
"description": "Nuxt module for Better Auth integration with NuxtHub, route protection, session management, and role-based access",
|
|
7
7
|
"author": "onmax",
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"homepage": "https://better-auth.nuxt.dev",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/nuxt-modules/better-auth"
|
|
12
13
|
},
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
15
16
|
"types": "./dist/types.d.mts",
|
|
16
17
|
"import": "./dist/module.mjs"
|
|
17
18
|
},
|
|
19
|
+
"./composables": {
|
|
20
|
+
"types": "./dist/runtime/composables.d.ts",
|
|
21
|
+
"import": "./dist/runtime/composables.js"
|
|
22
|
+
},
|
|
18
23
|
"./config": {
|
|
19
24
|
"types": "./dist/runtime/config.d.ts",
|
|
20
25
|
"import": "./dist/runtime/config.js"
|
|
@@ -26,6 +31,9 @@
|
|
|
26
31
|
".": [
|
|
27
32
|
"./dist/types.d.mts"
|
|
28
33
|
],
|
|
34
|
+
"composables": [
|
|
35
|
+
"./dist/runtime/composables.d.ts"
|
|
36
|
+
],
|
|
29
37
|
"config": [
|
|
30
38
|
"./dist/runtime/config.d.ts"
|
|
31
39
|
]
|
|
@@ -36,21 +44,24 @@
|
|
|
36
44
|
],
|
|
37
45
|
"scripts": {
|
|
38
46
|
"prepack": "nuxt-module-build build",
|
|
47
|
+
"build": "pnpm build:docs",
|
|
39
48
|
"dev": "pnpm dev:prepare && nuxi dev playground",
|
|
40
49
|
"dev:build": "nuxi build playground",
|
|
41
50
|
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
|
|
42
51
|
"dev:docs": "nuxi dev docs",
|
|
43
52
|
"build:docs": "nuxi build docs",
|
|
44
|
-
"
|
|
53
|
+
"deploy": "wrangler deploy",
|
|
54
|
+
"release": "bumpp --push --no-push-all",
|
|
45
55
|
"lint": "eslint .",
|
|
46
56
|
"lint:fix": "eslint . --fix",
|
|
47
57
|
"typecheck": "vue-tsc --noEmit",
|
|
48
|
-
"typecheck:
|
|
58
|
+
"typecheck:runtime-server": "cd test/cases/plugins-type-inference && nuxi prepare && vue-tsc --noEmit --pretty false -p .nuxt/tsconfig.server.json",
|
|
59
|
+
"typecheck:playground": "pnpm -C playground exec nuxi prepare && pnpm -C playground exec vue-tsc --noEmit -p .nuxt/tsconfig.app.json",
|
|
49
60
|
"test": "vitest run",
|
|
50
61
|
"test:watch": "vitest watch"
|
|
51
62
|
},
|
|
52
63
|
"peerDependencies": {
|
|
53
|
-
"@nuxthub/core": ">=0.10.
|
|
64
|
+
"@nuxthub/core": ">=0.10.5",
|
|
54
65
|
"better-auth": ">=1.0.0"
|
|
55
66
|
},
|
|
56
67
|
"peerDependenciesMeta": {
|
|
@@ -59,56 +70,51 @@
|
|
|
59
70
|
}
|
|
60
71
|
},
|
|
61
72
|
"dependencies": {
|
|
62
|
-
"@
|
|
73
|
+
"@better-auth/cli": "1.5.0-beta.13",
|
|
74
|
+
"@nuxt/kit": "^4.3.1",
|
|
63
75
|
"defu": "^6.1.4",
|
|
64
|
-
"
|
|
76
|
+
"h3": "^1.15.11",
|
|
77
|
+
"jiti": "^2.6.1",
|
|
65
78
|
"pathe": "^2.0.3",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
79
|
+
"radix3": "^1.1.2",
|
|
80
|
+
"std-env": "^4.0.0",
|
|
81
|
+
"ufo": "^1.6.4"
|
|
68
82
|
},
|
|
69
83
|
"devDependencies": {
|
|
70
|
-
"@antfu/eslint-config": "^
|
|
71
|
-
"@
|
|
72
|
-
"@libsql/
|
|
73
|
-
"@nuxt/devtools": "^3.
|
|
74
|
-
"@nuxt/devtools-kit": "^3.
|
|
84
|
+
"@antfu/eslint-config": "^9.0.0",
|
|
85
|
+
"@libsql/client": "^0.17.3",
|
|
86
|
+
"@libsql/linux-x64-gnu": "0.5.29",
|
|
87
|
+
"@nuxt/devtools": "^3.2.3",
|
|
88
|
+
"@nuxt/devtools-kit": "^3.2.4",
|
|
75
89
|
"@nuxt/module-builder": "^1.0.2",
|
|
76
|
-
"@nuxt/schema": "^4.
|
|
77
|
-
"@nuxt/test-utils": "^
|
|
78
|
-
"@nuxthub/core": "^0.10.
|
|
90
|
+
"@nuxt/schema": "^4.3.1",
|
|
91
|
+
"@nuxt/test-utils": "^4.0.0",
|
|
92
|
+
"@nuxthub/core": "^0.10.6",
|
|
93
|
+
"@pinia/nuxt": "^0.11.3",
|
|
79
94
|
"@types/better-sqlite3": "^7.6.13",
|
|
80
95
|
"@types/node": "latest",
|
|
81
|
-
"
|
|
82
|
-
"better-
|
|
83
|
-
"better-sqlite3": "^
|
|
84
|
-
"bumpp": "^
|
|
96
|
+
"better-auth": "1.5.5",
|
|
97
|
+
"better-call": "1.3.5",
|
|
98
|
+
"better-sqlite3": "^12.6.2",
|
|
99
|
+
"bumpp": "^11.0.0",
|
|
85
100
|
"changelogen": "^0.6.2",
|
|
86
101
|
"consola": "^3.4.2",
|
|
87
|
-
"drizzle-kit": "^0.31.
|
|
88
|
-
"drizzle-orm": "^0.
|
|
89
|
-
"eslint": "^
|
|
90
|
-
"
|
|
91
|
-
"
|
|
102
|
+
"drizzle-kit": "^0.31.10",
|
|
103
|
+
"drizzle-orm": "^0.45.1",
|
|
104
|
+
"eslint": "^10.0.3",
|
|
105
|
+
"nitropack": "2.13.1",
|
|
106
|
+
"npm-agentskills": "https://pkg.pr.new/onmax/npm-agentskills@394499e",
|
|
107
|
+
"nuxt": "^4.3.1",
|
|
108
|
+
"pinia": "^3.0.4",
|
|
109
|
+
"postgres": "^3.4.9",
|
|
110
|
+
"tinyexec": "^1.1.1",
|
|
92
111
|
"typescript": "~5.9.3",
|
|
93
|
-
"
|
|
94
|
-
"vitest
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"@parcel/watcher",
|
|
101
|
-
"better-sqlite3",
|
|
102
|
-
"esbuild",
|
|
103
|
-
"sharp",
|
|
104
|
-
"workerd"
|
|
105
|
-
],
|
|
106
|
-
"patchedDependencies": {
|
|
107
|
-
"@peculiar/x509@1.14.2": "patches/@peculiar__x509@1.14.2.patch",
|
|
108
|
-
"unenv@2.0.0-rc.24": "patches/unenv@2.0.0-rc.24.patch"
|
|
109
|
-
},
|
|
110
|
-
"overrides": {
|
|
111
|
-
"reka-ui": "^2.6.1"
|
|
112
|
-
}
|
|
112
|
+
"unstorage": "^1.17.5",
|
|
113
|
+
"vitest": "^4.0.18",
|
|
114
|
+
"vitest-package-exports": "^1.2.0",
|
|
115
|
+
"vue": "3.5.29",
|
|
116
|
+
"vue-tsc": "^3.2.7",
|
|
117
|
+
"wrangler": "4.72.0",
|
|
118
|
+
"yaml": "^2.8.3"
|
|
113
119
|
}
|
|
114
120
|
}
|