nucleus-core-ts 0.8.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/LICENSE +48 -0
- package/README.md +177 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +1 -0
- package/dist/dist/index-0yyw12k6.d.ts +8 -0
- package/dist/dist/index-tv67j5qd.d.ts +488 -0
- package/dist/dist/index.d.ts +40 -0
- package/dist/fe/components/AbstractAnimatedBackground/index.d.ts +7 -0
- package/dist/fe/components/AuthorizationPage/components/AuthorizationPage.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/ClaimList.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/RoleClaimEditor.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/RoleList.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/index.d.ts +9 -0
- package/dist/fe/components/AuthorizationPage/store/index.d.ts +47 -0
- package/dist/fe/components/AuthorizationPage/theme/index.d.ts +82 -0
- package/dist/fe/components/AuthorizationPage/types/index.d.ts +64 -0
- package/dist/fe/components/Button/components/Button.d.ts +3 -0
- package/dist/fe/components/Button/components/ButtonSpinner.d.ts +3 -0
- package/dist/fe/components/Button/index.d.ts +6 -0
- package/dist/fe/components/Button/theme/index.d.ts +183 -0
- package/dist/fe/components/Button/types/index.d.ts +24 -0
- package/dist/fe/components/Button/utils/cn.d.ts +3 -0
- package/dist/fe/components/Captcha/components/Captcha.d.ts +4 -0
- package/dist/fe/components/Captcha/index.d.ts +4 -0
- package/dist/fe/components/Captcha/theme.d.ts +53 -0
- package/dist/fe/components/Captcha/types.d.ts +60 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordForm.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordHeader.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordPage.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ChangePasswordPage/store/index.d.ts +16 -0
- package/dist/fe/components/ChangePasswordPage/theme/index.d.ts +48 -0
- package/dist/fe/components/ChangePasswordPage/types/index.d.ts +56 -0
- package/dist/fe/components/Checkbox/components/Checkbox.d.ts +3 -0
- package/dist/fe/components/Checkbox/components/CheckboxIcon.d.ts +3 -0
- package/dist/fe/components/Checkbox/components/SwitchTrack.d.ts +3 -0
- package/dist/fe/components/Checkbox/index.d.ts +7 -0
- package/dist/fe/components/Checkbox/theme/index.d.ts +218 -0
- package/dist/fe/components/Checkbox/types/index.d.ts +39 -0
- package/dist/fe/components/Checkbox/utils/cn.d.ts +3 -0
- package/dist/fe/components/DataTable/DataTable.d.ts +3 -0
- package/dist/fe/components/DataTable/components/ActionCell.d.ts +10 -0
- package/dist/fe/components/DataTable/components/DataCell.d.ts +18 -0
- package/dist/fe/components/DataTable/components/EditableCell.d.ts +14 -0
- package/dist/fe/components/DataTable/components/EmptyState.d.ts +8 -0
- package/dist/fe/components/DataTable/components/HeaderCell.d.ts +16 -0
- package/dist/fe/components/DataTable/components/InfiniteScrollTrigger.d.ts +11 -0
- package/dist/fe/components/DataTable/components/LoadingSpinner.d.ts +7 -0
- package/dist/fe/components/DataTable/components/ResizeHandle.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SelectionCell.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SkeletonRow.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SkeletonTable.d.ts +10 -0
- package/dist/fe/components/DataTable/components/SortIcon.d.ts +9 -0
- package/dist/fe/components/DataTable/components/TableHeader.d.ts +20 -0
- package/dist/fe/components/DataTable/components/TableRow.d.ts +20 -0
- package/dist/fe/components/DataTable/components/index.d.ts +15 -0
- package/dist/fe/components/DataTable/hooks/index.d.ts +3 -0
- package/dist/fe/components/DataTable/hooks/useAutoFitColumn.d.ts +8 -0
- package/dist/fe/components/DataTable/hooks/useResizeColumn.d.ts +12 -0
- package/dist/fe/components/DataTable/index.d.ts +6 -0
- package/dist/fe/components/DataTable/store/index.d.ts +52 -0
- package/dist/fe/components/DataTable/theme/index.d.ts +131 -0
- package/dist/fe/components/DataTable/types/index.d.ts +151 -0
- package/dist/fe/components/DataTable/utils/cn.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/CalendarGrid.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/CalendarHeader.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/DatePicker.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/MonthYearSelector.d.ts +10 -0
- package/dist/fe/components/DatePicker/index.d.ts +10 -0
- package/dist/fe/components/DatePicker/locales/index.d.ts +5 -0
- package/dist/fe/components/DatePicker/theme/index.d.ts +312 -0
- package/dist/fe/components/DatePicker/types/index.d.ts +88 -0
- package/dist/fe/components/DatePicker/utils/cn.d.ts +3 -0
- package/dist/fe/components/DatePicker/utils/date.d.ts +21 -0
- package/dist/fe/components/DevicesPage/components/DeviceCard.d.ts +4 -0
- package/dist/fe/components/DevicesPage/components/DevicesHeader.d.ts +4 -0
- package/dist/fe/components/DevicesPage/components/DevicesPage.d.ts +4 -0
- package/dist/fe/components/DevicesPage/index.d.ts +8 -0
- package/dist/fe/components/DevicesPage/store/index.d.ts +20 -0
- package/dist/fe/components/DevicesPage/theme/index.d.ts +92 -0
- package/dist/fe/components/DevicesPage/types/index.d.ts +147 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordHeader.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ForgotPasswordPage/store/index.d.ts +14 -0
- package/dist/fe/components/ForgotPasswordPage/theme/index.d.ts +48 -0
- package/dist/fe/components/ForgotPasswordPage/types/index.d.ts +48 -0
- package/dist/fe/components/FormBuilder/components/FormBuilder.d.ts +3 -0
- package/dist/fe/components/FormBuilder/components/FormField.d.ts +3 -0
- package/dist/fe/components/FormBuilder/hooks/useFormBuilder.d.ts +3 -0
- package/dist/fe/components/FormBuilder/index.d.ts +6 -0
- package/dist/fe/components/FormBuilder/theme/index.d.ts +136 -0
- package/dist/fe/components/FormBuilder/types/index.d.ts +150 -0
- package/dist/fe/components/FormBuilder/utils/cn.d.ts +3 -0
- package/dist/fe/components/FormBuilder/utils/fieldMapping.d.ts +12 -0
- package/dist/fe/components/FormBuilder/utils/validation.d.ts +11 -0
- package/dist/fe/components/LoginPage/components/LoginForm.d.ts +4 -0
- package/dist/fe/components/LoginPage/components/LoginHeader.d.ts +4 -0
- package/dist/fe/components/LoginPage/components/LoginPage.d.ts +4 -0
- package/dist/fe/components/LoginPage/index.d.ts +8 -0
- package/dist/fe/components/LoginPage/store/index.d.ts +22 -0
- package/dist/fe/components/LoginPage/theme/index.d.ts +55 -0
- package/dist/fe/components/LoginPage/types/index.d.ts +129 -0
- package/dist/fe/components/MagicLinkVerifyPage/components/MagicLinkVerifyPage.d.ts +4 -0
- package/dist/fe/components/MagicLinkVerifyPage/index.d.ts +5 -0
- package/dist/fe/components/MagicLinkVerifyPage/store.d.ts +15 -0
- package/dist/fe/components/MagicLinkVerifyPage/theme.d.ts +37 -0
- package/dist/fe/components/MagicLinkVerifyPage/types.d.ts +35 -0
- package/dist/fe/components/NucleusEntityShowcase.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/FloatingLabel.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/InputIcons.d.ts +15 -0
- package/dist/fe/components/NucleusTextInput/components/NucleusTextInput.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/PasswordStrengthIndicator.d.ts +15 -0
- package/dist/fe/components/NucleusTextInput/components/TypewriterText.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/index.d.ts +11 -0
- package/dist/fe/components/NucleusTextInput/theme/index.d.ts +108 -0
- package/dist/fe/components/NucleusTextInput/types/index.d.ts +65 -0
- package/dist/fe/components/NucleusTextInput/utils/cn.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/utils/format.d.ts +8 -0
- package/dist/fe/components/NucleusTextInput/utils/validation.d.ts +23 -0
- package/dist/fe/components/ProfilePage/components/AddressCard.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/PhoneCard.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/ProfileHeader.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/ProfilePage.d.ts +4 -0
- package/dist/fe/components/ProfilePage/index.d.ts +10 -0
- package/dist/fe/components/ProfilePage/store/index.d.ts +37 -0
- package/dist/fe/components/ProfilePage/theme/index.d.ts +101 -0
- package/dist/fe/components/ProfilePage/types/index.d.ts +150 -0
- package/dist/fe/components/RangePicker/components/RangePicker.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeThumb.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeTooltip.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeTrack.d.ts +3 -0
- package/dist/fe/components/RangePicker/index.d.ts +8 -0
- package/dist/fe/components/RangePicker/theme/index.d.ts +90 -0
- package/dist/fe/components/RangePicker/types/index.d.ts +66 -0
- package/dist/fe/components/RangePicker/utils/cn.d.ts +3 -0
- package/dist/fe/components/RegisterPage/components/PasswordStrengthIndicator.d.ts +14 -0
- package/dist/fe/components/RegisterPage/components/RegisterForm.d.ts +4 -0
- package/dist/fe/components/RegisterPage/components/RegisterHeader.d.ts +4 -0
- package/dist/fe/components/RegisterPage/components/RegisterPage.d.ts +4 -0
- package/dist/fe/components/RegisterPage/index.d.ts +9 -0
- package/dist/fe/components/RegisterPage/store/index.d.ts +19 -0
- package/dist/fe/components/RegisterPage/theme/index.d.ts +81 -0
- package/dist/fe/components/RegisterPage/types/index.d.ts +141 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordHeader.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ResetPasswordPage/store/index.d.ts +15 -0
- package/dist/fe/components/ResetPasswordPage/theme/index.d.ts +56 -0
- package/dist/fe/components/ResetPasswordPage/types/index.d.ts +50 -0
- package/dist/fe/components/SearchBox/components/SearchBox.d.ts +3 -0
- package/dist/fe/components/SearchBox/components/SearchBoxDropdown.d.ts +3 -0
- package/dist/fe/components/SearchBox/index.d.ts +8 -0
- package/dist/fe/components/SearchBox/theme/index.d.ts +141 -0
- package/dist/fe/components/SearchBox/types/index.d.ts +47 -0
- package/dist/fe/components/SearchBox/utils/cn.d.ts +3 -0
- package/dist/fe/components/SearchBox/utils/debounce.d.ts +5 -0
- package/dist/fe/components/SearchBox/utils/sanitize.d.ts +9 -0
- package/dist/fe/components/SelectBox/components/SelectBox.d.ts +3 -0
- package/dist/fe/components/SelectBox/components/SelectDropdown.d.ts +6 -0
- package/dist/fe/components/SelectBox/components/SelectOptionItem.d.ts +3 -0
- package/dist/fe/components/SelectBox/components/SelectTrigger.d.ts +5 -0
- package/dist/fe/components/SelectBox/index.d.ts +8 -0
- package/dist/fe/components/SelectBox/theme/index.d.ts +100 -0
- package/dist/fe/components/SelectBox/types/index.d.ts +66 -0
- package/dist/fe/components/SelectBox/utils/cn.d.ts +3 -0
- package/dist/fe/components/SetPasswordPage/components/PasswordStrengthIndicator.d.ts +14 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordForm.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordHeader.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordPage.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/index.d.ts +9 -0
- package/dist/fe/components/SetPasswordPage/store/index.d.ts +16 -0
- package/dist/fe/components/SetPasswordPage/theme/index.d.ts +95 -0
- package/dist/fe/components/SetPasswordPage/types/index.d.ts +137 -0
- package/dist/fe/components/UsersPage/components/InviteUserModal.d.ts +10 -0
- package/dist/fe/components/UsersPage/components/Pagination.d.ts +13 -0
- package/dist/fe/components/UsersPage/components/RoleAssignmentModal.d.ts +12 -0
- package/dist/fe/components/UsersPage/components/StatsCards.d.ts +10 -0
- package/dist/fe/components/UsersPage/components/UserDetailDrawer.d.ts +24 -0
- package/dist/fe/components/UsersPage/components/UserFilters.d.ts +18 -0
- package/dist/fe/components/UsersPage/components/UserListItem.d.ts +11 -0
- package/dist/fe/components/UsersPage/components/UserListSkeleton.d.ts +7 -0
- package/dist/fe/components/UsersPage/components/UsersPage.d.ts +8 -0
- package/dist/fe/components/UsersPage/index.d.ts +13 -0
- package/dist/fe/components/UsersPage/store/index.d.ts +51 -0
- package/dist/fe/components/UsersPage/theme/index.d.ts +180 -0
- package/dist/fe/components/UsersPage/types/index.d.ts +73 -0
- package/dist/fe/components/VerifyEmailPage/components/VerifyEmailPage.d.ts +4 -0
- package/dist/fe/components/VerifyEmailPage/index.d.ts +5 -0
- package/dist/fe/components/VerifyEmailPage/store/index.d.ts +18 -0
- package/dist/fe/components/VerifyEmailPage/theme/index.d.ts +49 -0
- package/dist/fe/components/VerifyEmailPage/types/index.d.ts +84 -0
- package/dist/fe/hooks/useNucleusEntity.d.ts +3 -0
- package/dist/fe/index.d.ts +42 -0
- package/dist/fe/index.js +1 -0
- package/dist/fe/types/index.d.ts +233 -0
- package/dist/fe/utils/cn.d.ts +3 -0
- package/dist/fe/utils/columnUtils.d.ts +63 -0
- package/dist/fe/utils/endpointKeys.d.ts +9 -0
- package/dist/index-0yyw12k6.js +1 -0
- package/dist/index-tv67j5qd.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/nucleus.config.d.ts +95 -0
- package/dist/public/components/CTA.d.ts +2 -0
- package/dist/public/components/Capabilities.d.ts +9 -0
- package/dist/public/components/Features.d.ts +9 -0
- package/dist/public/components/Footer.d.ts +2 -0
- package/dist/public/components/Hero.d.ts +2 -0
- package/dist/public/components/Managers.d.ts +7 -0
- package/dist/public/components/Nav.d.ts +2 -0
- package/dist/public/components/Stack.d.ts +7 -0
- package/dist/public/components/docs/Docs.d.ts +2 -0
- package/dist/public/components/docs/DocsContent.d.ts +19 -0
- package/dist/public/components/docs/DocsRightSidebar.d.ts +9 -0
- package/dist/public/components/docs/DocsSidebar.d.ts +8 -0
- package/dist/public/components/docs/content/authentication.d.ts +3 -0
- package/dist/public/components/docs/content/gettingStarted.d.ts +3 -0
- package/dist/public/components/docs/docsData.d.ts +18 -0
- package/dist/public/components/docs/index.d.ts +7 -0
- package/dist/public/components/index.d.ts +10 -0
- package/dist/public/index.d.ts +3 -0
- package/dist/public/store.d.ts +20 -0
- package/dist/scripts/build.d.ts +7 -0
- package/dist/scripts/generate-schema.d.ts +3 -0
- package/dist/scripts/generate-system-tables-types.d.ts +2 -0
- package/dist/scripts/generate-types-schema.d.ts +7 -0
- package/dist/scripts/publish.d.ts +7 -0
- package/dist/scripts/version.d.ts +7 -0
- package/dist/src/Client/ApiCaller/client.d.ts +5 -0
- package/dist/src/Client/ApiCaller/examples/usage.example.d.ts +8 -0
- package/dist/src/Client/ApiCaller/generator.d.ts +10 -0
- package/dist/src/Client/ApiCaller/index.d.ts +7 -0
- package/dist/src/Client/ApiCaller/server.d.ts +4 -0
- package/dist/src/Client/ApiCaller/system-tables.d.ts +1215 -0
- package/dist/src/Client/ApiCaller/types.d.ts +907 -0
- package/dist/src/Client/Proxy/httpProxy.d.ts +5 -0
- package/dist/src/Client/Proxy/index.d.ts +6 -0
- package/dist/src/Client/Proxy/index.js +1 -0
- package/dist/src/Client/Proxy/server.d.ts +5 -0
- package/dist/src/Client/Proxy/types.d.ts +69 -0
- package/dist/src/Client/Proxy/utils.d.ts +12 -0
- package/dist/src/Client/Proxy/wsProxy.d.ts +20 -0
- package/dist/src/Client/ServerFetch/index.d.ts +19 -0
- package/dist/src/Client/ServerFetch/types.d.ts +34 -0
- package/dist/src/Client/index.d.ts +4 -0
- package/dist/src/ElysiaPlugin/index.d.ts +12 -0
- package/dist/src/ElysiaPlugin/publicRoutes.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/captcha/index.d.ts +46 -0
- package/dist/src/ElysiaPlugin/routes/auth/emailVerification/index.d.ts +38 -0
- package/dist/src/ElysiaPlugin/routes/auth/index.d.ts +68 -0
- package/dist/src/ElysiaPlugin/routes/auth/invite/index.d.ts +43 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/index.d.ts +68 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/types.d.ts +22 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/utils.d.ts +19 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/types.d.ts +6 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/index.d.ts +41 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/types.d.ts +23 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/utils.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/auth/me/index.d.ts +40 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/types.d.ts +12 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/index.d.ts +36 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/types.d.ts +16 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/utils.d.ts +3 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordSet/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordSet/types.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/index.d.ts +39 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/types.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/index.d.ts +47 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/types.d.ts +18 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/utils.d.ts +8 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/types.d.ts +67 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/utils.d.ts +36 -0
- package/dist/src/ElysiaPlugin/routes/auth/types.d.ts +153 -0
- package/dist/src/ElysiaPlugin/routes/entity/index.d.ts +5 -0
- package/dist/src/ElysiaPlugin/routes/entity/types.d.ts +50 -0
- package/dist/src/ElysiaPlugin/routes/entity/utils.d.ts +11 -0
- package/dist/src/ElysiaPlugin/routes/index.d.ts +5 -0
- package/dist/src/ElysiaPlugin/routes/monitoring/index.d.ts +58 -0
- package/dist/src/ElysiaPlugin/routes/storage/cdn.d.ts +51 -0
- package/dist/src/ElysiaPlugin/routes/storage/helpers.d.ts +53 -0
- package/dist/src/ElysiaPlugin/routes/storage/index.d.ts +3 -0
- package/dist/src/ElysiaPlugin/routes/verification/index.d.ts +39 -0
- package/dist/src/ElysiaPlugin/swagger.d.ts +28 -0
- package/dist/src/ElysiaPlugin/utils.d.ts +70 -0
- package/dist/src/Managers/Dapr/clients/binding-client.d.ts +15 -0
- package/dist/src/Managers/Dapr/clients/config-client.d.ts +27 -0
- package/dist/src/Managers/Dapr/clients/crypto-client.d.ts +27 -0
- package/dist/src/Managers/Dapr/clients/invoke-client.d.ts +32 -0
- package/dist/src/Managers/Dapr/clients/lock-client.d.ts +23 -0
- package/dist/src/Managers/Dapr/clients/pubsub-client.d.ts +23 -0
- package/dist/src/Managers/Dapr/clients/secret-client.d.ts +19 -0
- package/dist/src/Managers/Dapr/clients/state-client.d.ts +55 -0
- package/dist/src/Managers/Dapr/clients/workflow-client.d.ts +39 -0
- package/dist/src/Managers/Dapr/connection-manager.d.ts +51 -0
- package/dist/src/Managers/Dapr/constants.d.ts +49 -0
- package/dist/src/Managers/Dapr/dapr-manager.d.ts +160 -0
- package/dist/src/Managers/Dapr/error-handling.d.ts +29 -0
- package/dist/src/Managers/Dapr/index.d.ts +102 -0
- package/dist/src/Managers/Dapr/types.d.ts +121 -0
- package/dist/src/Managers/Dapr/utils.d.ts +44 -0
- package/dist/src/Managers/File/atomic.d.ts +64 -0
- package/dist/src/Managers/File/core.d.ts +188 -0
- package/dist/src/Managers/File/index.d.ts +18 -0
- package/dist/src/Managers/File/permissions.d.ts +72 -0
- package/dist/src/Managers/File/streaming.d.ts +30 -0
- package/dist/src/Managers/File/types.d.ts +146 -0
- package/dist/src/Managers/File/utils.d.ts +112 -0
- package/dist/src/Managers/Postgre/index.d.ts +25 -0
- package/dist/src/Managers/Redis/index.d.ts +33 -0
- package/dist/src/Managers/index.d.ts +5 -0
- package/dist/src/Services/Auth/Fingerprint/Generate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Fingerprint/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Fingerprint/index.d.ts +5 -0
- package/dist/src/Services/Auth/Fingerprint/types.d.ts +20 -0
- package/dist/src/Services/Auth/Fingerprint/utils.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Decode/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Sign/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Verify/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/index.d.ts +5 -0
- package/dist/src/Services/Auth/JWT/types.d.ts +38 -0
- package/dist/src/Services/Auth/JWT/utils.d.ts +10 -0
- package/dist/src/Services/Auth/Password/Generate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Password/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Password/index.d.ts +2 -0
- package/dist/src/Services/Auth/Password/types.d.ts +16 -0
- package/dist/src/Services/Auth/RefreshToken/Delete/index.d.ts +3 -0
- package/dist/src/Services/Auth/RefreshToken/Generate/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/Read/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/Validate/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/index.d.ts +5 -0
- package/dist/src/Services/Auth/RefreshToken/types.d.ts +27 -0
- package/dist/src/Services/Auth/RefreshToken/utils.d.ts +6 -0
- package/dist/src/Services/Auth/Session/Issue/index.d.ts +9 -0
- package/dist/src/Services/Auth/Session/index.d.ts +2 -0
- package/dist/src/Services/Auth/Session/types.d.ts +13 -0
- package/dist/src/Services/Auth/SessionStore/Delete/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/Generate/index.d.ts +11 -0
- package/dist/src/Services/Auth/SessionStore/Read/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/Update/index.d.ts +24 -0
- package/dist/src/Services/Auth/SessionStore/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/index.d.ts +7 -0
- package/dist/src/Services/Auth/SessionStore/types.d.ts +59 -0
- package/dist/src/Services/Auth/SessionStore/utils.d.ts +6 -0
- package/dist/src/Services/Auth/index.d.ts +7 -0
- package/dist/src/Services/Authorization/ClaimSeeder/index.d.ts +6 -0
- package/dist/src/Services/Authorization/GodminSetup/index.d.ts +10 -0
- package/dist/src/Services/Authorization/Middleware/index.d.ts +21 -0
- package/dist/src/Services/Authorization/index.d.ts +5 -0
- package/dist/src/Services/Authorization/types.d.ts +68 -0
- package/dist/src/Services/Captcha/index.d.ts +15 -0
- package/dist/src/Services/Captcha/types.d.ts +69 -0
- package/dist/src/Services/Gmail/index.d.ts +62 -0
- package/dist/src/Services/Logger/Logger.d.ts +77 -0
- package/dist/src/Services/Logger/index.d.ts +5 -0
- package/dist/src/Services/Logger/transports.d.ts +54 -0
- package/dist/src/Services/Logger/types.d.ts +88 -0
- package/dist/src/Services/Logger/utils.d.ts +8 -0
- package/dist/src/Services/Monitoring/AlertService.d.ts +29 -0
- package/dist/src/Services/Monitoring/collectors/ApplicationCollector.d.ts +30 -0
- package/dist/src/Services/Monitoring/collectors/SystemCollector.d.ts +13 -0
- package/dist/src/Services/Monitoring/collectors/index.d.ts +3 -0
- package/dist/src/Services/Monitoring/index.d.ts +109 -0
- package/dist/src/Services/Monitoring/types.d.ts +163 -0
- package/dist/src/Services/Notification/index.d.ts +31 -0
- package/dist/src/Services/Notification/types.d.ts +59 -0
- package/dist/src/Services/RateLimiter/index.d.ts +99 -0
- package/dist/src/Services/Verification/index.d.ts +23 -0
- package/dist/src/Services/Verification/types.d.ts +135 -0
- package/dist/src/Services/index.d.ts +10 -0
- package/dist/src/types.d.ts +588 -0
- package/package.json +99 -0
- package/public/components/CTA.tsx +25 -0
- package/public/components/Capabilities.tsx +69 -0
- package/public/components/Features.tsx +107 -0
- package/public/components/Footer.tsx +60 -0
- package/public/components/Hero.tsx +53 -0
- package/public/components/Managers.tsx +60 -0
- package/public/components/Nav.tsx +107 -0
- package/public/components/Stack.tsx +36 -0
- package/public/components/docs/Docs.tsx +62 -0
- package/public/components/docs/DocsContent.tsx +203 -0
- package/public/components/docs/DocsRightSidebar.tsx +53 -0
- package/public/components/docs/DocsSidebar.tsx +62 -0
- package/public/components/docs/content/authentication.ts +1670 -0
- package/public/components/docs/content/gettingStarted.ts +627 -0
- package/public/components/docs/docsData.ts +36 -0
- package/public/components/docs/index.ts +6 -0
- package/public/components/index.ts +9 -0
- package/public/docs.css +633 -0
- package/public/index.html +81 -0
- package/public/index.tsx +52 -0
- package/public/store.ts +79 -0
- package/public/styles.css +877 -0
- package/schemas/bckp/config.nucleus.json +1488 -0
- package/schemas/bckp/nucleus.tables.schema.json +24 -0
- package/schemas/bckp/table.schema.json +472 -0
- package/schemas/config.nucleus.json +1010 -0
- package/schemas/nucleus.tables.schema.json +19 -0
- package/schemas/table.schema.json +498 -0
- package/scripts/build.ts +197 -0
- package/scripts/generate-schema.ts +556 -0
- package/scripts/generate-system-tables-types.ts +18 -0
- package/scripts/generate-types-schema.ts +962 -0
- package/scripts/publish.ts +210 -0
- package/scripts/version.ts +125 -0
- package/src/system.tables.json +1590 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createHttpProxyHandler } from "./httpProxy";
|
|
2
|
+
export { createProxyServer, defaultProxyConfig, } from "./server";
|
|
3
|
+
export type { HttpProxyConfig, HttpProxyTarget, ParsedCookies, ProxyLogger, ProxyServerConfig, WsProxyConfig, WsProxyState, WsProxyTarget, } from "./types";
|
|
4
|
+
export { addQueryParam, createProxyLogger, globToRegex, httpToWs, loadEnvFile, matchPath, parseCookies, rewritePath, sanitizeForLog, wsToHttp, } from "./utils";
|
|
5
|
+
export { createWsProxyHandler, startWsProxyServer, } from "./wsProxy";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x265c26=_0x3025;(function(_0x2421a3,_0xb3e1cb){const _0xb13377=_0x3025,_0x5ab7d3=_0x2421a3();while(!![]){try{const _0x3e3148=-parseInt(_0xb13377(0x138))/0x1+parseInt(_0xb13377(0x13e))/0x2+-parseInt(_0xb13377(0x169))/0x3*(-parseInt(_0xb13377(0x189))/0x4)+-parseInt(_0xb13377(0x156))/0x5*(-parseInt(_0xb13377(0x190))/0x6)+-parseInt(_0xb13377(0x162))/0x7*(-parseInt(_0xb13377(0x170))/0x8)+parseInt(_0xb13377(0x17e))/0x9*(-parseInt(_0xb13377(0x12a))/0xa)+parseInt(_0xb13377(0x151))/0xb;if(_0x3e3148===_0xb3e1cb)break;else _0x5ab7d3['push'](_0x5ab7d3['shift']());}catch(_0x49f0fa){_0x5ab7d3['push'](_0x5ab7d3['shift']());}}}(_0x16a8,0x4f892));import'../../../index-0yyw12k6.js';function h(_0x2f8612){const _0x270a59=_0x3025;let _0x4e5404={};if(!_0x2f8612)return _0x4e5404;for(let _0x2f4d31 of _0x2f8612[_0x270a59(0x179)](';')){let [_0x3ac9dd,..._0xb38dd8]=_0x2f4d31[_0x270a59(0x163)]()['split']('=');if(_0x3ac9dd&&_0xb38dd8[_0x270a59(0x159)]>0x0)_0x4e5404[_0x3ac9dd]=decodeURIComponent(_0xb38dd8[_0x270a59(0x140)]('='));}return _0x4e5404;}function b(_0x319e2){const _0x3f5b03=_0x3025,_0x5591b6={};_0x5591b6[_0x3f5b03(0x153)]='\x5c$&';const _0x18d4cf=_0x5591b6;let _0x4e9d28=_0x319e2[_0x3f5b03(0x173)](/:[\w]+\*/g,'*');return _0x4e9d28=_0x4e9d28[_0x3f5b03(0x173)](/[.+?^${}()|[\]\\]/g,_0x18d4cf[_0x3f5b03(0x153)]),_0x4e9d28=_0x4e9d28[_0x3f5b03(0x173)](/\*/g,'.*'),new RegExp('^'+_0x4e9d28+'$');}function x(_0x53eee7,_0x4a8fac){const _0xaf32c5=_0x3025;for(let _0x7435b2 of _0x4a8fac)if(b(_0x7435b2)[_0xaf32c5(0x139)](_0x53eee7))return!0x0;return!0x1;}function P(_0x754b8c,_0x3710db){const _0x107bb7=_0x3025,_0x210fa6={'rvSpP':function(_0x18bc37,_0x5cc573){return _0x18bc37(_0x5cc573);}};for(let [_0x3eab5b,_0x359556]of Object['entries'](_0x3710db))if(_0x210fa6[_0x107bb7(0x14e)](b,_0x3eab5b)[_0x107bb7(0x139)](_0x754b8c)){let _0x3ef9f7=_0x3eab5b[_0x107bb7(0x173)](/\*.*$/,''),_0xf74e6b=_0x359556['replace'](/\*.*$/,'');return _0x754b8c[_0x107bb7(0x173)](_0x3ef9f7,_0xf74e6b);}return _0x754b8c;}function $(_0x1034ba,_0x4e30a0,_0x3c5e6a){const _0x109c13=_0x3025,_0x573fbb={'KYsru':function(_0x2288c0,_0xe366ed){return _0x2288c0(_0xe366ed);}};let _0x2292ec=_0x1034ba[_0x109c13(0x115)]('?')?'&':'?';return''+_0x1034ba+_0x2292ec+_0x573fbb['KYsru'](encodeURIComponent,_0x4e30a0)+'='+encodeURIComponent(_0x3c5e6a);}function S(_0x54f9e5){const _0x26accb=_0x3025;return _0x54f9e5[_0x26accb(0x173)](/^http/,'ws');}function C(_0x4a1b29){const _0x6e8d54=_0x3025,_0x401f87={};_0x401f87[_0x6e8d54(0x11e)]='http';const _0x1f2b94=_0x401f87;return _0x4a1b29[_0x6e8d54(0x173)](/^ws/,_0x1f2b94['TJCGz']);}function _0x3025(_0x801fbd,_0x2bba57){_0x801fbd=_0x801fbd-0x113;const _0x16a83e=_0x16a8();let _0x30251f=_0x16a83e[_0x801fbd];if(_0x3025['zFVXFP']===undefined){var _0x5a82b4=function(_0x2ca2dc){const _0x592d65='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3cb9b5='',_0x48d68e='';for(let _0x2bda79=0x0,_0x46a219,_0x5b31c0,_0x47a8fe=0x0;_0x5b31c0=_0x2ca2dc['charAt'](_0x47a8fe++);~_0x5b31c0&&(_0x46a219=_0x2bda79%0x4?_0x46a219*0x40+_0x5b31c0:_0x5b31c0,_0x2bda79++%0x4)?_0x3cb9b5+=String['fromCharCode'](0xff&_0x46a219>>(-0x2*_0x2bda79&0x6)):0x0){_0x5b31c0=_0x592d65['indexOf'](_0x5b31c0);}for(let _0xcfe02e=0x0,_0x91a86e=_0x3cb9b5['length'];_0xcfe02e<_0x91a86e;_0xcfe02e++){_0x48d68e+='%'+('00'+_0x3cb9b5['charCodeAt'](_0xcfe02e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x48d68e);};_0x3025['egNYnx']=_0x5a82b4,_0x3025['SffPRo']={},_0x3025['zFVXFP']=!![];}const _0x1d8104=_0x16a83e[0x0],_0x261bed=_0x801fbd+_0x1d8104,_0x4d319a=_0x3025['SffPRo'][_0x261bed];return!_0x4d319a?(_0x30251f=_0x3025['egNYnx'](_0x30251f),_0x3025['SffPRo'][_0x261bed]=_0x30251f):_0x30251f=_0x4d319a,_0x30251f;}function y(_0x135b0,_0x4245ca){return{'info':(..._0x5460b9)=>{if(_0x4245ca)console['log']('['+_0x135b0+']',..._0x5460b9);},'warn':(..._0x3239af)=>{const _0x108521=_0x3025;console[_0x108521(0x118)]('['+_0x135b0+']',..._0x3239af);},'error':(..._0x1eef6b)=>{const _0x58ee3d=_0x3025;console[_0x58ee3d(0x145)]('['+_0x135b0+']',..._0x1eef6b);}};}async function W(_0x18d80a){const _0xade38e=_0x3025;try{let _0x42c7c=Bun[_0xade38e(0x158)](_0x18d80a);if(!await _0x42c7c[_0xade38e(0x11c)]())return;let _0x4f1f82=await _0x42c7c[_0xade38e(0x11d)]();for(let _0x114393 of _0x4f1f82['split']('\x0a')){let _0x2f7777=_0x114393[_0xade38e(0x163)]();if(_0x2f7777&&!_0x2f7777[_0xade38e(0x11b)]('#')){let [_0x50532e,..._0x179fa2]=_0x2f7777['split']('='),_0x428566=_0x179fa2[_0xade38e(0x140)]('=')['replace'](/^["']|["']$/g,'');if(_0x50532e&&!process[_0xade38e(0x18b)][_0x50532e])process['env'][_0x50532e]=_0x428566;}}}catch{}}function v(_0x2dbd81,_0x537f16=0x32){const _0x1914a7=_0x3025,_0x204f0c={};_0x204f0c['fvQtu']=function(_0x468899,_0x3bb2e9){return _0x468899<=_0x3bb2e9;};const _0x5327d0=_0x204f0c;if(_0x5327d0['fvQtu'](_0x2dbd81['length'],_0x537f16))return _0x2dbd81;return _0x2dbd81[_0x1914a7(0x120)](0x0,_0x537f16)+_0x1914a7(0x17a);}function T(_0x551b63){const _0x44ef85=_0x3025,_0x379af0={'knxLL':function(_0xe89f0d,_0x150a33,_0x40780a){return _0xe89f0d(_0x150a33,_0x40780a);},'IiaMJ':function(_0x4684c3,_0x393fd3,_0x355954){return _0x4684c3(_0x393fd3,_0x355954);},'SNcCb':function(_0x13bc4a,_0x2db5ca){return _0x13bc4a!==_0x2db5ca;},'acoNW':'host','Gpbrg':'authorization','QgeJf':function(_0x5608e9,_0xb6cc48,_0x1fc1ae){return _0x5608e9(_0xb6cc48,_0x1fc1ae);},'TrBCk':function(_0x16233e,_0x264c11){return _0x16233e===_0x264c11;},'KuhBn':_0x44ef85(0x166),'DaZej':function(_0x26d30d,_0x16d078){return _0x26d30d(_0x16d078);},'jDGSo':'content-encoding','yblnv':_0x44ef85(0x127),'PkVRo':function(_0x1753f4,_0x56d89e){return _0x1753f4(_0x56d89e);},'oFBiI':function(_0x41a47b,_0x4873f1){return _0x41a47b(_0x4873f1);},'zHXhA':function(_0x55ba4d,_0x3d2f49){return _0x55ba4d===_0x3d2f49;},'Cldoa':'application/json','ZTCUe':function(_0x4897b0,_0x21e402,_0x35973d){return _0x4897b0(_0x21e402,_0x35973d);},'RFrzj':'HTTP\x20Proxy'};let _0x1a63d5=_0x379af0['ZTCUe'](y,_0x379af0[_0x44ef85(0x142)],_0x551b63[_0x44ef85(0x130)]??!0x1);function _0x2ec123(_0x3ba1de){const _0x1a9b4f=_0x44ef85;for(let _0x3a6685 of _0x551b63[_0x1a9b4f(0x12d)])if(_0x379af0[_0x1a9b4f(0x14f)](x,_0x3ba1de,_0x3a6685['paths']))return _0x3a6685;return null;}function _0x5b0db3(_0x13144c,_0x5dc2fd){const _0x23e27b=_0x44ef85;let _0x20f50e=_0x5dc2fd[_0x23e27b(0x15c)][_0x23e27b(0x173)](/\/$/,''),_0x22014c=_0x13144c;if(_0x5dc2fd[_0x23e27b(0x117)])_0x22014c=_0x379af0['IiaMJ'](P,_0x13144c,_0x5dc2fd['pathRewrite']);return''+_0x20f50e+_0x22014c;}return{async 'handle'(_0x4d28d7){const _0x4c7332=_0x44ef85;let _0x78b1d0=new URL(_0x4d28d7['url']),_0x2db8e6=_0x78b1d0['pathname'],_0x3e0708=_0x2ec123(_0x2db8e6);if(!_0x3e0708)return null;let _0x2dee5a=performance['now'](),_0x7e9273=_0x379af0[_0x4c7332(0x14f)](_0x5b0db3,_0x2db8e6,_0x3e0708),_0x1d50f6=_0x78b1d0[_0x4c7332(0x12c)]?''+_0x7e9273+_0x78b1d0[_0x4c7332(0x12c)]:_0x7e9273;_0x1a63d5['info']('Proxying:\x20'+_0x4d28d7[_0x4c7332(0x16b)]+'\x20'+_0x2db8e6+'\x20->\x20'+_0x1d50f6),_0x551b63['onRequest']?.(_0x2db8e6,_0x1d50f6);let _0x59a071=new Headers(_0x4d28d7[_0x4c7332(0x176)]);if(_0x379af0[_0x4c7332(0x146)](_0x3e0708['changeOrigin'],!0x1)){let _0x234e62=new URL(_0x3e0708['url']);_0x59a071['set'](_0x379af0['acoNW'],_0x234e62['host']),_0x59a071[_0x4c7332(0x165)](_0x4c7332(0x14d),_0x234e62['origin']);}if(_0x3e0708[_0x4c7332(0x172)]){let _0x121dc6=h(_0x4d28d7[_0x4c7332(0x176)]['get'](_0x4c7332(0x17d)))[_0x3e0708['injectTokenFromCookie'][_0x4c7332(0x131)]];if(_0x121dc6){let _0x56ec0d=_0x3e0708[_0x4c7332(0x172)]['headerName']??_0x379af0['Gpbrg'];_0x59a071['set'](_0x56ec0d,'Bearer\x20'+_0x121dc6),_0x1a63d5['info']('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x56ec0d);}}if(_0x3e0708[_0x4c7332(0x176)]){for(let [_0x4b8d08,_0x5d55f9]of Object[_0x4c7332(0x186)](_0x3e0708['headers']))_0x59a071['set'](_0x4b8d08,_0x5d55f9);}_0x59a071['delete'](_0x379af0[_0x4c7332(0x171)]);try{let _0x5a5562=new AbortController(),_0x50fc4e=_0x3e0708['timeout']??0x7530,_0x44ecee=setTimeout(()=>{const _0x37c8d1=_0x4c7332;_0x5a5562[_0x37c8d1(0x13b)]();},_0x50fc4e),_0x5d7e70=await _0x379af0['QgeJf'](fetch,_0x1d50f6,{'method':_0x4d28d7['method'],'headers':_0x59a071,'body':_0x4d28d7['body'],'signal':_0x5a5562['signal'],'redirect':_0x379af0['TrBCk'](_0x3e0708['followRedirects'],!0x1)?_0x379af0['KuhBn']:'follow'});_0x379af0[_0x4c7332(0x13f)](clearTimeout,_0x44ecee);let _0x475d56=performance[_0x4c7332(0x17b)]()-_0x2dee5a;_0x1a63d5['info']('Response:\x20'+_0x5d7e70['status']+'\x20('+_0x475d56[_0x4c7332(0x122)](0x0)+'ms)'),_0x551b63['onResponse']?.(_0x2db8e6,_0x5d7e70['status'],_0x475d56);let _0x34002d=new Headers(_0x5d7e70[_0x4c7332(0x176)]);return _0x34002d[_0x4c7332(0x187)](_0x379af0[_0x4c7332(0x14c)]),_0x34002d['delete'](_0x379af0[_0x4c7332(0x15b)]),new Response(_0x5d7e70['body'],{'status':_0x5d7e70['status'],'statusText':_0x5d7e70[_0x4c7332(0x133)],'headers':_0x34002d});}catch(_0x12b876){let _0x24db0f=performance['now']()-_0x2dee5a,_0xd3df52=_0x12b876 instanceof Error?_0x12b876:_0x379af0[_0x4c7332(0x188)](Error,_0x379af0[_0x4c7332(0x14a)](String,_0x12b876));const _0x1d7b4a={};_0x1d7b4a[_0x4c7332(0x145)]='Gateway\x20Timeout',_0x1d7b4a['message']=_0x4c7332(0x174);const _0x235d0b={};_0x235d0b['Content-Type']=_0x4c7332(0x143);const _0x1ba83d={};_0x1ba83d[_0x4c7332(0x121)]=0x1f8,_0x1ba83d['headers']=_0x235d0b;if(_0x379af0['zHXhA'](_0xd3df52[_0x4c7332(0x16f)],_0x4c7332(0x155)))return _0x1a63d5[_0x4c7332(0x145)](_0x4c7332(0x147)+_0x24db0f['toFixed'](0x0)+_0x4c7332(0x128)+_0x2db8e6),_0x551b63[_0x4c7332(0x154)]?.(Error(_0x4c7332(0x168)),_0x2db8e6,0x1f8),new Response(JSON['stringify'](_0x1d7b4a),_0x1ba83d);const _0x50a5c4={};_0x50a5c4['Content-Type']=_0x379af0['Cldoa'];const _0x263de0={};return _0x263de0[_0x4c7332(0x121)]=0x1f6,_0x263de0[_0x4c7332(0x176)]=_0x50a5c4,(_0x1a63d5['error']('Error:\x20'+_0x2db8e6,_0xd3df52['message']),_0x551b63['onError']?.(_0xd3df52,_0x2db8e6,0x1f6),new Response(JSON[_0x4c7332(0x123)]({'error':_0x4c7332(0x157),'message':_0xd3df52[_0x4c7332(0x167)]}),_0x263de0));}}};}function _0x16a8(){const _0x5e1eed=['qMfJA2vUzcbxzwjtB2nRzxqGzxjYB3i','zw50CMLLCW','zgvSzxrL','ugTwuM8','mtiXmJG2mg5Jy1HjBW','v1mGuhjVEhK','zw52','yxjYyxLcDwzMzxi','CxvLCNLqyxjHBq','rxHZAxq','tM90iezVDw5K','mJi1nty3nNHgBgPnDW','Dg9tDhjPBMC','ufDMDM0','Ahr0Ca','BeDYywm','Aw5JBhvKzxm','w1DtifbYB3H5xsbtDgfYDgvKig9Uia','Cgf0AfjLD3jPDgu','D2fYBG','DgfYz2v0','ELzKDNC','C3rHCNrZv2L0Aa','zxHPC3rZ','Dgv4Da','vePdr3O','B25LCNjVCG','C2XPy2u','C3rHDhvZ','Dg9gAxHLza','C3rYAw5NAwz5','B25pCgvU','B25VCgvU','zeLTyKy','DhjHBNnMzxiTzw5JB2rPBMC','Bxm6ia','u3rHCNrPBMCGChjVEhKGC2vYDMvYlI4U','mZbdvwPQCKe','q3bOCxG','C2vHCMnO','DgfYz2v0CW','mc4WlJaUma','vLf3Ag0','zgvIDwC','y29VA2LLtMfTzq','qMfJA2vUzcbLCNjVCJOG','C3rHDhvZvgv4Da','C2vYDMu','Aw5MBW','Cgf0Aa','DKHrC0W','mJmXnJm3C3PbyNHQ','DgvZDa','ug5Pwxq','ywjVCNq','icaTieHuvfaGDgfYz2v0CZOG','q29UDgvUDc1uExbL','mta2mtq4s1Hyrgn1','rgfAzwO','AM9PBG','rxD3CMC','uKzYEMO','yxbWBgLJyxrPB24VANnVBG','CMvHzhLtDgf0zq','zxjYB3i','u05Jq2i','vgLTzw91DcbHzNrLCIa','Bg9N','Cgf0Ahm','B0zcAuK','ChHuDhG','AKrhu28','B3jPz2LU','CNztCfa','A254teW','DxbNCMfKzq','mtm2ndy5m1fZBw5ttW','icaTigHVC3rUyw1LoIa','Bvjntu8','B25fCNjVCG','qwjVCNrfCNjVCG','nwzMAwn4qW','qMfKieDHDgv3yxK','zMLSzq','BgvUz3rO','ELnqBKO','EwjSBNy','DxjS','CMvQzwn0vw5RBM93BG','DgHLBG','yNvMzMvY','icaTifDLyLnVy2TLDcb0yxjNzxrZoIa','ywXSB3DiBxi','mJq1mZCZmuvZAhn2CW','DhjPBq','Ag9ZDg5HBwu','C2v0','BwfUDwfS','BwvZC2fNzq','uMvXDwvZDcb0Aw1LB3v0','m1bssNnzAW','tNrNEuO','Bwv0Ag9K','icaTihbVCNq6ia','B3bLBG','tNLHBhK','BMfTzq','ogjxDxPQsq','ywnVtLC','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','CMvWBgfJzq','qMfJA2vUzcbYzxf1zxn0ihrPBwvKig91Da','B25JBg9Zzq','AgvHzgvYCW','Cg9YDa','C2vUza','C3bSAxq','lI4U','BM93','tM8GDgfYz2v0igzVDw5KigzVCJOG','y29VA2LL','mtK0odi0ogj0tLvWsW','B25szwfKEq','zgf0yq','y2XVC2u','D2vIC29JA2v0','yMfJA2vUzfDZ','ChvZAa'];_0x16a8=function(){return _0x5e1eed;};return _0x16a8();}function k(_0x456b12){const _0x573d22=_0x3025,_0x46233c={'Nyaly':function(_0x257f9a,_0x1537bf,_0x3b3122){return _0x257f9a(_0x1537bf,_0x3b3122);},'SWTka':'http','AeEEq':function(_0x469dab,_0x23502e){return _0x469dab(_0x23502e);},'PWfvm':function(_0x1e7fdd,_0x5c92c9,_0x360b47){return _0x1e7fdd(_0x5c92c9,_0x360b47);},'HmCbR':'token','VXsuh':function(_0x40fd31,_0x3d47e1,_0x3f018e,_0xee5c46){return _0x40fd31(_0x3d47e1,_0x3f018e,_0xee5c46);},'Ewwrg':'Token\x20injected\x20from\x20cookie','DQznW':function(_0x2a3a10,_0xf53b56){return _0x2a3a10!==_0xf53b56;},'Cphqx':'/_next/webpack-hmr','ygeRf':function(_0xc1ad68,_0x50b00d){return _0xc1ad68!==_0x50b00d;},'NHueT':'WebSocket\x20path\x20not\x20found','yPzKD':'cookie','ocaUV':function(_0x10a78a,_0x577a49,_0x2aca7a,_0x407f06,_0x51dafb){return _0x10a78a(_0x577a49,_0x2aca7a,_0x407f06,_0x51dafb);},'yKqky':_0x573d22(0x185),'LgIay':function(_0x3e1f07,_0x327422){return _0x3e1f07===_0x327422;},'aloWr':'string'};let _0x21fa77=y(_0x573d22(0x18a),_0x456b12[_0x573d22(0x130)]??!0x1);function _0x254072(_0x3332d7){const _0x43afae=_0x573d22;for(let _0x8cf1a of _0x456b12['targets'])if(_0x46233c[_0x43afae(0x16e)](x,_0x3332d7,_0x8cf1a[_0x43afae(0x149)]))return _0x8cf1a;return null;}function _0x241cff(_0xe324a,_0x3b983a,_0x41a85d,_0x44ac19){const _0x6c458b=_0x573d22;let _0x6d94d3=_0x3b983a['url'][_0x6c458b(0x173)](/\/$/,'');if(_0x6d94d3[_0x6c458b(0x11b)](_0x46233c['SWTka']))_0x6d94d3=_0x46233c['AeEEq'](S,_0x6d94d3);let _0x14f227=_0xe324a;if(_0x3b983a[_0x6c458b(0x117)])_0x14f227=_0x46233c[_0x6c458b(0x192)](P,_0xe324a,_0x3b983a[_0x6c458b(0x117)]);let _0x1056f1=''+_0x6d94d3+_0x14f227,_0x1be8f5=_0x44ac19[_0x6c458b(0x191)]();if(_0x1be8f5)_0x1056f1=_0x1056f1+'?'+_0x1be8f5;if(_0x3b983a[_0x6c458b(0x172)]){let _0x221310=_0x41a85d[_0x3b983a['injectTokenFromCookie']['cookieName']];if(_0x221310){let _0x5996a8=_0x3b983a[_0x6c458b(0x172)][_0x6c458b(0x18d)]??_0x46233c['HmCbR'];_0x1056f1=_0x46233c['VXsuh']($,_0x1056f1,_0x5996a8,_0x221310),_0x21fa77['info'](_0x46233c[_0x6c458b(0x141)]);}}return _0x1056f1;}return{'upgrade'(_0x3b3100,_0x1005c3){const _0x1bcc93=_0x573d22;let _0x58ecf1=new URL(_0x3b3100['url']),_0x1ec179=_0x58ecf1['pathname'];if(_0x46233c['DQznW'](_0x456b12[_0x1bcc93(0x161)],!0x1)&&_0x1ec179[_0x1bcc93(0x11b)](_0x46233c[_0x1bcc93(0x12b)]))return _0x21fa77['info']('HMR\x20bypass:\x20'+_0x1ec179),!0x1;let _0x596203=_0x254072(_0x1ec179);if(!_0x596203){const _0x3aeb6d={};_0x3aeb6d['status']=0x194;if(_0x46233c['ygeRf'](_0x456b12[_0x1bcc93(0x15d)],!0x1))return _0x21fa77[_0x1bcc93(0x118)](_0x1bcc93(0x17c)+_0x1ec179),new Response(_0x46233c['NHueT'],_0x3aeb6d);return!0x1;}let _0x45d242=h(_0x3b3100[_0x1bcc93(0x176)]['get'](_0x46233c['yPzKD'])),_0x51b21a=_0x46233c['ocaUV'](_0x241cff,_0x1ec179,_0x596203,_0x45d242,_0x58ecf1['searchParams']);return _0x21fa77[_0x1bcc93(0x135)]('Upgrading:\x20'+_0x1ec179+'\x20->\x20'+_0x51b21a),_0x1005c3['upgrade'](_0x3b3100,{'data':{'backendWs':null,'path':_0x1ec179,'target':_0x51b21a,'buffer':[]}});},'websocket':{'open'(_0x3c7455){const _0x496739=_0x573d22,_0x1884a5={'dLxGC':function(_0x1e854f,_0x3fc5da){return _0x1e854f instanceof _0x3fc5da;},'VQwhm':function(_0x2b7e08,_0x24f797){return _0x46233c['AeEEq'](_0x2b7e08,_0x24f797);},'zVdvw':_0x46233c['yKqky']};let _0xcdb03f=_0x3c7455[_0x496739(0x180)],_0x547eb8=new WebSocket(_0xcdb03f[_0x496739(0x119)]);_0x547eb8[_0x496739(0x125)]=()=>{const _0x5dafaf=_0x496739;_0x21fa77[_0x5dafaf(0x135)]('Backend\x20connected:\x20'+_0xcdb03f[_0x5dafaf(0x136)]),_0x456b12[_0x5dafaf(0x124)]?.(_0xcdb03f[_0x5dafaf(0x136)],_0xcdb03f['target']);for(let _0x384fe2 of _0xcdb03f['buffer'])_0x547eb8[_0x5dafaf(0x178)](_0x384fe2);_0xcdb03f['buffer']=[];},_0x547eb8['onmessage']=_0x54c7c6=>{const _0x431f06=_0x496739;if(typeof _0x54c7c6[_0x431f06(0x180)]==='string')_0x3c7455[_0x431f06(0x178)](_0x54c7c6[_0x431f06(0x180)]);else{if(_0x54c7c6[_0x431f06(0x180)]instanceof ArrayBuffer)_0x3c7455['send'](new Uint8Array(_0x54c7c6['data']));else{if(_0x1884a5['dLxGC'](_0x54c7c6[_0x431f06(0x180)],Blob))_0x54c7c6[_0x431f06(0x180)][_0x431f06(0x18c)]()[_0x431f06(0x15e)](_0x520c78=>{const _0x18699b=_0x431f06;_0x3c7455[_0x18699b(0x178)](new Uint8Array(_0x520c78));});}}},_0x547eb8[_0x496739(0x11f)]=_0x431ef2=>{const _0x18de0e=_0x496739;let _0x303a43=_0x1884a5[_0x18de0e(0x12f)](Error,_0x1884a5[_0x18de0e(0x11a)]);_0x21fa77['error'](_0x18de0e(0x132)+_0xcdb03f[_0x18de0e(0x136)],_0x431ef2),_0x456b12[_0x18de0e(0x154)]?.(_0x303a43,_0xcdb03f['path']);},_0x547eb8[_0x496739(0x175)]=()=>{const _0x15c42a=_0x496739;_0x21fa77['info']('Backend\x20closed:\x20'+_0xcdb03f[_0x15c42a(0x136)]),_0x456b12['onClose']?.(_0xcdb03f['path']),_0x3c7455['close']();},_0xcdb03f[_0x496739(0x183)]=_0x547eb8;},'message'(_0x4659ba,_0x4a2cfd){const _0x274b8a=_0x573d22;let _0x30eca0=_0x4659ba[_0x274b8a(0x180)];if(_0x46233c['LgIay'](_0x30eca0['backendWs']?.[_0x274b8a(0x144)],WebSocket['OPEN']))_0x30eca0['backendWs']['send'](_0x4a2cfd);else{if(typeof _0x4a2cfd===_0x46233c['aloWr'])_0x30eca0[_0x274b8a(0x15f)]['push'](_0x4a2cfd);else{let _0x2d2ba0=new ArrayBuffer(_0x4a2cfd['byteLength']);new Uint8Array(_0x2d2ba0)[_0x274b8a(0x165)](new Uint8Array(_0x4a2cfd)),_0x30eca0['buffer'][_0x274b8a(0x184)](_0x2d2ba0);}}},'close'(_0x1ac2b1){const _0x3b0e15=_0x573d22;let _0x1934ee=_0x1ac2b1[_0x3b0e15(0x180)];if(_0x21fa77['info']('Client\x20closed:\x20'+_0x1934ee[_0x3b0e15(0x136)]),_0x1934ee[_0x3b0e15(0x183)])_0x1934ee['backendWs'][_0x3b0e15(0x181)]();},'drain'(_0x15a149){}}};}function H(_0x140679){const _0x535a06=_0x3025,_0x3651e9={'zSPnJ':function(_0x1c1a6e,_0x43cd41){return _0x1c1a6e===_0x43cd41;},'pxTtx':function(_0x2b915c,_0x50e8af){return _0x2b915c(_0x50e8af);},'PniYt':'0.0.0.0'};let _0x38d888=_0x3651e9[_0x535a06(0x14b)](k,_0x140679),_0x2ef8cc=_0x140679[_0x535a06(0x177)]??0xfa1,_0x4d9e8f=_0x140679['hostname']??_0x3651e9[_0x535a06(0x13a)],_0x1c1037=Bun[_0x535a06(0x134)]({'port':_0x2ef8cc,'hostname':_0x4d9e8f,'fetch'(_0xeefd39,_0x42d4f0){const _0x1493ef=_0x535a06;let _0x35c242=_0x38d888[_0x1493ef(0x150)](_0xeefd39,_0x42d4f0);if(_0x3651e9[_0x1493ef(0x15a)](_0x35c242,!0x0))return;if(_0x35c242 instanceof Response)return _0x35c242;const _0xd3d821={};return _0xd3d821['status']=0x190,new Response('Not\x20a\x20WebSocket\x20request',_0xd3d821);},'websocket':_0x38d888[_0x535a06(0x182)]});return console[_0x535a06(0x148)](_0x535a06(0x116)+_0x4d9e8f+':'+_0x2ef8cc),_0x1c1037;}async function U(_0x404b6d){const _0x3fe7fe=_0x3025,_0x4fcf2b={'vHQsL':function(_0x127fb9,_0x3ac578){return _0x127fb9===_0x3ac578;},'dImbF':function(_0x577eae,_0x4e20f1){return _0x577eae instanceof _0x4e20f1;},'TOEyB':'No\x20matching\x20proxy\x20target\x20for\x20this\x20request','wOeqa':_0x3fe7fe(0x12e),'mBdYE':function(_0x3ed075,_0x5f31bb,_0xe19428){return _0x3ed075(_0x5f31bb,_0xe19428);},'NtgyJ':'Proxy\x20Server','Exsit':function(_0x141390,_0x530070){return _0x141390(_0x530070);},'lGrac':_0x3fe7fe(0x129)};let _0x47afd8=_0x404b6d['port']??0xfa0,_0x4462a9=_0x404b6d['hostname']??_0x4fcf2b['wOeqa'],_0x38fb9e=_0x404b6d['dev']??!0x0,_0x39e91c=_0x4fcf2b['mBdYE'](y,_0x4fcf2b[_0x3fe7fe(0x16a)],_0x38fb9e);if(_0x404b6d['envPath'])await _0x4fcf2b['Exsit'](W,_0x404b6d['envPath']);_0x39e91c['info'](_0x4fcf2b[_0x3fe7fe(0x114)]),_0x39e91c['info'](_0x3fe7fe(0x152)+_0x4462a9),_0x39e91c['info'](_0x3fe7fe(0x16c)+_0x47afd8),_0x39e91c[_0x3fe7fe(0x135)]('\x20\x20-\x20dev:\x20'+_0x38fb9e);let _0x73cedc=_0x404b6d['ws']?k({..._0x404b6d['ws'],'debug':_0x404b6d['ws']['debug']??_0x38fb9e}):null,_0x5c85c1=_0x404b6d[_0x3fe7fe(0x113)]?_0x4fcf2b[_0x3fe7fe(0x18e)](T,{..._0x404b6d[_0x3fe7fe(0x113)],'debug':_0x404b6d[_0x3fe7fe(0x113)]['debug']??_0x38fb9e}):null;if(_0x73cedc&&_0x404b6d['ws']?.[_0x3fe7fe(0x12d)]){_0x39e91c[_0x3fe7fe(0x135)](_0x3fe7fe(0x160)+_0x404b6d['ws']['targets']['length']);for(let _0x372221 of _0x404b6d['ws']['targets'])_0x39e91c[_0x3fe7fe(0x135)]('\x20\x20\x20\x20-\x20'+_0x372221[_0x3fe7fe(0x15c)]+':\x20'+_0x372221[_0x3fe7fe(0x149)]['join'](',\x20'));}if(_0x5c85c1&&_0x404b6d[_0x3fe7fe(0x113)]?.[_0x3fe7fe(0x12d)]){_0x39e91c['info'](_0x3fe7fe(0x13c)+_0x404b6d['http']['targets'][_0x3fe7fe(0x159)]);for(let _0x4deadb of _0x404b6d['http'][_0x3fe7fe(0x12d)])_0x39e91c[_0x3fe7fe(0x135)]('\x20\x20\x20\x20-\x20'+_0x4deadb['url']+':\x20'+_0x4deadb['paths']['join'](',\x20'));}const _0x1ac7dc={};_0x1ac7dc[_0x3fe7fe(0x16d)]=function(){},_0x1ac7dc['message']=function(){},_0x1ac7dc['close']=function(){},_0x1ac7dc['drain']=function(){};let _0x552d34=Bun['serve']({'port':_0x47afd8,'hostname':_0x4462a9,async 'fetch'(_0x32304f,_0x4f327a){const _0x729aeb=_0x3fe7fe;if(_0x4fcf2b['vHQsL'](_0x32304f[_0x729aeb(0x176)]['get'](_0x729aeb(0x150))?.['toLowerCase'](),'websocket')){if(_0x73cedc){let _0x3d3a65=_0x73cedc[_0x729aeb(0x150)](_0x32304f,_0x4f327a);if(_0x4fcf2b[_0x729aeb(0x137)](_0x3d3a65,!0x0))return;if(_0x4fcf2b[_0x729aeb(0x126)](_0x3d3a65,Response))return _0x3d3a65;}}if(_0x5c85c1){let _0x6aa313=await _0x5c85c1['handle'](_0x32304f);if(_0x6aa313)return _0x6aa313;}const _0x11a941={};_0x11a941[_0x729aeb(0x145)]=_0x729aeb(0x18f),_0x11a941[_0x729aeb(0x167)]=_0x4fcf2b['TOEyB'];const _0x30594b={};_0x30594b[_0x729aeb(0x13d)]='application/json';const _0x2b853b={};return _0x2b853b[_0x729aeb(0x121)]=0x194,_0x2b853b[_0x729aeb(0x176)]=_0x30594b,new Response(JSON[_0x729aeb(0x123)](_0x11a941),_0x2b853b);},'websocket':_0x73cedc?.['websocket']??_0x1ac7dc});return _0x39e91c['info']('>\x20Ready\x20on\x20http://'+_0x4462a9+':'+_0x47afd8),_0x404b6d[_0x3fe7fe(0x17f)]?.({'port':_0x47afd8,'hostname':_0x4462a9}),_0x552d34;}const _0x26c528={};_0x26c528['targets']=[],_0x26c528['debug']=!0x1,_0x26c528['allowHmr']=!0x0,_0x26c528['rejectUnknown']=!0x0;const _0x3b20e8={};_0x3b20e8[_0x265c26(0x12d)]=[],_0x3b20e8['debug']=!0x1;const _0x3c5fee={};_0x3c5fee[_0x265c26(0x177)]=0xfa0,_0x3c5fee[_0x265c26(0x164)]='0.0.0.0',_0x3c5fee['dev']=!0x0,_0x3c5fee['ws']=_0x26c528,_0x3c5fee[_0x265c26(0x113)]=_0x3b20e8;var B=_0x3c5fee;export{C as wsToHttp,H as startWsProxyServer,v as sanitizeForLog,P as rewritePath,h as parseCookies,x as matchPath,W as loadEnvFile,S as httpToWs,b as globToRegex,B as defaultProxyConfig,k as createWsProxyHandler,U as createProxyServer,y as createProxyLogger,T as createHttpProxyHandler,$ as addQueryParam};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Server as BunServer } from "bun";
|
|
2
|
+
import type { ProxyServerConfig, WsProxyState } from "./types";
|
|
3
|
+
export declare function createProxyServer(config: ProxyServerConfig): Promise<BunServer<WsProxyState>>;
|
|
4
|
+
export declare const defaultProxyConfig: ProxyServerConfig;
|
|
5
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export interface WsProxyTarget {
|
|
2
|
+
url: string;
|
|
3
|
+
paths: string[];
|
|
4
|
+
pathRewrite?: Record<string, string>;
|
|
5
|
+
injectTokenFromCookie?: {
|
|
6
|
+
cookieName: string;
|
|
7
|
+
queryParam?: string;
|
|
8
|
+
};
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
changeOrigin?: boolean;
|
|
11
|
+
secure?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface WsProxyConfig {
|
|
14
|
+
targets: WsProxyTarget[];
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
allowHmr?: boolean;
|
|
17
|
+
rejectUnknown?: boolean;
|
|
18
|
+
onError?: (error: Error, path: string) => void;
|
|
19
|
+
onOpen?: (path: string, target: string) => void;
|
|
20
|
+
onClose?: (path: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface HttpProxyTarget {
|
|
23
|
+
url: string;
|
|
24
|
+
paths: string[];
|
|
25
|
+
pathRewrite?: Record<string, string>;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
injectTokenFromCookie?: {
|
|
28
|
+
cookieName: string;
|
|
29
|
+
headerName?: string;
|
|
30
|
+
};
|
|
31
|
+
changeOrigin?: boolean;
|
|
32
|
+
timeout?: number;
|
|
33
|
+
followRedirects?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface HttpProxyConfig {
|
|
36
|
+
targets: HttpProxyTarget[];
|
|
37
|
+
debug?: boolean;
|
|
38
|
+
onError?: (error: Error, path: string, status?: number) => void;
|
|
39
|
+
onRequest?: (path: string, target: string) => void;
|
|
40
|
+
onResponse?: (path: string, status: number, duration: number) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface ProxyServerConfig {
|
|
43
|
+
port?: number;
|
|
44
|
+
hostname?: string;
|
|
45
|
+
dev?: boolean;
|
|
46
|
+
ws?: WsProxyConfig;
|
|
47
|
+
http?: HttpProxyConfig;
|
|
48
|
+
envPath?: string;
|
|
49
|
+
onReady?: (info: {
|
|
50
|
+
port: number;
|
|
51
|
+
hostname: string;
|
|
52
|
+
}) => void;
|
|
53
|
+
onError?: (error: Error) => void;
|
|
54
|
+
}
|
|
55
|
+
export interface WsProxyState {
|
|
56
|
+
backendWs: WebSocket | null;
|
|
57
|
+
path: string;
|
|
58
|
+
target: string;
|
|
59
|
+
buffer: Array<string | ArrayBuffer>;
|
|
60
|
+
}
|
|
61
|
+
export interface ParsedCookies {
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ProxyLogger {
|
|
65
|
+
info: (...args: unknown[]) => void;
|
|
66
|
+
warn: (...args: unknown[]) => void;
|
|
67
|
+
error: (...args: unknown[]) => void;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ParsedCookies, ProxyLogger } from "./types";
|
|
2
|
+
export declare function parseCookies(cookieHeader: string | null): ParsedCookies;
|
|
3
|
+
export declare function globToRegex(pattern: string): RegExp;
|
|
4
|
+
export declare function matchPath(path: string, patterns: string[]): boolean;
|
|
5
|
+
export declare function rewritePath(path: string, rewrites: Record<string, string>): string;
|
|
6
|
+
export declare function addQueryParam(url: string, key: string, value: string): string;
|
|
7
|
+
export declare function httpToWs(url: string): string;
|
|
8
|
+
export declare function wsToHttp(url: string): string;
|
|
9
|
+
export declare function createProxyLogger(prefix: string, debug: boolean): ProxyLogger;
|
|
10
|
+
export declare function loadEnvFile(envPath: string): Promise<void>;
|
|
11
|
+
export declare function sanitizeForLog(value: string, maxLength?: number): string;
|
|
12
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ServerWebSocket } from "bun";
|
|
2
|
+
import type { WsProxyConfig, WsProxyState } from "./types";
|
|
3
|
+
export declare function createWsProxyHandler(config: WsProxyConfig): {
|
|
4
|
+
upgrade(req: Request, server: {
|
|
5
|
+
upgrade: (req: Request, options: {
|
|
6
|
+
data: WsProxyState;
|
|
7
|
+
}) => boolean;
|
|
8
|
+
}): boolean | Response;
|
|
9
|
+
websocket: {
|
|
10
|
+
open(ws: ServerWebSocket<WsProxyState>): void;
|
|
11
|
+
message(ws: ServerWebSocket<WsProxyState>, message: string | Buffer): void;
|
|
12
|
+
close(ws: ServerWebSocket<WsProxyState>): void;
|
|
13
|
+
drain(_ws: ServerWebSocket<WsProxyState>): void;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function startWsProxyServer(config: WsProxyConfig & {
|
|
17
|
+
port?: number;
|
|
18
|
+
hostname?: string;
|
|
19
|
+
}): Bun.Server<WsProxyState>;
|
|
20
|
+
//# sourceMappingURL=wsProxy.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BaseError, HttpMethod, ServerFetchConfig, ServerFetchOptions, ServerFetchResponse } from "./types";
|
|
2
|
+
export declare class ServerFetch {
|
|
3
|
+
private config;
|
|
4
|
+
private logger;
|
|
5
|
+
constructor(config?: Partial<ServerFetchConfig>);
|
|
6
|
+
private buildUrl;
|
|
7
|
+
private buildHeaders;
|
|
8
|
+
private parseResponseHeaders;
|
|
9
|
+
private executeWithTimeout;
|
|
10
|
+
fetch<T = unknown, E = BaseError>(options: ServerFetchOptions): Promise<ServerFetchResponse<T, E>>;
|
|
11
|
+
get<T = unknown, E = BaseError>(url: string, options?: Omit<ServerFetchOptions, "url" | "method">): Promise<ServerFetchResponse<T, E>>;
|
|
12
|
+
post<T = unknown, E = BaseError>(url: string, body?: BodyInit | Record<string, unknown>, options?: Omit<ServerFetchOptions, "url" | "method" | "body">): Promise<ServerFetchResponse<T, E>>;
|
|
13
|
+
put<T = unknown, E = BaseError>(url: string, body?: BodyInit | Record<string, unknown>, options?: Omit<ServerFetchOptions, "url" | "method" | "body">): Promise<ServerFetchResponse<T, E>>;
|
|
14
|
+
patch<T = unknown, E = BaseError>(url: string, body?: BodyInit | Record<string, unknown>, options?: Omit<ServerFetchOptions, "url" | "method" | "body">): Promise<ServerFetchResponse<T, E>>;
|
|
15
|
+
delete<T = unknown, E = BaseError>(url: string, options?: Omit<ServerFetchOptions, "url" | "method">): Promise<ServerFetchResponse<T, E>>;
|
|
16
|
+
}
|
|
17
|
+
export declare const serverFetch: ServerFetch;
|
|
18
|
+
export type { BaseError, HttpMethod, ServerFetchConfig, ServerFetchOptions, ServerFetchResponse, };
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
2
|
+
export interface ServerFetchOptions {
|
|
3
|
+
url: string;
|
|
4
|
+
method: HttpMethod;
|
|
5
|
+
headers?: HeadersInit;
|
|
6
|
+
body?: BodyInit | Record<string, unknown>;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
retries?: number;
|
|
9
|
+
retryDelay?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ServerFetchConfig {
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
defaultHeaders?: Record<string, string>;
|
|
14
|
+
timeout?: number;
|
|
15
|
+
retries?: number;
|
|
16
|
+
retryDelay?: number;
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ServerFetchResponse<T = unknown, E = unknown> {
|
|
20
|
+
isSuccess: boolean;
|
|
21
|
+
response: T | undefined;
|
|
22
|
+
errors: E | undefined;
|
|
23
|
+
code: number | null;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
requestId: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
}
|
|
29
|
+
export interface BaseError {
|
|
30
|
+
message: string;
|
|
31
|
+
code?: string;
|
|
32
|
+
details?: unknown;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NucleusElysiaPluginConfig } from "@types";
|
|
2
|
+
import Elysia from "elysia";
|
|
3
|
+
export { buildPublicRoutes, isPublicRoute, type PublicRoute, } from "./publicRoutes";
|
|
4
|
+
export type { AuthFeatureConfigs, AuthRoutesConfig } from "./routes/auth";
|
|
5
|
+
export { createAuthRoutes } from "./routes/auth";
|
|
6
|
+
export type { EntityRouteConfig } from "./routes/entity";
|
|
7
|
+
export { createEntityRoutes } from "./routes/entity";
|
|
8
|
+
export { createMonitoringRoutes } from "./routes/monitoring";
|
|
9
|
+
export { createCdnRoutes, mergeCdnConfig, mergeStorageConfig, } from "./routes/storage";
|
|
10
|
+
export { createSwaggerPlugin, type NucleusSwaggerConfig } from "./swagger";
|
|
11
|
+
export declare function NucleusElysiaPlugin(config: NucleusElysiaPluginConfig): Promise<Elysia>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NucleusConfigOptions, NucleusTable } from "@types";
|
|
2
|
+
export interface PublicRoute {
|
|
3
|
+
path: string;
|
|
4
|
+
method: string;
|
|
5
|
+
source: "auth" | "entity" | "system" | "custom";
|
|
6
|
+
}
|
|
7
|
+
export declare function buildPublicRoutes(config: NucleusConfigOptions, systemTables: NucleusTable[], basePath?: string, schema?: string): PublicRoute[];
|
|
8
|
+
export declare function isPublicRoute(publicRoutes: PublicRoute[], path: string, method: string): boolean;
|
|
9
|
+
//# sourceMappingURL=publicRoutes.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { CaptchaService } from "src/Services/Captcha";
|
|
3
|
+
import type { Logger } from "src/Services/Logger";
|
|
4
|
+
export interface CaptchaRouteConfig {
|
|
5
|
+
captchaService: CaptchaService;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
basePath?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const GenerateCaptchaQuerySchema: import("@sinclair/typebox").TObject<{
|
|
10
|
+
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"math">, import("@sinclair/typebox").TLiteral<"image">, import("@sinclair/typebox").TLiteral<"puzzle">, import("@sinclair/typebox").TLiteral<"text">]>>;
|
|
11
|
+
difficulty: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"easy">, import("@sinclair/typebox").TLiteral<"medium">, import("@sinclair/typebox").TLiteral<"hard">]>>;
|
|
12
|
+
}>;
|
|
13
|
+
declare const ValidateCaptchaBodySchema: import("@sinclair/typebox").TObject<{
|
|
14
|
+
challengeId: import("@sinclair/typebox").TString;
|
|
15
|
+
answer: import("@sinclair/typebox").TString;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function createCaptchaRoutes(config: CaptchaRouteConfig): Elysia<"", {
|
|
18
|
+
decorator: {};
|
|
19
|
+
store: {};
|
|
20
|
+
derive: {};
|
|
21
|
+
resolve: {};
|
|
22
|
+
}, {
|
|
23
|
+
typebox: {};
|
|
24
|
+
error: {};
|
|
25
|
+
}, {
|
|
26
|
+
schema: {};
|
|
27
|
+
standaloneSchema: {};
|
|
28
|
+
macro: {};
|
|
29
|
+
macroFn: {};
|
|
30
|
+
parser: {};
|
|
31
|
+
response: {};
|
|
32
|
+
}, {}, {
|
|
33
|
+
derive: {};
|
|
34
|
+
resolve: {};
|
|
35
|
+
schema: {};
|
|
36
|
+
standaloneSchema: {};
|
|
37
|
+
response: {};
|
|
38
|
+
}, {
|
|
39
|
+
derive: {};
|
|
40
|
+
resolve: {};
|
|
41
|
+
schema: {};
|
|
42
|
+
standaloneSchema: {};
|
|
43
|
+
response: {};
|
|
44
|
+
}>;
|
|
45
|
+
export { GenerateCaptchaQuerySchema, ValidateCaptchaBodySchema };
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { GmailService } from "src/Services/Gmail";
|
|
3
|
+
import type { AuthRouteConfig, RegisterConfig } from "../types";
|
|
4
|
+
export interface EmailVerificationRouteConfig {
|
|
5
|
+
authConfig: AuthRouteConfig;
|
|
6
|
+
registerConfig: RegisterConfig;
|
|
7
|
+
emailService?: GmailService | null;
|
|
8
|
+
appName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createEmailVerificationRoutes(config: EmailVerificationRouteConfig): Elysia<"", {
|
|
11
|
+
decorator: {};
|
|
12
|
+
store: {};
|
|
13
|
+
derive: {};
|
|
14
|
+
resolve: {};
|
|
15
|
+
}, {
|
|
16
|
+
typebox: {};
|
|
17
|
+
error: {};
|
|
18
|
+
}, {
|
|
19
|
+
schema: {};
|
|
20
|
+
standaloneSchema: {};
|
|
21
|
+
macro: {};
|
|
22
|
+
macroFn: {};
|
|
23
|
+
parser: {};
|
|
24
|
+
response: {};
|
|
25
|
+
}, {}, {
|
|
26
|
+
derive: {};
|
|
27
|
+
resolve: {};
|
|
28
|
+
schema: {};
|
|
29
|
+
standaloneSchema: {};
|
|
30
|
+
response: {};
|
|
31
|
+
}, {
|
|
32
|
+
derive: {};
|
|
33
|
+
resolve: {};
|
|
34
|
+
schema: {};
|
|
35
|
+
standaloneSchema: {};
|
|
36
|
+
response: {};
|
|
37
|
+
}>;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Elysia } from "elysia";
|
|
2
|
+
import type { CaptchaService } from "src/Services/Captcha";
|
|
3
|
+
import type { GmailService } from "src/Services/Gmail";
|
|
4
|
+
import { type CreateSessionParams, type TokenResponseConfig } from "./login";
|
|
5
|
+
import type { AuthFeatureConfigs, AuthRouteConfig } from "./types";
|
|
6
|
+
export interface AuthRoutesConfig {
|
|
7
|
+
authConfig: AuthRouteConfig;
|
|
8
|
+
features: AuthFeatureConfigs;
|
|
9
|
+
sessionsTable?: ReturnType<typeof import("drizzle-orm/pg-core").pgTable> | null;
|
|
10
|
+
schemaTables?: Record<string, unknown>;
|
|
11
|
+
schemaRelations?: Record<string, unknown>;
|
|
12
|
+
databaseUrl?: string;
|
|
13
|
+
emailService?: GmailService | null;
|
|
14
|
+
appName?: string;
|
|
15
|
+
tokenResponseConfig?: TokenResponseConfig;
|
|
16
|
+
captchaService?: CaptchaService | null;
|
|
17
|
+
helpers: {
|
|
18
|
+
signAccessToken: (userId: string) => string;
|
|
19
|
+
signRefreshToken: (userId: string) => string;
|
|
20
|
+
verifyRefreshToken: (token: string) => {
|
|
21
|
+
valid: boolean;
|
|
22
|
+
payload?: {
|
|
23
|
+
sub: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
createSession: (params: CreateSessionParams) => Promise<string>;
|
|
27
|
+
destroySession: (sessionId: string) => Promise<void>;
|
|
28
|
+
saveSessionToDb?: (sessionId: string, params: CreateSessionParams) => Promise<void>;
|
|
29
|
+
revokeSessionInDb?: (sessionId: string, reason: string) => Promise<void>;
|
|
30
|
+
storeResetToken?: (userId: string, token: string, expiresAt: Date) => Promise<void>;
|
|
31
|
+
getResetToken?: (token: string) => Promise<{
|
|
32
|
+
userId: string;
|
|
33
|
+
expiresAt: Date;
|
|
34
|
+
} | null>;
|
|
35
|
+
deleteResetToken?: (token: string) => Promise<void>;
|
|
36
|
+
sendResetEmail?: (email: string, token: string) => Promise<void>;
|
|
37
|
+
storeMagicToken?: (token: {
|
|
38
|
+
userId: string;
|
|
39
|
+
email: string;
|
|
40
|
+
tokenHash: string;
|
|
41
|
+
expiresAt: Date;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
getMagicToken?: (tokenHash: string) => Promise<{
|
|
44
|
+
userId: string;
|
|
45
|
+
email: string;
|
|
46
|
+
tokenHash: string;
|
|
47
|
+
expiresAt: Date;
|
|
48
|
+
} | null>;
|
|
49
|
+
deleteMagicToken?: (tokenHash: string) => Promise<void>;
|
|
50
|
+
sendWelcomeEmail?: (email: string, name: string) => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export declare function createAuthRoutes<T extends Elysia>(app: T, config: AuthRoutesConfig): T;
|
|
54
|
+
export { createEmailVerificationRoutes } from "./emailVerification";
|
|
55
|
+
export { createInviteRoute } from "./invite";
|
|
56
|
+
export type { CreateSessionParams } from "./login";
|
|
57
|
+
export { createLoginRoute } from "./login";
|
|
58
|
+
export { createLogoutRoute } from "./logout";
|
|
59
|
+
export { createMagicLinkRoute } from "./magicLink";
|
|
60
|
+
export { createMeRoute } from "./me";
|
|
61
|
+
export { createPasswordChangeRoute } from "./passwordChange";
|
|
62
|
+
export { createPasswordResetRoute } from "./passwordReset";
|
|
63
|
+
export { createPasswordSetRoute } from "./passwordSet";
|
|
64
|
+
export { createRefreshRoute } from "./refresh";
|
|
65
|
+
export { createRegisterRoute } from "./register";
|
|
66
|
+
export { createSessionsRoute } from "./sessions";
|
|
67
|
+
export type { AuthFeatureConfigs, AuthRouteConfig, EmailVerificationConfig, InviteConfig, LoginConfig, LogoutConfig, MagicLinkConfig, MeConfig, PasswordChangeConfig, PasswordResetConfig, PasswordSetConfig, RefreshConfig, RegisterConfig, SessionsConfig, } from "./types";
|
|
68
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { GmailService } from "src/Services/Gmail";
|
|
3
|
+
import type { AuthRouteConfig, InviteConfig } from "../types";
|
|
4
|
+
interface MagicLinkToken {
|
|
5
|
+
userId: string;
|
|
6
|
+
email: string;
|
|
7
|
+
tokenHash: string;
|
|
8
|
+
expiresAt: Date;
|
|
9
|
+
}
|
|
10
|
+
export interface InviteUserResponse {
|
|
11
|
+
id: string;
|
|
12
|
+
email: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function createInviteRoute(config: AuthRouteConfig, inviteConfig: InviteConfig, emailService: GmailService | null, storeMagicToken: (token: MagicLinkToken) => Promise<void>, appName?: string): Elysia<"", {
|
|
15
|
+
decorator: {};
|
|
16
|
+
store: {};
|
|
17
|
+
derive: {};
|
|
18
|
+
resolve: {};
|
|
19
|
+
}, {
|
|
20
|
+
typebox: {};
|
|
21
|
+
error: {};
|
|
22
|
+
}, {
|
|
23
|
+
schema: {};
|
|
24
|
+
standaloneSchema: {};
|
|
25
|
+
macro: {};
|
|
26
|
+
macroFn: {};
|
|
27
|
+
parser: {};
|
|
28
|
+
response: {};
|
|
29
|
+
}, {}, {
|
|
30
|
+
derive: {};
|
|
31
|
+
resolve: {};
|
|
32
|
+
schema: {};
|
|
33
|
+
standaloneSchema: {};
|
|
34
|
+
response: {};
|
|
35
|
+
}, {
|
|
36
|
+
derive: {};
|
|
37
|
+
resolve: {};
|
|
38
|
+
schema: {};
|
|
39
|
+
standaloneSchema: {};
|
|
40
|
+
response: {};
|
|
41
|
+
}>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { DeviceInfo } from "src/Services/Auth/SessionStore/types";
|
|
3
|
+
import type { CaptchaService } from "src/Services/Captcha";
|
|
4
|
+
import type { AuthRouteConfig, LoginConfig } from "../types";
|
|
5
|
+
export interface CreateSessionParams {
|
|
6
|
+
userId: string;
|
|
7
|
+
deviceInfo: DeviceInfo;
|
|
8
|
+
refreshTokenHash?: string;
|
|
9
|
+
loginMethod?: string;
|
|
10
|
+
rememberMe?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CookieConfig {
|
|
13
|
+
accessTokenName?: string;
|
|
14
|
+
refreshTokenName?: string;
|
|
15
|
+
sessionTokenName?: string;
|
|
16
|
+
accessTokenMaxAge?: number;
|
|
17
|
+
refreshTokenMaxAge?: number;
|
|
18
|
+
sessionTokenMaxAge?: number;
|
|
19
|
+
secure?: boolean;
|
|
20
|
+
httpOnly?: boolean;
|
|
21
|
+
sameSite?: "strict" | "lax" | "none";
|
|
22
|
+
path?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TokenResponseConfig {
|
|
25
|
+
accessToken?: {
|
|
26
|
+
setHeadersEnabled?: boolean;
|
|
27
|
+
returnJson?: boolean;
|
|
28
|
+
};
|
|
29
|
+
refreshToken?: {
|
|
30
|
+
setHeadersEnabled?: boolean;
|
|
31
|
+
returnJson?: boolean;
|
|
32
|
+
};
|
|
33
|
+
sessionToken?: {
|
|
34
|
+
setHeadersEnabled?: boolean;
|
|
35
|
+
returnJson?: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export declare function createLoginRoute(config: AuthRouteConfig, loginConfig: LoginConfig, signAccessToken: (userId: string) => string, signRefreshToken: (userId: string) => string, createSession: (params: CreateSessionParams) => Promise<string>, saveSessionToDb?: (sessionId: string, params: CreateSessionParams) => Promise<void>, cookieConfig?: CookieConfig, tokenResponseConfig?: TokenResponseConfig, captchaService?: CaptchaService): Elysia<"", {
|
|
39
|
+
decorator: {};
|
|
40
|
+
store: {};
|
|
41
|
+
derive: {};
|
|
42
|
+
resolve: {};
|
|
43
|
+
}, {
|
|
44
|
+
typebox: {};
|
|
45
|
+
error: {};
|
|
46
|
+
}, {
|
|
47
|
+
schema: {};
|
|
48
|
+
standaloneSchema: {};
|
|
49
|
+
macro: {};
|
|
50
|
+
macroFn: {};
|
|
51
|
+
parser: {};
|
|
52
|
+
response: {};
|
|
53
|
+
}, {}, {
|
|
54
|
+
derive: {};
|
|
55
|
+
resolve: {};
|
|
56
|
+
schema: {};
|
|
57
|
+
standaloneSchema: {};
|
|
58
|
+
response: {};
|
|
59
|
+
}, {
|
|
60
|
+
derive: {};
|
|
61
|
+
resolve: {};
|
|
62
|
+
schema: {};
|
|
63
|
+
standaloneSchema: {};
|
|
64
|
+
response: {};
|
|
65
|
+
}>;
|
|
66
|
+
export type { LoginConfig } from "../types";
|
|
67
|
+
export { LoginBodySchema, LoginResponseSchema } from "./types";
|
|
68
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const LoginBodySchema: import("@sinclair/typebox").TObject<{
|
|
2
|
+
email: import("@sinclair/typebox").TString;
|
|
3
|
+
password: import("@sinclair/typebox").TString;
|
|
4
|
+
rememberMe: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
5
|
+
captchaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
|
+
captchaAnswer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const LoginResponseSchema: import("@sinclair/typebox").TObject<{
|
|
9
|
+
success: import("@sinclair/typebox").TBoolean;
|
|
10
|
+
message: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
|
+
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
12
|
+
user: import("@sinclair/typebox").TObject<{
|
|
13
|
+
id: import("@sinclair/typebox").TString;
|
|
14
|
+
email: import("@sinclair/typebox").TString;
|
|
15
|
+
}>;
|
|
16
|
+
accessToken: import("@sinclair/typebox").TString;
|
|
17
|
+
refreshToken: import("@sinclair/typebox").TString;
|
|
18
|
+
}>>;
|
|
19
|
+
}>;
|
|
20
|
+
export type LoginBody = typeof LoginBodySchema.static;
|
|
21
|
+
export type LoginResponse = typeof LoginResponseSchema.static;
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function verifyPassword(plainPassword: string, hashedPassword: string): Promise<boolean>;
|
|
2
|
+
export declare function isValidEmail(email: string): boolean;
|
|
3
|
+
export declare function parseUserAgentForLogin(userAgent: string, ipAddress: string): {
|
|
4
|
+
deviceName: string;
|
|
5
|
+
deviceType: "unknown" | "desktop" | "mobile" | "tablet";
|
|
6
|
+
browserName: string | undefined;
|
|
7
|
+
browserVersion: string | undefined;
|
|
8
|
+
osName: string | undefined;
|
|
9
|
+
osVersion: string | undefined;
|
|
10
|
+
ipAddress: string;
|
|
11
|
+
userAgent: string;
|
|
12
|
+
locationCountry: string | undefined;
|
|
13
|
+
locationCity: string | undefined;
|
|
14
|
+
isHeadless: boolean;
|
|
15
|
+
isBot: boolean;
|
|
16
|
+
isSuspicious: boolean;
|
|
17
|
+
suspiciousPatterns: string[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { AuthRouteConfig, LogoutConfig } from "../types";
|
|
3
|
+
export declare function createLogoutRoute(config: AuthRouteConfig, logoutConfig: LogoutConfig, destroySession: (sessionId: string) => Promise<void>, revokeSessionInDb?: (sessionId: string, reason: string) => Promise<void>): Elysia<"", {
|
|
4
|
+
decorator: {};
|
|
5
|
+
store: {};
|
|
6
|
+
derive: {};
|
|
7
|
+
resolve: {};
|
|
8
|
+
}, {
|
|
9
|
+
typebox: {};
|
|
10
|
+
error: {};
|
|
11
|
+
}, {
|
|
12
|
+
schema: {};
|
|
13
|
+
standaloneSchema: {};
|
|
14
|
+
macro: {};
|
|
15
|
+
macroFn: {};
|
|
16
|
+
parser: {};
|
|
17
|
+
response: {};
|
|
18
|
+
}, {}, {
|
|
19
|
+
derive: {};
|
|
20
|
+
resolve: {};
|
|
21
|
+
schema: {};
|
|
22
|
+
standaloneSchema: {};
|
|
23
|
+
response: {};
|
|
24
|
+
}, {
|
|
25
|
+
derive: {};
|
|
26
|
+
resolve: {};
|
|
27
|
+
schema: {};
|
|
28
|
+
standaloneSchema: {};
|
|
29
|
+
response: {};
|
|
30
|
+
}>;
|
|
31
|
+
export type { LogoutConfig } from "../types";
|
|
32
|
+
export { LogoutResponseSchema } from "./types";
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const LogoutResponseSchema: import("@sinclair/typebox").TObject<{
|
|
2
|
+
success: import("@sinclair/typebox").TBoolean;
|
|
3
|
+
message: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
4
|
+
}>;
|
|
5
|
+
export type LogoutResponse = typeof LogoutResponseSchema.static;
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|