@baseplate-dev/plugin-auth 1.0.2 → 1.0.4
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/dist/auth/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.js +8 -5
- package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +28 -0
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.js +43 -0
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.js.map +1 -0
- package/dist/auth/core/generators/auth-apollo/index.d.ts +2 -0
- package/dist/auth/core/generators/auth-apollo/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-apollo/index.js +2 -0
- package/dist/auth/core/generators/auth-apollo/index.js.map +1 -0
- package/dist/auth/core/generators/auth-apollo/templates/session-error-link.d.ts +2 -0
- package/dist/auth/core/generators/auth-apollo/templates/session-error-link.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-apollo/templates/session-error-link.js +15 -0
- package/dist/auth/core/generators/auth-apollo/templates/session-error-link.js.map +1 -0
- package/dist/auth/core/generators/auth-apollo/templates/session-error-link.ts +16 -0
- package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +73 -0
- package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.js +40 -0
- package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts +120 -0
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/index.js +11 -0
- package/dist/auth/core/generators/auth-email-password/generated/index.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-paths.d.ts +14 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-paths.js +26 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts +58 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js +54 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +25 -0
- package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.js +32 -0
- package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts +97 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js +56 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/index.d.ts +4 -0
- package/dist/auth/core/generators/auth-email-password/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/index.js +3 -0
- package/dist/auth/core/generators/auth-email-password/index.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +2 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +3 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +3 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts +2 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +33 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +45 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +21 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +74 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -0
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +122 -0
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +62 -0
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js +38 -0
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts +120 -0
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/index.js +11 -0
- package/dist/auth/core/generators/auth-hooks/generated/index.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts +16 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js +26 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts +47 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js +49 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +16 -0
- package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.js +27 -0
- package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts +116 -0
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js +70 -0
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/index.d.ts +2 -0
- package/dist/auth/core/generators/auth-hooks/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/index.js +2 -0
- package/dist/auth/core/generators/auth-hooks/index.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts +18 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.gql +10 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +22 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +40 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts +2 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +27 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +29 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +8 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +12 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +16 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts +7 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +15 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +16 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/auth-module.generator.d.ts +45 -32
- package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/auth-module.generator.js +61 -0
- package/dist/auth/core/generators/auth-module/auth-module.generator.js.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/index.d.ts +173 -0
- package/dist/auth/core/generators/auth-module/generated/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/index.js +11 -0
- package/dist/auth/core/generators/auth-module/generated/index.js.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/template-paths.d.ts +19 -0
- package/dist/auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/generated/template-paths.js +10 -7
- package/dist/auth/core/generators/auth-module/generated/template-paths.js.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts +80 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js +77 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/ts-import-providers.d.ts +22 -0
- package/dist/auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/generated/ts-import-providers.js +31 -0
- package/dist/auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/generated/typed-templates.d.ts +47 -7
- package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/generated/typed-templates.js +40 -3
- package/dist/auth/core/generators/auth-module/generated/typed-templates.js.map +1 -0
- package/dist/auth/core/generators/auth-module/index.d.ts +4 -0
- package/dist/auth/core/generators/auth-module/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/index.js +3 -0
- package/dist/auth/core/generators/auth-module/index.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts +16 -0
- package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.js +17 -0
- package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts +2 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js +17 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.ts +23 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts +2 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +18 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +23 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts +2 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +19 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +24 -0
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts +43 -0
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js +180 -0
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/templates/module/services/user-session.service.ts +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts +38 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.js +71 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.js.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts +11 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.js +38 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +1 -0
- package/dist/auth/{generators/fastify → core/generators}/auth-module/templates/module/utils/session-cookie.ts +2 -2
- package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts +10 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js +35 -0
- package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-components/auth0-components.generator.d.ts → auth/core/generators/auth-routes/auth-routes.generator.d.ts} +50 -20
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.js +38 -0
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/index.d.ts +498 -0
- package/dist/{auth0/generators/react/auth0-callback → auth/core/generators/auth-routes}/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/index.js +9 -0
- package/dist/auth/core/generators/auth-routes/generated/index.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/template-paths.d.ts +15 -0
- package/dist/auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/template-paths.js +25 -0
- package/dist/auth/core/generators/auth-routes/generated/template-paths.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts +177 -0
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.js +55 -0
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts +642 -0
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.js +57 -0
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/index.d.ts +2 -0
- package/dist/auth/core/generators/auth-routes/index.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/index.js +2 -0
- package/dist/auth/core/generators/auth-routes/index.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +2 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.js +85 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +161 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/queries.gql +15 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +2 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.js +77 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +148 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts +2 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.js +10 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.js.map +1 -0
- package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.tsx +17 -0
- package/dist/auth/core/generators/index.d.ts +8 -0
- package/dist/auth/core/generators/index.d.ts.map +1 -0
- package/dist/auth/core/generators/index.js +8 -0
- package/dist/auth/core/generators/index.js.map +1 -0
- package/dist/auth/core/generators/react-auth/index.d.ts +2 -0
- package/dist/auth/core/generators/react-auth/index.d.ts.map +1 -0
- package/dist/auth/core/generators/react-auth/index.js +2 -0
- package/dist/auth/core/generators/react-auth/index.js.map +1 -0
- package/dist/auth/core/generators/react-auth/react-auth.generator.d.ts +9 -0
- package/dist/auth/core/generators/react-auth/react-auth.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/react-auth/react-auth.generator.js +31 -0
- package/dist/auth/core/generators/react-auth/react-auth.generator.js.map +1 -0
- package/dist/auth/core/generators/react-session/generated/index.d.ts +67 -0
- package/dist/auth/core/generators/react-session/generated/index.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/generated/index.js +11 -0
- package/dist/auth/core/generators/react-session/generated/index.js.map +1 -0
- package/dist/auth/core/generators/react-session/generated/template-paths.d.ts +16 -0
- package/dist/auth/core/generators/react-session/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/generated/template-paths.js +26 -0
- package/dist/auth/core/generators/react-session/generated/template-paths.js.map +1 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts +27 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.js +48 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.js.map +1 -0
- package/dist/auth/core/generators/react-session/generated/ts-import-providers.d.ts +64 -0
- package/dist/auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/generated/ts-import-providers.js +42 -0
- package/dist/auth/core/generators/react-session/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts +32 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.js +76 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.js.map +1 -0
- package/dist/auth/core/generators/react-session/index.d.ts +4 -0
- package/dist/auth/core/generators/react-session/index.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/index.js +3 -0
- package/dist/auth/core/generators/react-session/index.js.map +1 -0
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts +49 -0
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/react-session.generator.js +39 -0
- package/dist/auth/core/generators/react-session/react-session.generator.js.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts +7 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.gql +6 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js +25 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.tsx +29 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts +7 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js +18 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +47 -0
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts +12 -0
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js +15 -0
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.ts +33 -0
- package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +79 -0
- package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.js +133 -0
- package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -0
- package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.ts +153 -0
- package/dist/auth/core/index.d.ts +2 -0
- package/dist/auth/core/index.d.ts.map +1 -0
- package/dist/auth/core/index.js +2 -0
- package/dist/auth/core/index.js.map +1 -0
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +29 -24
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/models.d.ts.map +1 -1
- package/dist/auth/core/schema/models.js +15 -10
- package/dist/auth/core/schema/models.js.map +1 -1
- package/dist/auth/core/schema/plugin-definition.js +1 -1
- package/dist/auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth0/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth0/core/components/auth-definition-editor.js +7 -4
- package/dist/auth0/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth0/core/node.d.ts.map +1 -1
- package/dist/auth0/core/node.js +19 -46
- package/dist/auth0/core/node.js.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.js +1 -1
- package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +0 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +2 -4
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +5 -5
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js +5 -5
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +4 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +8 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +5 -5
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +6 -6
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/{useCurrentUser.ts → use-current-user.ts} +4 -3
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/{useRequiredUserId.ts → use-required-user-id.ts} +1 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/{useSession.ts → use-session.ts} +2 -2
- package/dist/auth0/generators/react/{auth0-callback/auth0-callback.generator.d.ts → auth0-pages/auth0-pages.generator.d.ts} +18 -27
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js +26 -0
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +280 -0
- package/dist/auth0/generators/react/{auth0-components → auth0-pages}/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.js +9 -0
- package/dist/auth0/generators/react/auth0-pages/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts +12 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js +20 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/{auth0-components → auth0-pages}/generated/template-renderers.d.ts +16 -16
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js +37 -0
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +265 -0
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/{auth0-components → auth0-pages}/generated/typed-templates.js +6 -5
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-pages/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/index.js +2 -0
- package/dist/auth0/generators/react/auth0-pages/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-pages/templates/routes/login.tsx +31 -0
- package/dist/auth0/generators/react/index.d.ts +1 -2
- package/dist/auth0/generators/react/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/index.js +1 -2
- package/dist/auth0/generators/react/index.js.map +1 -1
- package/dist/auth0/generators/react/{auth0-components → react-auth0}/generated/index.d.ts +31 -30
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/generated/index.js +9 -0
- package/dist/auth0/generators/react/react-auth0/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts +12 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js +22 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/{auth0-callback → react-auth0}/generated/template-renderers.d.ts +15 -27
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js +39 -0
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js.map +1 -0
- package/dist/auth0/generators/react/{auth0-components → react-auth0}/generated/typed-templates.d.ts +14 -9
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js +17 -0
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +159 -3
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js +56 -13
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +1 -1
- package/dist/auth0/generators/react/react-auth0/templates/src/app/auth-loaded-gate.tsx +78 -0
- package/dist/common/compiler/generator-creators.d.ts +18 -0
- package/dist/common/compiler/generator-creators.d.ts.map +1 -0
- package/dist/common/compiler/generator-creators.js +34 -0
- package/dist/common/compiler/generator-creators.js.map +1 -0
- package/dist/common/compiler/index.d.ts +2 -0
- package/dist/common/compiler/index.d.ts.map +1 -0
- package/dist/common/compiler/index.js +2 -0
- package/dist/common/compiler/index.js.map +1 -0
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +3 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/roles/components/index.d.ts +2 -0
- package/dist/common/roles/components/index.d.ts.map +1 -0
- package/dist/common/roles/components/index.js +2 -0
- package/dist/common/roles/components/index.js.map +1 -0
- package/dist/{auth0/core/components → common/roles/components/role-editor-form}/role-dialog.d.ts +1 -1
- package/dist/common/roles/components/role-editor-form/role-dialog.d.ts.map +1 -0
- package/dist/{auth0/core/components → common/roles/components/role-editor-form}/role-dialog.js +1 -1
- package/dist/common/roles/components/role-editor-form/role-dialog.js.map +1 -0
- package/dist/common/roles/components/role-editor-form/role-editor-form.d.ts +10 -0
- package/dist/common/roles/components/role-editor-form/role-editor-form.d.ts.map +1 -0
- package/dist/{auth0/core/components → common/roles/components/role-editor-form}/role-editor-form.js +5 -8
- package/dist/common/roles/components/role-editor-form/role-editor-form.js.map +1 -0
- package/dist/common/roles/constants.d.ts.map +1 -0
- package/dist/common/roles/constants.js.map +1 -0
- package/dist/common/roles/index.d.ts +4 -0
- package/dist/common/roles/index.d.ts.map +1 -0
- package/dist/common/roles/index.js +4 -0
- package/dist/common/roles/index.js.map +1 -0
- package/dist/common/roles/schema.d.ts.map +1 -0
- package/dist/common/roles/schema.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/placeholder-auth/core/common.d.ts +8 -0
- package/dist/placeholder-auth/core/common.d.ts.map +1 -0
- package/dist/placeholder-auth/core/common.js +26 -0
- package/dist/placeholder-auth/core/common.js.map +1 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts +5 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +58 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -0
- package/dist/placeholder-auth/core/generators/index.d.ts +4 -0
- package/dist/placeholder-auth/core/generators/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/index.js +4 -0
- package/dist/placeholder-auth/core/generators/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +51 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.js +11 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +16 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +28 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +24 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +46 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +16 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +27 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +24 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +68 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.d.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +39 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js +38 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts +14 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.gql +10 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +23 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +35 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.d.ts +5 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.js +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.ts +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts +9 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.js +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.ts +13 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts +5 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js +13 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +14 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts +45 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.js +27 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +75 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.js +11 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.d.ts +12 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.js +24 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +39 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.js +41 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.js.map +1 -0
- package/dist/{auth/generators/fastify/auth-module → placeholder-auth/core/generators/placeholder-auth-module}/generated/ts-import-providers.d.ts +2 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/{auth/generators/fastify/auth-module → placeholder-auth/core/generators/placeholder-auth-module}/generated/ts-import-providers.js +5 -5
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +26 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js +20 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts +23 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js +29 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.ts +41 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.d.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts +9 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.js +31 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.js.map +1 -0
- package/dist/placeholder-auth/core/index.d.ts +2 -0
- package/dist/placeholder-auth/core/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/index.js +2 -0
- package/dist/placeholder-auth/core/index.js.map +1 -0
- package/dist/placeholder-auth/core/node.d.ts +5 -0
- package/dist/placeholder-auth/core/node.d.ts.map +1 -0
- package/dist/placeholder-auth/core/node.js +46 -0
- package/dist/placeholder-auth/core/node.js.map +1 -0
- package/dist/placeholder-auth/core/schema/models.d.ts +6 -0
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -0
- package/dist/placeholder-auth/core/schema/models.js +35 -0
- package/dist/placeholder-auth/core/schema/models.js.map +1 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +82 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.js +17 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -0
- package/dist/placeholder-auth/core/web.d.ts +6 -0
- package/dist/placeholder-auth/core/web.d.ts.map +1 -0
- package/dist/placeholder-auth/core/web.js +14 -0
- package/dist/placeholder-auth/core/web.js.map +1 -0
- package/dist/placeholder-auth/index.d.ts +2 -0
- package/dist/placeholder-auth/index.d.ts.map +1 -0
- package/dist/placeholder-auth/index.js +2 -0
- package/dist/placeholder-auth/index.js.map +1 -0
- package/dist/placeholder-auth/metadata.json +9 -0
- package/dist/placeholder-auth/static/icon.svg +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-BYomLcgs.js → __federation_expose_auth0CoreCommon-DcWFsNod.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-BYomLcgs.js.map → __federation_expose_auth0CoreCommon-DcWFsNod.js.map} +1 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BrPTg7eC.js +201 -0
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BrPTg7eC.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreCommon-CvirZ1-l.js → __federation_expose_authCoreCommon-20XIFvpM.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-CvirZ1-l.js.map → __federation_expose_authCoreCommon-20XIFvpM.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-BXQrtVzN.js → __federation_expose_authCoreWeb-BB5P8uYV.js} +49 -93
- package/dist/web/assets/__federation_expose_authCoreWeb-BB5P8uYV.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js +39 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js +197 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-5oUmvVro.js → __federation_fn_import-CpGU4emr.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-5oUmvVro.js.map → __federation_fn_import-CpGU4emr.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-DURp5OH4.js → web-33D53Q49.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-DURp5OH4.js.map → web-33D53Q49.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-SOC0hDo0.js → project-builder-lib-B8gI4CR0.js} +54 -79
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B8gI4CR0.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-BIPS02bW.js → ui-components-ClpdcB7_.js} +2970 -16
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ClpdcB7_.js.map +1 -0
- package/dist/web/assets/{index-BAu6L5Vh.js → index-47TZ-Oc4.js} +2 -2
- package/dist/web/assets/{index-BAu6L5Vh.js.map → index-47TZ-Oc4.js.map} +1 -1
- package/dist/web/assets/{index.esm-C_MMkPsN.js → index.esm-Erws1yaL.js} +90 -47
- package/dist/web/assets/index.esm-Erws1yaL.js.map +1 -0
- package/dist/web/assets/{model-merger-qTOhcMVY.js → model-merger-BteeU9dp.js} +72 -14
- package/dist/web/assets/model-merger-BteeU9dp.js.map +1 -0
- package/dist/web/assets/{plugin-definition-7hIqggth.js → plugin-definition-BOUJurAr.js} +3 -3
- package/dist/web/assets/plugin-definition-BOUJurAr.js.map +1 -0
- package/dist/web/assets/plugin-definition-BeI52Xpr.js +24 -0
- package/dist/web/assets/plugin-definition-BeI52Xpr.js.map +1 -0
- package/dist/web/assets/{plugin-definition-BHJF50Kq.js → plugin-definition-CnMRuS0h.js} +3 -3
- package/dist/web/assets/plugin-definition-CnMRuS0h.js.map +1 -0
- package/dist/web/assets/{react-8Ha9uuy8.js → react-CIaEd3xM.js} +2 -2
- package/dist/web/assets/{react-8Ha9uuy8.js.map → react-CIaEd3xM.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +14 -8
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/role-editor-form-Bk9sOqqk.js +319 -0
- package/dist/web/assets/role-editor-form-Bk9sOqqk.js.map +1 -0
- package/dist/web/assets/{style-BdgwWjAf.css → style-ZUYizAnf.css} +9 -11
- package/dist/web/assets/styles-mSx3A02F.js +201 -0
- package/dist/web/assets/styles-mSx3A02F.js.map +1 -0
- package/dist/web/index.html +1 -1
- package/manifest.json +1 -1
- package/package.json +12 -11
- package/dist/auth/core/components/role-editor-form.d.ts +0 -10
- package/dist/auth/core/components/role-editor-form.d.ts.map +0 -1
- package/dist/auth/core/components/role-editor-form.js +0 -27
- package/dist/auth/core/components/role-editor-form.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js +0 -74
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts +0 -88
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/index.js +0 -9
- package/dist/auth/generators/fastify/auth-module/generated/index.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts +0 -16
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/index.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/index.js.map +0 -1
- package/dist/auth/generators/fastify/index.d.ts +0 -2
- package/dist/auth/generators/fastify/index.d.ts.map +0 -1
- package/dist/auth/generators/fastify/index.js +0 -2
- package/dist/auth/generators/fastify/index.js.map +0 -1
- package/dist/auth/generators/index.d.ts +0 -2
- package/dist/auth/generators/index.d.ts.map +0 -1
- package/dist/auth/generators/index.js +0 -2
- package/dist/auth/generators/index.js.map +0 -1
- package/dist/auth0/core/components/role-dialog.d.ts.map +0 -1
- package/dist/auth0/core/components/role-dialog.js.map +0 -1
- package/dist/auth0/core/components/role-editor-form.d.ts +0 -10
- package/dist/auth0/core/components/role-editor-form.d.ts.map +0 -1
- package/dist/auth0/core/components/role-editor-form.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js +0 -48
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts +0 -440
- package/dist/auth0/generators/react/auth0-callback/generated/index.js +0 -9
- package/dist/auth0/generators/react/auth0-callback/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts +0 -13
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js +0 -23
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.js +0 -54
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts +0 -280
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js +0 -30
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-callback/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/index.js +0 -2
- package/dist/auth0/generators/react/auth0-callback/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/templates/routes/auth0-callback.tsx +0 -63
- package/dist/auth0/generators/react/auth0-callback/templates/routes/signup.tsx +0 -48
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js +0 -40
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/index.js +0 -11
- package/dist/auth0/generators/react/auth0-components/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts +0 -12
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js +0 -22
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.js +0 -39
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts +0 -10
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js +0 -25
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-components/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/index.js +0 -2
- package/dist/auth0/generators/react/auth0-components/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/templates/src/components/require-auth/require-auth.tsx +0 -22
- package/dist/roles/constants.d.ts.map +0 -1
- package/dist/roles/constants.js.map +0 -1
- package/dist/roles/index.d.ts +0 -3
- package/dist/roles/index.d.ts.map +0 -1
- package/dist/roles/index.js +0 -3
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/schema.d.ts.map +0 -1
- package/dist/roles/schema.js.map +0 -1
- package/dist/utils/cn.d.ts +0 -2
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -2
- package/dist/utils/cn.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-T5lCcgD1.js +0 -387
- package/dist/web/assets/__federation_expose_auth0CoreWeb-T5lCcgD1.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-BXQrtVzN.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-SOC0hDo0.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BIPS02bW.js.map +0 -1
- package/dist/web/assets/index.esm-C_MMkPsN.js.map +0 -1
- package/dist/web/assets/model-merger-qTOhcMVY.js.map +0 -1
- package/dist/web/assets/plugin-definition-7hIqggth.js.map +0 -1
- package/dist/web/assets/plugin-definition-BHJF50Kq.js.map +0 -1
- package/dist/web/assets/schema-BdX0t_km.js +0 -72
- package/dist/web/assets/schema-BdX0t_km.js.map +0 -1
- package/dist/web/assets/styles-3Wg6h_d_.js +0 -8
- package/dist/web/assets/styles-3Wg6h_d_.js.map +0 -1
- /package/dist/auth/{generators/fastify → core/generators}/auth-module/templates/module/constants/user-session.constants.ts +0 -0
- /package/dist/auth/{generators/fastify → core/generators}/auth-module/templates/module/utils/cookie-signer.ts +0 -0
- /package/dist/auth/{generators/fastify → core/generators}/auth-module/templates/module/utils/verify-request-origin.ts +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/{useCurrentUser.gql → use-current-user.gql} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/{useLogOut.ts → use-log-out.ts} +0 -0
- /package/dist/{roles → common/roles}/constants.d.ts +0 -0
- /package/dist/{roles → common/roles}/constants.js +0 -0
- /package/dist/{roles → common/roles}/schema.d.ts +0 -0
- /package/dist/{roles → common/roles}/schema.js +0 -0
- /package/dist/{auth/generators/fastify/auth-module → placeholder-auth/core/generators/placeholder-auth-module}/index.d.ts +0 -0
- /package/dist/{auth/generators/fastify/auth-module → placeholder-auth/core/generators/placeholder-auth-module}/index.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-CpGU4emr.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './index.esm-Erws1yaL.js';
|
|
3
|
+
import { u as useLens } from './styles-mSx3A02F.js';
|
|
4
|
+
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-Bk9sOqqk.js';
|
|
5
|
+
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-BOUJurAr.js';
|
|
6
6
|
|
|
7
7
|
function createAuthModels({
|
|
8
8
|
authFeatureRef,
|
|
@@ -20,14 +20,18 @@ function createAuthModels({
|
|
|
20
20
|
options: { genUuid: true }
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: "
|
|
23
|
+
name: "name",
|
|
24
24
|
type: "string",
|
|
25
25
|
isOptional: true
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
name: "
|
|
29
|
-
type: "string"
|
|
30
|
-
|
|
28
|
+
name: "email",
|
|
29
|
+
type: "string"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "emailVerified",
|
|
33
|
+
type: "boolean",
|
|
34
|
+
options: { default: "false" }
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
37
|
name: "updatedAt",
|
|
@@ -69,7 +73,7 @@ function createAuthModels({
|
|
|
69
73
|
type: "uuid"
|
|
70
74
|
},
|
|
71
75
|
{
|
|
72
|
-
name: "
|
|
76
|
+
name: "accountId",
|
|
73
77
|
type: "string"
|
|
74
78
|
},
|
|
75
79
|
{
|
|
@@ -77,8 +81,9 @@ function createAuthModels({
|
|
|
77
81
|
type: "string"
|
|
78
82
|
},
|
|
79
83
|
{
|
|
80
|
-
name: "
|
|
81
|
-
type: "string"
|
|
84
|
+
name: "password",
|
|
85
|
+
type: "string",
|
|
86
|
+
isOptional: true
|
|
82
87
|
},
|
|
83
88
|
{
|
|
84
89
|
name: "createdAt",
|
|
@@ -94,7 +99,7 @@ function createAuthModels({
|
|
|
94
99
|
primaryKeyFieldRefs: ["id"],
|
|
95
100
|
uniqueConstraints: [
|
|
96
101
|
{
|
|
97
|
-
fields: [{ fieldRef: "
|
|
102
|
+
fields: [{ fieldRef: "accountId" }, { fieldRef: "providerId" }]
|
|
98
103
|
}
|
|
99
104
|
],
|
|
100
105
|
relations: [
|
|
@@ -156,14 +161,14 @@ function createAuthModels({
|
|
|
156
161
|
type: "uuid",
|
|
157
162
|
options: { genUuid: true }
|
|
158
163
|
},
|
|
159
|
-
{
|
|
160
|
-
name: "token",
|
|
161
|
-
type: "string"
|
|
162
|
-
},
|
|
163
164
|
{
|
|
164
165
|
name: "userId",
|
|
165
166
|
type: "uuid"
|
|
166
167
|
},
|
|
168
|
+
{
|
|
169
|
+
name: "token",
|
|
170
|
+
type: "string"
|
|
171
|
+
},
|
|
167
172
|
{
|
|
168
173
|
name: "expiresAt",
|
|
169
174
|
type: "dateTime"
|
|
@@ -205,72 +210,11 @@ function createAuthModels({
|
|
|
205
210
|
};
|
|
206
211
|
}
|
|
207
212
|
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
const {authRoleEntityType} = await importShared('@baseplate-dev/project-builder-lib');
|
|
211
|
-
|
|
212
|
-
const {Button,InputFieldController} = await importShared('@baseplate-dev/ui-components');
|
|
213
|
-
function isFixedRole(name) {
|
|
214
|
-
return AUTH_DEFAULT_ROLES.some((role) => role.name === name);
|
|
215
|
-
}
|
|
216
|
-
function RoleEditorForm({ className, control }) {
|
|
217
|
-
const { fields, append, remove } = useFieldArray({
|
|
218
|
-
control,
|
|
219
|
-
name: "roles"
|
|
220
|
-
});
|
|
221
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("space-y-4", className), children: [
|
|
222
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Roles" }),
|
|
223
|
-
fields.map((field, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("space-y-4"), children: [
|
|
224
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
225
|
-
InputFieldController,
|
|
226
|
-
{
|
|
227
|
-
label: "Name",
|
|
228
|
-
disabled: isFixedRole(field.name),
|
|
229
|
-
control,
|
|
230
|
-
name: `roles.${idx}.name`
|
|
231
|
-
}
|
|
232
|
-
),
|
|
233
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
234
|
-
InputFieldController,
|
|
235
|
-
{
|
|
236
|
-
label: "Comment",
|
|
237
|
-
control,
|
|
238
|
-
name: `roles.${idx}.comment`
|
|
239
|
-
}
|
|
240
|
-
),
|
|
241
|
-
!isFixedRole(field.name) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
242
|
-
Button,
|
|
243
|
-
{
|
|
244
|
-
color: "light",
|
|
245
|
-
onClick: () => {
|
|
246
|
-
remove(idx);
|
|
247
|
-
},
|
|
248
|
-
children: "Remove"
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] }, field.id)),
|
|
252
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
253
|
-
Button,
|
|
254
|
-
{
|
|
255
|
-
onClick: () => {
|
|
256
|
-
append({
|
|
257
|
-
id: authRoleEntityType.generateNewId(),
|
|
258
|
-
name: "",
|
|
259
|
-
comment: "",
|
|
260
|
-
builtIn: false
|
|
261
|
-
});
|
|
262
|
-
},
|
|
263
|
-
children: "Add Role"
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
] });
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const {createAndApplyModelMergerResults,createModelMergerResults,FeatureUtils,ModelUtils,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
213
|
+
const {createAndApplyModelMergerResults,createModelMergerResults,doesModelMergerResultsHaveChanges,FeatureUtils,ModelUtils,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
270
214
|
|
|
271
215
|
const {FeatureComboboxFieldController,ModelComboboxFieldController,ModelMergerResultAlert,useBlockUnsavedChangesNavigate,useDefinitionSchema,useProjectDefinition,useResettableForm} = await importShared('@baseplate-dev/project-builder-lib/web');
|
|
272
216
|
|
|
273
|
-
const {
|
|
217
|
+
const {FormActionBar,SectionList,SectionListSection,SectionListSectionContent,SectionListSectionDescription,SectionListSectionHeader,SectionListSectionTitle} = await importShared('@baseplate-dev/ui-components');
|
|
274
218
|
const {useMemo} = await importShared('react');
|
|
275
219
|
function AuthDefinitionEditor({
|
|
276
220
|
definition: pluginMetadata,
|
|
@@ -353,21 +297,27 @@ function AuthDefinitionEditor({
|
|
|
353
297
|
)
|
|
354
298
|
);
|
|
355
299
|
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
300
|
+
const lens = useLens({ control });
|
|
356
301
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
357
302
|
"form",
|
|
358
303
|
{
|
|
359
304
|
onSubmit,
|
|
360
|
-
className: "auth:
|
|
305
|
+
className: "auth:mb-[--action-bar-height] auth:max-w-6xl",
|
|
361
306
|
children: [
|
|
362
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
363
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
364
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
365
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
366
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:pb-16", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionList, { children: [
|
|
308
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
310
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Local Authentication Configuration" }),
|
|
311
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "Configure your local authentication settings, user models, and role definitions." })
|
|
367
312
|
] }),
|
|
368
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
369
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
370
|
-
|
|
313
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionContent, { className: "auth:space-y-6", children: [
|
|
314
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
315
|
+
ModelMergerResultAlert,
|
|
316
|
+
{
|
|
317
|
+
pendingModelChanges
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2", children: [
|
|
371
321
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
372
322
|
ModelComboboxFieldController,
|
|
373
323
|
{
|
|
@@ -421,9 +371,15 @@ function AuthDefinitionEditor({
|
|
|
421
371
|
) })
|
|
422
372
|
] })
|
|
423
373
|
] }),
|
|
424
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(RoleEditorForm, {
|
|
425
|
-
] }),
|
|
426
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RoleEditorForm, { lens: lens.focus("roles") })
|
|
375
|
+
] }) }),
|
|
376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
377
|
+
FormActionBar,
|
|
378
|
+
{
|
|
379
|
+
form,
|
|
380
|
+
allowSaveWithoutDirty: !pluginMetadata || doesModelMergerResultsHaveChanges(pendingModelChanges)
|
|
381
|
+
}
|
|
382
|
+
)
|
|
427
383
|
]
|
|
428
384
|
}
|
|
429
385
|
);
|
|
@@ -442,4 +398,4 @@ const web = createPlatformPluginExport({
|
|
|
442
398
|
});
|
|
443
399
|
|
|
444
400
|
export { web as default };
|
|
445
|
-
//# sourceMappingURL=__federation_expose_authCoreWeb-
|
|
401
|
+
//# sourceMappingURL=__federation_expose_authCoreWeb-BB5P8uYV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_authCoreWeb-BB5P8uYV.js","sources":["../../../src/auth/core/schema/models.ts","../../../src/auth/core/components/auth-definition-editor.tsx","../../../src/auth/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthPluginDefinition } from './plugin-definition.js';\n\nexport function createAuthModels({\n authFeatureRef,\n modelRefs,\n}: Pick<AuthPluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n userAccount: ModelMergerModelInput;\n userRole: ModelMergerModelInput;\n userSession: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'name',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'email',\n type: 'string',\n },\n {\n name: 'emailVerified',\n type: 'boolean',\n options: { default: 'false' },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'email' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: ['id', 'email'],\n },\n },\n },\n userAccount: {\n name: modelRefs.userAccount,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'accountId',\n type: 'string',\n },\n {\n name: 'providerId',\n type: 'string',\n },\n {\n name: 'password',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'accountId' }, { fieldRef: 'providerId' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: modelRefs.user,\n foreignRelationName: 'authProviders',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n userRole: {\n name: modelRefs.userRole,\n featureRef: authFeatureRef,\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: modelRefs.user,\n foreignRelationName: 'roles',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n userSession: {\n name: modelRefs.userSession,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'token',\n type: 'string',\n },\n {\n name: 'expiresAt',\n type: 'dateTime',\n },\n {\n name: 'renewedAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'token' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: modelRefs.user,\n foreignRelationName: 'sessions',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { createDefaultAuthRoles } from '#src/common/roles/index.js';\n\nimport type { AuthPluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createAuthModels } from '../schema/models.js';\nimport { createAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function AuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createAuthPluginDefinitionSchema,\n );\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as AuthPluginDefinitionInput;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n userAccount: ModelUtils.getModelIdByNameOrDefault(\n definition,\n 'UserAccount',\n ),\n userRole: ModelUtils.getModelIdByNameOrDefault(definition, 'UserRole'),\n userSession: ModelUtils.getModelIdByNameOrDefault(\n definition,\n 'UserSession',\n ),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: createDefaultAuthRoles(),\n } satisfies AuthPluginDefinitionInput;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuthModels({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n updatedData.modelRefs = createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuthModels(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Local Authentication Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your local authentication settings, user models, and\n role definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"The main user model for authentication\"\n />\n <ModelComboboxFieldController\n label=\"User Account Model\"\n name=\"modelRefs.userAccount\"\n control={control}\n canCreate\n description=\"Model for user account credentials\"\n />\n <ModelComboboxFieldController\n label=\"User Role Model\"\n name=\"modelRefs.userRole\"\n control={control}\n canCreate\n description=\"Model for assigning roles to users\"\n />\n <ModelComboboxFieldController\n label=\"User Session Model\"\n name=\"modelRefs.userSession\"\n control={control}\n canCreate\n description=\"Model for managing user sessions\"\n />\n </div>\n\n <div className=\"auth:space-y-2\">\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AuthDefinitionEditor } from './components/auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(pluginId, AuthDefinitionEditor);\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,cAAA;AAAA,EACA;AACF,CAKE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,MAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA,WACd;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA;AAAA,WACR;AAAA,UACA;AAAA,YACE,IAAM,EAAA,eAAA;AAAA,YACN,IAAM,EAAA,SAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,OAAQ;AAAA,WAC9B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,WAAA;AAAA,YACN,IAAM,EAAA,UAAA;AAAA,YACN,OAAS,EAAA,EAAE,YAAc,EAAA,IAAA,EAAM,WAAW,IAAK;AAAA,WACjD;AAAA,UACA;AAAA,YACE,IAAM,EAAA,WAAA;AAAA,YACN,IAAM,EAAA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hB,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;ACvNA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA,CAA2B,UAAU,oBAAoB,CAAA;AACnE,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-CpGU4emr.js';
|
|
2
|
+
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-BeI52Xpr.js';
|
|
3
|
+
|
|
4
|
+
const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
5
|
+
const common = createPlatformPluginExport({
|
|
6
|
+
dependencies: {
|
|
7
|
+
config: pluginConfigSpec
|
|
8
|
+
},
|
|
9
|
+
exports: {
|
|
10
|
+
authConfig: authConfigSpec
|
|
11
|
+
},
|
|
12
|
+
initialize: ({ config }, { pluginId }) => {
|
|
13
|
+
config.registerSchemaCreator(
|
|
14
|
+
pluginId,
|
|
15
|
+
createPlaceholderAuthPluginDefinitionSchema
|
|
16
|
+
);
|
|
17
|
+
return {
|
|
18
|
+
authConfig: {
|
|
19
|
+
getUserModel: (definition) => {
|
|
20
|
+
const pluginConfig = PluginUtils.configByIdOrThrow(
|
|
21
|
+
definition,
|
|
22
|
+
pluginId
|
|
23
|
+
);
|
|
24
|
+
return pluginConfig.modelRefs.user;
|
|
25
|
+
},
|
|
26
|
+
getAuthRoles: (definition) => {
|
|
27
|
+
const pluginConfig = PluginUtils.configByIdOrThrow(
|
|
28
|
+
definition,
|
|
29
|
+
pluginId
|
|
30
|
+
);
|
|
31
|
+
return pluginConfig.roles;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { common as default };
|
|
39
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js","sources":["../../../src/placeholder-auth/core/common.ts"],"sourcesContent":["import {\n authConfigSpec,\n createPlatformPluginExport,\n pluginConfigSpec,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\n\nimport type { PlaceholderAuthPluginDefinition } from './schema/plugin-definition.js';\n\nimport { createPlaceholderAuthPluginDefinitionSchema } from './schema/plugin-definition.js';\n\n// necessary for Typescript to infer the return type of the initialize function\nexport type { PluginPlatformModule } from '@baseplate-dev/project-builder-lib';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchemaCreator(\n pluginId,\n createPlaceholderAuthPluginDefinitionSchema,\n );\n return {\n authConfig: {\n getUserModel: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as PlaceholderAuthPluginDefinition;\n return pluginConfig.modelRefs.user;\n },\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as PlaceholderAuthPluginDefinition;\n return pluginConfig.roles;\n },\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAAA,MAAA,CAAA,cAAA,CAAA,0BAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAcA,eAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,UAAe,KAAA;AACxC,IAAO,MAAA,CAAA,qBAAA;AAAA,MACL,QAAA;AAAA,MACA;AAAA,KACF;AACA,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,aAAa,SAAU,CAAA,IAAA;AAAA,SAChC;AAAA,QACA,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-CpGU4emr.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './index.esm-Erws1yaL.js';
|
|
3
|
+
import { u as useLens } from './styles-mSx3A02F.js';
|
|
4
|
+
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-Bk9sOqqk.js';
|
|
5
|
+
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-BeI52Xpr.js';
|
|
6
|
+
|
|
7
|
+
function createAuthModels({
|
|
8
|
+
authFeatureRef,
|
|
9
|
+
modelRefs
|
|
10
|
+
}) {
|
|
11
|
+
return {
|
|
12
|
+
user: {
|
|
13
|
+
name: modelRefs.user,
|
|
14
|
+
featureRef: authFeatureRef,
|
|
15
|
+
model: {
|
|
16
|
+
fields: [
|
|
17
|
+
{
|
|
18
|
+
name: "id",
|
|
19
|
+
type: "uuid",
|
|
20
|
+
options: { genUuid: true }
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "email",
|
|
24
|
+
type: "string",
|
|
25
|
+
isOptional: true
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
primaryKeyFieldRefs: ["id"],
|
|
29
|
+
uniqueConstraints: [
|
|
30
|
+
{
|
|
31
|
+
fields: [{ fieldRef: "email" }]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
graphql: {
|
|
36
|
+
objectType: {
|
|
37
|
+
enabled: true,
|
|
38
|
+
fields: ["id", "email"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const {createAndApplyModelMergerResults,createModelMergerResults,doesModelMergerResultsHaveChanges,FeatureUtils,ModelUtils,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
46
|
+
|
|
47
|
+
const {FeatureComboboxFieldController,ModelComboboxFieldController,ModelMergerResultAlert,useBlockUnsavedChangesNavigate,useDefinitionSchema,useProjectDefinition,useResettableForm} = await importShared('@baseplate-dev/project-builder-lib/web');
|
|
48
|
+
|
|
49
|
+
const {FormActionBar,SectionList,SectionListSection,SectionListSectionContent,SectionListSectionDescription,SectionListSectionHeader,SectionListSectionTitle} = await importShared('@baseplate-dev/ui-components');
|
|
50
|
+
const {useMemo} = await importShared('react');
|
|
51
|
+
function PlaceholderAuthDefinitionEditor({
|
|
52
|
+
definition: pluginMetadata,
|
|
53
|
+
metadata,
|
|
54
|
+
onSave
|
|
55
|
+
}) {
|
|
56
|
+
const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
|
|
57
|
+
const authPluginDefinitionSchema = useDefinitionSchema(
|
|
58
|
+
createPlaceholderAuthPluginDefinitionSchema
|
|
59
|
+
);
|
|
60
|
+
const defaultValues = useMemo(() => {
|
|
61
|
+
if (pluginMetadata?.config) {
|
|
62
|
+
return pluginMetadata.config;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
modelRefs: {
|
|
66
|
+
user: ModelUtils.getModelIdByNameOrDefault(definition, "User")
|
|
67
|
+
},
|
|
68
|
+
authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(
|
|
69
|
+
definition,
|
|
70
|
+
"auth"
|
|
71
|
+
),
|
|
72
|
+
roles: createDefaultAuthRoles()
|
|
73
|
+
};
|
|
74
|
+
}, [definition, pluginMetadata?.config]);
|
|
75
|
+
const form = useResettableForm({
|
|
76
|
+
resolver: s(authPluginDefinitionSchema),
|
|
77
|
+
defaultValues
|
|
78
|
+
});
|
|
79
|
+
const { control, reset, handleSubmit, watch } = form;
|
|
80
|
+
const modelRefs = watch("modelRefs");
|
|
81
|
+
const authFeatureRef = watch("authFeatureRef");
|
|
82
|
+
const pendingModelChanges = useMemo(() => {
|
|
83
|
+
const desiredModels = createAuthModels({ modelRefs, authFeatureRef });
|
|
84
|
+
return createModelMergerResults(
|
|
85
|
+
modelRefs,
|
|
86
|
+
desiredModels,
|
|
87
|
+
definitionContainer
|
|
88
|
+
);
|
|
89
|
+
}, [definitionContainer, authFeatureRef, modelRefs]);
|
|
90
|
+
const onSubmit = handleSubmit(
|
|
91
|
+
(data) => saveDefinitionWithFeedback(
|
|
92
|
+
(draftConfig) => {
|
|
93
|
+
const featureRef = FeatureUtils.ensureFeatureByNameRecursively(
|
|
94
|
+
draftConfig,
|
|
95
|
+
data.authFeatureRef
|
|
96
|
+
);
|
|
97
|
+
const updatedData = {
|
|
98
|
+
...data,
|
|
99
|
+
authFeatureRef: featureRef
|
|
100
|
+
};
|
|
101
|
+
updatedData.modelRefs = createAndApplyModelMergerResults(
|
|
102
|
+
draftConfig,
|
|
103
|
+
updatedData.modelRefs,
|
|
104
|
+
createAuthModels(updatedData),
|
|
105
|
+
definitionContainer
|
|
106
|
+
);
|
|
107
|
+
PluginUtils.setPluginConfig(
|
|
108
|
+
draftConfig,
|
|
109
|
+
metadata,
|
|
110
|
+
updatedData,
|
|
111
|
+
definitionContainer.pluginStore
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
successMessage: "Successfully saved auth plugin!",
|
|
116
|
+
onSuccess: () => {
|
|
117
|
+
onSave();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
123
|
+
const lens = useLens({ control });
|
|
124
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
125
|
+
"form",
|
|
126
|
+
{
|
|
127
|
+
onSubmit,
|
|
128
|
+
className: "auth:mb-[--action-bar-height] auth:max-w-6xl",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:pb-16", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionList, { children: [
|
|
131
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
132
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
133
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Placeholder Auth Configuration" }),
|
|
134
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "Configure your placeholder auth settings, user model, and role definitions." })
|
|
135
|
+
] }),
|
|
136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionContent, { className: "auth:space-y-6", children: [
|
|
137
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
138
|
+
ModelMergerResultAlert,
|
|
139
|
+
{
|
|
140
|
+
pendingModelChanges
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2", children: [
|
|
144
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
145
|
+
ModelComboboxFieldController,
|
|
146
|
+
{
|
|
147
|
+
label: "User Model",
|
|
148
|
+
name: "modelRefs.user",
|
|
149
|
+
control,
|
|
150
|
+
canCreate: true,
|
|
151
|
+
description: "Select or create the model that will store user authentication data"
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
155
|
+
FeatureComboboxFieldController,
|
|
156
|
+
{
|
|
157
|
+
label: "Auth Feature Path",
|
|
158
|
+
name: "authFeatureRef",
|
|
159
|
+
control,
|
|
160
|
+
canCreate: true,
|
|
161
|
+
description: "Specify the feature path where authentication endpoints will be generated"
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] })
|
|
165
|
+
] })
|
|
166
|
+
] }),
|
|
167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RoleEditorForm, { lens: lens.focus("roles") })
|
|
168
|
+
] }) }),
|
|
169
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
170
|
+
FormActionBar,
|
|
171
|
+
{
|
|
172
|
+
form,
|
|
173
|
+
allowSaveWithoutDirty: !pluginMetadata || doesModelMergerResultsHaveChanges(pendingModelChanges)
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const {createPlatformPluginExport,webConfigSpec} = await importShared('@baseplate-dev/project-builder-lib');
|
|
182
|
+
const web = createPlatformPluginExport({
|
|
183
|
+
dependencies: {
|
|
184
|
+
webConfig: webConfigSpec
|
|
185
|
+
},
|
|
186
|
+
exports: {},
|
|
187
|
+
initialize: ({ webConfig }, { pluginId }) => {
|
|
188
|
+
webConfig.registerWebConfigComponent(
|
|
189
|
+
pluginId,
|
|
190
|
+
PlaceholderAuthDefinitionEditor
|
|
191
|
+
);
|
|
192
|
+
return {};
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export { web as default };
|
|
197
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js","sources":["../../../src/placeholder-auth/core/schema/models.ts","../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx","../../../src/placeholder-auth/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { PlaceholderAuthPluginDefinition } from './plugin-definition.js';\n\nexport function createAuthModels({\n authFeatureRef,\n modelRefs,\n}: Pick<PlaceholderAuthPluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'email',\n type: 'string',\n isOptional: 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: ['id', 'email'],\n },\n },\n },\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { createDefaultAuthRoles } from '#src/common/roles/index.js';\n\nimport type { PlaceholderAuthPluginDefinition } from '../schema/plugin-definition.js';\n\nimport { createAuthModels } from '../schema/models.js';\nimport { createPlaceholderAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function PlaceholderAuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createPlaceholderAuthPluginDefinitionSchema,\n );\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as PlaceholderAuthPluginDefinition;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: createDefaultAuthRoles(),\n } satisfies PlaceholderAuthPluginDefinition;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuthModels({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n updatedData.modelRefs = createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuthModels(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Placeholder Auth Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your placeholder auth settings, user model, and role\n definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { PlaceholderAuthDefinitionEditor } from './components/placeholder-auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(\n pluginId,\n PlaceholderAuthDefinitionEditor,\n );\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,cAAA;AAAA,EACA;AACF,CAEE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA;AACd,SACF;AAAA,QACA,mBAAA,EAAqB,CAAC,IAAI,CAAA;AAAA,QAC1B,iBAAmB,EAAA;AAAA,UACjB;AAAA,YACE,MAAQ,EAAA,CAAC,EAAE,QAAA,EAAU,SAAS;AAAA;AAChC;AACF,OACF;AAAA,MACA,OAAS,EAAA;AAAA,QACP,UAAY,EAAA;AAAA,UACV,OAAS,EAAA,IAAA;AAAA,UACT,MAAA,EAAQ,CAAC,IAAA,EAAM,OAAO;AAAA;AACxB;AACF;AACF,GACF;AACF;;ACvCA,MAAA,CAAA,gCAAA,CAAA,w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;AAAA;AAAA;AACd,eACF,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;ACtLA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA;AAAA,MACR,QAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
package/dist/web/assets/{__federation_fn_import-5oUmvVro.js → __federation_fn_import-CpGU4emr.js}
RENAMED
|
@@ -356,7 +356,7 @@ function satisfy(version, range) {
|
|
|
356
356
|
const currentImports = {};
|
|
357
357
|
|
|
358
358
|
// eslint-disable-next-line no-undef
|
|
359
|
-
const moduleMap = {'react':{get:()=>()=>__federation_import(new URL('__federation_shared_react-uocnGSER.js', import.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import(new URL('__federation_shared_react-dom-Bwq4pLax.js', import.meta.url).href),import:true},'zod':{get:()=>()=>__federation_import(new URL('__federation_shared_zod-BK7IELHt.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib-
|
|
359
|
+
const moduleMap = {'react':{get:()=>()=>__federation_import(new URL('__federation_shared_react-uocnGSER.js', import.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import(new URL('__federation_shared_react-dom-Bwq4pLax.js', import.meta.url).href),import:true},'zod':{get:()=>()=>__federation_import(new URL('__federation_shared_zod-BK7IELHt.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib-B8gI4CR0.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib/web':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib/web-33D53Q49.js', import.meta.url).href),import:true},'@baseplate-dev/ui-components':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/ui-components-ClpdcB7_.js', import.meta.url).href),import:true}};
|
|
360
360
|
const moduleCache = Object.create(null);
|
|
361
361
|
async function importShared(name, shareScope = 'default') {
|
|
362
362
|
return moduleCache[name]
|
|
@@ -418,4 +418,4 @@ function flattenModule(module, name) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
export { importShared, getSharedFromLocal as importSharedLocal, getSharedFromRuntime as importSharedRuntime };
|
|
421
|
-
//# sourceMappingURL=__federation_fn_import-
|
|
421
|
+
//# sourceMappingURL=__federation_fn_import-CpGU4emr.js.map
|