@baseplate-dev/plugin-auth 1.0.1 → 1.0.2
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/common.js +2 -2
- package/dist/auth/core/common.js.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.js +3 -2
- package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth/core/schema/plugin-definition.d.ts +22 -12
- package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth/core/schema/plugin-definition.js +10 -10
- package/dist/auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/core/common.js +2 -2
- package/dist/auth0/core/common.js.map +1 -1
- package/dist/auth0/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth0/core/components/auth-definition-editor.js +3 -2
- package/dist/auth0/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth0/core/components/role-dialog.d.ts.map +1 -1
- package/dist/auth0/core/components/role-dialog.js +3 -1
- package/dist/auth0/core/components/role-dialog.js.map +1 -1
- package/dist/auth0/core/node.d.ts.map +1 -1
- package/dist/auth0/core/node.js +0 -2
- package/dist/auth0/core/node.js.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +19 -9
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.js +7 -7
- package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +43 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js +2 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts +55 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js +52 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts +0 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js +2 -12
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts +150 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/generated/index.js +2 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.js.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js +2 -2
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.d.ts +162 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.js +54 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-renderers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js +2 -2
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/templates/routes/{auth0-callback.page.tsx → auth0-callback.tsx} +6 -4
- package/dist/auth0/generators/react/auth0-callback/templates/routes/{signup.page.tsx → signup.tsx} +10 -10
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts +136 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-components/generated/index.js +2 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.js.map +1 -1
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.d.ts +145 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.js +39 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-renderers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +17 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js +2 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +26 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +39 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +1 -0
- package/dist/roles/schema.d.ts +29 -10
- package/dist/roles/schema.d.ts.map +1 -1
- package/dist/roles/schema.js +7 -6
- package/dist/roles/schema.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-BE50qa2_.js → __federation_expose_auth0CoreCommon-BYomLcgs.js} +4 -4
- package/dist/web/assets/__federation_expose_auth0CoreCommon-BYomLcgs.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-AdDVCP7O.js → __federation_expose_auth0CoreWeb-T5lCcgD1.js} +14 -8
- package/dist/web/assets/__federation_expose_auth0CoreWeb-T5lCcgD1.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreCommon-DKyLSPCa.js → __federation_expose_authCoreCommon-CvirZ1-l.js} +4 -4
- package/dist/web/assets/__federation_expose_authCoreCommon-CvirZ1-l.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreWeb-CfCyOvUk.js → __federation_expose_authCoreWeb-BXQrtVzN.js} +10 -7
- package/dist/web/assets/__federation_expose_authCoreWeb-BXQrtVzN.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-CxP86CUK.js → __federation_fn_import-5oUmvVro.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-CxP86CUK.js.map → __federation_fn_import-5oUmvVro.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BFCvL5ku.js → web-DURp5OH4.js} +12 -12
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DURp5OH4.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-BAwM_-SS.js → project-builder-lib-SOC0hDo0.js} +572 -193
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-SOC0hDo0.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-C3uzqK6u.js → ui-components-BIPS02bW.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-C3uzqK6u.js.map → ui-components-BIPS02bW.js.map} +1 -1
- package/dist/web/assets/{index-scyXBD_d.js → index-BAu6L5Vh.js} +2 -2
- package/dist/web/assets/{index-scyXBD_d.js.map → index-BAu6L5Vh.js.map} +1 -1
- package/dist/web/assets/{index.esm-DIgRm3lq.js → index.esm-C_MMkPsN.js} +2 -2
- package/dist/web/assets/{index.esm-DIgRm3lq.js.map → index.esm-C_MMkPsN.js.map} +1 -1
- package/dist/web/assets/{model-merger-gxuB007n.js → model-merger-qTOhcMVY.js} +115 -538
- package/dist/web/assets/model-merger-qTOhcMVY.js.map +1 -0
- package/dist/web/assets/plugin-definition-7hIqggth.js +36 -0
- package/dist/web/assets/plugin-definition-7hIqggth.js.map +1 -0
- package/dist/web/assets/plugin-definition-BHJF50Kq.js +24 -0
- package/dist/web/assets/plugin-definition-BHJF50Kq.js.map +1 -0
- package/dist/web/assets/{react-CAuz_DuX.js → react-8Ha9uuy8.js} +2 -2
- package/dist/web/assets/{react-CAuz_DuX.js.map → react-8Ha9uuy8.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +4 -4
- package/dist/web/assets/schema-BdX0t_km.js +72 -0
- package/dist/web/assets/schema-BdX0t_km.js.map +1 -0
- package/dist/web/assets/{styles-BpKIyKWd.js → styles-3Wg6h_d_.js} +2 -2
- package/dist/web/assets/{styles-BpKIyKWd.js.map → styles-3Wg6h_d_.js.map} +1 -1
- package/package.json +10 -10
- package/dist/web/assets/__federation_expose_auth0CoreCommon-BE50qa2_.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-AdDVCP7O.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreCommon-DKyLSPCa.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-CfCyOvUk.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BFCvL5ku.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BAwM_-SS.js.map +0 -1
- package/dist/web/assets/model-merger-gxuB007n.js.map +0 -1
- package/dist/web/assets/plugin-definition-Bgi_XH0-.js +0 -22
- package/dist/web/assets/plugin-definition-Bgi_XH0-.js.map +0 -1
- package/dist/web/assets/plugin-definition-EtIvYJxn.js +0 -34
- package/dist/web/assets/plugin-definition-EtIvYJxn.js.map +0 -1
- package/dist/web/assets/schema-BAfRBwYE.js +0 -67
- package/dist/web/assets/schema-BAfRBwYE.js.map +0 -1
package/dist/auth/core/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { authConfigSpec, createPlatformPluginExport, pluginConfigSpec, PluginUtils, } from '@baseplate-dev/project-builder-lib';
|
|
2
|
-
import {
|
|
2
|
+
import { createAuthPluginDefinitionSchema } from './schema/plugin-definition.js';
|
|
3
3
|
export default createPlatformPluginExport({
|
|
4
4
|
dependencies: {
|
|
5
5
|
config: pluginConfigSpec,
|
|
@@ -8,7 +8,7 @@ export default createPlatformPluginExport({
|
|
|
8
8
|
authConfig: authConfigSpec,
|
|
9
9
|
},
|
|
10
10
|
initialize: ({ config }, { pluginId }) => {
|
|
11
|
-
config.
|
|
11
|
+
config.registerSchemaCreator(pluginId, createAuthPluginDefinitionSchema);
|
|
12
12
|
return {
|
|
13
13
|
authConfig: {
|
|
14
14
|
getUserModel: (definition) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/auth/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/auth/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAKjF,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,MAAM,EAAE,gBAAgB;KACzB;IACD,OAAO,EAAE;QACP,UAAU,EAAE,cAAc;KAC3B;IACD,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvC,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,gCAAgC,CAAC,CAAC;QACzE,OAAO;YACL,UAAU,EAAE;gBACV,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;oBAC3B,MAAM,YAAY,GAAG,WAAW,CAAC,iBAAiB,CAChD,UAAU,EACV,QAAQ,CACe,CAAC;oBAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;gBACrC,CAAC;gBACD,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;oBAC3B,MAAM,YAAY,GAAG,WAAW,CAAC,iBAAiB,CAChD,UAAU,EACV,QAAQ,CACe,CAAC;oBAC1B,OAAO,YAAY,CAAC,KAAK,CAAC;gBAC5B,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/components/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":"auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/components/auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0JpC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createAndApplyModelMergerResults, createModelMergerResults, FeatureUtils, ModelUtils, PluginUtils, } from '@baseplate-dev/project-builder-lib';
|
|
3
|
-
import { FeatureComboboxFieldController, ModelComboboxFieldController, ModelMergerResultAlert, useBlockUnsavedChangesNavigate, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
|
|
3
|
+
import { FeatureComboboxFieldController, ModelComboboxFieldController, ModelMergerResultAlert, useBlockUnsavedChangesNavigate, useDefinitionSchema, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle, FormActionBar, } from '@baseplate-dev/ui-components';
|
|
5
5
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { createDefaultAuthRoles } from '#src/roles/index.js';
|
|
8
8
|
import { createAuthModels } from '../schema/models.js';
|
|
9
|
-
import {
|
|
9
|
+
import { createAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';
|
|
10
10
|
import RoleEditorForm from './role-editor-form.js';
|
|
11
11
|
import '#src/styles.css';
|
|
12
12
|
export function AuthDefinitionEditor({ definition: pluginMetadata, metadata, onSave, }) {
|
|
13
13
|
const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
|
|
14
|
+
const authPluginDefinitionSchema = useDefinitionSchema(createAuthPluginDefinitionSchema);
|
|
14
15
|
const defaultValues = useMemo(() => {
|
|
15
16
|
if (pluginMetadata?.config) {
|
|
16
17
|
return pluginMetadata.config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/auth/core/components/auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,YAAY,EACZ,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/auth/core/components/auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,YAAY,EACZ,UAAU,EAC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YAC7B,KAAC,8BAA8B,IAC7B,KAAK,EAAC,mBAAmB,EACzB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,2EAA2E,GACvF,GACE,IACM,IACT,EAEP,KAAC,cAAc,IAAC,OAAO,EAAE,OAAO,GAAI,IAChC,EAEN,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,IACxB,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { def } from '@baseplate-dev/project-builder-lib';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const createAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
|
|
3
4
|
modelRefs: z.ZodObject<{
|
|
4
|
-
user:
|
|
5
|
-
userAccount:
|
|
6
|
-
userRole:
|
|
7
|
-
userSession:
|
|
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>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
user: string;
|
|
10
11
|
userAccount: string;
|
|
@@ -16,13 +17,12 @@ export declare const authPluginDefinitionSchema: z.ZodObject<{
|
|
|
16
17
|
userRole: string;
|
|
17
18
|
userSession: string;
|
|
18
19
|
}>;
|
|
19
|
-
authFeatureRef:
|
|
20
|
-
roles: z.ZodEffects<z.ZodEffects<z.ZodArray<
|
|
20
|
+
authFeatureRef: z.ZodEffects<z.ZodString, string, string>;
|
|
21
|
+
roles: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
21
23
|
name: z.ZodString;
|
|
22
24
|
comment: z.ZodString;
|
|
23
25
|
builtIn: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
-
} & {
|
|
25
|
-
id: z.ZodType<string, z.ZodAnyDef, string>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
id: string;
|
|
28
28
|
name: string;
|
|
@@ -33,7 +33,17 @@ export declare const authPluginDefinitionSchema: z.ZodObject<{
|
|
|
33
33
|
name: string;
|
|
34
34
|
comment: string;
|
|
35
35
|
builtIn?: boolean | undefined;
|
|
36
|
-
}
|
|
36
|
+
}>, {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
comment: string;
|
|
40
|
+
builtIn: boolean;
|
|
41
|
+
}, {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
comment: string;
|
|
45
|
+
builtIn?: boolean | undefined;
|
|
46
|
+
}>, "many">, {
|
|
37
47
|
id: string;
|
|
38
48
|
name: string;
|
|
39
49
|
comment: string;
|
|
@@ -83,6 +93,6 @@ export declare const authPluginDefinitionSchema: z.ZodObject<{
|
|
|
83
93
|
builtIn?: boolean | undefined;
|
|
84
94
|
}[];
|
|
85
95
|
}>;
|
|
86
|
-
export type AuthPluginDefinition =
|
|
87
|
-
export type AuthPluginDefinitionInput =
|
|
96
|
+
export type AuthPluginDefinition = def.InferOutput<typeof createAuthPluginDefinitionSchema>;
|
|
97
|
+
export type AuthPluginDefinitionInput = def.InferInput<typeof createAuthPluginDefinitionSchema>;
|
|
88
98
|
//# sourceMappingURL=plugin-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAO9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B5C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,WAAW,CAChD,OAAO,gCAAgC,CACxC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,UAAU,CACpD,OAAO,gCAAgC,CACxC,CAAC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { featureEntityType, modelEntityType,
|
|
1
|
+
import { definitionSchema, featureEntityType, modelEntityType, } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
export const
|
|
3
|
+
import { createAuthRolesSchema } from '#src/roles/index.js';
|
|
4
|
+
export const createAuthPluginDefinitionSchema = definitionSchema((ctx) => z.object({
|
|
5
5
|
modelRefs: z.object({
|
|
6
|
-
user:
|
|
6
|
+
user: ctx.withRef({
|
|
7
7
|
type: modelEntityType,
|
|
8
8
|
onDelete: 'RESTRICT',
|
|
9
9
|
}),
|
|
10
|
-
userAccount:
|
|
10
|
+
userAccount: ctx.withRef({
|
|
11
11
|
type: modelEntityType,
|
|
12
12
|
onDelete: 'RESTRICT',
|
|
13
13
|
}),
|
|
14
|
-
userRole:
|
|
14
|
+
userRole: ctx.withRef({
|
|
15
15
|
type: modelEntityType,
|
|
16
16
|
onDelete: 'RESTRICT',
|
|
17
17
|
}),
|
|
18
|
-
userSession:
|
|
18
|
+
userSession: ctx.withRef({
|
|
19
19
|
type: modelEntityType,
|
|
20
20
|
onDelete: 'RESTRICT',
|
|
21
21
|
}),
|
|
22
22
|
}),
|
|
23
|
-
authFeatureRef:
|
|
23
|
+
authFeatureRef: ctx.withRef({
|
|
24
24
|
type: featureEntityType,
|
|
25
25
|
onDelete: 'RESTRICT',
|
|
26
26
|
}),
|
|
27
|
-
roles:
|
|
28
|
-
});
|
|
27
|
+
roles: createAuthRolesSchema(ctx),
|
|
28
|
+
}));
|
|
29
29
|
//# sourceMappingURL=plugin-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CACvE,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;YAChB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU;SACrB,CAAC;QACF,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC;YACvB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU;SACrB,CAAC;QACF,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;YACpB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU;SACrB,CAAC;QACF,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC;YACvB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU;SACrB,CAAC;KACH,CAAC;IACF,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,UAAU;KACrB,CAAC;IACF,KAAK,EAAE,qBAAqB,CAAC,GAAG,CAAC;CAClC,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { authConfigSpec, createPlatformPluginExport, pluginConfigSpec, PluginUtils, } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { AUTH0_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';
|
|
3
|
-
import {
|
|
3
|
+
import { createAuth0PluginDefinitionSchema } from './schema/plugin-definition.js';
|
|
4
4
|
export default createPlatformPluginExport({
|
|
5
5
|
dependencies: {
|
|
6
6
|
config: pluginConfigSpec,
|
|
@@ -9,7 +9,7 @@ export default createPlatformPluginExport({
|
|
|
9
9
|
authConfig: authConfigSpec,
|
|
10
10
|
},
|
|
11
11
|
initialize: ({ config }, { pluginId }) => {
|
|
12
|
-
config.
|
|
12
|
+
config.registerSchemaCreator(pluginId, createAuth0PluginDefinitionSchema);
|
|
13
13
|
config.registerMigrations(pluginId, AUTH0_PLUGIN_CONFIG_MIGRATIONS);
|
|
14
14
|
return {
|
|
15
15
|
authConfig: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/auth0/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/auth0/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAElF,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,MAAM,EAAE,gBAAgB;KACzB;IACD,OAAO,EAAE;QACP,UAAU,EAAE,cAAc;KAC3B;IACD,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvC,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,iCAAiC,CAAC,CAAC;QAC1E,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,8BAA8B,CAAC,CAAC;QACpE,OAAO;YACL,UAAU,EAAE;gBACV,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;oBAC3B,MAAM,YAAY,GAAG,WAAW,CAAC,iBAAiB,CAChD,UAAU,EACV,QAAQ,CACgB,CAAC;oBAC3B,OAAO,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;gBACrC,CAAC;gBACD,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;oBAC3B,MAAM,YAAY,GAAG,WAAW,CAAC,iBAAiB,CAChD,UAAU,EACV,QAAQ,CACgB,CAAC;oBAC3B,OAAO,YAAY,CAAC,KAAK,CAAC;gBAC5B,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/components/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":"auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/components/auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkIpC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { authRoleEntityType, createAndApplyModelMergerResults, createModelMergerResults, FeatureUtils, ModelUtils, PluginUtils, } from '@baseplate-dev/project-builder-lib';
|
|
3
|
-
import { FeatureComboboxFieldController, ModelComboboxFieldController, ModelMergerResultAlert, useBlockUnsavedChangesNavigate, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
|
|
3
|
+
import { FeatureComboboxFieldController, ModelComboboxFieldController, 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 { AUTH_DEFAULT_ROLES } from '#src/roles/index.js';
|
|
8
8
|
import { createAuth0Models } from '../schema/models.js';
|
|
9
|
-
import {
|
|
9
|
+
import { createAuth0PluginDefinitionSchema } from '../schema/plugin-definition.js';
|
|
10
10
|
import RoleEditorForm from './role-editor-form.js';
|
|
11
11
|
import '#src/styles.css';
|
|
12
12
|
export function AuthDefinitionEditor({ definition: pluginMetadata, metadata, onSave, }) {
|
|
13
13
|
const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
|
|
14
|
+
const auth0PluginDefinitionSchema = useDefinitionSchema(createAuth0PluginDefinitionSchema);
|
|
14
15
|
const defaultValues = useMemo(() => {
|
|
15
16
|
if (pluginMetadata?.config) {
|
|
16
17
|
return pluginMetadata.config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/auth0/core/components/auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,wBAAwB,EACxB,YAAY,EACZ,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,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,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/auth0/core/components/auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,wBAAwB,EACxB,YAAY,EACZ,UAAU,EACV,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,EAC5B,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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,YACzB,MAAC,WAAW,eACV,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,sCAEE,EAC1B,KAAC,6BAA6B,kGAGE,IACP,EAC3B,MAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,aACnD,KAAC,sBAAsB,IACrB,mBAAmB,EAAE,mBAAmB,GACxC,EAEF,eAAK,SAAS,EAAC,2DAA2D,aACxE,KAAC,4BAA4B,IAC3B,KAAK,EAAC,YAAY,EAClB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,qEAAqE,GACjF,EACF,KAAC,8BAA8B,IAC7B,KAAK,EAAC,mBAAmB,EACzB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,WAAW,EAAC,2EAA2E,GACvF,IACE,IACoB,IACT,EAErB,KAAC,cAAc,IAAC,OAAO,EAAE,OAAO,GAAI,IACxB,GACV,EAEN,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,IACxB,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-dialog.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/components/role-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"role-dialog.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/components/role-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,KAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmErC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useDefinitionSchema } from '@baseplate-dev/project-builder-lib/web';
|
|
2
3
|
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, InputFieldController, } from '@baseplate-dev/ui-components';
|
|
3
4
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
5
|
import { useId } from 'react';
|
|
5
6
|
import { useForm } from 'react-hook-form';
|
|
6
|
-
import {
|
|
7
|
+
import { createAuthRoleSchema } from '#src/roles/schema.js';
|
|
7
8
|
export function RoleDialog({ open, onOpenChange, role, isNew = false, onSave, asChild, children, }) {
|
|
9
|
+
const authRoleSchema = useDefinitionSchema(createAuthRoleSchema);
|
|
8
10
|
const form = useForm({
|
|
9
11
|
resolver: zodResolver(authRoleSchema),
|
|
10
12
|
values: role,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-dialog.js","sourceRoot":"","sources":["../../../../src/auth0/core/components/role-dialog.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OA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|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/auth0/core/node.ts"],"names":[],"mappings":";;;AA+BA,wBAqFG"}
|
package/dist/auth0/core/node.js
CHANGED
|
@@ -49,7 +49,6 @@ export default createPlatformPluginExport({
|
|
|
49
49
|
auth0Apollo: auth0ApolloGenerator({}),
|
|
50
50
|
auth0Components: auth0ComponentsGenerator({}),
|
|
51
51
|
auth0Callback: reactRoutesGenerator({
|
|
52
|
-
id: 'auth',
|
|
53
52
|
name: 'auth',
|
|
54
53
|
children: {
|
|
55
54
|
auth: auth0CallbackGenerator({}),
|
|
@@ -71,7 +70,6 @@ export default createPlatformPluginExport({
|
|
|
71
70
|
auth0Apollo: auth0ApolloGenerator({}),
|
|
72
71
|
auth0Components: auth0ComponentsGenerator({}),
|
|
73
72
|
auth0Callback: reactRoutesGenerator({
|
|
74
|
-
id: 'auth',
|
|
75
73
|
name: 'auth',
|
|
76
74
|
children: {
|
|
77
75
|
auth: auth0CallbackGenerator({}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/auth0/core/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,WAAW,EACX,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,WAAW,EAAE,eAAe;KAC7B;IACD,OAAO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wBAAwB,CAAC,EAAE,CAAC;oBAC7C,aAAa,EAAE,oBAAoB,CAAC;wBAClC,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE;4BACR,IAAI,EAAE,sBAAsB,CAAC,EAAE,CAAC;yBACjC;qBACF,CAAC;iBACH,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QACH,WAAW,CAAC,mBAAmB,CAAC;YAC9B,QAAQ;YACR,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;gBAC3B,WAAW,CAAC,eAAe,CAAC;oBAC1B,IAAI,EAAE,mBAAmB,CAAC;wBACxB,YAAY,EAAE,qBAAqB;qBACpC,CAAC;oBACF,SAAS,EAAE,mBAAmB,CAAC,EAAE,CAAC;oBAClC,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;oBACvC,WAAW,EAAE,oBAAoB,CAAC,EAAE,CAAC;oBACrC,eAAe,EAAE,wBAAwB,CAAC,EAAE,CAAC;oBAC7C,aAAa,EAAE,oBAAoB,CAAC;wBAClC,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE;4BACR,IAAI,EAAE,sBAAsB,CAAC,EAAE,CAAC;yBACjC;qBACF,CAAC;iBACH,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import type { def } from '@baseplate-dev/project-builder-lib';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const createAuth0PluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
|
|
3
4
|
modelRefs: z.ZodObject<{
|
|
4
|
-
user:
|
|
5
|
+
user: z.ZodEffects<z.ZodString, string, string>;
|
|
5
6
|
}, "strip", z.ZodTypeAny, {
|
|
6
7
|
user: string;
|
|
7
8
|
}, {
|
|
8
9
|
user: string;
|
|
9
10
|
}>;
|
|
10
|
-
authFeatureRef:
|
|
11
|
-
roles: z.ZodEffects<z.ZodEffects<z.ZodArray<
|
|
11
|
+
authFeatureRef: z.ZodEffects<z.ZodString, string, string>;
|
|
12
|
+
roles: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
12
14
|
name: z.ZodString;
|
|
13
15
|
comment: z.ZodString;
|
|
14
16
|
builtIn: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
-
} & {
|
|
16
|
-
id: z.ZodType<string, z.ZodAnyDef, string>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
18
|
id: string;
|
|
19
19
|
name: string;
|
|
@@ -24,7 +24,17 @@ export declare const auth0PluginDefinitionSchema: z.ZodObject<{
|
|
|
24
24
|
name: string;
|
|
25
25
|
comment: string;
|
|
26
26
|
builtIn?: boolean | undefined;
|
|
27
|
-
}
|
|
27
|
+
}>, {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
comment: string;
|
|
31
|
+
builtIn: boolean;
|
|
32
|
+
}, {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
comment: string;
|
|
36
|
+
builtIn?: boolean | undefined;
|
|
37
|
+
}>, "many">, {
|
|
28
38
|
id: string;
|
|
29
39
|
name: string;
|
|
30
40
|
comment: string;
|
|
@@ -68,6 +78,6 @@ export declare const auth0PluginDefinitionSchema: z.ZodObject<{
|
|
|
68
78
|
builtIn?: boolean | undefined;
|
|
69
79
|
}[];
|
|
70
80
|
}>;
|
|
71
|
-
export type Auth0PluginDefinition =
|
|
72
|
-
export type Auth0PluginDefinitionInput =
|
|
81
|
+
export type Auth0PluginDefinition = def.InferOutput<typeof createAuth0PluginDefinitionSchema>;
|
|
82
|
+
export type Auth0PluginDefinitionInput = def.InferInput<typeof createAuth0PluginDefinitionSchema>;
|
|
73
83
|
//# sourceMappingURL=plugin-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/schema/plugin-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth0/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAO9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc7C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,WAAW,CACjD,OAAO,iCAAiC,CACzC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,GAAG,CAAC,UAAU,CACrD,OAAO,iCAAiC,CACzC,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { featureEntityType, modelEntityType,
|
|
1
|
+
import { definitionSchema, featureEntityType, modelEntityType, } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
export const
|
|
3
|
+
import { createAuthRolesSchema } from '#src/roles/index.js';
|
|
4
|
+
export const createAuth0PluginDefinitionSchema = definitionSchema((ctx) => z.object({
|
|
5
5
|
modelRefs: z.object({
|
|
6
|
-
user:
|
|
6
|
+
user: ctx.withRef({
|
|
7
7
|
type: modelEntityType,
|
|
8
8
|
onDelete: 'RESTRICT',
|
|
9
9
|
}),
|
|
10
10
|
}),
|
|
11
|
-
authFeatureRef:
|
|
11
|
+
authFeatureRef: ctx.withRef({
|
|
12
12
|
type: featureEntityType,
|
|
13
13
|
onDelete: 'RESTRICT',
|
|
14
14
|
}),
|
|
15
|
-
roles:
|
|
16
|
-
});
|
|
15
|
+
roles: createAuthRolesSchema(ctx),
|
|
16
|
+
}));
|
|
17
17
|
//# sourceMappingURL=plugin-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/auth0/core/schema/plugin-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-definition.js","sourceRoot":"","sources":["../../../../src/auth0/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,iCAAiC,GAAG,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CACxE,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;YAChB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU;SACrB,CAAC;KACH,CAAC;IACF,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,UAAU;KACrB,CAAC;IACF,KAAK,EAAE,qBAAqB,CAAC,GAAG,CAAC;CAClC,CAAC,CACH,CAAC"}
|
|
@@ -16,6 +16,49 @@ export declare const AUTH0_AUTH0_MODULE_GENERATED: {
|
|
|
16
16
|
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
17
17
|
}, undefined>;
|
|
18
18
|
};
|
|
19
|
+
renderers: {
|
|
20
|
+
provider: import("@baseplate-dev/sync").ProviderType<import("./template-renderers.js").Auth0Auth0ModuleRenderers>;
|
|
21
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
22
|
+
auth0Auth0ModuleRenderers: import("@baseplate-dev/sync").ProviderExport<import("./template-renderers.js").Auth0Auth0ModuleRenderers>;
|
|
23
|
+
}, {
|
|
24
|
+
authContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
25
|
+
AuthContext: {
|
|
26
|
+
isTypeOnly: true;
|
|
27
|
+
};
|
|
28
|
+
AuthSessionInfo: {
|
|
29
|
+
isTypeOnly: true;
|
|
30
|
+
};
|
|
31
|
+
AuthUserSessionInfo: {
|
|
32
|
+
isTypeOnly: true;
|
|
33
|
+
};
|
|
34
|
+
createAuthContextFromSessionInfo: {};
|
|
35
|
+
InvalidSessionError: {};
|
|
36
|
+
}>>;
|
|
37
|
+
authRolesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
38
|
+
AuthRole: {
|
|
39
|
+
isTypeOnly: true;
|
|
40
|
+
};
|
|
41
|
+
DEFAULT_PUBLIC_ROLES: {};
|
|
42
|
+
DEFAULT_USER_ROLES: {};
|
|
43
|
+
RoleConfig: {
|
|
44
|
+
isTypeOnly: true;
|
|
45
|
+
};
|
|
46
|
+
}>>;
|
|
47
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
48
|
+
config: {};
|
|
49
|
+
}>>;
|
|
50
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").Auth0Auth0ModulePaths>;
|
|
51
|
+
typescriptFile: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").TypescriptFileProvider>;
|
|
52
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
53
|
+
UserSessionPayload: {
|
|
54
|
+
isTypeOnly: true;
|
|
55
|
+
};
|
|
56
|
+
UserSessionService: {
|
|
57
|
+
isTypeOnly: true;
|
|
58
|
+
};
|
|
59
|
+
}>>;
|
|
60
|
+
}, undefined>;
|
|
61
|
+
};
|
|
19
62
|
templates: {
|
|
20
63
|
management: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
21
64
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AUTH0_AUTH0_MODULE_PATHS } from './template-paths.js';
|
|
2
|
+
import { AUTH0_AUTH0_MODULE_RENDERERS } from './template-renderers.js';
|
|
2
3
|
import { AUTH0_AUTH0_MODULE_IMPORTS } from './ts-import-providers.js';
|
|
3
4
|
import { AUTH0_AUTH0_MODULE_TEMPLATES } from './typed-templates.js';
|
|
4
5
|
export const AUTH0_AUTH0_MODULE_GENERATED = {
|
|
5
6
|
imports: AUTH0_AUTH0_MODULE_IMPORTS,
|
|
6
7
|
paths: AUTH0_AUTH0_MODULE_PATHS,
|
|
8
|
+
renderers: AUTH0_AUTH0_MODULE_RENDERERS,
|
|
7
9
|
templates: AUTH0_AUTH0_MODULE_TEMPLATES,
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,4BAA4B;CACxC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,4BAA4B;IACvC,SAAS,EAAE,4BAA4B;CACxC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { RenderTsTemplateFileActionInput } from '@baseplate-dev/core-generators';
|
|
2
|
+
import type { BuilderAction } from '@baseplate-dev/sync';
|
|
3
|
+
import { AUTH0_AUTH0_MODULE_TEMPLATES } from './typed-templates.js';
|
|
4
|
+
export interface Auth0Auth0ModuleRenderers {
|
|
5
|
+
management: {
|
|
6
|
+
render: (options: Omit<RenderTsTemplateFileActionInput<typeof AUTH0_AUTH0_MODULE_TEMPLATES.management>, 'destination' | 'importMapProviders' | 'template'>) => BuilderAction;
|
|
7
|
+
};
|
|
8
|
+
userSessionService: {
|
|
9
|
+
render: (options: Omit<RenderTsTemplateFileActionInput<typeof AUTH0_AUTH0_MODULE_TEMPLATES.userSessionService>, 'destination' | 'importMapProviders' | 'template'>) => BuilderAction;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const AUTH0_AUTH0_MODULE_RENDERERS: {
|
|
13
|
+
provider: import("@baseplate-dev/sync").ProviderType<Auth0Auth0ModuleRenderers>;
|
|
14
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
15
|
+
auth0Auth0ModuleRenderers: import("@baseplate-dev/sync").ProviderExport<Auth0Auth0ModuleRenderers>;
|
|
16
|
+
}, {
|
|
17
|
+
authContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
18
|
+
AuthContext: {
|
|
19
|
+
isTypeOnly: true;
|
|
20
|
+
};
|
|
21
|
+
AuthSessionInfo: {
|
|
22
|
+
isTypeOnly: true;
|
|
23
|
+
};
|
|
24
|
+
AuthUserSessionInfo: {
|
|
25
|
+
isTypeOnly: true;
|
|
26
|
+
};
|
|
27
|
+
createAuthContextFromSessionInfo: {};
|
|
28
|
+
InvalidSessionError: {};
|
|
29
|
+
}>>;
|
|
30
|
+
authRolesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
31
|
+
AuthRole: {
|
|
32
|
+
isTypeOnly: true;
|
|
33
|
+
};
|
|
34
|
+
DEFAULT_PUBLIC_ROLES: {};
|
|
35
|
+
DEFAULT_USER_ROLES: {};
|
|
36
|
+
RoleConfig: {
|
|
37
|
+
isTypeOnly: true;
|
|
38
|
+
};
|
|
39
|
+
}>>;
|
|
40
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
41
|
+
config: {};
|
|
42
|
+
}>>;
|
|
43
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").Auth0Auth0ModulePaths>;
|
|
44
|
+
typescriptFile: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").TypescriptFileProvider>;
|
|
45
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
46
|
+
UserSessionPayload: {
|
|
47
|
+
isTypeOnly: true;
|
|
48
|
+
};
|
|
49
|
+
UserSessionService: {
|
|
50
|
+
isTypeOnly: true;
|
|
51
|
+
};
|
|
52
|
+
}>>;
|
|
53
|
+
}, undefined>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=template-renderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-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;AAYzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,4BAA4B,CAAC,UAAU,CAC/C,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,CAClD,KACE,aAAa,CAAC;KACpB,CAAC;IACF,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,4BAA4B,CAAC,kBAAkB,CACvD,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,CAClD,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AAyDD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxC,CAAC"}
|