@baseplate-dev/plugin-auth 3.0.4 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +39 -25
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +18 -24
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +16 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts +9 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js +15 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts +10 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js +18 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/templates/module/schema/user-session.queries.ts +22 -0
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +0 -5
- 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 +1 -10
- 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 +0 -18
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +0 -2
- 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 +0 -2
- 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 +1 -7
- 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 +3 -12
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +0 -23
- 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 +4 -33
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +25 -4
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +16 -13
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +24 -7
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +0 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +13 -6
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +5 -12
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +12 -5
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +3 -12
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +3 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +26 -7
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +34 -12
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +25 -4
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +35 -25
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +24 -7
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +0 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +13 -6
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +5 -12
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +24 -7
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +3 -12
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +3 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +22 -6
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +30 -11
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +7 -11
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -1
- package/dist/local-auth/admin/node.d.ts.map +1 -1
- package/dist/local-auth/admin/node.js +2 -6
- package/dist/local-auth/admin/node.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +12 -3
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js +0 -1
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +36 -18
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts +0 -3
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js +0 -3
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +13 -6
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js +5 -12
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +0 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +48 -30
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js +6 -49
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +9 -2
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +10 -2
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +2 -2
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +0 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +2 -2
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +3 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +6 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +12 -2
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +5 -2
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +16 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +19 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +12 -3
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +1 -8
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +36 -7
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +0 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +13 -6
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +5 -12
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +48 -9
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +5 -13
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +11 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +12 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +11 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +12 -2
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +24 -7
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-paths.js +0 -1
- package/dist/local-auth/core/generators/react-session/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +13 -7
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.js +5 -12
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +24 -7
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +4 -15
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +12 -3
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.js +0 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +10 -2
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +11 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +0 -12
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +0 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +0 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +1 -7
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +2 -14
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +0 -15
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +2 -31
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +0 -5
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js +1 -7
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DxPG_Wc0.js → __federation_expose_auth0CoreCommon-Ga9LD3d6.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DxPG_Wc0.js.map → __federation_expose_auth0CoreCommon-Ga9LD3d6.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-B9jV1EyN.js → __federation_expose_auth0CoreWeb-CZueDXPK.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-B9jV1EyN.js.map → __federation_expose_auth0CoreWeb-CZueDXPK.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-Cxa_7fkO.js → __federation_expose_authCoreCommon-BrTLsuJC.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-Cxa_7fkO.js.map → __federation_expose_authCoreCommon-BrTLsuJC.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-CTQI1rXb.js → __federation_expose_authCoreWeb-C8rgnA2v.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-CTQI1rXb.js.map → __federation_expose_authCoreWeb-C8rgnA2v.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-C0_ovnDb.js → __federation_expose_local-authAdminCommon-C75-DAzO.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-C0_ovnDb.js.map → __federation_expose_local-authAdminCommon-C75-DAzO.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-GqHU6av7.js → __federation_expose_local-authAdminWeb-D2xGvwyL.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-GqHU6av7.js.map → __federation_expose_local-authAdminWeb-D2xGvwyL.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-PHXPCKoj.js → __federation_expose_local-authCoreCommon-BFUbyPYg.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-PHXPCKoj.js.map → __federation_expose_local-authCoreCommon-BFUbyPYg.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Dz4oU0uP.js → __federation_expose_local-authCoreWeb-ChyvdsRq.js} +5 -5
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Dz4oU0uP.js.map → __federation_expose_local-authCoreWeb-ChyvdsRq.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CrB_sJO_.js → __federation_expose_placeholder-authCoreCommon-DrFV9FSW.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CrB_sJO_.js.map → __federation_expose_placeholder-authCoreCommon-DrFV9FSW.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-KJ8YuuIQ.js → __federation_expose_placeholder-authCoreWeb-CT8JKYLB.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-KJ8YuuIQ.js.map → __federation_expose_placeholder-authCoreWeb-CT8JKYLB.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-CVjKjdRb.js → __federation_fn_import-C_QCk5FX.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-CVjKjdRb.js.map → __federation_fn_import-C_QCk5FX.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BTmJxb08.js → web-DtztAtUw.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BTmJxb08.js.map → web-DtztAtUw.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-FK4Jv94w.js → project-builder-lib-CcNtL_U6.js} +293 -216
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CcNtL_U6.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-jZLf5m_y.js → ui-components-DA_4I2Vy.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-jZLf5m_y.js.map → ui-components-DA_4I2Vy.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-CAgM5SRt.js → utils-Bxy-1ETU.js} +34 -3
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-Bxy-1ETU.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-DynsSbJG.js → react-router-DooFj-IS.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-DynsSbJG.js.map → react-router-DooFj-IS.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-DqZ2Eg7c.js → get-auth-plugin-definition-D2XMaoy7.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-DqZ2Eg7c.js.map → get-auth-plugin-definition-D2XMaoy7.js.map} +1 -1
- package/dist/web/assets/{index-Dccn3WBN.js → index-DwJT6_Wn.js} +2 -2
- package/dist/web/assets/{index-Dccn3WBN.js.map → index-DwJT6_Wn.js.map} +1 -1
- package/dist/web/assets/{index.esm-DeCjXqFv.js → index.esm-ChwWPPiL.js} +2 -2
- package/dist/web/assets/{index.esm-DeCjXqFv.js.map → index.esm-ChwWPPiL.js.map} +1 -1
- package/dist/web/assets/{model-merger-kOQ_dmiE.js → model-merger-gGkFnyaY.js} +7 -2
- package/dist/web/assets/model-merger-gGkFnyaY.js.map +1 -0
- package/dist/web/assets/{plugin-definition-qkkt1X28.js → plugin-definition-QRBMcFiG.js} +2 -2
- package/dist/web/assets/{plugin-definition-qkkt1X28.js.map → plugin-definition-QRBMcFiG.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-CxKhFkmJ.js → plugin-definition-_slrOM0G.js} +2 -2
- package/dist/web/assets/{plugin-definition-CxKhFkmJ.js.map → plugin-definition-_slrOM0G.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-JFxKP18O.js → plugin-definition-hAzbWO7b.js} +2 -2
- package/dist/web/assets/{plugin-definition-JFxKP18O.js.map → plugin-definition-hAzbWO7b.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-DKygiFuR.js → plugin-definition-rpMj4pr8.js} +2 -2
- package/dist/web/assets/{plugin-definition-DKygiFuR.js.map → plugin-definition-rpMj4pr8.js.map} +1 -1
- package/dist/web/assets/{react-DA5A88WZ.js → react-DbX1FP85.js} +2 -2
- package/dist/web/assets/{react-DA5A88WZ.js.map → react-DbX1FP85.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +10 -10
- package/dist/web/assets/{styles-CfTjrsB-.js → styles-DqLt1Blm.js} +3 -3
- package/dist/web/assets/{styles-CfTjrsB-.js.map → styles-DqLt1Blm.js.map} +1 -1
- package/package.json +12 -12
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.gql +0 -10
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts +0 -30
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.gql +0 -7
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.gql +0 -7
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts +0 -18
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map +0 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.gql +0 -10
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +0 -22
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +0 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +0 -39
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.gql +0 -5
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/queries.gql +0 -17
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.gql +0 -7
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts +0 -14
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.gql +0 -10
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +0 -23
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +0 -35
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-FK4Jv94w.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CAgM5SRt.js.map +0 -1
- package/dist/web/assets/model-merger-kOQ_dmiE.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseplate-dev/plugin-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Contains the auth plugin for Baseplate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"react-hook-form": "7.60.0",
|
|
37
37
|
"react-icons": "5.5.0",
|
|
38
38
|
"zod": "^4.1.13",
|
|
39
|
-
"@baseplate-dev/
|
|
40
|
-
"@baseplate-dev/
|
|
41
|
-
"@baseplate-dev/
|
|
42
|
-
"@baseplate-dev/
|
|
43
|
-
"@baseplate-dev/
|
|
39
|
+
"@baseplate-dev/core-generators": "0.5.0",
|
|
40
|
+
"@baseplate-dev/fastify-generators": "0.5.0",
|
|
41
|
+
"@baseplate-dev/react-generators": "0.5.0",
|
|
42
|
+
"@baseplate-dev/ui-components": "0.5.0",
|
|
43
|
+
"@baseplate-dev/utils": "0.5.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@originjs/vite-plugin-federation": "1.3.6",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"tailwindcss": "4.1.13",
|
|
57
57
|
"typescript": "5.8.3",
|
|
58
58
|
"vite": "7.1.12",
|
|
59
|
-
"vitest": "
|
|
60
|
-
"@baseplate-dev/project-builder-lib": "0.
|
|
61
|
-
"@baseplate-dev/sync": "0.
|
|
62
|
-
"@baseplate-dev/tools": "0.
|
|
59
|
+
"vitest": "4.0.16",
|
|
60
|
+
"@baseplate-dev/project-builder-lib": "0.5.0",
|
|
61
|
+
"@baseplate-dev/sync": "0.5.0",
|
|
62
|
+
"@baseplate-dev/tools": "0.5.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@baseplate-dev/project-builder-lib": "0.
|
|
66
|
-
"@baseplate-dev/sync": "0.
|
|
65
|
+
"@baseplate-dev/project-builder-lib": "0.5.0",
|
|
66
|
+
"@baseplate-dev/sync": "0.5.0"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": "^22.0.0"
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
4
|
-
|
|
5
|
-
import { useQuery } from '@apollo/client/react';
|
|
6
|
-
|
|
7
|
-
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
8
|
-
import { useSession } from '$useSession';
|
|
9
|
-
|
|
10
|
-
interface UseCurrentUserResult {
|
|
11
|
-
user?: CurrentUserFragment;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
error?: Error | null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function useCurrentUser(): UseCurrentUserResult {
|
|
17
|
-
const { userId } = useSession();
|
|
18
|
-
const { data, loading, error } = useQuery(GetUserByIdDocument, {
|
|
19
|
-
variables: { id: userId ?? '' },
|
|
20
|
-
skip: !userId,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const noUserError = !userId ? new Error('No user logged in') : null;
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
user: data?.TPL_USER,
|
|
27
|
-
loading,
|
|
28
|
-
error: error ?? noUserError,
|
|
29
|
-
};
|
|
30
|
-
}
|
package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
2
|
-
/**
|
|
3
|
-
* Result returned by useCurrentUser hook
|
|
4
|
-
*/
|
|
5
|
-
export interface UseCurrentUserResult {
|
|
6
|
-
/** Current user data from GraphQL */
|
|
7
|
-
user?: CurrentUserFragment;
|
|
8
|
-
/** Whether user data is loading */
|
|
9
|
-
loading: boolean;
|
|
10
|
-
/** Any error that occurred while fetching user data */
|
|
11
|
-
error?: Error | undefined;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Fetches information about the current user via GraphQL
|
|
15
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
16
|
-
*/
|
|
17
|
-
export declare function useCurrentUser(): UseCurrentUserResult;
|
|
18
|
-
//# sourceMappingURL=use-current-user.d.ts.map
|
package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-current-user.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMpE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAcrD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { useSession } from '$useSession';
|
|
3
|
-
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
4
|
-
import { useQuery } from '@apollo/client/react';
|
|
5
|
-
/**
|
|
6
|
-
* Fetches information about the current user via GraphQL
|
|
7
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
8
|
-
*/
|
|
9
|
-
export function useCurrentUser() {
|
|
10
|
-
const { userId } = useSession();
|
|
11
|
-
const { data, loading, error } = useQuery(GetUserByIdDocument, {
|
|
12
|
-
variables: { id: userId ?? '' },
|
|
13
|
-
skip: !userId,
|
|
14
|
-
});
|
|
15
|
-
const noUserError = !userId ? new Error('No user logged in') : undefined;
|
|
16
|
-
return {
|
|
17
|
-
user: data?.user,
|
|
18
|
-
loading,
|
|
19
|
-
error: error ?? noUserError,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=use-current-user.js.map
|
package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-current-user.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAchD;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAChC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,mBAAmB,EAAE;QAC7D,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE;QAC/B,IAAI,EAAE,CAAC,MAAM;KACd,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEzE,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,IAAI;QAChB,OAAO;QACP,KAAK,EAAE,KAAK,IAAI,WAAW;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
4
|
-
|
|
5
|
-
import { useSession } from '$useSession';
|
|
6
|
-
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
7
|
-
import { useQuery } from '@apollo/client/react';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Result returned by useCurrentUser hook
|
|
11
|
-
*/
|
|
12
|
-
export interface UseCurrentUserResult {
|
|
13
|
-
/** Current user data from GraphQL */
|
|
14
|
-
user?: CurrentUserFragment;
|
|
15
|
-
/** Whether user data is loading */
|
|
16
|
-
loading: boolean;
|
|
17
|
-
/** Any error that occurred while fetching user data */
|
|
18
|
-
error?: Error | undefined;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Fetches information about the current user via GraphQL
|
|
23
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
24
|
-
*/
|
|
25
|
-
export function useCurrentUser(): UseCurrentUserResult {
|
|
26
|
-
const { userId } = useSession();
|
|
27
|
-
const { data, loading, error } = useQuery(GetUserByIdDocument, {
|
|
28
|
-
variables: { id: userId ?? '' },
|
|
29
|
-
skip: !userId,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const noUserError = !userId ? new Error('No user logged in') : undefined;
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
user: data?.user,
|
|
36
|
-
loading,
|
|
37
|
-
error: error ?? noUserError,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
mutation RegisterWithEmailPassword($input: RegisterWithEmailPasswordInput!) {
|
|
2
|
-
registerWithEmailPassword(input: $input) {
|
|
3
|
-
session {
|
|
4
|
-
userId
|
|
5
|
-
roles
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
mutation LoginWithEmailPassword($input: LoginWithEmailPasswordInput!) {
|
|
11
|
-
loginWithEmailPassword(input: $input) {
|
|
12
|
-
session {
|
|
13
|
-
userId
|
|
14
|
-
roles
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
2
|
-
interface UseCurrentUserResult {
|
|
3
|
-
user?: CurrentUserFragment;
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error?: Error | undefined;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Fetches information about the current user
|
|
9
|
-
*
|
|
10
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
11
|
-
*/
|
|
12
|
-
export declare function useCurrentUser(): UseCurrentUserResult;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=use-current-user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-current-user.d.ts","sourceRoot":"","sources":["../../../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAOpE,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAcrD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { useQuery } from '@apollo/client/react';
|
|
3
|
-
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
4
|
-
import { useSession } from '$useSession';
|
|
5
|
-
/**
|
|
6
|
-
* Fetches information about the current user
|
|
7
|
-
*
|
|
8
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
9
|
-
*/
|
|
10
|
-
export function useCurrentUser() {
|
|
11
|
-
const { userId } = useSession();
|
|
12
|
-
const { data, loading, error } = useQuery(GetUserByIdDocument, {
|
|
13
|
-
variables: { id: userId ?? '' },
|
|
14
|
-
skip: !userId,
|
|
15
|
-
});
|
|
16
|
-
const noUserError = !userId ? new Error('No user logged in') : undefined;
|
|
17
|
-
return {
|
|
18
|
-
user: data?.user,
|
|
19
|
-
loading,
|
|
20
|
-
error: error ?? noUserError,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=use-current-user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-current-user.js","sourceRoot":"","sources":["../../../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQzC;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAChC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,mBAAmB,EAAE;QAC7D,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE;QAC/B,IAAI,EAAE,CAAC,MAAM;KACd,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEzE,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,IAAI;QAChB,OAAO;QACP,KAAK,EAAE,KAAK,IAAI,WAAW;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
4
|
-
|
|
5
|
-
import { useQuery } from '@apollo/client/react';
|
|
6
|
-
|
|
7
|
-
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
8
|
-
import { useSession } from '$useSession';
|
|
9
|
-
|
|
10
|
-
interface UseCurrentUserResult {
|
|
11
|
-
user?: CurrentUserFragment;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
error?: Error | undefined;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Fetches information about the current user
|
|
18
|
-
*
|
|
19
|
-
* @returns A result containing the current user or an error if the user is not authenticated
|
|
20
|
-
*/
|
|
21
|
-
export function useCurrentUser(): UseCurrentUserResult {
|
|
22
|
-
const { userId } = useSession();
|
|
23
|
-
const { data, loading, error } = useQuery(GetUserByIdDocument, {
|
|
24
|
-
variables: { id: userId ?? '' },
|
|
25
|
-
skip: !userId,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const noUserError = !userId ? new Error('No user logged in') : undefined;
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
user: data?.user,
|
|
32
|
-
loading,
|
|
33
|
-
error: error ?? noUserError,
|
|
34
|
-
};
|
|
35
|
-
}
|