@baseplate-dev/plugin-auth 0.6.3 → 0.6.5
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 +48 -0
- package/dist/auth/core/common.d.ts.map +1 -1
- package/dist/auth/core/common.js +2 -3
- package/dist/auth/core/common.js.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.js +6 -2
- package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +1 -0
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/migrations.d.ts +3 -0
- package/dist/auth/core/schema/migrations.d.ts.map +1 -0
- package/dist/auth/core/schema/migrations.js +54 -0
- package/dist/auth/core/schema/migrations.js.map +1 -0
- package/dist/auth/core/schema/plugin-definition.d.ts +5 -0
- package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth/core/schema/plugin-definition.js +4 -0
- package/dist/auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth/core/schema/roles/constants.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/constants.js +9 -0
- package/dist/auth/core/schema/roles/constants.js.map +1 -1
- package/dist/auth/core/schema/roles/schema.d.ts +8 -0
- package/dist/auth/core/schema/roles/schema.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/schema.js +1 -0
- package/dist/auth/core/schema/roles/schema.js.map +1 -1
- package/dist/better-auth/admin/common.d.ts +5 -0
- package/dist/better-auth/admin/common.d.ts.map +1 -0
- package/dist/better-auth/admin/common.js +29 -0
- package/dist/better-auth/admin/common.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +510 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +123 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +510 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js +9 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +24 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +260 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +41 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +249 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +20 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts +2 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.js +2 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +22 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +78 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +162 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +509 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +114 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +510 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.js +9 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +24 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +260 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +41 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +495 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +22 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.d.ts +2 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.js +2 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +22 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +89 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +171 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +244 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +54 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/index.d.ts +2 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +1 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/index.js +2 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/index.js.map +1 -0
- package/dist/better-auth/admin/node.d.ts +5 -0
- package/dist/better-auth/admin/node.d.ts.map +1 -0
- package/dist/better-auth/admin/node.js +57 -0
- package/dist/better-auth/admin/node.js.map +1 -0
- package/dist/better-auth/admin/schema/manage-role-action.d.ts +12 -0
- package/dist/better-auth/admin/schema/manage-role-action.d.ts.map +1 -0
- package/dist/better-auth/admin/schema/manage-role-action.js +6 -0
- package/dist/better-auth/admin/schema/manage-role-action.js.map +1 -0
- package/dist/better-auth/admin/schema/reset-password-action.d.ts +12 -0
- package/dist/better-auth/admin/schema/reset-password-action.d.ts.map +1 -0
- package/dist/better-auth/admin/schema/reset-password-action.js +6 -0
- package/dist/better-auth/admin/schema/reset-password-action.js.map +1 -0
- package/dist/better-auth/admin/schema/roles-column.d.ts +9 -0
- package/dist/better-auth/admin/schema/roles-column.d.ts.map +1 -0
- package/dist/better-auth/admin/schema/roles-column.js +6 -0
- package/dist/better-auth/admin/schema/roles-column.js.map +1 -0
- package/dist/better-auth/admin/web.d.ts +5 -0
- package/dist/better-auth/admin/web.d.ts.map +1 -0
- package/dist/better-auth/admin/web.js +39 -0
- package/dist/better-auth/admin/web.js.map +1 -0
- package/dist/better-auth/core/common.d.ts.map +1 -1
- package/dist/better-auth/core/common.js +5 -2
- package/dist/better-auth/core/common.js.map +1 -1
- package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +1 -1
- package/dist/better-auth/core/components/better-auth-definition-editor.js +17 -5
- package/dist/better-auth/core/components/better-auth-definition-editor.js.map +1 -1
- package/dist/better-auth/core/node.d.ts.map +1 -1
- package/dist/better-auth/core/node.js +21 -4
- package/dist/better-auth/core/node.js.map +1 -1
- package/dist/better-auth/core/schema/models.d.ts +1 -1
- package/dist/better-auth/core/schema/models.d.ts.map +1 -1
- package/dist/better-auth/core/schema/models.js +25 -10
- package/dist/better-auth/core/schema/models.js.map +1 -1
- package/dist/better-auth/core/schema/plugin-definition.d.ts +4 -1
- package/dist/better-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/better-auth/core/schema/plugin-definition.js +7 -2
- package/dist/better-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/better-auth/core/schema/schema-issue-checker.d.ts +3 -0
- package/dist/better-auth/core/schema/schema-issue-checker.d.ts.map +1 -0
- package/dist/better-auth/core/schema/schema-issue-checker.js +21 -0
- package/dist/better-auth/core/schema/schema-issue-checker.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.d.ts +72 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.js +56 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts +109 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.js +11 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.d.ts +13 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.js +25 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.d.ts +55 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.js +57 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.d.ts +21 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.js +30 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.d.ts +46 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.js +33 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/index.d.ts +4 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/index.js +3 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/templates/module/schema/admin-auth.mutations.ts +48 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/templates/module/services/admin-auth.service.ts +106 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.d.ts +43 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.js +48 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.d.ts +96 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.js +9 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.d.ts +14 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.js +26 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.d.ts +41 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.js +59 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.d.ts +60 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.js +42 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/index.d.ts +2 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/index.js +2 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/templates/src/emails/auth/account-verification.email.tsx +55 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/templates/src/emails/auth/password-changed.email.tsx +44 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/templates/src/emails/auth/password-reset.email.tsx +55 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +26 -4
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +14 -3
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +42 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +20 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +4 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +22 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +7 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +1 -1
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +25 -1
- package/dist/better-auth/generators/fastify/index.d.ts +3 -0
- package/dist/better-auth/generators/fastify/index.d.ts.map +1 -1
- package/dist/better-auth/generators/fastify/index.js +3 -0
- package/dist/better-auth/generators/fastify/index.js.map +1 -1
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.d.ts +66 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.js +9 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.d.ts +12 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.js +24 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.d.ts +38 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.js +43 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.d.ts +27 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.js +18 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/index.d.ts +2 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/index.js +2 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.d.ts +49 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.js +60 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.js.map +1 -0
- package/dist/better-auth/generators/fastify/seed-initial-user/templates/src/prisma/seed-initial-user.ts +63 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +12 -1
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +771 -3
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts +3 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js +3 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +12 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +1543 -29
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +49 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/forgot-password.tsx +133 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/login.tsx +9 -1
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/register.tsx +5 -1
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/reset-password.tsx +177 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/verify-email.tsx +109 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +24 -2
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +12 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +12 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +12 -1
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -1
- package/dist/better-auth/plugin.json +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +24 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +24 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +12 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +12 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -3
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +24 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +24 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +12 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +24 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -1
- 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 +12 -1
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/node.js +1 -1
- package/dist/local-auth/admin/node.js.map +1 -1
- package/dist/local-auth/core/common.d.ts.map +1 -1
- package/dist/local-auth/core/common.js +5 -2
- package/dist/local-auth/core/common.js.map +1 -1
- 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 +9 -5
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +1 -0
- 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 +7 -1
- 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 +3 -1
- 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/typed-templates.d.ts +6 -2
- 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 +1 -1
- 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/user-password.mutations.js +5 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +5 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +4 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +6 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +11 -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-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +22 -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 +1 -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/services/user-roles.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js +8 -3
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +11 -4
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +16 -2
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +37 -4
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +78 -10
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +12 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +120 -17
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +5 -2
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -1
- 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.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +3 -10
- 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 +6 -10
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +24 -2
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +12 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +24 -2
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +12 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +0 -9
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.js +0 -2
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/index.d.ts +0 -2
- package/dist/local-auth/core/generators/seed-initial-user/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/index.js +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/index.js.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +12 -5
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts +1 -1
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +25 -10
- 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/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +2 -5
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/local-auth/core/schema/schema-issue-checker.d.ts +3 -0
- package/dist/local-auth/core/schema/schema-issue-checker.d.ts.map +1 -0
- package/dist/local-auth/core/schema/schema-issue-checker.js +21 -0
- package/dist/local-auth/core/schema/schema-issue-checker.js.map +1 -0
- package/dist/local-auth/plugin.json +6 -1
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/models.js +17 -2
- package/dist/placeholder-auth/core/schema/models.js.map +1 -1
- package/dist/web/assets/__federation_expose_authCoreCommon-NPAy2Xu2.js +85 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-NPAy2Xu2.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreWeb-BL_U7yuj.js → __federation_expose_authCoreWeb-D0AlXNml.js} +29 -9
- package/dist/web/assets/__federation_expose_authCoreWeb-D0AlXNml.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authAdminCommon-Bp8fb_BT.js +63 -0
- package/dist/web/assets/__federation_expose_better-authAdminCommon-Bp8fb_BT.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authAdminWeb-Dggf6fZk.js +41 -0
- package/dist/web/assets/__federation_expose_better-authAdminWeb-Dggf6fZk.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authCoreCommon-D3bQgHWh.js +54 -0
- package/dist/web/assets/__federation_expose_better-authCoreCommon-D3bQgHWh.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-4VA_40fu.js +157 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-4VA_40fu.js.map +1 -0
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-LIsARRNU.js → __federation_expose_local-authAdminCommon-Bp8fb_BT.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-LIsARRNU.js.map → __federation_expose_local-authAdminCommon-Bp8fb_BT.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-DyYUDLm9.js → __federation_expose_local-authAdminWeb-BDyZDL1a.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-DyYUDLm9.js.map → __federation_expose_local-authAdminWeb-BDyZDL1a.js.map} +1 -1
- package/dist/web/assets/__federation_expose_local-authCoreCommon-C3UyEu-M.js +54 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-C3UyEu-M.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BYkl2IGk.js +167 -0
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BYkl2IGk.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CtZXaDUc.js → __federation_expose_placeholder-authCoreCommon-Bq0ln8n5.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CtZXaDUc.js.map → __federation_expose_placeholder-authCoreCommon-Bq0ln8n5.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-CZAKokTb.js → __federation_expose_placeholder-authCoreWeb-BNGIcu0Y.js} +22 -7
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BNGIcu0Y.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-3DENgil8.js → __federation_fn_import-DybuDj1g.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-3DENgil8.js.map → __federation_fn_import-DybuDj1g.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-B5bdbzFj.js → web-CAuxM6sN.js} +16 -14
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-CAuxM6sN.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-DCA3vO4J.js → project-builder-lib-DkaXS95C.js} +11341 -10287
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DkaXS95C.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-BvL7RO9S.js → ui-components-DX4jbl4M.js} +219 -53
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DX4jbl4M.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-0-N5BG4T.js → utils-B-MiuXg4.js} +49 -16
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-B-MiuXg4.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-DSniiJ6U.js → react-router-DyqK0P1G.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-DSniiJ6U.js.map → react-router-DyqK0P1G.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-DHcbFujw.js → get-auth-plugin-definition-BigT75An.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-DHcbFujw.js.map → get-auth-plugin-definition-BigT75An.js.map} +1 -1
- package/dist/web/assets/{index-DQKNnI1w.js → index-BwviOVwi.js} +3 -5
- package/dist/web/assets/{index-DQKNnI1w.js.map → index-BwviOVwi.js.map} +1 -1
- package/dist/web/assets/{index.esm-Dpqxgpya.js → index.esm-Db6zPKK9.js} +2 -2
- package/dist/web/assets/{index.esm-Dpqxgpya.js.map → index.esm-Db6zPKK9.js.map} +1 -1
- package/dist/web/assets/model-names-D7UT0B8x.js +10 -0
- package/dist/web/assets/model-names-D7UT0B8x.js.map +1 -0
- package/dist/web/assets/{model-utils-BFX3c3dn.js → model-utils-D0sDtkf1.js} +165 -19
- package/dist/web/assets/model-utils-D0sDtkf1.js.map +1 -0
- package/dist/web/assets/plugin-definition-BQN6LXOW.js +304 -0
- package/dist/web/assets/plugin-definition-BQN6LXOW.js.map +1 -0
- package/dist/web/assets/{plugin-definition-KEpaSB6p.js → plugin-definition-Cg8Gij5x.js} +2 -2
- package/dist/web/assets/{plugin-definition-KEpaSB6p.js.map → plugin-definition-Cg8Gij5x.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-B86WQ7Ni.js → plugin-definition-ChoxTjiw.js} +20 -6
- package/dist/web/assets/plugin-definition-ChoxTjiw.js.map +1 -0
- package/dist/web/assets/{__federation_expose_better-authCoreWeb-CXHL-Ghf.js → plugin-definition-D9-5sSEf.js} +43 -130
- package/dist/web/assets/plugin-definition-D9-5sSEf.js.map +1 -0
- package/dist/web/assets/{react-hu8Hx0R4.js → react-CcDhDxl8.js} +2 -2
- package/dist/web/assets/{react-hu8Hx0R4.js.map → react-CcDhDxl8.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +16 -10
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/{styles-CpKtlIgU.js → styles-Otn_yxD1.js} +3 -3
- package/dist/web/assets/{styles-CpKtlIgU.js.map → styles-Otn_yxD1.js.map} +1 -1
- package/package.json +15 -15
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts +0 -18
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js +0 -26
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreCommon-CnNoa4tF.js +0 -30
- package/dist/web/assets/__federation_expose_authCoreCommon-CnNoa4tF.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-BL_U7yuj.js.map +0 -1
- package/dist/web/assets/__federation_expose_better-authCoreCommon-D-mTcxYO.js +0 -20
- package/dist/web/assets/__federation_expose_better-authCoreCommon-D-mTcxYO.js.map +0 -1
- package/dist/web/assets/__federation_expose_better-authCoreWeb-CXHL-Ghf.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreCommon-p_UbExc7.js +0 -21
- package/dist/web/assets/__federation_expose_local-authCoreCommon-p_UbExc7.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-8TcUJFT6.js +0 -432
- package/dist/web/assets/__federation_expose_local-authCoreWeb-8TcUJFT6.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-CZAKokTb.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-B5bdbzFj.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DCA3vO4J.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BvL7RO9S.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-0-N5BG4T.js.map +0 -1
- package/dist/web/assets/model-utils-BFX3c3dn.js.map +0 -1
- package/dist/web/assets/plugin-definition-B86WQ7Ni.js.map +0 -1
- package/dist/web/assets/plugin-definition-CEQb6mWV.js +0 -20
- package/dist/web/assets/plugin-definition-CEQb6mWV.js.map +0 -1
- package/dist/web/assets/plugin-definition-DrsKbcJc.js +0 -31
- package/dist/web/assets/plugin-definition-DrsKbcJc.js.map +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { L as LOCAL_AUTH_MODELS } from './model-names-DrcaRxt1.js';
|
|
2
|
+
import { importShared } from './__federation_fn_import-DybuDj1g.js';
|
|
3
|
+
|
|
4
|
+
function createLocalAuthPartialDefinition(authFeatureName, accountsFeatureName) {
|
|
5
|
+
return {
|
|
6
|
+
models: [
|
|
7
|
+
{
|
|
8
|
+
name: LOCAL_AUTH_MODELS.user,
|
|
9
|
+
featureRef: accountsFeatureName,
|
|
10
|
+
model: {
|
|
11
|
+
fields: [
|
|
12
|
+
{
|
|
13
|
+
name: "id",
|
|
14
|
+
type: "uuid",
|
|
15
|
+
options: { defaultGeneration: "uuidv7" }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "name",
|
|
19
|
+
type: "string",
|
|
20
|
+
isOptional: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "email",
|
|
24
|
+
type: "string"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "emailVerified",
|
|
28
|
+
type: "boolean",
|
|
29
|
+
options: { default: "false" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "updatedAt",
|
|
33
|
+
type: "dateTime",
|
|
34
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "createdAt",
|
|
38
|
+
type: "dateTime",
|
|
39
|
+
options: { defaultToNow: true }
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
primaryKeyFieldRefs: ["id"],
|
|
43
|
+
uniqueConstraints: [
|
|
44
|
+
{
|
|
45
|
+
fields: [{ fieldRef: "email" }]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
graphql: {
|
|
50
|
+
objectType: {
|
|
51
|
+
enabled: true,
|
|
52
|
+
fields: [
|
|
53
|
+
{ ref: "id" },
|
|
54
|
+
{
|
|
55
|
+
ref: "email",
|
|
56
|
+
globalRoles: ["admin"],
|
|
57
|
+
instanceRoles: ["self"]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
authorizer: {
|
|
63
|
+
roles: [
|
|
64
|
+
{
|
|
65
|
+
name: "self",
|
|
66
|
+
expression: "model.id === userId"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: LOCAL_AUTH_MODELS.userAccount,
|
|
73
|
+
featureRef: accountsFeatureName,
|
|
74
|
+
model: {
|
|
75
|
+
fields: [
|
|
76
|
+
{
|
|
77
|
+
name: "id",
|
|
78
|
+
type: "uuid",
|
|
79
|
+
options: { defaultGeneration: "uuidv7" }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "userId",
|
|
83
|
+
type: "uuid"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "accountId",
|
|
87
|
+
type: "string"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "providerId",
|
|
91
|
+
type: "string"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "password",
|
|
95
|
+
type: "string",
|
|
96
|
+
isOptional: true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "createdAt",
|
|
100
|
+
type: "dateTime",
|
|
101
|
+
options: { defaultToNow: true }
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "updatedAt",
|
|
105
|
+
type: "dateTime",
|
|
106
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
primaryKeyFieldRefs: ["id"],
|
|
110
|
+
uniqueConstraints: [
|
|
111
|
+
{
|
|
112
|
+
fields: [{ fieldRef: "accountId" }, { fieldRef: "providerId" }]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
relations: [
|
|
116
|
+
{
|
|
117
|
+
name: "user",
|
|
118
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
119
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
120
|
+
foreignRelationName: "accounts",
|
|
121
|
+
onDelete: "Cascade",
|
|
122
|
+
onUpdate: "Restrict"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: LOCAL_AUTH_MODELS.userRole,
|
|
129
|
+
featureRef: accountsFeatureName,
|
|
130
|
+
model: {
|
|
131
|
+
fields: [
|
|
132
|
+
{
|
|
133
|
+
name: "userId",
|
|
134
|
+
type: "uuid"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "role",
|
|
138
|
+
type: "string"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "updatedAt",
|
|
142
|
+
type: "dateTime",
|
|
143
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "createdAt",
|
|
147
|
+
type: "dateTime",
|
|
148
|
+
options: { defaultToNow: true }
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
primaryKeyFieldRefs: ["userId", "role"],
|
|
152
|
+
relations: [
|
|
153
|
+
{
|
|
154
|
+
name: "user",
|
|
155
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
156
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
157
|
+
foreignRelationName: "roles",
|
|
158
|
+
onDelete: "Cascade",
|
|
159
|
+
onUpdate: "Restrict"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: LOCAL_AUTH_MODELS.userSession,
|
|
166
|
+
featureRef: accountsFeatureName,
|
|
167
|
+
model: {
|
|
168
|
+
fields: [
|
|
169
|
+
{
|
|
170
|
+
name: "id",
|
|
171
|
+
type: "uuid",
|
|
172
|
+
options: { defaultGeneration: "uuidv7" }
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "userId",
|
|
176
|
+
type: "uuid"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "token",
|
|
180
|
+
type: "string"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "expiresAt",
|
|
184
|
+
type: "dateTime"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "renewedAt",
|
|
188
|
+
type: "dateTime",
|
|
189
|
+
options: { defaultToNow: true }
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "createdAt",
|
|
193
|
+
type: "dateTime",
|
|
194
|
+
options: { defaultToNow: true }
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "updatedAt",
|
|
198
|
+
type: "dateTime",
|
|
199
|
+
options: { defaultToNow: true, updatedAt: true }
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
primaryKeyFieldRefs: ["id"],
|
|
203
|
+
uniqueConstraints: [
|
|
204
|
+
{
|
|
205
|
+
fields: [{ fieldRef: "token" }]
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
relations: [
|
|
209
|
+
{
|
|
210
|
+
name: "user",
|
|
211
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
212
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
213
|
+
foreignRelationName: "sessions",
|
|
214
|
+
onDelete: "Cascade",
|
|
215
|
+
onUpdate: "Restrict"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: LOCAL_AUTH_MODELS.authVerification,
|
|
222
|
+
featureRef: authFeatureName,
|
|
223
|
+
model: {
|
|
224
|
+
fields: [
|
|
225
|
+
{
|
|
226
|
+
name: "id",
|
|
227
|
+
type: "uuid",
|
|
228
|
+
options: { defaultGeneration: "uuidv4" }
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "type",
|
|
232
|
+
type: "string"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "identifier",
|
|
236
|
+
type: "string"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: "value",
|
|
240
|
+
type: "string"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "userId",
|
|
244
|
+
type: "uuid",
|
|
245
|
+
isOptional: true
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "metadata",
|
|
249
|
+
type: "json",
|
|
250
|
+
isOptional: true
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: "expiresAt",
|
|
254
|
+
type: "dateTime"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "createdAt",
|
|
258
|
+
type: "dateTime",
|
|
259
|
+
options: { defaultToNow: true }
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
primaryKeyFieldRefs: ["id"],
|
|
263
|
+
uniqueConstraints: [
|
|
264
|
+
{
|
|
265
|
+
fields: [{ fieldRef: "type" }, { fieldRef: "identifier" }]
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
relations: [
|
|
269
|
+
{
|
|
270
|
+
name: "user",
|
|
271
|
+
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
272
|
+
modelRef: LOCAL_AUTH_MODELS.user,
|
|
273
|
+
foreignRelationName: "authVerifications",
|
|
274
|
+
onDelete: "Cascade",
|
|
275
|
+
onUpdate: "Restrict"
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const {authRoleEntityType,definitionSchema} = await importShared('@baseplate-dev/project-builder-lib');
|
|
285
|
+
|
|
286
|
+
const {z} = await importShared('zod');
|
|
287
|
+
|
|
288
|
+
const createLocalAuthPluginDefinitionSchema = definitionSchema(
|
|
289
|
+
(ctx) => z.object({
|
|
290
|
+
additionalUserAdminRoles: ctx.withDefault(
|
|
291
|
+
z.array(
|
|
292
|
+
ctx.withRef({
|
|
293
|
+
type: authRoleEntityType,
|
|
294
|
+
onDelete: "DELETE"
|
|
295
|
+
})
|
|
296
|
+
),
|
|
297
|
+
[]
|
|
298
|
+
),
|
|
299
|
+
requireNameOnRegistration: z.boolean().default(false)
|
|
300
|
+
})
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
export { createLocalAuthPartialDefinition as a, createLocalAuthPluginDefinitionSchema as c };
|
|
304
|
+
//# sourceMappingURL=plugin-definition-BQN6LXOW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-definition-BQN6LXOW.js","sources":["../../../src/local-auth/core/schema/models.ts","../../../src/local-auth/core/schema/plugin-definition.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 accountsFeatureName: string,\n): PartialProjectDefinitionInput {\n return {\n models: [\n {\n name: LOCAL_AUTH_MODELS.user,\n featureRef: accountsFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { defaultGeneration: 'uuidv7' },\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: [\n { ref: 'id' },\n {\n ref: 'email',\n globalRoles: ['admin'],\n instanceRoles: ['self'],\n },\n ],\n },\n },\n authorizer: {\n roles: [\n {\n name: 'self',\n expression: 'model.id === userId',\n },\n ],\n },\n },\n {\n name: LOCAL_AUTH_MODELS.userAccount,\n featureRef: accountsFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { defaultGeneration: 'uuidv7' },\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: accountsFeatureName,\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: accountsFeatureName,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { defaultGeneration: 'uuidv7' },\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: { defaultGeneration: 'uuidv4' },\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 { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n authRoleEntityType,\n definitionSchema,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nexport const createLocalAuthPluginDefinitionSchema = definitionSchema((ctx) =>\n z.object({\n additionalUserAdminRoles: ctx.withDefault(\n z.array(\n ctx.withRef({\n type: authRoleEntityType,\n onDelete: 'DELETE',\n }),\n ),\n [],\n ),\n requireNameOnRegistration: z.boolean().default(false),\n }),\n);\n\nexport type LocalAuthPluginDefinition = def.InferOutput<\n typeof createLocalAuthPluginDefinitionSchema\n>;\n\nexport type LocalAuthPluginDefinitionInput = def.InferInput<\n typeof createLocalAuthPluginDefinitionSchema\n>;\n"],"names":[],"mappings":";;;AAIO,SAAS,gCAAA,CACd,iBACA,mBAAA,EAC+B;AAC/B,EAAA,OAAO;AAAA,IAC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A,EAAU,UAAA,EAAY,MAAM,CAAA;AAAA,cACrD,UAAU,iBAAA,CAAkB,IAAA;AAAA,cAC5B,mBAAA,EAAqB,mBAAA;AAAA,cACrB,QAAA,EAAU,SAAA;AAAA,cACV,QAAA,EAAU;AAAA;AACZ;AACF;AACF;AACF;AACF,GACF;AACF;;AC3RA,MAAA,CAAA,kBAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AAIA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;;AAEO,MAAM,qCAAA,GAAwC,gBAAA;AAAA,EAAiB,CAAC,GAAA,KACrE,CAAA,CAAE,MAAA,CAAO;AAAA,IACP,0BAA0B,GAAA,CAAI,WAAA;AAAA,MAC5B,CAAA,CAAE,KAAA;AAAA,QACA,IAAI,OAAA,CAAQ;AAAA,UACV,IAAA,EAAM,kBAAA;AAAA,UACN,QAAA,EAAU;AAAA,SACX;AAAA,OACH;AAAA,MACA;AAAC,KACH;AAAA,IACA,yBAAA,EAA2B,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAQ,KAAK;AAAA,GACrD;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-DybuDj1g.js';
|
|
2
2
|
|
|
3
3
|
const PLACEHOLDER_AUTH_MODELS = {
|
|
4
4
|
user: "User"
|
|
@@ -13,4 +13,4 @@ const createPlaceholderAuthPluginDefinitionSchema = definitionSchema(
|
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
export { PLACEHOLDER_AUTH_MODELS as P, createPlaceholderAuthPluginDefinitionSchema as c };
|
|
16
|
-
//# sourceMappingURL=plugin-definition-
|
|
16
|
+
//# sourceMappingURL=plugin-definition-Cg8Gij5x.js.map
|
package/dist/web/assets/{plugin-definition-KEpaSB6p.js.map → plugin-definition-Cg8Gij5x.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition-
|
|
1
|
+
{"version":3,"file":"plugin-definition-Cg8Gij5x.js","sources":["../../../src/placeholder-auth/constants/model-names.ts","../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"sourcesContent":["export const PLACEHOLDER_AUTH_MODELS = {\n user: 'User',\n} as const;\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport { definitionSchema } from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nexport const createPlaceholderAuthPluginDefinitionSchema = definitionSchema(\n () => z.object({}),\n);\n\nexport type PlaceholderAuthPluginDefinitionInput = def.InferInput<\n typeof createPlaceholderAuthPluginDefinitionSchema\n>;\n"],"names":[],"mappings":";;AAAO,MAAM,uBAAA,GAA0B;AAAA,EACrC,IAAA,EAAM;AACR;;ACAA,MAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AACA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;;AAEO,MAAM,2CAAA,GAA8C,gBAAA;AAAA,EACzD,MAAM,CAAA,CAAE,MAAA,CAAO,EAAE;AACnB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-DybuDj1g.js';
|
|
2
2
|
|
|
3
3
|
const {authRoleEntityType: authRoleEntityType$1} = await importShared('@baseplate-dev/project-builder-lib');
|
|
4
4
|
|
|
@@ -6,17 +6,26 @@ const AUTH_DEFAULT_ROLES = [
|
|
|
6
6
|
{
|
|
7
7
|
name: "public",
|
|
8
8
|
comment: "All users (including unauthenticated and authenticated users)",
|
|
9
|
-
builtIn: true
|
|
9
|
+
builtIn: true,
|
|
10
|
+
autoAssigned: true
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
name: "user",
|
|
13
14
|
comment: "All authenticated users",
|
|
14
|
-
builtIn: true
|
|
15
|
+
builtIn: true,
|
|
16
|
+
autoAssigned: true
|
|
15
17
|
},
|
|
16
18
|
{
|
|
17
19
|
name: "system",
|
|
18
20
|
comment: "System processes without a user context, e.g. background jobs",
|
|
19
|
-
builtIn: true
|
|
21
|
+
builtIn: true,
|
|
22
|
+
autoAssigned: true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "admin",
|
|
26
|
+
comment: "Administrator with full access",
|
|
27
|
+
builtIn: true,
|
|
28
|
+
autoAssigned: false
|
|
20
29
|
}
|
|
21
30
|
];
|
|
22
31
|
function createDefaultAuthRoles() {
|
|
@@ -35,7 +44,8 @@ const createAuthRoleSchema = definitionSchema$1(
|
|
|
35
44
|
id: z$1.string(),
|
|
36
45
|
name: z$1.string().min(1),
|
|
37
46
|
comment: z$1.string().min(1),
|
|
38
|
-
builtIn: z$1.boolean().default(false)
|
|
47
|
+
builtIn: z$1.boolean().default(false),
|
|
48
|
+
autoAssigned: z$1.boolean().default(false)
|
|
39
49
|
}),
|
|
40
50
|
{ type: authRoleEntityType }
|
|
41
51
|
)
|
|
@@ -71,9 +81,13 @@ const createAuthPluginDefinitionSchema = definitionSchema(
|
|
|
71
81
|
type: featureEntityType,
|
|
72
82
|
onDelete: "RESTRICT"
|
|
73
83
|
}),
|
|
84
|
+
accountsFeatureRef: ctx.withRef({
|
|
85
|
+
type: featureEntityType,
|
|
86
|
+
onDelete: "RESTRICT"
|
|
87
|
+
}),
|
|
74
88
|
roles: createAuthRolesSchema(ctx)
|
|
75
89
|
})
|
|
76
90
|
);
|
|
77
91
|
|
|
78
92
|
export { createAuthPluginDefinitionSchema as a, createDefaultAuthRoles as b, createAuthRoleSchema as c };
|
|
79
|
-
//# sourceMappingURL=plugin-definition-
|
|
93
|
+
//# sourceMappingURL=plugin-definition-ChoxTjiw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-definition-ChoxTjiw.js","sources":["../../../src/auth/core/schema/roles/constants.ts","../../../src/auth/core/schema/roles/schema.ts","../../../src/auth/core/schema/plugin-definition.ts"],"sourcesContent":["import { authRoleEntityType } from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthRoleDefinition } from './schema.js';\n\nexport const AUTH_DEFAULT_ROLES: Omit<AuthRoleDefinition, 'id'>[] = [\n {\n name: 'public',\n comment: 'All users (including unauthenticated and authenticated users)',\n builtIn: true,\n autoAssigned: true,\n },\n {\n name: 'user',\n comment: 'All authenticated users',\n builtIn: true,\n autoAssigned: true,\n },\n {\n name: 'system',\n comment: 'System processes without a user context, e.g. background jobs',\n builtIn: true,\n autoAssigned: true,\n },\n {\n name: 'admin',\n comment: 'Administrator with full access',\n builtIn: true,\n autoAssigned: false,\n },\n];\n\nexport function createDefaultAuthRoles(): AuthRoleDefinition[] {\n return AUTH_DEFAULT_ROLES.map((role) => ({\n ...role,\n id: authRoleEntityType.generateNewId(),\n }));\n}\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n authRoleEntityType,\n definitionSchema,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nimport { AUTH_DEFAULT_ROLES } from './constants.js';\n\nexport const createAuthRoleSchema = definitionSchema((ctx) =>\n ctx.withEnt(\n z.object({\n id: z.string(),\n name: z.string().min(1),\n comment: z.string().min(1),\n builtIn: z.boolean().default(false),\n autoAssigned: z.boolean().default(false),\n }),\n { type: authRoleEntityType },\n ),\n);\n\n/**\n * Defines the schema for a role.\n */\nexport type AuthRoleDefinition = def.InferOutput<typeof createAuthRoleSchema>;\n\nexport type AuthRoleInput = def.InferInput<typeof createAuthRoleSchema>;\n\n/**\n * Defines the schema for an array of roles ensuring that there are no duplicate\n * role names and that the built-in roles are included.\n */\nexport const createAuthRolesSchema = definitionSchema((ctx) =>\n z\n .array(createAuthRoleSchema(ctx))\n .superRefine((roles, ctx) => {\n const dup = roles\n .map((r) => r.name)\n .filter((v, i, a) => a.indexOf(v) !== i);\n if (dup.length > 0) {\n ctx.addIssue({\n code: 'custom',\n message: `Duplicate role name(s): ${dup.join(', ')}`,\n });\n }\n })\n .superRefine((roles, ctx) => {\n for (const defaultRole of AUTH_DEFAULT_ROLES) {\n if (!roles.some((r) => r.name === defaultRole.name && r.builtIn)) {\n ctx.addIssue({\n code: 'custom',\n message: `Missing built-in role: ${defaultRole.name}`,\n });\n }\n }\n }),\n);\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n definitionSchema,\n featureEntityType,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nimport { createAuthRolesSchema } from './roles/index.js';\n\nexport const createAuthPluginDefinitionSchema = definitionSchema((ctx) =>\n z.object({\n implementationPluginKey: z\n .string()\n .min(1, 'Auth implementation plugin must be selected'),\n authFeatureRef: ctx.withRef({\n type: featureEntityType,\n onDelete: 'RESTRICT',\n }),\n accountsFeatureRef: ctx.withRef({\n type: featureEntityType,\n onDelete: 'RESTRICT',\n }),\n roles: createAuthRolesSchema(ctx),\n }),\n);\n\nexport type AuthPluginDefinition = def.InferOutput<\n typeof createAuthPluginDefinitionSchema\n>;\n\nexport type AuthPluginDefinitionInput = def.InferInput<\n typeof createAuthPluginDefinitionSchema\n>;\n"],"names":["authRoleEntityType","definitionSchema","z","ctx"],"mappings":";;AAAA,MAAA,qBAAAA,oBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AAIO,MAAM,kBAAA,GAAuD;AAAA,EAClE;AAAA,IACE,IAAA,EAAM,QAAA;AAAA,IACN,OAAA,EAAS,+DAAA;AAAA,IACT,OAAA,EAAS,IAAA;AAAA,IACT,YAAA,EAAc;AAAA,GAChB;AAAA,EACA;AAAA,IACE,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS,yBAAA;AAAA,IACT,OAAA,EAAS,IAAA;AAAA,IACT,YAAA,EAAc;AAAA,GAChB;AAAA,EACA;AAAA,IACE,IAAA,EAAM,QAAA;AAAA,IACN,OAAA,EAAS,+DAAA;AAAA,IACT,OAAA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,MACN,QAAA,EAAU;AAAA,KACX,CAAA;AAAA,IACD,kBAAA,EAAoB,IAAI,OAAA,CAAQ;AAAA,MAC9B,IAAA,EAAM,iBAAA;AAAA,MACN,QAAA,EAAU;AAAA,KACX,CAAA;AAAA,IACD,KAAA,EAAO,sBAAsB,GAAG;AAAA,GACjC;AACH;;;;"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a, A as AuthConfigTabs } from './styles-CpKtlIgU.js';
|
|
4
|
-
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-DHcbFujw.js';
|
|
5
|
-
import { B as BETTER_AUTH_MODELS, c as createBetterAuthPluginDefinitionSchema } from './plugin-definition-CEQb6mWV.js';
|
|
1
|
+
import { B as BETTER_AUTH_MODELS } from './model-names-D7UT0B8x.js';
|
|
2
|
+
import { importShared } from './__federation_fn_import-DybuDj1g.js';
|
|
6
3
|
|
|
7
|
-
function createBetterAuthPartialDefinition(authFeatureName) {
|
|
4
|
+
function createBetterAuthPartialDefinition(authFeatureName, accountsFeatureName) {
|
|
8
5
|
return {
|
|
9
6
|
models: [
|
|
10
7
|
{
|
|
11
8
|
name: BETTER_AUTH_MODELS.user,
|
|
12
|
-
featureRef:
|
|
9
|
+
featureRef: accountsFeatureName,
|
|
13
10
|
model: {
|
|
14
11
|
fields: [
|
|
15
12
|
{
|
|
16
13
|
name: "id",
|
|
17
14
|
type: "uuid",
|
|
18
|
-
options: {
|
|
15
|
+
options: { defaultGeneration: "uuidv7" }
|
|
19
16
|
},
|
|
20
17
|
{
|
|
21
18
|
name: "name",
|
|
@@ -58,19 +55,34 @@ function createBetterAuthPartialDefinition(authFeatureName) {
|
|
|
58
55
|
graphql: {
|
|
59
56
|
objectType: {
|
|
60
57
|
enabled: true,
|
|
61
|
-
fields: [
|
|
58
|
+
fields: [
|
|
59
|
+
{ ref: "id" },
|
|
60
|
+
{
|
|
61
|
+
ref: "email",
|
|
62
|
+
globalRoles: ["admin"],
|
|
63
|
+
instanceRoles: ["self"]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
62
66
|
}
|
|
67
|
+
},
|
|
68
|
+
authorizer: {
|
|
69
|
+
roles: [
|
|
70
|
+
{
|
|
71
|
+
name: "self",
|
|
72
|
+
expression: "model.id === userId"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
63
75
|
}
|
|
64
76
|
},
|
|
65
77
|
{
|
|
66
78
|
name: BETTER_AUTH_MODELS.session,
|
|
67
|
-
featureRef:
|
|
79
|
+
featureRef: accountsFeatureName,
|
|
68
80
|
model: {
|
|
69
81
|
fields: [
|
|
70
82
|
{
|
|
71
83
|
name: "id",
|
|
72
84
|
type: "uuid",
|
|
73
|
-
options: {
|
|
85
|
+
options: { defaultGeneration: "uuidv7" }
|
|
74
86
|
},
|
|
75
87
|
{
|
|
76
88
|
name: "expiresAt",
|
|
@@ -125,13 +137,13 @@ function createBetterAuthPartialDefinition(authFeatureName) {
|
|
|
125
137
|
},
|
|
126
138
|
{
|
|
127
139
|
name: BETTER_AUTH_MODELS.account,
|
|
128
|
-
featureRef:
|
|
140
|
+
featureRef: accountsFeatureName,
|
|
129
141
|
model: {
|
|
130
142
|
fields: [
|
|
131
143
|
{
|
|
132
144
|
name: "id",
|
|
133
145
|
type: "uuid",
|
|
134
|
-
options: {
|
|
146
|
+
options: { defaultGeneration: "uuidv7" }
|
|
135
147
|
},
|
|
136
148
|
{
|
|
137
149
|
name: "accountId",
|
|
@@ -212,7 +224,7 @@ function createBetterAuthPartialDefinition(authFeatureName) {
|
|
|
212
224
|
{
|
|
213
225
|
name: "id",
|
|
214
226
|
type: "uuid",
|
|
215
|
-
options: {
|
|
227
|
+
options: { defaultGeneration: "uuidv4" }
|
|
216
228
|
},
|
|
217
229
|
{
|
|
218
230
|
name: "identifier",
|
|
@@ -242,7 +254,7 @@ function createBetterAuthPartialDefinition(authFeatureName) {
|
|
|
242
254
|
},
|
|
243
255
|
{
|
|
244
256
|
name: BETTER_AUTH_MODELS.userRole,
|
|
245
|
-
featureRef:
|
|
257
|
+
featureRef: accountsFeatureName,
|
|
246
258
|
model: {
|
|
247
259
|
fields: [
|
|
248
260
|
{
|
|
@@ -281,122 +293,23 @@ function createBetterAuthPartialDefinition(authFeatureName) {
|
|
|
281
293
|
};
|
|
282
294
|
}
|
|
283
295
|
|
|
284
|
-
const {
|
|
296
|
+
const {authRoleEntityType,definitionSchema} = await importShared('@baseplate-dev/project-builder-lib');
|
|
285
297
|
|
|
286
|
-
const {
|
|
298
|
+
const {z} = await importShared('zod');
|
|
287
299
|
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
);
|
|
299
|
-
const defaultValues = useMemo(() => {
|
|
300
|
-
if (pluginMetadata?.config) {
|
|
301
|
-
return pluginMetadata.config;
|
|
302
|
-
}
|
|
303
|
-
return {};
|
|
304
|
-
}, [pluginMetadata?.config]);
|
|
305
|
-
const form = useResettableForm({
|
|
306
|
-
resolver: a(betterAuthPluginDefinitionSchema),
|
|
307
|
-
defaultValues
|
|
308
|
-
});
|
|
309
|
-
const { control, reset, handleSubmit } = form;
|
|
310
|
-
const authDefinition = getAuthPluginDefinition(definition);
|
|
311
|
-
const authFeature = definition.features.find(
|
|
312
|
-
(f) => f.id === authDefinition.authFeatureRef
|
|
313
|
-
);
|
|
314
|
-
if (!authFeature) {
|
|
315
|
-
throw new Error(
|
|
316
|
-
`Auth feature not found for ref: ${authDefinition.authFeatureRef}`
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
const partialDef = useMemo(
|
|
320
|
-
() => createBetterAuthPartialDefinition(authFeature.name),
|
|
321
|
-
[authFeature.name]
|
|
322
|
-
);
|
|
323
|
-
const diff = useMemo(
|
|
324
|
-
() => diffDefinition(
|
|
325
|
-
definitionContainer.schema,
|
|
326
|
-
definitionContainer.definition,
|
|
327
|
-
partialDef
|
|
328
|
-
),
|
|
329
|
-
[definitionContainer, partialDef]
|
|
330
|
-
);
|
|
331
|
-
const onSubmit = handleSubmit(
|
|
332
|
-
(data) => saveDefinitionWithFeedback(
|
|
333
|
-
(draftConfig) => {
|
|
334
|
-
const updatedData = {
|
|
335
|
-
...data
|
|
336
|
-
};
|
|
337
|
-
applyMergedDefinition(definitionContainer, partialDef)(draftConfig);
|
|
338
|
-
PluginUtils.setPluginConfig(
|
|
339
|
-
draftConfig,
|
|
340
|
-
metadata,
|
|
341
|
-
updatedData,
|
|
342
|
-
definitionContainer
|
|
343
|
-
);
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
successMessage: "Successfully saved Better Auth plugin!",
|
|
347
|
-
onSuccess: () => {
|
|
348
|
-
onSave();
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
)
|
|
352
|
-
);
|
|
353
|
-
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
354
|
-
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: [
|
|
355
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AuthConfigTabs, {}),
|
|
356
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
357
|
-
"div",
|
|
358
|
-
{
|
|
359
|
-
className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto",
|
|
360
|
-
style: {
|
|
361
|
-
"--action-bar-height": "52px"
|
|
362
|
-
},
|
|
363
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [
|
|
364
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:pb-16", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SectionList, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
365
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
366
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Better Auth Configuration" }),
|
|
367
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })
|
|
368
|
-
] }),
|
|
369
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
370
|
-
DefinitionDiffAlert,
|
|
371
|
-
{
|
|
372
|
-
diff,
|
|
373
|
-
upToDateMessage: "All required models are already configured correctly. No changes needed."
|
|
374
|
-
}
|
|
375
|
-
) })
|
|
376
|
-
] }) }) }),
|
|
377
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
378
|
-
FormActionBar,
|
|
379
|
-
{
|
|
380
|
-
form,
|
|
381
|
-
allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges
|
|
382
|
-
}
|
|
383
|
-
)
|
|
384
|
-
] })
|
|
385
|
-
}
|
|
300
|
+
const createBetterAuthPluginDefinitionSchema = definitionSchema(
|
|
301
|
+
(ctx) => z.object({
|
|
302
|
+
additionalUserAdminRoles: ctx.withDefault(
|
|
303
|
+
z.array(
|
|
304
|
+
ctx.withRef({
|
|
305
|
+
type: authRoleEntityType,
|
|
306
|
+
onDelete: "DELETE"
|
|
307
|
+
})
|
|
308
|
+
),
|
|
309
|
+
[]
|
|
386
310
|
)
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
const {createPluginModule,webConfigSpec} = await importShared('@baseplate-dev/project-builder-lib');
|
|
391
|
-
const web = createPluginModule({
|
|
392
|
-
name: "web",
|
|
393
|
-
dependencies: {
|
|
394
|
-
webConfig: webConfigSpec
|
|
395
|
-
},
|
|
396
|
-
initialize: ({ webConfig }, { pluginKey }) => {
|
|
397
|
-
webConfig.components.set(pluginKey, BetterAuthDefinitionEditor);
|
|
398
|
-
}
|
|
399
|
-
});
|
|
311
|
+
})
|
|
312
|
+
);
|
|
400
313
|
|
|
401
|
-
export {
|
|
402
|
-
//# sourceMappingURL=
|
|
314
|
+
export { createBetterAuthPartialDefinition as a, createBetterAuthPluginDefinitionSchema as c };
|
|
315
|
+
//# sourceMappingURL=plugin-definition-D9-5sSEf.js.map
|