@quvel-kit/core 1.1.0

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 (285) hide show
  1. package/README.md +670 -0
  2. package/dist/auth/boot/defineAuthGuard.d.ts +54 -0
  3. package/dist/auth/boot/defineAuthGuard.d.ts.map +1 -0
  4. package/dist/auth/boot/defineAuthGuard.js +72 -0
  5. package/dist/auth/enums/AuthStatusEnum.d.ts +13 -0
  6. package/dist/auth/enums/AuthStatusEnum.d.ts.map +1 -0
  7. package/dist/auth/enums/AuthStatusEnum.js +13 -0
  8. package/dist/auth/index.d.ts +13 -0
  9. package/dist/auth/index.d.ts.map +1 -0
  10. package/dist/auth/index.js +13 -0
  11. package/dist/auth/services/AuthGuard.d.ts +58 -0
  12. package/dist/auth/services/AuthGuard.d.ts.map +1 -0
  13. package/dist/auth/services/AuthGuard.js +51 -0
  14. package/dist/auth/services/AuthService.d.ts +52 -0
  15. package/dist/auth/services/AuthService.d.ts.map +1 -0
  16. package/dist/auth/services/AuthService.js +67 -0
  17. package/dist/auth/services/PasswordResetService.d.ts +34 -0
  18. package/dist/auth/services/PasswordResetService.d.ts.map +1 -0
  19. package/dist/auth/services/PasswordResetService.js +45 -0
  20. package/dist/auth/services/TwoFactorChallengeService.d.ts +22 -0
  21. package/dist/auth/services/TwoFactorChallengeService.d.ts.map +1 -0
  22. package/dist/auth/services/TwoFactorChallengeService.js +29 -0
  23. package/dist/auth/services/TwoFactorService.d.ts +64 -0
  24. package/dist/auth/services/TwoFactorService.d.ts.map +1 -0
  25. package/dist/auth/services/TwoFactorService.js +68 -0
  26. package/dist/auth/services/index.d.ts +8 -0
  27. package/dist/auth/services/index.d.ts.map +1 -0
  28. package/dist/auth/services/index.js +5 -0
  29. package/dist/auth/types/auth-meta.d.ts +54 -0
  30. package/dist/auth/types/auth-meta.d.ts.map +1 -0
  31. package/dist/auth/types/auth-meta.js +6 -0
  32. package/dist/auth/types/index.d.ts +5 -0
  33. package/dist/auth/types/index.d.ts.map +1 -0
  34. package/dist/auth/types/index.js +4 -0
  35. package/dist/auth/utils/auth-meta.d.ts +75 -0
  36. package/dist/auth/utils/auth-meta.d.ts.map +1 -0
  37. package/dist/auth/utils/auth-meta.js +93 -0
  38. package/dist/boot/quvel.d.ts +26 -0
  39. package/dist/boot/quvel.d.ts.map +1 -0
  40. package/dist/boot/quvel.js +38 -0
  41. package/dist/build/index.d.ts +9 -0
  42. package/dist/build/index.d.ts.map +1 -0
  43. package/dist/build/index.js +8 -0
  44. package/dist/build/loadEnv.d.ts +14 -0
  45. package/dist/build/loadEnv.d.ts.map +1 -0
  46. package/dist/build/loadEnv.js +33 -0
  47. package/dist/build/quasarConfig.d.ts +67 -0
  48. package/dist/build/quasarConfig.d.ts.map +1 -0
  49. package/dist/build/quasarConfig.js +126 -0
  50. package/dist/components/Common/TaskErrors.vue +47 -0
  51. package/dist/components/Inputs/BaseInput.vue +88 -0
  52. package/dist/components/Misc/ClientOnly.vue +22 -0
  53. package/dist/components/Transitions/FadeInOut.vue +9 -0
  54. package/dist/components/Transitions/SlowExpand.vue +13 -0
  55. package/dist/components/WebSocketChannelManager.vue +634 -0
  56. package/dist/components/index.d.ts +12 -0
  57. package/dist/components/index.d.ts.map +1 -0
  58. package/dist/components/index.js +16 -0
  59. package/dist/composables/index.d.ts +19 -0
  60. package/dist/composables/index.d.ts.map +1 -0
  61. package/dist/composables/index.js +16 -0
  62. package/dist/composables/useClient.d.ts +16 -0
  63. package/dist/composables/useClient.d.ts.map +1 -0
  64. package/dist/composables/useClient.js +28 -0
  65. package/dist/composables/useMetaConfig.d.ts +14 -0
  66. package/dist/composables/useMetaConfig.d.ts.map +1 -0
  67. package/dist/composables/useMetaConfig.js +77 -0
  68. package/dist/composables/useQueryMessageHandler.d.ts +44 -0
  69. package/dist/composables/useQueryMessageHandler.d.ts.map +1 -0
  70. package/dist/composables/useQueryMessageHandler.js +74 -0
  71. package/dist/composables/useQuvel.d.ts +15 -0
  72. package/dist/composables/useQuvel.d.ts.map +1 -0
  73. package/dist/composables/useQuvel.js +38 -0
  74. package/dist/composables/useRecaptcha.d.ts +35 -0
  75. package/dist/composables/useRecaptcha.d.ts.map +1 -0
  76. package/dist/composables/useRecaptcha.js +87 -0
  77. package/dist/composables/useScopedService.d.ts +18 -0
  78. package/dist/composables/useScopedService.d.ts.map +1 -0
  79. package/dist/composables/useScopedService.js +25 -0
  80. package/dist/composables/useScript.d.ts +25 -0
  81. package/dist/composables/useScript.d.ts.map +1 -0
  82. package/dist/composables/useScript.js +106 -0
  83. package/dist/composables/useUrlQueryHandler.d.ts +38 -0
  84. package/dist/composables/useUrlQueryHandler.d.ts.map +1 -0
  85. package/dist/composables/useUrlQueryHandler.js +76 -0
  86. package/dist/composables/useWebSockets.d.ts +18 -0
  87. package/dist/composables/useWebSockets.d.ts.map +1 -0
  88. package/dist/composables/useWebSockets.js +55 -0
  89. package/dist/composables/useWindowEvent.d.ts +16 -0
  90. package/dist/composables/useWindowEvent.d.ts.map +1 -0
  91. package/dist/composables/useWindowEvent.js +27 -0
  92. package/dist/composables/useXsrf.d.ts +29 -0
  93. package/dist/composables/useXsrf.d.ts.map +1 -0
  94. package/dist/composables/useXsrf.js +59 -0
  95. package/dist/config/QuasarConfigBuilder.d.ts +100 -0
  96. package/dist/config/QuasarConfigBuilder.d.ts.map +1 -0
  97. package/dist/config/QuasarConfigBuilder.js +98 -0
  98. package/dist/config/i18n.d.ts +23 -0
  99. package/dist/config/i18n.d.ts.map +1 -0
  100. package/dist/config/i18n.js +43 -0
  101. package/dist/config/index.d.ts +8 -0
  102. package/dist/config/index.d.ts.map +1 -0
  103. package/dist/config/index.js +7 -0
  104. package/dist/config/moduleTransformer.d.ts +18 -0
  105. package/dist/config/moduleTransformer.d.ts.map +1 -0
  106. package/dist/config/moduleTransformer.js +76 -0
  107. package/dist/config/quvel.d.ts +40 -0
  108. package/dist/config/quvel.d.ts.map +1 -0
  109. package/dist/config/quvel.js +59 -0
  110. package/dist/config/quvel.types.d.ts +59 -0
  111. package/dist/config/quvel.types.d.ts.map +1 -0
  112. package/dist/config/quvel.types.js +6 -0
  113. package/dist/container/ServiceContainer.d.ts +107 -0
  114. package/dist/container/ServiceContainer.d.ts.map +1 -0
  115. package/dist/container/ServiceContainer.js +201 -0
  116. package/dist/container/types/vue.d.ts +9 -0
  117. package/dist/container/types.d.ts +81 -0
  118. package/dist/container/types.d.ts.map +1 -0
  119. package/dist/container/types.js +1 -0
  120. package/dist/i18n/en-US/common.d.ts +19 -0
  121. package/dist/i18n/en-US/common.d.ts.map +1 -0
  122. package/dist/i18n/en-US/common.js +17 -0
  123. package/dist/i18n/en-US/index.d.ts +21 -0
  124. package/dist/i18n/en-US/index.d.ts.map +1 -0
  125. package/dist/i18n/en-US/index.js +4 -0
  126. package/dist/i18n/es-MX/common.d.ts +19 -0
  127. package/dist/i18n/es-MX/common.d.ts.map +1 -0
  128. package/dist/i18n/es-MX/common.js +17 -0
  129. package/dist/i18n/es-MX/index.d.ts +21 -0
  130. package/dist/i18n/es-MX/index.d.ts.map +1 -0
  131. package/dist/i18n/es-MX/index.js +4 -0
  132. package/dist/index.d.ts +54 -0
  133. package/dist/index.d.ts.map +1 -0
  134. package/dist/index.js +67 -0
  135. package/dist/models/User.d.ts +32 -0
  136. package/dist/models/User.d.ts.map +1 -0
  137. package/dist/models/User.js +48 -0
  138. package/dist/module.d.ts +21 -0
  139. package/dist/module.d.ts.map +1 -0
  140. package/dist/module.js +45 -0
  141. package/dist/modules/helpers.d.ts +30 -0
  142. package/dist/modules/helpers.d.ts.map +1 -0
  143. package/dist/modules/helpers.js +45 -0
  144. package/dist/modules/index.d.ts +8 -0
  145. package/dist/modules/index.d.ts.map +1 -0
  146. package/dist/modules/index.js +6 -0
  147. package/dist/modules/types.d.ts +141 -0
  148. package/dist/modules/types.d.ts.map +1 -0
  149. package/dist/modules/types.js +7 -0
  150. package/dist/pages/ErrorNotFound.vue +300 -0
  151. package/dist/pages/index.d.ts +7 -0
  152. package/dist/pages/index.d.ts.map +1 -0
  153. package/dist/pages/index.js +6 -0
  154. package/dist/services/ApiService.d.ts +90 -0
  155. package/dist/services/ApiService.d.ts.map +1 -0
  156. package/dist/services/ApiService.js +159 -0
  157. package/dist/services/I18nService.d.ts +67 -0
  158. package/dist/services/I18nService.d.ts.map +1 -0
  159. package/dist/services/I18nService.js +92 -0
  160. package/dist/services/LogService.d.ts +31 -0
  161. package/dist/services/LogService.d.ts.map +1 -0
  162. package/dist/services/LogService.js +49 -0
  163. package/dist/services/Service.d.ts +10 -0
  164. package/dist/services/Service.d.ts.map +1 -0
  165. package/dist/services/Service.js +8 -0
  166. package/dist/services/TaskService.d.ts +64 -0
  167. package/dist/services/TaskService.d.ts.map +1 -0
  168. package/dist/services/TaskService.js +188 -0
  169. package/dist/services/ThemeService.d.ts +28 -0
  170. package/dist/services/ThemeService.d.ts.map +1 -0
  171. package/dist/services/ThemeService.js +77 -0
  172. package/dist/services/ValidationService.d.ts +55 -0
  173. package/dist/services/ValidationService.d.ts.map +1 -0
  174. package/dist/services/ValidationService.js +81 -0
  175. package/dist/services/WebSocketService.d.ts +59 -0
  176. package/dist/services/WebSocketService.d.ts.map +1 -0
  177. package/dist/services/WebSocketService.js +148 -0
  178. package/dist/services/logger/BaseLogger.d.ts +35 -0
  179. package/dist/services/logger/BaseLogger.d.ts.map +1 -0
  180. package/dist/services/logger/BaseLogger.js +66 -0
  181. package/dist/services/logger/ConsoleLogger.d.ts +21 -0
  182. package/dist/services/logger/ConsoleLogger.d.ts.map +1 -0
  183. package/dist/services/logger/ConsoleLogger.js +60 -0
  184. package/dist/services/logger/NullLogger.d.ts +10 -0
  185. package/dist/services/logger/NullLogger.d.ts.map +1 -0
  186. package/dist/services/logger/NullLogger.js +10 -0
  187. package/dist/stores/plugins/serviceContainer.d.ts +10 -0
  188. package/dist/stores/plugins/serviceContainer.d.ts.map +1 -0
  189. package/dist/stores/plugins/serviceContainer.js +14 -0
  190. package/dist/stores/sessionStore.d.ts +71 -0
  191. package/dist/stores/sessionStore.d.ts.map +1 -0
  192. package/dist/stores/sessionStore.js +125 -0
  193. package/dist/types/app.types.d.ts +202 -0
  194. package/dist/types/app.types.d.ts.map +1 -0
  195. package/dist/types/app.types.js +6 -0
  196. package/dist/types/config.types.d.ts +2 -0
  197. package/dist/types/config.types.d.ts.map +1 -0
  198. package/dist/types/config.types.js +1 -0
  199. package/dist/types/global.d.ts +33 -0
  200. package/dist/types/i18n.types.d.ts +21 -0
  201. package/dist/types/i18n.types.d.ts.map +1 -0
  202. package/dist/types/i18n.types.js +6 -0
  203. package/dist/types/laravel.types.d.ts +167 -0
  204. package/dist/types/laravel.types.d.ts.map +1 -0
  205. package/dist/types/laravel.types.js +6 -0
  206. package/dist/types/logging.types.d.ts +81 -0
  207. package/dist/types/logging.types.d.ts.map +1 -0
  208. package/dist/types/logging.types.js +22 -0
  209. package/dist/types/pinia.d.ts +24 -0
  210. package/dist/types/scripts.types.d.ts +31 -0
  211. package/dist/types/scripts.types.d.ts.map +1 -0
  212. package/dist/types/scripts.types.js +6 -0
  213. package/dist/types/ssr.d.ts +11 -0
  214. package/dist/types/task.types.d.ts +121 -0
  215. package/dist/types/task.types.d.ts.map +1 -0
  216. package/dist/types/task.types.js +7 -0
  217. package/dist/types/theme.types.d.ts +13 -0
  218. package/dist/types/theme.types.d.ts.map +1 -0
  219. package/dist/types/theme.types.js +17 -0
  220. package/dist/types/user.types.d.ts +24 -0
  221. package/dist/types/user.types.d.ts.map +1 -0
  222. package/dist/types/user.types.js +1 -0
  223. package/dist/types/vue-shim.d.ts +11 -0
  224. package/dist/types/websocket.types.d.ts +62 -0
  225. package/dist/types/websocket.types.d.ts.map +1 -0
  226. package/dist/types/websocket.types.js +6 -0
  227. package/dist/utils/apiInterceptors.d.ts +76 -0
  228. package/dist/utils/apiInterceptors.d.ts.map +1 -0
  229. package/dist/utils/apiInterceptors.js +149 -0
  230. package/dist/utils/assets.d.ts +40 -0
  231. package/dist/utils/assets.d.ts.map +1 -0
  232. package/dist/utils/assets.js +340 -0
  233. package/dist/utils/axios.d.ts +19 -0
  234. package/dist/utils/axios.d.ts.map +1 -0
  235. package/dist/utils/axios.js +113 -0
  236. package/dist/utils/config.d.ts +16 -0
  237. package/dist/utils/config.d.ts.map +1 -0
  238. package/dist/utils/config.js +48 -0
  239. package/dist/utils/container.d.ts +12 -0
  240. package/dist/utils/container.d.ts.map +1 -0
  241. package/dist/utils/container.js +11 -0
  242. package/dist/utils/deepMerge.d.ts +28 -0
  243. package/dist/utils/deepMerge.d.ts.map +1 -0
  244. package/dist/utils/deepMerge.js +59 -0
  245. package/dist/utils/envConfig.d.ts +73 -0
  246. package/dist/utils/envConfig.d.ts.map +1 -0
  247. package/dist/utils/envConfig.js +161 -0
  248. package/dist/utils/error.d.ts +44 -0
  249. package/dist/utils/error.d.ts.map +1 -0
  250. package/dist/utils/error.js +67 -0
  251. package/dist/utils/headers.d.ts +36 -0
  252. package/dist/utils/headers.d.ts.map +1 -0
  253. package/dist/utils/headers.js +54 -0
  254. package/dist/utils/i18n.d.ts +26 -0
  255. package/dist/utils/i18n.d.ts.map +1 -0
  256. package/dist/utils/i18n.js +56 -0
  257. package/dist/utils/index.d.ts +14 -0
  258. package/dist/utils/index.d.ts.map +1 -0
  259. package/dist/utils/index.js +13 -0
  260. package/dist/utils/loading.d.ts +29 -0
  261. package/dist/utils/loading.d.ts.map +1 -0
  262. package/dist/utils/loading.js +46 -0
  263. package/dist/utils/logging.d.ts +20 -0
  264. package/dist/utils/logging.d.ts.map +1 -0
  265. package/dist/utils/logging.js +54 -0
  266. package/dist/utils/notify.d.ts +15 -0
  267. package/dist/utils/notify.d.ts.map +1 -0
  268. package/dist/utils/notify.js +30 -0
  269. package/dist/utils/object.d.ts +28 -0
  270. package/dist/utils/object.d.ts.map +1 -0
  271. package/dist/utils/object.js +48 -0
  272. package/dist/utils/pagination.d.ts +60 -0
  273. package/dist/utils/pagination.d.ts.map +1 -0
  274. package/dist/utils/pagination.js +252 -0
  275. package/dist/utils/paths.d.ts +54 -0
  276. package/dist/utils/paths.d.ts.map +1 -0
  277. package/dist/utils/paths.js +48 -0
  278. package/dist/utils/platform.d.ts +25 -0
  279. package/dist/utils/platform.d.ts.map +1 -0
  280. package/dist/utils/platform.js +64 -0
  281. package/dist/utils/scripts.d.ts +20 -0
  282. package/dist/utils/scripts.d.ts.map +1 -0
  283. package/dist/utils/scripts.js +39 -0
  284. package/global.d.ts +29 -0
  285. package/package.json +119 -0
