hazo_auth 1.4.2 → 1.6.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 (320) hide show
  1. package/SETUP_CHECKLIST.md +708 -0
  2. package/dist/app/api/hazo_auth/change_password/route.d.ts +8 -0
  3. package/dist/app/api/hazo_auth/change_password/route.d.ts.map +1 -0
  4. package/dist/app/api/hazo_auth/change_password/route.js +98 -0
  5. package/dist/app/api/hazo_auth/forgot_password/route.d.ts +8 -0
  6. package/dist/app/api/hazo_auth/forgot_password/route.d.ts.map +1 -0
  7. package/dist/app/api/hazo_auth/forgot_password/route.js +78 -0
  8. package/dist/app/api/hazo_auth/get_auth/route.d.ts +10 -0
  9. package/dist/app/api/hazo_auth/get_auth/route.d.ts.map +1 -0
  10. package/dist/app/api/hazo_auth/get_auth/route.js +63 -0
  11. package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts +14 -0
  12. package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts.map +1 -0
  13. package/dist/app/api/hazo_auth/invalidate_cache/route.js +96 -0
  14. package/dist/app/api/hazo_auth/library_photos/route.d.ts +13 -0
  15. package/dist/app/api/hazo_auth/library_photos/route.d.ts.map +1 -0
  16. package/dist/app/api/hazo_auth/library_photos/route.js +55 -0
  17. package/dist/app/api/hazo_auth/login/route.d.ts +12 -0
  18. package/dist/app/api/hazo_auth/login/route.d.ts.map +1 -0
  19. package/dist/app/api/hazo_auth/login/route.js +140 -0
  20. package/dist/app/api/hazo_auth/logout/route.d.ts +8 -0
  21. package/dist/app/api/hazo_auth/logout/route.d.ts.map +1 -0
  22. package/dist/app/api/hazo_auth/logout/route.js +71 -0
  23. package/dist/app/api/hazo_auth/me/route.d.ts +3 -0
  24. package/dist/app/api/hazo_auth/me/route.d.ts.map +1 -0
  25. package/dist/app/api/hazo_auth/me/route.js +34 -0
  26. package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts +7 -0
  27. package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts.map +1 -0
  28. package/dist/app/api/hazo_auth/profile_picture/[filename]/route.js +43 -0
  29. package/dist/app/api/hazo_auth/register/route.d.ts +9 -0
  30. package/dist/app/api/hazo_auth/register/route.d.ts.map +1 -0
  31. package/dist/app/api/hazo_auth/register/route.js +80 -0
  32. package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts +8 -0
  33. package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts.map +1 -0
  34. package/dist/app/api/hazo_auth/remove_profile_picture/route.js +64 -0
  35. package/dist/app/api/hazo_auth/resend_verification/route.d.ts +8 -0
  36. package/dist/app/api/hazo_auth/resend_verification/route.d.ts.map +1 -0
  37. package/dist/app/api/hazo_auth/resend_verification/route.js +79 -0
  38. package/dist/app/api/hazo_auth/reset_password/route.d.ts +8 -0
  39. package/dist/app/api/hazo_auth/reset_password/route.d.ts.map +1 -0
  40. package/dist/app/api/hazo_auth/reset_password/route.js +76 -0
  41. package/dist/app/api/hazo_auth/update_user/route.d.ts +9 -0
  42. package/dist/app/api/hazo_auth/update_user/route.d.ts.map +1 -0
  43. package/dist/app/api/hazo_auth/update_user/route.js +95 -0
  44. package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts +9 -0
  45. package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts.map +1 -0
  46. package/dist/app/api/hazo_auth/upload_profile_picture/route.js +204 -0
  47. package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts +6 -0
  48. package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts.map +1 -0
  49. package/dist/app/api/hazo_auth/validate_reset_token/route.js +58 -0
  50. package/dist/app/api/hazo_auth/verify_email/route.d.ts +11 -0
  51. package/dist/app/api/hazo_auth/verify_email/route.d.ts.map +1 -0
  52. package/dist/app/api/hazo_auth/verify_email/route.js +63 -0
  53. package/dist/cli/generate.d.ts +2 -0
  54. package/dist/cli/generate.d.ts.map +1 -0
  55. package/dist/cli/generate.js +117 -0
  56. package/dist/cli/index.d.ts +3 -0
  57. package/dist/cli/index.d.ts.map +1 -0
  58. package/dist/cli/index.js +120 -0
  59. package/dist/cli/validate.d.ts +15 -0
  60. package/dist/cli/validate.d.ts.map +1 -0
  61. package/dist/cli/validate.js +509 -0
  62. package/dist/components/ui/card.d.ts +9 -0
  63. package/dist/components/ui/card.d.ts.map +1 -0
  64. package/dist/components/ui/card.js +45 -0
  65. package/dist/hooks/use-mobile.d.ts.map +1 -1
  66. package/dist/hooks/use-mobile.js +17 -3
  67. package/dist/server/routes/change_password.d.ts +2 -0
  68. package/dist/server/routes/change_password.d.ts.map +1 -0
  69. package/dist/server/routes/change_password.js +2 -0
  70. package/dist/server/routes/forgot_password.d.ts +2 -0
  71. package/dist/server/routes/forgot_password.d.ts.map +1 -0
  72. package/dist/server/routes/forgot_password.js +2 -0
  73. package/dist/server/routes/get_auth.d.ts +2 -0
  74. package/dist/server/routes/get_auth.d.ts.map +1 -0
  75. package/dist/server/routes/get_auth.js +2 -0
  76. package/dist/server/routes/index.d.ts +18 -0
  77. package/dist/server/routes/index.d.ts.map +1 -0
  78. package/dist/server/routes/index.js +24 -0
  79. package/dist/server/routes/invalidate_cache.d.ts +2 -0
  80. package/dist/server/routes/invalidate_cache.d.ts.map +1 -0
  81. package/dist/server/routes/invalidate_cache.js +2 -0
  82. package/dist/server/routes/library_photos.d.ts +2 -0
  83. package/dist/server/routes/library_photos.d.ts.map +1 -0
  84. package/dist/server/routes/library_photos.js +2 -0
  85. package/dist/server/routes/login.d.ts +2 -0
  86. package/dist/server/routes/login.d.ts.map +1 -0
  87. package/dist/server/routes/login.js +2 -0
  88. package/dist/server/routes/logout.d.ts +2 -0
  89. package/dist/server/routes/logout.d.ts.map +1 -0
  90. package/dist/server/routes/logout.js +2 -0
  91. package/dist/server/routes/me.d.ts +2 -0
  92. package/dist/server/routes/me.d.ts.map +1 -0
  93. package/dist/server/routes/me.js +2 -0
  94. package/dist/server/routes/profile_picture_filename.d.ts +2 -0
  95. package/dist/server/routes/profile_picture_filename.d.ts.map +1 -0
  96. package/dist/server/routes/profile_picture_filename.js +3 -0
  97. package/dist/server/routes/register.d.ts +2 -0
  98. package/dist/server/routes/register.d.ts.map +1 -0
  99. package/dist/server/routes/register.js +2 -0
  100. package/dist/server/routes/remove_profile_picture.d.ts +2 -0
  101. package/dist/server/routes/remove_profile_picture.d.ts.map +1 -0
  102. package/dist/server/routes/remove_profile_picture.js +2 -0
  103. package/dist/server/routes/resend_verification.d.ts +2 -0
  104. package/dist/server/routes/resend_verification.d.ts.map +1 -0
  105. package/dist/server/routes/resend_verification.js +2 -0
  106. package/dist/server/routes/reset_password.d.ts +2 -0
  107. package/dist/server/routes/reset_password.d.ts.map +1 -0
  108. package/dist/server/routes/reset_password.js +2 -0
  109. package/dist/server/routes/update_user.d.ts +2 -0
  110. package/dist/server/routes/update_user.d.ts.map +1 -0
  111. package/dist/server/routes/update_user.js +2 -0
  112. package/dist/server/routes/upload_profile_picture.d.ts +2 -0
  113. package/dist/server/routes/upload_profile_picture.d.ts.map +1 -0
  114. package/dist/server/routes/upload_profile_picture.js +2 -0
  115. package/dist/server/routes/validate_reset_token.d.ts +2 -0
  116. package/dist/server/routes/validate_reset_token.d.ts.map +1 -0
  117. package/dist/server/routes/validate_reset_token.js +2 -0
  118. package/dist/server/routes/verify_email.d.ts +2 -0
  119. package/dist/server/routes/verify_email.d.ts.map +1 -0
  120. package/dist/server/routes/verify_email.js +2 -0
  121. package/package.json +12 -17
  122. package/components.json +0 -22
  123. package/instrumentation.ts +0 -32
  124. package/migrations/001_add_token_type_to_refresh_tokens.sql +0 -14
  125. package/migrations/002_add_name_to_hazo_users.sql +0 -7
  126. package/migrations/003_add_url_on_logon_to_hazo_users.sql +0 -8
  127. package/next.config.mjs +0 -67
  128. package/postcss.config.mjs +0 -8
  129. package/public/file.svg +0 -1
  130. package/public/globe.svg +0 -1
  131. package/public/next.svg +0 -1
  132. package/public/vercel.svg +0 -1
  133. package/public/window.svg +0 -1
  134. package/scripts/apply_migration.ts +0 -118
  135. package/scripts/init_users.ts +0 -378
  136. package/src/app/api/hazo_auth/auth/upload_profile_picture/route.ts +0 -268
  137. package/src/app/api/hazo_auth/change_password/route.ts +0 -132
  138. package/src/app/api/hazo_auth/forgot_password/route.ts +0 -107
  139. package/src/app/api/hazo_auth/get_auth/route.ts +0 -89
  140. package/src/app/api/hazo_auth/invalidate_cache/route.ts +0 -139
  141. package/src/app/api/hazo_auth/library_photos/route.ts +0 -73
  142. package/src/app/api/hazo_auth/login/route.ts +0 -181
  143. package/src/app/api/hazo_auth/logout/route.ts +0 -89
  144. package/src/app/api/hazo_auth/me/route.ts +0 -47
  145. package/src/app/api/hazo_auth/profile_picture/[filename]/route.ts +0 -67
  146. package/src/app/api/hazo_auth/register/route.ts +0 -109
  147. package/src/app/api/hazo_auth/remove_profile_picture/route.ts +0 -86
  148. package/src/app/api/hazo_auth/resend_verification/route.ts +0 -108
  149. package/src/app/api/hazo_auth/reset_password/route.ts +0 -107
  150. package/src/app/api/hazo_auth/update_user/route.ts +0 -126
  151. package/src/app/api/hazo_auth/upload_profile_picture/route.ts +0 -268
  152. package/src/app/api/hazo_auth/user_management/permissions/route.ts +0 -367
  153. package/src/app/api/hazo_auth/user_management/roles/route.ts +0 -442
  154. package/src/app/api/hazo_auth/user_management/users/roles/route.ts +0 -367
  155. package/src/app/api/hazo_auth/user_management/users/route.ts +0 -239
  156. package/src/app/api/hazo_auth/validate_reset_token/route.ts +0 -83
  157. package/src/app/api/hazo_auth/verify_email/route.ts +0 -88
  158. package/src/app/api/migrations/apply/route.ts +0 -91
  159. package/src/app/favicon.ico +0 -0
  160. package/src/app/fonts/GeistMonoVF.woff +0 -0
  161. package/src/app/fonts/GeistVF.woff +0 -0
  162. package/src/app/globals.css +0 -89
  163. package/src/app/hazo_auth/forgot_password/forgot_password_page_client.tsx +0 -60
  164. package/src/app/hazo_auth/forgot_password/page.tsx +0 -24
  165. package/src/app/hazo_auth/login/login_page_client.tsx +0 -86
  166. package/src/app/hazo_auth/login/page.tsx +0 -38
  167. package/src/app/hazo_auth/my_settings/my_settings_page_client.tsx +0 -120
  168. package/src/app/hazo_auth/my_settings/page.tsx +0 -40
  169. package/src/app/hazo_auth/register/page.tsx +0 -36
  170. package/src/app/hazo_auth/register/register_page_client.tsx +0 -81
  171. package/src/app/hazo_auth/reset_password/page.tsx +0 -29
  172. package/src/app/hazo_auth/reset_password/reset_password_page_client.tsx +0 -81
  173. package/src/app/hazo_auth/user_management/page.tsx +0 -14
  174. package/src/app/hazo_auth/user_management/user_management_page_client.tsx +0 -16
  175. package/src/app/hazo_auth/verify_email/page.tsx +0 -24
  176. package/src/app/hazo_auth/verify_email/verify_email_page_client.tsx +0 -60
  177. package/src/app/hazo_connect/api/sqlite/data/route.ts +0 -203
  178. package/src/app/hazo_connect/api/sqlite/schema/route.ts +0 -45
  179. package/src/app/hazo_connect/api/sqlite/tables/route.ts +0 -36
  180. package/src/app/hazo_connect/sqlite_admin/page.tsx +0 -51
  181. package/src/app/hazo_connect/sqlite_admin/sqlite-admin-client.tsx +0 -984
  182. package/src/app/layout.tsx +0 -43
  183. package/src/app/page.tsx +0 -170
  184. package/src/components/index.ts +0 -7
  185. package/src/components/layouts/email_verification/config/email_verification_field_config.ts +0 -86
  186. package/src/components/layouts/email_verification/hooks/use_email_verification.ts +0 -297
  187. package/src/components/layouts/email_verification/index.tsx +0 -297
  188. package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +0 -58
  189. package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +0 -179
  190. package/src/components/layouts/forgot_password/index.tsx +0 -168
  191. package/src/components/layouts/index.ts +0 -26
  192. package/src/components/layouts/login/config/login_field_config.ts +0 -67
  193. package/src/components/layouts/login/hooks/use_login_form.ts +0 -286
  194. package/src/components/layouts/login/index.tsx +0 -252
  195. package/src/components/layouts/my_settings/components/editable_field.tsx +0 -177
  196. package/src/components/layouts/my_settings/components/password_change_dialog.tsx +0 -301
  197. package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +0 -385
  198. package/src/components/layouts/my_settings/components/profile_picture_display.tsx +0 -66
  199. package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +0 -143
  200. package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +0 -311
  201. package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +0 -341
  202. package/src/components/layouts/my_settings/config/my_settings_field_config.ts +0 -61
  203. package/src/components/layouts/my_settings/hooks/use_my_settings.ts +0 -458
  204. package/src/components/layouts/my_settings/index.tsx +0 -351
  205. package/src/components/layouts/register/config/register_field_config.ts +0 -101
  206. package/src/components/layouts/register/hooks/use_register_form.ts +0 -275
  207. package/src/components/layouts/register/index.tsx +0 -226
  208. package/src/components/layouts/reset_password/config/reset_password_field_config.ts +0 -86
  209. package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +0 -276
  210. package/src/components/layouts/reset_password/index.tsx +0 -294
  211. package/src/components/layouts/shared/components/already_logged_in_guard.tsx +0 -95
  212. package/src/components/layouts/shared/components/auth_page_shell.tsx +0 -36
  213. package/src/components/layouts/shared/components/field_error_message.tsx +0 -29
  214. package/src/components/layouts/shared/components/form_action_buttons.tsx +0 -64
  215. package/src/components/layouts/shared/components/form_field_wrapper.tsx +0 -44
  216. package/src/components/layouts/shared/components/form_header.tsx +0 -36
  217. package/src/components/layouts/shared/components/logout_button.tsx +0 -76
  218. package/src/components/layouts/shared/components/password_field.tsx +0 -72
  219. package/src/components/layouts/shared/components/profile_pic_menu.tsx +0 -321
  220. package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +0 -40
  221. package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +0 -214
  222. package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +0 -53
  223. package/src/components/layouts/shared/components/two_column_auth_layout.tsx +0 -44
  224. package/src/components/layouts/shared/components/unauthorized_guard.tsx +0 -78
  225. package/src/components/layouts/shared/components/visual_panel.tsx +0 -41
  226. package/src/components/layouts/shared/config/layout_customization.ts +0 -95
  227. package/src/components/layouts/shared/data/layout_data_client.ts +0 -19
  228. package/src/components/layouts/shared/hooks/use_auth_status.ts +0 -103
  229. package/src/components/layouts/shared/hooks/use_hazo_auth.ts +0 -158
  230. package/src/components/layouts/shared/index.ts +0 -34
  231. package/src/components/layouts/shared/utils/ip_address.ts +0 -37
  232. package/src/components/layouts/shared/utils/validation.ts +0 -66
  233. package/src/components/layouts/user_management/components/roles_matrix.tsx +0 -607
  234. package/src/components/layouts/user_management/index.tsx +0 -1295
  235. package/src/components/ui/alert-dialog.tsx +0 -141
  236. package/src/components/ui/avatar.tsx +0 -50
  237. package/src/components/ui/button.tsx +0 -57
  238. package/src/components/ui/checkbox.tsx +0 -30
  239. package/src/components/ui/dialog.tsx +0 -122
  240. package/src/components/ui/dropdown-menu.tsx +0 -201
  241. package/src/components/ui/hazo_ui_tooltip.tsx +0 -67
  242. package/src/components/ui/index.ts +0 -22
  243. package/src/components/ui/input.tsx +0 -22
  244. package/src/components/ui/label.tsx +0 -26
  245. package/src/components/ui/separator.tsx +0 -31
  246. package/src/components/ui/sheet.tsx +0 -139
  247. package/src/components/ui/sidebar.tsx +0 -773
  248. package/src/components/ui/skeleton.tsx +0 -15
  249. package/src/components/ui/sonner.tsx +0 -31
  250. package/src/components/ui/switch.tsx +0 -29
  251. package/src/components/ui/table.tsx +0 -120
  252. package/src/components/ui/tabs.tsx +0 -55
  253. package/src/components/ui/tooltip.tsx +0 -32
  254. package/src/components/ui/vertical-tabs.tsx +0 -59
  255. package/src/hooks/use-mobile.tsx +0 -19
  256. package/src/index.ts +0 -7
  257. package/src/lib/already_logged_in_config.server.ts +0 -46
  258. package/src/lib/app_logger.ts +0 -24
  259. package/src/lib/auth/auth_cache.ts +0 -220
  260. package/src/lib/auth/auth_rate_limiter.ts +0 -121
  261. package/src/lib/auth/auth_types.ts +0 -65
  262. package/src/lib/auth/auth_utils.server.ts +0 -196
  263. package/src/lib/auth/hazo_get_auth.server.ts +0 -333
  264. package/src/lib/auth/index.ts +0 -23
  265. package/src/lib/auth/server_auth.ts +0 -88
  266. package/src/lib/auth_utility_config.server.ts +0 -136
  267. package/src/lib/config/config_loader.server.ts +0 -164
  268. package/src/lib/email_verification_config.server.ts +0 -32
  269. package/src/lib/file_types_config.server.ts +0 -25
  270. package/src/lib/forgot_password_config.server.ts +0 -32
  271. package/src/lib/hazo_connect_instance.server.ts +0 -101
  272. package/src/lib/hazo_connect_setup.server.ts +0 -194
  273. package/src/lib/hazo_connect_setup.ts +0 -54
  274. package/src/lib/index.ts +0 -44
  275. package/src/lib/login_config.server.ts +0 -71
  276. package/src/lib/messages_config.server.ts +0 -45
  277. package/src/lib/migrations/apply_migration.ts +0 -105
  278. package/src/lib/my_settings_config.server.ts +0 -135
  279. package/src/lib/password_requirements_config.server.ts +0 -39
  280. package/src/lib/profile_pic_menu_config.server.ts +0 -138
  281. package/src/lib/profile_picture_config.server.ts +0 -56
  282. package/src/lib/register_config.server.ts +0 -73
  283. package/src/lib/reset_password_config.server.ts +0 -75
  284. package/src/lib/services/email_service.ts +0 -581
  285. package/src/lib/services/email_verification_service.ts +0 -270
  286. package/src/lib/services/index.ts +0 -15
  287. package/src/lib/services/login_service.ts +0 -134
  288. package/src/lib/services/password_change_service.ts +0 -154
  289. package/src/lib/services/password_reset_service.ts +0 -405
  290. package/src/lib/services/profile_picture_remove_service.ts +0 -120
  291. package/src/lib/services/profile_picture_service.ts +0 -215
  292. package/src/lib/services/profile_picture_source_mapper.ts +0 -62
  293. package/src/lib/services/registration_service.ts +0 -184
  294. package/src/lib/services/token_service.ts +0 -240
  295. package/src/lib/services/user_profiles_service.ts +0 -143
  296. package/src/lib/services/user_update_service.ts +0 -141
  297. package/src/lib/ui_shell_config.server.ts +0 -73
  298. package/src/lib/ui_sizes_config.server.ts +0 -37
  299. package/src/lib/user_fields_config.server.ts +0 -31
  300. package/src/lib/user_management_config.server.ts +0 -39
  301. package/src/lib/utils/api_route_helpers.ts +0 -60
  302. package/src/lib/utils/error_sanitizer.ts +0 -75
  303. package/src/lib/utils.ts +0 -11
  304. package/src/middleware.ts +0 -94
  305. package/src/routes/index.ts +0 -34
  306. package/src/server/config/config_loader.ts +0 -496
  307. package/src/server/index.ts +0 -38
  308. package/src/server/logging/logger_service.ts +0 -56
  309. package/src/server/routes/root_router.ts +0 -16
  310. package/src/server/server.ts +0 -28
  311. package/src/server/types/app_types.ts +0 -74
  312. package/src/server/types/express.d.ts +0 -16
  313. package/src/stories/email_verification_layout.stories.tsx +0 -137
  314. package/src/stories/forgot_password_layout.stories.tsx +0 -85
  315. package/src/stories/login_layout.stories.tsx +0 -85
  316. package/src/stories/project_overview.stories.tsx +0 -33
  317. package/src/stories/register_layout.stories.tsx +0 -107
  318. package/tailwind.config.ts +0 -77
  319. package/tsconfig.build.json +0 -36
  320. package/tsconfig.json +0 -28
