@baseplate-dev/plugin-auth 4.0.2 → 5.0.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/CHANGELOG.md +59 -0
- package/README.md +3 -3
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +2 -1
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/plugin-definition.d.ts +2 -12
- package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/schema.d.ts +2 -12
- package/dist/auth/core/schema/roles/schema.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/schema.js +10 -17
- package/dist/auth/core/schema/roles/schema.js.map +1 -1
- package/dist/auth/plugin.json +1 -1
- package/dist/better-auth/constants/model-names.d.ts +8 -0
- package/dist/better-auth/constants/model-names.d.ts.map +1 -0
- package/dist/better-auth/constants/model-names.js +8 -0
- package/dist/better-auth/constants/model-names.js.map +1 -0
- package/dist/better-auth/constants/packages.d.ts +4 -0
- package/dist/better-auth/constants/packages.d.ts.map +1 -0
- package/dist/better-auth/constants/packages.js +4 -0
- package/dist/better-auth/constants/packages.js.map +1 -0
- package/dist/better-auth/core/common.d.ts.map +1 -0
- package/dist/better-auth/core/common.js +17 -0
- package/dist/better-auth/core/common.js.map +1 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.d.ts +5 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +1 -0
- package/dist/{auth0/core/components/auth0-definition-editor.js → better-auth/core/components/better-auth-definition-editor.js} +17 -17
- package/dist/better-auth/core/components/better-auth-definition-editor.js.map +1 -0
- package/dist/better-auth/core/index.d.ts +2 -0
- package/dist/better-auth/core/index.d.ts.map +1 -0
- package/dist/better-auth/core/index.js +2 -0
- package/dist/better-auth/core/index.js.map +1 -0
- package/dist/better-auth/core/node.d.ts.map +1 -0
- package/dist/{auth0 → better-auth}/core/node.js +16 -14
- package/dist/better-auth/core/node.js.map +1 -0
- package/dist/better-auth/core/schema/models.d.ts +3 -0
- package/dist/better-auth/core/schema/models.d.ts.map +1 -0
- package/dist/better-auth/core/schema/models.js +278 -0
- package/dist/better-auth/core/schema/models.js.map +1 -0
- package/dist/better-auth/core/schema/plugin-definition.d.ts +5 -0
- package/dist/better-auth/core/schema/plugin-definition.d.ts.map +1 -0
- package/dist/better-auth/core/schema/plugin-definition.js +4 -0
- package/dist/better-auth/core/schema/plugin-definition.js.map +1 -0
- package/dist/better-auth/core/web.d.ts.map +1 -0
- package/dist/{auth0 → better-auth}/core/web.js +2 -2
- package/dist/better-auth/core/web.js.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts → better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts} +20 -26
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +75 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/index.d.ts +41 -26
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js +11 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts +16 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js +28 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.d.ts +16 -10
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.js +35 -16
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +30 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +37 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.d.ts +29 -20
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.js +37 -9
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts +4 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.js +3 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/plugins/better-auth.plugin.ts +31 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/templates/module/schema/user-session.queries.ts +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +62 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/user-session.service.ts +72 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/utils/headers.utils.ts +21 -0
- package/dist/better-auth/generators/fastify/index.d.ts +2 -0
- package/dist/better-auth/generators/fastify/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/index.js +2 -0
- package/dist/better-auth/generators/fastify/index.js.map +1 -0
- package/dist/better-auth/generators/index.d.ts.map +1 -0
- package/dist/better-auth/generators/index.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts} +11 -7
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.js → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js} +8 -8
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/index.d.ts +21 -8
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js +11 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +14 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/template-paths.js +9 -7
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts +27 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js +43 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.d.ts +2 -2
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.js +5 -5
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.d.ts +21 -3
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.js +7 -3
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts +2 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.js +2 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-log-out.ts +18 -0
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-session.ts +30 -0
- package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts} +15 -6
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.js → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js} +7 -7
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts +246 -6
- package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.js +9 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts +13 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js +25 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +1 -0
- package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/better-auth-pages}/generated/template-renderers.d.ts +13 -9
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js +44 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +895 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +35 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.d.ts +2 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.js +2 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/login.tsx +146 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/register.tsx +162 -0
- package/dist/better-auth/generators/react/index.d.ts +4 -0
- package/dist/better-auth/generators/react/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/index.js +4 -0
- package/dist/better-auth/generators/react/index.js.map +1 -0
- package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts +42 -7
- package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/index.js +11 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts +13 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js +25 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/react-better-auth}/generated/template-renderers.d.ts +28 -9
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js +51 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +21 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +30 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js.map +1 -0
- package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/typed-templates.d.ts +16 -2
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js +33 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/index.d.ts +4 -0
- package/dist/better-auth/generators/react/react-better-auth/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/index.js +3 -0
- package/dist/better-auth/generators/react/react-better-auth/index.js.map +1 -0
- package/dist/{auth0/generators/react/react-auth0/react-auth0.generator.d.ts → better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts} +28 -25
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js +74 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +58 -0
- package/dist/better-auth/generators/react/react-better-auth/templates/src/services/auth-client.ts +15 -0
- package/dist/better-auth/index.d.ts +3 -0
- package/dist/better-auth/index.d.ts.map +1 -0
- package/dist/better-auth/index.js +2 -0
- package/dist/better-auth/index.js.map +1 -0
- package/dist/better-auth/plugin.json +9 -0
- package/dist/better-auth/static/icon.svg +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.js +11 -11
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +8 -4
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +13 -3
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +24 -14
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +0 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +3 -3
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +1 -11
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +34 -16
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +6 -23
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -1
- 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.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +3 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +9 -5
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +11 -9
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +11 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +25 -4
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +24 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +25 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +30 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +34 -15
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +58 -15
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +8 -6
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts +2 -4
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +254 -252
- package/dist/local-auth/core/schema/models.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +2 -2
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +11 -11
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
- package/dist/placeholder-auth/core/schema/models.d.ts +2 -4
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/models.js +30 -28
- package/dist/placeholder-auth/core/schema/models.js.map +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-D3-Gk9mI.js → __federation_expose_authCoreCommon-CIVhaGqo.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-D3-Gk9mI.js.map → __federation_expose_authCoreCommon-CIVhaGqo.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-DZoAij9e.js → __federation_expose_authCoreWeb-N-mh42Bs.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-DZoAij9e.js.map → __federation_expose_authCoreWeb-N-mh42Bs.js.map} +1 -1
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js +20 -0
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js +402 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js.map +1 -0
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-BRHnF0Hn.js → __federation_expose_local-authAdminCommon-DvHe9w29.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-BRHnF0Hn.js.map → __federation_expose_local-authAdminCommon-DvHe9w29.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-dYAIxuqC.js → __federation_expose_local-authAdminWeb-CLU9aEy9.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-dYAIxuqC.js.map → __federation_expose_local-authAdminWeb-CLU9aEy9.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CIwvOx0d.js → __federation_expose_local-authCoreCommon-DbuvGG7o.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CIwvOx0d.js.map → __federation_expose_local-authCoreCommon-DbuvGG7o.js.map} +1 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js +432 -0
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-gFDSzGjB.js → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-gFDSzGjB.js.map → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-BZLwIkLk.js → __federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js} +61 -53
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-pxYUpmb_.js → __federation_fn_import-BLFDCY-V.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-pxYUpmb_.js.map → __federation_fn_import-BLFDCY-V.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXi2UCP-.js → web-bRU6KpPk.js} +48 -26
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-bRU6KpPk.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-O0clDXMb.js → project-builder-lib-CQKLkNsU.js} +5705 -1957
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CQKLkNsU.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-BpuFQk6s.js → ui-components-DhyoEUTy.js} +5889 -1194
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-UiZ-8JBg.js → utils-9w-0yxVZ.js} +64 -45
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-BPEAtEJI.js → react-router-CbExBaoL.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-BPEAtEJI.js.map → react-router-CbExBaoL.js.map} +1 -1
- package/dist/web/assets/{__federation_shared_zod-B6wbpZ4f.js → __federation_shared_zod-Do7Aa1b5.js} +3431 -2188
- package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-DPsrvQbo.js → get-auth-plugin-definition-BL50g0cJ.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-DPsrvQbo.js.map → get-auth-plugin-definition-BL50g0cJ.js.map} +1 -1
- package/dist/web/assets/{index-CSfs0UAV.js → index-B_A3cgiy.js} +2 -2
- package/dist/web/assets/{index-CSfs0UAV.js.map → index-B_A3cgiy.js.map} +1 -1
- package/dist/web/assets/{index.esm-BoRQu8mM.js → index.esm-BraHxHLB.js} +338 -231
- package/dist/web/assets/index.esm-BraHxHLB.js.map +1 -0
- package/dist/web/assets/{isEqual-BQtm2LNT.js → isEqual-tnzoadW8.js} +18 -18
- package/dist/web/assets/isEqual-tnzoadW8.js.map +1 -0
- package/dist/web/assets/mergeWith-VagwCqUi.js +76 -0
- package/dist/web/assets/mergeWith-VagwCqUi.js.map +1 -0
- package/dist/web/assets/model-utils-BfcjfzCn.js +694 -0
- package/dist/web/assets/model-utils-BfcjfzCn.js.map +1 -0
- package/dist/web/assets/plugin-definition-CXnKUJ1l.js +20 -0
- package/dist/web/assets/plugin-definition-CXnKUJ1l.js.map +1 -0
- package/dist/web/assets/{plugin-definition-DRhTuQas.js → plugin-definition-Ckl5hjD1.js} +2 -2
- package/dist/web/assets/{plugin-definition-DRhTuQas.js.map → plugin-definition-Ckl5hjD1.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BMYDEj3f.js → plugin-definition-D26rR8AB.js} +2 -2
- package/dist/web/assets/{plugin-definition-BMYDEj3f.js.map → plugin-definition-D26rR8AB.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-j1nJ0FFI.js → plugin-definition-DJzXScRp.js} +12 -19
- package/dist/web/assets/plugin-definition-DJzXScRp.js.map +1 -0
- package/dist/web/assets/{react-CBhSWxr_.js → react-CL9M_wyN.js} +2 -2
- package/dist/web/assets/{react-CBhSWxr_.js.map → react-CL9M_wyN.js.map} +1 -1
- package/dist/web/assets/{registries-19UehlAo.js → registries-Tz_dluz3.js} +51 -13
- package/dist/web/assets/registries-Tz_dluz3.js.map +1 -0
- package/dist/web/assets/remoteEntry.js +14 -14
- package/dist/web/assets/{styles-BbHyE-2h.js → styles-tkrWV-ZE.js} +4 -4
- package/dist/web/assets/{styles-BbHyE-2h.js.map → styles-tkrWV-ZE.js.map} +1 -1
- package/package.json +17 -16
- package/dist/auth0/constants/model-names.d.ts +0 -4
- package/dist/auth0/constants/model-names.d.ts.map +0 -1
- package/dist/auth0/constants/model-names.js +0 -4
- package/dist/auth0/constants/model-names.js.map +0 -1
- package/dist/auth0/constants/packages.d.ts +0 -6
- package/dist/auth0/constants/packages.d.ts.map +0 -1
- package/dist/auth0/constants/packages.js +0 -6
- package/dist/auth0/constants/packages.js.map +0 -1
- package/dist/auth0/core/common.d.ts.map +0 -1
- package/dist/auth0/core/common.js +0 -19
- package/dist/auth0/core/common.js.map +0 -1
- package/dist/auth0/core/components/auth0-definition-editor.d.ts +0 -5
- package/dist/auth0/core/components/auth0-definition-editor.d.ts.map +0 -1
- package/dist/auth0/core/components/auth0-definition-editor.js.map +0 -1
- package/dist/auth0/core/node.d.ts.map +0 -1
- package/dist/auth0/core/node.js.map +0 -1
- package/dist/auth0/core/schema/migrations.d.ts +0 -3
- package/dist/auth0/core/schema/migrations.d.ts.map +0 -1
- package/dist/auth0/core/schema/migrations.js +0 -19
- package/dist/auth0/core/schema/migrations.js.map +0 -1
- package/dist/auth0/core/schema/models.d.ts +0 -5
- package/dist/auth0/core/schema/models.d.ts.map +0 -1
- package/dist/auth0/core/schema/models.js +0 -40
- package/dist/auth0/core/schema/models.js.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +0 -5
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.js +0 -4
- package/dist/auth0/core/schema/plugin-definition.js.map +0 -1
- package/dist/auth0/core/web.d.ts.map +0 -1
- package/dist/auth0/core/web.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +0 -114
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js +0 -11
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +0 -14
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +0 -24
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +0 -10
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +0 -23
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts +0 -2
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/index.js +0 -2
- package/dist/auth0/generators/fastify/auth0-module/index.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/templates/module/services/management.ts +0 -22
- package/dist/auth0/generators/fastify/auth0-module/templates/module/services/user-session.service.ts +0 -101
- package/dist/auth0/generators/fastify/index.d.ts +0 -2
- package/dist/auth0/generators/fastify/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/index.js +0 -2
- package/dist/auth0/generators/fastify/index.js.map +0 -1
- package/dist/auth0/generators/index.d.ts.map +0 -1
- package/dist/auth0/generators/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts +0 -10
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js +0 -41
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/index.js +0 -2
- package/dist/auth0/generators/react/auth0-apollo/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +0 -11
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js +0 -11
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +0 -14
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +0 -23
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +0 -38
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/index.js +0 -2
- package/dist/auth0/generators/react/auth0-hooks/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-log-out.ts +0 -14
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-session.ts +0 -36
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.js +0 -9
- package/dist/auth0/generators/react/auth0-pages/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts +0 -12
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js +0 -20
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js +0 -37
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +0 -433
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js +0 -18
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-pages/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/index.js +0 -2
- package/dist/auth0/generators/react/auth0-pages/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/templates/routes/login.tsx +0 -31
- package/dist/auth0/generators/react/index.d.ts +0 -5
- package/dist/auth0/generators/react/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/index.js +0 -5
- package/dist/auth0/generators/react/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/index.js +0 -9
- package/dist/auth0/generators/react/react-auth0/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts +0 -12
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js +0 -22
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js +0 -39
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js +0 -17
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/index.d.ts +0 -2
- package/dist/auth0/generators/react/react-auth0/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/index.js +0 -2
- package/dist/auth0/generators/react/react-auth0/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js +0 -107
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/templates/src/app/auth-loaded-gate.tsx +0 -78
- package/dist/auth0/plugin.json +0 -9
- package/dist/auth0/static/icon.svg +0 -7
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.d.ts.map +0 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DKJVe6Rd.js +0 -40
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DKJVe6Rd.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-CfhSWZsK.js +0 -158
- package/dist/web/assets/__federation_expose_auth0CoreWeb-CfhSWZsK.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-Bwooi2qZ.js +0 -424
- package/dist/web/assets/__federation_expose_local-authCoreWeb-Bwooi2qZ.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BZLwIkLk.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXi2UCP-.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-O0clDXMb.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BpuFQk6s.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-UiZ-8JBg.js.map +0 -1
- package/dist/web/assets/__federation_shared_zod-B6wbpZ4f.js.map +0 -1
- package/dist/web/assets/index.esm-BoRQu8mM.js.map +0 -1
- package/dist/web/assets/isEqual-BQtm2LNT.js.map +0 -1
- package/dist/web/assets/model-merger-CdjliK9v.js +0 -1705
- package/dist/web/assets/model-merger-CdjliK9v.js.map +0 -1
- package/dist/web/assets/plugin-definition-BG6tu7Hh.js +0 -16
- package/dist/web/assets/plugin-definition-BG6tu7Hh.js.map +0 -1
- package/dist/web/assets/plugin-definition-j1nJ0FFI.js.map +0 -1
- package/dist/web/assets/registries-19UehlAo.js.map +0 -1
- package/dist/web/assets/sortBy-BPH_zRB8.js +0 -34
- package/dist/web/assets/sortBy-BPH_zRB8.js.map +0 -1
- /package/dist/{auth0 → better-auth}/core/common.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/core/node.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/core/web.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/generators/index.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/generators/index.js +0 -0
- /package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/templates/src/hooks/use-required-user-id.ts +0 -0
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.d.ts +0 -0
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.js +0 -0
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.ts +0 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-BLFDCY-V.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './jsx-runtime-XI9uIe3W.js';
|
|
3
|
+
import { a, A as AuthConfigTabs } from './styles-tkrWV-ZE.js';
|
|
4
|
+
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-BL50g0cJ.js';
|
|
5
|
+
import { L as LOCAL_AUTH_MODELS } from './model-names-DrcaRxt1.js';
|
|
6
|
+
import { c as createLocalAuthPluginDefinitionSchema } from './plugin-definition-Ckl5hjD1.js';
|
|
7
|
+
|
|
8
|
+
function createLocalAuthPartialDefinition(authFeatureName) {
|
|
9
|
+
return {
|
|
10
|
+
models: [
|
|
11
|
+
{
|
|
12
|
+
name: LOCAL_AUTH_MODELS.user,
|
|
13
|
+
featureRef: authFeatureName,
|
|
14
|
+
model: {
|
|
15
|
+
fields: [
|
|
16
|
+
{
|
|
17
|
+
name: "id",
|
|
18
|
+
type: "uuid",
|
|
19
|
+
options: { genUuid: true }
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "name",
|
|
23
|
+
type: "string",
|
|
24
|
+
isOptional: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "email",
|
|
28
|
+
type: "string"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "emailVerified",
|
|
32
|
+
type: "boolean",
|
|
33
|
+
options: { default: "false" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "updatedAt",
|
|
37
|
+
type: "dateTime",
|
|
38
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "createdAt",
|
|
42
|
+
type: "dateTime",
|
|
43
|
+
options: { defaultToNow: true }
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
primaryKeyFieldRefs: ["id"],
|
|
47
|
+
uniqueConstraints: [
|
|
48
|
+
{
|
|
49
|
+
fields: [{ fieldRef: "email" }]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
graphql: {
|
|
54
|
+
objectType: {
|
|
55
|
+
enabled: true,
|
|
56
|
+
fields: [{ ref: "id" }, { ref: "email" }]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: LOCAL_AUTH_MODELS.userAccount,
|
|
62
|
+
featureRef: authFeatureName,
|
|
63
|
+
model: {
|
|
64
|
+
fields: [
|
|
65
|
+
{
|
|
66
|
+
name: "id",
|
|
67
|
+
type: "uuid",
|
|
68
|
+
options: { genUuid: true }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "userId",
|
|
72
|
+
type: "uuid"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "accountId",
|
|
76
|
+
type: "string"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "providerId",
|
|
80
|
+
type: "string"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "password",
|
|
84
|
+
type: "string",
|
|
85
|
+
isOptional: true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "createdAt",
|
|
89
|
+
type: "dateTime",
|
|
90
|
+
options: { defaultToNow: true }
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "updatedAt",
|
|
94
|
+
type: "dateTime",
|
|
95
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
primaryKeyFieldRefs: ["id"],
|
|
99
|
+
uniqueConstraints: [
|
|
100
|
+
{
|
|
101
|
+
fields: [{ fieldRef: "accountId" }, { fieldRef: "providerId" }]
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
relations: [
|
|
105
|
+
{
|
|
106
|
+
name: "user",
|
|
107
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
108
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
109
|
+
foreignRelationName: "accounts",
|
|
110
|
+
onDelete: "Cascade",
|
|
111
|
+
onUpdate: "Restrict"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: LOCAL_AUTH_MODELS.userRole,
|
|
118
|
+
featureRef: authFeatureName,
|
|
119
|
+
model: {
|
|
120
|
+
fields: [
|
|
121
|
+
{
|
|
122
|
+
name: "userId",
|
|
123
|
+
type: "uuid"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "role",
|
|
127
|
+
type: "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "updatedAt",
|
|
131
|
+
type: "dateTime",
|
|
132
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "createdAt",
|
|
136
|
+
type: "dateTime",
|
|
137
|
+
options: { defaultToNow: true }
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
primaryKeyFieldRefs: ["userId", "role"],
|
|
141
|
+
relations: [
|
|
142
|
+
{
|
|
143
|
+
name: "user",
|
|
144
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
145
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
146
|
+
foreignRelationName: "roles",
|
|
147
|
+
onDelete: "Cascade",
|
|
148
|
+
onUpdate: "Restrict"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: LOCAL_AUTH_MODELS.userSession,
|
|
155
|
+
featureRef: authFeatureName,
|
|
156
|
+
model: {
|
|
157
|
+
fields: [
|
|
158
|
+
{
|
|
159
|
+
name: "id",
|
|
160
|
+
type: "uuid",
|
|
161
|
+
options: { genUuid: true }
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "userId",
|
|
165
|
+
type: "uuid"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "token",
|
|
169
|
+
type: "string"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "expiresAt",
|
|
173
|
+
type: "dateTime"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "renewedAt",
|
|
177
|
+
type: "dateTime",
|
|
178
|
+
options: { defaultToNow: true }
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "createdAt",
|
|
182
|
+
type: "dateTime",
|
|
183
|
+
options: { defaultToNow: true }
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "updatedAt",
|
|
187
|
+
type: "dateTime",
|
|
188
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
primaryKeyFieldRefs: ["id"],
|
|
192
|
+
uniqueConstraints: [
|
|
193
|
+
{
|
|
194
|
+
fields: [{ fieldRef: "token" }]
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
relations: [
|
|
198
|
+
{
|
|
199
|
+
name: "user",
|
|
200
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
201
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
202
|
+
foreignRelationName: "sessions",
|
|
203
|
+
onDelete: "Cascade",
|
|
204
|
+
onUpdate: "Restrict"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: LOCAL_AUTH_MODELS.authVerification,
|
|
211
|
+
featureRef: authFeatureName,
|
|
212
|
+
model: {
|
|
213
|
+
fields: [
|
|
214
|
+
{
|
|
215
|
+
name: "id",
|
|
216
|
+
type: "uuid",
|
|
217
|
+
options: { genUuid: true }
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "type",
|
|
221
|
+
type: "string"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "identifier",
|
|
225
|
+
type: "string"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "value",
|
|
229
|
+
type: "string"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "userId",
|
|
233
|
+
type: "uuid",
|
|
234
|
+
isOptional: true
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "metadata",
|
|
238
|
+
type: "json",
|
|
239
|
+
isOptional: true
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "expiresAt",
|
|
243
|
+
type: "dateTime"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "createdAt",
|
|
247
|
+
type: "dateTime",
|
|
248
|
+
options: { defaultToNow: true }
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
primaryKeyFieldRefs: ["id"],
|
|
252
|
+
uniqueConstraints: [
|
|
253
|
+
{
|
|
254
|
+
fields: [{ fieldRef: "type" }, { fieldRef: "identifier" }]
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
relations: [
|
|
258
|
+
{
|
|
259
|
+
name: "user",
|
|
260
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
261
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
262
|
+
foreignRelationName: "authVerifications",
|
|
263
|
+
onDelete: "Cascade",
|
|
264
|
+
onUpdate: "Restrict"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const {applyMergedDefinition,diffDefinition,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
274
|
+
|
|
275
|
+
const {DefinitionDiffAlert,useBlockUnsavedChangesNavigate,useDefinitionSchema,useProjectDefinition,useResettableForm} = await importShared('@baseplate-dev/project-builder-lib/web');
|
|
276
|
+
|
|
277
|
+
const {FormActionBar,MultiComboboxFieldController,SectionList,SectionListSection,SectionListSectionContent,SectionListSectionDescription,SectionListSectionHeader,SectionListSectionTitle} = await importShared('@baseplate-dev/ui-components');
|
|
278
|
+
const {useMemo} = await importShared('react');
|
|
279
|
+
function LocalAuthDefinitionEditor({
|
|
280
|
+
definition: pluginMetadata,
|
|
281
|
+
metadata,
|
|
282
|
+
onSave
|
|
283
|
+
}) {
|
|
284
|
+
const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
|
|
285
|
+
const authPluginDefinitionSchema = useDefinitionSchema(
|
|
286
|
+
createLocalAuthPluginDefinitionSchema
|
|
287
|
+
);
|
|
288
|
+
const authDefinition = getAuthPluginDefinition(definition);
|
|
289
|
+
const roles = authDefinition.roles.filter((role) => !role.builtIn).map((role) => ({
|
|
290
|
+
label: role.name,
|
|
291
|
+
value: role.id
|
|
292
|
+
}));
|
|
293
|
+
const defaultValues = useMemo(() => {
|
|
294
|
+
if (pluginMetadata?.config) {
|
|
295
|
+
return pluginMetadata.config;
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
initialUserRoles: [],
|
|
299
|
+
userAdminRoles: []
|
|
300
|
+
};
|
|
301
|
+
}, [pluginMetadata?.config]);
|
|
302
|
+
const form = useResettableForm({
|
|
303
|
+
resolver: a(authPluginDefinitionSchema),
|
|
304
|
+
defaultValues
|
|
305
|
+
});
|
|
306
|
+
const { control, reset, handleSubmit } = form;
|
|
307
|
+
const authFeature = definition.features.find(
|
|
308
|
+
(f) => f.id === authDefinition.authFeatureRef
|
|
309
|
+
);
|
|
310
|
+
if (!authFeature) {
|
|
311
|
+
throw new Error(
|
|
312
|
+
`Auth feature not found for ref: ${authDefinition.authFeatureRef}`
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
const partialDef = useMemo(
|
|
316
|
+
() => createLocalAuthPartialDefinition(authFeature.name),
|
|
317
|
+
[authFeature.name]
|
|
318
|
+
);
|
|
319
|
+
const diff = useMemo(
|
|
320
|
+
() => diffDefinition(
|
|
321
|
+
definitionContainer.schema,
|
|
322
|
+
definitionContainer.definition,
|
|
323
|
+
partialDef
|
|
324
|
+
),
|
|
325
|
+
[definitionContainer, partialDef]
|
|
326
|
+
);
|
|
327
|
+
const onSubmit = handleSubmit(
|
|
328
|
+
(data) => saveDefinitionWithFeedback(
|
|
329
|
+
(draftConfig) => {
|
|
330
|
+
const updatedData = {
|
|
331
|
+
...data
|
|
332
|
+
};
|
|
333
|
+
applyMergedDefinition(definitionContainer, partialDef)(draftConfig);
|
|
334
|
+
PluginUtils.setPluginConfig(
|
|
335
|
+
draftConfig,
|
|
336
|
+
metadata,
|
|
337
|
+
updatedData,
|
|
338
|
+
definitionContainer
|
|
339
|
+
);
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
successMessage: "Successfully saved auth plugin!",
|
|
343
|
+
onSuccess: () => {
|
|
344
|
+
onSave();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
);
|
|
349
|
+
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
350
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden", children: [
|
|
351
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AuthConfigTabs, {}),
|
|
352
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
353
|
+
"div",
|
|
354
|
+
{
|
|
355
|
+
className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto",
|
|
356
|
+
style: {
|
|
357
|
+
"--action-bar-height": "52px"
|
|
358
|
+
},
|
|
359
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [
|
|
360
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:pb-16", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionList, { children: [
|
|
361
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
362
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Local Auth User Models" }),
|
|
364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })
|
|
365
|
+
] }),
|
|
366
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
367
|
+
DefinitionDiffAlert,
|
|
368
|
+
{
|
|
369
|
+
diff,
|
|
370
|
+
upToDateMessage: "All required models are already configured correctly. No changes needed."
|
|
371
|
+
}
|
|
372
|
+
) })
|
|
373
|
+
] }),
|
|
374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
375
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Initial User Setup" }),
|
|
377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "In order to access the admin panel, an initial user must be created. To make it easier, the plugin will automatically add a seed script to create the initial user provided a .seed.env exists with the INTIIAL_USER_EMAIL and INTIIAL_USER_PASSWORD variables." })
|
|
378
|
+
] }),
|
|
379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
380
|
+
MultiComboboxFieldController,
|
|
381
|
+
{
|
|
382
|
+
label: "Initial User Roles",
|
|
383
|
+
name: "initialUserRoles",
|
|
384
|
+
control,
|
|
385
|
+
options: roles,
|
|
386
|
+
description: "The roles that will be assigned to the initial user."
|
|
387
|
+
}
|
|
388
|
+
) })
|
|
389
|
+
] }),
|
|
390
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
391
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
392
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "User Management Permissions" }),
|
|
393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "Configure which roles can manage users and assign roles to other users in the admin interface." })
|
|
394
|
+
] }),
|
|
395
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
396
|
+
MultiComboboxFieldController,
|
|
397
|
+
{
|
|
398
|
+
label: "User Admin Roles",
|
|
399
|
+
name: "userAdminRoles",
|
|
400
|
+
control,
|
|
401
|
+
options: roles,
|
|
402
|
+
description: "Roles that can manage users and assign roles to other users."
|
|
403
|
+
}
|
|
404
|
+
) })
|
|
405
|
+
] })
|
|
406
|
+
] }) }),
|
|
407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
408
|
+
FormActionBar,
|
|
409
|
+
{
|
|
410
|
+
form,
|
|
411
|
+
allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges
|
|
412
|
+
}
|
|
413
|
+
)
|
|
414
|
+
] })
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] });
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
const {createPluginModule,webConfigSpec} = await importShared('@baseplate-dev/project-builder-lib');
|
|
421
|
+
const web = createPluginModule({
|
|
422
|
+
name: "web",
|
|
423
|
+
dependencies: {
|
|
424
|
+
webConfig: webConfigSpec
|
|
425
|
+
},
|
|
426
|
+
initialize: ({ webConfig }, { pluginKey }) => {
|
|
427
|
+
webConfig.components.set(pluginKey, LocalAuthDefinitionEditor);
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
export { web as default };
|
|
432
|
+
//# sourceMappingURL=__federation_expose_local-authCoreWeb-BY-mP3uS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_local-authCoreWeb-BY-mP3uS.js","sources":["../../../src/local-auth/core/schema/models.ts","../../../src/local-auth/core/components/local-auth-definition-editor.tsx","../../../src/local-auth/core/web.ts"],"sourcesContent":["import type { PartialProjectDefinitionInput } from '@baseplate-dev/project-builder-lib';\n\nimport { LOCAL_AUTH_MODELS } from '#src/local-auth/constants/model-names.js';\n\nexport function createLocalAuthPartialDefinition(\n authFeatureName: string,\n): PartialProjectDefinitionInput {\n return {\n models: [\n {\n name: LOCAL_AUTH_MODELS.user,\n featureRef: authFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'name',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'email',\n type: 'string',\n },\n {\n name: 'emailVerified',\n type: 'boolean',\n options: { default: 'false' },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'email' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: [{ ref: 'id' }, { ref: 'email' }],\n },\n },\n },\n {\n name: LOCAL_AUTH_MODELS.userAccount,\n featureRef: authFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'accountId',\n type: 'string',\n },\n {\n name: 'providerId',\n type: 'string',\n },\n {\n name: 'password',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'accountId' }, { fieldRef: 'providerId' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: LOCAL_AUTH_MODELS.user,\n foreignRelationName: 'accounts',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n {\n name: LOCAL_AUTH_MODELS.userRole,\n featureRef: authFeatureName,\n model: {\n fields: [\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'role',\n type: 'string',\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['userId', 'role'],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: LOCAL_AUTH_MODELS.user,\n foreignRelationName: 'roles',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n {\n name: LOCAL_AUTH_MODELS.userSession,\n featureRef: authFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'token',\n type: 'string',\n },\n {\n name: 'expiresAt',\n type: 'dateTime',\n },\n {\n name: 'renewedAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'token' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: LOCAL_AUTH_MODELS.user,\n foreignRelationName: 'sessions',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n {\n name: LOCAL_AUTH_MODELS.authVerification,\n featureRef: authFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'type',\n type: 'string',\n },\n {\n name: 'identifier',\n type: 'string',\n },\n {\n name: 'value',\n type: 'string',\n },\n {\n name: 'userId',\n type: 'uuid',\n isOptional: true,\n },\n {\n name: 'metadata',\n type: 'json',\n isOptional: true,\n },\n {\n name: 'expiresAt',\n type: 'dateTime',\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'type' }, { fieldRef: 'identifier' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: LOCAL_AUTH_MODELS.user,\n foreignRelationName: 'authVerifications',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n ],\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n applyMergedDefinition,\n diffDefinition,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n DefinitionDiffAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n MultiComboboxFieldController,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { getAuthPluginDefinition } from '#src/auth/utils/get-auth-plugin-definition.js';\nimport { AuthConfigTabs } from '#src/common/components/auth-config-tabs.js';\n\nimport type { LocalAuthPluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createLocalAuthPartialDefinition } from '../schema/models.js';\nimport { createLocalAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function LocalAuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createLocalAuthPluginDefinitionSchema,\n );\n const authDefinition = getAuthPluginDefinition(definition);\n const roles = authDefinition.roles\n .filter((role) => !role.builtIn)\n .map((role) => ({\n label: role.name,\n value: role.id,\n }));\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as LocalAuthPluginDefinitionInput;\n }\n\n return {\n initialUserRoles: [],\n userAdminRoles: [],\n } satisfies LocalAuthPluginDefinitionInput;\n }, [pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit } = form;\n\n const authFeature = definition.features.find(\n (f) => f.id === authDefinition.authFeatureRef,\n );\n if (!authFeature) {\n throw new Error(\n `Auth feature not found for ref: ${authDefinition.authFeatureRef}`,\n );\n }\n\n const partialDef = useMemo(\n () => createLocalAuthPartialDefinition(authFeature.name),\n [authFeature.name],\n );\n\n const diff = useMemo(\n () =>\n diffDefinition(\n definitionContainer.schema,\n definitionContainer.definition,\n partialDef,\n ),\n [definitionContainer, partialDef],\n );\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const updatedData = {\n ...data,\n };\n applyMergedDefinition(definitionContainer, partialDef)(draftConfig);\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n return (\n <div className=\"auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden\">\n <AuthConfigTabs />\n <div\n className=\"auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto\"\n style={\n {\n '--action-bar-height': '52px',\n } as React.CSSProperties\n }\n >\n <form onSubmit={onSubmit} className=\"auth:max-w-6xl auth:flex-1\">\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Local Auth User Models\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n The plugin will automatically configure the models it needs.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <DefinitionDiffAlert\n diff={diff}\n upToDateMessage=\"All required models are already configured correctly. No changes needed.\"\n />\n </SectionListSectionContent>\n </SectionListSection>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Initial User Setup\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n In order to access the admin panel, an initial user must be\n created. To make it easier, the plugin will automatically\n add a seed script to create the initial user provided a\n .seed.env exists with the INTIIAL_USER_EMAIL and\n INTIIAL_USER_PASSWORD variables.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <MultiComboboxFieldController\n label=\"Initial User Roles\"\n name=\"initialUserRoles\"\n control={control}\n options={roles}\n description=\"The roles that will be assigned to the initial user.\"\n />\n </SectionListSectionContent>\n </SectionListSection>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n User Management Permissions\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure which roles can manage users and assign roles to\n other users in the admin interface.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <MultiComboboxFieldController\n label=\"User Admin Roles\"\n name=\"userAdminRoles\"\n control={control}\n options={roles}\n description=\"Roles that can manage users and assign roles to other users.\"\n />\n </SectionListSectionContent>\n </SectionListSection>\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={!pluginMetadata || diff.hasChanges}\n />\n </form>\n </div>\n </div>\n );\n}\n","import {\n createPluginModule,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { LocalAuthDefinitionEditor } from './components/local-auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPluginModule({\n name: 'web',\n dependencies: {\n webConfig: webConfigSpec,\n },\n initialize: ({ webConfig }, { pluginKey }) => {\n webConfig.components.set(pluginKey, LocalAuthDefinitionEditor);\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;;AAIO,SAAS,iCACd,eAAA,EAC+B;AAC/B,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN;AAAA,QACE,MAAM,iBAAA,CAAkB,IAAA;AAAA,QACxB,UAAA,EAAY,eAAA;AAAA,QACZ,KAAA,EAAO;AAAA,UACL,MAAA,EAAQ;AAAA,YACN;AAAA,cACE,IAAA,EAAM,IAAA;AAAA,cACN,IAAA,EAAM,MAAA;AAAA,cACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAA;AAAK,aAC3B;AAAA,YACA;AAAA,cACE,IAAA,EAAM,MAAA;AAAA,cACN,IAAA,EAAM,QAAA;AAAA,cACN,UAAA,EAAY;AAAA,aACd;AAAA,YACA;AAAA,cACE,IAAA,EAAM,OAAA;AAAA,cACN,IAAA,EAAM;AAAA,aACR;AAAA,YACA;AAAA,cACE,IAAA,EAAM,eAAA;AAAA,cACN,IAAA,EAAM,SAAA;AAAA,cACN,OAAA,EAAS,EAAE,OAAA,EAAS,OAAA;AAAQ,aAC9B;AAAA,YACA;AAAA,cACE,IAAA,EAAM,WAAA;AAAA,cACN,IAAA,EAAM,UAAA;AAAA,cACN,OAAA,EAAS,EAAE,YAAA,EAAc,IAAA,EAAM,WAAW,IAAA;AAAK,aACjD;AAAA,YACA;AAAA,cACE,IAAA,EAAM,WAAA;AAAA,cACN,IAAA,EAAM,UAAA;AAAA,cACN,OAAA,EAAS,EAAE,YA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BACN,IAAA,EAAK,gBAAA;AAAA,kBACL,OAAA;AAAA,kBACA,OAAA,EAAS,KAAA;AAAA,kBACT,WAAA,EAAY;AAAA;AAAA,eACd,EACF;AAAA,aAAA,EACF;AAAA,WAAA,EACF,CAAA,EACF,CAAA;AAAA,0BAEAA,qBAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,IAAA;AAAA,cACA,qBAAA,EAAuB,CAAC,cAAA,IAAkB,IAAA,CAAK;AAAA;AAAA;AACjD,SAAA,EACF;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;AC/MA,MAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,kBAAA,CAAmB;AAAA,EAChC,IAAA,EAAM,KAAA;AAAA,EACN,YAAA,EAAc;AAAA,IACZ,SAAA,EAAW;AAAA,GACb;AAAA,EACA,YAAY,CAAC,EAAE,WAAU,EAAG,EAAE,WAAU,KAAM;AAC5C,IAAA,SAAA,CAAU,UAAA,CAAW,GAAA,CAAI,SAAA,EAAW,yBAAyB,CAAA;AAAA,EAC/D;AACF,CAAC,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { c as createPlaceholderAuthPluginDefinitionSchema, P as PLACEHOLDER_AUTH_MODELS } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BLFDCY-V.js';
|
|
2
|
+
import { c as createPlaceholderAuthPluginDefinitionSchema, P as PLACEHOLDER_AUTH_MODELS } from './plugin-definition-D26rR8AB.js';
|
|
3
3
|
|
|
4
4
|
const {authModelsSpec,createPluginModule,pluginConfigSpec} = await importShared('@baseplate-dev/project-builder-lib');
|
|
5
5
|
const common = createPluginModule({
|
|
@@ -20,4 +20,4 @@ const common = createPluginModule({
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
export { common as default };
|
|
23
|
-
//# sourceMappingURL=__federation_expose_placeholder-authCoreCommon-
|
|
23
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_placeholder-authCoreCommon-
|
|
1
|
+
{"version":3,"file":"__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js","sources":["../../../src/placeholder-auth/core/common.ts"],"sourcesContent":["import {\n authModelsSpec,\n createPluginModule,\n pluginConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { PLACEHOLDER_AUTH_MODELS } from '#src/placeholder-auth/constants/model-names.js';\n\nimport { createPlaceholderAuthPluginDefinitionSchema } from './schema/plugin-definition.js';\n\nexport default createPluginModule({\n name: 'common',\n dependencies: {\n pluginConfig: pluginConfigSpec,\n authModels: authModelsSpec,\n },\n initialize: ({ pluginConfig, authModels }, { pluginKey }) => {\n pluginConfig.schemas.set(\n pluginKey,\n createPlaceholderAuthPluginDefinitionSchema,\n );\n authModels.getAuthModels.set(() => ({\n user: PLACEHOLDER_AUTH_MODELS.user,\n }));\n },\n});\n"],"names":[],"mappings":";;;AAAA,MAAA,CAAA,cAAA,CAAA,kBAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAUA,eAAe,kBAAA,CAAmB;AAAA,EAChC,IAAA,EAAM,QAAA;AAAA,EACN,YAAA,EAAc;AAAA,IACZ,YAAA,EAAc,gBAAA;AAAA,IACd,UAAA,EAAY;AAAA,GACd;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,YAAA,EAAc,YAAW,EAAG,EAAE,WAAU,KAAM;AAC3D,IAAA,YAAA,CAAa,OAAA,CAAQ,GAAA;AAAA,MACnB,SAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,UAAA,CAAW,aAAA,CAAc,IAAI,OAAO;AAAA,MAClC,MAAM,uBAAA,CAAwB;AAAA,KAChC,CAAE,CAAA;AAAA,EACJ;AACF,CAAC,CAAA;;;;"}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BLFDCY-V.js';
|
|
2
2
|
import { j as jsxRuntimeExports } from './jsx-runtime-XI9uIe3W.js';
|
|
3
|
-
import { a, A as AuthConfigTabs } from './styles-
|
|
4
|
-
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-
|
|
5
|
-
import { P as PLACEHOLDER_AUTH_MODELS, c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-
|
|
3
|
+
import { a, A as AuthConfigTabs } from './styles-tkrWV-ZE.js';
|
|
4
|
+
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-BL50g0cJ.js';
|
|
5
|
+
import { P as PLACEHOLDER_AUTH_MODELS, c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-D26rR8AB.js';
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
authFeatureRef
|
|
9
|
-
}) {
|
|
7
|
+
function createPlaceholderAuthPartialDefinition(authFeatureName) {
|
|
10
8
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
models: [
|
|
10
|
+
{
|
|
11
|
+
name: PLACEHOLDER_AUTH_MODELS.user,
|
|
12
|
+
featureRef: authFeatureName,
|
|
13
|
+
model: {
|
|
14
|
+
fields: [
|
|
15
|
+
{
|
|
16
|
+
name: "id",
|
|
17
|
+
type: "uuid",
|
|
18
|
+
options: { genUuid: true }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "email",
|
|
22
|
+
type: "string",
|
|
23
|
+
isOptional: true
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
primaryKeyFieldRefs: ["id"],
|
|
27
|
+
uniqueConstraints: [
|
|
28
|
+
{
|
|
29
|
+
fields: [{ fieldRef: "email" }]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
graphql: {
|
|
34
|
+
objectType: {
|
|
35
|
+
enabled: true,
|
|
36
|
+
fields: [{ ref: "id" }, { ref: "email" }]
|
|
31
37
|
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
graphql: {
|
|
35
|
-
objectType: {
|
|
36
|
-
enabled: true,
|
|
37
|
-
fields: ["id", "email"]
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
]
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const {
|
|
44
|
+
const {applyMergedDefinition,diffDefinition,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
45
45
|
|
|
46
|
-
const {
|
|
46
|
+
const {DefinitionDiffAlert,useBlockUnsavedChangesNavigate,useDefinitionSchema,useProjectDefinition,useResettableForm} = await importShared('@baseplate-dev/project-builder-lib/web');
|
|
47
47
|
|
|
48
48
|
const {FormActionBar,SectionList,SectionListSection,SectionListSectionContent,SectionListSectionDescription,SectionListSectionHeader,SectionListSectionTitle} = await importShared('@baseplate-dev/ui-components');
|
|
49
49
|
const {useMemo} = await importShared('react');
|
|
@@ -68,26 +68,33 @@ function PlaceholderAuthDefinitionEditor({
|
|
|
68
68
|
defaultValues
|
|
69
69
|
});
|
|
70
70
|
const { control, reset, handleSubmit } = form;
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
const authFeature = definition.features.find(
|
|
72
|
+
(f) => f.id === authDefinition.authFeatureRef
|
|
73
|
+
);
|
|
74
|
+
if (!authFeature) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
`Auth feature not found for ref: ${authDefinition.authFeatureRef}`
|
|
77
77
|
);
|
|
78
|
-
}
|
|
78
|
+
}
|
|
79
|
+
const partialDef = useMemo(
|
|
80
|
+
() => createPlaceholderAuthPartialDefinition(authFeature.name),
|
|
81
|
+
[authFeature.name]
|
|
82
|
+
);
|
|
83
|
+
const diff = useMemo(
|
|
84
|
+
() => diffDefinition(
|
|
85
|
+
definitionContainer.schema,
|
|
86
|
+
definitionContainer.definition,
|
|
87
|
+
partialDef
|
|
88
|
+
),
|
|
89
|
+
[definitionContainer, partialDef]
|
|
90
|
+
);
|
|
79
91
|
const onSubmit = handleSubmit(
|
|
80
92
|
(data) => saveDefinitionWithFeedback(
|
|
81
93
|
(draftConfig) => {
|
|
82
94
|
const updatedData = {
|
|
83
95
|
...data
|
|
84
96
|
};
|
|
85
|
-
|
|
86
|
-
draftConfig,
|
|
87
|
-
PLACEHOLDER_AUTH_MODELS,
|
|
88
|
-
createAuthModels(authDefinition),
|
|
89
|
-
definitionContainer
|
|
90
|
-
);
|
|
97
|
+
applyMergedDefinition(definitionContainer, partialDef)(draftConfig);
|
|
91
98
|
PluginUtils.setPluginConfig(
|
|
92
99
|
draftConfig,
|
|
93
100
|
metadata,
|
|
@@ -120,9 +127,10 @@ function PlaceholderAuthDefinitionEditor({
|
|
|
120
127
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })
|
|
121
128
|
] }),
|
|
122
129
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
123
|
-
|
|
130
|
+
DefinitionDiffAlert,
|
|
124
131
|
{
|
|
125
|
-
|
|
132
|
+
diff,
|
|
133
|
+
upToDateMessage: "All required models are already configured correctly. No changes needed."
|
|
126
134
|
}
|
|
127
135
|
) })
|
|
128
136
|
] }) }) }),
|
|
@@ -130,7 +138,7 @@ function PlaceholderAuthDefinitionEditor({
|
|
|
130
138
|
FormActionBar,
|
|
131
139
|
{
|
|
132
140
|
form,
|
|
133
|
-
allowSaveWithoutDirty: !pluginMetadata ||
|
|
141
|
+
allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges
|
|
134
142
|
}
|
|
135
143
|
)
|
|
136
144
|
] })
|
|
@@ -151,4 +159,4 @@ const web = createPluginModule({
|
|
|
151
159
|
});
|
|
152
160
|
|
|
153
161
|
export { web as default };
|
|
154
|
-
//# sourceMappingURL=__federation_expose_placeholder-authCoreWeb-
|
|
162
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map
|