@baseplate-dev/plugin-auth 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0/constants/model-names.d.ts +4 -0
- package/dist/auth0/constants/model-names.d.ts.map +1 -0
- package/dist/auth0/constants/model-names.js +4 -0
- package/dist/auth0/constants/model-names.js.map +1 -0
- package/dist/auth0/core/common.d.ts.map +1 -1
- package/dist/auth0/core/common.js +3 -5
- package/dist/auth0/core/common.js.map +1 -1
- package/dist/auth0/core/components/auth0-definition-editor.d.ts.map +1 -1
- package/dist/auth0/core/components/auth0-definition-editor.js +11 -15
- package/dist/auth0/core/components/auth0-definition-editor.js.map +1 -1
- package/dist/auth0/core/node.d.ts.map +1 -1
- package/dist/auth0/core/node.js +2 -4
- package/dist/auth0/core/node.js.map +1 -1
- package/dist/auth0/core/schema/models.d.ts +2 -4
- package/dist/auth0/core/schema/models.d.ts.map +1 -1
- package/dist/auth0/core/schema/models.js +3 -2
- package/dist/auth0/core/schema/models.js.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +1 -18
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.js +2 -9
- package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +3 -3
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +1 -1
- package/dist/local-auth/admin/schema/manage-role-action.d.ts +3 -4
- package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -1
- package/dist/local-auth/admin/schema/reset-password-action.d.ts +3 -4
- package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -1
- package/dist/local-auth/admin/schema/roles-column.d.ts +3 -4
- package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -1
- package/dist/local-auth/admin/web.d.ts.map +1 -1
- package/dist/local-auth/admin/web.js +5 -13
- package/dist/local-auth/admin/web.js.map +1 -1
- package/dist/local-auth/constants/model-names.d.ts +19 -0
- package/dist/local-auth/constants/model-names.d.ts.map +1 -0
- package/dist/local-auth/constants/model-names.js +19 -0
- package/dist/local-auth/constants/model-names.js.map +1 -0
- package/dist/local-auth/core/common.d.ts.map +1 -1
- package/dist/local-auth/core/common.js +3 -5
- package/dist/local-auth/core/common.js.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.js +10 -16
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +3 -3
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +0 -2
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +5 -6
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +5 -5
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +6 -6
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +4 -24
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +0 -3
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts +2 -7
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +9 -8
- package/dist/local-auth/core/schema/models.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +0 -28
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +1 -19
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/placeholder-auth/constants/model-names.d.ts +4 -0
- package/dist/placeholder-auth/constants/model-names.d.ts.map +1 -0
- package/dist/placeholder-auth/constants/model-names.js +4 -0
- package/dist/placeholder-auth/constants/model-names.js.map +1 -0
- package/dist/placeholder-auth/core/common.d.ts.map +1 -1
- package/dist/placeholder-auth/core/common.js +3 -5
- package/dist/placeholder-auth/core/common.js.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +12 -16
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
- package/dist/placeholder-auth/core/schema/models.d.ts +2 -4
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/models.js +3 -2
- package/dist/placeholder-auth/core/schema/models.js.map +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +2 -18
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.js +2 -9
- package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-Dd4OxG3J.js → __federation_expose_auth0CoreCommon-zQL4xAil.js} +5 -11
- package/dist/web/assets/__federation_expose_auth0CoreCommon-zQL4xAil.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C_de43BE.js → __federation_expose_auth0CoreWeb-BQJHnPPM.js} +26 -41
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BQJHnPPM.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreCommon-BAF30G9e.js → __federation_expose_authCoreCommon-hEy5zrff.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-BAF30G9e.js.map → __federation_expose_authCoreCommon-hEy5zrff.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-B26BFarY.js → __federation_expose_authCoreWeb-UlIYc0cq.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-B26BFarY.js.map → __federation_expose_authCoreWeb-UlIYc0cq.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DLbuTALX.js → __federation_expose_local-authAdminCommon-DyMAwXJ7.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DLbuTALX.js.map → __federation_expose_local-authAdminCommon-DyMAwXJ7.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-bT8Js4V6.js → __federation_expose_local-authAdminWeb-RscG4AiS.js} +7 -25
- package/dist/web/assets/__federation_expose_local-authAdminWeb-RscG4AiS.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-BtQr1I4Q.js +27 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-BtQr1I4Q.js.map +1 -0
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-DKVkRzEo.js → __federation_expose_local-authCoreWeb-DsK2Dfpr.js} +33 -87
- package/dist/web/assets/__federation_expose_local-authCoreWeb-DsK2Dfpr.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BZy2rgIt.js +26 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BZy2rgIt.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-tw3UiMLM.js → __federation_expose_placeholder-authCoreWeb-OEDsMJ_b.js} +28 -43
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-OEDsMJ_b.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-B_QMlAIe.js → __federation_fn_import-v1QB_w7U.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-B_QMlAIe.js.map → __federation_fn_import-v1QB_w7U.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-DdrB9jrq.js → web-Cb2knzA_.js} +6 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-Cb2knzA_.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-BvG5Zcxb.js → project-builder-lib-CJdJXC1f.js} +25 -98
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CJdJXC1f.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-CjIA8Av2.js → ui-components-CrL3nReP.js} +6 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CrL3nReP.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-LpAGNm5N.js → utils-CJgKqZu4.js} +173 -4
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CJgKqZu4.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CEcQRiV1.js → react-router-DdszvTPE.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CEcQRiV1.js.map → react-router-DdszvTPE.js.map} +1 -1
- package/dist/web/assets/{__federation_shared_zod-BK7IELHt.js → __federation_shared_zod-BGUJlEOa.js} +213 -302
- package/dist/web/assets/__federation_shared_zod-BGUJlEOa.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-BrApugiB.js → get-auth-plugin-definition-Qo_0oJFS.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BrApugiB.js.map → get-auth-plugin-definition-Qo_0oJFS.js.map} +1 -1
- package/dist/web/assets/{index-DAcyTb_o.js → index-KXYo3x9T.js} +2 -2
- package/dist/web/assets/{index-DAcyTb_o.js.map → index-KXYo3x9T.js.map} +1 -1
- package/dist/web/assets/{index.esm-BFQQfZNu.js → index.esm-BsVb2e-m.js} +2 -2
- package/dist/web/assets/{index.esm-BFQQfZNu.js.map → index.esm-BsVb2e-m.js.map} +1 -1
- package/dist/web/assets/{model-merger-boZDknXa.js → model-merger-BeuqGz00.js} +35 -59
- package/dist/web/assets/model-merger-BeuqGz00.js.map +1 -0
- package/dist/web/assets/model-names-CEoSIalq.js +21 -0
- package/dist/web/assets/model-names-CEoSIalq.js.map +1 -0
- package/dist/web/assets/plugin-definition-C1FCvorP.js +16 -0
- package/dist/web/assets/plugin-definition-C1FCvorP.js.map +1 -0
- package/dist/web/assets/plugin-definition-CeI3VlQi.js +31 -0
- package/dist/web/assets/plugin-definition-CeI3VlQi.js.map +1 -0
- package/dist/web/assets/plugin-definition-CpmhXG71.js +16 -0
- package/dist/web/assets/plugin-definition-CpmhXG71.js.map +1 -0
- package/dist/web/assets/{plugin-definition-CyqVivit.js → plugin-definition-p6J3lSNe.js} +2 -2
- package/dist/web/assets/{plugin-definition-CyqVivit.js.map → plugin-definition-p6J3lSNe.js.map} +1 -1
- package/dist/web/assets/{react-CKjL52W8.js → react-BUJ02Ozg.js} +2 -2
- package/dist/web/assets/{react-CKjL52W8.js.map → react-BUJ02Ozg.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +20 -20
- package/dist/web/assets/{style-BhUCMIWI.css → style-Cu4lNOci.css} +0 -18
- package/dist/web/assets/{styles-CyTaudys.js → styles-DMYfkBXJ.js} +3 -3
- package/dist/web/assets/{styles-CyTaudys.js.map → styles-DMYfkBXJ.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +14 -14
- package/dist/web/assets/__federation_expose_auth0CoreCommon-Dd4OxG3J.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-C_de43BE.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreCommon-D9tovFrj.js +0 -32
- package/dist/web/assets/__federation_expose_local-authCoreCommon-D9tovFrj.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-DKVkRzEo.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-D1fszuKq.js +0 -32
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-D1fszuKq.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-tw3UiMLM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DdrB9jrq.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvG5Zcxb.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CjIA8Av2.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-LpAGNm5N.js.map +0 -1
- package/dist/web/assets/__federation_shared_zod-BK7IELHt.js.map +0 -1
- package/dist/web/assets/model-merger-boZDknXa.js.map +0 -1
- package/dist/web/assets/plugin-definition-B7A-hS1o.js +0 -19
- package/dist/web/assets/plugin-definition-B7A-hS1o.js.map +0 -1
- package/dist/web/assets/plugin-definition-BeK0C-OP.js +0 -49
- package/dist/web/assets/plugin-definition-BeK0C-OP.js.map +0 -1
- package/dist/web/assets/plugin-definition-DfsGhMRb.js +0 -19
- package/dist/web/assets/plugin-definition-DfsGhMRb.js.map +0 -1
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
import type { def } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const createLocalAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
|
|
4
|
-
modelRefs: z.ZodObject<{
|
|
5
|
-
user: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
-
userAccount: z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
-
userRole: z.ZodEffects<z.ZodString, string, string>;
|
|
8
|
-
userSession: z.ZodEffects<z.ZodString, string, string>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
user: string;
|
|
11
|
-
userAccount: string;
|
|
12
|
-
userRole: string;
|
|
13
|
-
userSession: string;
|
|
14
|
-
}, {
|
|
15
|
-
user: string;
|
|
16
|
-
userAccount: string;
|
|
17
|
-
userRole: string;
|
|
18
|
-
userSession: string;
|
|
19
|
-
}>;
|
|
20
4
|
initialUserRoles: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>, string[] | undefined, string[] | undefined>;
|
|
21
5
|
userAdminRoles: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>, string[] | undefined, string[] | undefined>;
|
|
22
6
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
modelRefs: {
|
|
24
|
-
user: string;
|
|
25
|
-
userAccount: string;
|
|
26
|
-
userRole: string;
|
|
27
|
-
userSession: string;
|
|
28
|
-
};
|
|
29
7
|
userAdminRoles?: string[] | undefined;
|
|
30
8
|
initialUserRoles?: string[] | undefined;
|
|
31
9
|
}, {
|
|
32
|
-
modelRefs: {
|
|
33
|
-
user: string;
|
|
34
|
-
userAccount: string;
|
|
35
|
-
userRole: string;
|
|
36
|
-
userSession: string;
|
|
37
|
-
};
|
|
38
10
|
userAdminRoles?: string[] | undefined;
|
|
39
11
|
initialUserRoles?: string[] | undefined;
|
|
40
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC;;;;;;;;;EAqBjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,WAAW,CACrD,OAAO,qCAAqC,CAC7C,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,UAAU,CACzD,OAAO,qCAAqC,CAC7C,CAAC"}
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import { authRoleEntityType, definitionSchema,
|
|
1
|
+
import { authRoleEntityType, definitionSchema, } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export const createLocalAuthPluginDefinitionSchema = definitionSchema((ctx) => z.object({
|
|
4
|
-
modelRefs: z.object({
|
|
5
|
-
user: ctx.withRef({
|
|
6
|
-
type: modelEntityType,
|
|
7
|
-
onDelete: 'RESTRICT',
|
|
8
|
-
}),
|
|
9
|
-
userAccount: ctx.withRef({
|
|
10
|
-
type: modelEntityType,
|
|
11
|
-
onDelete: 'RESTRICT',
|
|
12
|
-
}),
|
|
13
|
-
userRole: ctx.withRef({
|
|
14
|
-
type: modelEntityType,
|
|
15
|
-
onDelete: 'RESTRICT',
|
|
16
|
-
}),
|
|
17
|
-
userSession: ctx.withRef({
|
|
18
|
-
type: modelEntityType,
|
|
19
|
-
onDelete: 'RESTRICT',
|
|
20
|
-
}),
|
|
21
|
-
}),
|
|
22
4
|
initialUserRoles: ctx.withDefault(z.array(ctx.withRef({
|
|
23
5
|
type: authRoleEntityType,
|
|
24
6
|
onDelete: 'DELETE',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/local-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qCAAqC,GAAG,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5E,CAAC,CAAC,MAAM,CAAC;IACP,gBAAgB,EAAE,GAAG,CAAC,WAAW,CAC/B,CAAC,CAAC,KAAK,CACL,GAAG,CAAC,OAAO,CAAC;QACV,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CACH,EACD,EAAE,CACH;IACD,cAAc,EAAE,GAAG,CAAC,WAAW,CAC7B,CAAC,CAAC,KAAK,CACL,GAAG,CAAC,OAAO,CAAC;QACV,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CACH,EACD,EAAE,CACH;CACF,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-names.d.ts","sourceRoot":"","sources":["../../../src/placeholder-auth/constants/model-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-names.js","sourceRoot":"","sources":["../../../src/placeholder-auth/constants/model-names.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,MAAM;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/placeholder-auth/core/common.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;;;;;;AAE/E,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/placeholder-auth/core/common.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;;;;;;AAE/E,wBAmBG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { authModelConfigSpec, createPlatformPluginExport,
|
|
1
|
+
import { authModelConfigSpec, createPlatformPluginExport, ModelUtils, pluginConfigSpec, } from '@baseplate-dev/project-builder-lib';
|
|
2
|
+
import { PLACEHOLDER_AUTH_MODELS } from '#src/placeholder-auth/constants/model-names.js';
|
|
2
3
|
import { createPlaceholderAuthPluginDefinitionSchema } from './schema/plugin-definition.js';
|
|
3
4
|
export default createPlatformPluginExport({
|
|
4
5
|
dependencies: {
|
|
@@ -11,10 +12,7 @@ export default createPlatformPluginExport({
|
|
|
11
12
|
config.registerSchemaCreator(pluginKey, createPlaceholderAuthPluginDefinitionSchema);
|
|
12
13
|
return {
|
|
13
14
|
authModelConfig: {
|
|
14
|
-
getUserModel: (definition) =>
|
|
15
|
-
const pluginConfig = PluginUtils.configByKeyOrThrow(definition, pluginKey);
|
|
16
|
-
return pluginConfig.modelRefs.user;
|
|
17
|
-
},
|
|
15
|
+
getUserModel: (definition) => ModelUtils.byNameOrThrow(definition, PLACEHOLDER_AUTH_MODELS.user),
|
|
18
16
|
},
|
|
19
17
|
};
|
|
20
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/placeholder-auth/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/placeholder-auth/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,UAAU,EACV,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,EAAE,2CAA2C,EAAE,MAAM,+BAA+B,CAAC;AAK5F,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,MAAM,EAAE,gBAAgB;KACzB;IACD,OAAO,EAAE;QACP,eAAe,EAAE,mBAAmB;KACrC;IACD,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QACxC,MAAM,CAAC,qBAAqB,CAC1B,SAAS,EACT,2CAA2C,CAC5C,CAAC;QACF,OAAO;YACL,eAAe,EAAE;gBACf,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE,CAC3B,UAAU,CAAC,aAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC,IAAI,CAAC;aACrE;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder-auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"placeholder-auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,+BAA+B,CAAC,EAC9C,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2GpC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createAndApplyModelMergerResults, createModelMergerResults, doesModelMergerResultsHaveChanges,
|
|
3
|
-
import {
|
|
2
|
+
import { createAndApplyModelMergerResults, createModelMergerResults, doesModelMergerResultsHaveChanges, PluginUtils, } from '@baseplate-dev/project-builder-lib';
|
|
3
|
+
import { ModelMergerResultAlert, useBlockUnsavedChangesNavigate, useDefinitionSchema, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
|
|
4
4
|
import { FormActionBar, SectionList, SectionListSection, SectionListSectionContent, SectionListSectionDescription, SectionListSectionHeader, SectionListSectionTitle, } from '@baseplate-dev/ui-components';
|
|
5
5
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { getAuthPluginDefinition } from '#src/auth/index.js';
|
|
8
8
|
import { AuthConfigTabs } from '#src/common/components/auth-config-tabs.js';
|
|
9
|
+
import { PLACEHOLDER_AUTH_MODELS } from '#src/placeholder-auth/constants/model-names.js';
|
|
9
10
|
import { createAuthModels } from '../schema/models.js';
|
|
10
11
|
import { createPlaceholderAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';
|
|
11
12
|
import '#src/styles.css';
|
|
@@ -17,30 +18,25 @@ export function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, me
|
|
|
17
18
|
if (pluginMetadata?.config) {
|
|
18
19
|
return pluginMetadata.config;
|
|
19
20
|
}
|
|
20
|
-
return {
|
|
21
|
-
|
|
22
|
-
user: ModelUtils.getModelIdByNameOrDefault(definition, 'User'),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}, [definition, pluginMetadata?.config]);
|
|
21
|
+
return {};
|
|
22
|
+
}, [pluginMetadata?.config]);
|
|
26
23
|
const form = useResettableForm({
|
|
27
24
|
resolver: zodResolver(authPluginDefinitionSchema),
|
|
28
25
|
defaultValues,
|
|
29
26
|
});
|
|
30
|
-
const { control, reset, handleSubmit
|
|
31
|
-
const modelRefs = watch('modelRefs');
|
|
27
|
+
const { control, reset, handleSubmit } = form;
|
|
32
28
|
const pendingModelChanges = useMemo(() => {
|
|
33
|
-
const desiredModels = createAuthModels(
|
|
34
|
-
return createModelMergerResults(
|
|
35
|
-
}, [definitionContainer, authDefinition
|
|
29
|
+
const desiredModels = createAuthModels(authDefinition);
|
|
30
|
+
return createModelMergerResults(PLACEHOLDER_AUTH_MODELS, desiredModels, definitionContainer);
|
|
31
|
+
}, [definitionContainer, authDefinition]);
|
|
36
32
|
const onSubmit = handleSubmit((data) => saveDefinitionWithFeedback((draftConfig) => {
|
|
37
33
|
const updatedData = {
|
|
38
34
|
...data,
|
|
39
35
|
};
|
|
40
|
-
|
|
36
|
+
createAndApplyModelMergerResults(draftConfig, PLACEHOLDER_AUTH_MODELS, createAuthModels(authDefinition), definitionContainer);
|
|
41
37
|
PluginUtils.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer.pluginStore);
|
|
42
38
|
}, {
|
|
43
|
-
successMessage: 'Successfully saved auth plugin!',
|
|
39
|
+
successMessage: 'Successfully saved placeholder auth plugin!',
|
|
44
40
|
onSuccess: () => {
|
|
45
41
|
onSave();
|
|
46
42
|
},
|
|
@@ -48,7 +44,7 @@ export function PlaceholderAuthDefinitionEditor({ definition: pluginMetadata, me
|
|
|
48
44
|
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
49
45
|
return (_jsxs("div", { className: "auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden", children: [_jsx(AuthConfigTabs, {}), _jsx("div", { className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto", style: {
|
|
50
46
|
'--action-bar-height': '52px',
|
|
51
|
-
}, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsx(SectionList, { children: _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Placeholder Auth Configuration" }), _jsx(SectionListSectionDescription, { children: "
|
|
47
|
+
}, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsx(SectionList, { children: _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Placeholder Auth Configuration" }), _jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(ModelMergerResultAlert, { pendingModelChanges: pendingModelChanges }) })] }) }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata ||
|
|
52
48
|
doesModelMergerResultsHaveChanges(pendingModelChanges) })] }) })] }));
|
|
53
49
|
}
|
|
54
50
|
//# sourceMappingURL=placeholder-auth-definition-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,
|
|
1
|
+
{"version":3,"file":"placeholder-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,iCAAiC,EACjC,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAIzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,2CAA2C,EAAE,MAAM,gCAAgC,CAAC;AAE7F,OAAO,iBAAiB,CAAC;AAEzB,MAAM,UAAU,+BAA+B,CAAC,EAC9C,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACS;IACf,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GACnE,oBAAoB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AE,CAAC;QACX,CAAC;KACF,CACF,CACF,CAAC;IAEF,8BAA8B,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,eAAK,SAAS,EAAC,+FAA+F,aAC5G,KAAC,cAAc,KAAG,EAClB,cACE,SAAS,EAAC,0EAA0E,EACpF,KAAK,EACH;oBACE,qBAAqB,EAAE,MAAM;iBACP,YAG1B,gBAAM,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,4BAA4B,aAC9D,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,WAAW,cACV,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,iDAEE,EAC1B,KAAC,6BAA6B,+EAEE,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,sBAAsB,IACrB,mBAAmB,EAAE,mBAAmB,GACxC,GACwB,IACT,GACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EACnB,CAAC,cAAc;gCACf,iCAAiC,CAAC,mBAAmB,CAAC,GAExD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import type { AuthPluginDefinition } from '#src/auth/core/schema/plugin-definition.js';
|
|
3
|
-
import
|
|
4
|
-
export declare function createAuthModels({
|
|
5
|
-
user: ModelMergerModelInput;
|
|
6
|
-
};
|
|
3
|
+
import { PLACEHOLDER_AUTH_MODELS } from '#src/placeholder-auth/constants/model-names.js';
|
|
4
|
+
export declare function createAuthModels({ authFeatureRef, }: AuthPluginDefinition): Record<keyof typeof PLACEHOLDER_AUTH_MODELS, ModelMergerModelInput>;
|
|
7
5
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,GACf,EAAE,oBAAoB,GAAG,MAAM,CAC9B,MAAM,OAAO,uBAAuB,EACpC,qBAAqB,CACtB,CAiCA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { PLACEHOLDER_AUTH_MODELS } from '#src/placeholder-auth/constants/model-names.js';
|
|
2
|
+
export function createAuthModels({ authFeatureRef, }) {
|
|
2
3
|
return {
|
|
3
4
|
user: {
|
|
4
|
-
name:
|
|
5
|
+
name: PLACEHOLDER_AUTH_MODELS.user,
|
|
5
6
|
featureRef: authFeatureRef,
|
|
6
7
|
model: {
|
|
7
8
|
fields: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/models.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/models.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,MAAM,UAAU,gBAAgB,CAAC,EAC/B,cAAc,GACO;IAIrB,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,uBAAuB,CAAC,IAAI;YAClC,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI;wBACV,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;qBAC3B;oBACD;wBACE,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,IAAI;qBACjB;iBACF;gBACD,mBAAmB,EAAE,CAAC,IAAI,CAAC;gBAC3B,iBAAiB,EAAE;oBACjB;wBACE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;qBAChC;iBACF;aACF;YACD,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,OAAO,EAAE,IAAI;oBACb,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;iBACxB;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import type { def } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export declare const createPlaceholderAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
|
|
4
|
-
|
|
5
|
-
user: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
-
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
user: string;
|
|
8
|
-
}, {
|
|
9
|
-
user: string;
|
|
10
|
-
}>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
modelRefs: {
|
|
13
|
-
user: string;
|
|
14
|
-
};
|
|
15
|
-
}, {
|
|
16
|
-
modelRefs: {
|
|
17
|
-
user: string;
|
|
18
|
-
};
|
|
19
|
-
}>;
|
|
20
|
-
export type PlaceholderAuthPluginDefinition = def.InferOutput<typeof createPlaceholderAuthPluginDefinitionSchema>;
|
|
3
|
+
export declare const createPlaceholderAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type PlaceholderAuthPluginDefinitionInput = def.InferInput<typeof createPlaceholderAuthPluginDefinitionSchema>;
|
|
21
5
|
//# sourceMappingURL=plugin-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAG9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2CAA2C,yIAEvD,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,GAAG,CAAC,UAAU,CAC/D,OAAO,2CAA2C,CACnD,CAAC"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { definitionSchema
|
|
1
|
+
import { definitionSchema } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export const createPlaceholderAuthPluginDefinitionSchema = definitionSchema((
|
|
4
|
-
modelRefs: z.object({
|
|
5
|
-
user: ctx.withRef({
|
|
6
|
-
type: modelEntityType,
|
|
7
|
-
onDelete: 'RESTRICT',
|
|
8
|
-
}),
|
|
9
|
-
}),
|
|
10
|
-
}));
|
|
3
|
+
export const createPlaceholderAuthPluginDefinitionSchema = definitionSchema((_) => z.object({}));
|
|
11
4
|
//# sourceMappingURL=plugin-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,2CAA2C,GAAG,gBAAgB,CACzE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CACpB,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-v1QB_w7U.js';
|
|
2
|
+
import { c as createAuth0PluginDefinitionSchema, A as AUTH0_MODELS } from './plugin-definition-CpmhXG71.js';
|
|
3
3
|
|
|
4
4
|
const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
|
|
5
5
|
{
|
|
@@ -20,7 +20,7 @@ const AUTH0_PLUGIN_CONFIG_MIGRATIONS = [
|
|
|
20
20
|
}
|
|
21
21
|
];
|
|
22
22
|
|
|
23
|
-
const {authModelConfigSpec,createPlatformPluginExport,pluginConfigSpec
|
|
23
|
+
const {authModelConfigSpec,createPlatformPluginExport,ModelUtils,pluginConfigSpec} = await importShared('@baseplate-dev/project-builder-lib');
|
|
24
24
|
const common = createPlatformPluginExport({
|
|
25
25
|
dependencies: {
|
|
26
26
|
config: pluginConfigSpec
|
|
@@ -33,17 +33,11 @@ const common = createPlatformPluginExport({
|
|
|
33
33
|
config.registerMigrations(pluginKey, AUTH0_PLUGIN_CONFIG_MIGRATIONS);
|
|
34
34
|
return {
|
|
35
35
|
authModelConfig: {
|
|
36
|
-
getUserModel: (definition) =>
|
|
37
|
-
const pluginConfig = PluginUtils.configByKeyOrThrow(
|
|
38
|
-
definition,
|
|
39
|
-
pluginKey
|
|
40
|
-
);
|
|
41
|
-
return pluginConfig.modelRefs.user;
|
|
42
|
-
}
|
|
36
|
+
getUserModel: (definition) => ModelUtils.byNameOrThrow(definition, AUTH0_MODELS.user)
|
|
43
37
|
}
|
|
44
38
|
};
|
|
45
39
|
}
|
|
46
40
|
});
|
|
47
41
|
|
|
48
42
|
export { common as default };
|
|
49
|
-
//# sourceMappingURL=__federation_expose_auth0CoreCommon-
|
|
43
|
+
//# sourceMappingURL=__federation_expose_auth0CoreCommon-zQL4xAil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_auth0CoreCommon-zQL4xAil.js","sources":["../../../src/auth0/core/schema/migrations.ts","../../../src/auth0/core/common.ts"],"sourcesContent":["import type { PluginConfigMigration } from '@baseplate-dev/project-builder-lib';\n\nexport const AUTH0_PLUGIN_CONFIG_MIGRATIONS: PluginConfigMigration[] = [\n {\n name: 'move-models',\n version: 1,\n migrate: (config) => {\n const typedConfig = config as { userAccountModelRef: string };\n return {\n updatedConfig: {\n ...typedConfig,\n userAccountModelRef: undefined,\n modelRefs: {\n user: typedConfig.userAccountModelRef,\n },\n },\n };\n },\n },\n];\n","import {\n authModelConfigSpec,\n createPlatformPluginExport,\n ModelUtils,\n pluginConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { AUTH0_MODELS } from '../constants/model-names.js';\nimport { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';\nimport { createAuth0PluginDefinitionSchema } from './schema/plugin-definition.js';\n\n// necessary for Typescript to infer the return type of the initialize function\nexport type { PluginPlatformModule } from '@baseplate-dev/project-builder-lib';\n\nexport default createPlatformPluginExport({\n dependencies: {\n config: pluginConfigSpec,\n },\n exports: {\n authModelConfig: authModelConfigSpec,\n },\n initialize: ({ config }, { pluginKey }) => {\n config.registerSchemaCreator(pluginKey, createAuth0PluginDefinitionSchema);\n config.registerMigrations(pluginKey, AUTH0_PLUGIN_CONFIG_MIGRATIONS);\n return {\n authModelConfig: {\n getUserModel: (definition) =>\n ModelUtils.byNameOrThrow(definition, AUTH0_MODELS.user),\n },\n };\n },\n});\n"],"names":[],"mappings":";;;AAEO,MAAM,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,mBAAA,CAAA,0BAAA,CAAA,UAAA,CAAA,gBAAA,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,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,YAAY,CAAC,EAAE,QAAU,EAAA,EAAE,WAAgB,KAAA;AACzC,IAAO,MAAA,CAAA,qBAAA,CAAsB,WAAW,iCAAiC,CAAA;AACzE,IAAO,MAAA,CAAA,kBAAA,CAAmB,WAAW,8BAA8B,CAAA;AACnE,IAAO,OAAA;AAAA,MACL,eAAiB,EAAA;AAAA,QACf,cAAc,CAAC,UAAA,KACb,WAAW,aAAc,CAAA,UAAA,EAAY,aAAa,IAAI;AAAA;AAC1D,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
2
|
import { j as jsxRuntimeExports } from './jsx-runtime-XI9uIe3W.js';
|
|
3
|
-
import { s, A as AuthConfigTabs } from './styles-
|
|
4
|
-
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-
|
|
5
|
-
import { c as createAuth0PluginDefinitionSchema } from './plugin-definition-
|
|
3
|
+
import { s, A as AuthConfigTabs } from './styles-DMYfkBXJ.js';
|
|
4
|
+
import { g as getAuthPluginDefinition } from './get-auth-plugin-definition-Qo_0oJFS.js';
|
|
5
|
+
import { A as AUTH0_MODELS, c as createAuth0PluginDefinitionSchema } from './plugin-definition-CpmhXG71.js';
|
|
6
6
|
|
|
7
|
-
function createAuth0Models({
|
|
7
|
+
function createAuth0Models({
|
|
8
|
+
authFeatureRef
|
|
9
|
+
}) {
|
|
8
10
|
return {
|
|
9
11
|
user: {
|
|
10
|
-
name:
|
|
12
|
+
name: AUTH0_MODELS.user,
|
|
11
13
|
featureRef: authFeatureRef,
|
|
12
14
|
model: {
|
|
13
15
|
fields: [
|
|
@@ -43,9 +45,9 @@ function createAuth0Models({ modelRefs }, { authFeatureRef }) {
|
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
const {createAndApplyModelMergerResults,createModelMergerResults,doesModelMergerResultsHaveChanges,
|
|
48
|
+
const {createAndApplyModelMergerResults,createModelMergerResults,doesModelMergerResultsHaveChanges,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
47
49
|
|
|
48
|
-
const {
|
|
50
|
+
const {ModelMergerResultAlert,useBlockUnsavedChangesNavigate,useDefinitionSchema,useProjectDefinition,useResettableForm} = await importShared('@baseplate-dev/project-builder-lib/web');
|
|
49
51
|
|
|
50
52
|
const {FormActionBar,SectionList,SectionListSection,SectionListSectionContent,SectionListSectionDescription,SectionListSectionHeader,SectionListSectionTitle} = await importShared('@baseplate-dev/ui-components');
|
|
51
53
|
const {useMemo} = await importShared('react');
|
|
@@ -62,27 +64,22 @@ function Auth0DefinitionEditor({
|
|
|
62
64
|
if (pluginMetadata?.config) {
|
|
63
65
|
return pluginMetadata.config;
|
|
64
66
|
}
|
|
65
|
-
return {
|
|
66
|
-
|
|
67
|
-
user: ModelUtils.getModelIdByNameOrDefault(definition, "User")
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
}, [definition, pluginMetadata?.config]);
|
|
67
|
+
return {};
|
|
68
|
+
}, [pluginMetadata?.config]);
|
|
71
69
|
const form = useResettableForm({
|
|
72
70
|
resolver: s(auth0PluginDefinitionSchema),
|
|
73
71
|
defaultValues
|
|
74
72
|
});
|
|
75
|
-
const { control, reset, handleSubmit
|
|
76
|
-
const modelRefs = watch("modelRefs");
|
|
73
|
+
const { control, reset, handleSubmit } = form;
|
|
77
74
|
const authDefinition = getAuthPluginDefinition(definition);
|
|
78
75
|
const pendingModelChanges = useMemo(() => {
|
|
79
|
-
const desiredModels = createAuth0Models(
|
|
76
|
+
const desiredModels = createAuth0Models(authDefinition);
|
|
80
77
|
return createModelMergerResults(
|
|
81
|
-
|
|
78
|
+
AUTH0_MODELS,
|
|
82
79
|
desiredModels,
|
|
83
80
|
definitionContainer
|
|
84
81
|
);
|
|
85
|
-
}, [definitionContainer, authDefinition
|
|
82
|
+
}, [definitionContainer, authDefinition]);
|
|
86
83
|
const onSubmit = handleSubmit(
|
|
87
84
|
(data) => saveDefinitionWithFeedback(
|
|
88
85
|
(draftConfig) => {
|
|
@@ -91,8 +88,8 @@ function Auth0DefinitionEditor({
|
|
|
91
88
|
};
|
|
92
89
|
createAndApplyModelMergerResults(
|
|
93
90
|
draftConfig,
|
|
94
|
-
|
|
95
|
-
createAuth0Models(
|
|
91
|
+
AUTH0_MODELS,
|
|
92
|
+
createAuth0Models(authDefinition),
|
|
96
93
|
definitionContainer
|
|
97
94
|
);
|
|
98
95
|
PluginUtils.setPluginConfig(
|
|
@@ -124,26 +121,14 @@ function Auth0DefinitionEditor({
|
|
|
124
121
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:pb-16", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SectionList, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSection, { children: [
|
|
125
122
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SectionListSectionHeader, { children: [
|
|
126
123
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionTitle, { children: "Auth0 Configuration" }),
|
|
127
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "
|
|
124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })
|
|
128
125
|
] }),
|
|
129
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
),
|
|
136
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth:grid auth:grid-cols-1 auth:gap-6 auth:md:grid-cols-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
137
|
-
ModelComboboxFieldController,
|
|
138
|
-
{
|
|
139
|
-
label: "User Model",
|
|
140
|
-
name: "modelRefs.user",
|
|
141
|
-
control,
|
|
142
|
-
canCreate: true,
|
|
143
|
-
description: "Select or create the model that will store user authentication data"
|
|
144
|
-
}
|
|
145
|
-
) })
|
|
146
|
-
] })
|
|
126
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionListSectionContent, { className: "auth:space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
127
|
+
ModelMergerResultAlert,
|
|
128
|
+
{
|
|
129
|
+
pendingModelChanges
|
|
130
|
+
}
|
|
131
|
+
) })
|
|
147
132
|
] }) }) }),
|
|
148
133
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
149
134
|
FormActionBar,
|
|
@@ -171,4 +156,4 @@ const web = createPlatformPluginExport({
|
|
|
171
156
|
});
|
|
172
157
|
|
|
173
158
|
export { web as default };
|
|
174
|
-
//# sourceMappingURL=__federation_expose_auth0CoreWeb-
|
|
159
|
+
//# sourceMappingURL=__federation_expose_auth0CoreWeb-BQJHnPPM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__federation_expose_auth0CoreWeb-BQJHnPPM.js","sources":["../../../src/auth0/core/schema/models.ts","../../../src/auth0/core/components/auth0-definition-editor.tsx","../../../src/auth0/core/web.ts"],"sourcesContent":["import type { ModelMergerModelInput } from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthPluginDefinition } from '#src/auth/core/schema/plugin-definition.js';\n\nimport { AUTH0_MODELS } from '#src/auth0/constants/model-names.js';\n\nexport function createAuth0Models({\n authFeatureRef,\n}: AuthPluginDefinition): Record<\n keyof typeof AUTH0_MODELS,\n ModelMergerModelInput\n> {\n return {\n user: {\n name: AUTH0_MODELS.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 createAndApplyModelMergerResults,\n createModelMergerResults,\n doesModelMergerResultsHaveChanges,\n PluginUtils,\n} from '@baseplate-dev/project-builder-lib';\nimport {\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 { zodResolver } from '@hookform/resolvers/zod';\nimport { useMemo } from 'react';\n\nimport { getAuthPluginDefinition } from '#src/auth/utils/get-auth-plugin-definition.js';\nimport { AUTH0_MODELS } from '#src/auth0/constants/model-names.js';\nimport { AuthConfigTabs } from '#src/common/components/auth-config-tabs.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 Auth0DefinitionEditor({\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 {} satisfies Auth0PluginDefinitionInput;\n }, [pluginMetadata?.config]);\n\n const form = useResettableForm({\n resolver: zodResolver(auth0PluginDefinitionSchema),\n defaultValues,\n });\n const { control, reset, handleSubmit } = form;\n\n const authDefinition = getAuthPluginDefinition(definition);\n\n const pendingModelChanges = useMemo(() => {\n const desiredModels = createAuth0Models(authDefinition);\n\n return createModelMergerResults(\n AUTH0_MODELS,\n desiredModels,\n definitionContainer,\n );\n }, [definitionContainer, authDefinition]);\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback(\n (draftConfig) => {\n const updatedData = {\n ...data,\n };\n createAndApplyModelMergerResults(\n draftConfig,\n AUTH0_MODELS,\n createAuth0Models(authDefinition),\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 <div className=\"auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden\">\n <AuthConfigTabs />\n <div\n className=\"auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto\"\n style={\n {\n '--action-bar-height': '52px',\n } as React.CSSProperties\n }\n >\n <form onSubmit={onSubmit} className=\"auth:max-w-6xl auth:flex-1\">\n <div className=\"auth:pb-16\">\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>\n Auth0 Configuration\n </SectionListSectionTitle>\n <SectionListSectionDescription>\n The plugin will automatically configure the models it needs.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"auth:space-y-6\">\n <ModelMergerResultAlert\n pendingModelChanges={pendingModelChanges}\n />\n </SectionListSectionContent>\n </SectionListSection>\n </SectionList>\n </div>\n\n <FormActionBar\n form={form}\n allowSaveWithoutDirty={\n !pluginMetadata ||\n doesModelMergerResultsHaveChanges(pendingModelChanges)\n }\n />\n </form>\n </div>\n </div>\n );\n}\n","import {\n createPlatformPluginExport,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\n\nimport { Auth0DefinitionEditor } from './components/auth0-definition-editor.js';\n\nimport '../../styles.css';\n\nexport default createPlatformPluginExport({\n dependencies: {\n webConfig: webConfigSpec,\n },\n exports: {},\n initialize: ({ webConfig }, { pluginKey }) => {\n webConfig.registerWebConfigComponent(pluginKey, Auth0DefinitionEditor);\n return {};\n },\n});\n"],"names":["zodResolver","jsxs","jsx"],"mappings":";;;;;;AAMO,SAAS,iBAAkB,CAAA;AAAA,EAChC;AACF,CAGE,EAAA;AACA,EAAO,OAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,MAAM,YAAa,CAAA,IAAA;AAAA,MACnB,UAAY,EAAA,cAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA;AAAA,UACN;AAAA,YACE,IAAM,EAAA,IAAA;AA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AA,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,WAAgB,KAAA;AAC5C,IAAU,SAAA,CAAA,0BAAA,CAA2B,WAAW,qBAAqB,CAAA;AACrE,IAAA,OAAO,EAAC;AAAA;AAEZ,CAAC,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
2
|
-
import { a as createAuthPluginDefinitionSchema } from './plugin-definition-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
|
+
import { a as createAuthPluginDefinitionSchema } from './plugin-definition-p6J3lSNe.js';
|
|
3
3
|
|
|
4
4
|
const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
|
|
5
5
|
const common = createPlatformPluginExport({
|
|
@@ -26,4 +26,4 @@ const common = createPlatformPluginExport({
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
export { common as default };
|
|
29
|
-
//# sourceMappingURL=__federation_expose_authCoreCommon-
|
|
29
|
+
//# sourceMappingURL=__federation_expose_authCoreCommon-hEy5zrff.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__federation_expose_authCoreCommon-
|
|
1
|
+
{"version":3,"file":"__federation_expose_authCoreCommon-hEy5zrff.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 }, { pluginKey }) => {\n config.registerSchemaCreator(pluginKey, createAuthPluginDefinitionSchema);\n return {\n authConfig: {\n getAuthRoles: (definition) => {\n const pluginConfig = PluginUtils.configByKeyOrThrow(\n definition,\n pluginKey,\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,WAAgB,KAAA;AACzC,IAAO,MAAA,CAAA,qBAAA,CAAsB,WAAW,gCAAgC,CAAA;AACxE,IAAO,OAAA;AAAA,MACL,UAAY,EAAA;AAAA,QACV,YAAA,EAAc,CAAC,UAAe,KAAA;AAC5B,UAAA,MAAM,eAAe,WAAY,CAAA,kBAAA;AAAA,YAC/B,UAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO,YAAa,CAAA,KAAA;AAAA;AACtB;AACF,KACF;AAAA;AAEJ,CAAC,CAAA;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
2
|
import { j as jsxRuntimeExports } from './jsx-runtime-XI9uIe3W.js';
|
|
3
|
-
import { s, A as AuthConfigTabs } from './styles-
|
|
4
|
-
import { c as createAuthRoleSchema, a as createAuthPluginDefinitionSchema, b as createDefaultAuthRoles } from './plugin-definition-
|
|
5
|
-
import { c as useFieldArray$1, a as useForm, d as useWatch } from './index.esm-
|
|
6
|
-
import { o as MdEdit, p as MdDeleteOutline, q as MdAdd } from './index-
|
|
3
|
+
import { s, A as AuthConfigTabs } from './styles-DMYfkBXJ.js';
|
|
4
|
+
import { c as createAuthRoleSchema, a as createAuthPluginDefinitionSchema, b as createDefaultAuthRoles } from './plugin-definition-p6J3lSNe.js';
|
|
5
|
+
import { c as useFieldArray$1, a as useForm, d as useWatch } from './index.esm-BsVb2e-m.js';
|
|
6
|
+
import { o as MdEdit, p as MdDeleteOutline, q as MdAdd } from './index-KXYo3x9T.js';
|
|
7
7
|
|
|
8
8
|
// src/rhf/useFieldArray.ts
|
|
9
9
|
const {useMemo: useMemo$1} = await importShared('react');
|
|
@@ -436,4 +436,4 @@ const web = createPlatformPluginExport({
|
|
|
436
436
|
});
|
|
437
437
|
|
|
438
438
|
export { web as default };
|
|
439
|
-
//# sourceMappingURL=__federation_expose_authCoreWeb-
|
|
439
|
+
//# sourceMappingURL=__federation_expose_authCoreWeb-UlIYc0cq.js.map
|