@onmax/nuxt-better-auth 0.0.1 → 0.0.2-alpha.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.
Files changed (50) hide show
  1. package/README.md +17 -170
  2. package/dist/module.d.mts +20 -2
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +363 -14
  5. package/dist/runtime/app/components/BetterAuthState.d.vue.ts +20 -0
  6. package/dist/runtime/app/components/BetterAuthState.vue +8 -0
  7. package/dist/runtime/app/components/BetterAuthState.vue.d.ts +20 -0
  8. package/dist/runtime/app/composables/useUserSession.d.ts +20 -0
  9. package/dist/runtime/app/composables/useUserSession.js +158 -0
  10. package/dist/runtime/app/middleware/auth.global.d.ts +13 -0
  11. package/dist/runtime/app/middleware/auth.global.js +31 -0
  12. package/dist/runtime/app/pages/__better-auth-devtools.d.vue.ts +3 -0
  13. package/dist/runtime/app/pages/__better-auth-devtools.vue +426 -0
  14. package/dist/runtime/app/pages/__better-auth-devtools.vue.d.ts +3 -0
  15. package/dist/runtime/app/plugins/session.client.d.ts +2 -0
  16. package/dist/runtime/app/plugins/session.client.js +16 -0
  17. package/dist/runtime/app/plugins/session.server.d.ts +2 -0
  18. package/dist/runtime/app/plugins/session.server.js +23 -0
  19. package/dist/runtime/config.d.ts +36 -0
  20. package/dist/runtime/config.js +6 -0
  21. package/dist/runtime/server/api/_better-auth/_schema.d.ts +8 -0
  22. package/dist/runtime/server/api/_better-auth/_schema.js +11 -0
  23. package/dist/runtime/server/api/_better-auth/accounts.get.d.ts +14 -0
  24. package/dist/runtime/server/api/_better-auth/accounts.get.js +28 -0
  25. package/dist/runtime/server/api/_better-auth/config.get.d.ts +35 -0
  26. package/dist/runtime/server/api/_better-auth/config.get.js +46 -0
  27. package/dist/runtime/server/api/_better-auth/sessions.delete.d.ts +4 -0
  28. package/dist/runtime/server/api/_better-auth/sessions.delete.js +22 -0
  29. package/dist/runtime/server/api/_better-auth/sessions.get.d.ts +14 -0
  30. package/dist/runtime/server/api/_better-auth/sessions.get.js +34 -0
  31. package/dist/runtime/server/api/_better-auth/users.get.d.ts +14 -0
  32. package/dist/runtime/server/api/_better-auth/users.get.js +34 -0
  33. package/dist/runtime/server/api/auth/[...all].d.ts +2 -0
  34. package/dist/runtime/server/api/auth/[...all].js +6 -0
  35. package/dist/runtime/server/middleware/route-access.d.ts +2 -0
  36. package/dist/runtime/server/middleware/route-access.js +28 -0
  37. package/dist/runtime/server/tsconfig.json +3 -0
  38. package/dist/runtime/server/utils/auth.d.ts +10 -0
  39. package/dist/runtime/server/utils/auth.js +32 -0
  40. package/dist/runtime/server/utils/session.d.ts +9 -0
  41. package/dist/runtime/server/utils/session.js +22 -0
  42. package/dist/runtime/types/augment.d.ts +42 -0
  43. package/dist/runtime/types/augment.js +0 -0
  44. package/dist/runtime/types.d.ts +23 -0
  45. package/dist/runtime/types.js +0 -0
  46. package/dist/runtime/utils/match-user.d.ts +2 -0
  47. package/dist/runtime/utils/match-user.js +13 -0
  48. package/dist/types.d.mts +8 -10
  49. package/package.json +35 -10
  50. package/dist/module.d.cts +0 -2
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@onmax/nuxt-better-auth",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2-alpha.2",
5
+ "packageManager": "pnpm@10.15.1",
5
6
  "description": "Nuxt module for Better Auth integration with NuxtHub, route protection, session management, and role-based access",
6
- "license": "MIT",
7
7
  "author": "onmax",
