@baseplate-dev/plugin-auth 0.1.3 → 1.0.1

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 (233) hide show
  1. package/dist/auth/core/node.d.ts.map +1 -1
  2. package/dist/auth/core/node.js +6 -3
  3. package/dist/auth/core/node.js.map +1 -1
  4. package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts +13 -1
  5. package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts.map +1 -1
  6. package/dist/auth/generators/fastify/auth-module/auth-module.generator.js +20 -8
  7. package/dist/auth/generators/fastify/auth-module/auth-module.generator.js.map +1 -1
  8. package/dist/auth/generators/fastify/auth-module/generated/index.d.ts +88 -0
  9. package/dist/auth/generators/fastify/auth-module/generated/index.d.ts.map +1 -0
  10. package/dist/auth/generators/fastify/auth-module/generated/index.js +9 -0
  11. package/dist/auth/generators/fastify/auth-module/generated/index.js.map +1 -0
  12. package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts +16 -0
  13. package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts.map +1 -0
  14. package/dist/auth/generators/fastify/auth-module/generated/template-paths.js +26 -0
  15. package/dist/auth/generators/fastify/auth-module/generated/template-paths.js.map +1 -0
  16. package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts +10 -0
  17. package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts.map +1 -0
  18. package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js +23 -0
  19. package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js.map +1 -0
  20. package/dist/auth/generators/fastify/auth-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +26 -41
  21. package/dist/auth/generators/fastify/auth-module/generated/typed-templates.d.ts.map +1 -0
  22. package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js +68 -0
  23. package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js.map +1 -0
  24. package/dist/auth/generators/fastify/auth-module/index.d.ts +2 -0
  25. package/dist/auth/generators/fastify/auth-module/index.d.ts.map +1 -0
  26. package/dist/auth/generators/fastify/auth-module/index.js +2 -0
  27. package/dist/auth/generators/fastify/auth-module/index.js.map +1 -0
  28. package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/cookie-signer.ts +6 -0
  29. package/dist/auth/generators/fastify/index.d.ts +1 -1
  30. package/dist/auth/generators/fastify/index.d.ts.map +1 -1
  31. package/dist/auth/generators/fastify/index.js +1 -1
  32. package/dist/auth/generators/fastify/index.js.map +1 -1
  33. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +14 -6
  34. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +1 -1
  35. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +11 -16
  36. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
  37. package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +62 -0
  38. package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +1 -0
  39. package/dist/auth0/generators/fastify/auth0-module/generated/index.js +9 -0
  40. package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +1 -0
  41. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +13 -0
  42. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +1 -0
  43. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +23 -0
  44. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +1 -0
  45. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +10 -0
  46. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +1 -0
  47. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +23 -0
  48. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +1 -0
  49. package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +2 -2
  50. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +1 -0
  51. package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.js → typed-templates.js} +11 -8
  52. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +1 -0
  53. package/dist/auth0/generators/fastify/auth0-module/index.d.ts +2 -0
  54. package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +1 -0
  55. package/dist/auth0/generators/fastify/auth0-module/index.js +2 -0
  56. package/dist/auth0/generators/fastify/auth0-module/index.js.map +1 -0
  57. package/dist/auth0/generators/fastify/index.d.ts +1 -1
  58. package/dist/auth0/generators/fastify/index.d.ts.map +1 -1
  59. package/dist/auth0/generators/fastify/index.js +1 -1
  60. package/dist/auth0/generators/fastify/index.js.map +1 -1
  61. package/dist/auth0/generators/react/auth0-apollo/index.d.ts +2 -0
  62. package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +1 -0
  63. package/dist/auth0/generators/react/auth0-apollo/index.js +2 -0
  64. package/dist/auth0/generators/react/auth0-apollo/index.js.map +1 -0
  65. package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts +101 -8
  66. package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts.map +1 -1
  67. package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js +10 -11
  68. package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js.map +1 -1
  69. package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts +290 -0
  70. package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts.map +1 -0
  71. package/dist/auth0/generators/react/auth0-callback/generated/index.js +7 -0
  72. package/dist/auth0/generators/react/auth0-callback/generated/index.js.map +1 -0
  73. package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts +13 -0
  74. package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts.map +1 -0
  75. package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js +23 -0
  76. package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js.map +1 -0
  77. package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts +280 -0
  78. package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts.map +1 -0
  79. package/dist/auth0/generators/react/auth0-callback/generated/{ts-templates.js → typed-templates.js} +11 -9
  80. package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js.map +1 -0
  81. package/dist/auth0/generators/react/auth0-callback/index.d.ts +2 -0
  82. package/dist/auth0/generators/react/auth0-callback/index.d.ts.map +1 -0
  83. package/dist/auth0/generators/react/auth0-callback/index.js +2 -0
  84. package/dist/auth0/generators/react/auth0-callback/index.js.map +1 -0
  85. package/dist/auth0/generators/react/auth0-callback/templates/{auth0-callback.page.tsx → routes/auth0-callback.page.tsx} +3 -3
  86. package/dist/auth0/generators/react/auth0-callback/templates/{signup.page.tsx → routes/signup.page.tsx} +3 -3
  87. package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts +106 -12
  88. package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts.map +1 -1
  89. package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js +12 -16
  90. package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js.map +1 -1
  91. package/dist/auth0/generators/react/auth0-components/generated/index.d.ts +151 -0
  92. package/dist/auth0/generators/react/auth0-components/generated/index.d.ts.map +1 -0
  93. package/dist/auth0/generators/react/auth0-components/generated/index.js +9 -0
  94. package/dist/auth0/generators/react/auth0-components/generated/index.js.map +1 -0
  95. package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts +12 -0
  96. package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts.map +1 -0
  97. package/dist/auth0/generators/react/auth0-components/generated/template-paths.js +22 -0
  98. package/dist/auth0/generators/react/auth0-components/generated/template-paths.js.map +1 -0
  99. package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts +10 -0
  100. package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts.map +1 -0
  101. package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js +25 -0
  102. package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js.map +1 -0
  103. package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts +132 -0
  104. package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts.map +1 -0
  105. package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js +17 -0
  106. package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js.map +1 -0
  107. package/dist/auth0/generators/react/auth0-components/index.d.ts +2 -0
  108. package/dist/auth0/generators/react/auth0-components/index.d.ts.map +1 -0
  109. package/dist/auth0/generators/react/auth0-components/index.js +2 -0
  110. package/dist/auth0/generators/react/auth0-components/index.js.map +1 -0
  111. package/dist/auth0/generators/react/auth0-components/templates/{RequireAuth.tsx → src/components/require-auth/require-auth.tsx} +4 -4
  112. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +10 -2
  113. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
  114. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +13 -24
  115. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
  116. package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +51 -0
  117. package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -0
  118. package/dist/auth0/generators/react/auth0-hooks/generated/index.js +9 -0
  119. package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +1 -0
  120. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +16 -0
  121. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +1 -0
  122. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js +26 -0
  123. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +1 -0
  124. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts +16 -0
  125. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +1 -0
  126. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js +27 -0
  127. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +1 -0
  128. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +44 -0
  129. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -0
  130. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +67 -0
  131. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -0
  132. package/dist/auth0/generators/react/auth0-hooks/index.d.ts +2 -0
  133. package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +1 -0
  134. package/dist/auth0/generators/react/auth0-hooks/index.js +2 -0
  135. package/dist/auth0/generators/react/auth0-hooks/index.js.map +1 -0
  136. package/dist/auth0/generators/react/index.d.ts +5 -5
  137. package/dist/auth0/generators/react/index.d.ts.map +1 -1
  138. package/dist/auth0/generators/react/index.js +5 -5
  139. package/dist/auth0/generators/react/index.js.map +1 -1
  140. package/dist/auth0/generators/react/react-auth0/index.d.ts +2 -0
  141. package/dist/auth0/generators/react/react-auth0/index.d.ts.map +1 -0
  142. package/dist/auth0/generators/react/react-auth0/index.js +2 -0
  143. package/dist/auth0/generators/react/react-auth0/index.js.map +1 -0
  144. package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js → __federation_expose_auth0CoreCommon-BE50qa2_.js} +3 -3
  145. package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js.map → __federation_expose_auth0CoreCommon-BE50qa2_.js.map} +1 -1
  146. package/dist/web/assets/{__federation_expose_auth0CoreWeb-BlCwYpTq.js → __federation_expose_auth0CoreWeb-AdDVCP7O.js} +7 -9
  147. package/dist/web/assets/__federation_expose_auth0CoreWeb-AdDVCP7O.js.map +1 -0
  148. package/dist/web/assets/__federation_expose_authCoreCommon-DKyLSPCa.js +36 -0
  149. package/dist/web/assets/__federation_expose_authCoreCommon-DKyLSPCa.js.map +1 -0
  150. package/dist/web/assets/__federation_expose_authCoreWeb-CfCyOvUk.js +442 -0
  151. package/dist/web/assets/__federation_expose_authCoreWeb-CfCyOvUk.js.map +1 -0
  152. package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js → __federation_fn_import-CxP86CUK.js} +2 -2
  153. package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js.map → __federation_fn_import-CxP86CUK.js.map} +1 -1
  154. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXHJHUXP.js → web-BFCvL5ku.js} +5 -5
  155. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BFCvL5ku.js.map +1 -0
  156. package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-GtzVuDsM.js → project-builder-lib-BAwM_-SS.js} +150 -159
  157. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BAwM_-SS.js.map +1 -0
  158. package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-ChoqtPkg.js → ui-components-C3uzqK6u.js} +18156 -10210
  159. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-C3uzqK6u.js.map +1 -0
  160. package/dist/web/assets/{index-BxDOOHD-.js → index-scyXBD_d.js} +10 -4
  161. package/dist/web/assets/{index-BxDOOHD-.js.map → index-scyXBD_d.js.map} +1 -1
  162. package/dist/web/assets/{index.esm-BZEyAv4m.js → index.esm-DIgRm3lq.js} +3 -3
  163. package/dist/web/assets/{index.esm-BZEyAv4m.js.map → index.esm-DIgRm3lq.js.map} +1 -1
  164. package/dist/web/assets/{model-merger-CdV-7CWE.js → model-merger-gxuB007n.js} +33 -23
  165. package/dist/web/assets/model-merger-gxuB007n.js.map +1 -0
  166. package/dist/web/assets/plugin-definition-Bgi_XH0-.js +22 -0
  167. package/dist/web/assets/plugin-definition-Bgi_XH0-.js.map +1 -0
  168. package/dist/web/assets/plugin-definition-EtIvYJxn.js +34 -0
  169. package/dist/web/assets/plugin-definition-EtIvYJxn.js.map +1 -0
  170. package/dist/web/assets/{react-BfiX28GO.js → react-CAuz_DuX.js} +2 -2
  171. package/dist/web/assets/{react-BfiX28GO.js.map → react-CAuz_DuX.js.map} +1 -1
  172. package/dist/web/assets/remoteEntry.js +8 -2
  173. package/dist/web/assets/remoteEntry.js.map +1 -1
  174. package/dist/web/assets/{plugin-definition-C9Q-BrBQ.js → schema-BAfRBwYE.js} +16 -27
  175. package/dist/web/assets/schema-BAfRBwYE.js.map +1 -0
  176. package/dist/web/assets/styles-BpKIyKWd.js +8 -0
  177. package/dist/web/assets/styles-BpKIyKWd.js.map +1 -0
  178. package/manifest.json +1 -1
  179. package/package.json +18 -10
  180. package/dist/auth/generators/fastify/auth-module/generated/ts-templates.d.ts.map +0 -1
  181. package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js +0 -94
  182. package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js.map +0 -1
  183. package/dist/auth/generators/fastify/auth-module/templates/management.ts +0 -22
  184. package/dist/auth/generators/fastify/auth-module/templates/schema/user-session-payload.object-type.ts +0 -23
  185. package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.mutations.ts +0 -22
  186. package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.queries.ts +0 -20
  187. package/dist/auth/generators/fastify/auth-module/templates/user-session.service.ts +0 -101
  188. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts +0 -3
  189. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts.map +0 -1
  190. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js +0 -12
  191. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js.map +0 -1
  192. package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.d.ts.map +0 -1
  193. package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.js.map +0 -1
  194. package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts +0 -106
  195. package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts.map +0 -1
  196. package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.js.map +0 -1
  197. package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts +0 -3
  198. package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts.map +0 -1
  199. package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js +0 -12
  200. package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js.map +0 -1
  201. package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts +0 -45
  202. package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts.map +0 -1
  203. package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js +0 -13
  204. package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js.map +0 -1
  205. package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts +0 -8
  206. package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts.map +0 -1
  207. package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js +0 -12
  208. package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js.map +0 -1
  209. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts +0 -3
  210. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts.map +0 -1
  211. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js +0 -16
  212. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js.map +0 -1
  213. package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts +0 -33
  214. package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts.map +0 -1
  215. package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js +0 -50
  216. package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js.map +0 -1
  217. package/dist/web/assets/__federation_expose_auth0CoreWeb-BlCwYpTq.js.map +0 -1
  218. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXHJHUXP.js.map +0 -1
  219. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-GtzVuDsM.js.map +0 -1
  220. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ChoqtPkg.js.map +0 -1
  221. package/dist/web/assets/model-merger-CdV-7CWE.js.map +0 -1
  222. package/dist/web/assets/plugin-definition-C9Q-BrBQ.js.map +0 -1
  223. /package/dist/auth/generators/fastify/auth-module/templates/{user-session.constants.ts → module/constants/user-session.constants.ts} +0 -0
  224. /package/dist/auth/generators/fastify/auth-module/templates/{services → module/services}/user-session.service.ts +0 -0
  225. /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/session-cookie.ts +0 -0
  226. /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/verify-request-origin.ts +0 -0
  227. /package/dist/auth0/generators/fastify/auth0-module/templates/{management.ts → module/services/management.ts} +0 -0
  228. /package/dist/auth0/generators/fastify/auth0-module/templates/{user-session.service.ts → module/services/user-session.service.ts} +0 -0
  229. /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.gql → src/hooks/useCurrentUser.gql} +0 -0
  230. /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.ts → src/hooks/useCurrentUser.ts} +0 -0
  231. /package/dist/auth0/generators/react/auth0-hooks/templates/{useLogOut.ts → src/hooks/useLogOut.ts} +0 -0
  232. /package/dist/auth0/generators/react/auth0-hooks/templates/{useRequiredUserId.ts → src/hooks/useRequiredUserId.ts} +0 -0
  233. /package/dist/auth0/generators/react/auth0-hooks/templates/{useSession.ts → src/hooks/useSession.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ import { AUTH0_AUTH0_HOOKS_PATHS } from './template-paths.js';
2
+ import { AUTH0_AUTH0_HOOKS_IMPORTS } from './ts-import-providers.js';
3
+ import { AUTH0_AUTH0_HOOKS_TEMPLATES } from './typed-templates.js';
4
+ export const AUTH0_AUTH0_HOOKS_GENERATED = {
5
+ imports: AUTH0_AUTH0_HOOKS_IMPORTS,
6
+ paths: AUTH0_AUTH0_HOOKS_PATHS,
7
+ templates: AUTH0_AUTH0_HOOKS_TEMPLATES,
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,2BAA2B;CACvC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface Auth0Auth0HooksPaths {
2
+ useCurrentUserGql: string;
3
+ useCurrentUser: string;
4
+ useLogOut: string;
5
+ useRequiredUserId: string;
6
+ useSession: string;
7
+ }
8
+ export declare const AUTH0_AUTH0_HOOKS_PATHS: {
9
+ provider: import("@baseplate-dev/sync").ProviderType<Auth0Auth0HooksPaths>;
10
+ task: import("@baseplate-dev/sync").GeneratorTask<{
11
+ auth0Auth0HooksPaths: import("@baseplate-dev/sync").ProviderExport<Auth0Auth0HooksPaths>;
12
+ }, {
13
+ packageInfo: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").PackageInfoProvider>;
14
+ }, undefined>;
15
+ };
16
+ //# sourceMappingURL=template-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AA0BD,eAAO,MAAM,uBAAuB;;;;;;;CAGnC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { packageInfoProvider } from '@baseplate-dev/core-generators';
2
+ import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
3
+ const auth0Auth0HooksPaths = createProviderType('auth0-auth0-hooks-paths');
4
+ const auth0Auth0HooksPathsTask = createGeneratorTask({
5
+ dependencies: { packageInfo: packageInfoProvider },
6
+ exports: { auth0Auth0HooksPaths: auth0Auth0HooksPaths.export() },
7
+ run({ packageInfo }) {
8
+ const srcRoot = packageInfo.getPackageSrcPath();
9
+ return {
10
+ providers: {
11
+ auth0Auth0HooksPaths: {
12
+ useCurrentUser: `${srcRoot}/hooks/useCurrentUser.ts`,
13
+ useCurrentUserGql: `${srcRoot}/hooks/useCurrentUser.gql`,
14
+ useLogOut: `${srcRoot}/hooks/useLogOut.ts`,
15
+ useRequiredUserId: `${srcRoot}/hooks/useRequiredUserId.ts`,
16
+ useSession: `${srcRoot}/hooks/useSession.ts`,
17
+ },
18
+ },
19
+ };
20
+ },
21
+ });
22
+ export const AUTH0_AUTH0_HOOKS_PATHS = {
23
+ provider: auth0Auth0HooksPaths,
24
+ task: auth0Auth0HooksPathsTask,
25
+ };
26
+ //# sourceMappingURL=template-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/template-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAU9E,MAAM,oBAAoB,GAAG,kBAAkB,CAC7C,yBAAyB,CAC1B,CAAC;AAEF,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;IACnD,YAAY,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE;IAClD,OAAO,EAAE,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,EAAE,EAAE;IAChE,GAAG,CAAC,EAAE,WAAW,EAAE;QACjB,MAAM,OAAO,GAAG,WAAW,CAAC,iBAAiB,EAAE,CAAC;QAEhD,OAAO;YACL,SAAS,EAAE;gBACT,oBAAoB,EAAE;oBACpB,cAAc,EAAE,GAAG,OAAO,0BAA0B;oBACpD,iBAAiB,EAAE,GAAG,OAAO,2BAA2B;oBACxD,SAAS,EAAE,GAAG,OAAO,qBAAqB;oBAC1C,iBAAiB,EAAE,GAAG,OAAO,6BAA6B;oBAC1D,UAAU,EAAE,GAAG,OAAO,sBAAsB;iBAC7C;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ,EAAE,oBAAoB;IAC9B,IAAI,EAAE,wBAAwB;CAC/B,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const AUTH0_AUTH0_HOOKS_IMPORTS: {
2
+ task: import("@baseplate-dev/sync").GeneratorTask<{
3
+ authHooksImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
4
+ SessionData: {
5
+ isTypeOnly: true;
6
+ };
7
+ useCurrentUser: {};
8
+ useLogOut: {};
9
+ useRequiredUserId: {};
10
+ useSession: {};
11
+ }>>;
12
+ }, {
13
+ paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").Auth0Auth0HooksPaths>;
14
+ }, undefined>;
15
+ };
16
+ //# sourceMappingURL=ts-import-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/ts-import-providers.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;CAErC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { createTsImportMap, packageScope, } from '@baseplate-dev/core-generators';
2
+ import { authHooksImportsProvider, authHooksImportsSchema, } from '@baseplate-dev/react-generators';
3
+ import { createGeneratorTask } from '@baseplate-dev/sync';
4
+ import { AUTH0_AUTH0_HOOKS_PATHS } from './template-paths.js';
5
+ const auth0Auth0HooksImportsTask = createGeneratorTask({
6
+ dependencies: {
7
+ paths: AUTH0_AUTH0_HOOKS_PATHS.provider,
8
+ },
9
+ exports: { authHooksImports: authHooksImportsProvider.export(packageScope) },
10
+ run({ paths }) {
11
+ return {
12
+ providers: {
13
+ authHooksImports: createTsImportMap(authHooksImportsSchema, {
14
+ SessionData: paths.useSession,
15
+ useCurrentUser: paths.useCurrentUser,
16
+ useLogOut: paths.useLogOut,
17
+ useRequiredUserId: paths.useRequiredUserId,
18
+ useSession: paths.useSession,
19
+ }),
20
+ },
21
+ };
22
+ },
23
+ });
24
+ export const AUTH0_AUTH0_HOOKS_IMPORTS = {
25
+ task: auth0Auth0HooksImportsTask,
26
+ };
27
+ //# sourceMappingURL=ts-import-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;IACrD,YAAY,EAAE;QACZ,KAAK,EAAE,uBAAuB,CAAC,QAAQ;KACxC;IACD,OAAO,EAAE,EAAE,gBAAgB,EAAE,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;IAC5E,GAAG,CAAC,EAAE,KAAK,EAAE;QACX,OAAO;YACL,SAAS,EAAE;gBACT,gBAAgB,EAAE,iBAAiB,CAAC,sBAAsB,EAAE;oBAC1D,WAAW,EAAE,KAAK,CAAC,UAAU;oBAC7B,cAAc,EAAE,KAAK,CAAC,cAAc;oBACpC,SAAS,EAAE,KAAK,CAAC,SAAS;oBAC1B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;oBAC1C,UAAU,EAAE,KAAK,CAAC,UAAU;iBAC7B,CAAC;aACH;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,0BAA0B;CACjC,CAAC"}
@@ -0,0 +1,44 @@
1
+ export declare const hooksGroup: {
2
+ useCurrentUser: import("@baseplate-dev/core-generators").TsTemplateFile<{
3
+ TPL_USER: {};
4
+ }, {
5
+ generatedGraphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
6
+ '*': {};
7
+ }>>;
8
+ }>;
9
+ useLogOut: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
10
+ reactErrorImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
11
+ formatError: {};
12
+ logAndFormatError: {};
13
+ logError: {};
14
+ }>>;
15
+ }>;
16
+ useRequiredUserId: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
17
+ useSession: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
18
+ };
19
+ export declare const AUTH0_AUTH0_HOOKS_TEMPLATES: {
20
+ useCurrentUserGql: import("@baseplate-dev/core-generators").TextTemplateFile<{
21
+ TPL_USER_QUERY_NAME: {
22
+ description: string;
23
+ };
24
+ }>;
25
+ hooksGroup: {
26
+ useCurrentUser: import("@baseplate-dev/core-generators").TsTemplateFile<{
27
+ TPL_USER: {};
28
+ }, {
29
+ generatedGraphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
30
+ '*': {};
31
+ }>>;
32
+ }>;
33
+ useLogOut: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
34
+ reactErrorImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
35
+ formatError: {};
36
+ logAndFormatError: {};
37
+ logError: {};
38
+ }>>;
39
+ }>;
40
+ useRequiredUserId: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
41
+ useSession: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
42
+ };
43
+ };
44
+ //# sourceMappingURL=typed-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAKtB,CAAC;AAgBF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;CAAoC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { createTextTemplateFile, createTsTemplateFile, } from '@baseplate-dev/core-generators';
2
+ import { generatedGraphqlImportsProvider, reactErrorImportsProvider, } from '@baseplate-dev/react-generators';
3
+ import path from 'node:path';
4
+ const useCurrentUser = createTsTemplateFile({
5
+ fileOptions: { kind: 'singleton' },
6
+ group: 'hooks',
7
+ importMapProviders: {
8
+ generatedGraphqlImports: generatedGraphqlImportsProvider,
9
+ },
10
+ name: 'use-current-user',
11
+ projectExports: { useCurrentUser: {} },
12
+ source: {
13
+ path: path.join(import.meta.dirname, '../templates/src/hooks/useCurrentUser.ts'),
14
+ },
15
+ variables: { TPL_USER: {} },
16
+ });
17
+ const useLogOut = createTsTemplateFile({
18
+ fileOptions: { kind: 'singleton' },
19
+ group: 'hooks',
20
+ importMapProviders: { reactErrorImports: reactErrorImportsProvider },
21
+ name: 'use-log-out',
22
+ projectExports: { useLogOut: {} },
23
+ source: {
24
+ path: path.join(import.meta.dirname, '../templates/src/hooks/useLogOut.ts'),
25
+ },
26
+ variables: {},
27
+ });
28
+ const useRequiredUserId = createTsTemplateFile({
29
+ fileOptions: { kind: 'singleton' },
30
+ group: 'hooks',
31
+ importMapProviders: {},
32
+ name: 'use-required-user-id',
33
+ projectExports: { useRequiredUserId: {} },
34
+ source: {
35
+ path: path.join(import.meta.dirname, '../templates/src/hooks/useRequiredUserId.ts'),
36
+ },
37
+ variables: {},
38
+ });
39
+ const useSession = createTsTemplateFile({
40
+ fileOptions: { kind: 'singleton' },
41
+ group: 'hooks',
42
+ importMapProviders: {},
43
+ name: 'use-session',
44
+ projectExports: { SessionData: { isTypeOnly: true }, useSession: {} },
45
+ source: {
46
+ path: path.join(import.meta.dirname, '../templates/src/hooks/useSession.ts'),
47
+ },
48
+ variables: {},
49
+ });
50
+ export const hooksGroup = {
51
+ useCurrentUser,
52
+ useLogOut,
53
+ useRequiredUserId,
54
+ useSession,
55
+ };
56
+ const useCurrentUserGql = createTextTemplateFile({
57
+ fileOptions: { kind: 'singleton' },
58
+ name: 'use-current-user-gql',
59
+ source: {
60
+ path: path.join(import.meta.dirname, '../templates/src/hooks/useCurrentUser.gql'),
61
+ },
62
+ variables: {
63
+ TPL_USER_QUERY_NAME: { description: 'The name of the user query' },
64
+ },
65
+ });
66
+ export const AUTH0_AUTH0_HOOKS_TEMPLATES = { useCurrentUserGql, hooksGroup };
67
+ //# sourceMappingURL=typed-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC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AAM,UAAU,GAAG,oBAAoB,CAAC;IACtC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACrE,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,sCAAsC,CACvC;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,cAAc;IACd,SAAS;IACT,iBAAiB;IACjB,UAAU;CACX,CAAC;AAEF,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;IAC/C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,2CAA2C,CAC5C;KACF;IACD,SAAS,EAAE;QACT,mBAAmB,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE;KACnE;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './auth0-hooks.generator.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './auth0-hooks.generator.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1,6 +1,6 @@
1
- export * from './auth0-apollo/auth0-apollo.generator.js';
2
- export * from './auth0-callback/auth0-callback.generator.js';
3
- export * from './auth0-components/auth0-components.generator.js';
4
- export * from './auth0-hooks/auth0-hooks.generator.js';
5
- export * from './react-auth0/react-auth0.generator.js';
1
+ export * from './auth0-apollo/index.js';
2
+ export * from './auth0-callback/index.js';
3
+ export * from './auth0-components/index.js';
4
+ export * from './auth0-hooks/index.js';
5
+ export * from './react-auth0/index.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth0/generators/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth0/generators/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
@@ -1,6 +1,6 @@
1
- export * from './auth0-apollo/auth0-apollo.generator.js';
2
- export * from './auth0-callback/auth0-callback.generator.js';
3
- export * from './auth0-components/auth0-components.generator.js';
4
- export * from './auth0-hooks/auth0-hooks.generator.js';
5
- export * from './react-auth0/react-auth0.generator.js';
1
+ export * from './auth0-apollo/index.js';
2
+ export * from './auth0-callback/index.js';
3
+ export * from './auth0-components/index.js';
4
+ export * from './auth0-hooks/index.js';
5
+ export * from './react-auth0/index.js';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth0/generators/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth0/generators/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './react-auth0.generator.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/react-auth0/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './react-auth0.generator.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/react-auth0/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1,5 +1,5 @@
1
- import { importShared } from './__federation_fn_import-dzKjrTzS.js';
2
- import { b as auth0PluginDefinitionSchema } from './plugin-definition-C9Q-BrBQ.js';
1
+ import { importShared } from './__federation_fn_import-CxP86CUK.js';
2
+ import { a as auth0PluginDefinitionSchema } from './plugin-definition-Bgi_XH0-.js';
3
3
 
