@baseplate-dev/plugin-auth 3.0.1 → 3.0.3

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.
Files changed (188) hide show
  1. package/dist/auth/core/components/auth-definition-editor.js +1 -1
  2. package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
  3. package/dist/auth/core/node.d.ts.map +1 -1
  4. package/dist/auth/core/node.js +2 -1
  5. package/dist/auth/core/node.js.map +1 -1
  6. package/dist/auth/core/schema/plugin-definition.d.ts +6 -39
  7. package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
  8. package/dist/auth/core/schema/roles/schema.d.ts +7 -27
  9. package/dist/auth/core/schema/roles/schema.d.ts.map +1 -1
  10. package/dist/auth/core/schema/roles/schema.js +1 -1
  11. package/dist/auth/core/schema/roles/schema.js.map +1 -1
  12. package/dist/auth0/core/components/auth0-definition-editor.js +1 -1
  13. package/dist/auth0/core/components/auth0-definition-editor.js.map +1 -1
  14. package/dist/auth0/core/schema/plugin-definition.d.ts +1 -1
  15. package/dist/auth0/core/schema/plugin-definition.d.ts.map +1 -1
  16. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts +1 -1
  17. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js +1 -1
  18. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js.map +1 -1
  19. package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +1 -1
  20. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +1 -1
  21. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts +3 -2
  22. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +1 -1
  23. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +1 -1
  24. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +1 -1
  25. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -1
  26. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -1
  27. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -1
  28. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -1
  29. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +1 -1
  30. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -1
  31. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -1
  32. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -1
  33. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +1 -1
  34. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +1 -1
  35. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +1 -1
  36. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -1
  37. package/dist/local-auth/admin/schema/manage-role-action.d.ts +5 -11
  38. package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -1
  39. package/dist/local-auth/admin/schema/reset-password-action.d.ts +5 -11
  40. package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -1
  41. package/dist/local-auth/admin/schema/roles-column.d.ts +1 -10
  42. package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -1
  43. package/dist/local-auth/core/components/local-auth-definition-editor.js +1 -1
  44. package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
  45. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
  46. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -1
  47. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js +2 -1
  48. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js.map +1 -1
  49. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js +12 -7
  50. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js.map +1 -1
  51. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.ts +11 -9
  52. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
  53. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +0 -1
  54. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
  55. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +0 -1
  56. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +2 -2
  57. package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +2 -2
  58. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +1 -1
  59. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +2 -2
  60. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +1 -1
  61. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
  62. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +1 -1
  63. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +1 -1
  64. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +1 -1
  65. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +1 -1
  66. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
  67. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +4 -0
  68. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
  69. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +1 -1
  70. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -1
  71. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +1 -1
  72. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +2 -2
  73. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +3 -3
  74. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +1 -1
  75. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +4 -4
  76. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +3 -11
  77. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -1
  78. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +2 -5
  79. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
  80. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +2 -5
  81. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +3 -11
  82. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -1
  83. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +2 -5
  84. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
  85. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +2 -5
  86. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts +1 -1
  87. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +1 -1
  88. package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts +1 -1
  89. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +1 -1
  90. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +3 -3
  91. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +2 -2
  92. package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +1 -1
  93. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +2 -2
  94. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -1
  95. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +17 -1
  96. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -1
  97. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +18 -1
  98. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +1 -1
  99. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +8 -2
  100. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -1
  101. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts +8 -2
  102. package/dist/local-auth/core/schema/plugin-definition.d.ts +3 -9
  103. package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
  104. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +1 -1
  105. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
  106. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +1 -1
  107. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -1
  108. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +2 -2
  109. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
  110. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +3 -2
  111. package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts +1 -1
  112. package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts +1 -1
  113. package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +1 -1
  114. package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -1
  115. package/dist/web/assets/{__federation_expose_auth0CoreCommon-xk1Gj1WU.js → __federation_expose_auth0CoreCommon-DxPG_Wc0.js} +3 -3
  116. package/dist/web/assets/{__federation_expose_auth0CoreCommon-xk1Gj1WU.js.map → __federation_expose_auth0CoreCommon-DxPG_Wc0.js.map} +1 -1
  117. package/dist/web/assets/{__federation_expose_auth0CoreWeb-CAiUkJwE.js → __federation_expose_auth0CoreWeb-B9jV1EyN.js} +7 -7
  118. package/dist/web/assets/__federation_expose_auth0CoreWeb-B9jV1EyN.js.map +1 -0
  119. package/dist/web/assets/{__federation_expose_authCoreCommon-K21saJbW.js → __federation_expose_authCoreCommon-Cxa_7fkO.js} +3 -3
  120. package/dist/web/assets/{__federation_expose_authCoreCommon-K21saJbW.js.map → __federation_expose_authCoreCommon-Cxa_7fkO.js.map} +1 -1
  121. package/dist/web/assets/{__federation_expose_authCoreWeb-L7mv-Kl9.js → __federation_expose_authCoreWeb-CTQI1rXb.js} +9 -9
  122. package/dist/web/assets/__federation_expose_authCoreWeb-CTQI1rXb.js.map +1 -0
  123. package/dist/web/assets/{__federation_expose_local-authAdminCommon-BcMGRCCu.js → __federation_expose_local-authAdminCommon-C0_ovnDb.js} +2 -2
  124. package/dist/web/assets/{__federation_expose_local-authAdminCommon-BcMGRCCu.js.map → __federation_expose_local-authAdminCommon-C0_ovnDb.js.map} +1 -1
  125. package/dist/web/assets/{__federation_expose_local-authAdminWeb-DUY1rKEt.js → __federation_expose_local-authAdminWeb-GqHU6av7.js} +2 -2
  126. package/dist/web/assets/{__federation_expose_local-authAdminWeb-DUY1rKEt.js.map → __federation_expose_local-authAdminWeb-GqHU6av7.js.map} +1 -1
  127. package/dist/web/assets/{__federation_expose_local-authCoreCommon-B1wtgXDT.js → __federation_expose_local-authCoreCommon-PHXPCKoj.js} +3 -3
  128. package/dist/web/assets/{__federation_expose_local-authCoreCommon-B1wtgXDT.js.map → __federation_expose_local-authCoreCommon-PHXPCKoj.js.map} +1 -1
  129. package/dist/web/assets/{__federation_expose_local-authCoreWeb-CSWj3XON.js → __federation_expose_local-authCoreWeb-Dz4oU0uP.js} +7 -7
  130. package/dist/web/assets/__federation_expose_local-authCoreWeb-Dz4oU0uP.js.map +1 -0
  131. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-BTZdABuy.js → __federation_expose_placeholder-authCoreCommon-CrB_sJO_.js} +3 -3
  132. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-BTZdABuy.js.map → __federation_expose_placeholder-authCoreCommon-CrB_sJO_.js.map} +1 -1
  133. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DXc_X2aO.js → __federation_expose_placeholder-authCoreWeb-KJ8YuuIQ.js} +7 -7
  134. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-KJ8YuuIQ.js.map +1 -0
  135. package/dist/web/assets/{__federation_fn_import-BVpKhyMw.js → __federation_fn_import-CVjKjdRb.js} +2 -2
  136. package/dist/web/assets/{__federation_fn_import-BVpKhyMw.js.map → __federation_fn_import-CVjKjdRb.js.map} +1 -1
  137. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-gdwlRH2l.js → web-BTmJxb08.js} +11 -6
  138. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BTmJxb08.js.map +1 -0
  139. package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-BvJ1_iif.js → project-builder-lib-FK4Jv94w.js} +620 -644
  140. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-FK4Jv94w.js.map +1 -0
  141. package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-E30UR3cY.js → ui-components-jZLf5m_y.js} +5 -5
  142. package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-E30UR3cY.js.map → ui-components-jZLf5m_y.js.map} +1 -1
  143. package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-Ciu7eAT9.js → utils-CAgM5SRt.js} +47 -48
  144. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CAgM5SRt.js.map +1 -0
  145. package/dist/web/assets/__federation_shared_@tanstack/{react-router-AU7vpPwr.js → react-router-DynsSbJG.js} +2541 -2240
  146. package/dist/web/assets/__federation_shared_@tanstack/react-router-DynsSbJG.js.map +1 -0
  147. package/dist/web/assets/__federation_shared_zod-B6wbpZ4f.js +12007 -0
  148. package/dist/web/assets/__federation_shared_zod-B6wbpZ4f.js.map +1 -0
  149. package/dist/web/assets/{get-auth-plugin-definition-CHOjVGaq.js → get-auth-plugin-definition-DqZ2Eg7c.js} +2 -2
  150. package/dist/web/assets/{get-auth-plugin-definition-CHOjVGaq.js.map → get-auth-plugin-definition-DqZ2Eg7c.js.map} +1 -1
  151. package/dist/web/assets/{index-DqPqnxYC.js → index-Dccn3WBN.js} +2 -2
  152. package/dist/web/assets/{index-DqPqnxYC.js.map → index-Dccn3WBN.js.map} +1 -1
  153. package/dist/web/assets/{index.esm-DUunUtBj.js → index.esm-DeCjXqFv.js} +2 -2
  154. package/dist/web/assets/{index.esm-DUunUtBj.js.map → index.esm-DeCjXqFv.js.map} +1 -1
  155. package/dist/web/assets/{model-merger-CI1pu411.js → model-merger-kOQ_dmiE.js} +326 -170
  156. package/dist/web/assets/model-merger-kOQ_dmiE.js.map +1 -0
  157. package/dist/web/assets/{plugin-definition-CIiMl7Zf.js → plugin-definition-CxKhFkmJ.js} +3 -3
  158. package/dist/web/assets/plugin-definition-CxKhFkmJ.js.map +1 -0
  159. package/dist/web/assets/{plugin-definition--cfUfY5Z.js → plugin-definition-DKygiFuR.js} +2 -2
  160. package/dist/web/assets/{plugin-definition--cfUfY5Z.js.map → plugin-definition-DKygiFuR.js.map} +1 -1
  161. package/dist/web/assets/{plugin-definition-BzhiPIBh.js → plugin-definition-JFxKP18O.js} +2 -2
  162. package/dist/web/assets/{plugin-definition-BzhiPIBh.js.map → plugin-definition-JFxKP18O.js.map} +1 -1
  163. package/dist/web/assets/{plugin-definition-BYzEIUL9.js → plugin-definition-qkkt1X28.js} +2 -2
  164. package/dist/web/assets/{plugin-definition-BYzEIUL9.js.map → plugin-definition-qkkt1X28.js.map} +1 -1
  165. package/dist/web/assets/{react-DW8S9iUr.js → react-DA5A88WZ.js} +2 -2
  166. package/dist/web/assets/{react-DW8S9iUr.js.map → react-DA5A88WZ.js.map} +1 -1
  167. package/dist/web/assets/registries-19UehlAo.js +1081 -0
  168. package/dist/web/assets/registries-19UehlAo.js.map +1 -0
  169. package/dist/web/assets/remoteEntry.js +10 -10
  170. package/dist/web/assets/styles-CfTjrsB-.js +59 -0
  171. package/dist/web/assets/styles-CfTjrsB-.js.map +1 -0
  172. package/package.json +15 -15
  173. package/dist/index.js.map +0 -1
  174. package/dist/web/assets/__federation_expose_auth0CoreWeb-CAiUkJwE.js.map +0 -1
  175. package/dist/web/assets/__federation_expose_authCoreWeb-L7mv-Kl9.js.map +0 -1
  176. package/dist/web/assets/__federation_expose_local-authCoreWeb-CSWj3XON.js.map +0 -1
  177. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-DXc_X2aO.js.map +0 -1
  178. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-gdwlRH2l.js.map +0 -1
  179. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvJ1_iif.js.map +0 -1
  180. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-Ciu7eAT9.js.map +0 -1
  181. package/dist/web/assets/__federation_shared_@tanstack/react-router-AU7vpPwr.js.map +0 -1
  182. package/dist/web/assets/__federation_shared_zod-BGUJlEOa.js +0 -4291
  183. package/dist/web/assets/__federation_shared_zod-BGUJlEOa.js.map +0 -1
  184. package/dist/web/assets/model-merger-CI1pu411.js.map +0 -1
  185. package/dist/web/assets/plugin-definition-CIiMl7Zf.js.map +0 -1
  186. package/dist/web/assets/styles-N05E1ZaS.js +0 -58
  187. package/dist/web/assets/styles-N05E1ZaS.js.map +0 -1
  188. package/dist/web-export.js.map +0 -1
