abckit 0.0.3 → 0.0.6
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 +12 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +12 -5
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
- package/dist/runtime/composables/useAuth.d.ts +34 -34
- package/dist/runtime/composables/useAuth.js +19 -2
- package/dist/types.d.mts +1 -7
- package/package.json +4 -2
package/dist/module.d.mts
CHANGED
|
@@ -27,6 +27,13 @@ interface SetupConfig {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
interface ModuleOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Enable Sentry user tracking in useAuth composable
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
sentry?: boolean;
|
|
36
|
+
}
|
|
30
37
|
declare module 'nuxt/schema' {
|
|
31
38
|
interface AppConfig extends BreadcrumbsConfig, SetupConfig {
|
|
32
39
|
}
|
|
@@ -67,9 +74,12 @@ declare module 'nuxt/schema' {
|
|
|
67
74
|
storageUrl: string;
|
|
68
75
|
cdnDomains: string[];
|
|
69
76
|
};
|
|
77
|
+
abckit: {
|
|
78
|
+
sentry: boolean;
|
|
79
|
+
};
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
|
-
declare const _default: nuxt_schema.NuxtModule<
|
|
82
|
+
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
73
83
|
|
|
74
84
|
export { _default as default };
|
|
75
|
-
export type { BreadcrumbsConfig, SetupConfig };
|
|
85
|
+
export type { BreadcrumbsConfig, ModuleOptions, SetupConfig };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
-
import { defineNuxtModule, createResolver, addTypeTemplate,
|
|
2
|
+
import { defineNuxtModule, createResolver, addTypeTemplate, addServerScanDir, addRouteMiddleware } from '@nuxt/kit';
|
|
3
3
|
import { defu } from 'defu';
|
|
4
4
|
|
|
5
5
|
const module$1 = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
|
-
name: "
|
|
8
|
-
configKey: "
|
|
7
|
+
name: "abckit",
|
|
8
|
+
configKey: "abckit",
|
|
9
9
|
version: "0.0.1"
|
|
10
10
|
},
|
|
11
|
+
defaults: {
|
|
12
|
+
sentry: false
|
|
13
|
+
},
|
|
11
14
|
moduleDependencies: {
|
|
12
15
|
"@nuxtjs/tailwindcss": {},
|
|
13
16
|
"notivue/nuxt": {},
|
|
@@ -19,8 +22,13 @@ const module$1 = defineNuxtModule({
|
|
|
19
22
|
"@vee-validate/nuxt": {},
|
|
20
23
|
"nitro-graphql/nuxt": {}
|
|
21
24
|
},
|
|
22
|
-
async setup(
|
|
25
|
+
async setup(options, nuxt) {
|
|
23
26
|
const { resolve } = createResolver(import.meta.url);
|
|
27
|
+
nuxt.options.runtimeConfig.public = defu(nuxt.options.runtimeConfig.public, {
|
|
28
|
+
abckit: {
|
|
29
|
+
sentry: options.sentry ?? false
|
|
30
|
+
}
|
|
31
|
+
});
|
|
24
32
|
nuxt.options.runtimeConfig.dragonfly = defu(nuxt.options.runtimeConfig.dragonfly, {
|
|
25
33
|
host: "dragonfly",
|
|
26
34
|
port: Number.parseInt("6379", 10),
|
|
@@ -222,7 +230,6 @@ export {}
|
|
|
222
230
|
preference: "light",
|
|
223
231
|
hid: "nuxt-color-mode-script"
|
|
224
232
|
};
|
|
225
|
-
addImportsDir(resolve("./runtime/composables"));
|
|
226
233
|
addServerScanDir(resolve("./runtime/server"));
|
|
227
234
|
addRouteMiddleware({
|
|
228
235
|
name: "auth-status",
|
|
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
14
14
|
dir?: string | undefined | undefined;
|
|
15
15
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
16
16
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
17
|
-
enterKeyHint?: "search" | "done" | "
|
|
17
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
18
18
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
19
19
|
id?: string | undefined | undefined;
|
|
20
20
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -208,7 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
208
208
|
dir?: string | undefined | undefined;
|
|
209
209
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
210
210
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
211
|
-
enterKeyHint?: "search" | "done" | "
|
|
211
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
212
212
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
213
213
|
id?: string | undefined | undefined;
|
|
214
214
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
14
14
|
dir?: string | undefined | undefined;
|
|
15
15
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
16
16
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
17
|
-
enterKeyHint?: "search" | "done" | "
|
|
17
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
18
18
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
19
19
|
id?: string | undefined | undefined;
|
|
20
20
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -208,7 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
208
208
|
dir?: string | undefined | undefined;
|
|
209
209
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
210
210
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
211
|
-
enterKeyHint?: "search" | "done" | "
|
|
211
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
212
212
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
213
213
|
id?: string | undefined | undefined;
|
|
214
214
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
16
16
|
dir?: string | undefined | undefined;
|
|
17
17
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
18
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
19
|
-
enterKeyHint?: "search" | "done" | "
|
|
19
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
20
20
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
21
21
|
id?: string | undefined | undefined;
|
|
22
22
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -212,7 +212,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
212
212
|
dir?: string | undefined | undefined;
|
|
213
213
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
214
214
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
215
|
-
enterKeyHint?: "search" | "done" | "
|
|
215
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
216
216
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
217
217
|
id?: string | undefined | undefined;
|
|
218
218
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
16
16
|
dir?: string | undefined | undefined;
|
|
17
17
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
18
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
19
|
-
enterKeyHint?: "search" | "done" | "
|
|
19
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
20
20
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
21
21
|
id?: string | undefined | undefined;
|
|
22
22
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -212,7 +212,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
212
212
|
dir?: string | undefined | undefined;
|
|
213
213
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
214
214
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
215
|
-
enterKeyHint?: "search" | "done" | "
|
|
215
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
216
216
|
hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
|
|
217
217
|
id?: string | undefined | undefined;
|
|
218
218
|
inert?: (boolean | "true" | "false") | undefined;
|
|
@@ -84,7 +84,7 @@ declare const authClient: {
|
|
|
84
84
|
limit?: string | number | undefined;
|
|
85
85
|
offset?: string | number | undefined;
|
|
86
86
|
sortBy?: string | undefined;
|
|
87
|
-
sortDirection?: "
|
|
87
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
88
88
|
filterField?: string | undefined;
|
|
89
89
|
filterValue?: string | number | boolean | undefined;
|
|
90
90
|
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
@@ -96,7 +96,7 @@ declare const authClient: {
|
|
|
96
96
|
limit?: string | number | undefined;
|
|
97
97
|
offset?: string | number | undefined;
|
|
98
98
|
sortBy?: string | undefined;
|
|
99
|
-
sortDirection?: "
|
|
99
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
100
100
|
filterField?: string | undefined;
|
|
101
101
|
filterValue?: string | number | boolean | undefined;
|
|
102
102
|
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
@@ -292,14 +292,14 @@ declare const authClient: {
|
|
|
292
292
|
admin: {
|
|
293
293
|
hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<({
|
|
294
294
|
permission: {
|
|
295
|
-
readonly user?: ("
|
|
296
|
-
readonly session?: ("
|
|
295
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
296
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
297
297
|
};
|
|
298
298
|
permissions?: never | undefined;
|
|
299
299
|
} | {
|
|
300
300
|
permissions: {
|
|
301
|
-
readonly user?: ("
|
|
302
|
-
readonly session?: ("
|
|
301
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
302
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
303
303
|
};
|
|
304
304
|
permission?: never | undefined;
|
|
305
305
|
}) & {
|
|
@@ -307,14 +307,14 @@ declare const authClient: {
|
|
|
307
307
|
role?: "user" | "admin" | undefined;
|
|
308
308
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<(({
|
|
309
309
|
permission: {
|
|
310
|
-
readonly user?: ("
|
|
311
|
-
readonly session?: ("
|
|
310
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
311
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
312
312
|
};
|
|
313
313
|
permissions?: never | undefined;
|
|
314
314
|
} | {
|
|
315
315
|
permissions: {
|
|
316
|
-
readonly user?: ("
|
|
317
|
-
readonly session?: ("
|
|
316
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
317
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
318
318
|
};
|
|
319
319
|
permission?: never | undefined;
|
|
320
320
|
}) & {
|
|
@@ -333,7 +333,7 @@ declare const authClient: {
|
|
|
333
333
|
} & {
|
|
334
334
|
signIn: {
|
|
335
335
|
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
336
|
-
provider:
|
|
336
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
337
337
|
callbackURL?: string | undefined;
|
|
338
338
|
newUserCallbackURL?: string | undefined;
|
|
339
339
|
errorCallbackURL?: string | undefined;
|
|
@@ -350,7 +350,7 @@ declare const authClient: {
|
|
|
350
350
|
loginHint?: string | undefined;
|
|
351
351
|
additionalData?: Record<string, any> | undefined;
|
|
352
352
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
353
|
-
provider:
|
|
353
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
354
354
|
callbackURL?: string | undefined;
|
|
355
355
|
newUserCallbackURL?: string | undefined;
|
|
356
356
|
errorCallbackURL?: string | undefined;
|
|
@@ -869,14 +869,14 @@ declare const authClient: {
|
|
|
869
869
|
admin: {
|
|
870
870
|
checkRolePermission: <R extends "user" | "admin">(data: ({
|
|
871
871
|
permission: {
|
|
872
|
-
readonly user?: ("
|
|
873
|
-
readonly session?: ("
|
|
872
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
873
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
874
874
|
};
|
|
875
875
|
permissions?: never | undefined;
|
|
876
876
|
} | {
|
|
877
877
|
permissions: {
|
|
878
|
-
readonly user?: ("
|
|
879
|
-
readonly session?: ("
|
|
878
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
879
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
880
880
|
};
|
|
881
881
|
permission?: never | undefined;
|
|
882
882
|
}) & {
|
|
@@ -1355,7 +1355,7 @@ export declare function useAuth(): {
|
|
|
1355
1355
|
limit?: string | number | undefined;
|
|
1356
1356
|
offset?: string | number | undefined;
|
|
1357
1357
|
sortBy?: string | undefined;
|
|
1358
|
-
sortDirection?: "
|
|
1358
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1359
1359
|
filterField?: string | undefined;
|
|
1360
1360
|
filterValue?: string | number | boolean | undefined;
|
|
1361
1361
|
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
@@ -1367,7 +1367,7 @@ export declare function useAuth(): {
|
|
|
1367
1367
|
limit?: string | number | undefined;
|
|
1368
1368
|
offset?: string | number | undefined;
|
|
1369
1369
|
sortBy?: string | undefined;
|
|
1370
|
-
sortDirection?: "
|
|
1370
|
+
sortDirection?: "asc" | "desc" | undefined;
|
|
1371
1371
|
filterField?: string | undefined;
|
|
1372
1372
|
filterValue?: string | number | boolean | undefined;
|
|
1373
1373
|
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
@@ -1563,14 +1563,14 @@ export declare function useAuth(): {
|
|
|
1563
1563
|
admin: {
|
|
1564
1564
|
hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<({
|
|
1565
1565
|
permission: {
|
|
1566
|
-
readonly user?: ("
|
|
1567
|
-
readonly session?: ("
|
|
1566
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
1567
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
1568
1568
|
};
|
|
1569
1569
|
permissions?: never | undefined;
|
|
1570
1570
|
} | {
|
|
1571
1571
|
permissions: {
|
|
1572
|
-
readonly user?: ("
|
|
1573
|
-
readonly session?: ("
|
|
1572
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
1573
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
1574
1574
|
};
|
|
1575
1575
|
permission?: never | undefined;
|
|
1576
1576
|
}) & {
|
|
@@ -1578,14 +1578,14 @@ export declare function useAuth(): {
|
|
|
1578
1578
|
role?: "user" | "admin" | undefined;
|
|
1579
1579
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<(({
|
|
1580
1580
|
permission: {
|
|
1581
|
-
readonly user?: ("
|
|
1582
|
-
readonly session?: ("
|
|
1581
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
1582
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
1583
1583
|
};
|
|
1584
1584
|
permissions?: never | undefined;
|
|
1585
1585
|
} | {
|
|
1586
1586
|
permissions: {
|
|
1587
|
-
readonly user?: ("
|
|
1588
|
-
readonly session?: ("
|
|
1587
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
1588
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
1589
1589
|
};
|
|
1590
1590
|
permission?: never | undefined;
|
|
1591
1591
|
}) & {
|
|
@@ -1604,7 +1604,7 @@ export declare function useAuth(): {
|
|
|
1604
1604
|
} & {
|
|
1605
1605
|
signIn: {
|
|
1606
1606
|
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1607
|
-
provider:
|
|
1607
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
1608
1608
|
callbackURL?: string | undefined;
|
|
1609
1609
|
newUserCallbackURL?: string | undefined;
|
|
1610
1610
|
errorCallbackURL?: string | undefined;
|
|
@@ -1621,7 +1621,7 @@ export declare function useAuth(): {
|
|
|
1621
1621
|
loginHint?: string | undefined;
|
|
1622
1622
|
additionalData?: Record<string, any> | undefined;
|
|
1623
1623
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1624
|
-
provider:
|
|
1624
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
1625
1625
|
callbackURL?: string | undefined;
|
|
1626
1626
|
newUserCallbackURL?: string | undefined;
|
|
1627
1627
|
errorCallbackURL?: string | undefined;
|
|
@@ -2140,14 +2140,14 @@ export declare function useAuth(): {
|
|
|
2140
2140
|
admin: {
|
|
2141
2141
|
checkRolePermission: <R extends "user" | "admin">(data: ({
|
|
2142
2142
|
permission: {
|
|
2143
|
-
readonly user?: ("
|
|
2144
|
-
readonly session?: ("
|
|
2143
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
2144
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
2145
2145
|
};
|
|
2146
2146
|
permissions?: never | undefined;
|
|
2147
2147
|
} | {
|
|
2148
2148
|
permissions: {
|
|
2149
|
-
readonly user?: ("
|
|
2150
|
-
readonly session?: ("
|
|
2149
|
+
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
2150
|
+
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
2151
2151
|
};
|
|
2152
2152
|
permission?: never | undefined;
|
|
2153
2153
|
}) & {
|
|
@@ -2423,7 +2423,7 @@ export declare function useAuth(): {
|
|
|
2423
2423
|
};
|
|
2424
2424
|
export declare const signIn: {
|
|
2425
2425
|
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
2426
|
-
provider:
|
|
2426
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
2427
2427
|
callbackURL?: string | undefined;
|
|
2428
2428
|
newUserCallbackURL?: string | undefined;
|
|
2429
2429
|
errorCallbackURL?: string | undefined;
|
|
@@ -2440,7 +2440,7 @@ export declare const signIn: {
|
|
|
2440
2440
|
loginHint?: string | undefined;
|
|
2441
2441
|
additionalData?: Record<string, any> | undefined;
|
|
2442
2442
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
2443
|
-
provider:
|
|
2443
|
+
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
2444
2444
|
callbackURL?: string | undefined;
|
|
2445
2445
|
newUserCallbackURL?: string | undefined;
|
|
2446
2446
|
errorCallbackURL?: string | undefined;
|
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
import { navigateTo } from "#app";
|
|
1
|
+
import { navigateTo, useRuntimeConfig } from "#app";
|
|
2
2
|
import { adminClient } from "better-auth/client/plugins";
|
|
3
3
|
import { createAuthClient } from "better-auth/vue";
|
|
4
|
-
import { computed } from "vue";
|
|
4
|
+
import { computed, watch } from "vue";
|
|
5
5
|
const authClient = createAuthClient({
|
|
6
6
|
plugins: [adminClient()]
|
|
7
7
|
});
|
|
8
|
+
function setSentryUser(user) {
|
|
9
|
+
const config = useRuntimeConfig();
|
|
10
|
+
if (!config.public.abckit?.sentry) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
import("@sentry/nuxt").then((Sentry) => {
|
|
14
|
+
Sentry.setUser(user);
|
|
15
|
+
}).catch(() => {
|
|
16
|
+
});
|
|
17
|
+
}
|
|
8
18
|
export function useAuth() {
|
|
9
19
|
const session = authClient.useSession();
|
|
10
20
|
const isLoading = computed(() => session.value.isPending);
|
|
11
21
|
const isAuthenticated = computed(() => !!session.value.data?.user);
|
|
12
22
|
const user = computed(() => session.value.data?.user || null);
|
|
23
|
+
watch(user, (currentUser) => {
|
|
24
|
+
if (currentUser) {
|
|
25
|
+
setSentryUser({ id: currentUser.id });
|
|
26
|
+
} else {
|
|
27
|
+
setSentryUser(null);
|
|
28
|
+
}
|
|
29
|
+
}, { immediate: true });
|
|
13
30
|
function login(returnTo) {
|
|
14
31
|
const query = returnTo ? `?return_to=${encodeURIComponent(returnTo)}` : "";
|
|
15
32
|
navigateTo(`/auth/login${query}`);
|
package/dist/types.d.mts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module.mjs'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
1
|
export { default } from './module.mjs'
|
|
8
2
|
|
|
9
|
-
export { type BreadcrumbsConfig, type SetupConfig } from './module.mjs'
|
|
3
|
+
export { type BreadcrumbsConfig, type ModuleOptions, type SetupConfig } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abckit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"@pinia/colada-nuxt": "^0.2.4",
|
|
56
56
|
"@pinia/nuxt": "^0.11.3",
|
|
57
57
|
"@polar-sh/sdk": "^0.41.5",
|
|
58
|
+
"@sentry/nuxt": "^10.29.0",
|
|
58
59
|
"@sindresorhus/slugify": "^3.0.0",
|
|
59
60
|
"@tailwindcss/typography": "^0.5.19",
|
|
60
61
|
"@tanstack/vue-table": "^8.21.3",
|
|
@@ -125,6 +126,7 @@
|
|
|
125
126
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
126
127
|
"lint": "eslint .",
|
|
127
128
|
"lint:fix": "eslint . --fix",
|
|
128
|
-
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
129
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
130
|
+
"release": "pnpm publish --no-git-checks --access public"
|
|
129
131
|
}
|
|
130
132
|
}
|