hazo_auth 1.4.1 → 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.
- package/README.md +25 -38
- package/SETUP_CHECKLIST.md +708 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/change_password/route.js +98 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/forgot_password/route.js +78 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts +10 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/get_auth/route.js +63 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts +14 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.js +96 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts +13 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/library_photos/route.js +55 -0
- package/dist/app/api/hazo_auth/login/route.d.ts +12 -0
- package/dist/app/api/hazo_auth/login/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/login/route.js +140 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/logout/route.js +71 -0
- package/dist/app/api/hazo_auth/me/route.d.ts +3 -0
- package/dist/app/api/hazo_auth/me/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/me/route.js +34 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts +7 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.js +43 -0
- package/dist/app/api/hazo_auth/register/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/register/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/register/route.js +80 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.js +64 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/resend_verification/route.js +79 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/reset_password/route.js +76 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/update_user/route.js +95 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.js +204 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts +6 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.js +58 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts +11 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/verify_email/route.js +63 -0
- package/dist/cli/generate.d.ts +2 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +117 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +120 -0
- package/dist/cli/validate.d.ts +15 -0
- package/dist/cli/validate.d.ts.map +1 -0
- package/dist/cli/validate.js +509 -0
- package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts +2 -2
- package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/config/email_verification_field_config.js +1 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts +2 -2
- package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.js +2 -2
- package/dist/components/layouts/email_verification/index.d.ts +3 -3
- package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/index.js +9 -9
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts +2 -2
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.js +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts +2 -2
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +2 -2
- package/dist/components/layouts/forgot_password/index.d.ts +2 -2
- package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/index.js +8 -8
- package/dist/components/layouts/login/config/login_field_config.d.ts +2 -2
- package/dist/components/layouts/login/config/login_field_config.d.ts.map +1 -1
- package/dist/components/layouts/login/config/login_field_config.js +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.d.ts +2 -2
- package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.js +4 -4
- package/dist/components/layouts/login/index.d.ts +2 -2
- package/dist/components/layouts/login/index.d.ts.map +1 -1
- package/dist/components/layouts/login/index.js +9 -9
- package/dist/components/layouts/my_settings/components/editable_field.js +3 -3
- package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts +1 -1
- package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/password_change_dialog.js +4 -4
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +7 -7
- package/dist/components/layouts/my_settings/components/profile_picture_display.js +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.js +3 -3
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +5 -5
- package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.js +4 -4
- package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts +1 -1
- package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/config/my_settings_field_config.js +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.js +1 -1
- package/dist/components/layouts/my_settings/index.d.ts +2 -2
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +9 -9
- package/dist/components/layouts/register/config/register_field_config.d.ts +2 -2
- package/dist/components/layouts/register/config/register_field_config.d.ts.map +1 -1
- package/dist/components/layouts/register/config/register_field_config.js +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.d.ts +3 -3
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +2 -2
- package/dist/components/layouts/register/index.d.ts +2 -2
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/register/index.js +9 -9
- package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts +2 -2
- package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/config/reset_password_field_config.js +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts +3 -3
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +2 -2
- package/dist/components/layouts/reset_password/index.d.ts +2 -2
- package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/index.js +8 -8
- package/dist/components/layouts/shared/components/already_logged_in_guard.js +4 -4
- package/dist/components/layouts/shared/components/auth_page_shell.js +3 -3
- package/dist/components/layouts/shared/components/form_action_buttons.d.ts +1 -1
- package/dist/components/layouts/shared/components/form_action_buttons.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/form_action_buttons.js +1 -1
- package/dist/components/layouts/shared/components/form_field_wrapper.js +2 -2
- package/dist/components/layouts/shared/components/logout_button.js +2 -2
- package/dist/components/layouts/shared/components/password_field.js +3 -3
- package/dist/components/layouts/shared/components/profile_pic_menu.d.ts +1 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.js +4 -4
- package/dist/components/layouts/shared/components/profile_pic_menu_wrapper.js +2 -2
- package/dist/components/layouts/shared/components/sidebar_layout_wrapper.js +3 -3
- package/dist/components/layouts/shared/components/standalone_layout_wrapper.js +1 -1
- package/dist/components/layouts/shared/components/two_column_auth_layout.js +1 -1
- package/dist/components/layouts/shared/components/unauthorized_guard.js +2 -2
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts +1 -1
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
- package/dist/components/layouts/shared/utils/validation.d.ts +1 -1
- package/dist/components/layouts/shared/utils/validation.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/roles_matrix.js +7 -7
- package/dist/components/layouts/user_management/index.js +11 -11
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +45 -0
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/hazo_ui_tooltip.js +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +8 -8
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/vertical-tabs.js +1 -1
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +17 -3
- package/dist/lib/already_logged_in_config.server.js +1 -1
- package/dist/lib/app_logger.js +1 -1
- package/dist/lib/auth/auth_cache.d.ts +1 -1
- package/dist/lib/auth/auth_cache.d.ts.map +1 -1
- package/dist/lib/auth/auth_utils.server.js +2 -2
- package/dist/lib/auth/hazo_get_auth.server.d.ts +1 -1
- package/dist/lib/auth/hazo_get_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.js +7 -7
- package/dist/lib/auth/server_auth.js +2 -2
- package/dist/lib/auth_utility_config.server.js +1 -1
- package/dist/lib/config/config_loader.server.js +1 -1
- package/dist/lib/email_verification_config.server.js +1 -1
- package/dist/lib/file_types_config.server.js +1 -1
- package/dist/lib/forgot_password_config.server.js +1 -1
- package/dist/lib/hazo_connect_instance.server.js +2 -2
- package/dist/lib/hazo_connect_setup.server.js +2 -2
- package/dist/lib/login_config.server.js +2 -2
- package/dist/lib/messages_config.server.js +1 -1
- package/dist/lib/my_settings_config.server.js +7 -7
- package/dist/lib/password_requirements_config.server.js +1 -1
- package/dist/lib/profile_pic_menu_config.server.js +1 -1
- package/dist/lib/profile_picture_config.server.js +2 -2
- package/dist/lib/register_config.server.js +4 -4
- package/dist/lib/reset_password_config.server.js +3 -3
- package/dist/lib/services/email_service.js +2 -2
- package/dist/lib/services/email_verification_service.js +3 -3
- package/dist/lib/services/login_service.js +3 -3
- package/dist/lib/services/password_change_service.js +3 -3
- package/dist/lib/services/password_reset_service.js +3 -3
- package/dist/lib/services/profile_picture_remove_service.js +3 -3
- package/dist/lib/services/profile_picture_service.d.ts +1 -1
- package/dist/lib/services/profile_picture_service.d.ts.map +1 -1
- package/dist/lib/services/profile_picture_service.js +5 -5
- package/dist/lib/services/registration_service.js +8 -8
- package/dist/lib/services/token_service.js +2 -2
- package/dist/lib/services/user_profiles_service.js +2 -2
- package/dist/lib/services/user_update_service.d.ts +1 -1
- package/dist/lib/services/user_update_service.d.ts.map +1 -1
- package/dist/lib/services/user_update_service.js +4 -4
- package/dist/lib/ui_shell_config.server.js +1 -1
- package/dist/lib/ui_sizes_config.server.js +1 -1
- package/dist/lib/user_fields_config.server.js +1 -1
- package/dist/lib/user_management_config.server.js +1 -1
- package/dist/lib/utils/error_sanitizer.d.ts +1 -1
- package/dist/lib/utils/error_sanitizer.d.ts.map +1 -1
- package/dist/server/config/config_loader.d.ts +1 -1
- package/dist/server/config/config_loader.d.ts.map +1 -1
- package/dist/server/config/config_loader.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/logging/logger_service.d.ts +1 -1
- package/dist/server/logging/logger_service.d.ts.map +1 -1
- package/dist/server/routes/change_password.d.ts +2 -0
- package/dist/server/routes/change_password.d.ts.map +1 -0
- package/dist/server/routes/change_password.js +2 -0
- package/dist/server/routes/forgot_password.d.ts +2 -0
- package/dist/server/routes/forgot_password.d.ts.map +1 -0
- package/dist/server/routes/forgot_password.js +2 -0
- package/dist/server/routes/get_auth.d.ts +2 -0
- package/dist/server/routes/get_auth.d.ts.map +1 -0
- package/dist/server/routes/get_auth.js +2 -0
- package/dist/server/routes/index.d.ts +18 -0
- package/dist/server/routes/index.d.ts.map +1 -0
- package/dist/server/routes/index.js +24 -0
- package/dist/server/routes/invalidate_cache.d.ts +2 -0
- package/dist/server/routes/invalidate_cache.d.ts.map +1 -0
- package/dist/server/routes/invalidate_cache.js +2 -0
- package/dist/server/routes/library_photos.d.ts +2 -0
- package/dist/server/routes/library_photos.d.ts.map +1 -0
- package/dist/server/routes/library_photos.js +2 -0
- package/dist/server/routes/login.d.ts +2 -0
- package/dist/server/routes/login.d.ts.map +1 -0
- package/dist/server/routes/login.js +2 -0
- package/dist/server/routes/logout.d.ts +2 -0
- package/dist/server/routes/logout.d.ts.map +1 -0
- package/dist/server/routes/logout.js +2 -0
- package/dist/server/routes/me.d.ts +2 -0
- package/dist/server/routes/me.d.ts.map +1 -0
- package/dist/server/routes/me.js +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts.map +1 -0
- package/dist/server/routes/profile_picture_filename.js +3 -0
- package/dist/server/routes/register.d.ts +2 -0
- package/dist/server/routes/register.d.ts.map +1 -0
- package/dist/server/routes/register.js +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/remove_profile_picture.js +2 -0
- package/dist/server/routes/resend_verification.d.ts +2 -0
- package/dist/server/routes/resend_verification.d.ts.map +1 -0
- package/dist/server/routes/resend_verification.js +2 -0
- package/dist/server/routes/reset_password.d.ts +2 -0
- package/dist/server/routes/reset_password.d.ts.map +1 -0
- package/dist/server/routes/reset_password.js +2 -0
- package/dist/server/routes/update_user.d.ts +2 -0
- package/dist/server/routes/update_user.d.ts.map +1 -0
- package/dist/server/routes/update_user.js +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/upload_profile_picture.js +2 -0
- package/dist/server/routes/validate_reset_token.d.ts +2 -0
- package/dist/server/routes/validate_reset_token.d.ts.map +1 -0
- package/dist/server/routes/validate_reset_token.js +2 -0
- package/dist/server/routes/verify_email.d.ts +2 -0
- package/dist/server/routes/verify_email.d.ts.map +1 -0
- package/dist/server/routes/verify_email.js +2 -0
- package/dist/server/server.js +2 -2
- package/package.json +14 -115
- package/components.json +0 -22
- package/instrumentation.ts +0 -32
- package/migrations/001_add_token_type_to_refresh_tokens.sql +0 -14
- package/migrations/002_add_name_to_hazo_users.sql +0 -7
- package/migrations/003_add_url_on_logon_to_hazo_users.sql +0 -8
- package/next.config.mjs +0 -67
- package/postcss.config.mjs +0 -8
- package/public/file.svg +0 -1
- package/public/globe.svg +0 -1
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/public/window.svg +0 -1
- package/scripts/apply_migration.ts +0 -118
- package/scripts/init_users.ts +0 -378
- package/src/app/api/hazo_auth/auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/change_password/route.ts +0 -132
- package/src/app/api/hazo_auth/forgot_password/route.ts +0 -107
- package/src/app/api/hazo_auth/get_auth/route.ts +0 -89
- package/src/app/api/hazo_auth/invalidate_cache/route.ts +0 -139
- package/src/app/api/hazo_auth/library_photos/route.ts +0 -73
- package/src/app/api/hazo_auth/login/route.ts +0 -181
- package/src/app/api/hazo_auth/logout/route.ts +0 -89
- package/src/app/api/hazo_auth/me/route.ts +0 -47
- package/src/app/api/hazo_auth/profile_picture/[filename]/route.ts +0 -67
- package/src/app/api/hazo_auth/register/route.ts +0 -109
- package/src/app/api/hazo_auth/remove_profile_picture/route.ts +0 -86
- package/src/app/api/hazo_auth/resend_verification/route.ts +0 -108
- package/src/app/api/hazo_auth/reset_password/route.ts +0 -107
- package/src/app/api/hazo_auth/update_user/route.ts +0 -126
- package/src/app/api/hazo_auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/user_management/permissions/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/roles/route.ts +0 -442
- package/src/app/api/hazo_auth/user_management/users/roles/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/users/route.ts +0 -239
- package/src/app/api/hazo_auth/validate_reset_token/route.ts +0 -83
- package/src/app/api/hazo_auth/verify_email/route.ts +0 -88
- package/src/app/api/migrations/apply/route.ts +0 -91
- package/src/app/favicon.ico +0 -0
- package/src/app/fonts/GeistMonoVF.woff +0 -0
- package/src/app/fonts/GeistVF.woff +0 -0
- package/src/app/globals.css +0 -89
- package/src/app/hazo_auth/forgot_password/forgot_password_page_client.tsx +0 -60
- package/src/app/hazo_auth/forgot_password/page.tsx +0 -24
- package/src/app/hazo_auth/login/login_page_client.tsx +0 -86
- package/src/app/hazo_auth/login/page.tsx +0 -38
- package/src/app/hazo_auth/my_settings/my_settings_page_client.tsx +0 -120
- package/src/app/hazo_auth/my_settings/page.tsx +0 -40
- package/src/app/hazo_auth/register/page.tsx +0 -36
- package/src/app/hazo_auth/register/register_page_client.tsx +0 -81
- package/src/app/hazo_auth/reset_password/page.tsx +0 -29
- package/src/app/hazo_auth/reset_password/reset_password_page_client.tsx +0 -81
- package/src/app/hazo_auth/user_management/page.tsx +0 -14
- package/src/app/hazo_auth/user_management/user_management_page_client.tsx +0 -16
- package/src/app/hazo_auth/verify_email/page.tsx +0 -24
- package/src/app/hazo_auth/verify_email/verify_email_page_client.tsx +0 -60
- package/src/app/hazo_connect/api/sqlite/data/route.ts +0 -203
- package/src/app/hazo_connect/api/sqlite/schema/route.ts +0 -45
- package/src/app/hazo_connect/api/sqlite/tables/route.ts +0 -36
- package/src/app/hazo_connect/sqlite_admin/page.tsx +0 -51
- package/src/app/hazo_connect/sqlite_admin/sqlite-admin-client.tsx +0 -984
- package/src/app/layout.tsx +0 -43
- package/src/app/page.tsx +0 -170
- package/src/components/index.ts +0 -7
- package/src/components/layouts/email_verification/config/email_verification_field_config.ts +0 -86
- package/src/components/layouts/email_verification/hooks/use_email_verification.ts +0 -297
- package/src/components/layouts/email_verification/index.tsx +0 -297
- package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +0 -58
- package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +0 -179
- package/src/components/layouts/forgot_password/index.tsx +0 -168
- package/src/components/layouts/index.ts +0 -26
- package/src/components/layouts/login/config/login_field_config.ts +0 -67
- package/src/components/layouts/login/hooks/use_login_form.ts +0 -286
- package/src/components/layouts/login/index.tsx +0 -252
- package/src/components/layouts/my_settings/components/editable_field.tsx +0 -177
- package/src/components/layouts/my_settings/components/password_change_dialog.tsx +0 -301
- package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +0 -385
- package/src/components/layouts/my_settings/components/profile_picture_display.tsx +0 -66
- package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +0 -143
- package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +0 -311
- package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +0 -341
- package/src/components/layouts/my_settings/config/my_settings_field_config.ts +0 -61
- package/src/components/layouts/my_settings/hooks/use_my_settings.ts +0 -458
- package/src/components/layouts/my_settings/index.tsx +0 -351
- package/src/components/layouts/register/config/register_field_config.ts +0 -101
- package/src/components/layouts/register/hooks/use_register_form.ts +0 -275
- package/src/components/layouts/register/index.tsx +0 -226
- package/src/components/layouts/reset_password/config/reset_password_field_config.ts +0 -86
- package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +0 -276
- package/src/components/layouts/reset_password/index.tsx +0 -294
- package/src/components/layouts/shared/components/already_logged_in_guard.tsx +0 -95
- package/src/components/layouts/shared/components/auth_page_shell.tsx +0 -36
- package/src/components/layouts/shared/components/field_error_message.tsx +0 -29
- package/src/components/layouts/shared/components/form_action_buttons.tsx +0 -64
- package/src/components/layouts/shared/components/form_field_wrapper.tsx +0 -44
- package/src/components/layouts/shared/components/form_header.tsx +0 -36
- package/src/components/layouts/shared/components/logout_button.tsx +0 -76
- package/src/components/layouts/shared/components/password_field.tsx +0 -72
- package/src/components/layouts/shared/components/profile_pic_menu.tsx +0 -321
- package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +0 -40
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +0 -214
- package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +0 -53
- package/src/components/layouts/shared/components/two_column_auth_layout.tsx +0 -44
- package/src/components/layouts/shared/components/unauthorized_guard.tsx +0 -78
- package/src/components/layouts/shared/components/visual_panel.tsx +0 -41
- package/src/components/layouts/shared/config/layout_customization.ts +0 -95
- package/src/components/layouts/shared/data/layout_data_client.ts +0 -19
- package/src/components/layouts/shared/hooks/use_auth_status.ts +0 -103
- package/src/components/layouts/shared/hooks/use_hazo_auth.ts +0 -158
- package/src/components/layouts/shared/index.ts +0 -34
- package/src/components/layouts/shared/utils/ip_address.ts +0 -37
- package/src/components/layouts/shared/utils/validation.ts +0 -66
- package/src/components/layouts/user_management/components/roles_matrix.tsx +0 -607
- package/src/components/layouts/user_management/index.tsx +0 -1295
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/dropdown-menu.tsx +0 -201
- package/src/components/ui/hazo_ui_tooltip.tsx +0 -67
- package/src/components/ui/index.ts +0 -22
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/sidebar.tsx +0 -773
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/sonner.tsx +0 -31
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/components/ui/vertical-tabs.tsx +0 -59
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/index.ts +0 -7
- package/src/lib/already_logged_in_config.server.ts +0 -46
- package/src/lib/app_logger.ts +0 -24
- package/src/lib/auth/auth_cache.ts +0 -220
- package/src/lib/auth/auth_rate_limiter.ts +0 -121
- package/src/lib/auth/auth_types.ts +0 -65
- package/src/lib/auth/auth_utils.server.ts +0 -196
- package/src/lib/auth/hazo_get_auth.server.ts +0 -333
- package/src/lib/auth/index.ts +0 -23
- package/src/lib/auth/server_auth.ts +0 -88
- package/src/lib/auth_utility_config.server.ts +0 -136
- package/src/lib/config/config_loader.server.ts +0 -164
- package/src/lib/email_verification_config.server.ts +0 -32
- package/src/lib/file_types_config.server.ts +0 -25
- package/src/lib/forgot_password_config.server.ts +0 -32
- package/src/lib/hazo_connect_instance.server.ts +0 -101
- package/src/lib/hazo_connect_setup.server.ts +0 -194
- package/src/lib/hazo_connect_setup.ts +0 -54
- package/src/lib/index.ts +0 -44
- package/src/lib/login_config.server.ts +0 -71
- package/src/lib/messages_config.server.ts +0 -45
- package/src/lib/migrations/apply_migration.ts +0 -105
- package/src/lib/my_settings_config.server.ts +0 -135
- package/src/lib/password_requirements_config.server.ts +0 -39
- package/src/lib/profile_pic_menu_config.server.ts +0 -138
- package/src/lib/profile_picture_config.server.ts +0 -56
- package/src/lib/register_config.server.ts +0 -73
- package/src/lib/reset_password_config.server.ts +0 -75
- package/src/lib/services/email_service.ts +0 -581
- package/src/lib/services/email_verification_service.ts +0 -270
- package/src/lib/services/index.ts +0 -15
- package/src/lib/services/login_service.ts +0 -134
- package/src/lib/services/password_change_service.ts +0 -154
- package/src/lib/services/password_reset_service.ts +0 -405
- package/src/lib/services/profile_picture_remove_service.ts +0 -120
- package/src/lib/services/profile_picture_service.ts +0 -215
- package/src/lib/services/profile_picture_source_mapper.ts +0 -62
- package/src/lib/services/registration_service.ts +0 -184
- package/src/lib/services/token_service.ts +0 -240
- package/src/lib/services/user_profiles_service.ts +0 -143
- package/src/lib/services/user_update_service.ts +0 -141
- package/src/lib/ui_shell_config.server.ts +0 -73
- package/src/lib/ui_sizes_config.server.ts +0 -37
- package/src/lib/user_fields_config.server.ts +0 -31
- package/src/lib/user_management_config.server.ts +0 -39
- package/src/lib/utils/api_route_helpers.ts +0 -60
- package/src/lib/utils/error_sanitizer.ts +0 -75
- package/src/lib/utils.ts +0 -11
- package/src/middleware.ts +0 -94
- package/src/routes/index.ts +0 -34
- package/src/server/config/config_loader.ts +0 -496
- package/src/server/index.ts +0 -38
- package/src/server/logging/logger_service.ts +0 -56
- package/src/server/routes/root_router.ts +0 -16
- package/src/server/server.ts +0 -28
- package/src/server/types/app_types.ts +0 -74
- package/src/server/types/express.d.ts +0 -16
- package/src/stories/email_verification_layout.stories.tsx +0 -137
- package/src/stories/forgot_password_layout.stories.tsx +0 -85
- package/src/stories/login_layout.stories.tsx +0 -85
- package/src/stories/project_overview.stories.tsx +0 -33
- package/src/stories/register_layout.stories.tsx +0 -107
- package/tailwind.config.ts +0 -77
- package/tsconfig.build.json +0 -39
- 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
|
+
}
|
package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "
|
|
2
|
-
import { type ButtonPaletteDefaults, type ButtonPaletteOverrides, type LayoutLabelDefaults, type LayoutLabelOverrides } from "
|
|
1
|
+
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "../../shared/config/layout_customization";
|
|
2
|
+
import { type ButtonPaletteDefaults, type ButtonPaletteOverrides, type LayoutLabelDefaults, type LayoutLabelOverrides } from "../../shared/config/layout_customization";
|
|
3
3
|
export declare const EMAIL_VERIFICATION_FIELD_IDS: {
|
|
4
4
|
readonly EMAIL: "email_address";
|
|
5
5
|
};
|
package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email_verification_field_config.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/config/email_verification_field_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"email_verification_field_config.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/config/email_verification_field_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACxG,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAcxH,eAAO,MAAM,uCAAuC,GAClD,YAAY,uBAAuB,mBACwC,CAAC;AAU9E,eAAO,MAAM,8BAA8B,GAAI,YAAY,oBAAoB,wBAClB,CAAC;AAU9D,eAAO,MAAM,qCAAqC,GAAI,YAAY,sBAAsB,0BACX,CAAC;AAG9E,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,EAAE,8BAKvD,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,uCAAuC,EAAE,4BAIrD,CAAC"}
|
package/dist/components/layouts/email_verification/config/email_verification_field_config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveButtonPalette, resolveFieldDefinitions, resolveLabels, } from "
|
|
1
|
+
import { resolveButtonPalette, resolveFieldDefinitions, resolveLabels, } from "../../shared/config/layout_customization";
|
|
2
2
|
// section: field_identifiers
|
|
3
3
|
export const EMAIL_VERIFICATION_FIELD_IDS = {
|
|
4
4
|
EMAIL: "email_address",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LayoutDataClient } from "
|
|
2
|
-
import { type EmailVerificationFieldId } from "
|
|
1
|
+
import type { LayoutDataClient } from "../../shared/data/layout_data_client";
|
|
2
|
+
import { type EmailVerificationFieldId } from "../config/email_verification_field_config";
|
|
3
3
|
export type EmailVerificationFormValues = Record<EmailVerificationFieldId, string>;
|
|
4
4
|
export type EmailVerificationFormErrors = Partial<Record<EmailVerificationFieldId, string>> & {
|
|
5
5
|
submit?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_email_verification.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/hooks/use_email_verification.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_email_verification.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/hooks/use_email_verification.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAgC,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAIxH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;AACnF,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,GAAG;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC1D,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,2BAA2B,CAAC;IACpC,MAAM,EAAE,2BAA2B,CAAC;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,CAAC,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACtE,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAQF,eAAO,MAAM,sBAAsB,GAAI,OAAO,EAAG,2CAI9C,0BAA0B,CAAC,OAAO,CAAC,KAAG,0BAqPxC,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
|
-
import { EMAIL_VERIFICATION_FIELD_IDS } from "
|
|
7
|
-
import { validateEmail } from "
|
|
6
|
+
import { EMAIL_VERIFICATION_FIELD_IDS } from "../config/email_verification_field_config";
|
|
7
|
+
import { validateEmail } from "../../shared/utils/validation";
|
|
8
8
|
// section: helpers
|
|
9
9
|
const buildInitialValues = (initialEmail) => ({
|
|
10
10
|
[EMAIL_VERIFICATION_FIELD_IDS.EMAIL]: initialEmail || "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ButtonPaletteOverrides, type LayoutFieldMapOverrides, type LayoutLabelOverrides } from "
|
|
2
|
-
import { type EmailVerificationSuccessLabels, type EmailVerificationErrorLabels } from "
|
|
3
|
-
import { type LayoutDataClient } from "
|
|
1
|
+
import { type ButtonPaletteOverrides, type LayoutFieldMapOverrides, type LayoutLabelOverrides } from "../shared/config/layout_customization";
|
|
2
|
+
import { type EmailVerificationSuccessLabels, type EmailVerificationErrorLabels } from "./config/email_verification_field_config";
|
|
3
|
+
import { type LayoutDataClient } from "../shared/data/layout_data_client";
|
|
4
4
|
export type EmailVerificationLayoutProps<TClient = unknown> = {
|
|
5
5
|
image_src: string;
|
|
6
6
|
image_alt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/email_verification/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/email_verification/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAOL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAClC,MAAM,0CAA0C,CAAC;AAKlD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,MAAM,MAAM,4BAA4B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACxC,CAAC;AASF,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,OAAO,EAAE,EACzD,SAAS,EACT,SAAS,EACT,sBAAkC,EAClC,eAAe,EACf,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAkB,EAClB,UAA+B,EAC/B,WAAW,EACX,yBAAyB,EACzB,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,GACrB,EAAE,4BAA4B,CAAC,OAAO,CAAC,2CAyNvC"}
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
5
|
// section: imports
|
|
6
|
-
import { Input } from "
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { FormFieldWrapper } from "
|
|
9
|
-
import { FormHeader } from "
|
|
10
|
-
import { FormActionButtons } from "
|
|
11
|
-
import { TwoColumnAuthLayout } from "
|
|
12
|
-
import { EMAIL_VERIFICATION_FIELD_IDS, createEmailVerificationFieldDefinitions, resolveEmailVerificationButtonPalette, resolveEmailVerificationLabels, EMAIL_VERIFICATION_SUCCESS_LABEL_DEFAULTS, EMAIL_VERIFICATION_ERROR_LABEL_DEFAULTS, } from "
|
|
13
|
-
import { use_email_verification, } from "
|
|
6
|
+
import { Input } from "../../ui/input";
|
|
7
|
+
import { Button } from "../../ui/button";
|
|
8
|
+
import { FormFieldWrapper } from "../shared/components/form_field_wrapper";
|
|
9
|
+
import { FormHeader } from "../shared/components/form_header";
|
|
10
|
+
import { FormActionButtons } from "../shared/components/form_action_buttons";
|
|
11
|
+
import { TwoColumnAuthLayout } from "../shared/components/two_column_auth_layout";
|
|
12
|
+
import { EMAIL_VERIFICATION_FIELD_IDS, createEmailVerificationFieldDefinitions, resolveEmailVerificationButtonPalette, resolveEmailVerificationLabels, EMAIL_VERIFICATION_SUCCESS_LABEL_DEFAULTS, EMAIL_VERIFICATION_ERROR_LABEL_DEFAULTS, } from "./config/email_verification_field_config";
|
|
13
|
+
import { use_email_verification, } from "./hooks/use_email_verification";
|
|
14
14
|
import { CheckCircle, XCircle, Loader2 } from "lucide-react";
|
|
15
|
-
import { AlreadyLoggedInGuard } from "
|
|
15
|
+
import { AlreadyLoggedInGuard } from "../shared/components/already_logged_in_guard";
|
|
16
16
|
const ORDERED_FIELDS = [
|
|
17
17
|
EMAIL_VERIFICATION_FIELD_IDS.EMAIL,
|
|
18
18
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "
|
|
2
|
-
import { type ButtonPaletteDefaults, type ButtonPaletteOverrides, type LayoutLabelDefaults, type LayoutLabelOverrides } from "
|
|
1
|
+
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "../../shared/config/layout_customization";
|
|
2
|
+
import { type ButtonPaletteDefaults, type ButtonPaletteOverrides, type LayoutLabelDefaults, type LayoutLabelOverrides } from "../../shared/config/layout_customization";
|
|
3
3
|
export declare const FORGOT_PASSWORD_FIELD_IDS: {
|
|
4
4
|
readonly EMAIL: "email_address";
|
|
5
5
|
};
|
package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot_password_field_config.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/config/forgot_password_field_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"forgot_password_field_config.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/config/forgot_password_field_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACxG,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,yBAAyB;;CAE5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAc/G,eAAO,MAAM,oCAAoC,GAC/C,YAAY,uBAAuB,mBACqC,CAAC;AAU3E,eAAO,MAAM,2BAA2B,GAAI,YAAY,oBAAoB,wBAClB,CAAC;AAU3D,eAAO,MAAM,kCAAkC,GAAI,YAAY,sBAAsB,0BACX,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveButtonPalette, resolveFieldDefinitions, resolveLabels, } from "
|
|
1
|
+
import { resolveButtonPalette, resolveFieldDefinitions, resolveLabels, } from "../../shared/config/layout_customization";
|
|
2
2
|
// section: field_identifiers
|
|
3
3
|
export const FORGOT_PASSWORD_FIELD_IDS = {
|
|
4
4
|
EMAIL: "email_address",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LayoutDataClient } from "
|
|
2
|
-
import { type ForgotPasswordFieldId } from "
|
|
1
|
+
import type { LayoutDataClient } from "../../shared/data/layout_data_client";
|
|
2
|
+
import { type ForgotPasswordFieldId } from "../config/forgot_password_field_config";
|
|
3
3
|
export type ForgotPasswordFormValues = Record<ForgotPasswordFieldId, string>;
|
|
4
4
|
export type ForgotPasswordFormErrors = Partial<Record<ForgotPasswordFieldId, string>> & {
|
|
5
5
|
submit?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_forgot_password_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_forgot_password_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAI/G,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,GAAG;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC3D,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,wBAAwB,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAC,OAAO,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAQF,eAAO,MAAM,wBAAwB,GAAI,OAAO,EAAG,iBAEhD,2BAA2B,CAAC,OAAO,CAAC,KAAG,2BA2IzC,CAAC"}
|