8
+ "license": "MIT",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "https://github.com/onmax/nuxt-better-auth"
@@ -13,6 +14,10 @@
13
14
  ".": {
14
15
  "types": "./dist/types.d.mts",
15
16
  "import": "./dist/module.mjs"
17
+ },
18
+ "./config": {
19
+ "types": "./dist/runtime/config.d.ts",
20
+ "import": "./dist/runtime/config.js"
16
21
  }
17
22
  },
18
23
  "main": "./dist/module.mjs",
@@ -20,6 +25,9 @@
20
25
  "*": {
21
26
  ".": [
22
27
  "./dist/types.d.mts"
28
+ ],
29
+ "config": [
30
+ "./dist/runtime/config.d.ts"
23
31
  ]
24
32
  }
25
33
  },
@@ -31,8 +39,9 @@
31
39
  "dev": "pnpm dev:prepare && nuxi dev playground",
32
40
  "dev:build": "nuxi build playground",
33
41
  "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
34
- "prepare": "nuxt-module-build build --stub && nuxi prepare playground",
35
- "release": "pnpm lint && pnpm test && pnpm prepack && changelogen --release && npm publish && git push --follow-tags",
42
+ "dev:docs": "nuxi dev docs",
43
+ "build:docs": "nuxi build docs",
44
+ "release": "bumpp && git push --follow-tags",
36
45
  "lint": "eslint .",
37
46
  "lint:fix": "eslint . --fix",
38
47
  "typecheck": "vue-tsc --noEmit",
@@ -42,8 +51,12 @@
42
51
  },
43
52
  "peerDependencies": {
44
53
  "@nuxthub/core": ">=0.10.0",
45
- "better-auth": ">=1.0.0",
46
- "drizzle-orm": ">=0.30.0"
54
+ "better-auth": ">=1.0.0"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "@nuxthub/core": {
58
+ "optional": true
59
+ }
47
60
  },
48
61
  "dependencies": {
49
62
  "@nuxt/kit": "^4.2.2",
@@ -57,29 +70,41 @@
57
70
  "@better-auth/cli": "^1.4.6",
58
71
  "@libsql/client": "^0.15.15",
59
72
  "@nuxt/devtools": "^3.1.1",
73
+ "@nuxt/devtools-kit": "^3.1.1",
60
74
  "@nuxt/module-builder": "^1.0.2",
61
75
  "@nuxt/schema": "^4.2.2",
62
76
  "@nuxt/test-utils": "^3.21.0",
63
- "@nuxthub/core": "^0.10.0",
77
+ "@nuxthub/core": "^0.10.3",
64
78
  "@types/better-sqlite3": "^7.6.13",
65
79
  "@types/node": "latest",
66
- "better-auth": "^1.2.8",
80
+ "better-auth": "^1.4.7",
67
81
  "better-sqlite3": "^11.9.1",
82
+ "bumpp": "^10.3.2",
68
83
  "changelogen": "^0.6.2",
69
84
  "consola": "^3.4.2",
70
85
  "drizzle-kit": "^0.31.8",
71
86
  "drizzle-orm": "^0.38.4",
72
87
  "eslint": "^9.39.1",
73
88
  "nuxt": "^4.2.2",
89
+ "tinyexec": "^1.0.2",
74
90
  "typescript": "~5.9.3",
75
91
  "vitest": "^4.0.15",
76
- "vue-tsc": "^3.1.7"
92
+ "vitest-package-exports": "^0.1.1",
93
+ "vue-tsc": "^3.1.7",
94
+ "yaml": "^2.8.2"
77
95
  },
78
96
  "pnpm": {
79
97
  "onlyBuiltDependencies": [
80
98
  "better-sqlite3",
81
99
  "esbuild",
82
100
  "@parcel/watcher"
83
- ]
101
+ ],
102
+ "patchedDependencies": {
103
+ "@peculiar/x509@1.14.2": "patches/@peculiar__x509@1.14.2.patch",
104
+ "unenv@2.0.0-rc.24": "patches/unenv@2.0.0-rc.24.patch"
105
+ },
106
+ "overrides": {
107
+ "reka-ui": "^2.6.1"
108
+ }
84
109
  }
85
110
  }
package/dist/module.d.cts DELETED
@@ -1,2 +0,0 @@
1
- export * from "/home/maxi/nuxt/better-auth/src/module.js";
2
- export { default } from "/home/maxi/nuxt/better-auth/src/module.js";