@baseplate-dev/plugin-auth 0.6.4 → 0.6.6
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 +46 -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 +7 -4
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -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 +12 -1
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +72 -6
- 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 +108 -9
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- 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 +6 -3
- 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 +1 -2
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +1 -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-BSv8GVI2.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-IuYupUXE.js → __federation_expose_local-authAdminCommon-Bp8fb_BT.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-IuYupUXE.js.map → __federation_expose_local-authAdminCommon-Bp8fb_BT.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-BzhksqwO.js → __federation_expose_local-authAdminWeb-BDyZDL1a.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-BzhksqwO.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-hGIPuBy3.js → __federation_expose_placeholder-authCoreCommon-Bq0ln8n5.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-hGIPuBy3.js.map → __federation_expose_placeholder-authCoreCommon-Bq0ln8n5.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-P4Qq8Zf6.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-CzLgVaFb.js → __federation_fn_import-DybuDj1g.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-CzLgVaFb.js.map → __federation_fn_import-DybuDj1g.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-DA-fkeD5.js → web-CAuxM6sN.js} +11 -11
- 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-zJirGIS1.js → project-builder-lib-DkaXS95C.js} +11304 -10250
- 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-Ds8y9Suz.js → ui-components-DX4jbl4M.js} +217 -51
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DX4jbl4M.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-DnBM79-7.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-BoEohCHh.js → react-router-DyqK0P1G.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-BoEohCHh.js.map → react-router-DyqK0P1G.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-DM6kosCC.js → get-auth-plugin-definition-BigT75An.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-DM6kosCC.js.map → get-auth-plugin-definition-BigT75An.js.map} +1 -1
- package/dist/web/assets/{index-EshpyU4T.js → index-BwviOVwi.js} +3 -5
- package/dist/web/assets/{index-EshpyU4T.js.map → index-BwviOVwi.js.map} +1 -1
- package/dist/web/assets/{index.esm-CYY7gyrG.js → index.esm-Db6zPKK9.js} +2 -2
- package/dist/web/assets/{index.esm-CYY7gyrG.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-WWo9T1Zx.js → model-utils-D0sDtkf1.js} +138 -20
- 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-CqP9VmOQ.js → plugin-definition-Cg8Gij5x.js} +2 -2
- package/dist/web/assets/{plugin-definition-CqP9VmOQ.js.map → plugin-definition-Cg8Gij5x.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-y6VVQ5_O.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-2kA00dBg.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-B6Fz4KB7.js → react-CcDhDxl8.js} +2 -2
- package/dist/web/assets/{react-B6Fz4KB7.js.map → react-CcDhDxl8.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +20 -14
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/{styles-0yxEwdyo.js → styles-Otn_yxD1.js} +3 -3
- package/dist/web/assets/{styles-0yxEwdyo.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-D8SAyij-.js +0 -30
- package/dist/web/assets/__federation_expose_authCoreCommon-D8SAyij-.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-BSv8GVI2.js.map +0 -1
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BJhkN6zV.js +0 -20
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BJhkN6zV.js.map +0 -1
- package/dist/web/assets/__federation_expose_better-authCoreWeb-2kA00dBg.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreCommon-DO5xRAoM.js +0 -21
- package/dist/web/assets/__federation_expose_local-authCoreCommon-DO5xRAoM.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-QdXa2aao.js +0 -448
- package/dist/web/assets/__federation_expose_local-authCoreWeb-QdXa2aao.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-P4Qq8Zf6.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DA-fkeD5.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-zJirGIS1.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-Ds8y9Suz.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-DnBM79-7.js.map +0 -1
- package/dist/web/assets/model-utils-WWo9T1Zx.js.map +0 -1
- package/dist/web/assets/plugin-definition-BCrs3YSY.js +0 -20
- package/dist/web/assets/plugin-definition-BCrs3YSY.js.map +0 -1
- package/dist/web/assets/plugin-definition-BwAJGzRn.js +0 -32
- package/dist/web/assets/plugin-definition-BwAJGzRn.js.map +0 -1
- package/dist/web/assets/plugin-definition-y6VVQ5_O.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-names-D7UT0B8x.js","sources":["../../../src/better-auth/constants/model-names.ts"],"sourcesContent":["export const BETTER_AUTH_MODELS = {\n user: 'User',\n session: 'Session',\n account: 'Account',\n verification: 'Verification',\n userRole: 'UserRole',\n} as const;\n"],"names":[],"mappings":"AAAO,MAAM,kBAAA,GAAqB;AAAA,EAChC,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,YAAA,EAAc,cAAA;AAAA,EACd,QAAA,EAAU;AACZ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-DybuDj1g.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a plugin spec with init and use phases.
|
|
@@ -165,6 +165,96 @@ const definitionRefRegistry = (() => {
|
|
|
165
165
|
};
|
|
166
166
|
})();
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Plugin spec for registering expression parsers.
|
|
170
|
+
*
|
|
171
|
+
* Expression parsers handle parsing, validation, and rename detection
|
|
172
|
+
* for expression fields in the project definition (e.g., authorizer
|
|
173
|
+
* role expressions).
|
|
174
|
+
*
|
|
175
|
+
* Built-in parsers (authorizer expressions) are registered by core modules.
|
|
176
|
+
* Plugins can register additional parsers during initialization.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* createPluginModule({
|
|
181
|
+
* dependencies: { expressionParsers: expressionParserSpec },
|
|
182
|
+
* initialize: ({ expressionParsers }) => {
|
|
183
|
+
* expressionParsers.parsers.set('my-expression', myParser);
|
|
184
|
+
* },
|
|
185
|
+
* });
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
const expressionParserSpec = createFieldMapSpec('core/expression-parsers', (t) => ({
|
|
189
|
+
parsers: t.map(),
|
|
190
|
+
}), {
|
|
191
|
+
use: (values) => ({
|
|
192
|
+
getParser: (name) => values.parsers.get(name),
|
|
193
|
+
}),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A pluggable parser for ref expressions.
|
|
198
|
+
*
|
|
199
|
+
* The parser is format-agnostic - the core references system
|
|
200
|
+
* doesn't know or care what format the expressions are in. The parser
|
|
201
|
+
* handles all parsing, validation, and rename handling.
|
|
202
|
+
*
|
|
203
|
+
* Parsers can declare required slots via the TRequiredSlots generic parameter.
|
|
204
|
+
* When a parser requires slots, TypeScript enforces that they are provided
|
|
205
|
+
* when calling `withExpression()`.
|
|
206
|
+
*
|
|
207
|
+
* @typeParam TValue - The type of the raw expression value (e.g., string for TS expressions)
|
|
208
|
+
* @typeParam TParseResult - The type of the parsed result (e.g., AST for TS expressions)
|
|
209
|
+
* @typeParam TRequiredSlots - Record of required slot names to entity types
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```typescript
|
|
213
|
+
* // A simple parser with no required slots
|
|
214
|
+
* class StubParser extends RefExpressionParser<string, undefined> {
|
|
215
|
+
* readonly name = 'stub';
|
|
216
|
+
* parse(): undefined { return undefined; }
|
|
217
|
+
* getWarnings(): [] { return []; }
|
|
218
|
+
* getReferencedEntities(): [] { return []; }
|
|
219
|
+
* }
|
|
220
|
+
*
|
|
221
|
+
* // A parser that requires a model slot
|
|
222
|
+
* class AuthorizerParser extends RefExpressionParser<
|
|
223
|
+
* string,
|
|
224
|
+
* TsAst,
|
|
225
|
+
* { model: typeof modelEntityType }
|
|
226
|
+
* > {
|
|
227
|
+
* readonly name = 'authorizer';
|
|
228
|
+
* // TypeScript enforces slot requirement in withExpression()
|
|
229
|
+
* }
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
class RefExpressionParser {
|
|
233
|
+
/**
|
|
234
|
+
* Convenience method that combines parse() and getWarnings() into a single call.
|
|
235
|
+
* Parses the expression and returns all validation warnings (including parse errors).
|
|
236
|
+
*
|
|
237
|
+
* @param value - The raw expression value
|
|
238
|
+
* @param projectDef - The project definition for context
|
|
239
|
+
* @param context - Validation context with project definition and plugin store
|
|
240
|
+
* @param resolvedSlots - The resolved slot paths for this expression
|
|
241
|
+
* @returns Array of warnings (empty if valid)
|
|
242
|
+
*/
|
|
243
|
+
validate(value, projectDef, context, resolvedSlots) {
|
|
244
|
+
const parseResult = this.parse(value, projectDef);
|
|
245
|
+
if (!parseResult.success) {
|
|
246
|
+
return [{ message: parseResult.error }];
|
|
247
|
+
}
|
|
248
|
+
return this.getWarnings(parseResult.value, context, resolvedSlots);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Phantom property for TRequiredSlots type inference.
|
|
252
|
+
* This is never actually used at runtime.
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
_requiredSlots;
|
|
256
|
+
}
|
|
257
|
+
|
|
168
258
|
/**
|
|
169
259
|
* Creates a new ref context slot for the given entity type.
|
|
170
260
|
* Each call creates a unique slot, even for the same entity type.
|
|
@@ -254,6 +344,7 @@ function withEnt(entity) {
|
|
|
254
344
|
getNameResolver: entity.getNameResolver,
|
|
255
345
|
parentSlot: entity.parentSlot,
|
|
256
346
|
provides: entity.provides,
|
|
347
|
+
sortByName: entity.sortByName,
|
|
257
348
|
});
|
|
258
349
|
return schema;
|
|
259
350
|
};
|
|
@@ -309,18 +400,45 @@ function refContext(slotDefinition, schemaBuilder) {
|
|
|
309
400
|
* );
|
|
310
401
|
* ```
|
|
311
402
|
*/
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
403
|
+
/**
|
|
404
|
+
* Creates a `withExpression` function that resolves parser refs eagerly
|
|
405
|
+
* from the plugin spec store at schema construction time.
|
|
406
|
+
*/
|
|
407
|
+
function createWithExpression(plugins) {
|
|
408
|
+
// Implementation
|
|
409
|
+
function withExpression(parserOrRef,
|
|
410
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
411
|
+
slots) {
|
|
412
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
413
|
+
let parser;
|
|
414
|
+
if (parserOrRef instanceof RefExpressionParser) {
|
|
415
|
+
parser = parserOrRef;
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
// Resolve parser ref from plugin spec store
|
|
419
|
+
if (!plugins) {
|
|
420
|
+
throw new Error(`PluginSpecStore is required to resolve expression parser ref "${parserOrRef.name}". ` +
|
|
421
|
+
`Ensure plugins are provided to createDefinitionSchemaParserContext.`);
|
|
422
|
+
}
|
|
423
|
+
const specUse = plugins.use(expressionParserSpec);
|
|
424
|
+
const resolved = specUse.getParser(parserOrRef.name);
|
|
425
|
+
if (!resolved) {
|
|
426
|
+
throw new Error(`Expression parser "${parserOrRef.name}" not found in expressionParserSpec. ` +
|
|
427
|
+
`Ensure it is registered via a core module or plugin.`);
|
|
428
|
+
}
|
|
429
|
+
parser = resolved;
|
|
430
|
+
}
|
|
431
|
+
const schema = parser.createSchema();
|
|
432
|
+
definitionRefRegistry.add(schema, {
|
|
433
|
+
kind: 'expression',
|
|
434
|
+
parser,
|
|
435
|
+
slots,
|
|
436
|
+
});
|
|
437
|
+
return schema;
|
|
438
|
+
}
|
|
439
|
+
return withExpression;
|
|
322
440
|
}
|
|
323
|
-
function extendParserContextWithRefs() {
|
|
441
|
+
function extendParserContextWithRefs(plugins) {
|
|
324
442
|
return {
|
|
325
443
|
withRef,
|
|
326
444
|
// Legacy 2-arg API that delegates to the standalone withEnt decorator.
|
|
@@ -330,7 +448,7 @@ function extendParserContextWithRefs() {
|
|
|
330
448
|
return schema.apply(withEnt(entity));
|
|
331
449
|
},
|
|
332
450
|
refContext,
|
|
333
|
-
withExpression,
|
|
451
|
+
withExpression: createWithExpression(plugins),
|
|
334
452
|
};
|
|
335
453
|
}
|
|
336
454
|
|
|
@@ -392,7 +510,7 @@ function createDefinitionSchemaParserContext(options) {
|
|
|
392
510
|
return cached;
|
|
393
511
|
const context = {
|
|
394
512
|
...options,
|
|
395
|
-
...extendParserContextWithRefs(),
|
|
513
|
+
...extendParserContextWithRefs(options.plugins),
|
|
396
514
|
...extendParserContextWithDefaults(),
|
|
397
515
|
};
|
|
398
516
|
contextCache.set(options.plugins, context);
|
|
@@ -530,7 +648,7 @@ const createFeatureSchema = definitionSchema((ctx) => ctx.withEnt(z.object({
|
|
|
530
648
|
onDelete: 'DELETE_PARENT',
|
|
531
649
|
})
|
|
532
650
|
.optional(),
|
|
533
|
-
}), { type: featureEntityType }));
|
|
651
|
+
}), { type: featureEntityType, sortByName: true }));
|
|
534
652
|
const createFeaturesSchema = definitionSchema((ctx) => z.array(createFeatureSchema(ctx)).default([]));
|
|
535
653
|
|
|
536
654
|
function getRootFeatures(projectDefinition) {
|
|
@@ -556,7 +674,7 @@ function getFeatureNameById(projectDefinition, featureId) {
|
|
|
556
674
|
const feature = getFeatureByIdOrThrow(projectDefinition, featureId);
|
|
557
675
|
return getFeatureName(feature);
|
|
558
676
|
}
|
|
559
|
-
function
|
|
677
|
+
function getFeaturePathByIdOrThrow(projectDefinition, featureId) {
|
|
560
678
|
const feature = getFeatureByIdOrThrow(projectDefinition, featureId);
|
|
561
679
|
return feature.name;
|
|
562
680
|
}
|
|
@@ -620,7 +738,7 @@ function resolveFeatureName(projectDefinition, featureRef) {
|
|
|
620
738
|
if (!featureRef)
|
|
621
739
|
return '';
|
|
622
740
|
if (featureEntityType.isId(featureRef)) {
|
|
623
|
-
return
|
|
741
|
+
return getFeaturePathByIdOrThrow(projectDefinition, featureRef);
|
|
624
742
|
}
|
|
625
743
|
return featureRef;
|
|
626
744
|
}
|
|
@@ -631,7 +749,7 @@ const FeatureUtils = {
|
|
|
631
749
|
getFeatureChildren,
|
|
632
750
|
getFeatureName,
|
|
633
751
|
getFeatureNameById,
|
|
634
|
-
|
|
752
|
+
getFeaturePathByIdOrThrow,
|
|
635
753
|
validateFeatureName,
|
|
636
754
|
ensureFeatureByNameRecursively,
|
|
637
755
|
createPartialFeatures,
|
|
@@ -718,5 +836,5 @@ const ModelUtils = {
|
|
|
718
836
|
getPrimaryKeyFields,
|
|
719
837
|
};
|
|
720
838
|
|
|
721
|
-
export { DefinitionEntityType as D, FeatureUtils as F, ModelUtils as M, createEntityType as a, definitionRefRegistry as b, createFieldMapSpec as c, definitionSchemaWithSlots as d, definitionDefaultRegistry as e, definitionSchema as f, featureEntityType as g, createFeaturesSchema as h, createDefinitionSchemaParserContext as i,
|
|
722
|
-
//# sourceMappingURL=model-utils-
|
|
839
|
+
export { DefinitionEntityType as D, FeatureUtils as F, ModelUtils as M, RefExpressionParser as R, createEntityType as a, definitionRefRegistry as b, createFieldMapSpec as c, definitionSchemaWithSlots as d, definitionDefaultRegistry as e, definitionSchema as f, featureEntityType as g, createFeaturesSchema as h, createDefinitionSchemaParserContext as i, expressionParserSpec as j, createFeatureSchema as k, createPluginFieldMap as l, createPluginSpec as m, createRefContextSlot as n, createRefContextSlotMap as o, featureNameSchema as p, getPluginContext as q, runInPluginContext as r, withEnt as s, withPlaceholderSlots as t, withRef as u, withDefault as w };
|
|
840
|
+
//# sourceMappingURL=model-utils-D0sDtkf1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-utils-D0sDtkf1.js","sources":["../../../../../packages/project-builder-lib/dist/plugins/spec/types.js","../../../../../packages/project-builder-lib/dist/plugins/context/plugin-context.js","../../../../../packages/project-builder-lib/dist/plugins/utils/create-plugin-field-map.js","../../../../../packages/project-builder-lib/dist/plugins/utils/create-field-map-spec.js","../../../../../packages/project-builder-lib/dist/references/definition-ref-registry.js","../../../../../packages/project-builder-lib/dist/references/expression-parser-spec.js","../../../../../packages/project-builder-lib/dist/references/expression-types.js","../../../../../packages/project-builder-lib/dist/references/ref-context-slot.js","../../../../../packages/project-builder-lib/dist/references/extend-parser-context-with-refs.js","../../../../../packages/project-builder-lib/dist/schema/creator/definition-default-registry.js","../../../../../packages/project-builder-lib/dist/schema/creator/extend-parser-context-with-defaults.js","../../../../../packages/project-builder-lib/dist/schema/creator/schema-creator.js","../../../../../packages/project-builder-lib/dist/references/types.js","../../../../../packages/project-builder-lib/dist/schema/features/feature.js","../../../../../packages/project-builder-lib/dist/definition/feature/feature-utils.js","../../../../../packages/project-builder-lib/dist/definition/model/model-utils.js"],"sourcesContent":["/**\n * Creates a plugin spec with init and use phases.\n *\n * @example\n * ```typescript\n * const mySpec = createPluginSpec('core/my-spec', {\n * initializer: () => {\n * const items = new Map<string, Item>();\n * return {\n * init: {\n * register: (item: Item) => items.set(item.name, item),\n * },\n * use: () => ({\n * get: (name: string) => items.get(name),\n * getAll: () => [...items.values()],\n * }),\n * };\n * },\n * });\n * ```\n *\n * @param name - Unique identifier for the spec (e.g., 'core/my-spec')\n * @param options - Options including the initializer function\n * @returns A plugin spec that can be used with SpecStore\n */\nexport function createPluginSpec(name, options) {\n const { initializer } = options;\n return {\n type: 'plugin-spec',\n name,\n initializer,\n };\n}\n//# sourceMappingURL=types.js.map","/**\n * Plugin context module for tracking the current plugin being initialized.\n *\n * Uses a simple synchronous context that works on both Node and browser platforms.\n * This is safe because plugin initialization is synchronous and single-threaded.\n */\n// Simple synchronous context - works on both Node and browser\n// Safe because plugin initialization is synchronous and single-threaded\nlet currentPluginContext;\n/**\n * Runs a function within a plugin context.\n *\n * This sets the current plugin context for the duration of the function execution,\n * allowing nested functions to access the plugin key via `getPluginContext()`.\n *\n * @param context - The plugin context to set\n * @param fn - The function to run within the context\n * @returns The result of the function\n */\nexport function runInPluginContext(context, fn) {\n const prev = currentPluginContext;\n currentPluginContext = context;\n try {\n return fn();\n }\n finally {\n currentPluginContext = prev;\n }\n}\n/**\n * Gets the current plugin context if one exists.\n *\n * @returns The current plugin context, or undefined if not in a plugin context\n */\nexport function getPluginContext() {\n return currentPluginContext;\n}\n//# sourceMappingURL=plugin-context.js.map","import { createFieldMap } from '@baseplate-dev/utils';\nimport { getPluginContext } from '../context/plugin-context.js';\n/**\n * Creates a field map that automatically tracks which plugin registered each value.\n *\n * Similar to `createConfigFieldMap` in the sync package, this utility uses the\n * current plugin context to track the source of registrations. This enables\n * clear error messages when registration conflicts occur.\n *\n * @example\n * ```typescript\n * const fieldMap = createPluginFieldMap((t) => ({\n * transformers: t.map<string, Transformer>(),\n * }));\n *\n * // When a plugin tries to overwrite a value:\n * // Error: Value for key 'myTransformer' has already been set by plugin-auth\n * // and cannot be overwritten by plugin-storage\n * ```\n *\n * @param schemaBuilder - A function that builds the field map schema\n * @returns A field map with automatic source tracking\n */\nexport function createPluginFieldMap(schemaBuilder) {\n return createFieldMap(schemaBuilder, {\n getDynamicSource: () => getPluginContext()?.pluginKey,\n });\n}\n//# sourceMappingURL=create-plugin-field-map.js.map","import { createPluginSpec } from '../spec/types.js';\nimport { createPluginFieldMap } from './create-plugin-field-map.js';\n/**\n * Creates a plugin spec backed by a FieldMap for automatic source tracking.\n *\n * @param name - Unique identifier for the spec\n * @param schemaBuilder - Function that builds the field map schema\n * @param options - Optional configuration including custom use interface\n */\nexport function createFieldMapSpec(name, schemaBuilder, options) {\n return createPluginSpec(name, {\n initializer: () => {\n const fieldMap = createPluginFieldMap(schemaBuilder);\n return {\n init: fieldMap,\n use: () => {\n const values = fieldMap.getValues();\n if (options?.use) {\n return options.use(values);\n }\n return values;\n },\n };\n },\n });\n}\n//# sourceMappingURL=create-field-map-spec.js.map","/**\n * Global registry that stores Baseplate metadata on Zod schema instances.\n *\n * Uses a plain WeakMap to avoid Zod's `$replace<Meta, S>` type substitution\n * which causes \"type instantiation excessively deep\" errors with complex unions.\n *\n * Stores an array of metadata per schema to support schemas that carry multiple\n * annotations (e.g. a schema that is both an `entity` and a `ref-context`).\n *\n * Used by `withEnt`, `withRef`, `withExpression`, and `refContext` to attach\n * metadata to schema nodes. The parallel schema+data walker reads this registry\n * to extract entity/reference/expression information after validation.\n */\nexport const definitionRefRegistry = (() => {\n const map = new WeakMap();\n return {\n add(schema, meta) {\n const existing = map.get(schema);\n if (existing) {\n if ((meta.kind === 'entity' || meta.kind === 'reference') &&\n existing.some((e) => e.kind === meta.kind && e.type === meta.type)) {\n throw new Error(`Duplicate definition ref metadata kind \"${meta.kind}\" for type \"${meta.type.name}\" on the same schema instance. ` +\n `This usually means a shared/module-level schema was passed to withEnt/withRef multiple times. ` +\n `Create a fresh schema instance instead.`);\n }\n existing.push(meta);\n }\n else {\n map.set(schema, [meta]);\n }\n },\n getAll(schema) {\n return map.get(schema) ?? [];\n },\n has(schema) {\n return map.has(schema);\n },\n };\n})();\n//# sourceMappingURL=definition-ref-registry.js.map","import { createFieldMapSpec } from '#src/plugins/utils/create-field-map-spec.js';\n/**\n * Plugin spec for registering expression parsers.\n *\n * Expression parsers handle parsing, validation, and rename detection\n * for expression fields in the project definition (e.g., authorizer\n * role expressions).\n *\n * Built-in parsers (authorizer expressions) are registered by core modules.\n * Plugins can register additional parsers during initialization.\n *\n * @example\n * ```typescript\n * createPluginModule({\n * dependencies: { expressionParsers: expressionParserSpec },\n * initialize: ({ expressionParsers }) => {\n * expressionParsers.parsers.set('my-expression', myParser);\n * },\n * });\n * ```\n */\nexport const expressionParserSpec = createFieldMapSpec('core/expression-parsers', (t) => ({\n parsers: t.map(),\n}), {\n use: (values) => ({\n getParser: (name) => values.parsers.get(name),\n }),\n});\n//# sourceMappingURL=expression-parser-spec.js.map","/**\n * A pluggable parser for ref expressions.\n *\n * The parser is format-agnostic - the core references system\n * doesn't know or care what format the expressions are in. The parser\n * handles all parsing, validation, and rename handling.\n *\n * Parsers can declare required slots via the TRequiredSlots generic parameter.\n * When a parser requires slots, TypeScript enforces that they are provided\n * when calling `withExpression()`.\n *\n * @typeParam TValue - The type of the raw expression value (e.g., string for TS expressions)\n * @typeParam TParseResult - The type of the parsed result (e.g., AST for TS expressions)\n * @typeParam TRequiredSlots - Record of required slot names to entity types\n *\n * @example\n * ```typescript\n * // A simple parser with no required slots\n * class StubParser extends RefExpressionParser<string, undefined> {\n * readonly name = 'stub';\n * parse(): undefined { return undefined; }\n * getWarnings(): [] { return []; }\n * getReferencedEntities(): [] { return []; }\n * }\n *\n * // A parser that requires a model slot\n * class AuthorizerParser extends RefExpressionParser<\n * string,\n * TsAst,\n * { model: typeof modelEntityType }\n * > {\n * readonly name = 'authorizer';\n * // TypeScript enforces slot requirement in withExpression()\n * }\n * ```\n */\nexport class RefExpressionParser {\n /**\n * Convenience method that combines parse() and getWarnings() into a single call.\n * Parses the expression and returns all validation warnings (including parse errors).\n *\n * @param value - The raw expression value\n * @param projectDef - The project definition for context\n * @param context - Validation context with project definition and plugin store\n * @param resolvedSlots - The resolved slot paths for this expression\n * @returns Array of warnings (empty if valid)\n */\n validate(value, projectDef, context, resolvedSlots) {\n const parseResult = this.parse(value, projectDef);\n if (!parseResult.success) {\n return [{ message: parseResult.error }];\n }\n return this.getWarnings(parseResult.value, context, resolvedSlots);\n }\n /**\n * Phantom property for TRequiredSlots type inference.\n * This is never actually used at runtime.\n * @internal\n */\n _requiredSlots;\n}\n//# sourceMappingURL=expression-types.js.map","/**\n * Creates a new ref context slot for the given entity type.\n * Each call creates a unique slot, even for the same entity type.\n *\n * @param name - A descriptive name for debugging (shows in Symbol description)\n * @param entityType - The entity type this slot will be associated with\n * @returns A new unique RefContextSlot instance\n *\n * @example\n * ```typescript\n * const modelSlot = createRefContextSlot('modelSlot', modelEntityType);\n * const anotherModelSlot = createRefContextSlot('anotherModelSlot', modelEntityType);\n *\n * // These are different slots despite same entity type\n * modelSlot.id !== anotherModelSlot.id\n * // modelSlot.id.toString() === 'Symbol(modelSlot)'\n * ```\n */\nexport function createRefContextSlot(name, entityType) {\n return {\n entityType,\n id: Symbol(name),\n };\n}\n/**\n * Creates a RefContextSlotMap from a slot definition.\n * Used internally by ctx.refContext().\n *\n * @param slotDefinition - Map of slot names to entity types\n * @returns Map of slot names to RefContextSlot instances\n */\nexport function createRefContextSlotMap(slotDefinition) {\n return Object.fromEntries(Object.entries(slotDefinition).map(([key, entityType]) => [\n key,\n createRefContextSlot(key, entityType),\n ]));\n}\n//# sourceMappingURL=ref-context-slot.js.map","import { z } from 'zod';\nimport { definitionRefRegistry } from './definition-ref-registry.js';\nimport { expressionParserSpec } from './expression-parser-spec.js';\nimport { RefExpressionParser } from './expression-types.js';\nimport { createRefContextSlotMap } from './ref-context-slot.js';\n/**\n * Creates a string schema annotated as a reference to another entity.\n *\n * Can be used standalone:\n * ```typescript\n * withRef({ type: modelEnumEntityType, onDelete: 'RESTRICT' })\n * ```\n *\n * Or on the parser context:\n * ```typescript\n * ctx.withRef({ type: modelEnumEntityType, onDelete: 'RESTRICT' })\n * ```\n */\nexport function withRef(reference) {\n const schema = z.string().min(1);\n definitionRefRegistry.add(schema, {\n kind: 'reference',\n type: reference.type,\n onDelete: reference.onDelete,\n parentSlot: reference.parentSlot,\n provides: reference.provides,\n });\n return schema;\n}\n/**\n * Creates a schema decorator that marks a schema as defining an entity.\n *\n * Can be used with `.apply()`:\n * ```typescript\n * schema.apply(withEnt({ type: modelEntityType, provides: modelSlot }))\n * ```\n *\n * Or via the parser context (2-arg legacy form):\n * ```typescript\n * ctx.withEnt(schema, { type: modelEntityType, provides: modelSlot })\n * ```\n *\n * @param entity - The entity definition input\n * @returns A function that decorates a schema with entity metadata\n */\nexport function withEnt(entity) {\n return (schema) => {\n const idPath = entity.idPath ?? ['id'];\n definitionRefRegistry.add(schema, {\n kind: 'entity',\n type: entity.type,\n idPath,\n getNameResolver: entity.getNameResolver,\n parentSlot: entity.parentSlot,\n provides: entity.provides,\n sortByName: entity.sortByName,\n });\n return schema;\n };\n}\n/**\n * Creates ref context slots for use within a schema definition.\n * Slots provide type-safe context for parent-child entity relationships.\n *\n * @example\n * ```typescript\n * ctx.refContext(\n * { modelSlot: modelEntityType },\n * ({ modelSlot }) =>\n * ctx.withEnt(schema, {\n * type: modelEntityType,\n * provides: modelSlot,\n * }),\n * );\n * ```\n */\nfunction refContext(slotDefinition, schemaBuilder) {\n const slots = createRefContextSlotMap(slotDefinition);\n const schema = schemaBuilder(slots);\n definitionRefRegistry.add(schema, {\n kind: 'ref-context',\n slots: Object.values(slots),\n });\n return schema;\n}\n/**\n * Wraps a value with a ref expression parser for deferred validation.\n * The parser handles all parsing, validation, and rename handling.\n *\n * If the parser declares required slots (via TRequiredSlots), they must be\n * provided as the second argument. TypeScript enforces this at compile time.\n *\n * The parser's `createSchema()` method is called to get a fresh schema\n * instance per call site, allowing per-call metadata to be registered\n * independently in the Baseplate registry.\n *\n * @example\n * ```typescript\n * // Parser without required slots\n * const expressionSchema = ctx.withExpression(simpleParser);\n *\n * // Parser with required slots (TypeScript enforces the second argument)\n * ctx.refContext(\n * { modelSlot: modelEntityType },\n * ({ modelSlot }) =>\n * z.object({\n * condition: ctx.withExpression(authorizerParser, { model: modelSlot }),\n * })\n * );\n * ```\n */\n/**\n * Creates a `withExpression` function that resolves parser refs eagerly\n * from the plugin spec store at schema construction time.\n */\nfunction createWithExpression(plugins) {\n // Implementation\n function withExpression(parserOrRef, \n // oxlint-disable-next-line typescript/no-explicit-any\n slots) {\n // oxlint-disable-next-line typescript/no-explicit-any\n let parser;\n if (parserOrRef instanceof RefExpressionParser) {\n parser = parserOrRef;\n }\n else {\n // Resolve parser ref from plugin spec store\n if (!plugins) {\n throw new Error(`PluginSpecStore is required to resolve expression parser ref \"${parserOrRef.name}\". ` +\n `Ensure plugins are provided to createDefinitionSchemaParserContext.`);\n }\n const specUse = plugins.use(expressionParserSpec);\n const resolved = specUse.getParser(parserOrRef.name);\n if (!resolved) {\n throw new Error(`Expression parser \"${parserOrRef.name}\" not found in expressionParserSpec. ` +\n `Ensure it is registered via a core module or plugin.`);\n }\n parser = resolved;\n }\n const schema = parser.createSchema();\n definitionRefRegistry.add(schema, {\n kind: 'expression',\n parser,\n slots,\n });\n return schema;\n }\n return withExpression;\n}\nexport function extendParserContextWithRefs(plugins) {\n return {\n withRef,\n // Legacy 2-arg API that delegates to the standalone withEnt decorator.\n // Uses a cast because the standalone accepts DefinitionEntityInput<unknown, ...>\n // while this 2-arg form infers the full z.output<TType> for type-safe idPath.\n withEnt(schema, entity) {\n return schema.apply(withEnt(entity));\n },\n refContext,\n withExpression: createWithExpression(plugins),\n };\n}\n//# sourceMappingURL=extend-parser-context-with-refs.js.map","/**\n * Registry that stores default-value metadata on Zod schema instances.\n *\n * Uses a WeakMap to avoid interfering with Zod's type system.\n * Annotated by `withDefault()`; read by `cleanDefaultValues()`.\n */\nexport const definitionDefaultRegistry = (() => {\n const map = new WeakMap();\n return {\n set(schema, meta) {\n map.set(schema, meta);\n },\n get(schema) {\n return map.get(schema);\n },\n };\n})();\n//# sourceMappingURL=definition-default-registry.js.map","import { definitionDefaultRegistry } from './definition-default-registry.js';\n/**\n * Creates a schema decorator that applies a default value.\n *\n * Uses `prefault` to ensure defaults are populated during Zod parse, and\n * registers the default value in the registry so `cleanDefaultValues()` can\n * strip matching values during serialization.\n *\n * Can be used standalone with `.apply()`:\n * ```typescript\n * z.boolean().apply(withDefault(false))\n * ```\n *\n * @param defaultValue - The default value to apply\n * @returns A function that decorates a schema with the default value\n */\nexport function withDefault(defaultValue) {\n return (schema) => {\n const result = schema.prefault(defaultValue);\n definitionDefaultRegistry.set(result, { defaultValue });\n return result;\n };\n}\n/**\n * Extends the parser context with default value handling functionality.\n *\n * @returns An object containing the withDefault method\n */\nexport function extendParserContextWithDefaults() {\n return {\n withDefault: (schema, defaultValue) => withDefault(defaultValue)(schema),\n };\n}\n//# sourceMappingURL=extend-parser-context-with-defaults.js.map","import { extendParserContextWithRefs } from '#src/references/extend-parser-context-with-refs.js';\nimport { createRefContextSlotMap } from '#src/references/ref-context-slot.js';\nimport { extendParserContextWithDefaults } from './extend-parser-context-with-defaults.js';\nconst contextCache = new WeakMap();\nexport function createDefinitionSchemaParserContext(options) {\n const cached = contextCache.get(options.plugins);\n if (cached)\n return cached;\n const context = {\n ...options,\n ...extendParserContextWithRefs(options.plugins),\n ...extendParserContextWithDefaults(),\n };\n contextCache.set(options.plugins, context);\n return context;\n}\nexport function definitionSchema(creator) {\n const cache = new WeakMap();\n return (context) => {\n const cached = cache.get(context);\n if (cached)\n return cached;\n const result = creator(context);\n cache.set(context, result);\n return result;\n };\n}\n/**\n * Creates a schema that requires slots to be passed from parent schemas.\n * Used when a schema needs to reference entities from a parent context.\n *\n * @example\n * ```typescript\n * // Child schema requiring modelSlot from parent\n * export const createModelScalarFieldSchema = definitionSchemaWithSlots(\n * { modelSlot: modelEntityType },\n * (ctx, { modelSlot }) =>\n * ctx.withEnt(schema, {\n * type: modelScalarFieldEntityType,\n * parentSlot: modelSlot,\n * }),\n * );\n *\n * // Called from parent:\n * createModelScalarFieldSchema(ctx, { modelSlot: parentModelSlot })\n * ```\n */\nexport function definitionSchemaWithSlots(slotDefinition, creator) {\n const creatorWithSlots = (context, slots) => creator(context, slots);\n creatorWithSlots.slotDefinition = slotDefinition;\n return creatorWithSlots;\n}\n/**\n * Wraps a schema creator that requires slots with placeholder slots,\n * producing a simple schema creator that can be used for validation-only\n * contexts (e.g., React Hook Form).\n *\n * The placeholder slots allow the schema to parse without actual parent context,\n * which is useful when you only need schema validation without ref extraction.\n *\n * @example\n * ```typescript\n * // Schema that normally requires modelSlot from parent\n * const createModelScalarFieldSchema = definitionSchemaWithSlots(\n * { modelSlot: modelEntityType },\n * (ctx, { modelSlot }) => ctx.withEnt(schema, { parentSlot: modelSlot }),\n * );\n *\n * // For React Hook Form validation, wrap with placeholder slots\n * const fieldSchema = withPlaceholderSlots(createModelScalarFieldSchema);\n * const zodSchema = fieldSchema(ctx); // No slots needed\n * ```\n */\nexport function withPlaceholderSlots(schemaCreator) {\n return (ctx) => {\n const placeholderSlots = createRefContextSlotMap(schemaCreator.slotDefinition);\n return schemaCreator(ctx, placeholderSlots);\n };\n}\n//# sourceMappingURL=schema-creator.js.map","import { randomKey } from '@baseplate-dev/utils';\n/**\n * Definition of an entity type.\n */\nexport class DefinitionEntityType {\n prefix;\n name;\n parentType;\n /**\n * Creates a new entity type.\n *\n * @param name - The name of the entity type.\n * @param prefix - The prefix of the entity type to use in the ID, defaults to the name.\n * @param parentType - The type of the parent entity if any\n */\n constructor(name, prefix, parentType) {\n this.name = name;\n this.parentType = parentType;\n this.prefix = prefix ?? name.split('/').pop() ?? name;\n }\n /**\n * Generates a new ID for the entity type.\n *\n * @returns The new ID.\n */\n generateNewId() {\n return `${this.prefix}:${randomKey()}`;\n }\n idFromKey(key) {\n if (!key) {\n return undefined;\n }\n return `${this.prefix}:${key}`;\n }\n keyFromId(id) {\n return id.split(':')[1];\n }\n isId(id) {\n return id.startsWith(`${this.prefix}:`);\n }\n}\nexport function createEntityType(name, options) {\n const { parentType, prefix } = options ?? {};\n return new DefinitionEntityType(name, prefix, parentType);\n}\n//# sourceMappingURL=types.js.map","import { CASE_VALIDATORS } from '@baseplate-dev/utils';\nimport { z } from 'zod';\nimport { createEntityType } from '#src/references/types.js';\nimport { definitionSchema } from '#src/schema/creator/schema-creator.js';\nexport const featureEntityType = createEntityType('feature');\nexport const featureNameSchema = CASE_VALIDATORS.KEBAB_CASE;\nexport const createFeatureSchema = definitionSchema((ctx) => ctx.withEnt(z.object({\n id: z.string(),\n name: z\n .string()\n .min(1)\n .refine((name) => name\n .split('/')\n .every((part) => featureNameSchema.safeParse(part).success), {\n message: 'Feature name must be lowercase and contain only letters, numbers, and dashes',\n }),\n parentRef: ctx\n .withRef({\n type: featureEntityType,\n onDelete: 'DELETE_PARENT',\n })\n .optional(),\n}), { type: featureEntityType, sortByName: true }));\nexport const createFeaturesSchema = definitionSchema((ctx) => z.array(createFeatureSchema(ctx)).default([]));\n//# sourceMappingURL=feature.js.map","import { featureEntityType, featureNameSchema } from '#src/schema/index.js';\nfunction getRootFeatures(projectDefinition) {\n return projectDefinition.features.filter((f) => !f.parentRef);\n}\nfunction getFeatureById(projectDefinition, featureId) {\n return projectDefinition.features.find((f) => f.id === featureId);\n}\nfunction getFeatureByIdOrThrow(projectDefinition, featureId) {\n const feature = getFeatureById(projectDefinition, featureId);\n if (!feature) {\n throw new Error(`Could not find feature with ID ${featureId}`);\n }\n return feature;\n}\nfunction getFeatureChildren(projectDefinition, featureId) {\n return projectDefinition.features.filter((f) => f.parentRef === featureId);\n}\nfunction getFeatureName(featureConfig) {\n return featureConfig.name.split('/').pop() ?? '';\n}\nfunction getFeatureNameById(projectDefinition, featureId) {\n const feature = getFeatureByIdOrThrow(projectDefinition, featureId);\n return getFeatureName(feature);\n}\nfunction getFeaturePathByIdOrThrow(projectDefinition, featureId) {\n const feature = getFeatureByIdOrThrow(projectDefinition, featureId);\n return feature.name;\n}\nfunction validateFeatureName(name) {\n const nameParts = name.split('/');\n return nameParts.every((part) => featureNameSchema.safeParse(part).success);\n}\nfunction ensureFeatureByNameRecursively(projectDefinition, nameOrId) {\n if (featureEntityType.isId(nameOrId)) {\n return nameOrId;\n }\n const nameParts = nameOrId.split('/');\n let lastName = '';\n let parentRef = undefined;\n for (const part of nameParts) {\n const feature = projectDefinition.features.find((f) => f.name === part && f.parentRef === parentRef);\n const name = [lastName, part].filter(Boolean).join('/');\n if (feature) {\n parentRef = feature.id;\n }\n else {\n const newFeature = {\n id: featureEntityType.generateNewId(),\n name,\n parentRef,\n };\n projectDefinition.features.push(newFeature);\n parentRef = newFeature.id;\n }\n lastName = name;\n }\n if (!parentRef) {\n throw new Error('Failed to create feature');\n }\n return parentRef;\n}\nfunction createPartialFeatures(nameOrPath) {\n if (!nameOrPath)\n return [];\n const parts = nameOrPath.split('/');\n return parts.map((_, i) => {\n const name = parts.slice(0, i + 1).join('/');\n const parentRef = i > 0 ? parts.slice(0, i).join('/') : undefined;\n return { name, parentRef };\n });\n}\nfunction getFeatureByName(projectDefinition, name) {\n return projectDefinition.features.find((f) => f.name === name);\n}\nfunction getFeatureIdByNameOrThrow(projectDefinition, name) {\n const feature = getFeatureByName(projectDefinition, name);\n if (!feature) {\n throw new Error(`Could not find feature with name ${name}`);\n }\n return feature.id;\n}\nfunction getFeatureIdByNameOrDefault(projectDefinition, name) {\n return getFeatureByName(projectDefinition, name)?.id ?? name;\n}\nfunction resolveFeatureName(projectDefinition, featureRef) {\n if (!featureRef)\n return '';\n if (featureEntityType.isId(featureRef)) {\n return getFeaturePathByIdOrThrow(projectDefinition, featureRef);\n }\n return featureRef;\n}\nexport const FeatureUtils = {\n getRootFeatures,\n getFeatureById,\n getFeatureByIdOrThrow,\n getFeatureChildren,\n getFeatureName,\n getFeatureNameById,\n getFeaturePathByIdOrThrow,\n validateFeatureName,\n ensureFeatureByNameRecursively,\n createPartialFeatures,\n getFeatureByName,\n getFeatureIdByNameOrThrow,\n getFeatureIdByNameOrDefault,\n resolveFeatureName,\n};\n//# sourceMappingURL=feature-utils.js.map","import { PASCAL_CASE_REGEX } from '@baseplate-dev/utils';\nfunction byId(projectDefinition, id) {\n return projectDefinition.models.find((m) => m.id === id);\n}\nfunction byIdOrThrow(projectDefinition, id) {\n const model = byId(projectDefinition, id);\n if (!model) {\n throw new Error(`Could not find model with ID ${id}`);\n }\n return model;\n}\nfunction byName(projectDefinition, name) {\n return projectDefinition.models.find((m) => m.name === name);\n}\nfunction byNameOrThrow(projectDefinition, name) {\n const model = byName(projectDefinition, name);\n if (!model) {\n throw new Error(`Could not find model with name ${name}`);\n }\n return model;\n}\nfunction getScalarFieldById(model, id) {\n const field = model.model.fields.find((f) => f.id === id);\n if (!field) {\n throw new Error(`Could not find field with ID ${id}`);\n }\n return field;\n}\nfunction getRelationsToModel(projectDefinition, modelId) {\n return projectDefinition.models.flatMap((m) => m.model.relations\n .filter((r) => r.modelRef === modelId)\n .map((r) => ({ model: m, relation: r })));\n}\nfunction getModelsForFeature(projectDefinition, featureId) {\n return projectDefinition.models.filter((m) => m.featureRef === featureId);\n}\nfunction getModelIdFields(model) {\n return model.model.primaryKeyFieldRefs;\n}\nfunction hasService(model) {\n return (model.service.create.enabled ||\n model.service.update.enabled ||\n model.service.delete.enabled ||\n model.service.transformers.length > 0);\n}\nfunction validateModelName(name) {\n return PASCAL_CASE_REGEX.test(name);\n}\n/**\n * Returns the ID of a model by name, or the name if no model is found.\n * @param projectDefinition - The project definition.\n * @param name - The name of the model.\n * @returns The ID of the model, or the name if no model is found.\n */\nfunction getModelIdByNameOrDefault(projectDefinition, name) {\n return projectDefinition.models.find((m) => m.name === name)?.id ?? name;\n}\nfunction getPrimaryKeyFields(model) {\n const primaryKeyFields = model.model.primaryKeyFieldRefs;\n return primaryKeyFields.map((id) => getScalarFieldById(model, id));\n}\nexport const ModelUtils = {\n byId,\n byIdOrThrow,\n byName,\n byNameOrThrow,\n getScalarFieldById,\n getRelationsToModel,\n getModelsForFeature,\n getModelIdFields,\n hasService,\n validateModelName,\n getModelIdByNameOrDefault,\n getPrimaryKeyFields,\n};\n//# sourceMappingURL=model-utils.js.map"],"names":["z"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,gBAAgB;AACpB,IAAI,UAAU;AACd,IAAI,iBAAiB;AACrB,IAAI,yBAAyB;AAC7B,IAAI,mBAAmB;AACvB;;;;"}
|
|
@@ -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
|