@baseplate-dev/plugin-auth 0.1.3 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +6 -3
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts +13 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js +20 -8
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js.map +1 -1
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts +88 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.js +9 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts +16 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.js +26 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js +23 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +26 -41
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js +68 -0
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/index.d.ts +2 -0
- package/dist/auth/generators/fastify/auth-module/index.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/index.js +2 -0
- package/dist/auth/generators/fastify/auth-module/index.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/cookie-signer.ts +6 -0
- package/dist/auth/generators/fastify/index.d.ts +1 -1
- package/dist/auth/generators/fastify/index.d.ts.map +1 -1
- package/dist/auth/generators/fastify/index.js +1 -1
- package/dist/auth/generators/fastify/index.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +14 -6
- 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 +11 -16
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +62 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js +9 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +13 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +23 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +23 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.js → typed-templates.js} +11 -8
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts +2 -0
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/index.js +2 -0
- package/dist/auth0/generators/fastify/auth0-module/index.js.map +1 -0
- package/dist/auth0/generators/fastify/index.d.ts +1 -1
- package/dist/auth0/generators/fastify/index.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/index.js +1 -1
- package/dist/auth0/generators/fastify/index.js.map +1 -1
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-apollo/index.js +2 -0
- package/dist/auth0/generators/react/auth0-apollo/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts +101 -8
- 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 +10 -11
- 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 +290 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.js +7 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts +13 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js +23 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts +280 -0
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/{ts-templates.js → typed-templates.js} +11 -9
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-callback/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/index.js +2 -0
- package/dist/auth0/generators/react/auth0-callback/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/templates/{auth0-callback.page.tsx → routes/auth0-callback.page.tsx} +3 -3
- package/dist/auth0/generators/react/auth0-callback/templates/{signup.page.tsx → routes/signup.page.tsx} +3 -3
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts +106 -12
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js +12 -16
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts +151 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.js +9 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts +12 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js +22 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js +25 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts +132 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js +17 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-components/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/index.js +2 -0
- package/dist/auth0/generators/react/auth0-components/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/templates/{RequireAuth.tsx → src/components/require-auth/require-auth.tsx} +4 -4
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +10 -2
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +13 -24
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +51 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js +9 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +16 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js +26 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts +16 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js +27 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +44 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +67 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/index.js +2 -0
- package/dist/auth0/generators/react/auth0-hooks/index.js.map +1 -0
- package/dist/auth0/generators/react/index.d.ts +5 -5
- package/dist/auth0/generators/react/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/index.js +5 -5
- package/dist/auth0/generators/react/index.js.map +1 -1
- package/dist/auth0/generators/react/react-auth0/index.d.ts +2 -0
- package/dist/auth0/generators/react/react-auth0/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/index.js +2 -0
- package/dist/auth0/generators/react/react-auth0/index.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js → __federation_expose_auth0CoreCommon-BE50qa2_.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js.map → __federation_expose_auth0CoreCommon-BE50qa2_.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BlCwYpTq.js → __federation_expose_auth0CoreWeb-AdDVCP7O.js} +7 -9
- package/dist/web/assets/__federation_expose_auth0CoreWeb-AdDVCP7O.js.map +1 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-DKyLSPCa.js +36 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-DKyLSPCa.js.map +1 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-CfCyOvUk.js +442 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-CfCyOvUk.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js → __federation_fn_import-CxP86CUK.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js.map → __federation_fn_import-CxP86CUK.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXHJHUXP.js → web-BFCvL5ku.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BFCvL5ku.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-GtzVuDsM.js → project-builder-lib-BAwM_-SS.js} +150 -159
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BAwM_-SS.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-ChoqtPkg.js → ui-components-C3uzqK6u.js} +18156 -10210
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-C3uzqK6u.js.map +1 -0
- package/dist/web/assets/{index-BxDOOHD-.js → index-scyXBD_d.js} +10 -4
- package/dist/web/assets/{index-BxDOOHD-.js.map → index-scyXBD_d.js.map} +1 -1
- package/dist/web/assets/{index.esm-BZEyAv4m.js → index.esm-DIgRm3lq.js} +3 -3
- package/dist/web/assets/{index.esm-BZEyAv4m.js.map → index.esm-DIgRm3lq.js.map} +1 -1
- package/dist/web/assets/{model-merger-CdV-7CWE.js → model-merger-gxuB007n.js} +33 -23
- package/dist/web/assets/model-merger-gxuB007n.js.map +1 -0
- package/dist/web/assets/plugin-definition-Bgi_XH0-.js +22 -0
- package/dist/web/assets/plugin-definition-Bgi_XH0-.js.map +1 -0
- package/dist/web/assets/plugin-definition-EtIvYJxn.js +34 -0
- package/dist/web/assets/plugin-definition-EtIvYJxn.js.map +1 -0
- package/dist/web/assets/{react-BfiX28GO.js → react-CAuz_DuX.js} +2 -2
- package/dist/web/assets/{react-BfiX28GO.js.map → react-CAuz_DuX.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +8 -2
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/{plugin-definition-C9Q-BrBQ.js → schema-BAfRBwYE.js} +16 -27
- package/dist/web/assets/schema-BAfRBwYE.js.map +1 -0
- package/dist/web/assets/styles-BpKIyKWd.js +8 -0
- package/dist/web/assets/styles-BpKIyKWd.js.map +1 -0
- package/manifest.json +1 -1
- package/package.json +18 -10
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js +0 -94
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/templates/management.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session-payload.object-type.ts +0 -23
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.mutations.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.queries.ts +0 -20
- package/dist/auth/generators/fastify/auth-module/templates/user-session.service.ts +0 -101
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts +0 -106
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts +0 -45
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js +0 -13
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts +0 -8
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js +0 -12
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js +0 -16
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts +0 -33
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js +0 -50
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BlCwYpTq.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXHJHUXP.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-GtzVuDsM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ChoqtPkg.js.map +0 -1
- package/dist/web/assets/model-merger-CdV-7CWE.js.map +0 -1
- package/dist/web/assets/plugin-definition-C9Q-BrBQ.js.map +0 -1
- /package/dist/auth/generators/fastify/auth-module/templates/{user-session.constants.ts → module/constants/user-session.constants.ts} +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{services → module/services}/user-session.service.ts +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/session-cookie.ts +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/verify-request-origin.ts +0 -0
- /package/dist/auth0/generators/fastify/auth0-module/templates/{management.ts → module/services/management.ts} +0 -0
- /package/dist/auth0/generators/fastify/auth0-module/templates/{user-session.service.ts → module/services/user-session.service.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.gql → src/hooks/useCurrentUser.gql} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.ts → src/hooks/useCurrentUser.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useLogOut.ts → src/hooks/useLogOut.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useRequiredUserId.ts → src/hooks/useRequiredUserId.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useSession.ts → src/hooks/useSession.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createPluginSpec, i as isEqual, m as mapValues, a as createEntityType, z as zodPluginSymbol, Z as ZodRefWrapper, g as get$1, s as set$1, C as CASE_VALIDATORS,
|
|
2
|
-
export {
|
|
3
|
-
import { importShared } from '../__federation_fn_import-
|
|
1
|
+
import { c as createPluginSpec, i as isEqual, m as mapValues, a as createEntityType, z as zodPluginSymbol, Z as ZodRefWrapper, g as get$1, s as set$1, C as CASE_VALIDATORS, d as definitionSchema, b as zRef, e as modelForeignRelationEntityType, f as modelLocalRelationEntityType, h as modelScalarFieldEntityType, j as zEnt, k as modelTransformerEntityType, l as createDefinitionEntityNameResolver, n as modelEntityType, o as modelEnumValueEntityType, p as featureEntityType, q as modelEnumEntityType, r as zRefBuilder, t as zRefId, u as modelUniqueConstraintEntityType, v as createFeaturesSchema, M as ModelUtils, w as zPluginWrapper, x as omit, y as cloneDeep } from '../model-merger-gxuB007n.js';
|
|
2
|
+
export { S as DefinitionDiffArrayIncludesField, Q as DefinitionDiffKeyedArrayField, R as DefinitionDiffReplacementField, G as DefinitionEntityType, F as FeatureUtils, A as ZodPluginWrapper, E as ZodRef, D as ZodRefBuilder, V as applyDefinitionDiff, N as applyModelMergerDiff, O as applyModelMergerResultInPlace, P as createAndApplyModelMergerResults, U as createDefinitionDiff, T as createDefinitionDiffConfig, I as createFeatureSchema, B as createInitializedPluginSpec, K as createModelMergerResult, L as createModelMergerResults, H as featureNameSchema, J as modelMergerDefinitionDiffConfig } from '../model-merger-gxuB007n.js';
|
|
3
|
+
import { importShared } from '../__federation_fn_import-CxP86CUK.js';
|
|
4
4
|
|
|
5
5
|
function createAdminCrudInputCompilerImplementation() {
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1473,27 +1473,27 @@ function createPluginConfigImplementation() {
|
|
|
1473
1473
|
const schemas = new Map();
|
|
1474
1474
|
const migrationsMap = new Map();
|
|
1475
1475
|
return {
|
|
1476
|
-
registerSchema(
|
|
1477
|
-
if (schemas.has(
|
|
1478
|
-
throw new Error(`Schema for plugin ${
|
|
1476
|
+
registerSchema(pluginKey, schema) {
|
|
1477
|
+
if (schemas.has(pluginKey)) {
|
|
1478
|
+
throw new Error(`Schema for plugin ${pluginKey} is already registered`);
|
|
1479
1479
|
}
|
|
1480
|
-
schemas.set(
|
|
1480
|
+
schemas.set(pluginKey, schema);
|
|
1481
1481
|
},
|
|
1482
|
-
registerMigrations(
|
|
1483
|
-
if (migrationsMap.has(
|
|
1484
|
-
throw new Error(`Migrations for plugin ${
|
|
1482
|
+
registerMigrations(pluginKey, migrations) {
|
|
1483
|
+
if (migrationsMap.has(pluginKey)) {
|
|
1484
|
+
throw new Error(`Migrations for plugin ${pluginKey} are already registered`);
|
|
1485
1485
|
}
|
|
1486
1486
|
const sortedMigrations = sortAndValidateMigrations(migrations);
|
|
1487
|
-
migrationsMap.set(
|
|
1487
|
+
migrationsMap.set(pluginKey, sortedMigrations);
|
|
1488
1488
|
},
|
|
1489
|
-
getSchema(
|
|
1490
|
-
return schemas.get(
|
|
1489
|
+
getSchema(pluginKey) {
|
|
1490
|
+
return schemas.get(pluginKey);
|
|
1491
1491
|
},
|
|
1492
|
-
getMigrations(
|
|
1493
|
-
return migrationsMap.get(
|
|
1492
|
+
getMigrations(pluginKey) {
|
|
1493
|
+
return migrationsMap.get(pluginKey);
|
|
1494
1494
|
},
|
|
1495
|
-
getLastMigrationVersion(
|
|
1496
|
-
const migrations = migrationsMap.get(
|
|
1495
|
+
getLastMigrationVersion(pluginKey) {
|
|
1496
|
+
const migrations = migrationsMap.get(pluginKey);
|
|
1497
1497
|
return migrations?.[migrations.length - 1]?.version;
|
|
1498
1498
|
},
|
|
1499
1499
|
};
|
|
@@ -1518,7 +1518,7 @@ function runPluginMigrations(projectDefinition, pluginImplementationStore) {
|
|
|
1518
1518
|
setAutoFreeze(false);
|
|
1519
1519
|
return produce(projectDefinition, (draft) => {
|
|
1520
1520
|
for (const pluginDefinition of draft.plugins ?? []) {
|
|
1521
|
-
const pluginMigrations = pluginConfigService.getMigrations(pluginEntityType.
|
|
1521
|
+
const pluginMigrations = pluginConfigService.getMigrations(pluginEntityType.keyFromId(pluginDefinition.id));
|
|
1522
1522
|
const currentSchemaVersion = pluginDefinition.configSchemaVersion ?? -1;
|
|
1523
1523
|
if (!pluginMigrations)
|
|
1524
1524
|
continue;
|
|
@@ -2568,7 +2568,7 @@ const palettesSchema = z$i.object({
|
|
|
2568
2568
|
base: paletteSchema,
|
|
2569
2569
|
primary: paletteSchema,
|
|
2570
2570
|
});
|
|
2571
|
-
const
|
|
2571
|
+
const createThemeSchema = definitionSchema(() => z$i.object({
|
|
2572
2572
|
palettes: z$i.object({
|
|
2573
2573
|
base: paletteSchema,
|
|
2574
2574
|
primary: paletteSchema,
|
|
@@ -2577,7 +2577,7 @@ const themeSchema = z$i.object({
|
|
|
2577
2577
|
light: themeColorSchema,
|
|
2578
2578
|
dark: themeColorSchema,
|
|
2579
2579
|
}),
|
|
2580
|
-
});
|
|
2580
|
+
}));
|
|
2581
2581
|
|
|
2582
2582
|
const {z: z$h} = await importShared('zod');
|
|
2583
2583
|
|
|
@@ -2605,7 +2605,7 @@ const roleArray = z$g
|
|
|
2605
2605
|
onDelete: 'DELETE',
|
|
2606
2606
|
}))
|
|
2607
2607
|
.optional();
|
|
2608
|
-
const
|
|
2608
|
+
const createModelGraphqlSchema = definitionSchema(() => z$g.object({
|
|
2609
2609
|
objectType: z$g
|
|
2610
2610
|
.object({
|
|
2611
2611
|
enabled: z$g.boolean().default(false),
|
|
@@ -2689,7 +2689,7 @@ const modelGraphqlSchema = z$g.object({
|
|
|
2689
2689
|
}),
|
|
2690
2690
|
})
|
|
2691
2691
|
.default({}),
|
|
2692
|
-
});
|
|
2692
|
+
}));
|
|
2693
2693
|
|
|
2694
2694
|
const {z: z$f} = await importShared('zod');
|
|
2695
2695
|
|
|
@@ -2705,15 +2705,15 @@ function createModelTransformerType(payload) {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
|
|
2707
2707
|
const {z: z$e} = await importShared('zod');
|
|
2708
|
-
const
|
|
2708
|
+
const createPasswordTransformerSchema = definitionSchema(() => zEnt(z$e.object({
|
|
2709
2709
|
...baseTransformerFields,
|
|
2710
2710
|
type: z$e.literal('password'),
|
|
2711
2711
|
}), {
|
|
2712
2712
|
type: modelTransformerEntityType,
|
|
2713
2713
|
parentPath: { context: 'model' },
|
|
2714
2714
|
getNameResolver: () => 'password',
|
|
2715
|
-
});
|
|
2716
|
-
const
|
|
2715
|
+
}));
|
|
2716
|
+
const createEmbeddedRelationTransformerSchema = definitionSchema(() => zEnt(z$e.object({
|
|
2717
2717
|
...baseTransformerFields,
|
|
2718
2718
|
foreignRelationRef: zRef(z$e.string().min(1), {
|
|
2719
2719
|
type: modelForeignRelationEntityType,
|
|
@@ -2746,16 +2746,16 @@ const embeddedRelationTransformerSchema = zEnt(z$e.object({
|
|
|
2746
2746
|
}),
|
|
2747
2747
|
}).refBuilder((builder) => {
|
|
2748
2748
|
builder.addPathToContext('modelRef', modelEntityType, 'embeddedModel');
|
|
2749
|
-
});
|
|
2749
|
+
}));
|
|
2750
2750
|
const BUILT_IN_TRANSFORMERS = [
|
|
2751
2751
|
createModelTransformerType({
|
|
2752
2752
|
name: 'password',
|
|
2753
|
-
schema:
|
|
2753
|
+
schema: createPasswordTransformerSchema,
|
|
2754
2754
|
getName: () => 'Password',
|
|
2755
2755
|
}),
|
|
2756
2756
|
createModelTransformerType({
|
|
2757
2757
|
name: 'embeddedRelation',
|
|
2758
|
-
schema:
|
|
2758
|
+
schema: createEmbeddedRelationTransformerSchema,
|
|
2759
2759
|
getName: (definitionContainer, definition) => definitionContainer.nameFromId(definition.foreignRelationRef),
|
|
2760
2760
|
}),
|
|
2761
2761
|
];
|
|
@@ -2771,10 +2771,6 @@ function createModelTransformerImplementation() {
|
|
|
2771
2771
|
if (transformers[transformer.name]) {
|
|
2772
2772
|
throw new Error(`Model transformer with name ${transformer.name} is already registered`);
|
|
2773
2773
|
}
|
|
2774
|
-
// check transformer schema is a zEnt
|
|
2775
|
-
if (!(transformer.schema instanceof ZodRef)) {
|
|
2776
|
-
throw new TypeError(`Model transformer schema for ${transformer.name} is not a zEnt`);
|
|
2777
|
-
}
|
|
2778
2774
|
transformers[transformer.name] =
|
|
2779
2775
|
transformer;
|
|
2780
2776
|
},
|
|
@@ -2797,38 +2793,38 @@ const modelTransformerSpec = createPluginSpec('core/model-transformer', {
|
|
|
2797
2793
|
defaultInitializer: createModelTransformerImplementation,
|
|
2798
2794
|
});
|
|
2799
2795
|
|
|
2800
|
-
const
|
|
2796
|
+
const createTransformerSchema = definitionSchema((ctx) => zWithPlugins((plugins, data) => {
|
|
2801
2797
|
const { type } = baseTransformerSchema.parse(data);
|
|
2802
2798
|
const transformer = plugins
|
|
2803
2799
|
.getPluginSpec(modelTransformerSpec)
|
|
2804
2800
|
.getModelTransformer(type);
|
|
2805
|
-
return transformer.schema;
|
|
2806
|
-
});
|
|
2801
|
+
return transformer.schema(ctx);
|
|
2802
|
+
}));
|
|
2807
2803
|
|
|
2808
2804
|
const {z: z$d} = await importShared('zod');
|
|
2809
|
-
const
|
|
2805
|
+
const createEnumValueSchema = definitionSchema(() => zEnt(z$d.object({
|
|
2810
2806
|
name: z$d.string().min(1),
|
|
2811
2807
|
friendlyName: z$d.string().min(1),
|
|
2812
2808
|
}), {
|
|
2813
2809
|
type: modelEnumValueEntityType,
|
|
2814
2810
|
parentPath: { context: 'enum' },
|
|
2815
|
-
});
|
|
2816
|
-
const
|
|
2811
|
+
}));
|
|
2812
|
+
const createEnumBaseSchema = definitionSchema((ctx) => z$d.object({
|
|
2817
2813
|
name: z$d.string().min(1),
|
|
2818
2814
|
featureRef: zRef(z$d.string().min(1), {
|
|
2819
2815
|
type: featureEntityType,
|
|
2820
2816
|
onDelete: 'RESTRICT',
|
|
2821
2817
|
}),
|
|
2822
|
-
values: z$d.array(
|
|
2818
|
+
values: z$d.array(createEnumValueSchema(ctx)),
|
|
2823
2819
|
isExposed: z$d.boolean(),
|
|
2824
|
-
});
|
|
2825
|
-
const
|
|
2820
|
+
}));
|
|
2821
|
+
const createEnumSchema = definitionSchema((ctx) => zEnt(createEnumBaseSchema(ctx), {
|
|
2826
2822
|
type: modelEnumEntityType,
|
|
2827
2823
|
addContext: 'enum',
|
|
2828
|
-
});
|
|
2824
|
+
}));
|
|
2829
2825
|
|
|
2830
2826
|
const {z: z$c} = await importShared('zod');
|
|
2831
|
-
const
|
|
2827
|
+
const createModelScalarFieldSchema = definitionSchema(() => zEnt(z$c.object({
|
|
2832
2828
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
2833
2829
|
type: z$c.enum(SCALAR_FIELD_TYPES),
|
|
2834
2830
|
isOptional: z$c.boolean().default(false),
|
|
@@ -2890,7 +2886,7 @@ const modelScalarFieldSchema = zEnt(z$c.object({
|
|
|
2890
2886
|
};
|
|
2891
2887
|
}
|
|
2892
2888
|
return value;
|
|
2893
|
-
});
|
|
2889
|
+
}));
|
|
2894
2890
|
const REFERENTIAL_ACTIONS = [
|
|
2895
2891
|
'Cascade',
|
|
2896
2892
|
'Restrict',
|
|
@@ -2898,7 +2894,7 @@ const REFERENTIAL_ACTIONS = [
|
|
|
2898
2894
|
'SetNull',
|
|
2899
2895
|
'SetDefault',
|
|
2900
2896
|
];
|
|
2901
|
-
const
|
|
2897
|
+
const createModelRelationFieldSchema = definitionSchema(() => zRefBuilder(z$c.object({
|
|
2902
2898
|
id: zRefId,
|
|
2903
2899
|
foreignId: z$c
|
|
2904
2900
|
.string()
|
|
@@ -2937,8 +2933,8 @@ const modelRelationFieldSchema = zRefBuilder(z$c.object({
|
|
|
2937
2933
|
getNameResolver: (entity) => entity.foreignRelationName,
|
|
2938
2934
|
parentPath: 'modelRef',
|
|
2939
2935
|
});
|
|
2940
|
-
});
|
|
2941
|
-
const
|
|
2936
|
+
}));
|
|
2937
|
+
const createModelUniqueConstraintSchema = definitionSchema(() => zEnt(z$c.object({
|
|
2942
2938
|
fields: z$c.array(z$c.object({
|
|
2943
2939
|
fieldRef: zRef(z$c.string().min(1), {
|
|
2944
2940
|
type: modelScalarFieldEntityType,
|
|
@@ -2955,8 +2951,8 @@ const modelUniqueConstraintSchema = zEnt(z$c.object({
|
|
|
2955
2951
|
resolveName: (entityNames) => entityNames.fields.join('_'),
|
|
2956
2952
|
});
|
|
2957
2953
|
},
|
|
2958
|
-
});
|
|
2959
|
-
const
|
|
2954
|
+
}));
|
|
2955
|
+
const createModelServiceSchema = definitionSchema((ctx) => z$c.object({
|
|
2960
2956
|
create: z$c
|
|
2961
2957
|
.object({
|
|
2962
2958
|
enabled: z$c.boolean().default(false),
|
|
@@ -3002,9 +2998,9 @@ const modelServiceSchema = z$c.object({
|
|
|
3002
2998
|
.default({
|
|
3003
2999
|
enabled: false,
|
|
3004
3000
|
}),
|
|
3005
|
-
transformers: z$c.array(
|
|
3006
|
-
});
|
|
3007
|
-
const
|
|
3001
|
+
transformers: z$c.array(createTransformerSchema(ctx)).default([]),
|
|
3002
|
+
}));
|
|
3003
|
+
const createModelBaseSchema = definitionSchema((ctx) => z$c.object({
|
|
3008
3004
|
id: zRefId,
|
|
3009
3005
|
name: VALIDATORS.PASCAL_CASE_STRING,
|
|
3010
3006
|
featureRef: zRef(z$c.string().min(1), {
|
|
@@ -3012,8 +3008,8 @@ const modelBaseSchema = z$c.object({
|
|
|
3012
3008
|
onDelete: 'RESTRICT',
|
|
3013
3009
|
}),
|
|
3014
3010
|
model: z$c.object({
|
|
3015
|
-
fields: z$c.array(
|
|
3016
|
-
relations: z$c.array(
|
|
3011
|
+
fields: z$c.array(createModelScalarFieldSchema(ctx)),
|
|
3012
|
+
relations: z$c.array(createModelRelationFieldSchema(ctx)).optional(),
|
|
3017
3013
|
primaryKeyFieldRefs: z$c
|
|
3018
3014
|
.array(zRef(z$c.string(), {
|
|
3019
3015
|
type: modelScalarFieldEntityType,
|
|
@@ -3021,20 +3017,22 @@ const modelBaseSchema = z$c.object({
|
|
|
3021
3017
|
parentPath: { context: 'model' },
|
|
3022
3018
|
}))
|
|
3023
3019
|
.min(1),
|
|
3024
|
-
uniqueConstraints: z$c
|
|
3020
|
+
uniqueConstraints: z$c
|
|
3021
|
+
.array(createModelUniqueConstraintSchema(ctx))
|
|
3022
|
+
.optional(),
|
|
3025
3023
|
}),
|
|
3026
|
-
service:
|
|
3024
|
+
service: createModelServiceSchema(ctx).default({
|
|
3027
3025
|
create: { enabled: false },
|
|
3028
3026
|
update: { enabled: false },
|
|
3029
3027
|
delete: { enabled: false },
|
|
3030
3028
|
transformers: [],
|
|
3031
3029
|
}),
|
|
3032
|
-
graphql:
|
|
3033
|
-
});
|
|
3034
|
-
const
|
|
3030
|
+
graphql: createModelGraphqlSchema(ctx).optional(),
|
|
3031
|
+
}));
|
|
3032
|
+
const createModelSchema = definitionSchema((ctx) => zEnt(createModelBaseSchema(ctx), {
|
|
3035
3033
|
type: modelEntityType,
|
|
3036
3034
|
addContext: 'model',
|
|
3037
|
-
});
|
|
3035
|
+
}));
|
|
3038
3036
|
|
|
3039
3037
|
const adminSectionEntityType = createEntityType('admin-section', {
|
|
3040
3038
|
parentType: appEntityType,
|
|
@@ -3065,7 +3063,7 @@ const adminCrudEmbeddedFormEntityType = createEntityType('admin-crud-embedded-fo
|
|
|
3065
3063
|
});
|
|
3066
3064
|
|
|
3067
3065
|
const {z: z$9} = await importShared('zod');
|
|
3068
|
-
const
|
|
3066
|
+
const createAdminCrudTextInputSchema = definitionSchema(() => z$9.object({
|
|
3069
3067
|
type: z$9.literal('text'),
|
|
3070
3068
|
label: z$9.string().min(1),
|
|
3071
3069
|
modelFieldRef: zRef(z$9.string(), {
|
|
@@ -3074,12 +3072,12 @@ const adminCrudTextInputSchema = z$9.object({
|
|
|
3074
3072
|
parentPath: { context: 'model' },
|
|
3075
3073
|
}),
|
|
3076
3074
|
validation: z$9.string().optional(),
|
|
3077
|
-
});
|
|
3075
|
+
}));
|
|
3078
3076
|
const adminCrudTextInputType = createAdminCrudInputType({
|
|
3079
3077
|
name: 'text',
|
|
3080
|
-
schema:
|
|
3078
|
+
schema: createAdminCrudTextInputSchema,
|
|
3081
3079
|
});
|
|
3082
|
-
const
|
|
3080
|
+
const createAdminCrudForeignInputSchema = definitionSchema(() => z$9.object({
|
|
3083
3081
|
type: z$9.literal('foreign'),
|
|
3084
3082
|
label: z$9.string().min(1),
|
|
3085
3083
|
localRelationRef: zRef(z$9.string(), {
|
|
@@ -3091,12 +3089,12 @@ const adminCrudForeignInputSchema = z$9.object({
|
|
|
3091
3089
|
valueExpression: z$9.string().min(1),
|
|
3092
3090
|
defaultLabel: z$9.string().optional(),
|
|
3093
3091
|
nullLabel: z$9.string().optional(),
|
|
3094
|
-
});
|
|
3092
|
+
}));
|
|
3095
3093
|
const adminCrudForeignInputType = createAdminCrudInputType({
|
|
3096
3094
|
name: 'foreign',
|
|
3097
|
-
schema:
|
|
3095
|
+
schema: createAdminCrudForeignInputSchema,
|
|
3098
3096
|
});
|
|
3099
|
-
const
|
|
3097
|
+
const createAdminCrudEnumInputSchema = definitionSchema(() => z$9.object({
|
|
3100
3098
|
type: z$9.literal('enum'),
|
|
3101
3099
|
label: z$9.string().min(1),
|
|
3102
3100
|
modelFieldRef: zRef(z$9.string(), {
|
|
@@ -3104,12 +3102,12 @@ const adminCrudEnumInputSchema = z$9.object({
|
|
|
3104
3102
|
onDelete: 'RESTRICT',
|
|
3105
3103
|
parentPath: { context: 'model' },
|
|
3106
3104
|
}),
|
|
3107
|
-
});
|
|
3105
|
+
}));
|
|
3108
3106
|
const adminCrudEnumInputType = createAdminCrudInputType({
|
|
3109
3107
|
name: 'enum',
|
|
3110
|
-
schema:
|
|
3108
|
+
schema: createAdminCrudEnumInputSchema,
|
|
3111
3109
|
});
|
|
3112
|
-
const
|
|
3110
|
+
const createAdminCrudEmbeddedInputSchema = definitionSchema(() => z$9.object({
|
|
3113
3111
|
type: z$9.literal('embedded'),
|
|
3114
3112
|
label: z$9.string().min(1),
|
|
3115
3113
|
modelRelationRef: zRef(z$9.string(), {
|
|
@@ -3122,12 +3120,12 @@ const adminCrudEmbeddedInputSchema = z$9.object({
|
|
|
3122
3120
|
parentPath: { context: 'admin-section' },
|
|
3123
3121
|
onDelete: 'RESTRICT',
|
|
3124
3122
|
}),
|
|
3125
|
-
});
|
|
3123
|
+
}));
|
|
3126
3124
|
const adminCrudEmbeddedInputType = createAdminCrudInputType({
|
|
3127
3125
|
name: 'embedded',
|
|
3128
|
-
schema:
|
|
3126
|
+
schema: createAdminCrudEmbeddedInputSchema,
|
|
3129
3127
|
});
|
|
3130
|
-
const
|
|
3128
|
+
const createAdminCrudEmbeddedLocalInputSchema = definitionSchema(() => z$9.object({
|
|
3131
3129
|
type: z$9.literal('embeddedLocal'),
|
|
3132
3130
|
label: z$9.string().min(1),
|
|
3133
3131
|
localRelationRef: zRef(z$9.string(), {
|
|
@@ -3140,18 +3138,18 @@ const adminCrudEmbeddedLocalInputSchema = z$9.object({
|
|
|
3140
3138
|
parentPath: { context: 'admin-section' },
|
|
3141
3139
|
onDelete: 'RESTRICT',
|
|
3142
3140
|
}),
|
|
3143
|
-
});
|
|
3141
|
+
}));
|
|
3144
3142
|
const adminCrudEmbeddedLocalInputType = createAdminCrudInputType({
|
|
3145
3143
|
name: 'embeddedLocal',
|
|
3146
|
-
schema:
|
|
3144
|
+
schema: createAdminCrudEmbeddedLocalInputSchema,
|
|
3147
3145
|
});
|
|
3148
|
-
const
|
|
3146
|
+
const createAdminCrudPasswordInputSchema = definitionSchema(() => z$9.object({
|
|
3149
3147
|
type: z$9.literal('password'),
|
|
3150
3148
|
label: z$9.string().min(1),
|
|
3151
|
-
});
|
|
3149
|
+
}));
|
|
3152
3150
|
const adminCrudPasswordInputType = createAdminCrudInputType({
|
|
3153
3151
|
name: 'password',
|
|
3154
|
-
schema:
|
|
3152
|
+
schema: createAdminCrudPasswordInputSchema,
|
|
3155
3153
|
});
|
|
3156
3154
|
const BUILT_IN_ADMIN_CRUD_INPUTS = [
|
|
3157
3155
|
adminCrudTextInputType,
|
|
@@ -3190,17 +3188,17 @@ const adminCrudInputSpec = createPluginSpec('core/admin-crud-input', {
|
|
|
3190
3188
|
defaultInitializer: createAdminCrudInputImplementation,
|
|
3191
3189
|
});
|
|
3192
3190
|
|
|
3193
|
-
const
|
|
3191
|
+
const createAdminCrudInputSchema = definitionSchema((ctx) => zWithPlugins((plugins, data) => {
|
|
3194
3192
|
const { type } = baseAdminCrudInputSchema.parse(data);
|
|
3195
3193
|
const input = plugins
|
|
3196
3194
|
.getPluginSpec(adminCrudInputSpec)
|
|
3197
3195
|
.getAdminCrudInput(type);
|
|
3198
|
-
return input.schema;
|
|
3199
|
-
});
|
|
3196
|
+
return input.schema(ctx);
|
|
3197
|
+
}));
|
|
3200
3198
|
|
|
3201
3199
|
const {z: z$8} = await importShared('zod');
|
|
3202
3200
|
// Table Columns
|
|
3203
|
-
const
|
|
3201
|
+
const createAdminCrudForeignDisplaySchema = definitionSchema(() => z$8.object({
|
|
3204
3202
|
type: z$8.literal('foreign'),
|
|
3205
3203
|
localRelationRef: zRef(z$8.string(), {
|
|
3206
3204
|
type: modelLocalRelationEntityType,
|
|
@@ -3209,31 +3207,27 @@ const adminCrudForeignDisplaySchema = z$8.object({
|
|
|
3209
3207
|
}),
|
|
3210
3208
|
labelExpression: z$8.string().min(1),
|
|
3211
3209
|
valueExpression: z$8.string().min(1),
|
|
3212
|
-
});
|
|
3213
|
-
const
|
|
3210
|
+
}));
|
|
3211
|
+
const createAdminCrudTextDisplaySchema = definitionSchema(() => z$8.object({
|
|
3214
3212
|
type: z$8.literal('text'),
|
|
3215
3213
|
modelFieldRef: zRef(z$8.string(), {
|
|
3216
3214
|
type: modelScalarFieldEntityType,
|
|
3217
3215
|
onDelete: 'RESTRICT',
|
|
3218
3216
|
parentPath: { context: 'model' },
|
|
3219
3217
|
}),
|
|
3220
|
-
});
|
|
3221
|
-
const
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
]);
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
.filter((x) => x !== undefined);
|
|
3229
|
-
}
|
|
3230
|
-
const adminCrudDisplayTypes = primitiveMapToKeys(adminCrudDisplaySchema.optionsMap);
|
|
3231
|
-
const adminCrudTableColumnSchema = z$8.object({
|
|
3218
|
+
}));
|
|
3219
|
+
const createAdminCrudDisplaySchema = definitionSchema((ctx) => z$8.discriminatedUnion('type', [
|
|
3220
|
+
createAdminCrudTextDisplaySchema(ctx),
|
|
3221
|
+
createAdminCrudForeignDisplaySchema(ctx),
|
|
3222
|
+
]));
|
|
3223
|
+
// TODO: Improve this to be more dynamic in the future
|
|
3224
|
+
const adminCrudDisplayTypes = ['text', 'foreign'];
|
|
3225
|
+
const createAdminCrudTableColumnSchema = definitionSchema((ctx) => z$8.object({
|
|
3232
3226
|
label: z$8.string().min(1),
|
|
3233
|
-
display:
|
|
3234
|
-
});
|
|
3227
|
+
display: createAdminCrudDisplaySchema(ctx),
|
|
3228
|
+
}));
|
|
3235
3229
|
// Embedded Crud
|
|
3236
|
-
const
|
|
3230
|
+
const createAdminCrudEmbeddedObjectSchema = definitionSchema((ctx) => z$8.object({
|
|
3237
3231
|
id: z$8.string().min(1),
|
|
3238
3232
|
name: z$8.string().min(1),
|
|
3239
3233
|
modelRef: zRef(z$8.string().min(1), {
|
|
@@ -3243,10 +3237,10 @@ const adminCrudEmbeddedObjectSchema = z$8.object({
|
|
|
3243
3237
|
includeIdField: z$8.boolean().optional(),
|
|
3244
3238
|
type: z$8.literal('object'),
|
|
3245
3239
|
form: z$8.object({
|
|
3246
|
-
fields: z$8.array(
|
|
3240
|
+
fields: z$8.array(createAdminCrudInputSchema(ctx)),
|
|
3247
3241
|
}),
|
|
3248
|
-
});
|
|
3249
|
-
const
|
|
3242
|
+
}));
|
|
3243
|
+
const createAdminCrudEmbeddedListSchema = definitionSchema((ctx) => z$8.object({
|
|
3250
3244
|
id: z$8.string().min(1),
|
|
3251
3245
|
name: z$8.string().min(1),
|
|
3252
3246
|
modelRef: zRef(z$8.string().min(1), {
|
|
@@ -3258,24 +3252,24 @@ const adminCrudEmbeddedListSchema = z$8.object({
|
|
|
3258
3252
|
// NOTE: These two fields need to be synced with crud section schema
|
|
3259
3253
|
// because the web app expects that (TODO)
|
|
3260
3254
|
table: z$8.object({
|
|
3261
|
-
columns: z$8.array(
|
|
3255
|
+
columns: z$8.array(createAdminCrudTableColumnSchema(ctx)),
|
|
3262
3256
|
}),
|
|
3263
3257
|
form: z$8.object({
|
|
3264
|
-
fields: z$8.array(
|
|
3258
|
+
fields: z$8.array(createAdminCrudInputSchema(ctx)),
|
|
3265
3259
|
}),
|
|
3266
|
-
});
|
|
3267
|
-
const
|
|
3268
|
-
|
|
3269
|
-
|
|
3260
|
+
}));
|
|
3261
|
+
const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => zRefBuilder(z$8.discriminatedUnion('type', [
|
|
3262
|
+
createAdminCrudEmbeddedObjectSchema(ctx),
|
|
3263
|
+
createAdminCrudEmbeddedListSchema(ctx),
|
|
3270
3264
|
]), (builder) => {
|
|
3271
3265
|
builder.addEntity({
|
|
3272
3266
|
type: adminCrudEmbeddedFormEntityType,
|
|
3273
3267
|
parentPath: { context: 'admin-section' },
|
|
3274
3268
|
});
|
|
3275
3269
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3276
|
-
});
|
|
3270
|
+
}));
|
|
3277
3271
|
// Admin Section
|
|
3278
|
-
const
|
|
3272
|
+
const createAdminCrudSectionSchema = definitionSchema((ctx) => zRefBuilder(z$8.object({
|
|
3279
3273
|
...baseAdminSectionValidators,
|
|
3280
3274
|
type: z$8.literal('crud'),
|
|
3281
3275
|
modelRef: zRef(z$8.string().min(1), {
|
|
@@ -3284,25 +3278,25 @@ const adminCrudSectionSchema = zRefBuilder(z$8.object({
|
|
|
3284
3278
|
}),
|
|
3285
3279
|
disableCreate: z$8.boolean().optional(),
|
|
3286
3280
|
table: z$8.object({
|
|
3287
|
-
columns: z$8.array(
|
|
3281
|
+
columns: z$8.array(createAdminCrudTableColumnSchema(ctx)),
|
|
3288
3282
|
}),
|
|
3289
3283
|
form: z$8.object({
|
|
3290
|
-
fields: z$8.array(
|
|
3284
|
+
fields: z$8.array(createAdminCrudInputSchema(ctx)),
|
|
3291
3285
|
}),
|
|
3292
|
-
embeddedForms: z$8.array(
|
|
3286
|
+
embeddedForms: z$8.array(createAdminCrudEmbeddedFormSchema(ctx)).optional(),
|
|
3293
3287
|
}), (builder) => {
|
|
3294
3288
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3295
|
-
});
|
|
3289
|
+
}));
|
|
3296
3290
|
|
|
3297
3291
|
const {z: z$7} = await importShared('zod');
|
|
3298
|
-
const
|
|
3292
|
+
const createAdminSectionSchema = definitionSchema((ctx) => zRefBuilder(createAdminCrudSectionSchema(ctx), (builder) => {
|
|
3299
3293
|
builder.addEntity({
|
|
3300
3294
|
type: adminSectionEntityType,
|
|
3301
3295
|
parentPath: { context: 'app' },
|
|
3302
3296
|
addContext: 'admin-section',
|
|
3303
3297
|
});
|
|
3304
|
-
});
|
|
3305
|
-
const
|
|
3298
|
+
}));
|
|
3299
|
+
const createAdminAppSchema = definitionSchema((ctx) => z$7.object({
|
|
3306
3300
|
...baseAppValidators,
|
|
3307
3301
|
type: z$7.literal('admin'),
|
|
3308
3302
|
allowedRoles: z$7
|
|
@@ -3311,12 +3305,12 @@ const adminAppSchema = z$7.object({
|
|
|
3311
3305
|
onDelete: 'DELETE',
|
|
3312
3306
|
}))
|
|
3313
3307
|
.optional(),
|
|
3314
|
-
sections: z$7.array(
|
|
3315
|
-
});
|
|
3308
|
+
sections: z$7.array(createAdminSectionSchema(ctx)).optional(),
|
|
3309
|
+
}));
|
|
3316
3310
|
const adminAppEntryType = createAppEntryType('admin');
|
|
3317
3311
|
|
|
3318
3312
|
const {z: z$6} = await importShared('zod');
|
|
3319
|
-
const
|
|
3313
|
+
const createBackendAppSchema = definitionSchema(() => z$6.object({
|
|
3320
3314
|
...baseAppValidators,
|
|
3321
3315
|
type: z$6.literal('backend'),
|
|
3322
3316
|
enableStripe: z$6.boolean().optional(),
|
|
@@ -3325,11 +3319,11 @@ const backendAppSchema = z$6.object({
|
|
|
3325
3319
|
enablePostmark: z$6.boolean().optional(),
|
|
3326
3320
|
enableSubscriptions: z$6.boolean().optional(),
|
|
3327
3321
|
enableAxios: z$6.boolean().optional(),
|
|
3328
|
-
});
|
|
3322
|
+
}));
|
|
3329
3323
|
const backendAppEntryType = createAppEntryType('backend');
|
|
3330
3324
|
|
|
3331
3325
|
const {z: z$5} = await importShared('zod');
|
|
3332
|
-
const
|
|
3326
|
+
const createWebAppSchema = definitionSchema(() => z$5.object({
|
|
3333
3327
|
...baseAppValidators,
|
|
3334
3328
|
type: z$5.literal('web'),
|
|
3335
3329
|
includeAuth: z$5.boolean().optional(),
|
|
@@ -3343,41 +3337,38 @@ const webAppSchema = z$5.object({
|
|
|
3343
3337
|
.optional(),
|
|
3344
3338
|
includeUploadComponents: z$5.boolean().optional(),
|
|
3345
3339
|
enableSubscriptions: z$5.boolean().optional(),
|
|
3346
|
-
});
|
|
3340
|
+
}));
|
|
3347
3341
|
const webAppEntryType = createAppEntryType('web');
|
|
3348
3342
|
|
|
3349
|
-
function definitionSchema(creator) {
|
|
3350
|
-
return (options) => creator(options);
|
|
3351
|
-
}
|
|
3352
|
-
|
|
3353
3343
|
const {z: z$4} = await importShared('zod');
|
|
3354
|
-
const basePluginDefinitionSchema =
|
|
3344
|
+
const basePluginDefinitionSchema = z$4.object({
|
|
3345
|
+
id: z$4.string().min(1),
|
|
3355
3346
|
packageName: z$4.string(),
|
|
3356
3347
|
name: z$4.string(),
|
|
3357
3348
|
version: z$4.string(),
|
|
3358
3349
|
config: z$4.unknown(),
|
|
3359
3350
|
configSchemaVersion: z$4.number().optional(),
|
|
3360
|
-
}), {
|
|
3361
|
-
type: pluginEntityType,
|
|
3362
3351
|
});
|
|
3363
|
-
const
|
|
3364
|
-
const
|
|
3365
|
-
const
|
|
3352
|
+
const createPluginWithConfigSchema = definitionSchema(() => zWithPlugins((plugins, data) => {
|
|
3353
|
+
const parsedBasePlugin = basePluginDefinitionSchema.parse(data);
|
|
3354
|
+
const pluginKey = pluginEntityType.keyFromId(parsedBasePlugin.id);
|
|
3366
3355
|
const configSchema = plugins
|
|
3367
3356
|
.getPluginSpec(pluginConfigSpec)
|
|
3368
|
-
.getSchema(
|
|
3357
|
+
.getSchema(pluginKey);
|
|
3358
|
+
const pluginDefinitionWithEnt = zEnt(basePluginDefinitionSchema, {
|
|
3359
|
+
type: pluginEntityType,
|
|
3360
|
+
});
|
|
3369
3361
|
if (!configSchema) {
|
|
3370
|
-
return
|
|
3362
|
+
return pluginDefinitionWithEnt;
|
|
3371
3363
|
}
|
|
3372
|
-
return
|
|
3364
|
+
return pluginDefinitionWithEnt.and(z$4.object({
|
|
3373
3365
|
config: configSchema,
|
|
3374
3366
|
}));
|
|
3375
|
-
});
|
|
3376
|
-
const
|
|
3367
|
+
}));
|
|
3368
|
+
const createPluginsSchema = definitionSchema((ctx) => z$4.array(createPluginWithConfigSchema(ctx)));
|
|
3377
3369
|
|
|
3378
3370
|
const {z: z$3} = await importShared('zod');
|
|
3379
|
-
|
|
3380
|
-
const templateExtractorSchema = z$3.object({
|
|
3371
|
+
const createTemplateExtractorSchema = definitionSchema(() => z$3.object({
|
|
3381
3372
|
/**
|
|
3382
3373
|
* Whether to write template extractor metadata when writing files to the project.
|
|
3383
3374
|
*
|
|
@@ -3392,7 +3383,7 @@ const templateExtractorSchema = z$3.object({
|
|
|
3392
3383
|
* The list is delimited by a newline and can include a * to match any number of characters.
|
|
3393
3384
|
*/
|
|
3394
3385
|
fileIdRegexWhitelist: z$3.string().default(''),
|
|
3395
|
-
});
|
|
3386
|
+
}));
|
|
3396
3387
|
|
|
3397
3388
|
const {z: z$2} = await importShared('zod');
|
|
3398
3389
|
const generalSettingsSchema = z$2.object({
|
|
@@ -3416,32 +3407,32 @@ const generalSettingsSchema = z$2.object({
|
|
|
3416
3407
|
.int()
|
|
3417
3408
|
.refine((portOffset) => portOffset % 1000 === 0, 'Port offset must be a multiple of 1000, e.g. 1000, 2000, 3000, etc.'),
|
|
3418
3409
|
});
|
|
3419
|
-
const createSettingsSchema = definitionSchema(() => z$2.object({
|
|
3410
|
+
const createSettingsSchema = definitionSchema((ctx) => z$2.object({
|
|
3420
3411
|
general: generalSettingsSchema,
|
|
3421
|
-
templateExtractor:
|
|
3422
|
-
theme:
|
|
3412
|
+
templateExtractor: createTemplateExtractorSchema(ctx).optional(),
|
|
3413
|
+
theme: createThemeSchema(ctx).optional(),
|
|
3423
3414
|
}));
|
|
3424
3415
|
|
|
3425
3416
|
const {z: z$1} = await importShared('zod');
|
|
3426
|
-
const
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3417
|
+
const createAppSchema = definitionSchema((ctx) => zRefBuilder(z$1.discriminatedUnion('type', [
|
|
3418
|
+
createBackendAppSchema(ctx),
|
|
3419
|
+
createWebAppSchema(ctx),
|
|
3420
|
+
createAdminAppSchema(ctx),
|
|
3430
3421
|
]), (builder) => {
|
|
3431
3422
|
builder.addEntity({
|
|
3432
3423
|
type: appEntityType,
|
|
3433
3424
|
addContext: 'app',
|
|
3434
3425
|
});
|
|
3435
|
-
});
|
|
3426
|
+
}));
|
|
3436
3427
|
const createProjectDefinitionSchema = definitionSchema((ctx) => z$1.object({
|
|
3437
3428
|
cliVersion: z$1.string().nullish(),
|
|
3438
|
-
apps: z$1.array(
|
|
3439
|
-
features:
|
|
3440
|
-
models: z$1.array(
|
|
3441
|
-
enums: z$1.array(
|
|
3429
|
+
apps: z$1.array(createAppSchema(ctx)).default([]),
|
|
3430
|
+
features: createFeaturesSchema(ctx),
|
|
3431
|
+
models: z$1.array(createModelSchema(ctx)).default([]),
|
|
3432
|
+
enums: z$1.array(createEnumSchema(ctx)).optional(),
|
|
3442
3433
|
isInitialized: z$1.boolean().default(false),
|
|
3443
3434
|
schemaVersion: z$1.number(),
|
|
3444
|
-
plugins:
|
|
3435
|
+
plugins: createPluginsSchema(ctx).optional(),
|
|
3445
3436
|
settings: createSettingsSchema(ctx),
|
|
3446
3437
|
}));
|
|
3447
3438
|
|
|
@@ -3556,7 +3547,7 @@ function getTransformName(definitionContainer, transformer, pluginStore) {
|
|
|
3556
3547
|
const ModelTransformerUtils = { getTransformer, getTransformName };
|
|
3557
3548
|
|
|
3558
3549
|
function byId(projectDefinition, id) {
|
|
3559
|
-
const pluginEntityId = pluginEntityType.
|
|
3550
|
+
const pluginEntityId = pluginEntityType.idFromKey(id);
|
|
3560
3551
|
const plugin = projectDefinition.plugins?.find((m) => m.id === pluginEntityId);
|
|
3561
3552
|
return plugin ?? null;
|
|
3562
3553
|
}
|
|
@@ -3573,7 +3564,7 @@ function configByIdOrThrow(projectDefinition, id) {
|
|
|
3573
3564
|
}
|
|
3574
3565
|
function setPluginConfig(projectDefinition, plugin, pluginConfig, pluginImplementationStore) {
|
|
3575
3566
|
const plugins = projectDefinition.plugins ?? [];
|
|
3576
|
-
const pluginEntityId = pluginEntityType.
|
|
3567
|
+
const pluginEntityId = pluginEntityType.idFromKey(plugin.id);
|
|
3577
3568
|
const pluginConfigService = pluginImplementationStore.getPluginSpec(pluginConfigSpec);
|
|
3578
3569
|
const lastMigrationVersion = pluginConfigService.getLastMigrationVersion(plugin.id);
|
|
3579
3570
|
projectDefinition.plugins = plugins.some((p) => p.id === pluginEntityId)
|
|
@@ -8642,7 +8633,7 @@ const migration011PluginId = createSchemaMigration({
|
|
|
8642
8633
|
version: 11,
|
|
8643
8634
|
name: 'pluginId',
|
|
8644
8635
|
description: 'Convert plugin ids to use the plugin entity type',
|
|
8645
|
-
migrate: (config) => transformJsonPath(config, 'plugins.*.id', (id) => pluginEntityType.
|
|
8636
|
+
migrate: (config) => transformJsonPath(config, 'plugins.*.id', (id) => pluginEntityType.idFromKey(id)),
|
|
8646
8637
|
});
|
|
8647
8638
|
|
|
8648
8639
|
const migration012MigrateAuthConfig = createSchemaMigration({
|
|
@@ -9897,5 +9888,5 @@ function generateDefaultTheme() {
|
|
|
9897
9888
|
};
|
|
9898
9889
|
}
|
|
9899
9890
|
|
|
9900
|
-
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, EnumUtils, FIXED_COLOR_MAPPINGS, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PluginImplementationStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS,
|
|
9901
|
-
//# sourceMappingURL=project-builder-lib-
|
|
9891
|
+
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, EnumUtils, FIXED_COLOR_MAPPINGS, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PluginImplementationStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, ZodRefWrapper, ZodWithPlugins, adminAppEntryType, adminCrudDisplayTypes, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputSpec, adminSectionEntityType, appCompilerSpec, appEntityType, authConfigSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudInputSchema, baseAdminSectionValidators, baseAppSchema, baseAppValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudDisplaySchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedListSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEmbeddedObjectSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignDisplaySchema, createAdminCrudForeignInputSchema, createAdminCrudInputCompilerImplementation, createAdminCrudInputImplementation, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTableColumnSchema, createAdminCrudTextDisplaySchema, createAdminCrudTextInputSchema, createAdminSectionSchema, createAppCompiler, createAppCompilerPlugin, createAppEntryType, createAppSchema, createBackendAppSchema, createDefinitionEntityNameResolver, createEmbeddedRelationTransformerSchema, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createFeaturesSchema, createModelBaseSchema, createModelGraphqlSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerCompilerImplementation, createModelTransformerImplementation, createModelTransformerType, createModelUniqueConstraintSchema, createPasswordTransformerSchema, createPlatformPluginExport, createPluginConfigImplementation, createPluginImplementationStore, createPluginSpec, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createSettingsSchema, createTemplateExtractorSchema, createTestProjectDefinition, createTestProjectDefinitionContainer, createTestProjectDefinitionInput, createThemeSchema, createTransformerSchema, createWebAppSchema, createWebConfigImplementation, definitionSchema, deserializeSchemaWithReferences, featureEntityType, fixRefDeletions, generalSettingsSchema, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getLatestMigrationVersion, initializePlugins, isMigrateableProjectDefinition, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, oklchColor, paletteSchema, palettesSchema, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, pluginConfigSpec, pluginEntityType, pluginManifestJsonSchema, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, undefinedIfEmpty, undefinedIfFalsy, webAppEntryType, webConfigSpec, zEnt, zPluginWrapper, zRef, zRefBuilder, zRefId, zWithPlugins };
|
|
9892
|
+
//# sourceMappingURL=project-builder-lib-BAwM_-SS.js.map
|