@baseplate-dev/plugin-auth 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts +5 -1
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts +10 -2
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js +2 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +3 -4
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +1 -2
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +0 -1
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js +2 -7
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts +10 -3
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts +5 -5
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js +9 -8
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts +20 -5
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js +22 -9
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.gql +5 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +1 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts +4 -0
- package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.js +10 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/index.d.ts +14 -5
- package/dist/auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts +4 -4
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js +2 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts +23 -10
- package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/typed-templates.js +8 -0
- package/dist/auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +1 -2
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +1 -2
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js +4 -4
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.ts +8 -9
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts +0 -1
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/index.d.ts +3 -6
- package/dist/auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts +1 -2
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts +6 -10
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/index.d.ts +9 -2
- package/dist/auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.js +1 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts +18 -4
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/typed-templates.js +6 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts +9 -0
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/react-session.generator.js +16 -1
- package/dist/auth/core/generators/react-session/react-session.generator.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.tsx +1 -2
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js +2 -2
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +4 -6
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.ts +2 -5
- package/dist/auth/core/schema/models.js +1 -1
- package/dist/auth/core/schema/models.js.map +1 -1
- package/dist/auth0/core/schema/migrations.d.ts.map +1 -1
- package/dist/auth0/core/schema/migrations.js +6 -4
- package/dist/auth0/core/schema/migrations.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts +2 -2
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +11 -6
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +5 -17
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +6 -2
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +12 -4
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +2 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts +1 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +0 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +1 -3
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts +1 -2
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +2 -4
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts +1 -3
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts +1 -2
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts +1 -2
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +7 -3
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +14 -6
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DcWFsNod.js → __federation_expose_auth0CoreCommon-BXcKWfCq.js} +9 -7
- package/dist/web/assets/__federation_expose_auth0CoreCommon-BXcKWfCq.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BrPTg7eC.js → __federation_expose_auth0CoreWeb-VnxlQY01.js} +6 -6
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BrPTg7eC.js.map → __federation_expose_auth0CoreWeb-VnxlQY01.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-20XIFvpM.js → __federation_expose_authCoreCommon-LrPwgIpw.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-20XIFvpM.js.map → __federation_expose_authCoreCommon-LrPwgIpw.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-BB5P8uYV.js → __federation_expose_authCoreWeb-CGWfg0Fb.js} +7 -7
- package/dist/web/assets/__federation_expose_authCoreWeb-CGWfg0Fb.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js → __federation_expose_placeholder-authCoreCommon-DCZZPRb7.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js.map → __federation_expose_placeholder-authCoreCommon-DCZZPRb7.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js → __federation_expose_placeholder-authCoreWeb-BunerD5g.js} +6 -6
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js.map → __federation_expose_placeholder-authCoreWeb-BunerD5g.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-CpGU4emr.js → __federation_fn_import-BDimcZUI.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-CpGU4emr.js.map → __federation_fn_import-BDimcZUI.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-33D53Q49.js → web-oq9zm9eN.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-33D53Q49.js.map → web-oq9zm9eN.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-B8gI4CR0.js → project-builder-lib-DqkNAXn3.js} +12 -7
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DqkNAXn3.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-ClpdcB7_.js → ui-components-BxXhpJ04.js} +64 -64
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BxXhpJ04.js.map +1 -0
- package/dist/web/assets/{index-47TZ-Oc4.js → index-D4PxvJ0z.js} +2 -2
- package/dist/web/assets/{index-47TZ-Oc4.js.map → index-D4PxvJ0z.js.map} +1 -1
- package/dist/web/assets/{index.esm-Erws1yaL.js → index.esm-qm5h2Bmg.js} +2 -2
- package/dist/web/assets/{index.esm-Erws1yaL.js.map → index.esm-qm5h2Bmg.js.map} +1 -1
- package/dist/web/assets/{model-merger-BteeU9dp.js → model-merger-CA2yaVFd.js} +2 -2
- package/dist/web/assets/{model-merger-BteeU9dp.js.map → model-merger-CA2yaVFd.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-CnMRuS0h.js → plugin-definition-BEHZirWF.js} +3 -3
- package/dist/web/assets/{plugin-definition-CnMRuS0h.js.map → plugin-definition-BEHZirWF.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BOUJurAr.js → plugin-definition-CoiivnNt.js} +3 -3
- package/dist/web/assets/{plugin-definition-BOUJurAr.js.map → plugin-definition-CoiivnNt.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BeI52Xpr.js → plugin-definition-X0d5-H4U.js} +3 -3
- package/dist/web/assets/{plugin-definition-BeI52Xpr.js.map → plugin-definition-X0d5-H4U.js.map} +1 -1
- package/dist/web/assets/{react-CIaEd3xM.js → react-BLL9qrdY.js} +2 -2
- package/dist/web/assets/{react-CIaEd3xM.js.map → react-BLL9qrdY.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +6 -6
- package/dist/web/assets/{role-editor-form-Bk9sOqqk.js → role-editor-form-lOkPZX7S.js} +4 -4
- package/dist/web/assets/{role-editor-form-Bk9sOqqk.js.map → role-editor-form-lOkPZX7S.js.map} +1 -1
- package/dist/web/assets/{styles-mSx3A02F.js → styles-B6SRrcui.js} +3 -3
- package/dist/web/assets/{styles-mSx3A02F.js.map → styles-B6SRrcui.js.map} +1 -1
- package/package.json +10 -10
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DcWFsNod.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-BB5P8uYV.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B8gI4CR0.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ClpdcB7_.js.map +0 -1
package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js
CHANGED
|
@@ -9,6 +9,7 @@ const useCurrentUser = createTsTemplateFile({
|
|
|
9
9
|
},
|
|
10
10
|
name: 'use-current-user',
|
|
11
11
|
projectExports: { useCurrentUser: {} },
|
|
12
|
+
referencedGeneratorTemplates: { useSession: {} },
|
|
12
13
|
source: {
|
|
13
14
|
path: path.join(import.meta.dirname, '../templates/src/hooks/use-current-user.ts'),
|
|
14
15
|
},
|
|
@@ -31,6 +32,7 @@ const useRequiredUserId = createTsTemplateFile({
|
|
|
31
32
|
importMapProviders: {},
|
|
32
33
|
name: 'use-required-user-id',
|
|
33
34
|
projectExports: { useRequiredUserId: {} },
|
|
35
|
+
referencedGeneratorTemplates: { useSession: {} },
|
|
34
36
|
source: {
|
|
35
37
|
path: path.join(import.meta.dirname, '../templates/src/hooks/use-user-id-or-throw.ts'),
|
|
36
38
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,cAAc,GAAG,oBAAoB,CAAC;IAC1C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE;QAClB,uBAAuB,EAAE,+BAA+B;KACzD;IACD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N,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uCAAuC,CACxC;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,6CAA6C,CAC9C;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sDAAsD,GAAG;IACpE,UAAU;IACV,iBAAiB;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,cAAc,GAAG,oBAAoB,CAAC;IAC1C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE;QAClB,uBAAuB,EAAE,+BAA+B;KACzD;IACD,IAAI,EAAE,kBAAkB;IACxB,cAAc,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE;IACtC,4BAA4B,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IAChD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EAC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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,6CAA6C,CAC9C;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sDAAsD,GAAG;IACpE,UAAU;IACV,iBAAiB;CAClB,CAAC"}
|
|
@@ -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;
|
|
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,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import { useSession } from '$useSession';
|
|
2
3
|
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
3
4
|
import { useQuery } from '@apollo/client';
|
|
4
|
-
import { useSession } from './use-session.js';
|
|
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,
|
|
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"}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import type { CurrentUserFragment } from '%generatedGraphqlImports';
|
|
4
4
|
|
|
5
|
+
import { useSession } from '$useSession';
|
|
5
6
|
import { GetUserByIdDocument } from '%generatedGraphqlImports';
|
|
6
7
|
import { useQuery } from '@apollo/client';
|
|
7
8
|
|
|
8
|
-
import { useSession } from './use-session.js';
|
|
9
|
-
|
|
10
9
|
interface UseCurrentUserResult {
|
|
11
10
|
user?: CurrentUserFragment;
|
|
12
11
|
loading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-user-id-or-throw.js","sourceRoot":"","sources":["../../../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use-user-id-or-throw.js","sourceRoot":"","sources":["../../../../../../../../src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAChC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { BuilderAction } from '@baseplate-dev/sync';
|
|
|
3
3
|
import { PLACEHOLDER_AUTH_CORE_PLACEHOLDER_AUTH_MODULE_TEMPLATES } from './typed-templates.js';
|
|
4
4
|
export interface PlaceholderAuthCorePlaceholderAuthModuleRenderers {
|
|
5
5
|
userSessionService: {
|
|
6
|
-
render: (options: Omit<RenderTsTemplateFileActionInput<typeof PLACEHOLDER_AUTH_CORE_PLACEHOLDER_AUTH_MODULE_TEMPLATES.userSessionService>, 'destination' | 'importMapProviders' | 'template'>) => BuilderAction;
|
|
6
|
+
render: (options: Omit<RenderTsTemplateFileActionInput<typeof PLACEHOLDER_AUTH_CORE_PLACEHOLDER_AUTH_MODULE_TEMPLATES.userSessionService>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export declare const PLACEHOLDER_AUTH_CORE_PLACEHOLDER_AUTH_MODULE_RENDERERS: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUzD,OAAO,EAAE,uDAAuD,EAAE,MAAM,sBAAsB,CAAC;AAE/F,MAAM,WAAW,iDAAiD;IAChE,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,uDAAuD,CAAC,kBAAkB,CAClF,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUzD,OAAO,EAAE,uDAAuD,EAAE,MAAM,sBAAsB,CAAC;AAE/F,MAAM,WAAW,iDAAiD;IAChE,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,uDAAuD,CAAC,kBAAkB,CAClF,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AA+CD,eAAO,MAAM,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { c as createAuth0PluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { c as createAuth0PluginDefinitionSchema } from './plugin-definition-BEHZirWF.js';
|
|
3
3
|
|
|
4
4
|
const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
|
|
5
5
|
{
|
|
@@ -8,10 +8,12 @@ const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
|
|
|
8
8
|
migrate: (config) => {
|
|
9
9
|
const typedConfig = config;
|
|
10
10
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
updatedConfig: {
|
|
12
|
+
...typedConfig,
|
|
13
|
+
userAccountModelRef: void 0,
|
|
14
|
+
modelRefs: {
|
|
15
|
+
user: typedConfig.userAccountModelRef
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
}
|
|
@@ -51,4 +53,4 @@ const common = createPlatformPluginExport({
|
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
export { common as default };
|
|
54
|
-
//# sourceMappingURL=__federation_expose_auth0CoreCommon-
|
|
56
|
+
//# sourceMappingURL=__federation_expose_auth0CoreCommon-BXcKWfCq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_auth0CoreCommon-BXcKWfCq.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 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 { createAuth0PluginDefinitionSchema } 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.registerSchemaCreator(pluginId, createAuth0PluginDefinitionSchema);\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,aAAe,EAAA;AAAA,UACb,GAAG,WAAA;AAAA,UACH,mBAAqB,EAAA,MAAA;AAAA,UACrB,SAAW,EAAA;AAAA,YACT,MAAM,WAAY,CAAA;AAAA;AACpB;AACF,OACF;AAAA;AACF;AAEJ,CAAA;;ACnBA,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,qBAAA,CAAsB,UAAU,iCAAiC,CAAA;AACxE,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,8 +1,8 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { j as jsxRuntimeExports } from './index.esm-
|
|
3
|
-
import { u as useLens } from './styles-
|
|
4
|
-
import { A as AUTH_DEFAULT_ROLES, s, R as RoleEditorForm } from './role-editor-form-
|
|
5
|
-
import { c as createAuth0PluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './index.esm-qm5h2Bmg.js';
|
|
3
|
+
import { u as useLens } from './styles-B6SRrcui.js';
|
|
4
|
+
import { A as AUTH_DEFAULT_ROLES, s, R as RoleEditorForm } from './role-editor-form-lOkPZX7S.js';
|
|
5
|
+
import { c as createAuth0PluginDefinitionSchema } from './plugin-definition-BEHZirWF.js';
|
|
6
6
|
|
|
7
7
|
function createAuth0Models({
|
|
8
8
|
authFeatureRef,
|
|
@@ -198,4 +198,4 @@ const web = createPlatformPluginExport({
|
|
|
198
198
|
});
|
|
199
199
|
|
|
200
200
|
export { web as default };
|
|
201
|
-
//# sourceMappingURL=__federation_expose_auth0CoreWeb-
|
|
201
|
+
//# sourceMappingURL=__federation_expose_auth0CoreWeb-VnxlQY01.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_auth0CoreWeb-BrPTg7eC.js","sources":["../../../src/auth0/core/schema/models.ts","../../../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 { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n authRoleEntityType,\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { AUTH_DEFAULT_ROLES } from '#src/common/roles/index.js';\n\nimport type { Auth0PluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createAuth0Models } from '../schema/models.js';\nimport { createAuth0PluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function AuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const auth0PluginDefinitionSchema = useDefinitionSchema(\n createAuth0PluginDefinitionSchema,\n );\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 const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n 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=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AuthDefinitionEditor } from './components/auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(pluginId, AuthDefinitionEditor);\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,iBAAkB,CAAA;AAAA,EAChC,cAAA;AAAA,EACA;AACF,CAEE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA;AAAA,WACR;AAAA,UACA;AAAA,YACE,IAAM,EAAA,SAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA;AACd,SACF;AAAA,QACA,mBAAA,EAAqB,CAAC,IAAI,CAAA;AAAA,QAC1B,iBAAmB,EAAA;AAAA,UACjB;AAAA,YACE,MAAQ,EAAA,CAAC,EAAE,QAAA,EAAU,WAAW;AAAA;AAClC;AACF,OACF;AAAA,MACA,OAAS,EAAA;AAAA,QACP,UAAY,EAAA;AAAA,UACV,OAAS,EAAA,IAAA;AAAA,UACT,MAAA,EAAQ,CAAC,IAAA,EAAM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ACAA,qBAAA;AAAA,kBAAC,8BAAA;AAAA,kBAAA;AAAA,oBACC,KAAM,EAAA,mBAAA;AAAA,oBACN,IAAK,EAAA,gBAAA;AAAA,oBACL,OAAA;AAAA,oBACA,SAAS,EAAA,IAAA;AAAA,oBACT,WAAY,EAAA;AAAA;AAAA;AACd,eACF,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;AC1LA,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;;;;"}
|
|
1
|
+
{"version":3,"file":"__federation_expose_auth0CoreWeb-VnxlQY01.js","sources":["../../../src/auth0/core/schema/models.ts","../../../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 { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n authRoleEntityType,\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { AUTH_DEFAULT_ROLES } from '#src/common/roles/index.js';\n\nimport type { Auth0PluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createAuth0Models } from '../schema/models.js';\nimport { createAuth0PluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function AuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const auth0PluginDefinitionSchema = useDefinitionSchema(\n createAuth0PluginDefinitionSchema,\n );\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 const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n 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=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AuthDefinitionEditor } from './components/auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(pluginId, AuthDefinitionEditor);\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,iBAAkB,CAAA;AAAA,EAChC,cAAA;AAAA,EACA;AACF,CAEE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EA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ACb;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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-CoiivnNt.js';
|
|
3
3
|
|
|
4
4
|
const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
5
5
|
const common = createPlatformPluginExport({
|
|
@@ -33,4 +33,4 @@ const common = createPlatformPluginExport({
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
export { common as default };
|
|
36
|
-
//# sourceMappingURL=__federation_expose_authCoreCommon-
|
|
36
|
+
//# sourceMappingURL=__federation_expose_authCoreCommon-LrPwgIpw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_authCoreCommon-
|
|
1
|
+
{"version":3,"file":"__federation_expose_authCoreCommon-LrPwgIpw.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 { createAuthPluginDefinitionSchema } from './schema/plugin-definition.js';\n\n// necessary for Typescript to infer the return type of the initialize function\nexport type { PluginPlatformModule } from '@baseplate-dev/project-builder-lib';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchemaCreator(pluginId, createAuthPluginDefinitionSchema);\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,qBAAA,CAAsB,UAAU,gCAAgC,CAAA;AACvE,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,8 +1,8 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { j as jsxRuntimeExports } from './index.esm-
|
|
3
|
-
import { u as useLens } from './styles-
|
|
4
|
-
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-
|
|
5
|
-
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './index.esm-qm5h2Bmg.js';
|
|
3
|
+
import { u as useLens } from './styles-B6SRrcui.js';
|
|
4
|
+
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-lOkPZX7S.js';
|
|
5
|
+
import { c as createAuthPluginDefinitionSchema } from './plugin-definition-CoiivnNt.js';
|
|
6
6
|
|
|
7
7
|
function createAuthModels({
|
|
8
8
|
authFeatureRef,
|
|
@@ -107,7 +107,7 @@ function createAuthModels({
|
|
|
107
107
|
name: "user",
|
|
108
108
|
references: [{ localRef: "userId", foreignRef: "id" }],
|
|
109
109
|
modelRef: modelRefs.user,
|
|
110
|
-
foreignRelationName: "
|
|
110
|
+
foreignRelationName: "accounts",
|
|
111
111
|
onDelete: "Cascade",
|
|
112
112
|
onUpdate: "Restrict"
|
|
113
113
|
}
|
|
@@ -398,4 +398,4 @@ const web = createPlatformPluginExport({
|
|
|
398
398
|
});
|
|
399
399
|
|
|
400
400
|
export { web as default };
|
|
401
|
-
//# sourceMappingURL=__federation_expose_authCoreWeb-
|
|
401
|
+
//# sourceMappingURL=__federation_expose_authCoreWeb-CGWfg0Fb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_authCoreWeb-CGWfg0Fb.js","sources":["../../../src/auth/core/schema/models.ts","../../../src/auth/core/components/auth-definition-editor.tsx","../../../src/auth/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthPluginDefinition } from './plugin-definition.js';\n\nexport function createAuthModels({\n authFeatureRef,\n modelRefs,\n}: Pick<AuthPluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n userAccount: ModelMergerModelInput;\n userRole: ModelMergerModelInput;\n userSession: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'name',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'email',\n type: 'string',\n },\n {\n name: 'emailVerified',\n type: 'boolean',\n options: { default: 'false' },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'email' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: ['id', 'email'],\n },\n },\n },\n userAccount: {\n name: modelRefs.userAccount,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'accountId',\n type: 'string',\n },\n {\n name: 'providerId',\n type: 'string',\n },\n {\n name: 'password',\n type: 'string',\n isOptional: true,\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'accountId' }, { fieldRef: 'providerId' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: modelRefs.user,\n foreignRelationName: 'accounts',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n userRole: {\n name: modelRefs.userRole,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'role',\n type: 'string',\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n ],\n primaryKeyFieldRefs: ['userId', 'role'],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: modelRefs.user,\n foreignRelationName: 'roles',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n userSession: {\n name: modelRefs.userSession,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'userId',\n type: 'uuid',\n },\n {\n name: 'token',\n type: 'string',\n },\n {\n name: 'expiresAt',\n type: 'dateTime',\n },\n {\n name: 'renewedAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'createdAt',\n type: 'dateTime',\n options: { defaultToNow: true },\n },\n {\n name: 'updatedAt',\n type: 'dateTime',\n options: { defaultToNow: true, updatedAt: true },\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'token' }],\n },\n ],\n relations: [\n {\n name: 'user',\n references: [{ localRef: 'userId', foreignRef: 'id' }],\n modelRef: modelRefs.user,\n foreignRelationName: 'sessions',\n onDelete: 'Cascade',\n onUpdate: 'Restrict',\n },\n ],\n },\n },\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { createDefaultAuthRoles } from '#src/common/roles/index.js';\n\nimport type { AuthPluginDefinitionInput } from '../schema/plugin-definition.js';\n\nimport { createAuthModels } from '../schema/models.js';\nimport { createAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function AuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createAuthPluginDefinitionSchema,\n );\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as AuthPluginDefinitionInput;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n userAccount: ModelUtils.getModelIdByNameOrDefault(\n definition,\n 'UserAccount',\n ),\n userRole: ModelUtils.getModelIdByNameOrDefault(definition, 'UserRole'),\n userSession: ModelUtils.getModelIdByNameOrDefault(\n definition,\n 'UserSession',\n ),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: createDefaultAuthRoles(),\n } satisfies AuthPluginDefinitionInput;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuthModels({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n updatedData.modelRefs = createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuthModels(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Local Authentication Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your local authentication settings, user models, and\n role definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"The main user model for authentication\"\n />\n <ModelComboboxFieldController\n label=\"User Account Model\"\n name=\"modelRefs.userAccount\"\n control={control}\n canCreate\n description=\"Model for user account credentials\"\n />\n <ModelComboboxFieldController\n label=\"User Role Model\"\n name=\"modelRefs.userRole\"\n control={control}\n canCreate\n description=\"Model for assigning roles to users\"\n />\n <ModelComboboxFieldController\n label=\"User Session Model\"\n name=\"modelRefs.userSession\"\n control={control}\n canCreate\n description=\"Model for managing user sessions\"\n />\n </div>\n\n <div className=\"auth:space-y-2\">\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AuthDefinitionEditor } from './components/auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(pluginId, AuthDefinitionEditor);\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,cAAA;AAAA,EACA;AACF,CAKE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,MAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA,WACd;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA;AAAA,WACR;AAAA,UACA;AAAA,YACE,IAAM,EAAA,eAAA;AAAA,YACN,IAAM,EAAA,SAAA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8BAEAA,qBAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAU,gBACb,EAAA,QAAA,kBAAAA,qBAAA;AAAA,gBAAC,8BAAA;AAAA,gBAAA;AAAA,kBACC,KAAM,EAAA,mBAAA;AAAA,kBACN,IAAK,EAAA,gBAAA;AAAA,kBACL,OAAA;AAAA,kBACA,SAAS,EAAA,IAAA;AAAA,kBACT,WAAY,EAAA;AAAA;AAAA,eAEhB,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;ACvNA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA,CAA2B,UAAU,oBAAoB,CAAA;AACnE,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-X0d5-H4U.js';
|
|
3
3
|
|
|
4
4
|
const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
5
5
|
const common = createPlatformPluginExport({
|
|
@@ -36,4 +36,4 @@ const common = createPlatformPluginExport({
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
export { common as default };
|
|
39
|
-
//# sourceMappingURL=__federation_expose_placeholder-authCoreCommon-
|
|
39
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreCommon-DCZZPRb7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_placeholder-authCoreCommon-
|
|
1
|
+
{"version":3,"file":"__federation_expose_placeholder-authCoreCommon-DCZZPRb7.js","sources":["../../../src/placeholder-auth/core/common.ts"],"sourcesContent":["import {\n authConfigSpec,\n createPlatformPluginExport,\n pluginConfigSpec,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\n\nimport type { PlaceholderAuthPluginDefinition } from './schema/plugin-definition.js';\n\nimport { createPlaceholderAuthPluginDefinitionSchema } from './schema/plugin-definition.js';\n\n// necessary for Typescript to infer the return type of the initialize function\nexport type { PluginPlatformModule } from '@baseplate-dev/project-builder-lib';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authConfig: authConfigSpec,\n },\n initialize: ({ config }, { pluginId }) => {\n config.registerSchemaCreator(\n pluginId,\n createPlaceholderAuthPluginDefinitionSchema,\n );\n return {\n authConfig: {\n getUserModel: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as PlaceholderAuthPluginDefinition;\n return pluginConfig.modelRefs.user;\n },\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByIdOrThrow(\n definition,\n pluginId,\n ) as PlaceholderAuthPluginDefinition;\n return pluginConfig.roles;\n },\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAAA,MAAA,CAAA,cAAA,CAAA,0BAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AAcA,eAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,UAAe,KAAA;AACxC,IAAO,MAAA,CAAA,qBAAA;AAAA,MACL,QAAA;AAAA,MACA;AAAA,KACF;AACA,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,aAAa,SAAU,CAAA,IAAA;AAAA,SAChC;AAAA,QACA,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,iBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { j as jsxRuntimeExports } from './index.esm-
|
|
3
|
-
import { u as useLens } from './styles-
|
|
4
|
-
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-
|
|
5
|
-
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-BDimcZUI.js';
|
|
2
|
+
import { j as jsxRuntimeExports } from './index.esm-qm5h2Bmg.js';
|
|
3
|
+
import { u as useLens } from './styles-B6SRrcui.js';
|
|
4
|
+
import { c as createDefaultAuthRoles, s, R as RoleEditorForm } from './role-editor-form-lOkPZX7S.js';
|
|
5
|
+
import { c as createPlaceholderAuthPluginDefinitionSchema } from './plugin-definition-X0d5-H4U.js';
|
|
6
6
|
|
|
7
7
|
function createAuthModels({
|
|
8
8
|
authFeatureRef,
|
|
@@ -194,4 +194,4 @@ const web = createPlatformPluginExport({
|
|
|
194
194
|
});
|
|
195
195
|
|
|
196
196
|
export { web as default };
|
|
197
|
-
//# sourceMappingURL=__federation_expose_placeholder-authCoreWeb-
|
|
197
|
+
//# sourceMappingURL=__federation_expose_placeholder-authCoreWeb-BunerD5g.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js","sources":["../../../src/placeholder-auth/core/schema/models.ts","../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx","../../../src/placeholder-auth/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { PlaceholderAuthPluginDefinition } from './plugin-definition.js';\n\nexport function createAuthModels({\n authFeatureRef,\n modelRefs,\n}: Pick<PlaceholderAuthPluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'email',\n type: 'string',\n isOptional: true,\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'email' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: ['id', 'email'],\n },\n },\n },\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { createDefaultAuthRoles } from '#src/common/roles/index.js';\n\nimport type { PlaceholderAuthPluginDefinition } from '../schema/plugin-definition.js';\n\nimport { createAuthModels } from '../schema/models.js';\nimport { createPlaceholderAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function PlaceholderAuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createPlaceholderAuthPluginDefinitionSchema,\n );\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as PlaceholderAuthPluginDefinition;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: createDefaultAuthRoles(),\n } satisfies PlaceholderAuthPluginDefinition;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuthModels({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n updatedData.modelRefs = createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuthModels(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Placeholder Auth Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your placeholder auth settings, user model, and role\n definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { PlaceholderAuthDefinitionEditor } from './components/placeholder-auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(\n pluginId,\n PlaceholderAuthDefinitionEditor,\n );\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,cAAA;AAAA,EACA;AACF,CAEE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA;AACd,SACF;AAAA,QACA,mBAAA,EAAqB,CAAC,IAAI,CAAA;AAAA,QAC1B,iBAAmB,EAAA;AAAA,UACjB;AAAA,YACE,MAAQ,EAAA,CAAC,EAAE,QAAA,EAAU,SAAS;AAAA;AAChC;AACF,OACF;AAAA,MACA,OAAS,EAAA;AAAA,QACP,UAAY,EAAA;AAAA,UACV,OAAS,EAAA,IAAA;AAAA,UACT,MAAA,EAAQ,CAAC,IAAA,EAAM,OAAO;AAAA;AACxB;AACF;AACF,GACF;AACF;;ACvCA,MAAA,CAAA,gCAAA,CAAA,wBAAA,CAAA,iCAAA,CAAA,YAAA,CAAA,UAAA,CAAA,WAAA,C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EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;ACtLA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA;AAAA,MACR,QAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"__federation_expose_placeholder-authCoreWeb-BunerD5g.js","sources":["../../../src/placeholder-auth/core/schema/models.ts","../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx","../../../src/placeholder-auth/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { PlaceholderAuthPluginDefinition } from './plugin-definition.js';\n\nexport function createAuthModels({\n authFeatureRef,\n modelRefs,\n}: Pick<PlaceholderAuthPluginDefinition, 'authFeatureRef' | 'modelRefs'>): {\n user: ModelMergerModelInput;\n} {\n return {\n user: {\n name: modelRefs.user,\n featureRef: authFeatureRef,\n model: {\n fields: [\n {\n name: 'id',\n type: 'uuid',\n options: { genUuid: true },\n },\n {\n name: 'email',\n type: 'string',\n isOptional: true,\n },\n ],\n primaryKeyFieldRefs: ['id'],\n uniqueConstraints: [\n {\n fields: [{ fieldRef: 'email' }],\n },\n ],\n },\n graphql: {\n objectType: {\n enabled: true,\n fields: ['id', 'email'],\n },\n },\n },\n };\n}\n","import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\n\nimport {\n createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n FeatureUtils,\n ModelUtils,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\n FeatureComboboxFieldController,\n ModelComboboxFieldController,\n ModelMergerResultAlert,\n useBlockUnsavedChangesNavigate,\n useDefinitionSchema,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { useLens } from '@hookform/lenses';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { RoleEditorForm } from '#src/common/roles/components/index.js';\nimport { createDefaultAuthRoles } from '#src/common/roles/index.js';\n\nimport type { PlaceholderAuthPluginDefinition } from '../schema/plugin-definition.js';\n\nimport { createAuthModels } from '../schema/models.js';\nimport { createPlaceholderAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';\n\nimport '#src/styles.css';\n\nexport function PlaceholderAuthDefinitionEditor({\n definition: pluginMetadata,\n metadata,\n onSave,\n}: WebConfigProps): React.JSX.Element {\n const { definition, definitionContainer, saveDefinitionWithFeedback } =\n useProjectDefinition();\n\n const authPluginDefinitionSchema = useDefinitionSchema(\n createPlaceholderAuthPluginDefinitionSchema,\n );\n\n const defaultValues = useMemo(() => {\n if (pluginMetadata?.config) {\n return pluginMetadata.config as PlaceholderAuthPluginDefinition;\n }\n\n return {\n modelRefs: {\n user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),\n },\n authFeatureRef: FeatureUtils.getFeatureIdByNameOrDefault(\n definition,\n 'auth',\n ),\n roles: createDefaultAuthRoles(),\n } satisfies PlaceholderAuthPluginDefinition;\n }, [definition, pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(authPluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit, watch } = form;\n\n const modelRefs = watch('modelRefs');\n const authFeatureRef = watch('authFeatureRef');\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuthModels({ modelRefs, authFeatureRef });\n\n return createModelMergerResults(\n modelRefs,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authFeatureRef, modelRefs]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const featureRef = FeatureUtils.ensureFeatureByNameRecursively(\n draftConfig,\n data.authFeatureRef,\n );\n const updatedData = {\n ...data,\n authFeatureRef: featureRef,\n };\n updatedData.modelRefs = createAndApplyModelMergerResults(\n draftConfig,\n updatedData.modelRefs,\n createAuthModels(updatedData),\n definitionContainer,\n );\n PluginUtils.setPluginConfig(\n draftConfig,\n metadata,\n updatedData,\n definitionContainer.pluginStore,\n );\n },\n {\n successMessage: 'Successfully saved auth plugin!',\n onSuccess: () => {\n onSave();\n },\n },\n ),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n const lens = useLens({ control });\n\n return (\n <form\n onSubmit={onSubmit}\n className=\"auth:mb-[--action-bar-height] auth:max-w-6xl\"\n >\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Placeholder Auth Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure your placeholder auth settings, user model, and role\n definitions.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n\n <div className=\"auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2\">\n <ModelComboboxFieldController\n label=\"User Model\"\n name=\"modelRefs.user\"\n control={control}\n canCreate\n description=\"Select or create the model that will store user authentication data\"\n />\n <FeatureComboboxFieldController\n label=\"Auth Feature Path\"\n name=\"authFeatureRef\"\n control={control}\n canCreate\n description=\"Specify the feature path where authentication endpoints will be generated\"\n />\n </div>\n </SectionListSectionContent>\n </SectionListSection>\n\n <RoleEditorForm lens={lens.focus('roles')} />\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { PlaceholderAuthDefinitionEditor } from './components/placeholder-auth-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginId }) => {\n webConfig.registerWebConfigComponent(\n pluginId,\n PlaceholderAuthDefinitionEditor,\n );\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,cAAA;AAAA,EACA;AACF,CAEE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,SAAU,CAAA,IAAA;AAAA,MAChB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AAAA,YACN,IAAM,EAAA,MAAA;AAAA,YACN,OAAA,EAAS,EAAE,OAAA,EAAS,IAAK;AAAA,WAC3B;AAAA,UACA;AAAA,YACE,IAAM,EAAA,OAAA;AAAA,YACN,IAAM,EAAA,QAAA;AAAA,YACN,UAAY,EAAA;AAAA;AACd,SACF;AAAA,QACA,mBAAA,EAAqB,CAAC,IAAI,CAAA;AAAA,QAC1B,iBAA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,gBAAA;AAAA,oBACL,OAAA;AAAA,oBACA,SAAS,EAAA,IAAA;AAAA,oBACT,WAAY,EAAA;AAAA;AAAA,iBACd;AAAA,gCACAA,qBAAA;AAAA,kBAAC,8BAAA;AAAA,kBAAA;AAAA,oBACC,KAAM,EAAA,mBAAA;AAAA,oBACN,IAAK,EAAA,gBAAA;AAAA,oBACL,OAAA;AAAA,oBACA,SAAS,EAAA,IAAA;AAAA,oBACT,WAAY,EAAA;AAAA;AAAA;AACd,eACF,EAAA;AAAA,aACF,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,gDAEC,cAAe,EAAA,EAAA,IAAA,EAAM,IAAK,CAAA,KAAA,CAAM,OAAO,CAAG,EAAA;AAAA,SAAA,EAC7C,CACF,EAAA,CAAA;AAAA,wBAEAA,qBAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA;AAAA,YACA,qBACE,EAAA,CAAC,cACD,IAAA,iCAAA,CAAkC,mBAAmB;AAAA;AAAA;AAEzD;AAAA;AAAA,GACF;AAEJ;;ACtLA,MAAA,CAAA,0BAAA,CAAA,aAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;AASA,YAAe,0BAA2B,CAAA;AAAA,EACxC,YAAc,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,SAAS,EAAC;AAAA,EACV,YAAY,CAAC,EAAE,WAAa,EAAA,EAAE,UAAe,KAAA;AAC3C,IAAU,SAAA,CAAA,0BAAA;AAAA,MACR,QAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
package/dist/web/assets/{__federation_fn_import-CpGU4emr.js → __federation_fn_import-BDimcZUI.js}
RENAMED
|
@@ -356,7 +356,7 @@ function satisfy(version, range) {
|
|
|
356
356
|
const currentImports = {};
|
|
357
357
|
|
|
358
358
|
// eslint-disable-next-line no-undef
|
|
359
|
-
const moduleMap = {'react':{get:()=>()=>__federation_import(new URL('__federation_shared_react-uocnGSER.js', import.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import(new URL('__federation_shared_react-dom-Bwq4pLax.js', import.meta.url).href),import:true},'zod':{get:()=>()=>__federation_import(new URL('__federation_shared_zod-BK7IELHt.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib-
|
|
359
|
+
const moduleMap = {'react':{get:()=>()=>__federation_import(new URL('__federation_shared_react-uocnGSER.js', import.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import(new URL('__federation_shared_react-dom-Bwq4pLax.js', import.meta.url).href),import:true},'zod':{get:()=>()=>__federation_import(new URL('__federation_shared_zod-BK7IELHt.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib-DqkNAXn3.js', import.meta.url).href),import:true},'@baseplate-dev/project-builder-lib/web':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/project-builder-lib/web-oq9zm9eN.js', import.meta.url).href),import:true},'@baseplate-dev/ui-components':{get:()=>()=>__federation_import(new URL('__federation_shared_@baseplate-dev/ui-components-BxXhpJ04.js', import.meta.url).href),import:true}};
|
|
360
360
|
const moduleCache = Object.create(null);
|
|
361
361
|
async function importShared(name, shareScope = 'default') {
|
|
362
362
|
return moduleCache[name]
|
|
@@ -418,4 +418,4 @@ function flattenModule(module, name) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
export { importShared, getSharedFromLocal as importSharedLocal, getSharedFromRuntime as importSharedRuntime };
|
|
421
|
-
//# sourceMappingURL=__federation_fn_import-
|
|
421
|
+
//# sourceMappingURL=__federation_fn_import-BDimcZUI.js.map
|