@baseplate-dev/plugin-auth 0.6.18 → 0.6.20
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/CHANGELOG.md +50 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +64 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +64 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +32 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +32 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -2
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -1
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +64 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +64 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +32 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +64 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -2
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +1 -1
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +32 -0
- package/dist/better-auth/core/node.js +7 -8
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +20 -3
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +5 -24
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +40 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +19 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +6 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +20 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +4 -1
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +16 -8
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts +5 -4
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts +6 -6
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js +13 -13
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/{use-required-user-id.ts → use-user-id-or-throw.ts} +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +32 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +192 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +32 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +320 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/forgot-password.tsx +1 -4
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +67 -2
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +33 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +33 -1
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +33 -1
- package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +12 -3
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/admin-crud-invite-user-action.generator.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/index.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-renderers.d.ts +32 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/typed-templates.d.ts +32 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.js +1 -2
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.tsx +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +32 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +32 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +32 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +64 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +1 -1
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +32 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +10 -7
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +8 -11
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +40 -13
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +6 -5
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +1 -3
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +1 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +40 -16
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +11 -8
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +5 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.js +17 -13
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.ts +25 -13
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +5 -3
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +273 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +549 -4
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +272 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js +4 -2
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +550 -6
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js +15 -14
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +7 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +19 -7
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +3 -26
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +48 -7
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +0 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +19 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +7 -3
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +28 -7
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +5 -14
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.d.ts +7 -6
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.js +23 -17
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.ts +25 -18
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +8 -9
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +10 -11
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +32 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +257 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +32 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +320 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.js +12 -5
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.tsx +14 -4
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.js +4 -4
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.tsx +4 -3
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +4 -4
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +4 -3
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +4 -4
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +4 -3
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +1 -1
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +80 -7
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +33 -1
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +1 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +1 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +92 -12
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +5 -2
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +49 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.js +35 -1
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +17 -44
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +21 -49
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +43 -34
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +96 -80
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts +148 -82
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +0 -2
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +0 -1
- package/dist/local-auth/core/node.js +7 -7
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +4 -3
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +4 -4
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +13 -13
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +1 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.d.ts +0 -1
- package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth__mf_owner__1-CKKmnLep.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth__mf_owner__1-Ckrp2j8j.js} +14 -14
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-Cx7TvZ_H.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DE4rTqEA.js} +198 -66
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-D3Nvasea.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-aFLESEyS.js} +1 -1
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-C2GDE8Py.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-tY6BN-tn.js} +2844 -1738
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CiccpWjh.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-R9lCFRaW.js} +2 -2
- package/dist/web/assets/auth-DR6QxrAW.js +1 -0
- package/dist/web/assets/{common-CoLuMS7U.js → common-BsyRiQi3.js} +6 -6
- package/dist/web/assets/{common-N3skPbzk.js → common-CRwNlCMn.js} +10 -10
- package/dist/web/assets/{common-Co5lW_TK.js → common-CvqlRZC9.js} +12 -12
- package/dist/web/assets/{common-C8_sC5pp.js → common-D3atSs7O.js} +15 -15
- package/dist/web/assets/common-DuFyXa6l.js +36 -0
- package/dist/web/assets/common-islduJTj.js +43 -0
- package/dist/web/assets/{get-auth-plugin-definition-DyokUVjX.js → get-auth-plugin-definition-BgWWHl_Y.js} +3 -3
- package/dist/web/assets/{hostInit-BCYmw0H5.js → hostInit-CGEb3Tbe.js} +1 -1
- package/dist/web/assets/{mf-entry-bootstrap-0-3ede9334.js → mf-entry-bootstrap-0-ed392701.js} +1 -1
- package/dist/web/assets/{mf-entry-bootstrap-1-3da85eea.js → mf-entry-bootstrap-1-e2d80a25.js} +2 -2
- package/dist/web/assets/{mf-entry-bootstrap-2-32e24e11.js → mf-entry-bootstrap-2-ea90e6fe.js} +1 -1
- package/dist/web/assets/{mf-entry-bootstrap-3-a3cfea9d.js → mf-entry-bootstrap-3-5268230e.js} +2 -2
- package/dist/web/assets/{models-BcPOQC5p.js → models-BOeSYfRn.js} +4 -4
- package/dist/web/assets/{models-BcUgOGGn.js → models-DF6DoXt6.js} +4 -4
- package/dist/web/assets/{plugin-definition-D1EImXIf.js → plugin-definition--k0VAeK3.js} +9 -9
- package/dist/web/assets/{plugin-definition-lw-gB4hU.js → plugin-definition-CMwSlxsJ.js} +3 -3
- package/dist/web/assets/{styles-EOyEbGA4.js → styles-DZYLavnA.js} +8 -8
- package/dist/web/assets/{virtualExposes-DWORnjyA.js → virtualExposes-DnIi4GOx.js} +1 -1
- package/dist/web/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-t-KnBiUh.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-rNmzkDAw.js} +3 -3
- package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DZfE3QCR.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-E86pU-VB.js} +13 -13
- package/dist/web/assets/{web-Dgb85jhs.js → web-BKsbE-x8.js} +41 -41
- package/dist/web/assets/{web-xJ-GnSkC.js → web-BNZ-0TYy.js} +25 -25
- package/dist/web/assets/{web-kaD9AzNS.js → web-C6j3Z4Pi.js} +8 -8
- package/dist/web/assets/{web-CBVepebK.js → web-DPZssHx1.js} +19 -19
- package/dist/web/assets/{web-PqAcfBSy.js → web-DiHdy5Ov.js} +7 -7
- package/dist/web/assets/{web-EDeSquSP.js → web-RWlatCpa.js} +19 -19
- package/dist/web/assets/{web-RhChfBw_.js → web-f-cndKO0.js} +17 -17
- package/dist/web/index.html +4 -4
- package/dist/web/remoteEntry.js +1 -1
- package/package.json +13 -13
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts +0 -38
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js +0 -71
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.ts +0 -77
- package/dist/web/assets/auth-CsHp2bQi.js +0 -1
- package/dist/web/assets/common-BGTuTgx7.js +0 -43
- package/dist/web/assets/common-Dueu_1NG.js +0 -36
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Q as __mf_2, Z as __mf_1,
|
|
2
|
-
import { T as
|
|
3
|
-
import { i as __mf_15, n as __mf_11, r as __mf_14, t as __mf_0, u as __mf_7 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-
|
|
4
|
-
import { n as a, t as AuthConfigTabs } from "./styles-
|
|
5
|
-
import { n as createBetterAuthPluginDefinitionSchema, t as createBetterAuthPartialDefinition } from "./models-
|
|
6
|
-
import { t as getAuthPluginDefinition } from "./get-auth-plugin-definition-
|
|
1
|
+
import { Q as __mf_2, Z as __mf_1, d as __mf_196, f as __mf_197, g as __mf_201, h as __mf_200, i as __mf_160, m as __mf_199, mt as __mf_34, p as __mf_198, t as __mf_128, vt as init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__ } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-tY6BN-tn.js";
|
|
2
|
+
import { T as __mf_74, _ as __mf_244, f as __mf_18, g as __mf_240, h as __mf_24, w as __mf_72, y as __mf_56 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DE4rTqEA.js";
|
|
3
|
+
import { i as __mf_15, n as __mf_11, r as __mf_14, t as __mf_0, u as __mf_7 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-aFLESEyS.js";
|
|
4
|
+
import { n as a, t as AuthConfigTabs } from "./styles-DZYLavnA.js";
|
|
5
|
+
import { n as createBetterAuthPluginDefinitionSchema, t as createBetterAuthPartialDefinition } from "./models-BOeSYfRn.js";
|
|
6
|
+
import { t as getAuthPluginDefinition } from "./get-auth-plugin-definition-BgWWHl_Y.js";
|
|
7
7
|
//#region src/better-auth/core/components/better-auth-definition-editor.tsx
|
|
8
8
|
init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__();
|
|
9
9
|
function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSave }) {
|
|
@@ -28,11 +28,11 @@ function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSa
|
|
|
28
28
|
const accountsFeature = definition.features.find((f) => f.id === authDefinition.accountsFeatureRef);
|
|
29
29
|
if (!accountsFeature) throw new Error(`Accounts feature not found for ref: ${authDefinition.accountsFeatureRef}`);
|
|
30
30
|
const partialDef = __mf_34(() => createBetterAuthPartialDefinition(authFeature.name, accountsFeature.name), [authFeature.name, accountsFeature.name]);
|
|
31
|
-
const diff = __mf_34(() =>
|
|
31
|
+
const diff = __mf_34(() => __mf_240(definitionContainer.schema, definitionContainer.definition, partialDef), [definitionContainer, partialDef]);
|
|
32
32
|
const onSubmit = handleSubmit((data) => saveDefinitionWithFeedback((draftConfig) => {
|
|
33
33
|
const updatedData = { ...data };
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
__mf_244(definitionContainer, partialDef)(draftConfig);
|
|
35
|
+
__mf_24.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer);
|
|
36
36
|
}, {
|
|
37
37
|
successMessage: "Successfully saved Better Auth plugin!",
|
|
38
38
|
onSuccess: () => {
|
|
@@ -54,15 +54,15 @@ function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSa
|
|
|
54
54
|
className: "auth:max-w-6xl auth:flex-1",
|
|
55
55
|
children: [/* @__PURE__ */ __mf_1("div", {
|
|
56
56
|
className: "auth:pb-16",
|
|
57
|
-
children: /* @__PURE__ */ __mf_2(
|
|
57
|
+
children: /* @__PURE__ */ __mf_2(__mf_196, { children: [/* @__PURE__ */ __mf_2(__mf_197, { children: [/* @__PURE__ */ __mf_2(__mf_200, { children: [/* @__PURE__ */ __mf_1(__mf_201, { children: "Better Auth Configuration" }), /* @__PURE__ */ __mf_1(__mf_199, { children: "The plugin will automatically configure the models it needs." })] }), /* @__PURE__ */ __mf_1(__mf_198, {
|
|
58
58
|
className: "auth:space-y-6",
|
|
59
59
|
children: /* @__PURE__ */ __mf_1(__mf_0, {
|
|
60
60
|
diff,
|
|
61
61
|
upToDateMessage: "All required models are already configured correctly. No changes needed."
|
|
62
62
|
})
|
|
63
|
-
})] }), /* @__PURE__ */ __mf_2(
|
|
63
|
+
})] }), /* @__PURE__ */ __mf_2(__mf_197, { children: [/* @__PURE__ */ __mf_2(__mf_200, { children: [/* @__PURE__ */ __mf_1(__mf_201, { children: "User Management Permissions" }), /* @__PURE__ */ __mf_1(__mf_199, { children: "The \"admin\" role always has user management permissions. Optionally add more roles that can manage users and assign roles in the admin interface." })] }), /* @__PURE__ */ __mf_1(__mf_198, {
|
|
64
64
|
className: "auth:space-y-6",
|
|
65
|
-
children: /* @__PURE__ */ __mf_1(
|
|
65
|
+
children: /* @__PURE__ */ __mf_1(__mf_160, {
|
|
66
66
|
label: "Additional User Admin Roles",
|
|
67
67
|
name: "additionalUserAdminRoles",
|
|
68
68
|
control,
|
|
@@ -70,7 +70,7 @@ function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSa
|
|
|
70
70
|
description: "Additional roles (beyond admin) that can manage users and assign roles."
|
|
71
71
|
})
|
|
72
72
|
})] })] })
|
|
73
|
-
}), /* @__PURE__ */ __mf_1(
|
|
73
|
+
}), /* @__PURE__ */ __mf_1(__mf_128, {
|
|
74
74
|
form,
|
|
75
75
|
allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges
|
|
76
76
|
})]
|
|
@@ -82,17 +82,17 @@ function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSa
|
|
|
82
82
|
//#region src/better-auth/core/web.ts
|
|
83
83
|
var AUTH_FEATURE_NAME = "accounts/auth";
|
|
84
84
|
var ACCOUNTS_FEATURE_NAME = "accounts/users";
|
|
85
|
-
var web_default =
|
|
85
|
+
var web_default = __mf_56({
|
|
86
86
|
name: "web",
|
|
87
87
|
dependencies: {
|
|
88
|
-
webConfig:
|
|
89
|
-
pluginDefaults:
|
|
88
|
+
webConfig: __mf_74,
|
|
89
|
+
pluginDefaults: __mf_72
|
|
90
90
|
},
|
|
91
91
|
initialize: ({ webConfig, pluginDefaults }, { pluginKey }) => {
|
|
92
92
|
webConfig.components.set(pluginKey, BetterAuthDefinitionEditor);
|
|
93
93
|
pluginDefaults.builders.set(pluginKey, ({ draft }) => {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
__mf_18.ensureFeatureByNameRecursively(draft, AUTH_FEATURE_NAME);
|
|
95
|
+
__mf_18.ensureFeatureByNameRecursively(draft, ACCOUNTS_FEATURE_NAME);
|
|
96
96
|
return {
|
|
97
97
|
config: {},
|
|
98
98
|
partialDef: createBetterAuthPartialDefinition(AUTH_FEATURE_NAME, ACCOUNTS_FEATURE_NAME)
|
|
@@ -103,4 +103,4 @@ var web_default = __mf_55({
|
|
|
103
103
|
//#endregion
|
|
104
104
|
export { web_default as default };
|
|
105
105
|
|
|
106
|
-
//# sourceMappingURL=web-
|
|
106
|
+
//# sourceMappingURL=web-DPZssHx1.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { a as __mf_17, o as __mf_19 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-
|
|
1
|
+
import { m as __mf_22, y as __mf_56 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DE4rTqEA.js";
|
|
2
|
+
import { a as __mf_17, o as __mf_19 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-aFLESEyS.js";
|
|
3
3
|
import { t as BETTER_AUTH_MODELS } from "./model-names-CUS5rSei.js";
|
|
4
4
|
//#region src/better-auth/admin/web.ts
|
|
5
|
-
var web_default =
|
|
5
|
+
var web_default = __mf_56({
|
|
6
6
|
name: "web",
|
|
7
7
|
dependencies: {
|
|
8
8
|
adminCrudActionWeb: __mf_17,
|
|
@@ -13,7 +13,7 @@ var web_default = __mf_55({
|
|
|
13
13
|
pluginKey,
|
|
14
14
|
name: "manage-roles",
|
|
15
15
|
label: "Manage Roles",
|
|
16
|
-
isAvailableForModel: (definition, modelId) =>
|
|
16
|
+
isAvailableForModel: (definition, modelId) => __mf_22.byIdOrThrow(definition, modelId).name === BETTER_AUTH_MODELS.user,
|
|
17
17
|
getNewAction: () => ({
|
|
18
18
|
type: "manage-roles",
|
|
19
19
|
position: "dropdown"
|
|
@@ -22,7 +22,7 @@ var web_default = __mf_55({
|
|
|
22
22
|
pluginKey,
|
|
23
23
|
name: "reset-password",
|
|
24
24
|
label: "Reset Password",
|
|
25
|
-
isAvailableForModel: (definition, modelId) =>
|
|
25
|
+
isAvailableForModel: (definition, modelId) => __mf_22.byIdOrThrow(definition, modelId).name === BETTER_AUTH_MODELS.user,
|
|
26
26
|
getNewAction: () => ({
|
|
27
27
|
type: "reset-password",
|
|
28
28
|
position: "dropdown"
|
|
@@ -32,7 +32,7 @@ var web_default = __mf_55({
|
|
|
32
32
|
pluginKey,
|
|
33
33
|
name: "roles",
|
|
34
34
|
label: "Roles",
|
|
35
|
-
isAvailableForModel: (definition, modelId) =>
|
|
35
|
+
isAvailableForModel: (definition, modelId) => __mf_22.byIdOrThrow(definition, modelId).name === BETTER_AUTH_MODELS.user,
|
|
36
36
|
getNewColumn: () => ({
|
|
37
37
|
type: "roles",
|
|
38
38
|
label: "Roles"
|
|
@@ -43,4 +43,4 @@ var web_default = __mf_55({
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { web_default as default };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=web-
|
|
46
|
+
//# sourceMappingURL=web-DiHdy5Ov.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { A as createFieldMapSpec, D as ModelUtils, F as createPluginSpec, O as FeatureUtils, P as isEqual, k as withPlaceholderSlots } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-
|
|
1
|
+
import { C as __mf_3, D as __mf_6, E as __mf_58, G as useFormState, I as create, M as __mf_88, N as __mf_91, O as __mf_83, P as __mf_92, Q as __mf_2, S as __mf_292, T as __mf_5, W as useForm, Z as __mf_1, b as __mf_274, dt as __mf_30, et as __mfDefaultExport, gt as __mf_38, ht as __mf_37$1, k as __mf_85, lt as __mf_25, mt as __mf_34, r as __mf_156, tt as __mf_13, ut as __mf_28, v as __mf_24, vt as init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__, w as __mf_37 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-tY6BN-tn.js";
|
|
2
|
+
import { A as createFieldMapSpec, D as ModelUtils, F as createPluginSpec, O as FeatureUtils, P as isEqual, k as withPlaceholderSlots } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DE4rTqEA.js";
|
|
3
3
|
//#region ../../packages/project-builder-lib/dist/web/components/definition-diff-alert.js
|
|
4
4
|
var CHANGE_TYPE_BADGE_VARIANT = {
|
|
5
5
|
added: "default",
|
|
@@ -17,15 +17,15 @@ function DefinitionDiffEntryRow({ entry }) {
|
|
|
17
17
|
children: [__mf_1(__mf_24, {
|
|
18
18
|
variant: CHANGE_TYPE_BADGE_VARIANT[entry.type],
|
|
19
19
|
children: entry.type
|
|
20
|
-
}), __mf_2(
|
|
21
|
-
render: __mf_1(
|
|
20
|
+
}), __mf_2(__mf_83, { children: [__mf_1(__mf_92, {
|
|
21
|
+
render: __mf_1(__mf_37, {
|
|
22
22
|
variant: "ghost",
|
|
23
23
|
size: "sm"
|
|
24
24
|
}),
|
|
25
25
|
children: "Details"
|
|
26
|
-
}), __mf_2(
|
|
26
|
+
}), __mf_2(__mf_85, {
|
|
27
27
|
width: "xl",
|
|
28
|
-
children: [__mf_1(
|
|
28
|
+
children: [__mf_1(__mf_88, { children: __mf_2(__mf_91, { children: [
|
|
29
29
|
entry.label,
|
|
30
30
|
" — ",
|
|
31
31
|
entry.type
|
|
@@ -37,7 +37,7 @@ function DefinitionDiffEntryRow({ entry }) {
|
|
|
37
37
|
}) : entry.type === "removed" ? __mf_1("pre", {
|
|
38
38
|
className: "text-xs whitespace-pre-wrap",
|
|
39
39
|
children: JSON.stringify(entry.current, null, 2)
|
|
40
|
-
}) : __mf_1(
|
|
40
|
+
}) : __mf_1(__mf_156, {
|
|
41
41
|
oldValue: entry.current,
|
|
42
42
|
newValue: entry.merged
|
|
43
43
|
})
|
|
@@ -47,7 +47,7 @@ function DefinitionDiffEntryRow({ entry }) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function DefinitionDiffAlert({ diff, upToDateMessage = "All changes are up to date. No changes needed." }) {
|
|
50
|
-
if (!diff.hasChanges) return __mf_2(
|
|
50
|
+
if (!diff.hasChanges) return __mf_2(__mf_3, {
|
|
51
51
|
variant: "default",
|
|
52
52
|
children: [__mf_1(__mf_6, { children: "Up to Date" }), __mf_1(__mf_5, { children: upToDateMessage })]
|
|
53
53
|
});
|
|
@@ -90,7 +90,7 @@ function createCreateOption$1(value) {
|
|
|
90
90
|
function FeatureComboboxField({ canCreate, value, ...rest }) {
|
|
91
91
|
const { definition } = useProjectDefinition();
|
|
92
92
|
const [searchQuery, setSearchQuery] = __mf_38(value ? FeatureUtils.getFeatureById(definition, value)?.name : "");
|
|
93
|
-
const featureOptions = __mf_34
|
|
93
|
+
const featureOptions = __mf_34(() => {
|
|
94
94
|
const baseFeatures = definition.features.map((feature) => ({
|
|
95
95
|
label: feature.name,
|
|
96
96
|
value: feature.id,
|
|
@@ -105,7 +105,7 @@ function FeatureComboboxField({ canCreate, value, ...rest }) {
|
|
|
105
105
|
value,
|
|
106
106
|
canCreate
|
|
107
107
|
]);
|
|
108
|
-
return __mf_1(
|
|
108
|
+
return __mf_1(__mf_58, {
|
|
109
109
|
placeholder: "Select a feature",
|
|
110
110
|
...rest,
|
|
111
111
|
inputValue: searchQuery,
|
|
@@ -116,7 +116,7 @@ function FeatureComboboxField({ canCreate, value, ...rest }) {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
function FeatureComboboxFieldController({ name, control, ...rest }) {
|
|
119
|
-
const { field, fieldState: { error } } =
|
|
119
|
+
const { field, fieldState: { error } } = __mf_292({
|
|
120
120
|
name,
|
|
121
121
|
control
|
|
122
122
|
}, rest);
|
|
@@ -140,7 +140,7 @@ function createCreateOption(value) {
|
|
|
140
140
|
function ModelComboboxField({ canCreate, value, ...rest }) {
|
|
141
141
|
const { definition } = useProjectDefinition();
|
|
142
142
|
const [searchQuery, setSearchQuery] = __mf_38("");
|
|
143
|
-
const modelOptions = __mf_34
|
|
143
|
+
const modelOptions = __mf_34(() => {
|
|
144
144
|
const baseModels = definition.models.map((model) => ({
|
|
145
145
|
label: model.name,
|
|
146
146
|
value: model.id
|
|
@@ -154,7 +154,7 @@ function ModelComboboxField({ canCreate, value, ...rest }) {
|
|
|
154
154
|
value,
|
|
155
155
|
canCreate
|
|
156
156
|
]);
|
|
157
|
-
return __mf_1(
|
|
157
|
+
return __mf_1(__mf_58, {
|
|
158
158
|
placeholder: "Select a model",
|
|
159
159
|
...rest,
|
|
160
160
|
onInputValueChange: canCreate ? setSearchQuery : void 0,
|
|
@@ -163,7 +163,7 @@ function ModelComboboxField({ canCreate, value, ...rest }) {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
function ModelComboboxFieldController({ name, control, ...rest }) {
|
|
166
|
-
const { field, fieldState: { error } } =
|
|
166
|
+
const { field, fieldState: { error } } = __mf_292({
|
|
167
167
|
name,
|
|
168
168
|
control
|
|
169
169
|
}, rest);
|
|
@@ -260,7 +260,7 @@ function useBlockDirtyFormNavigate(formState, reset) {
|
|
|
260
260
|
//#region ../../packages/project-builder-lib/dist/web/hooks/use-block-unsaved-changes-navigate.js
|
|
261
261
|
init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__();
|
|
262
262
|
function useBlockUnsavedChangesNavigate({ control, reset, onSubmit }) {
|
|
263
|
-
const isDirtyRef = __mf_37(false);
|
|
263
|
+
const isDirtyRef = __mf_37$1(false);
|
|
264
264
|
const formState = useFormState({ control });
|
|
265
265
|
isDirtyRef.current = formState.isDirty;
|
|
266
266
|
useBlockerDialog({
|
|
@@ -285,7 +285,7 @@ function useBlockUnsavedChangesNavigate({ control, reset, onSubmit }) {
|
|
|
285
285
|
init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__();
|
|
286
286
|
function useDefinitionSchema(schemaCreator) {
|
|
287
287
|
const { definitionSchemaParserContext } = useProjectDefinition();
|
|
288
|
-
return __mf_34
|
|
288
|
+
return __mf_34(() => {
|
|
289
289
|
if ("slotDefinition" in schemaCreator) return withPlaceholderSlots(schemaCreator)(definitionSchemaParserContext);
|
|
290
290
|
return schemaCreator(definitionSchemaParserContext);
|
|
291
291
|
}, [definitionSchemaParserContext, schemaCreator]);
|
|
@@ -306,11 +306,11 @@ function useResettableForm(props) {
|
|
|
306
306
|
const { reset, formState } = formProps;
|
|
307
307
|
const { isDirty } = formState;
|
|
308
308
|
const { updatedExternally } = useProjectDefinition();
|
|
309
|
-
const oldValues = __mf_37(void 0);
|
|
309
|
+
const oldValues = __mf_37$1(void 0);
|
|
310
310
|
__mf_28(() => {
|
|
311
311
|
if (oldValues.current && !isEqual(oldValues.current.oldDefaultValues, props?.defaultValues)) {
|
|
312
312
|
reset(props?.defaultValues);
|
|
313
|
-
if (isDirty && updatedExternally)
|
|
313
|
+
if (isDirty && updatedExternally) __mf_274.warning("Contents were updated externally so form was reset!");
|
|
314
314
|
}
|
|
315
315
|
if (!oldValues.current || !isEqual(oldValues.current.oldDefaultValues, props?.defaultValues)) oldValues.current = { oldDefaultValues: props?.defaultValues };
|
|
316
316
|
}, [
|
|
@@ -407,4 +407,4 @@ function setUndefinedIfEmpty(value) {
|
|
|
407
407
|
//#endregion
|
|
408
408
|
export { DefinitionDiffAlert, ErrorHandlerContext, FeatureComboboxField, FeatureComboboxFieldController, ModelComboboxField, ModelComboboxFieldController, ProjectDefinitionContext, adminCrudActionWebSpec, adminCrudColumnWebSpec, adminCrudInputWebSpec, createAdminCrudActionWebConfig, createAdminCrudColumnWebConfig, createAdminCrudInputWebConfig, createModelTransformerWebConfig, createWebAppSettingsWebConfig, entityTypeUrlWebSpec, modelTransformerWebSpec, setUndefinedIfEmpty, useBlockBeforeContinue, useBlockDirtyFormNavigate, useBlockUnsavedChangesNavigate, useBlockerDialog, useBlockerDialogState, useDefinitionSchema, useErrorHandler, useProjectDefinition, useResettableForm, webAppSchemaExtensionWebSpec };
|
|
409
409
|
|
|
410
|
-
//# sourceMappingURL=web-
|
|
410
|
+
//# sourceMappingURL=web-RWlatCpa.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Q as __mf_2, Z as __mf_1,
|
|
2
|
-
import { T as
|
|
3
|
-
import { i as __mf_15, n as __mf_11, r as __mf_14, t as __mf_0, u as __mf_7 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-
|
|
4
|
-
import { n as a, t as AuthConfigTabs } from "./styles-
|
|
5
|
-
import { t as getAuthPluginDefinition } from "./get-auth-plugin-definition-
|
|
6
|
-
import "./auth-
|
|
7
|
-
import { n as PLACEHOLDER_AUTH_MODELS, t as createPlaceholderAuthPluginDefinitionSchema } from "./plugin-definition-
|
|
1
|
+
import { Q as __mf_2, Z as __mf_1, d as __mf_196, f as __mf_197, g as __mf_201, h as __mf_200, m as __mf_199, mt as __mf_34, p as __mf_198, t as __mf_128, vt as init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__ } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-tY6BN-tn.js";
|
|
2
|
+
import { T as __mf_74, _ as __mf_244, f as __mf_18, g as __mf_240, h as __mf_24, w as __mf_72, y as __mf_56 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DE4rTqEA.js";
|
|
3
|
+
import { i as __mf_15, n as __mf_11, r as __mf_14, t as __mf_0, u as __mf_7 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-aFLESEyS.js";
|
|
4
|
+
import { n as a, t as AuthConfigTabs } from "./styles-DZYLavnA.js";
|
|
5
|
+
import { t as getAuthPluginDefinition } from "./get-auth-plugin-definition-BgWWHl_Y.js";
|
|
6
|
+
import "./auth-DR6QxrAW.js";
|
|
7
|
+
import { n as PLACEHOLDER_AUTH_MODELS, t as createPlaceholderAuthPluginDefinitionSchema } from "./plugin-definition-CMwSlxsJ.js";
|
|
8
8
|
//#region src/placeholder-auth/core/schema/models.ts
|
|
9
9
|
init__virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare__react__loadShare__();
|
|
10
10
|
function createPlaceholderAuthPartialDefinition(authFeatureName) {
|
|
@@ -56,11 +56,11 @@ function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, metadata,
|
|
|
56
56
|
const authFeature = definition.features.find((f) => f.id === authDefinition.authFeatureRef);
|
|
57
57
|
if (!authFeature) throw new Error(`Auth feature not found for ref: ${authDefinition.authFeatureRef}`);
|
|
58
58
|
const partialDef = __mf_34(() => createPlaceholderAuthPartialDefinition(authFeature.name), [authFeature.name]);
|
|
59
|
-
const diff = __mf_34(() =>
|
|
59
|
+
const diff = __mf_34(() => __mf_240(definitionContainer.schema, definitionContainer.definition, partialDef), [definitionContainer, partialDef]);
|
|
60
60
|
const onSubmit = handleSubmit((data) => saveDefinitionWithFeedback((draftConfig) => {
|
|
61
61
|
const updatedData = { ...data };
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
__mf_244(definitionContainer, partialDef)(draftConfig);
|
|
63
|
+
__mf_24.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer);
|
|
64
64
|
}, {
|
|
65
65
|
successMessage: "Successfully saved placeholder auth plugin!",
|
|
66
66
|
onSuccess: () => {
|
|
@@ -82,14 +82,14 @@ function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, metadata,
|
|
|
82
82
|
className: "auth:max-w-6xl auth:flex-1",
|
|
83
83
|
children: [/* @__PURE__ */ __mf_1("div", {
|
|
84
84
|
className: "auth:pb-16",
|
|
85
|
-
children: /* @__PURE__ */ __mf_1(
|
|
85
|
+
children: /* @__PURE__ */ __mf_1(__mf_196, { children: /* @__PURE__ */ __mf_2(__mf_197, { children: [/* @__PURE__ */ __mf_2(__mf_200, { children: [/* @__PURE__ */ __mf_1(__mf_201, { children: "Placeholder Auth Configuration" }), /* @__PURE__ */ __mf_1(__mf_199, { children: "The plugin will automatically configure the models it needs." })] }), /* @__PURE__ */ __mf_1(__mf_198, {
|
|
86
86
|
className: "auth:space-y-6",
|
|
87
87
|
children: /* @__PURE__ */ __mf_1(__mf_0, {
|
|
88
88
|
diff,
|
|
89
89
|
upToDateMessage: "All required models are already configured correctly. No changes needed."
|
|
90
90
|
})
|
|
91
91
|
})] }) })
|
|
92
|
-
}), /* @__PURE__ */ __mf_1(
|
|
92
|
+
}), /* @__PURE__ */ __mf_1(__mf_128, {
|
|
93
93
|
form,
|
|
94
94
|
allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges
|
|
95
95
|
})]
|
|
@@ -100,16 +100,16 @@ function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, metadata,
|
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/placeholder-auth/core/web.ts
|
|
102
102
|
var AUTH_FEATURE_NAME = "accounts/auth";
|
|
103
|
-
var web_default =
|
|
103
|
+
var web_default = __mf_56({
|
|
104
104
|
name: "web",
|
|
105
105
|
dependencies: {
|
|
106
|
-
webConfig:
|
|
107
|
-
pluginDefaults:
|
|
106
|
+
webConfig: __mf_74,
|
|
107
|
+
pluginDefaults: __mf_72
|
|
108
108
|
},
|
|
109
109
|
initialize: ({ webConfig, pluginDefaults }, { pluginKey }) => {
|
|
110
110
|
webConfig.components.set(pluginKey, PlaceholderAuthDefinitionEditor);
|
|
111
111
|
pluginDefaults.builders.set(pluginKey, ({ draft }) => {
|
|
112
|
-
|
|
112
|
+
__mf_18.ensureFeatureByNameRecursively(draft, AUTH_FEATURE_NAME);
|
|
113
113
|
return {
|
|
114
114
|
config: {},
|
|
115
115
|
partialDef: createPlaceholderAuthPartialDefinition(AUTH_FEATURE_NAME)
|
|
@@ -120,4 +120,4 @@ var web_default = __mf_55({
|
|
|
120
120
|
//#endregion
|
|
121
121
|
export { web_default as default };
|
|
122
122
|
|
|
123
|
-
//# sourceMappingURL=web-
|
|
123
|
+
//# sourceMappingURL=web-f-cndKO0.js.map
|
package/dist/web/index.html
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
<meta charset="UTF-8" />
|
|
16
16
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
17
|
<title>React Remote</title>
|
|
18
|
-
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-0-
|
|
19
|
-
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-1-
|
|
20
|
-
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-2-
|
|
21
|
-
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-3-
|
|
18
|
+
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-0-ed392701.js"></script>
|
|
19
|
+
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-1-e2d80a25.js"></script>
|
|
20
|
+
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-2-ea90e6fe.js"></script>
|
|
21
|
+
<script type="module" crossorigin src="./assets/mf-entry-bootstrap-3-5268230e.js"></script>
|
|
22
22
|
</head>
|
|
23
23
|
|
|
24
24
|
<body>
|
package/dist/web/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as init, t as getExposes } from "./assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-
|
|
1
|
+
import { n as init, t as getExposes } from "./assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-rNmzkDAw.js";
|
|
2
2
|
export { getExposes as get, init };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseplate-dev/plugin-auth",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.20",
|
|
4
4
|
"description": "Contains the auth plugin for Baseplate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
"react-hook-form": "^7.71.1",
|
|
44
44
|
"react-icons": "^5.7.0",
|
|
45
45
|
"zod": "~4.3.6",
|
|
46
|
-
"@baseplate-dev/core-generators": "0.6.
|
|
47
|
-
"@baseplate-dev/fastify-generators": "0.6.
|
|
48
|
-
"@baseplate-dev/plugin-email": "0.6.
|
|
49
|
-
"@baseplate-dev/plugin-queue": "0.6.
|
|
50
|
-
"@baseplate-dev/plugin-rate-limit": "0.6.
|
|
51
|
-
"@baseplate-dev/project-builder-lib": "0.6.
|
|
52
|
-
"@baseplate-dev/react-generators": "0.6.
|
|
53
|
-
"@baseplate-dev/sync": "0.6.
|
|
54
|
-
"@baseplate-dev/ui-components": "0.6.
|
|
55
|
-
"@baseplate-dev/utils": "0.6.
|
|
46
|
+
"@baseplate-dev/core-generators": "0.6.20",
|
|
47
|
+
"@baseplate-dev/fastify-generators": "0.6.20",
|
|
48
|
+
"@baseplate-dev/plugin-email": "0.6.20",
|
|
49
|
+
"@baseplate-dev/plugin-queue": "0.6.20",
|
|
50
|
+
"@baseplate-dev/plugin-rate-limit": "0.6.20",
|
|
51
|
+
"@baseplate-dev/project-builder-lib": "0.6.20",
|
|
52
|
+
"@baseplate-dev/react-generators": "0.6.20",
|
|
53
|
+
"@baseplate-dev/sync": "0.6.20",
|
|
54
|
+
"@baseplate-dev/ui-components": "0.6.20",
|
|
55
|
+
"@baseplate-dev/utils": "0.6.20"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@module-federation/vite": "1.20.5",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"tailwindcss": "4.3.3",
|
|
70
70
|
"typescript": "6.0.3",
|
|
71
71
|
"vite": "8.2.0",
|
|
72
|
-
"vitest": "4.1.
|
|
73
|
-
"@baseplate-dev/tools": "0.6.
|
|
72
|
+
"vitest": "4.1.11",
|
|
73
|
+
"@baseplate-dev/tools": "0.6.20"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": "^24.0.0"
|
package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cookie signing utilities
|
|
3
|
-
* Based on node-cookie-signature by TJ Holowaychuk
|
|
4
|
-
* Source: https://github.com/tj/node-cookie-signature
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Sign the given `val` with `secret` using HMAC-SHA256.
|
|
8
|
-
*
|
|
9
|
-
* @param val - The value to sign.
|
|
10
|
-
* @param secret - The secret key to use for signing.
|
|
11
|
-
* @returns The signed value.
|
|
12
|
-
*/
|
|
13
|
-
export declare function sign(val: string, secret: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Unsign and decode the given `input` with `secret`,
|
|
16
|
-
*
|
|
17
|
-
* @param input - The signed cookie string to unsign.
|
|
18
|
-
* @param secret - The secret key used for signing.
|
|
19
|
-
* @returns The unsigned value or undefined if the signature is invalid.
|
|
20
|
-
*/
|
|
21
|
-
export declare function unsign(input: string, secret: string): string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Sign an object by JSON stringifying and base64 encoding it, then signing with secret.
|
|
24
|
-
*
|
|
25
|
-
* @param obj - The object to sign.
|
|
26
|
-
* @param secret - The secret key to use for signing.
|
|
27
|
-
* @returns The signed encoded object.
|
|
28
|
-
*/
|
|
29
|
-
export declare function signObject(obj: unknown, secret: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Unsign and decode an object that was signed with signObject.
|
|
32
|
-
*
|
|
33
|
-
* @param input - The signed encoded object string to unsign.
|
|
34
|
-
* @param secret - The secret key used for signing.
|
|
35
|
-
* @returns The decoded object or undefined if the signature is invalid.
|
|
36
|
-
*/
|
|
37
|
-
export declare function unsignObject(input: string, secret: string): unknown;
|
|
38
|
-
//# sourceMappingURL=cookie-signer.d.ts.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import * as crypto from 'node:crypto';
|
|
3
|
-
/**
|
|
4
|
-
* Cookie signing utilities
|
|
5
|
-
* Based on node-cookie-signature by TJ Holowaychuk
|
|
6
|
-
* Source: https://github.com/tj/node-cookie-signature
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Sign the given `val` with `secret` using HMAC-SHA256.
|
|
10
|
-
*
|
|
11
|
-
* @param val - The value to sign.
|
|
12
|
-
* @param secret - The secret key to use for signing.
|
|
13
|
-
* @returns The signed value.
|
|
14
|
-
*/
|
|
15
|
-
export function sign(val, secret) {
|
|
16
|
-
return `${val}.${crypto
|
|
17
|
-
.createHmac('sha256', secret)
|
|
18
|
-
.update(val)
|
|
19
|
-
.digest('base64')
|
|
20
|
-
// remove all equal signs since they are not valid in cookie values
|
|
21
|
-
.replaceAll('=', '')}`;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Unsign and decode the given `input` with `secret`,
|
|
25
|
-
*
|
|
26
|
-
* @param input - The signed cookie string to unsign.
|
|
27
|
-
* @param secret - The secret key used for signing.
|
|
28
|
-
* @returns The unsigned value or undefined if the signature is invalid.
|
|
29
|
-
*/
|
|
30
|
-
export function unsign(input, secret) {
|
|
31
|
-
const tentativeValue = input.slice(0, input.lastIndexOf('.'));
|
|
32
|
-
const expectedInput = sign(tentativeValue, secret);
|
|
33
|
-
const expectedBuffer = Buffer.from(expectedInput);
|
|
34
|
-
const inputBuffer = Buffer.from(input);
|
|
35
|
-
if (expectedBuffer.length !== inputBuffer.length ||
|
|
36
|
-
!crypto.timingSafeEqual(expectedBuffer, inputBuffer)) {
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
return tentativeValue;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Sign an object by JSON stringifying and base64 encoding it, then signing with secret.
|
|
43
|
-
*
|
|
44
|
-
* @param obj - The object to sign.
|
|
45
|
-
* @param secret - The secret key to use for signing.
|
|
46
|
-
* @returns The signed encoded object.
|
|
47
|
-
*/
|
|
48
|
-
export function signObject(obj, secret) {
|
|
49
|
-
const encoded = Buffer.from(JSON.stringify(obj)).toString('base64url');
|
|
50
|
-
return sign(encoded, secret);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Unsign and decode an object that was signed with signObject.
|
|
54
|
-
*
|
|
55
|
-
* @param input - The signed encoded object string to unsign.
|
|
56
|
-
* @param secret - The secret key used for signing.
|
|
57
|
-
* @returns The decoded object or undefined if the signature is invalid.
|
|
58
|
-
*/
|
|
59
|
-
export function unsignObject(input, secret) {
|
|
60
|
-
const unsigned = unsign(input, secret);
|
|
61
|
-
if (!unsigned)
|
|
62
|
-
return undefined;
|
|
63
|
-
try {
|
|
64
|
-
const decoded = Buffer.from(unsigned, 'base64url').toString('utf8');
|
|
65
|
-
return JSON.parse(decoded);
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=cookie-signer.js.map
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import * as crypto from 'node:crypto';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Cookie signing utilities
|
|
7
|
-
* Based on node-cookie-signature by TJ Holowaychuk
|
|
8
|
-
* Source: https://github.com/tj/node-cookie-signature
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Sign the given `val` with `secret` using HMAC-SHA256.
|
|
13
|
-
*
|
|
14
|
-
* @param val - The value to sign.
|
|
15
|
-
* @param secret - The secret key to use for signing.
|
|
16
|
-
* @returns The signed value.
|
|
17
|
-
*/
|
|
18
|
-
export function sign(val: string, secret: string): string {
|
|
19
|
-
return `${val}.${crypto
|
|
20
|
-
.createHmac('sha256', secret)
|
|
21
|
-
.update(val)
|
|
22
|
-
.digest('base64')
|
|
23
|
-
// remove all equal signs since they are not valid in cookie values
|
|
24
|
-
.replaceAll('=', '')}`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Unsign and decode the given `input` with `secret`,
|
|
29
|
-
*
|
|
30
|
-
* @param input - The signed cookie string to unsign.
|
|
31
|
-
* @param secret - The secret key used for signing.
|
|
32
|
-
* @returns The unsigned value or undefined if the signature is invalid.
|
|
33
|
-
*/
|
|
34
|
-
export function unsign(input: string, secret: string): string | undefined {
|
|
35
|
-
const tentativeValue = input.slice(0, input.lastIndexOf('.'));
|
|
36
|
-
const expectedInput = sign(tentativeValue, secret);
|
|
37
|
-
const expectedBuffer = Buffer.from(expectedInput);
|
|
38
|
-
const inputBuffer = Buffer.from(input);
|
|
39
|
-
if (
|
|
40
|
-
expectedBuffer.length !== inputBuffer.length ||
|
|
41
|
-
!crypto.timingSafeEqual(expectedBuffer, inputBuffer)
|
|
42
|
-
) {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
return tentativeValue;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Sign an object by JSON stringifying and base64 encoding it, then signing with secret.
|
|
50
|
-
*
|
|
51
|
-
* @param obj - The object to sign.
|
|
52
|
-
* @param secret - The secret key to use for signing.
|
|
53
|
-
* @returns The signed encoded object.
|
|
54
|
-
*/
|
|
55
|
-
export function signObject(obj: unknown, secret: string): string {
|
|
56
|
-
const encoded = Buffer.from(JSON.stringify(obj)).toString('base64url');
|
|
57
|
-
return sign(encoded, secret);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Unsign and decode an object that was signed with signObject.
|
|
62
|
-
*
|
|
63
|
-
* @param input - The signed encoded object string to unsign.
|
|
64
|
-
* @param secret - The secret key used for signing.
|
|
65
|
-
* @returns The decoded object or undefined if the signature is invalid.
|
|
66
|
-
*/
|
|
67
|
-
export function unsignObject(input: string, secret: string): unknown {
|
|
68
|
-
const unsigned = unsign(input, secret);
|
|
69
|
-
if (!unsigned) return undefined;
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
const decoded = Buffer.from(unsigned, 'base64url').toString('utf8');
|
|
73
|
-
return JSON.parse(decoded);
|
|
74
|
-
} catch {
|
|
75
|
-
return undefined;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./get-auth-plugin-definition-DyokUVjX.js";
|