4
4
  const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
5
5
  {
@@ -51,4 +51,4 @@ const common = createPlatformPluginExport({
51
51
  });
52
52
 
53
53
  export { common as default };
54
- //# sourceMappingURL=__federation_expose_auth0CoreCommon-DCwCR5dZ.js.map
54
+ //# sourceMappingURL=__federation_expose_auth0CoreCommon-BE50qa2_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__federation_expose_auth0CoreCommon-DCwCR5dZ.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 ...typedConfig,\n userAccountModelRef: undefined,\n modelRefs: {\n user: typedConfig.userAccountModelRef,\n },\n };\n },\n },\n];\n","import {\n authConfigSpec,\n createPlatformPluginExport,\n pluginConfigSpec,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\n\nimport type { Auth0PluginDefinition } from './schema/plugin-definition.js';\n\nimport { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';\nimport { auth0PluginDefinitionSchema } from './schema/plugin-definition.js';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchema(pluginId, auth0PluginDefinitionSchema);\n config.registerMigrations(pluginId, AUTH0_PLUGIN_CONFIG_MIGRATIONS);\n return {\n authConfig: {\n getUserModel: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as Auth0PluginDefinition;\n return pluginConfig.modelRefs.user;\n },\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as Auth0PluginDefinition;\n return pluginConfig.roles;\n },\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAEO,MAAM,8BAA0D,GAAA;AAAA,EACrE;AAAA,IACE,IAAM,EAAA,aAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,IACT,OAAA,EAAS,CAAC,MAAW,KAAA;AACnB,MAAA,MAAM,WAAc,GAAA,MAAA;AACpB,MAAO,OAAA;AAAA,QACL,GAAG,WAAA;AAAA,QACH,mBAAqB,EAAA,MAAA;AAAA,QACrB,SAAW,EAAA;AAAA,UACT,MAAM,WAAY,CAAA;AAAA;AACpB,OACF;AAAA;AACF;AAEJ,CAAA;;ACjBA,MAAA,CAAA,cAAA,CAAA,0BAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAYA,eAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,UAAe,KAAA;AACxC,IAAO,MAAA,CAAA,cAAA,CAAe,UAAU,2BAA2B,CAAA;AAC3D,IAAO,MAAA,CAAA,kBAAA,CAAmB,UAAU,8BAA8B,CAAA;AAClE,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,aAAa,SAAU,CAAA,IAAA;AAAA,SAChC;AAAA,QACA,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"__federation_expose_auth0CoreCommon-BE50qa2_.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 ...typedConfig,\n userAccountModelRef: undefined,\n modelRefs: {\n user: typedConfig.userAccountModelRef,\n },\n };\n },\n },\n];\n","import {\n authConfigSpec,\n createPlatformPluginExport,\n pluginConfigSpec,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\n\nimport type { Auth0PluginDefinition } from './schema/plugin-definition.js';\n\nimport { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';\nimport { auth0PluginDefinitionSchema } from './schema/plugin-definition.js';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchema(pluginId, auth0PluginDefinitionSchema);\n config.registerMigrations(pluginId, AUTH0_PLUGIN_CONFIG_MIGRATIONS);\n return {\n authConfig: {\n getUserModel: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as Auth0PluginDefinition;\n return pluginConfig.modelRefs.user;\n },\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as Auth0PluginDefinition;\n return pluginConfig.roles;\n },\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAEO,MAAM,8BAA0D,GAAA;AAAA,EACrE;AAAA,IACE,IAAM,EAAA,aAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,IACT,OAAA,EAAS,CAAC,MAAW,KAAA;AACnB,MAAA,MAAM,WAAc,GAAA,MAAA;AACpB,MAAO,OAAA;AAAA,QACL,GAAG,WAAA;AAAA,QACH,mBAAqB,EAAA,MAAA;AAAA,QACrB,SAAW,EAAA;AAAA,UACT,MAAM,WAAY,CAAA;AAAA;AACpB,OACF;AAAA;AACF;AAEJ,CAAA;;ACjBA,MAAA,CAAA,cAAA,CAAA,0BAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAYA,eAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,UAAe,KAAA;AACxC,IAAO,MAAA,CAAA,cAAA,CAAe,UAAU,2BAA2B,CAAA;AAC3D,IAAO,MAAA,CAAA,kBAAA,CAAmB,UAAU,8BAA8B,CAAA;AAClE,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,aAAa,SAAU,CAAA,IAAA;AAAA,SAChC;AAAA,QACA,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
@@ -1,11 +1,9 @@
1
- import { importShared } from './__federation_fn_import-dzKjrTzS.js';
2
- import { g as get, s as set, c as appendErrors, a as useForm, j as jsxRuntimeExports, d as useFieldArray, e as useWatch } from './index.esm-BZEyAv4m.js';
3
- import { a as authRoleSchema, A as AUTH_DEFAULT_ROLES, b as auth0PluginDefinitionSchema } from './plugin-definition-C9Q-BrBQ.js';
4
- import { k as MdEdit, l as MdDeleteOutline, m as MdAdd } from './index-BxDOOHD-.js';
5
-
6
- const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e));}},s$1=(r,s)=>{s.shouldUseNativeValidation&&o(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n$1(t);return e.some(e=>n$1(e).match(`^${r}\\.\\d+`))};function n$1(e){return e.replace(/\]|\[/g,"")}
7
-
8
- function n(r,e){for(var n={};r.length;){var s=r[0],t=s.code,i=s.message,a=s.path.join(".");if(!n[a])if("unionErrors"in s){var u=s.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code};}else n[a]={message:i,type:t};if("unionErrors"in s&&s.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var c=n[a].types,f=c&&c[s.code];n[a]=appendErrors(a,e,n,t,f?[].concat(f,s.message):s.message);}r.shift();}return n}function s(o$1,s,t){return void 0===t&&(t={}),function(i,a,u){try{return Promise.resolve(function(e,n){try{var a=Promise.resolve(o$1["sync"===t.mode?"parse":"parseAsync"](i,s)).then(function(e){return u.shouldUseNativeValidation&&o({},u),{errors:{},values:t.raw?Object.assign({},i):e}});}catch(r){return n(r)}return a&&a.then?a.then(void 0,n):a}(0,function(r){if(function(r){return Array.isArray(null==r?void 0:r.errors)}(r))return {values:{},errors:s$1(n(r.errors,!u.shouldUseNativeValidation&&"all"===u.criteriaMode),u)};throw r}))}catch(r){return Promise.reject(r)}}}
1
+ import { importShared } from './__federation_fn_import-CxP86CUK.js';
2
+ import { a as useForm, j as jsxRuntimeExports, c as useFieldArray, d as useWatch } from './index.esm-DIgRm3lq.js';
3
+ import { s } from './styles-BpKIyKWd.js';
4
+ import { b as authRoleSchema, A as AUTH_DEFAULT_ROLES } from './schema-BAfRBwYE.js';
5
+ import { a as auth0PluginDefinitionSchema } from './plugin-definition-Bgi_XH0-.js';
6
+ import { n as MdEdit, o as MdDeleteOutline, p as MdAdd } from './index-scyXBD_d.js';
9
7
 