@@ -13,7 +13,7 @@ import {
13
13
  } from '%reactComponentsImports';
14
14
  import { logAndFormatError, logError } from '%reactErrorImports';
15
15
  import { userSessionClient } from '%reactSessionImports';
16
- import { useMutation } from '@apollo/client';
16
+ import { useMutation } from '@apollo/client/react';
17
17
  import { zodResolver } from '@hookform/resolvers/zod';
18
18
  import {
19
19
  createFileRoute,
@@ -43,10 +43,7 @@ export const Route = createFileRoute('/auth_/login')({
43
43
  const PASSWORD_MIN_LENGTH = 8;
44
44
 
45
45
  const formSchema = z.object({
46
- email: z
47
- .string()
48
- .email()
49
- .transform((value) => value.toLowerCase()),
46
+ email: z.email().transform((value) => value.toLowerCase()),
50
47
  password: z.string().min(PASSWORD_MIN_LENGTH),
51
48
  });
52
49
 
@@ -1,15 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const Route: import("@tanstack/router-core").Route<never, never, never, never, never, z.ZodObject<{
2
+ export declare const Route: import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, never, never, never, never, never, z.ZodObject<{
3
3
  return_to: z.ZodOptional<z.ZodString>;
4
- }, "strip", z.ZodTypeAny, {
5
- return_to?: string | undefined;
6
- }, {
7
- return_to?: string | undefined;
8
- }>, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, ({ search: { return_to }, context: { userId } }: import("@tanstack/react-router").BeforeLoadContextOptions<never, z.ZodObject<{
4
+ }, z.core.$strip>, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, ({ search: { return_to }, context: { userId } }: import("@tanstack/react-router").BeforeLoadContextOptions<import("@tanstack/react-router").Register, never, z.ZodObject<{
9
5
  return_to: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- return_to?: string | undefined;
12
- }, {
13
- return_to?: string | undefined;
14
- }>, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext>) => void, {}, undefined, unknown, unknown>;
6
+ }, z.core.$strip>, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, unknown, undefined>) => void, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
15
7
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,KAAK;;;;;;;;;;;;+LAahB,CAAC"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,KAAK;;;;+PAahB,CAAC"}
@@ -5,7 +5,7 @@ import { RegisterWithEmailPasswordDocument } from '%generatedGraphqlImports';
5
5
  import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, InputFieldController, } from '%reactComponentsImports';
6
6
  import { logAndFormatError, logError } from '%reactErrorImports';
7
7
  import { userSessionClient } from '%reactSessionImports';
8
- import { useMutation } from '@apollo/client';
8
+ import { useMutation } from '@apollo/client/react';
9
9
  import { zodResolver } from '@hookform/resolvers/zod';
10
10
  import { createFileRoute, Link, redirect, useNavigate, } from '@tanstack/react-router';
11
11
  import { useForm } from 'react-hook-form';
@@ -27,10 +27,7 @@ export const Route = createFileRoute('/auth_/register')({
27
27
  });
28
28
  const PASSWORD_MIN_LENGTH = 8;
29
29
  const formSchema = z.object({
30
- email: z
31
- .string()
32
- .email()
33
- .transform((value) => value.toLowerCase()),
30
+ email: z.email().transform((value) => value.toLowerCase()),
34
31
  password: z.string().min(PASSWORD_MIN_LENGTH),
35
32
  });
36
33
  function RegisterPage() {
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/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K,SAAS,EAAC,0BAA0B,yCACd,GAAG,EAC5B,KAAC,IAAI,IAAC,EAAE,EAAC,aAAa,EAAC,SAAS,EAAC,8BAA8B,sBAExD,IACH,IACD,GACK,IACT,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx"],"names":[],"mappings":";AAAA,cAAc;AAEd,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,SAAS,EACT,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;IACtD,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,KAAK,CAAC,sCAAsC,CAAC;aAC7C,QAAQ,EAAE;KACd,CAAC;IACF,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EA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,UAAU,EACf,IAAI,EAAC,UAAU,EACf,YAAY,EAAC,cAAc,EAC3B,WAAW,EAAC,UAAU,GACtB,EACF,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAE,OAAO,yBAEjD,IACL,EACN,eAAK,SAAS,EAAC,0BAA0B,yCACd,GAAG,EAC5B,KAAC,IAAI,IAAC,EAAE,EAAC,aAAa,EAAC,SAAS,EAAC,8BAA8B,sBAExD,IACH,IACD,GACK,IACT,CACR,CAAC;AACJ,CAAC"}
@@ -13,7 +13,7 @@ import {
13
13
  } from '%reactComponentsImports';
14
14
  import { logAndFormatError, logError } from '%reactErrorImports';
15
15
  import { userSessionClient } from '%reactSessionImports';
16
- import { useMutation } from '@apollo/client';
16
+ import { useMutation } from '@apollo/client/react';
17
17
  import { zodResolver } from '@hookform/resolvers/zod';
18
18
  import {
19
19
  createFileRoute,
@@ -43,10 +43,7 @@ export const Route = createFileRoute('/auth_/register')({
43
43
  const PASSWORD_MIN_LENGTH = 8;
44
44
 
45
45
  const formSchema = z.object({
46
- email: z
47
- .string()
48
- .email()
49
- .transform((value) => value.toLowerCase()),
46
+ email: z.email().transform((value) => value.toLowerCase()),
50
47
  password: z.string().min(PASSWORD_MIN_LENGTH),
51
48
  });
52
49
 
@@ -1,2 +1,2 @@
1
- export declare const Route: import("@tanstack/router-core").Route<never, never, never, never, never, undefined, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown>;
1
+ export declare const Route: import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, never, never, never, never, never, undefined, import("@tanstack/react-router").ResolveParams<never>, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
2
2
  //# sourceMappingURL=route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-routes/templates/routes/auth_/route.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,oTAEhB,CAAC"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-routes/templates/routes/auth_/route.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,4XAEhB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generator for basic React auth integrations
3
3
  */
4
- export declare const reactAuthGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
4
+ export declare const reactAuthGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
5
5
  reactAuth: import("@baseplate-dev/sync").GeneratorTask<{
6
6
  reactAuthRoutes: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/react-generators").ReactAuthRoutesProvider>;
7
7
  }, any, any>;
@@ -2,8 +2,8 @@ export declare const LOCAL_AUTH_CORE_REACT_SESSION_GENERATED: {
2
2
  imports: {
3
3
  task: import("@baseplate-dev/sync").GeneratorTask<{
4
4
  reactSessionImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
5
- userSessionClient: {};
6
5
  UserSessionClient: {};
6
+ userSessionClient: {};
7
7
  }>>;
8
8
  }, {
9
9
  paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").LocalAuthCoreReactSessionPaths>;
@@ -1,18 +1,18 @@
1
1
  import type { TsImportMapProviderFromSchema } from '@baseplate-dev/core-generators';
2
2
  export declare const reactSessionImportsSchema: {
3
- userSessionClient: {};
4
3
  UserSessionClient: {};
4
+ userSessionClient: {};
5
5
  };
6
6
  export type ReactSessionImportsProvider = TsImportMapProviderFromSchema<typeof reactSessionImportsSchema>;
7
7
  export declare const reactSessionImportsProvider: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
8
- userSessionClient: {};
9
8
  UserSessionClient: {};
9
+ userSessionClient: {};
10
10
  }>>;
11
11
  export declare const LOCAL_AUTH_CORE_REACT_SESSION_IMPORTS: {
12
12
  task: import("@baseplate-dev/sync").GeneratorTask<{
13
13
  reactSessionImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
14
- userSessionClient: {};
15
14
  UserSessionClient: {};
15
+ userSessionClient: {};
16
16
  }>>;
17
17
  }, {
18
18
  paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").LocalAuthCoreReactSessionPaths>;
@@ -2,8 +2,8 @@ import { createTsImportMap, createTsImportMapSchema, packageScope, } from '@base
2
2
  import { createGeneratorTask, createReadOnlyProviderType, } from '@baseplate-dev/sync';
3
3
  import { LOCAL_AUTH_CORE_REACT_SESSION_PATHS } from './template-paths.js';
4
4
  export const reactSessionImportsSchema = createTsImportMapSchema({
5
- userSessionClient: {},
6
5
  UserSessionClient: {},
6
+ userSessionClient: {},
7
7
  });
8
8
  export const reactSessionImportsProvider = createReadOnlyProviderType('react-session-imports');
9
9
  const localAuthCoreReactSessionImportsTask = createGeneratorTask({
@@ -17,8 +17,8 @@ const localAuthCoreReactSessionImportsTask = createGeneratorTask({
17
17
  return {
18
18
  providers: {
19
19
  reactSessionImports: createTsImportMap(reactSessionImportsSchema, {
20
- userSessionClient: paths.userSessionClient,
21
20
  UserSessionClient: paths.userSessionClient,
21
+ userSessionClient: paths.userSessionClient,
22
22
  }),
23
23
  },
24
24
  };
@@ -7,7 +7,7 @@ const userSessionClient = createTsTemplateFile({
7
7
  group: 'main',
8
8
  importMapProviders: { reactUtilsImports: reactUtilsImportsProvider },
9
9
  name: 'user-session-client',
10
- projectExports: { userSessionClient: {}, UserSessionClient: {} },
10
+ projectExports: { UserSessionClient: {}, userSessionClient: {} },
11
11
  source: {
12
12
  path: path.join(import.meta.dirname, '../templates/src/services/user-session-client.ts'),
13
13
  },
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generator for React session management
3
3
  */
4
- export declare const reactSessionGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
4
+ export declare const reactSessionGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
5
5
  paths: import("@baseplate-dev/sync").GeneratorTask<{
6
6
  localAuthCoreReactSessionPaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths.js").LocalAuthCoreReactSessionPaths>;
7
7
  }, {
@@ -9,8 +9,8 @@ export declare const reactSessionGenerator: import("@baseplate-dev/sync").Genera
9
9
  }, undefined>;
10
10
  imports: import("@baseplate-dev/sync").GeneratorTask<{
11
11
  reactSessionImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
12
- userSessionClient: {};
13
12
  UserSessionClient: {};
13
+ userSessionClient: {};
14
14
  }>>;
15
15
  }, {
16
16
  paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths.js").LocalAuthCoreReactSessionPaths>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-session-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,GACT,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqD9C"}
1
+ {"version":3,"file":"user-session-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,GACT,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsE9C"}
@@ -4,7 +4,7 @@ import { GetCurrentUserSessionDocument } from '%generatedGraphqlImports';
4
4
  import { AuthSessionContext } from '%localAuthHooksImports';
5
5
  import { ErrorableLoader } from '%reactComponentsImports';
6
6
  import { logError } from '%reactErrorImports';
7
- import { useApolloClient, useQuery } from '@apollo/client';
7
+ import { useApolloClient, useQuery } from '@apollo/client/react';
8
8
  import { useEffect, useMemo, useState } from 'react';
9
9
  export function UserSessionProvider({ children, }) {
10
10
  const [cachedUserId, setCachedUserId] = useState(userSessionClient.getUserId());
@@ -40,6 +40,22 @@ export function UserSessionProvider({ children, }) {
40
40
  });
41
41
  return unsubscribe;
42
42
  }, [cachedUserId, apolloClient]);
43
+ useEffect(() => {
44
+ // Once we have server session data, sync it with the client
45
+ if (sessionQueryData) {
46
+ const serverUserId = sessionQueryData.currentUserSession?.userId;
47
+ const clientUserId = userSessionClient.getUserId();
48
+ // If server says different user (or no user), update the client
49
+ if (serverUserId !== clientUserId) {
50
+ if (serverUserId) {
51
+ userSessionClient.signIn(serverUserId);
52
+ }
53
+ else {
54
+ userSessionClient.signOut();
55
+ }
56
+ }
57
+ }
58
+ }, [sessionQueryData]);
43
59
  if (!session) {
44
60
  return _jsx(ErrorableLoader, { error: sessionError });
45
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user-session-provider.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,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AAS,CAAC,CAAC;gBAC3B,gEAAgE;gBAChE,YAAY,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;IAEjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAC,eAAe,IAAC,KAAK,EAAE,YAAY,GAAI,CAAC;IAClD,CAAC;IAED,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACxC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"user-session-provider.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMrD,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,GACiB;IACzB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,iBAAiB,CAAC,SAAS,EAAE,CAC9B,CAAC;IACF,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,QAAQ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KAAK,YAAY,EAAE,CAAC;gBAClC,IAAI,YAAY,EAAE,CAAC;oBACjB,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;gBACzC,CAAC;qBAAM,CAAC;oBACN,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBAC9B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAC,eAAe,IAAC,KAAK,EAAE,YAAY,GAAI,CAAC;IAClD,CAAC;IAED,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACxC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC"}
@@ -8,7 +8,7 @@ import { GetCurrentUserSessionDocument } from '%generatedGraphqlImports';
8
8
  import { AuthSessionContext } from '%localAuthHooksImports';
9
9
  import { ErrorableLoader } from '%reactComponentsImports';
10
10
  import { logError } from '%reactErrorImports';
11
- import { useApolloClient, useQuery } from '@apollo/client';
11
+ import { useApolloClient, useQuery } from '@apollo/client/react';
12
12
  import { useEffect, useMemo, useState } from 'react';
13
13
 
14
14
  interface UserSessionProviderProps {
@@ -61,6 +61,23 @@ export function UserSessionProvider({
61
61
  return unsubscribe;
62
62
  }, [cachedUserId, apolloClient]);
63
63
 
64
+ useEffect(() => {
65
+ // Once we have server session data, sync it with the client
66
+ if (sessionQueryData) {
67
+ const serverUserId = sessionQueryData.currentUserSession?.userId;
68
+ const clientUserId = userSessionClient.getUserId();
69
+
70
+ // If server says different user (or no user), update the client
71
+ if (serverUserId !== clientUserId) {
72
+ if (serverUserId) {
73
+ userSessionClient.signIn(serverUserId);
74
+ } else {
75
+ userSessionClient.signOut();
76
+ }
77
+ }
78
+ }
79
+ }, [sessionQueryData]);
80
+
64
81
  if (!session) {
65
82
  return <ErrorableLoader error={sessionError} />;
66
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user-session-client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;AAEjE;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAiB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmC;IAC7D,OAAO,CAAC,eAAe,CAAC,CAAa;;IAOrC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B;;OAEG;IACH,OAAO,IAAI,IAAI;IAKf;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAO1D;;OAEG;IACH,OAAO,IAAI,IAAI;IAKf;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,SAAS;IAM/B;;;OAGG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B;;OAEG;IACH,OAAO,CAAC,eAAe;CAMxB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
1
+ {"version":3,"file":"user-session-client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;AAEjE;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAiB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmC;IAC7D,OAAO,CAAC,eAAe,CAAC,CAAa;;IAOrC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ5B;;OAEG;IACH,OAAO,IAAI,IAAI;IAQf;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAO1D;;OAEG;IACH,OAAO,IAAI,IAAI;IAKf;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,SAAS;IAM/B;;;OAGG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B;;OAEG;IACH,OAAO,CAAC,eAAe;CAMxB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -18,15 +18,21 @@ export class UserSessionClient {
18
18
  * @param userId - The user ID to sign in
19
19
  */
20
20
  signIn(userId) {
21
+ const existingUserId = this.getUserId();
21
22
  this.setUserId(userId);
22
- this.notifyCallbacks();
23
+ if (existingUserId !== userId) {
24
+ this.notifyCallbacks();
25
+ }
23
26
  }
24
27
  /**
25
28
  * Sign out the current user
26
29
  */
27
30
  signOut() {
31
+ const existingUserId = this.getUserId();
28
32
  this.setUserId(null);
29
- this.notifyCallbacks();
33
+ if (existingUserId) {
34
+ this.notifyCallbacks();
35
+ }
30
36
  }
31
37
  /**
32
38
  * Subscribe to user ID changes
@@ -1 +1 @@
1
- {"version":3,"file":"user-session-client.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAOzD;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAU,mBAAmB,GAAG,aAAa,CAAC;IAC3C,OAAO,GAAG,mBAAmB,EAAE,CAAC;IAChC,SAAS,GAAG,IAAI,GAAG,EAAwB,CAAC;IACrD,eAAe,CAAc;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IACH,CAAC;IAED;;OAEG;IACK,oBAAoB;QAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3D,IAAI,GAAG,KAAK,iBAAiB,CAAC,mBAAmB,EAAE,CAAC;gBAClD,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,eAAe;QACrB,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAChC,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"user-session-client.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAOzD;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAU,mBAAmB,GAAG,aAAa,CAAC;IAC3C,OAAO,GAAG,mBAAmB,EAAE,CAAC;IAChC,SAAS,GAAG,IAAI,GAAG,EAAwB,CAAC;IACrD,eAAe,CAAc;IAErC;QACE,4DAA4D;QAC5D,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,MAAc;QACnB,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,cAAc,KAAK,MAAM,EAAE,CAAC;YAC9B,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED;;OAEG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AE,EAAE;YAC3D,IAAI,GAAG,KAAK,iBAAiB,CAAC,mBAAmB,EAAE,CAAC;gBAClD,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,eAAe;QACrB,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAChC,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
@@ -27,16 +27,22 @@ export class UserSessionClient {
27
27
  * @param userId - The user ID to sign in
28
28
  */
29
29
  signIn(userId: string): void {
30
+ const existingUserId = this.getUserId();
30
31
  this.setUserId(userId);
31
- this.notifyCallbacks();
32
+ if (existingUserId !== userId) {
33
+ this.notifyCallbacks();
34
+ }
32
35
  }
33
36
 
34
37
  /**
35
38
  * Sign out the current user
36
39
  */
37
40
  signOut(): void {
41
+ const existingUserId = this.getUserId();
38
42
  this.setUserId(null);
39
- this.notifyCallbacks();
43
+ if (existingUserId) {
44
+ this.notifyCallbacks();
45
+ }
40
46
  }
41
47
 
42
48
  /**
@@ -1,15 +1,9 @@
1
1
  import type { def } from '@baseplate-dev/project-builder-lib';
2
2
  import { z } from 'zod';
3
3
  export declare const createLocalAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
4
- initialUserRoles: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>, string[] | undefined, string[] | undefined>;
5
- userAdminRoles: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>, string[] | undefined, string[] | undefined>;
6
- }, "strip", z.ZodTypeAny, {
7
- userAdminRoles?: string[] | undefined;
8
- initialUserRoles?: string[] | undefined;
9
- }, {
10
- userAdminRoles?: string[] | undefined;
11
- initialUserRoles?: string[] | undefined;
12
- }>;
4
+ initialUserRoles: z.ZodOptional<z.ZodType<string[] | undefined, string[] | undefined, z.core.$ZodTypeInternals<string[] | undefined, string[] | undefined>>>;
5
+ userAdminRoles: z.ZodOptional<z.ZodType<string[] | undefined, string[] | undefined, z.core.$ZodTypeInternals<string[] | undefined, string[] | undefined>>>;
6
+ }, z.core.$strip>;
13
7
  export type LocalAuthPluginDefinition = def.InferOutput<typeof createLocalAuthPluginDefinitionSchema>;
14
8
  export type LocalAuthPluginDefinitionInput = def.InferInput<typeof createLocalAuthPluginDefinitionSchema>;
15
9
  //# sourceMappingURL=plugin-definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC;;;;;;;;;EAqBjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,WAAW,CACrD,OAAO,qCAAqC,CAC7C,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,UAAU,CACzD,OAAO,qCAAqC,CAC7C,CAAC"}
1
+ {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC;;;iBAqBjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,WAAW,CACrD,OAAO,qCAAqC,CAC7C,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,UAAU,CACzD,OAAO,qCAAqC,CAC7C,CAAC"}
@@ -34,7 +34,7 @@ export function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, me
34
34
  ...data,
35
35
  };
36
36
  createAndApplyModelMergerResults(draftConfig, PLACEHOLDER_AUTH_MODELS, createAuthModels(authDefinition), definitionContainer);
37
- PluginUtils.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer.pluginStore);
37
+ PluginUtils.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer);
38
38
  }, {
39
39
  successMessage: 'Successfully saved placeholder auth plugin!',
40
40
  onSuccess: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"placeholder-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAIzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,2CAA2C,EAAE,MAAM,gCAAgC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,CACpB,CAAC;QACF,WAAW,CAAC,eAAe,CACzB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,CAAC,WAAW,CAChC,CAAC;IACJ,CAAC,EACD;QACE,cAAc,EAAE,6CAA6C;QAC7D,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,EAAE,CAAC;QACX,CAAC;KACF,CACF,CACF,CAAC;IAEF,8BAA8B,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,eAAK,SAAS,EAAC,+FAA+F,aAC5G,KAAC,cAAc,KAAG,EAClB,cACE,SAAS,EAAC,0EAA0E,EACpF,KAAK,EACH;oBACE,qBAAqB,EAAE,MAAM;iBACP,YAG1B,gBAAM,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,4BAA4B,aAC9D,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,WAAW,cACV,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,iDAEE,EAC1B,KAAC,6BAA6B,+EAEE,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,sBAAsB,IACrB,mBAAmB,EAAE,mBAAmB,GACxC,GACwB,IACT,GACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EACnB,CAAC,cAAc;gCACf,iCAAiC,CAAC,mBAAmB,CAAC,GAExD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"placeholder-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,i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B,YACnD,KAAC,sBAAsB,IACrB,mBAAmB,EAAE,mBAAmB,GACxC,GACwB,IACT,GACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EACnB,CAAC,cAAc;gCACf,iCAAiC,CAAC,mBAAmB,CAAC,GAExD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Useful for creating a test auth implementation.
5
5
  */
6
- export declare const placeholderAuthHooksGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
6
+ export declare const placeholderAuthHooksGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
7
7
  paths: import("@baseplate-dev/sync").GeneratorTask<{
8
8
  placeholderAuthCorePlaceholderAuthHooksPaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths.js").PlaceholderAuthCorePlaceholderAuthHooksPaths>;
9
9
  }, {
@@ -1 +1 @@
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;AAMpE,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
+ {"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,7 +1,7 @@
1
1
  // @ts-nocheck
2
- import { useSession } from '$useSession';
2
+ import { useQuery } from '@apollo/client/react';
3
3
  import { GetUserByIdDocument } from '%generatedGraphqlImports';
4
- import { useQuery } from '@apollo/client';
4
+ import { useSession } from '$useSession';
5
5
  /**
6
6
  * Fetches information about the current user
7
7
  *
@@ -1 +1 @@
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,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ1C;;;;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
+ {"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"}
@@ -2,9 +2,10 @@
2
2
 
3
3
  import type { CurrentUserFragment } from '%generatedGraphqlImports';
4
4
 
5
- import { useSession } from '$useSession';
5
+ import { useQuery } from '@apollo/client/react';
6
+
6
7
  import { GetUserByIdDocument } from '%generatedGraphqlImports';
7
- import { useQuery } from '@apollo/client';
8
+ import { useSession } from '$useSession';
8
9
 
9
10
  interface UseCurrentUserResult {
10
11
  user?: CurrentUserFragment;
@@ -1,4 +1,4 @@
1
- export declare const placeholderAuthModuleGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
1
+ export declare const placeholderAuthModuleGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
2
2
  paths: import("@baseplate-dev/sync").GeneratorTask<{
3
3
  placeholderAuthCorePlaceholderAuthModulePaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths.js").PlaceholderAuthCorePlaceholderAuthModulePaths>;
4
4
  }, {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generator for placeholder React auth
3
3
  */
4
- export declare const placeholderReactAuthGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{}, {
4
+ export declare const placeholderReactAuthGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
5
5
  reactAuth: import("@baseplate-dev/sync").GeneratorTask<{
6
6
  reactAuth: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/react-generators").ReactAuthRoutesProvider>;
7
7
  }, any, any>;
@@ -1,5 +1,5 @@
1
1
  import type { def } from '@baseplate-dev/project-builder-lib';
2
2
  import { z } from 'zod';
3
- export declare const createPlaceholderAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3
+ export declare const createPlaceholderAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{}, z.core.$strip>;
4
4
  export type PlaceholderAuthPluginDefinitionInput = def.InferInput<typeof createPlaceholderAuthPluginDefinitionSchema>;
5
5
  //# sourceMappingURL=plugin-definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAG9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2CAA2C,yIAEvD,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,GAAG,CAAC,UAAU,CAC/D,OAAO,2CAA2C,CACnD,CAAC"}
1
+ {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAG9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2CAA2C,yHAEvD,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,GAAG,CAAC,UAAU,CAC/D,OAAO,2CAA2C,CACnD,CAAC"}
@@ -1,5 +1,5 @@
1
- import { importShared } from './__federation_fn_import-BVpKhyMw.js';
2
- import { c as createAuth0PluginDefinitionSchema, A as AUTH0_MODELS } from './plugin-definition--cfUfY5Z.js';
1
+ import { importShared } from './__federation_fn_import-CVjKjdRb.js';
2
+ import { c as createAuth0PluginDefinitionSchema, A as AUTH0_MODELS } from './plugin-definition-DKygiFuR.js';
3
3
 
4
4
  const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
5
5
  {
@@ -40,4 +40,4 @@ const common = createPlatformPluginExport({
40
40
  });
41
41
 
42
42
  export { common as default };
43
- //# sourceMappingURL=__federation_expose_auth0CoreCommon-xk1Gj1WU.js.map
43
+ //# sourceMappingURL=__federation_expose_auth0CoreCommon-DxPG_Wc0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__federation_expose_auth0CoreCommon-xk1Gj1WU.js","sources":["../../../src/auth0/core/schema/migrations.ts","../../../src/auth0/core/common.ts"],"sourcesContent":["import type { PluginConfigMigration } from '@baseplate-dev/project-builder-lib';\n\nexport const AUTH0_PLUGIN_CONFIG_MIGRATIONS: PluginConfigMigration[] = [\n {\n name: 'move-models',\n version: 1,\n migrate: (config) => {\n const typedConfig = config as { userAccountModelRef: string };\n return {\n updatedConfig: {\n ...typedConfig,\n userAccountModelRef: undefined,\n modelRefs: {\n user: typedConfig.userAccountModelRef,\n },\n },\n };\n },\n },\n];\n","import {\n authModelConfigSpec,\n createPlatformPluginExport,\n ModelUtils,\n pluginConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AUTH0_MODELS } from '../constants/model-names.js';\nimport { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';\nimport { createAuth0PluginDefinitionSchema } 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 authModelConfig: authModelConfigSpec,\n },\n initialize: ({ config }, { pluginKey }) => {\n config.registerSchemaCreator(pluginKey, createAuth0PluginDefinitionSchema);\n config.registerMigrations(pluginKey, AUTH0_PLUGIN_CONFIG_MIGRATIONS);\n return {\n authModelConfig: {\n getUserModel: (definition) =>\n ModelUtils.byNameOrThrow(definition, AUTH0_MODELS.user),\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAEO,MAAM,8BAAA,GAA0D;AAAA,EACrE;AAAA,IACE,IAAA,EAAM,aAAA;AAAA,IACN,OAAA,EAAS,CAAA;AAAA,IACT,OAAA,EAAS,CAAC,MAAA,KAAW;AACnB,MAAA,MAAM,WAAA,GAAc,MAAA;AACpB,MAAA,OAAO;AAAA,QACL,aAAA,EAAe;AAAA,UACb,GAAG,WAAA;AAAA,UACH,mBAAA,EAAqB,MAAA;AAAA,UACrB,SAAA,EAAW;AAAA,YACT,MAAM,WAAA,CAAY;AAAA;AACpB;AACF,OACF;AAAA,IACF;AAAA;AAEJ,CAAA;;ACnBA,MAAA,CAAA,mBAAA,CAAA,0BAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAcA,eAAe,0BAAA,CAA2B;AAAA,EACxC,YAAA,EAAc;AAAA,IACZ,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,OAAA,EAAS;AAAA,IACP,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,YAAY,CAAC,EAAE,QAAO,EAAG,EAAE,WAAU,KAAM;AACzC,IAAA,MAAA,CAAO,qBAAA,CAAsB,WAAW,iCAAiC,CAAA;AACzE,IAAA,MAAA,CAAO,kBAAA,CAAmB,WAAW,8BAA8B,CAAA;AACnE,IAAA,OAAO;AAAA,MACL,eAAA,EAAiB;AAAA,QACf,cAAc,CAAC,UAAA,KACb,WAAW,aAAA,CAAc,UAAA,EAAY,aAAa,IAAI;AAAA;AAC1D,KACF;AAAA,EACF;AACF,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"__federation_expose_auth0CoreCommon-DxPG_Wc0.js","sources":["../../../src/auth0/core/schema/migrations.ts","../../../src/auth0/core/common.ts"],"sourcesContent":["import type { PluginConfigMigration } from '@baseplate-dev/project-builder-lib';\n\nexport const AUTH0_PLUGIN_CONFIG_MIGRATIONS: PluginConfigMigration[] = [\n {\n name: 'move-models',\n version: 1,\n migrate: (config) => {\n const typedConfig = config as { userAccountModelRef: string };\n return {\n updatedConfig: {\n ...typedConfig,\n userAccountModelRef: undefined,\n modelRefs: {\n user: typedConfig.userAccountModelRef,\n },\n },\n };\n },\n },\n];\n","import {\n authModelConfigSpec,\n createPlatformPluginExport,\n ModelUtils,\n pluginConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AUTH0_MODELS } from '../constants/model-names.js';\nimport { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';\nimport { createAuth0PluginDefinitionSchema } 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 authModelConfig: authModelConfigSpec,\n },\n initialize: ({ config }, { pluginKey }) => {\n config.registerSchemaCreator(pluginKey, createAuth0PluginDefinitionSchema);\n config.registerMigrations(pluginKey, AUTH0_PLUGIN_CONFIG_MIGRATIONS);\n return {\n authModelConfig: {\n getUserModel: (definition) =>\n ModelUtils.byNameOrThrow(definition, AUTH0_MODELS.user),\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAEO,MAAM,8BAAA,GAA0D;AAAA,EACrE;AAAA,IACE,IAAA,EAAM,aAAA;AAAA,IACN,OAAA,EAAS,CAAA;AAAA,IACT,OAAA,EAAS,CAAC,MAAA,KAAW;AACnB,MAAA,MAAM,WAAA,GAAc,MAAA;AACpB,MAAA,OAAO;AAAA,QACL,aAAA,EAAe;AAAA,UACb,GAAG,WAAA;AAAA,UACH,mBAAA,EAAqB,MAAA;AAAA,UACrB,SAAA,EAAW;AAAA,YACT,MAAM,WAAA,CAAY;AAAA;AACpB;AACF,OACF;AAAA,IACF;AAAA;AAEJ,CAAA;;ACnBA,MAAA,CAAA,mBAAA,CAAA,0BAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAcA,eAAe,0BAAA,CAA2B;AAAA,EACxC,YAAA,EAAc;AAAA,IACZ,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,OAAA,EAAS;AAAA,IACP,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,YAAY,CAAC,EAAE,QAAO,EAAG,EAAE,WAAU,KAAM;AACzC,IAAA,MAAA,CAAO,qBAAA,CAAsB,WAAW,iCAAiC,CAAA;AACzE,IAAA,MAAA,CAAO,kBAAA,CAAmB,WAAW,8BAA8B,CAAA;AACnE,IAAA,OAAO;AAAA,MACL,eAAA,EAAiB;AAAA,QACf,cAAc,CAAC,UAAA,KACb,WAAW,aAAA,CAAc,UAAA,EAAY,aAAa,IAAI;AAAA;AAC1D,KACF;AAAA,EACF;AACF,CAAC,CAAA;;;;"}
@@ -1,8 +1,8 @@
1
- import { importShared } from './__federation_fn_import-BVpKhyMw.js';
1
+ import { importShared } from './__federation_fn_import-CVjKjdRb.js';
2
2
  import { j as jsxRuntimeExports } from './jsx-runtime-XI9uIe3W.js';
3
- import { s, A as AuthConfigTabs } from './styles-N05E1ZaS.js';
4
- import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-CHOjVGaq.js';
5
- import { A as AUTH0_MODELS, c as createAuth0PluginDefinitionSchema } from './plugin-definition--cfUfY5Z.js';
3
+ import { a, A as AuthConfigTabs } from './styles-CfTjrsB-.js';
4
+ import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-DqZ2Eg7c.js';
5
+ import { A as AUTH0_MODELS, c as createAuth0PluginDefinitionSchema } from './plugin-definition-DKygiFuR.js';
6
6
 
7
7
  function createAuth0Models({
8
8
  authFeatureRef
@@ -67,7 +67,7 @@ function Auth0DefinitionEditor({
67
67
  return {};
68
68
  }, [pluginMetadata?.config]);
69
69
  const form = useResettableForm({
70
- resolver: s(auth0PluginDefinitionSchema),
70
+ resolver: a(auth0PluginDefinitionSchema),
71
71
  defaultValues
72
72
  });
73
73
  const { control, reset, handleSubmit } = form;
@@ -96,7 +96,7 @@ function Auth0DefinitionEditor({
96
96
  draftConfig,
97
97
  metadata,
98
98
  updatedData,
99
- definitionContainer.pluginStore
99
+ definitionContainer
100
100
  );
101
101
  },
102
102
  {
@@ -156,4 +156,4 @@ const web = createPlatformPluginExport({
156
156
  });
157
157
 
158
158
  export { web as default };
159
- //# sourceMappingURL=__federation_expose_auth0CoreWeb-CAiUkJwE.js.map
159
+ //# sourceMappingURL=__federation_expose_auth0CoreWeb-B9jV1EyN.js.map