@@ -0,0 +1,509 @@
1
+ // file_description: validation logic for hazo_auth setup verification
2
+ // This module contains all the validation checks that can be run via CLI or programmatically
3
+ import * as fs from "fs";
4
+ import * as path from "path";
5
+ // section: constants
6
+ const REQUIRED_CONFIG_FILES = [
7
+ "hazo_auth_config.ini",
8
+ "hazo_notify_config.ini",
9
+ ];
10
+ const REQUIRED_ENV_VARS = [
11
+ { name: "JWT_SECRET", required: true, description: "JWT signing secret" },
12
+ { name: "ZEPTOMAIL_API_KEY", required: false, description: "Email API key (required for email)" },
13
+ { name: "HAZO_CONNECT_POSTGREST_API_KEY", required: false, description: "PostgREST API key (if using PostgreSQL)" },
14
+ ];
15
+ const REQUIRED_API_ROUTES = [
16
+ { path: "api/hazo_auth/login", method: "POST" },
17
+ { path: "api/hazo_auth/register", method: "POST" },
18
+ { path: "api/hazo_auth/logout", method: "POST" },
19
+ { path: "api/hazo_auth/me", method: "GET" },
20
+ { path: "api/hazo_auth/forgot_password", method: "POST" },
21
+ { path: "api/hazo_auth/reset_password", method: "POST" },
22
+ { path: "api/hazo_auth/verify_email", method: "GET" },
23
+ { path: "api/hazo_auth/resend_verification", method: "POST" },
24
+ { path: "api/hazo_auth/update_user", method: "PATCH" },
25
+ { path: "api/hazo_auth/change_password", method: "POST" },
26
+ { path: "api/hazo_auth/upload_profile_picture", method: "POST" },
27
+ { path: "api/hazo_auth/remove_profile_picture", method: "DELETE" },
28
+ { path: "api/hazo_auth/library_photos", method: "GET" },
29
+ { path: "api/hazo_auth/get_auth", method: "POST" },
30
+ { path: "api/hazo_auth/validate_reset_token", method: "POST" },
31
+ { path: "api/hazo_auth/profile_picture/[filename]", method: "GET" },
32
+ ];
33
+ // section: helpers
34
+ function get_project_root() {
35
+ return process.cwd();
36
+ }
37
+ function file_exists(filepath) {
38
+ try {
39
+ return fs.existsSync(filepath);
40
+ }
41
+ catch (_a) {
42
+ return false;
43
+ }
44
+ }
45
+ function read_ini_file(filepath) {
46
+ try {
47
+ const content = fs.readFileSync(filepath, "utf-8");
48
+ const result = {};
49
+ let current_section = "";
50
+ for (const line of content.split("\n")) {
51
+ const trimmed = line.trim();
52
+ if (trimmed.startsWith("#") || trimmed.startsWith(";") || !trimmed) {
53
+ continue;
54
+ }
55
+ const section_match = trimmed.match(/^\[(.+)\]$/);
56
+ if (section_match) {
57
+ current_section = section_match[1];
58
+ result[current_section] = result[current_section] || {};
59
+ continue;
60
+ }
61
+ const kv_match = trimmed.match(/^([^=]+)=(.*)$/);
62
+ if (kv_match && current_section) {
63
+ const key = kv_match[1].trim();
64
+ const value = kv_match[2].trim();
65
+ result[current_section][key] = value;
66
+ }
67
+ }
68
+ return result;
69
+ }
70
+ catch (_a) {
71
+ return null;
72
+ }
73
+ }
74
+ function print_status(status) {
75
+ switch (status) {
76
+ case "pass":
77
+ return "\x1b[32m[PASS]\x1b[0m";
78
+ case "fail":
79
+ return "\x1b[31m[FAIL]\x1b[0m";
80
+ case "warn":
81
+ return "\x1b[33m[WARN]\x1b[0m";
82
+ }
83
+ }
84
+ function print_result(result) {
85
+ console.log(`${print_status(result.status)} ${result.name}`);
86
+ if (result.message && (result.status === "fail" || result.status === "warn")) {
87
+ console.log(` → ${result.message}`);
88
+ }
89
+ }
90
+ // section: check_functions
91
+ function check_config_files(project_root) {
92
+ const results = [];
93
+ for (const config_file of REQUIRED_CONFIG_FILES) {
94
+ const filepath = path.join(project_root, config_file);
95
+ const exists = file_exists(filepath);
96
+ results.push({
97
+ name: `Config file: ${config_file}`,
98
+ status: exists ? "pass" : "fail",
99
+ message: exists ? "" : `File not found. Run: cp node_modules/hazo_auth/${config_file.replace(".ini", ".example.ini")} ./${config_file}`,
100
+ });
101
+ }
102
+ return results;
103
+ }
104
+ function check_config_values(project_root) {
105
+ var _a, _b, _c, _d, _e, _f;
106
+ const results = [];
107
+ const hazo_config_path = path.join(project_root, "hazo_auth_config.ini");
108
+ const hazo_config = read_ini_file(hazo_config_path);
109
+ if (hazo_config) {
110
+ const db_type = (_a = hazo_config["hazo_connect"]) === null || _a === void 0 ? void 0 : _a["type"];
111
+ if (db_type) {
112
+ results.push({
113
+ name: "Database type configured",
114
+ status: "pass",
115
+ message: `Using: ${db_type}`,
116
+ });
117
+ if (db_type === "sqlite") {
118
+ const sqlite_path = (_b = hazo_config["hazo_connect"]) === null || _b === void 0 ? void 0 : _b["sqlite_path"];
119
+ if (sqlite_path) {
120
+ results.push({
121
+ name: "SQLite path configured",
122
+ status: "pass",
123
+ message: sqlite_path,
124
+ });
125
+ }
126
+ else {
127
+ results.push({
128
+ name: "SQLite path configured",
129
+ status: "fail",
130
+ message: "sqlite_path not set in [hazo_connect] section",
131
+ });
132
+ }
133
+ }
134
+ else if (db_type === "postgrest") {
135
+ const postgrest_url = (_c = hazo_config["hazo_connect"]) === null || _c === void 0 ? void 0 : _c["postgrest_url"];
136
+ if (postgrest_url) {
137
+ results.push({
138
+ name: "PostgREST URL configured",
139
+ status: "pass",
140
+ message: postgrest_url,
141
+ });
142
+ }
143
+ else {
144
+ results.push({
145
+ name: "PostgREST URL configured",
146
+ status: "fail",
147
+ message: "postgrest_url not set in [hazo_connect] section",
148
+ });
149
+ }
150
+ }
151
+ }
152
+ else {
153
+ results.push({
154
+ name: "Database type configured",
155
+ status: "fail",
156
+ message: "type not set in [hazo_connect] section",
157
+ });
158
+ }
159
+ const layout_mode = (_d = hazo_config["hazo_auth__ui_shell"]) === null || _d === void 0 ? void 0 : _d["layout_mode"];
160
+ if (layout_mode === "standalone") {
161
+ results.push({
162
+ name: "UI shell mode",
163
+ status: "pass",
164
+ message: "standalone (recommended for consuming projects)",
165
+ });
166
+ }
167
+ else if (layout_mode === "test_sidebar") {
168
+ results.push({
169
+ name: "UI shell mode",
170
+ status: "warn",
171
+ message: "test_sidebar - consider changing to 'standalone' for consuming projects",
172
+ });
173
+ }
174
+ else {
175
+ results.push({
176
+ name: "UI shell mode",
177
+ status: "warn",
178
+ message: "Not set - defaults to test_sidebar. Consider setting to 'standalone'",
179
+ });
180
+ }
181
+ }
182
+ const notify_config_path = path.join(project_root, "hazo_notify_config.ini");
183
+ const notify_config = read_ini_file(notify_config_path);
184
+ if (notify_config) {
185
+ const from_email = (_e = notify_config["emailer"]) === null || _e === void 0 ? void 0 : _e["from_email"];
186
+ const from_name = (_f = notify_config["emailer"]) === null || _f === void 0 ? void 0 : _f["from_name"];
187
+ if (from_email && !from_email.includes("example.com")) {
188
+ results.push({
189
+ name: "Email from_email configured",
190
+ status: "pass",
191
+ message: from_email,
192
+ });
193
+ }
194
+ else {
195
+ results.push({
196
+ name: "Email from_email configured",
197
+ status: "warn",
198
+ message: from_email ? "Using example.com - update to your domain" : "Not set",
199
+ });
200
+ }
201
+ if (from_name && from_name !== "Your App Name") {
202
+ results.push({
203
+ name: "Email from_name configured",
204
+ status: "pass",
205
+ message: from_name,
206
+ });
207
+ }
208
+ else {
209
+ results.push({
210
+ name: "Email from_name configured",
211
+ status: "warn",
212
+ message: "Using default - update to your app name",
213
+ });
214
+ }
215
+ }
216
+ return results;
217
+ }
218
+ function check_env_vars() {
219
+ const results = [];
220
+ for (const env_var of REQUIRED_ENV_VARS) {
221
+ const value = process.env[env_var.name];
222
+ const has_value = value && value.length > 0;
223
+ if (env_var.required) {
224
+ results.push({
225
+ name: `Environment: ${env_var.name}`,
226
+ status: has_value ? "pass" : "fail",
227
+ message: has_value ? "Set" : `Not set - ${env_var.description}`,
228
+ });
229
+ }
230
+ else {
231
+ results.push({
232
+ name: `Environment: ${env_var.name}`,
233
+ status: has_value ? "pass" : "warn",
234
+ message: has_value ? "Set" : `Not set - ${env_var.description}`,
235
+ });
236
+ }
237
+ }
238
+ return results;
239
+ }
240
+ function check_api_routes(project_root) {
241
+ const results = [];
242
+ const possible_app_dirs = [
243
+ path.join(project_root, "app"),
244
+ path.join(project_root, "src", "app"),
245
+ ];
246
+ let app_dir = null;
247
+ for (const dir of possible_app_dirs) {
248
+ if (file_exists(dir)) {
249
+ app_dir = dir;
250
+ break;
251
+ }
252
+ }
253
+ if (!app_dir) {
254
+ results.push({
255
+ name: "App directory",
256
+ status: "fail",
257
+ message: "Could not find app/ or src/app/ directory",
258
+ });
259
+ return results;
260
+ }
261
+ results.push({
262
+ name: "App directory",
263
+ status: "pass",
264
+ message: app_dir.replace(project_root, "."),
265
+ });
266
+ let routes_found = 0;
267
+ let routes_missing = 0;
268
+ for (const route of REQUIRED_API_ROUTES) {
269
+ const route_path = path.join(app_dir, route.path, "route.ts");
270
+ const route_path_js = path.join(app_dir, route.path, "route.js");
271
+ const exists = file_exists(route_path) || file_exists(route_path_js);
272
+ if (exists) {
273
+ routes_found++;
274
+ }
275
+ else {
276
+ routes_missing++;
277
+ results.push({
278
+ name: `Route: /${route.path}`,
279
+ status: "fail",
280
+ message: `Missing - create ${route.path}/route.ts with export { ${route.method} } from "hazo_auth/server/routes/..."`,
281
+ });
282
+ }
283
+ }
284
+ if (routes_missing === 0) {
285
+ results.push({
286
+ name: `API Routes (${routes_found}/${REQUIRED_API_ROUTES.length})`,
287
+ status: "pass",
288
+ message: "All routes present",
289
+ });
290
+ }
291
+ else {
292
+ results.unshift({
293
+ name: `API Routes (${routes_found}/${REQUIRED_API_ROUTES.length})`,
294
+ status: "fail",
295
+ message: `${routes_missing} routes missing - run: npx hazo_auth generate-routes`,
296
+ });
297
+ }
298
+ return results;
299
+ }
300
+ function check_profile_pictures(project_root) {
301
+ const results = [];
302
+ const library_path = path.join(project_root, "public", "profile_pictures", "library");
303
+ const uploads_path = path.join(project_root, "public", "profile_pictures", "uploads");
304
+ if (file_exists(library_path)) {
305
+ try {
306
+ const files = fs.readdirSync(library_path);
307
+ const image_files = files.filter(f => /\.(jpg|jpeg|png|gif|webp)$/i.test(f));
308
+ if (image_files.length > 0) {
309
+ results.push({
310
+ name: "Profile picture library",
311
+ status: "pass",
312
+ message: `${image_files.length} images available`,
313
+ });
314
+ }
315
+ else {
316
+ results.push({
317
+ name: "Profile picture library",
318
+ status: "warn",
319
+ message: "Directory exists but no images found",
320
+ });
321
+ }
322
+ }
323
+ catch (_a) {
324
+ results.push({
325
+ name: "Profile picture library",
326
+ status: "warn",
327
+ message: "Could not read directory",
328
+ });
329
+ }
330
+ }
331
+ else {
332
+ results.push({
333
+ name: "Profile picture library",
334
+ status: "warn",
335
+ message: "Not found - copy from node_modules/hazo_auth/public/profile_pictures/library/",
336
+ });
337
+ }
338
+ if (file_exists(uploads_path)) {
339
+ results.push({
340
+ name: "Profile picture uploads directory",
341
+ status: "pass",
342
+ message: "Exists",
343
+ });
344
+ }
345
+ else {
346
+ results.push({
347
+ name: "Profile picture uploads directory",
348
+ status: "warn",
349
+ message: "Not found - will be created on first upload",
350
+ });
351
+ }
352
+ return results;
353
+ }
354
+ function check_database(project_root) {
355
+ var _a, _b, _c;
356
+ const results = [];
357
+ const hazo_config_path = path.join(project_root, "hazo_auth_config.ini");
358
+ const hazo_config = read_ini_file(hazo_config_path);
359
+ if (!hazo_config) {
360
+ results.push({
361
+ name: "Database check",
362
+ status: "fail",
363
+ message: "Could not read hazo_auth_config.ini",
364
+ });
365
+ return results;
366
+ }
367
+ const db_type = (_a = hazo_config["hazo_connect"]) === null || _a === void 0 ? void 0 : _a["type"];
368
+ if (db_type === "sqlite") {
369
+ const sqlite_path = (_b = hazo_config["hazo_connect"]) === null || _b === void 0 ? void 0 : _b["sqlite_path"];
370
+ if (sqlite_path) {
371
+ const full_path = path.isAbsolute(sqlite_path)
372
+ ? sqlite_path
373
+ : path.join(project_root, sqlite_path);
374
+ if (file_exists(full_path)) {
375
+ results.push({
376
+ name: "SQLite database file",
377
+ status: "pass",
378
+ message: full_path.replace(project_root, "."),
379
+ });
380
+ try {
381
+ const stats = fs.statSync(full_path);
382
+ if (stats.size > 0) {
383
+ results.push({
384
+ name: "SQLite database readable",
385
+ status: "pass",
386
+ message: `File size: ${(stats.size / 1024).toFixed(2)} KB`,
387
+ });
388
+ }
389
+ else {
390
+ results.push({
391
+ name: "SQLite database readable",
392
+ status: "warn",
393
+ message: "Database file is empty - tables may need to be created",
394
+ });
395
+ }
396
+ }
397
+ catch (_d) {
398
+ results.push({
399
+ name: "SQLite database readable",
400
+ status: "fail",
401
+ message: "Could not read database file",
402
+ });
403
+ }
404
+ }
405
+ else {
406
+ const parent_dir = path.dirname(full_path);
407
+ if (file_exists(parent_dir)) {
408
+ results.push({
409
+ name: "SQLite database file",
410
+ status: "warn",
411
+ message: "File not found - will be created on first use",
412
+ });
413
+ }
414
+ else {
415
+ results.push({
416
+ name: "SQLite database file",
417
+ status: "fail",
418
+ message: `Parent directory not found: ${parent_dir}. Create it with: mkdir -p ${parent_dir}`,
419
+ });
420
+ }
421
+ }
422
+ }
423
+ }
424
+ else if (db_type === "postgrest") {
425
+ const postgrest_url = (_c = hazo_config["hazo_connect"]) === null || _c === void 0 ? void 0 : _c["postgrest_url"];
426
+ if (postgrest_url) {
427
+ results.push({
428
+ name: "PostgREST connection",
429
+ status: "pass",
430
+ message: `URL configured: ${postgrest_url}`,
431
+ });
432
+ results.push({
433
+ name: "PostgREST tables",
434
+ status: "warn",
435
+ message: "Cannot verify tables remotely - ensure all hazo_* tables exist in PostgreSQL",
436
+ });
437
+ }
438
+ else {
439
+ results.push({
440
+ name: "PostgREST connection",
441
+ status: "fail",
442
+ message: "postgrest_url not configured",
443
+ });
444
+ }
445
+ }
446
+ return results;
447
+ }
448
+ // section: main
449
+ export function run_validation() {
450
+ const project_root = get_project_root();
451
+ const all_results = [];
452
+ console.log("\n\x1b[1m🐸 hazo_auth Setup Validation\x1b[0m");
453
+ console.log("=".repeat(50));
454
+ console.log(`Project root: ${project_root}\n`);
455
+ console.log("\x1b[1m📁 Configuration Files\x1b[0m");
456
+ const config_results = check_config_files(project_root);
457
+ config_results.forEach(print_result);
458
+ all_results.push(...config_results);
459
+ console.log();
460
+ console.log("\x1b[1m⚙️ Configuration Values\x1b[0m");
461
+ const value_results = check_config_values(project_root);
462
+ value_results.forEach(print_result);
463
+ all_results.push(...value_results);
464
+ console.log();
465
+ console.log("\x1b[1m🔐 Environment Variables\x1b[0m");
466
+ const env_results = check_env_vars();
467
+ env_results.forEach(print_result);
468
+ all_results.push(...env_results);
469
+ console.log();
470
+ console.log("\x1b[1m🗄️ Database\x1b[0m");
471
+ const db_results = check_database(project_root);
472
+ db_results.forEach(print_result);
473
+ all_results.push(...db_results);
474
+ console.log();
475
+ console.log("\x1b[1m🛤️ API Routes\x1b[0m");
476
+ const route_results = check_api_routes(project_root);
477
+ route_results.forEach(print_result);
478
+ all_results.push(...route_results);
479
+ console.log();
480
+ console.log("\x1b[1m🖼️ Profile Pictures\x1b[0m");
481
+ const pic_results = check_profile_pictures(project_root);
482
+ pic_results.forEach(print_result);
483
+ all_results.push(...pic_results);
484
+ console.log();
485
+ const summary = {
486
+ passed: all_results.filter(r => r.status === "pass").length,
487
+ failed: all_results.filter(r => r.status === "fail").length,
488
+ warnings: all_results.filter(r => r.status === "warn").length,
489
+ results: all_results,
490
+ };
491
+ console.log("=".repeat(50));
492
+ console.log("\x1b[1mSummary:\x1b[0m");
493
+ console.log(` \x1b[32m✓ Passed: ${summary.passed}\x1b[0m`);
494
+ console.log(` \x1b[31m✗ Failed: ${summary.failed}\x1b[0m`);
495
+ console.log(` \x1b[33m⚠ Warnings: ${summary.warnings}\x1b[0m`);
496
+ console.log();
497
+ if (summary.failed === 0 && summary.warnings === 0) {
498
+ console.log("\x1b[32m🦊 All checks passed! hazo_auth is ready to use.\x1b[0m\n");
499
+ }
500
+ else if (summary.failed === 0) {
501
+ console.log("\x1b[33m🦊 Setup complete with warnings. Review the warnings above.\x1b[0m\n");
502
+ }
503
+ else {
504
+ console.log("\x1b[31m🦊 Setup incomplete. Please fix the failed checks above.\x1b[0m\n");
505
+ console.log("For detailed setup instructions, see:");
506
+ console.log(" https://github.com/your-repo/hazo_auth/blob/main/SETUP_CHECKLIST.md\n");
507
+ }
508
+ return summary;
509
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
9
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,IAAI,6GAYR,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,QAAA,MAAM,SAAS,6GASb,CAAA;AAGF,QAAA,MAAM,eAAe,6GASnB,CAAA;AAGF,QAAA,MAAM,WAAW,6GAKf,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,45 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from "react";
14
+ import { cn } from "../../lib/utils";
15
+ const Card = React.forwardRef((_a, ref) => {
16
+ var { className } = _a, props = __rest(_a, ["className"]);
17
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className) }, props)));
18
+ });
19
+ Card.displayName = "Card";
20
+ const CardHeader = React.forwardRef((_a, ref) => {
21
+ var { className } = _a, props = __rest(_a, ["className"]);
22
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className) }, props)));
23
+ });
24
+ CardHeader.displayName = "CardHeader";
25
+ const CardTitle = React.forwardRef((_a, ref) => {
26
+ var { className } = _a, props = __rest(_a, ["className"]);
27
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("font-semibold leading-none tracking-tight", className) }, props)));
28
+ });
29
+ CardTitle.displayName = "CardTitle";
30
+ const CardDescription = React.forwardRef((_a, ref) => {
31
+ var { className } = _a, props = __rest(_a, ["className"]);
32
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
33
+ });
34
+ CardDescription.displayName = "CardDescription";
35
+ const CardContent = React.forwardRef((_a, ref) => {
36
+ var { className } = _a, props = __rest(_a, ["className"]);
37
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("p-6 pt-0", className) }, props)));
38
+ });
39
+ CardContent.displayName = "CardContent";
40
+ const CardFooter = React.forwardRef((_a, ref) => {
41
+ var { className } = _a, props = __rest(_a, ["className"]);
42
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("flex items-center p-6 pt-0", className) }, props)));
43
+ });
44
+ CardFooter.displayName = "CardFooter";
45
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -1 +1 @@
1
- {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/hooks/use-mobile.tsx"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,YAc1B"}
1
+ {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/hooks/use-mobile.tsx"],"names":[],"mappings":"AAOA,wBAAgB,WAAW,YA8B1B"}
@@ -1,15 +1,29 @@
1
+ // file_description: hydration-safe hook to detect mobile viewport
2
+ // This hook prevents hydration mismatches by returning a consistent value
3
+ // during SSR and initial client render, only updating after hydration completes.
1
4
  import * as React from "react";
2
5
  const MOBILE_BREAKPOINT = 768;
3
6
  export function useIsMobile() {
4
- const [isMobile, setIsMobile] = React.useState(undefined);
7
+ // Track whether component has mounted (hydration complete)
8
+ const [isMounted, setIsMounted] = React.useState(false);
9
+ const [isMobile, setIsMobile] = React.useState(false);
5
10
  React.useEffect(() => {
11
+ // Mark as mounted after hydration
12
+ setIsMounted(true);
13
+ // Now safe to read window dimensions
6
14
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
7
15
  const onChange = () => {
8
16
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9
17
  };
10
- mql.addEventListener("change", onChange);
18
+ // Set initial value
11
19
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
20
+ mql.addEventListener("change", onChange);
12
21
  return () => mql.removeEventListener("change", onChange);
13
22
  }, []);
14
- return !!isMobile;
23
+ // Return false during SSR and initial hydration to prevent mismatch
24
+ // Only return actual mobile state after component has mounted
25
+ if (!isMounted) {
26
+ return false;
27
+ }
28
+ return isMobile;
15
29
  }
@@ -0,0 +1,2 @@
1
+ export { POST } from "../../app/api/hazo_auth/change_password/route";
2
+ //# sourceMappingURL=change_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change_password.d.ts","sourceRoot":"","sources":["../../../src/server/routes/change_password.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAC"}
@@ -0,0 +1,2 @@
1
+ // file_description: re-export change_password route handler for use by consuming projects
2
+ export { POST } from "../../app/api/hazo_auth/change_password/route";
@@ -0,0 +1,2 @@
1
+ export { POST } from "../../app/api/hazo_auth/forgot_password/route";
2
+ //# sourceMappingURL=forgot_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../../src/server/routes/forgot_password.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAC"}
@@ -0,0 +1,2 @@
1
+ // file_description: re-export forgot_password route handler for use by consuming projects
2
+ export { POST } from "../../app/api/hazo_auth/forgot_password/route";
@@ -0,0 +1,2 @@
1
+ export { POST } from "../../app/api/hazo_auth/get_auth/route";
2
+ //# sourceMappingURL=get_auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_auth.d.ts","sourceRoot":"","sources":["../../../src/server/routes/get_auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // file_description: re-export get_auth route handler for use by consuming projects
2
+ export { POST } from "../../app/api/hazo_auth/get_auth/route";
@@ -0,0 +1,18 @@
1
+ export { POST as loginPOST } from "./login.js";
2
+ export { POST as registerPOST } from "./register.js";
3
+ export { POST as logoutPOST } from "./logout.js";
4
+ export { GET as meGET } from "./me.js";
5
+ export { POST as forgotPasswordPOST } from "./forgot_password.js";
6
+ export { POST as resetPasswordPOST } from "./reset_password.js";
7
+ export { POST as changePasswordPOST } from "./change_password.js";
8
+ export { GET as validateResetTokenGET } from "./validate_reset_token.js";
9
+ export { GET as verifyEmailGET } from "./verify_email.js";
10
+ export { POST as resendVerificationPOST } from "./resend_verification.js";
11
+ export { PATCH as updateUserPATCH } from "./update_user.js";
12
+ export { POST as uploadProfilePicturePOST } from "./upload_profile_picture.js";
13
+ export { DELETE as removeProfilePictureDELETE } from "./remove_profile_picture.js";
14
+ export { GET as libraryPhotosGET } from "./library_photos.js";
15
+ export { GET as profilePictureFilenameGET } from "./profile_picture_filename.js";
16
+ export { POST as getAuthPOST } from "./get_auth.js";
17
+ export { POST as invalidateCachePOST } from "./invalidate_cache.js";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/routes/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,GAAG,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,GAAG,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,GAAG,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAGjF,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,IAAI,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}