@@ -0,0 +1,8 @@
1
+ export { AuthService } from './AuthService.js';
2
+ export { PasswordResetService } from './PasswordResetService.js';
3
+ export { TwoFactorService } from './TwoFactorService.js';
4
+ export { TwoFactorChallengeService } from './TwoFactorChallengeService.js';
5
+ export { AuthGuard } from './AuthGuard.js';
6
+ export type { AuthCheckResult, AuthGuardConfig } from './AuthGuard.js';
7
+ export type { TwoFactorQRResponse, TwoFactorSecretResponse, TwoFactorRecoveryCodesResponse } from './TwoFactorService.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { AuthService } from './AuthService.js';
2
+ export { PasswordResetService } from './PasswordResetService.js';
3
+ export { TwoFactorService } from './TwoFactorService.js';
4
+ export { TwoFactorChallengeService } from './TwoFactorChallengeService.js';
5
+ export { AuthGuard } from './AuthGuard.js';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Authentication Meta Types
3
+ *
4
+ * Type definitions for route-level authentication configuration.
5
+ */
6
+ /**
7
+ * Authentication configuration for routes
8
+ */
9
+ export interface AuthMeta {
10
+ /**
11
+ * Explicitly require authentication for this route.
12
+ * If undefined, falls back to VITE_REQUIRE_AUTH_BY_DEFAULT environment variable.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * auth: { requiresAuth: true }
17
+ * ```
18
+ */
19
+ requiresAuth?: boolean;
20
+ /**
21
+ * Skip all authentication checks for this route.
22
+ * Useful for static pages, public APIs, or routes that handle auth manually.
23
+ * Takes precedence over all other auth settings.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * auth: { skipAuth: true }
28
+ * ```
29
+ */
30
+ skipAuth?: boolean;
31
+ /**
32
+ * Redirect authenticated users away from this route.
33
+ * Perfect for login, signup, and other auth-related pages where
34
+ * authenticated users shouldn't have access.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * auth: { guestOnly: true }
39
+ * ```
40
+ */
41
+ guestOnly?: boolean;
42
+ /**
43
+ * Custom redirect target for authenticated users on guest-only routes.
44
+ * If not specified, uses VITE_AUTH_SUCCESS_ROUTE environment variable
45
+ * or falls back to dashboard.
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * auth: { guestOnly: true, redirectTo: '/custom-dashboard' }
50
+ * ```
51
+ */
52
+ redirectTo?: string;
53
+ }
54
+ //# sourceMappingURL=auth-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-meta.d.ts","sourceRoot":"","sources":["../../../src/auth/types/auth-meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Authentication Meta Types
3
+ *
4
+ * Type definitions for route-level authentication configuration.
5
+ */
6
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Auth Types Exports
3
+ */
4
+ export type { AuthMeta } from './auth-meta.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Auth Types Exports
3
+ */
4
+ export {};
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Authentication Meta Utilities
3
+ *
4
+ * Helper functions for creating type-safe auth meta configurations.
5
+ */
6
+ import type { AuthMeta } from '../types/auth-meta';
7
+ /**
8
+ * Generic factory function for creating type-safe auth meta objects
9
+ *
10
+ * @param options - Auth configuration options
11
+ * @returns AuthMeta object for use in route meta
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * meta: {
16
+ * auth: createAuthMeta({
17
+ * guestOnly: true,
18
+ * redirectTo: '/dashboard'
19
+ * })
20
+ * }
21
+ * ```
22
+ */
23
+ export declare function createAuthMeta(options: AuthMeta): AuthMeta;
24
+ /**
25
+ * Create auth meta for guest-only routes (login, signup, etc.)
26
+ * Redirects authenticated users to the specified route or default success route.
27
+ *
28
+ * @param redirectTo - Optional custom redirect target for authenticated users
29
+ * @returns AuthMeta object configured for guest-only access
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // Redirect to default success route
34
+ * meta: { auth: createGuestOnlyAuth() }
35
+ *
36
+ * // Redirect to custom route
37
+ * meta: { auth: createGuestOnlyAuth('/custom-dashboard') }
38
+ * ```
39
+ */
40
+ export declare function createGuestOnlyAuth(redirectTo?: string): AuthMeta;
41
+ /**
42
+ * Create auth meta for protected routes that explicitly require authentication
43
+ *
44
+ * @returns AuthMeta object configured to require authentication
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * meta: { auth: createProtectedAuth() }
49
+ * ```
50
+ */
51
+ export declare function createProtectedAuth(): AuthMeta;
52
+ /**
53
+ * Create auth meta for public routes that explicitly allow unauthenticated access
54
+ *
55
+ * @returns AuthMeta object configured for public access
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * meta: { auth: createPublicAuth() }
60
+ * ```
61
+ */
62
+ export declare function createPublicAuth(): AuthMeta;
63
+ /**
64
+ * Create auth meta that skips all authentication logic
65
+ * Useful for static pages, health checks, or routes with custom auth handling
66
+ *
67
+ * @returns AuthMeta object configured to skip all auth checks
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * meta: { auth: createSkipAuth() }
72
+ * ```
73
+ */
74
+ export declare function createSkipAuth(): AuthMeta;
75
+ //# sourceMappingURL=auth-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-meta.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/auth-meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAE1D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAMjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,QAAQ,CAI9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,QAAQ,CAI3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,QAAQ,CAIzC"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Authentication Meta Utilities
3
+ *
4
+ * Helper functions for creating type-safe auth meta configurations.
5
+ */
6
+ /**
7
+ * Generic factory function for creating type-safe auth meta objects
8
+ *
9
+ * @param options - Auth configuration options
10
+ * @returns AuthMeta object for use in route meta
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * meta: {
15
+ * auth: createAuthMeta({
16
+ * guestOnly: true,
17
+ * redirectTo: '/dashboard'
18
+ * })
19
+ * }
20
+ * ```
21
+ */
22
+ export function createAuthMeta(options) {
23
+ return { ...options };
24
+ }
25
+ /**
26
+ * Create auth meta for guest-only routes (login, signup, etc.)
27
+ * Redirects authenticated users to the specified route or default success route.
28
+ *
29
+ * @param redirectTo - Optional custom redirect target for authenticated users
30
+ * @returns AuthMeta object configured for guest-only access
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Redirect to default success route
35
+ * meta: { auth: createGuestOnlyAuth() }
36
+ *
37
+ * // Redirect to custom route
38
+ * meta: { auth: createGuestOnlyAuth('/custom-dashboard') }
39
+ * ```
40
+ */
41
+ export function createGuestOnlyAuth(redirectTo) {
42
+ return {
43
+ guestOnly: true,
44
+ requiresAuth: false, // Explicitly allow unauthenticated access
45
+ ...(redirectTo && { redirectTo }),
46
+ };
47
+ }
48
+ /**
49
+ * Create auth meta for protected routes that explicitly require authentication
50
+ *
51
+ * @returns AuthMeta object configured to require authentication
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * meta: { auth: createProtectedAuth() }
56
+ * ```
57
+ */
58
+ export function createProtectedAuth() {
59
+ return {
60
+ requiresAuth: true,
61
+ };
62
+ }
63
+ /**
64
+ * Create auth meta for public routes that explicitly allow unauthenticated access
65
+ *
66
+ * @returns AuthMeta object configured for public access
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * meta: { auth: createPublicAuth() }
71
+ * ```
72
+ */
73
+ export function createPublicAuth() {
74
+ return {
75
+ requiresAuth: false,
76
+ };
77
+ }
78
+ /**
79
+ * Create auth meta that skips all authentication logic
80
+ * Useful for static pages, health checks, or routes with custom auth handling
81
+ *
82
+ * @returns AuthMeta object configured to skip all auth checks
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * meta: { auth: createSkipAuth() }
87
+ * ```
88
+ */
89
+ export function createSkipAuth() {
90
+ return {
91
+ skipAuth: true,
92
+ };
93
+ }
@@ -0,0 +1,26 @@
1
+ import type { App } from 'vue';
2
+ import type { QSsrContext } from '@quasar/app-vite';
3
+ import type { ServiceRegistry } from '../modules/types.js';
4
+ /**
5
+ * Define Quvel boot function
6
+ *
7
+ * This helper creates a Quasar boot function that initializes the Quvel service container
8
+ * with services from modules.
9
+ *
10
+ * @param serviceRegistry - Services from modules (getServices(modules))
11
+ * @returns Boot function for Quasar
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { defineQuvelBoot } from '@quvel-kit/core';
16
+ * import { getServices } from '@quvel-kit/core';
17
+ * import { modules } from '../modules';
18
+ *
19
+ * export default defineQuvelBoot(getServices(modules));
20
+ * ```
21
+ */
22
+ export declare function defineQuvelBoot(serviceRegistry: ServiceRegistry): ({ ssrContext, app }: {
23
+ ssrContext?: QSsrContext | null;
24
+ app: App;
25
+ }) => void;
26
+ //# sourceMappingURL=quvel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quvel.d.ts","sourceRoot":"","sources":["../../src/boot/quvel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,eAAe,IACtD,qBAAqB;IAC3B,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,GAAG,EAAE,GAAG,CAAC;CACV,UAmBF"}
@@ -0,0 +1,38 @@
1
+ import { createContainer } from '../utils/container.js';
2
+ import { ContainerKey, setClientContainer } from '../composables/useQuvel.js';
3
+ /**
4
+ * Define Quvel boot function
5
+ *
6
+ * This helper creates a Quasar boot function that initializes the Quvel service container
7
+ * with services from modules.
8
+ *
9
+ * @param serviceRegistry - Services from modules (getServices(modules))
10
+ * @returns Boot function for Quasar
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { defineQuvelBoot } from '@quvel-kit/core';
15
+ * import { getServices } from '@quvel-kit/core';
16
+ * import { modules } from '../modules';
17
+ *
18
+ * export default defineQuvelBoot(getServices(modules));
19
+ * ```
20
+ */
21
+ export function defineQuvelBoot(serviceRegistry) {
22
+ return ({ ssrContext, app }) => {
23
+ const serviceMap = new Map();
24
+ for (const [name, ServiceCls] of Object.entries(serviceRegistry)) {
25
+ serviceMap.set(name, ServiceCls);
26
+ }
27
+ const container = createContainer(ssrContext, serviceMap);
28
+ if (ssrContext) {
29
+ ssrContext.$quvel = container;
30
+ }
31
+ else {
32
+ app.provide(ContainerKey, container);
33
+ setClientContainer(container);
34
+ }
35
+ app.config.globalProperties.$quvel = container;
36
+ app.use(container.i18n.instance);
37
+ };
38
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Build-time Configuration Helpers
3
+ *
4
+ * Node.js-only utilities for quasar.config.ts
5
+ * These use Node.js APIs and should NOT be imported in browser code.
6
+ */
7
+ export { config } from './quasarConfig.js';
8
+ export { loadEnvFiles } from './loadEnv.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/build/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Build-time Configuration Helpers
3
+ *
4
+ * Node.js-only utilities for quasar.config.ts
5
+ * These use Node.js APIs and should NOT be imported in browser code.
6
+ */
7
+ export { config } from './quasarConfig.js';
8
+ export { loadEnvFiles } from './loadEnv.js';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Load environment files without side effects
3
+ *
4
+ * Reads .env files and returns a merged object without modifying process.env
5
+ */
6
+ /**
7
+ * Load environment files into an object
8
+ *
9
+ * @param baseDir - Base directory to search for .env files
10
+ * @param files - Array of .env file names to load (in order of priority)
11
+ * @returns Merged environment object
12
+ */
13
+ export declare function loadEnvFiles(baseDir: string, files?: string[]): Record<string, string>;
14
+ //# sourceMappingURL=loadEnv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnv.d.ts","sourceRoot":"","sources":["../../src/build/loadEnv.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAM,EAAa,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBxB"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Load environment files without side effects
3
+ *
4
+ * Reads .env files and returns a merged object without modifying process.env
5
+ */
6
+ import { readFileSync, existsSync } from 'node:fs';
7
+ import { resolve } from 'node:path';
8
+ import { parse } from 'dotenv';
9
+ /**
10
+ * Load environment files into an object
11
+ *
12
+ * @param baseDir - Base directory to search for .env files
13
+ * @param files - Array of .env file names to load (in order of priority)
14
+ * @returns Merged environment object
15
+ */
16
+ export function loadEnvFiles(baseDir, files = ['.env']) {
17
+ const env = {};
18
+ for (const file of files) {
19
+ const filePath = resolve(baseDir, file);
20
+ if (!existsSync(filePath)) {
21
+ continue;
22
+ }
23
+ try {
24
+ const content = readFileSync(filePath, 'utf-8');
25
+ const parsed = parse(content);
26
+ Object.assign(env, parsed);
27
+ }
28
+ catch (error) {
29
+ console.warn(`Failed to load ${file}:`, error);
30
+ }
31
+ }
32
+ return env;
33
+ }
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Quasar Configuration Helpers
3
+ *
4
+ * Configuration utilities for Quasar applications
5
+ */
6
+ /**
7
+ * Configuration helper for Quasar applications
8
+ *
9
+ * Provides infrastructure settings and app metadata
10
+ */
11
+ export declare const config: {
12
+ /**
13
+ * HTTPS/SSL configuration
14
+ */
15
+ https: {
16
+ /** Check if HTTPS is enabled */
17
+ isEnabled(): boolean;
18
+ /** Get SSL certificate paths (returns false if HTTPS disabled) */
19
+ getCerts(): {
20
+ key: string;
21
+ cert: string;
22
+ ca: string;
23
+ } | false;
24
+ };
25
+ /**
26
+ * Infrastructure configuration
27
+ */
28
+ infra: {
29
+ /** Check if running in local development mode */
30
+ isLocal(): boolean;
31
+ /** Get host based on type */
32
+ getHost(type?: "dev" | "tenant" | "prod"): string;
33
+ /** Get dev server port for a specific mode */
34
+ getPort(mode: "ssr" | "spa" | "capacitor" | "electron" | "pwa"): number;
35
+ /** Get Vite HMR port for SSR/PWA modes */
36
+ getHmrPort(mode: "ssr" | "pwa"): number;
37
+ /** Get a production server port (SSR only) */
38
+ getProdPort(): number;
39
+ /** Get a list of allowed hosts */
40
+ getAllowedHosts(): string[];
41
+ /** Get HMR configuration for reverse proxy setups */
42
+ getHMR(): {
43
+ protocol: string;
44
+ host: string;
45
+ port: number;
46
+ };
47
+ };
48
+ /**
49
+ * Application metadata
50
+ */
51
+ app: {
52
+ /** Get application ID */
53
+ getId(): string;
54
+ /** Get application name */
55
+ getName(): string;
56
+ /** Get application short name */
57
+ getShortName(): string;
58
+ };
59
+ /**
60
+ * SSR configuration
61
+ */
62
+ ssr: {
63
+ /** Check if PWA is enabled in SSR mode */
64
+ isPwaEnabled(): boolean;
65
+ };
66
+ };
67
+ //# sourceMappingURL=quasarConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quasarConfig.d.ts","sourceRoot":"","sources":["../../src/build/quasarConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH;;;;GAIG;AACH,eAAO,MAAM,MAAM;IACjB;;OAEG;;QAED,gCAAgC;qBACnB,OAAO;QAIpB,kEAAkE;oBACtD;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,KAAK;;IAa/D;;OAEG;;QAED,iDAAiD;mBACtC,OAAO;QAIlB,6BAA6B;uBACf,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAW,MAAM;QAWxD,8CAA8C;sBAChC,KAAK,GAAG,KAAK,GAAG,WAAW,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM;QAYvE,0CAA0C;yBACzB,KAAK,GAAG,KAAK,GAAG,MAAM;QASvC,8CAA8C;uBAC/B,MAAM;QAIrB,kCAAkC;2BACf,MAAM,EAAE;QAI3B,qDAAqD;kBAC3C;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE;;IAS5D;;OAEG;;QAED,yBAAyB;iBAChB,MAAM;QAIf,2BAA2B;mBAChB,MAAM;QAIjB,iCAAiC;wBACjB,MAAM;;IAKxB;;OAEG;;QAED,0CAA0C;wBAC1B,OAAO;;CAI1B,CAAC"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Quasar Configuration Helpers
3
+ *
4
+ * Configuration utilities for Quasar applications
5
+ */
6
+ import { EnvConfig } from '../utils/envConfig.js';
7
+ import { loadEnvFiles } from './loadEnv.js';
8
+ // Determine which env files to load based on NODE_ENV
9
+ const nodeEnv = process.env.NODE_ENV || 'development';
10
+ const envMode = nodeEnv === 'production' ? 'prod' : 'dev';
11
+ const envFiles = [
12
+ '.env',
13
+ `.env.${envMode}`,
14
+ '.env.local',
15
+ `.env.${envMode}.local`,
16
+ ];
17
+ const envVars = loadEnvFiles(process.cwd(), envFiles);
18
+ const envConfig = new EnvConfig({ env: envVars });
19
+ /**
20
+ * Configuration helper for Quasar applications
21
+ *
22
+ * Provides infrastructure settings and app metadata
23
+ */
24
+ export const config = {
25
+ /**
26
+ * HTTPS/SSL configuration
27
+ */
28
+ https: {
29
+ /** Check if HTTPS is enabled */
30
+ isEnabled() {
31
+ return envConfig.getBoolean('HTTPS_ENABLED', true);
32
+ },
33
+ /** Get SSL certificate paths (returns false if HTTPS disabled) */
34
+ getCerts() {
35
+ if (!this.isEnabled()) {
36
+ return false;
37
+ }
38
+ return {
39
+ key: envConfig.get('CERT_KEY_PATH', '../docker/certs/selfsigned.key'),
40
+ cert: envConfig.get('CERT_PATH', '../docker/certs/selfsigned.crt'),
41
+ ca: envConfig.get('CERT_CA_PATH', '../docker/certs/ca.pem'),
42
+ };
43
+ },
44
+ },
45
+ /**
46
+ * Infrastructure configuration
47
+ */
48
+ infra: {
49
+ /** Check if running in local development mode */
50
+ isLocal() {
51
+ return envConfig.getBoolean('LOCAL', false);
52
+ },
53
+ /** Get host based on type */
54
+ getHost(type = 'dev') {
55
+ switch (type) {
56
+ case 'tenant':
57
+ return envConfig.get('DEV_TENANT_HOST', 'cap-tenant.quvel.127.0.0.1.nip.io');
58
+ case 'prod':
59
+ return envConfig.get('PROD_HOST', '0.0.0.0');
60
+ default:
61
+ return envConfig.get('DEV_HOST', 'quvel.127.0.0.1.nip.io');
62
+ }
63
+ },
64
+ /** Get dev server port for a specific mode */
65
+ getPort(mode) {
66
+ const defaults = {
67
+ ssr: 3000,
68
+ spa: 3001,
69
+ capacitor: 3002,
70
+ electron: 3003,
71
+ pwa: 3004,
72
+ };
73
+ return envConfig.getNumber(`${mode.toUpperCase()}_DEV_PORT`, defaults[mode]);
74
+ },
75
+ /** Get Vite HMR port for SSR/PWA modes */
76
+ getHmrPort(mode) {
77
+ const defaults = {
78
+ ssr: 9001,
79
+ pwa: 9003,
80
+ };
81
+ return envConfig.getNumber(`${mode.toUpperCase()}_VITE_PORT`, defaults[mode]);
82
+ },
83
+ /** Get a production server port (SSR only) */
84
+ getProdPort() {
85
+ return envConfig.getNumber('SSR_PROD_PORT', 3000);
86
+ },
87
+ /** Get a list of allowed hosts */
88
+ getAllowedHosts() {
89
+ return envConfig.getArray('ALLOWED_HOSTS', ['quvel.127.0.0.1.nip.io']);
90
+ },
91
+ /** Get HMR configuration for reverse proxy setups */
92
+ getHMR() {
93
+ return {
94
+ protocol: envConfig.get('HMR_PROTOCOL', 'wss'),
95
+ host: envConfig.get('HMR_HOST', 'quvel.127.0.0.1.nip.io'),
96
+ port: envConfig.getNumber('HMR_PORT', 443),
97
+ };
98
+ },
99
+ },
100
+ /**
101
+ * Application metadata
102
+ */
103
+ app: {
104
+ /** Get application ID */
105
+ getId() {
106
+ return envConfig.get('APP_ID', 'quvel.irv.codes');
107
+ },
108
+ /** Get application name */
109
+ getName() {
110
+ return envConfig.get('VITE_APP_NAME', 'QuVel Kit');
111
+ },
112
+ /** Get application short name */
113
+ getShortName() {
114
+ return envConfig.get('APP_SHORT_NAME', 'QuVel');
115
+ },
116
+ },
117
+ /**
118
+ * SSR configuration
119
+ */
120
+ ssr: {
121
+ /** Check if PWA is enabled in SSR mode */
122
+ isPwaEnabled() {
123
+ return envConfig.getBoolean('SSR_PWA', false);
124
+ },
125
+ },
126
+ };
@@ -0,0 +1,47 @@
1
+ <script lang="ts" setup>
2
+ /**
3
+ * TaskErrors.vue
4
+ *
5
+ * A component to display errors from a task.
6
+ *
7
+ * Props:
8
+ * - `taskErrors`: The errors from a task, including the main error and additional errors.
9
+ */
10
+ import { computed } from 'vue';
11
+ import FadeInOut from '../Transitions/FadeInOut.vue';
12
+ import type { ErrorBag } from '../../types/laravel.types.js';
13
+
14
+ /**
15
+ * Props for the component.
16
+ */
17
+ const props = defineProps({
18
+ taskErrors: {
19
+ type: Object as () => ErrorBag,
20
+ default: () => ({ message: '', errors: {} }),
21
+ },
22
+ });
23
+
24
+ /**
25
+ * Extracts the most relevant error message.
26
+ * - If `message` is already inside `errors`, we ignore `message` to prevent duplication.
27
+ * - If `errors` exist, extract the first error.
28
+ * - Otherwise, fallback to `message`.
29
+ */
30
+ const errorMessage = computed(() => {
31
+ const { taskErrors } = props;
32
+
33
+ // Get the first available error from `taskErrors`
34
+ const firstError = Array.from(taskErrors.values())[0];
35
+
36
+ // If firstError exists, use it. Otherwise, fallback to message.
37
+ return firstError || taskErrors.get('message') || '';
38
+ });
39
+ </script>
40
+
41
+ <template>
42
+ <FadeInOut>
43
+ <q-banner v-if="errorMessage" class="bg-negative text-white" dense rounded>
44
+ {{ errorMessage }}
45
+ </q-banner>
46
+ </FadeInOut>
47
+ </template>