better-auth-nuxt 0.0.10-beta.19 → 0.0.10-beta.21
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 +2 -2
- package/dist/module.mjs +6 -6
- package/package.json +2 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { generateDrizzleSchema as generateDrizzleSchema$1 } from '@better-auth/c
|
|
|
11
11
|
import { getAuthTables } from 'better-auth/db';
|
|
12
12
|
export { defineClientAuth, defineServerAuth } from '../dist/runtime/config.js';
|
|
13
13
|
|
|
14
|
-
const version = "0.0.10-beta.
|
|
14
|
+
const version = "0.0.10-beta.21";
|
|
15
15
|
|
|
16
16
|
function setupDevTools(nuxt) {
|
|
17
17
|
nuxt.hook("devtools:customTabs", (tabs) => {
|
|
@@ -279,7 +279,7 @@ Proceed?`, { type: "confirm", initial: true, cancel: "null" });
|
|
|
279
279
|
return secret;
|
|
280
280
|
}
|
|
281
281
|
const module$1 = defineNuxtModule({
|
|
282
|
-
meta: { name: "
|
|
282
|
+
meta: { name: "better-auth-nuxt", version, configKey: "auth", compatibility: { nuxt: ">=3.0.0" } },
|
|
283
283
|
defaults: {
|
|
284
284
|
clientOnly: false,
|
|
285
285
|
serverConfig: "server/auth.config",
|
|
@@ -293,13 +293,13 @@ const module$1 = defineNuxtModule({
|
|
|
293
293
|
process.env.BETTER_AUTH_SECRET = generatedSecret;
|
|
294
294
|
const serverPath = join(nuxt.options.rootDir, "server/auth.config.ts");
|
|
295
295
|
const clientPath = join(nuxt.options.srcDir, "auth.config.ts");
|
|
296
|
-
const serverTemplate = `import { defineServerAuth } from '
|
|
296
|
+
const serverTemplate = `import { defineServerAuth } from 'better-auth-nuxt/config'
|
|
297
297
|
|
|
298
298
|
export default defineServerAuth({
|
|
299
299
|
emailAndPassword: { enabled: true },
|
|
300
300
|
})
|
|
301
301
|
`;
|
|
302
|
-
const clientTemplate = `import { defineClientAuth } from '
|
|
302
|
+
const clientTemplate = `import { defineClientAuth } from 'better-auth-nuxt/config'
|
|
303
303
|
|
|
304
304
|
export default defineClientAuth({})
|
|
305
305
|
`;
|
|
@@ -414,7 +414,7 @@ export { db }`;
|
|
|
414
414
|
{ convexUrl }
|
|
415
415
|
);
|
|
416
416
|
databaseCode = `import { useRuntimeConfig } from '#imports'
|
|
417
|
-
import { createConvexHttpAdapter } from '
|
|
417
|
+
import { createConvexHttpAdapter } from 'better-auth-nuxt/adapters/convex'
|
|
418
418
|
import { api } from '#convex/api'
|
|
419
419
|
|
|
420
420
|
export function createDatabase() {
|
|
@@ -478,7 +478,7 @@ interface _AugmentedServerAuthContext {
|
|
|
478
478
|
${hasHubDb ? `db: typeof import('@nuxthub/db')['db']` : "db: unknown"}
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
declare module '
|
|
481
|
+
declare module 'better-auth-nuxt/config' {
|
|
482
482
|
import type { BetterAuthOptions } from 'better-auth'
|
|
483
483
|
type ServerAuthConfig = Omit<BetterAuthOptions, 'database' | 'secret' | 'baseURL'>
|
|
484
484
|
export function defineServerAuth<T extends ServerAuthConfig>(config: T | ((ctx: _AugmentedServerAuthContext) => T)): (ctx: _AugmentedServerAuthContext) => T
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.10-beta.
|
|
4
|
+
"version": "0.0.10-beta.21",
|
|
5
5
|
"description": "Nuxt module for Better Auth integration with NuxtHub, route protection, session management, and role-based access",
|
|
6
6
|
"author": "onmax",
|
|
7
7
|
"license": "MIT",
|
|
@@ -64,8 +64,6 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@better-auth/cli": "^1.5.0-beta.3",
|
|
67
|
-
"@nuxt/kit": "^4.2.2",
|
|
68
|
-
"@nuxt/ui": "^4.2.1",
|
|
69
67
|
"defu": "^6.1.4",
|
|
70
68
|
"jiti": "^2.4.2",
|
|
71
69
|
"pathe": "^2.0.3",
|
|
@@ -81,6 +79,7 @@
|
|
|
81
79
|
"@nuxt/module-builder": "^1.0.2",
|
|
82
80
|
"@nuxt/schema": "https://pkg.pr.new/@nuxt/schema@33005",
|
|
83
81
|
"@nuxt/test-utils": "^3.21.0",
|
|
82
|
+
"@nuxt/ui": "^4.2.1",
|
|
84
83
|
"@nuxthub/core": "^0.10.5",
|
|
85
84
|
"@types/better-sqlite3": "^7.6.13",
|
|
86
85
|
"@types/node": "latest",
|