10
8
  function createAuth0Models({
11
9
  authFeatureRef,
@@ -380,4 +378,4 @@ const web = createPlatformPluginExport({
380
378
  });
381
379
 
382
380
  export { web as default };
383
- //# sourceMappingURL=__federation_expose_auth0CoreWeb-BlCwYpTq.js.map
381
+ //# sourceMappingURL=__federation_expose_auth0CoreWeb-AdDVCP7O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__federation_expose_auth0CoreWeb-AdDVCP7O.js","sources":["../../../src/auth0/core/schema/models.ts","../../../src/auth0/core/components/role-dialog.tsx","../../../src/auth0/core/components/role-editor-form.tsx","../../../src/auth0/core/components/auth-definition-editor.tsx","../../../src/auth0/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { Auth0PluginDefinition } from './plugin-definition.js';\n\nexport function createAuth0Models({\n authFeatureRef,\n modelRefs,\n}: Pick<Auth0PluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'email',\n type: 'string',\n },\n {\n name: 'auth0Id',\n type: 'string',\n isOptional: true,\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'auth0Id' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: ['id', 'email'],\n },\n },\n },\n };\n}\n","import type React from 'react';\n\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n InputFieldController,\n} from '@baseplate-dev/ui-components';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useId } from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport type { AuthRoleInput } from '#src/roles/schema.js';\n\nimport { authRoleSchema } from '#src/roles/schema.js';\n\ninterface RoleDialogProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n role?: AuthRoleInput;\n isNew?: boolean;\n onSave: (role: AuthRoleInput) => void;\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nexport function RoleDialog({\n open,\n onOpenChange,\n role,\n isNew = false,\n onSave,\n asChild,\n children,\n}: RoleDialogProps): React.JSX.Element {\n const form = useForm({\n resolver: zodResolver(authRoleSchema),\n values: role,\n });\n\n const { control, handleSubmit } = form;\n\n const onSubmit = handleSubmit((data) => {\n onSave(data);\n onOpenChange?.(false);\n });\n\n const formId = useId();\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogTrigger asChild={asChild}>{children}</DialogTrigger>\n <DialogContent>\n <form\n id={formId}\n onSubmit={(e) => {\n e.stopPropagation();\n return onSubmit(e);\n }}\n >\n <DialogHeader>\n <DialogTitle>{isNew ? 'Add Role' : 'Edit Role'}</DialogTitle>\n <DialogDescription>\n {isNew\n ? 'Enter the details for the new role.'\n : 'Update the role details below.'}\n </DialogDescription>\n </DialogHeader>\n <div className=\"auth:space-y-4 auth:py-4\">\n <InputFieldController\n label=\"Role Name\"\n name=\"name\"\n control={control}\n placeholder=\"Enter role name\"\n />\n <InputFieldController\n label=\"Description\"\n name=\"comment\"\n control={control}\n placeholder=\"Describe this role's purpose\"\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => {\n onOpenChange?.(false);\n }}\n >\n Cancel\n </Button>\n <Button form={formId} type=\"submit\">\n {isNew ? 'Add' : 'Update'} Role\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n );\n}\n","import type React from 'react';\nimport type { Control } from 'react-hook-form';\n\nimport { authRoleEntityType } from '@baseplate-dev/project-builder-lib';\nimport {\n Badge,\n Button,\n RecordView,\n RecordViewActions,\n RecordViewItem,\n RecordViewItemList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n useConfirmDialog,\n} from '@baseplate-dev/ui-components';\nimport { useState } from 'react';\nimport { useFieldArray, useWatch } from 'react-hook-form';\nimport { MdAdd, MdDeleteOutline, MdEdit } from 'react-icons/md';\n\nimport type { AuthRoleInput } from '#src/roles/index.js';\n\nimport type { Auth0PluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { RoleDialog } from './role-dialog.js';\n\ninterface Props {\n className?: string;\n control: Control<Auth0PluginDefinitionInput>;\n}\n\nfunction RoleEditorForm({ className, control }: Props): React.JSX.Element {\n const { requestConfirm } = useConfirmDialog();\n const { append, update, remove } = useFieldArray({\n control,\n name: 'roles',\n });\n const [roleToEdit, setRoleToEdit] = useState<AuthRoleInput | undefined>();\n const [isEditing, setIsEditing] = useState(false);\n\n const roles = useWatch({ control, name: 'roles' });\n\n function handleSaveRole(newRole: AuthRoleInput): void {\n const existingIndex = roles.findIndex((role) => role.id === newRole.id);\n if (existingIndex === -1) {\n append(newRole);\n } else {\n update(existingIndex, newRole);\n }\n }\n\n function handleDeleteRole(roleIdx: number): void {\n const role = roles[roleIdx];\n requestConfirm({\n title: 'Delete Role',\n content: `Are you sure you want to delete the role \"${role.name}\"?`,\n onConfirm: () => {\n remove(roleIdx);\n },\n });\n }\n\n return (\n <SectionListSection className={className}>\n <SectionListSectionHeader>\n <SectionListSectionTitle>User Roles</SectionListSectionTitle>\n <SectionListSectionDescription>\n Define roles for your application. Default roles are protected and\n cannot be removed.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-4\">\n {roles.map((role, roleIdx) => (\n <RecordView key={role.id}>\n <RecordViewItemList>\n <RecordViewItem title=\"Name\">\n <div className=\"auth:flex auth:items-center auth:gap-2\">\n <span>{role.name}</span>\n </div>\n </RecordViewItem>\n <RecordViewItem title=\"Description\">\n {role.comment.trim() || (\n <span className=\"auth:text-muted-foreground\">\n No description\n </span>\n )}\n </RecordViewItem>\n </RecordViewItemList>\n <RecordViewActions>\n {role.builtIn && <Badge variant=\"secondary\">Default Role</Badge>}\n {!role.builtIn && (\n <>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n title=\"Edit\"\n aria-label=\"Edit role\"\n onClick={() => {\n setRoleToEdit(role);\n setIsEditing(true);\n }}\n >\n <MdEdit />\n </Button>\n <Button\n variant=\"ghostDestructive\"\n size=\"icon\"\n title=\"Delete\"\n aria-label=\"Delete role\"\n onClick={() => {\n handleDeleteRole(roleIdx);\n }}\n >\n <MdDeleteOutline />\n </Button>\n </>\n )}\n </RecordViewActions>\n </RecordView>\n ))}\n <RoleDialog\n open={isEditing}\n onOpenChange={setIsEditing}\n role={roleToEdit}\n isNew={roleToEdit ? !roles.some((r) => r.id === roleToEdit.id) : true}\n onSave={handleSaveRole}\n />\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n setRoleToEdit({\n id: authRoleEntityType.generateNewId(),\n name: '',\n comment: '',\n builtIn: false,\n });\n setIsEditing(true);\n }}\n >\n <MdAdd />\n Add Role\n </Button>\n </SectionListSectionContent>\n </SectionListSection>\n );\n}\n\nexport default RoleEditorForm;\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n authRoleEntityType,\n createAndApplyModelMergerResults,\n createModelMergerResults,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { AUTH_DEFAULT_ROLES } from '#src/roles/index.js';\n\nimport type { Auth0PluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createAuth0Models } from '../schema/models.js';\nimport { auth0PluginDefinitionSchema } from '../schema/plugin-definition.js';\nimport RoleEditorForm from './role-editor-form.js';\n\nimport '#src/styles.css';\n\nexport function AuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as Auth0PluginDefinitionInput;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: AUTH_DEFAULT_ROLES.map((r) => ({\n ...r,\n id: authRoleEntityType.generateNewId(),\n })),\n } satisfies Auth0PluginDefinitionInput;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(auth0PluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuth0Models({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuth0Models(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved Auth0 plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"max-w-6xl auth:mb-[--action-bar-height]\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Auth0 Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your Auth0 authentication settings, user model, and\n role definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"md:auth:grid-cols-2 auth:grid auth:grid-cols-1 auth:gap-6\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm control={control} />\n </SectionList>\n </div>\n\n <FormActionBar form={form} />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AuthDefinitionEditor } from './components/auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(pluginId, AuthDefinitionEditor);\n return {};\n },\n});\n"],"names":["Button","zodResolver","jsxs","jsx","authRoleEntityType","SectionListSection","SectionListSectionContent","SectionListSectionDescription","SectionListSectionHeader","SectionListSectionTitle","Fragment"],"mappings":";;;;;;;AAIO,SAAS,iBAAkB,CAAA;AAAA,EA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AAA,oBACL,OAAA;AAAA,oBACA,SAAS,EAAA,IAAA;AAAA,oBACT,WAAY,EAAA;AAAA;AAAA;AACd,eACF,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,0BAEAA,qBAAA,CAAC,kBAAe,OAAkB,EAAA;AAAA,SAAA,EACpC,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA,CAAC,iBAAc,IAAY,EAAA;AAAA;AAAA;AAAA,GAC7B;AAEJ;;AC3KA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA,CAA2B,UAAU,oBAAoB,CAAA;AACnE,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
@@ -0,0 +1,36 @@
1
+ import { importShared } from './__federation_fn_import-CxP86CUK.js';
2
+ import { a as authPluginDefinitionSchema } from './plugin-definition-EtIvYJxn.js';
3
+
4
+ const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
5
+ const common = createPlatformPluginExport({
6
+ dependencies: {
7
+ config: pluginConfigSpec
8
+ },
9
+ exports: {
10
+ authConfig: authConfigSpec
11
+ },
12
+ initialize: ({ config }, { pluginId }) => {
13
+ config.registerSchema(pluginId, authPluginDefinitionSchema);
14
+ return {
15
+ authConfig: {
16
+ getUserModel: (definition) => {
17
+ const pluginConfig = PluginUtils.configByIdOrThrow(
18
+ definition,
19
+ pluginId
20
+ );
21
+ return pluginConfig.modelRefs.user;
22
+ },
23
+ getAuthRoles: (definition) => {
24
+ const pluginConfig = PluginUtils.configByIdOrThrow(
25
+ definition,
26
+ pluginId
27
+ );
28
+ return pluginConfig.roles;
29
+ }
30
+ }
31
+ };
32
+ }
33
+ });
34
+
35
+ export { common as default };
36
+ //# sourceMappingURL=__federation_expose_authCoreCommon-DKyLSPCa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__federation_expose_authCoreCommon-DKyLSPCa.js","sources":["../../../src/auth/core/common.ts"],"sourcesContent":["import {\n authConfigSpec,\n createPlatformPluginExport,\n pluginConfigSpec,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthPluginDefinition } from './schema/plugin-definition.js';\n\nimport { authPluginDefinitionSchema } from './schema/plugin-definition.js';\n\n// necessary for Typescript to infer the return type of the initialize function\nexport type { PluginPlatformModule } from '@baseplate-dev/project-builder-lib';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchema(pluginId, authPluginDefinitionSchema);\n return {\n authConfig: {\n getUserModel: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as AuthPluginDefinition;\n return pluginConfig.modelRefs.user;\n },\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as AuthPluginDefinition;\n return pluginConfig.roles;\n },\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAAA,MAAA,CAAA,cAAA,CAAA,0BAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAcA,eAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,UAAe,KAAA;AACxC,IAAO,MAAA,CAAA,cAAA,CAAe,UAAU,0BAA0B,CAAA;AAC1D,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,aAAa,SAAU,CAAA,IAAA;AAAA,SAChC;AAAA,QACA,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}