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,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "nucleus.tables.schema.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "Nucleus Tables Array",
|
|
5
|
+
"description": "Array of Nucleus table definitions",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"tables": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"$ref": "table.schema.json"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["tables"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "table.schema.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "Nucleus Table Definition",
|
|
5
|
+
"description": "Generated from NucleusTable interface in types.ts",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"table_name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Table name in database",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 100
|
|
13
|
+
},
|
|
14
|
+
"feature_set": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": [
|
|
19
|
+
"authentication",
|
|
20
|
+
"authorization",
|
|
21
|
+
"audit",
|
|
22
|
+
"notification",
|
|
23
|
+
"verification"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"description": "Feature set this table belongs to"
|
|
27
|
+
},
|
|
28
|
+
"add_base_columns": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Add base columns (id, created_at, etc.)",
|
|
31
|
+
"default": true
|
|
32
|
+
},
|
|
33
|
+
"is_form_data": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"description": "Entity needs multipart form data",
|
|
36
|
+
"default": false
|
|
37
|
+
},
|
|
38
|
+
"available_app_ids": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"description": "Available app IDs",
|
|
44
|
+
"default": ["*"]
|
|
45
|
+
},
|
|
46
|
+
"available_schemas": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"description": "Available schemas",
|
|
52
|
+
"default": ["*"]
|
|
53
|
+
},
|
|
54
|
+
"excluded_schemas": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"description": "Excluded schemas"
|
|
60
|
+
},
|
|
61
|
+
"excluded_methods": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": [
|
|
66
|
+
"GET",
|
|
67
|
+
"POST",
|
|
68
|
+
"PUT",
|
|
69
|
+
"DELETE",
|
|
70
|
+
"PATCH",
|
|
71
|
+
"TOGGLE",
|
|
72
|
+
"VERIFICATION"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"description": "Excluded HTTP methods"
|
|
76
|
+
},
|
|
77
|
+
"is_public": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"description": "Public access per method",
|
|
80
|
+
"properties": {
|
|
81
|
+
"GET": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": false
|
|
84
|
+
},
|
|
85
|
+
"POST": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false
|
|
88
|
+
},
|
|
89
|
+
"PUT": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"default": false
|
|
92
|
+
},
|
|
93
|
+
"DELETE": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"default": false
|
|
96
|
+
},
|
|
97
|
+
"PATCH": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"default": false
|
|
100
|
+
},
|
|
101
|
+
"TOGGLE": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": false
|
|
104
|
+
},
|
|
105
|
+
"VERIFICATION": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": false
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"columns": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"$ref": "#/$defs/column"
|
|
115
|
+
},
|
|
116
|
+
"description": "Column definitions"
|
|
117
|
+
},
|
|
118
|
+
"indexes": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"items": {
|
|
121
|
+
"$ref": "#/$defs/index"
|
|
122
|
+
},
|
|
123
|
+
"description": "Index definitions"
|
|
124
|
+
},
|
|
125
|
+
"constraints": {
|
|
126
|
+
"$ref": "#/$defs/constraints"
|
|
127
|
+
},
|
|
128
|
+
"group_name": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "Group name for organization",
|
|
131
|
+
"minLength": 1
|
|
132
|
+
},
|
|
133
|
+
"bulk_endpoints_enabled": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"description": "Enable bulk endpoints",
|
|
136
|
+
"default": false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": ["table_name"],
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"$defs": {
|
|
142
|
+
"column": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"name": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Column name",
|
|
148
|
+
"minLength": 1
|
|
149
|
+
},
|
|
150
|
+
"type": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "Drizzle PostgreSQL column type",
|
|
153
|
+
"enum": [
|
|
154
|
+
"integer",
|
|
155
|
+
"smallint",
|
|
156
|
+
"bigint",
|
|
157
|
+
"serial",
|
|
158
|
+
"smallserial",
|
|
159
|
+
"bigserial",
|
|
160
|
+
"real",
|
|
161
|
+
"doublePrecision",
|
|
162
|
+
"numeric",
|
|
163
|
+
"decimal",
|
|
164
|
+
"text",
|
|
165
|
+
"varchar",
|
|
166
|
+
"char",
|
|
167
|
+
"uuid",
|
|
168
|
+
"boolean",
|
|
169
|
+
"date",
|
|
170
|
+
"time",
|
|
171
|
+
"timestamp",
|
|
172
|
+
"timestamptz",
|
|
173
|
+
"interval",
|
|
174
|
+
"json",
|
|
175
|
+
"jsonb",
|
|
176
|
+
"bytea",
|
|
177
|
+
"inet",
|
|
178
|
+
"cidr",
|
|
179
|
+
"macaddr",
|
|
180
|
+
"macaddr8",
|
|
181
|
+
"bit",
|
|
182
|
+
"bitVarying",
|
|
183
|
+
"point",
|
|
184
|
+
"line",
|
|
185
|
+
"lseg",
|
|
186
|
+
"box",
|
|
187
|
+
"path",
|
|
188
|
+
"polygon",
|
|
189
|
+
"circle",
|
|
190
|
+
"tsvector",
|
|
191
|
+
"tsquery",
|
|
192
|
+
"xml",
|
|
193
|
+
"money",
|
|
194
|
+
"int4range",
|
|
195
|
+
"int8range",
|
|
196
|
+
"numrange",
|
|
197
|
+
"tsrange",
|
|
198
|
+
"tstzrange",
|
|
199
|
+
"daterange",
|
|
200
|
+
"int4multirange",
|
|
201
|
+
"int8multirange",
|
|
202
|
+
"nummultirange",
|
|
203
|
+
"tsmultirange",
|
|
204
|
+
"tstzmultirange",
|
|
205
|
+
"datemultirange",
|
|
206
|
+
"vector",
|
|
207
|
+
"geometry",
|
|
208
|
+
"geography",
|
|
209
|
+
"customType"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"length": {
|
|
213
|
+
"type": "number",
|
|
214
|
+
"description": "Column length (for varchar, char)"
|
|
215
|
+
},
|
|
216
|
+
"precision": {
|
|
217
|
+
"type": "number",
|
|
218
|
+
"description": "Numeric precision"
|
|
219
|
+
},
|
|
220
|
+
"scale": {
|
|
221
|
+
"type": "number",
|
|
222
|
+
"description": "Numeric scale"
|
|
223
|
+
},
|
|
224
|
+
"dimensions": {
|
|
225
|
+
"type": "number",
|
|
226
|
+
"description": "Vector dimensions"
|
|
227
|
+
},
|
|
228
|
+
"mode": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"enum": ["string", "date", "json", "number"],
|
|
231
|
+
"description": "Column mode"
|
|
232
|
+
},
|
|
233
|
+
"withTimezone": {
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"description": "Include timezone for timestamp types"
|
|
236
|
+
},
|
|
237
|
+
"nullable": {
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"description": "Column is nullable"
|
|
240
|
+
},
|
|
241
|
+
"notNull": {
|
|
242
|
+
"type": "boolean",
|
|
243
|
+
"description": "Column is NOT NULL"
|
|
244
|
+
},
|
|
245
|
+
"unique": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"description": "Column has unique constraint"
|
|
248
|
+
},
|
|
249
|
+
"primaryKey": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"description": "Column is primary key"
|
|
252
|
+
},
|
|
253
|
+
"default": {
|
|
254
|
+
"description": "Default value"
|
|
255
|
+
},
|
|
256
|
+
"defaultRaw": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "Raw SQL default expression"
|
|
259
|
+
},
|
|
260
|
+
"references": {
|
|
261
|
+
"$ref": "#/$defs/columnReference"
|
|
262
|
+
},
|
|
263
|
+
"array": {
|
|
264
|
+
"type": "boolean",
|
|
265
|
+
"description": "Column is array type"
|
|
266
|
+
},
|
|
267
|
+
"arrayDimensions": {
|
|
268
|
+
"type": "number",
|
|
269
|
+
"description": "Array dimensions"
|
|
270
|
+
},
|
|
271
|
+
"enumValues": {
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": {
|
|
274
|
+
"type": "string"
|
|
275
|
+
},
|
|
276
|
+
"description": "Enum values (shorthand)"
|
|
277
|
+
},
|
|
278
|
+
"enum": {
|
|
279
|
+
"$ref": "#/$defs/columnEnum"
|
|
280
|
+
},
|
|
281
|
+
"generatedAlwaysAs": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"description": "Generated column expression"
|
|
284
|
+
},
|
|
285
|
+
"generatedAlwaysAsIdentity": {
|
|
286
|
+
"type": "boolean"
|
|
287
|
+
},
|
|
288
|
+
"generatedByDefaultAsIdentity": {
|
|
289
|
+
"type": "boolean"
|
|
290
|
+
},
|
|
291
|
+
"check": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Check constraint expression"
|
|
294
|
+
},
|
|
295
|
+
"comment": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"description": "Column comment"
|
|
298
|
+
},
|
|
299
|
+
"validation": {
|
|
300
|
+
"$ref": "#/$defs/columnValidation"
|
|
301
|
+
},
|
|
302
|
+
"sanitize": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"enum": [
|
|
307
|
+
"trim",
|
|
308
|
+
"lowercase",
|
|
309
|
+
"uppercase",
|
|
310
|
+
"escapeHtml",
|
|
311
|
+
"stripTags",
|
|
312
|
+
"normalizeEmail",
|
|
313
|
+
"toNumber",
|
|
314
|
+
"toBoolean",
|
|
315
|
+
"slugify"
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
"description": "Sanitize options"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"required": ["name", "type"]
|
|
322
|
+
},
|
|
323
|
+
"index": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"name": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"description": "Index name"
|
|
329
|
+
},
|
|
330
|
+
"columns": {
|
|
331
|
+
"type": "array",
|
|
332
|
+
"items": {
|
|
333
|
+
"type": "string"
|
|
334
|
+
},
|
|
335
|
+
"description": "Indexed columns"
|
|
336
|
+
},
|
|
337
|
+
"unique": {
|
|
338
|
+
"type": "boolean",
|
|
339
|
+
"description": "Unique index"
|
|
340
|
+
},
|
|
341
|
+
"using": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"enum": ["btree", "hash", "gist", "spgist", "gin", "brin"],
|
|
344
|
+
"description": "Index method"
|
|
345
|
+
},
|
|
346
|
+
"where": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"description": "Partial index WHERE clause"
|
|
349
|
+
},
|
|
350
|
+
"concurrently": {
|
|
351
|
+
"type": "boolean",
|
|
352
|
+
"description": "Create index concurrently"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"required": ["columns"]
|
|
356
|
+
},
|
|
357
|
+
"constraints": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"primaryKey": {
|
|
361
|
+
"type": "array",
|
|
362
|
+
"items": {
|
|
363
|
+
"type": "string"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"unique": {
|
|
367
|
+
"type": "array",
|
|
368
|
+
"items": {
|
|
369
|
+
"$ref": "#/$defs/uniqueConstraint"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"check": {
|
|
373
|
+
"type": "array",
|
|
374
|
+
"items": {
|
|
375
|
+
"$ref": "#/$defs/checkConstraint"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"uniqueConstraint": {
|
|
381
|
+
"type": "object",
|
|
382
|
+
"properties": {
|
|
383
|
+
"name": {
|
|
384
|
+
"type": "string"
|
|
385
|
+
},
|
|
386
|
+
"columns": {
|
|
387
|
+
"type": "array",
|
|
388
|
+
"items": {
|
|
389
|
+
"type": "string"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"required": ["columns"]
|
|
394
|
+
},
|
|
395
|
+
"checkConstraint": {
|
|
396
|
+
"type": "object",
|
|
397
|
+
"properties": {
|
|
398
|
+
"name": {
|
|
399
|
+
"type": "string"
|
|
400
|
+
},
|
|
401
|
+
"expression": {
|
|
402
|
+
"type": "string"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"required": ["expression"]
|
|
406
|
+
},
|
|
407
|
+
"columnReference": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"properties": {
|
|
410
|
+
"table": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Referenced table name"
|
|
413
|
+
},
|
|
414
|
+
"column": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"description": "Referenced column name"
|
|
417
|
+
},
|
|
418
|
+
"onDelete": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"enum": [
|
|
421
|
+
"cascade",
|
|
422
|
+
"restrict",
|
|
423
|
+
"no action",
|
|
424
|
+
"set null",
|
|
425
|
+
"set default"
|
|
426
|
+
],
|
|
427
|
+
"description": "ON DELETE action"
|
|
428
|
+
},
|
|
429
|
+
"onUpdate": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"enum": [
|
|
432
|
+
"cascade",
|
|
433
|
+
"restrict",
|
|
434
|
+
"no action",
|
|
435
|
+
"set null",
|
|
436
|
+
"set default"
|
|
437
|
+
],
|
|
438
|
+
"description": "ON UPDATE action"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"required": ["table"]
|
|
442
|
+
},
|
|
443
|
+
"columnEnum": {
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {
|
|
446
|
+
"name": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"description": "Enum type name"
|
|
449
|
+
},
|
|
450
|
+
"values": {
|
|
451
|
+
"type": "array",
|
|
452
|
+
"items": {
|
|
453
|
+
"type": "string"
|
|
454
|
+
},
|
|
455
|
+
"description": "Enum values"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"required": ["name", "values"]
|
|
459
|
+
},
|
|
460
|
+
"columnValidation": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"properties": {
|
|
463
|
+
"minLength": {
|
|
464
|
+
"type": "number"
|
|
465
|
+
},
|
|
466
|
+
"maxLength": {
|
|
467
|
+
"type": "number"
|
|
468
|
+
},
|
|
469
|
+
"min": {
|
|
470
|
+
"type": "number"
|
|
471
|
+
},
|
|
472
|
+
"max": {
|
|
473
|
+
"type": "number"
|
|
474
|
+
},
|
|
475
|
+
"pattern": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
},
|
|
478
|
+
"format": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"enum": [
|
|
481
|
+
"email",
|
|
482
|
+
"url",
|
|
483
|
+
"uuid",
|
|
484
|
+
"date",
|
|
485
|
+
"datetime",
|
|
486
|
+
"time",
|
|
487
|
+
"uri",
|
|
488
|
+
"ipv4",
|
|
489
|
+
"ipv6"
|
|
490
|
+
]
|
|
491
|
+
},
|
|
492
|
+
"customMessage": {
|
|
493
|
+
"type": "string"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
package/scripts/build.ts
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Nucleus Core Build Script
|
|
5
|
+
* Compiles TypeScript, bundles, and obfuscates the output
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
9
|
+
import { join, relative } from "node:path";
|
|
10
|
+
import { $ } from "bun";
|
|
11
|
+
import config from "../nucleus.config";
|
|
12
|
+
|
|
13
|
+
const GREEN = "\x1b[32m";
|
|
14
|
+
const YELLOW = "\x1b[33m";
|
|
15
|
+
const BLUE = "\x1b[34m";
|
|
16
|
+
const RED = "\x1b[31m";
|
|
17
|
+
const NC = "\x1b[0m";
|
|
18
|
+
|
|
19
|
+
const log = {
|
|
20
|
+
info: (msg: string) => console.log(`${BLUE}ℹ️ ${msg}${NC}`),
|
|
21
|
+
success: (msg: string) => console.log(`${GREEN}✅ ${msg}${NC}`),
|
|
22
|
+
warn: (msg: string) => console.log(`${YELLOW}⚠️ ${msg}${NC}`),
|
|
23
|
+
error: (msg: string) => console.log(`${RED}❌ ${msg}${NC}`),
|
|
24
|
+
step: (n: number, total: number, msg: string) =>
|
|
25
|
+
console.log(`\n${BLUE}[${n}/${total}]${NC} ${msg}`),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
async function cleanDist() {
|
|
29
|
+
log.info("Cleaning dist directory...");
|
|
30
|
+
await rm(config.build.outDir, { recursive: true, force: true });
|
|
31
|
+
await mkdir(config.build.outDir, { recursive: true });
|
|
32
|
+
log.success("Dist cleaned");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function buildWithBun() {
|
|
36
|
+
log.info("Building with Bun...");
|
|
37
|
+
|
|
38
|
+
const entryPoints = Object.values(config.entryPoints);
|
|
39
|
+
const externals = config.externals.map((e) => `--external ${e}`).join(" ");
|
|
40
|
+
|
|
41
|
+
const cmd = `bun build ${entryPoints.join(" ")} --outdir=${config.build.outDir} --target=${config.build.target} --format=${config.build.format} ${config.build.splitting ? "--splitting" : ""} ${config.build.minify ? "--minify" : ""} ${externals}`;
|
|
42
|
+
|
|
43
|
+
const result = await $`${{ raw: cmd }}`.quiet();
|
|
44
|
+
|
|
45
|
+
if (result.exitCode !== 0) {
|
|
46
|
+
throw new Error(`Build failed: ${result.stderr.toString()}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
log.success("Bun build completed");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function generateTypes() {
|
|
53
|
+
log.info("Generating type definitions...");
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
await $`bunx tsc --declaration --emitDeclarationOnly --outDir ${config.build.outDir} --skipLibCheck`.quiet();
|
|
57
|
+
log.success("Type definitions generated");
|
|
58
|
+
} catch {
|
|
59
|
+
log.warn("Some type errors occurred, but continuing...");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function getJsFiles(dir: string): Promise<string[]> {
|
|
64
|
+
const files: string[] = [];
|
|
65
|
+
|
|
66
|
+
async function walk(currentDir: string) {
|
|
67
|
+
const entries = await readdir(currentDir, { withFileTypes: true });
|
|
68
|
+
|
|
69
|
+
for (const entry of entries) {
|
|
70
|
+
const fullPath = join(currentDir, entry.name);
|
|
71
|
+
|
|
72
|
+
if (entry.isDirectory()) {
|
|
73
|
+
await walk(fullPath);
|
|
74
|
+
} else if (entry.name.endsWith(".js") && !entry.name.endsWith(".d.ts")) {
|
|
75
|
+
const relativePath = relative(config.build.outDir, fullPath);
|
|
76
|
+
const shouldExclude = config.obfuscationExclude.some((pattern) => {
|
|
77
|
+
if (pattern.includes("*")) {
|
|
78
|
+
const regex = new RegExp(
|
|
79
|
+
pattern.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*"),
|
|
80
|
+
);
|
|
81
|
+
return regex.test(relativePath);
|
|
82
|
+
}
|
|
83
|
+
return relativePath.includes(pattern);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
if (!shouldExclude) {
|
|
87
|
+
files.push(fullPath);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
await walk(dir);
|
|
94
|
+
return files;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async function obfuscateFiles() {
|
|
98
|
+
if (!config.obfuscation.enabled) {
|
|
99
|
+
log.warn("Obfuscation disabled in config");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
log.info(`Obfuscating with level: ${config.obfuscation.level}`);
|
|
104
|
+
|
|
105
|
+
const JavaScriptObfuscator = await import("javascript-obfuscator");
|
|
106
|
+
const obfuscatorOptions =
|
|
107
|
+
config.obfuscation.options[config.obfuscation.level];
|
|
108
|
+
|
|
109
|
+
const jsFiles = await getJsFiles(config.build.outDir);
|
|
110
|
+
log.info(`Found ${jsFiles.length} JavaScript files to obfuscate`);
|
|
111
|
+
|
|
112
|
+
let processed = 0;
|
|
113
|
+
for (const file of jsFiles) {
|
|
114
|
+
try {
|
|
115
|
+
const code = await readFile(file, "utf-8");
|
|
116
|
+
|
|
117
|
+
const obfuscated = JavaScriptObfuscator.obfuscate(code, {
|
|
118
|
+
...(obfuscatorOptions as Record<string, unknown>),
|
|
119
|
+
sourceMap: false,
|
|
120
|
+
} as Parameters<typeof JavaScriptObfuscator.obfuscate>[1]);
|
|
121
|
+
|
|
122
|
+
await writeFile(file, obfuscated.getObfuscatedCode());
|
|
123
|
+
processed++;
|
|
124
|
+
|
|
125
|
+
process.stdout.write(
|
|
126
|
+
`\r Obfuscating: ${processed}/${jsFiles.length} files`,
|
|
127
|
+
);
|
|
128
|
+
} catch (err) {
|
|
129
|
+
log.warn(`Failed to obfuscate ${file}: ${err}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
console.log("");
|
|
134
|
+
log.success(`Obfuscated ${processed} files`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async function removeSourceMaps() {
|
|
138
|
+
log.info("Removing any source maps...");
|
|
139
|
+
await $`find ${config.build.outDir} -name "*.map" -delete`.quiet();
|
|
140
|
+
log.success("Source maps removed");
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function verifyBuild() {
|
|
144
|
+
log.info("Verifying build output...");
|
|
145
|
+
|
|
146
|
+
for (const [exportPath, entryPoint] of Object.entries(config.entryPoints)) {
|
|
147
|
+
const outputFile = entryPoint.replace(/\.ts$/, ".js");
|
|
148
|
+
const fullPath = join(config.build.outDir, outputFile.replace("./", ""));
|
|
149
|
+
|
|
150
|
+
const file = Bun.file(fullPath);
|
|
151
|
+
const exists = await file.exists();
|
|
152
|
+
|
|
153
|
+
if (exists) {
|
|
154
|
+
const size = file.size;
|
|
155
|
+
const sizeKb = (size / 1024).toFixed(2);
|
|
156
|
+
console.log(` ${GREEN}✓${NC} ${exportPath} → ${sizeKb} KB`);
|
|
157
|
+
} else {
|
|
158
|
+
console.log(` ${RED}✗${NC} ${exportPath} → NOT FOUND`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
log.success("Build verification complete");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function main() {
|
|
166
|
+
console.log(`\n${GREEN}╔══════════════════════════════════════════╗${NC}`);
|
|
167
|
+
console.log(`${GREEN}║ 🔨 NUCLEUS CORE BUILD ║${NC}`);
|
|
168
|
+
console.log(`${GREEN}╚══════════════════════════════════════════╝${NC}\n`);
|
|
169
|
+
|
|
170
|
+
const startTime = Date.now();
|
|
171
|
+
|
|
172
|
+
try {
|
|
173
|
+
log.step(1, 5, "Cleaning...");
|
|
174
|
+
await cleanDist();
|
|
175
|
+
|
|
176
|
+
log.step(2, 5, "Building JavaScript...");
|
|
177
|
+
await buildWithBun();
|
|
178
|
+
|
|
179
|
+
log.step(3, 5, "Generating Types...");
|
|
180
|
+
await generateTypes();
|
|
181
|
+
|
|
182
|
+
log.step(4, 5, "Obfuscating...");
|
|
183
|
+
await obfuscateFiles();
|
|
184
|
+
await removeSourceMaps();
|
|
185
|
+
|
|
186
|
+
log.step(5, 5, "Verifying...");
|
|
187
|
+
await verifyBuild();
|
|
188
|
+
|
|
189
|
+
const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
190
|
+
console.log(`\n${GREEN}🎉 Build completed in ${elapsed}s${NC}\n`);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
log.error(`Build failed: ${error}`);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
main();
|