abckit 0.0.11 → 0.0.13
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
|
@@ -27,12 +27,35 @@ interface SetupConfig {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
interface AuthClientOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Base URL for Better Auth client
|
|
33
|
+
* Required for Capacitor/mobile apps where the default URL is not http/https
|
|
34
|
+
* @example 'https://api.example.com'
|
|
35
|
+
*/
|
|
36
|
+
baseURL?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Base path for Better Auth API endpoints
|
|
39
|
+
* @default '/api/auth'
|
|
40
|
+
*/
|
|
41
|
+
basePath?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Enable Capacitor mode for mobile apps
|
|
44
|
+
* When enabled, uses Bearer token auth with @capacitor/preferences storage
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
capacitor?: boolean;
|
|
48
|
+
}
|
|
30
49
|
interface ModuleOptions {
|
|
31
50
|
/**
|
|
32
51
|
* Enable Sentry user tracking in useAuth composable
|
|
33
52
|
* @default false
|
|
34
53
|
*/
|
|
35
54
|
sentry?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Better Auth client configuration
|
|
57
|
+
*/
|
|
58
|
+
auth?: AuthClientOptions;
|
|
36
59
|
}
|
|
37
60
|
declare module 'nuxt/schema' {
|
|
38
61
|
interface AppConfig extends BreadcrumbsConfig, SetupConfig {
|
|
@@ -77,10 +100,15 @@ declare module 'nuxt/schema' {
|
|
|
77
100
|
};
|
|
78
101
|
abckit: {
|
|
79
102
|
sentry: boolean;
|
|
103
|
+
auth: {
|
|
104
|
+
baseURL?: string;
|
|
105
|
+
basePath?: string;
|
|
106
|
+
capacitor?: boolean;
|
|
107
|
+
};
|
|
80
108
|
};
|
|
81
109
|
}
|
|
82
110
|
}
|
|
83
111
|
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
84
112
|
|
|
85
113
|
export { _default as default };
|
|
86
|
-
export type { BreadcrumbsConfig, ModuleOptions, SetupConfig };
|
|
114
|
+
export type { AuthClientOptions, BreadcrumbsConfig, ModuleOptions, SetupConfig };
|
package/dist/module.mjs
CHANGED
|
@@ -27,11 +27,14 @@ const module$1 = defineNuxtModule({
|
|
|
27
27
|
}),
|
|
28
28
|
async setup(options, nuxt) {
|
|
29
29
|
const { resolve } = createResolver(import.meta.url);
|
|
30
|
-
nuxt.options.runtimeConfig.public =
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
nuxt.options.runtimeConfig.public.abckit = {
|
|
31
|
+
sentry: nuxt.options.runtimeConfig.public.abckit?.sentry ?? options.sentry ?? false,
|
|
32
|
+
auth: {
|
|
33
|
+
baseURL: nuxt.options.runtimeConfig.public.abckit?.auth?.baseURL ?? options.auth?.baseURL,
|
|
34
|
+
basePath: nuxt.options.runtimeConfig.public.abckit?.auth?.basePath ?? options.auth?.basePath,
|
|
35
|
+
capacitor: nuxt.options.runtimeConfig.public.abckit?.auth?.capacitor ?? options.auth?.capacitor ?? false
|
|
33
36
|
}
|
|
34
|
-
}
|
|
37
|
+
};
|
|
35
38
|
nuxt.options.runtimeConfig.dragonfly = defu(nuxt.options.runtimeConfig.dragonfly, {
|
|
36
39
|
host: "dragonfly",
|
|
37
40
|
port: Number.parseInt("6379", 10),
|