@baseplate-dev/plugin-auth 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts +5 -1
- package/dist/auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js +1 -0
- package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts +10 -2
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js +2 -0
- package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +3 -4
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +1 -2
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +0 -1
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js +2 -7
- package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts +10 -3
- package/dist/auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js +1 -0
- package/dist/auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts +5 -5
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js +9 -8
- package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts +20 -5
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js +22 -9
- package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.gql +5 -0
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -1
- package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +1 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts +4 -0
- package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.js +10 -1
- package/dist/auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/index.d.ts +14 -5
- package/dist/auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts +4 -4
- package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js +2 -0
- package/dist/auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts +23 -10
- package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/generated/typed-templates.js +8 -0
- package/dist/auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +1 -2
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +1 -2
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js +4 -4
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -1
- package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.ts +8 -9
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts +0 -1
- package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/index.d.ts +3 -6
- package/dist/auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts +1 -2
- package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts +6 -10
- package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/index.d.ts +9 -2
- package/dist/auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/template-renderers.js +1 -0
- package/dist/auth/core/generators/react-session/generated/template-renderers.js.map +1 -1
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts +18 -4
- package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/generated/typed-templates.js +6 -0
- package/dist/auth/core/generators/react-session/generated/typed-templates.js.map +1 -1
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts +9 -0
- package/dist/auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/react-session.generator.js +16 -1
- package/dist/auth/core/generators/react-session/react-session.generator.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.tsx +1 -2
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js +2 -2
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +4 -6
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js.map +1 -1
- package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.ts +2 -5
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +9 -17
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/models.js +1 -1
- package/dist/auth/core/schema/models.js.map +1 -1
- package/dist/auth0/core/node.d.ts.map +1 -1
- package/dist/auth0/core/node.js +13 -21
- package/dist/auth0/core/node.js.map +1 -1
- package/dist/auth0/core/schema/migrations.d.ts.map +1 -1
- package/dist/auth0/core/schema/migrations.js +6 -4
- package/dist/auth0/core/schema/migrations.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts +2 -2
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +11 -6
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +5 -17
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +6 -2
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +12 -4
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +2 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts +1 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +0 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +1 -3
- package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts +1 -2
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +2 -4
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts +1 -3
- package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts +1 -2
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts +1 -2
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +7 -3
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +14 -6
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +1 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +1 -1
- package/dist/placeholder-auth/core/node.d.ts.map +1 -1
- package/dist/placeholder-auth/core/node.js +6 -14
- package/dist/placeholder-auth/core/node.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DcWFsNod.js → __federation_expose_auth0CoreCommon-CSWdt8d_.js} +9 -7
- package/dist/web/assets/__federation_expose_auth0CoreCommon-CSWdt8d_.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BrPTg7eC.js → __federation_expose_auth0CoreWeb-DjVw47sM.js} +6 -6
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BrPTg7eC.js.map → __federation_expose_auth0CoreWeb-DjVw47sM.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-20XIFvpM.js → __federation_expose_authCoreCommon-CvHJZFIq.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-20XIFvpM.js.map → __federation_expose_authCoreCommon-CvHJZFIq.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-BB5P8uYV.js → __federation_expose_authCoreWeb-CrFEmZp3.js} +7 -7
- package/dist/web/assets/__federation_expose_authCoreWeb-CrFEmZp3.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js → __federation_expose_placeholder-authCoreCommon-CmkiEJ6z.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Jwt0q3ST.js.map → __federation_expose_placeholder-authCoreCommon-CmkiEJ6z.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js → __federation_expose_placeholder-authCoreWeb-CpxfTdxv.js} +6 -6
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-_Y4pVvZX.js.map → __federation_expose_placeholder-authCoreWeb-CpxfTdxv.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-CpGU4emr.js → __federation_fn_import-CGvRdRVe.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-CpGU4emr.js.map → __federation_fn_import-CGvRdRVe.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-33D53Q49.js → web-D1kBtwsm.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-33D53Q49.js.map → web-D1kBtwsm.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-B8gI4CR0.js → project-builder-lib-B7442OYh.js} +254 -211
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B7442OYh.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-ClpdcB7_.js → ui-components-X318M5Ml.js} +100 -86
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-X318M5Ml.js.map +1 -0
- package/dist/web/assets/{index-47TZ-Oc4.js → index-ydDQKauE.js} +2 -2
- package/dist/web/assets/{index-47TZ-Oc4.js.map → index-ydDQKauE.js.map} +1 -1
- package/dist/web/assets/{index.esm-Erws1yaL.js → index.esm-DYWXRkn-.js} +2 -2
- package/dist/web/assets/{index.esm-Erws1yaL.js.map → index.esm-DYWXRkn-.js.map} +1 -1
- package/dist/web/assets/{model-merger-BteeU9dp.js → model-merger-BVBtbNAj.js} +39 -15
- package/dist/web/assets/model-merger-BVBtbNAj.js.map +1 -0
- package/dist/web/assets/{plugin-definition-BOUJurAr.js → plugin-definition-Bdhuga1j.js} +3 -3
- package/dist/web/assets/{plugin-definition-BOUJurAr.js.map → plugin-definition-Bdhuga1j.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BeI52Xpr.js → plugin-definition-C9d7ykhX.js} +3 -3
- package/dist/web/assets/{plugin-definition-BeI52Xpr.js.map → plugin-definition-C9d7ykhX.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-CnMRuS0h.js → plugin-definition-QzgXWr1I.js} +3 -3
- package/dist/web/assets/{plugin-definition-CnMRuS0h.js.map → plugin-definition-QzgXWr1I.js.map} +1 -1
- package/dist/web/assets/{react-CIaEd3xM.js → react-B23vKoD0.js} +2 -2
- package/dist/web/assets/{react-CIaEd3xM.js.map → react-B23vKoD0.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +6 -6
- package/dist/web/assets/{role-editor-form-Bk9sOqqk.js → role-editor-form-BkcoVwtU.js} +4 -4
- package/dist/web/assets/{role-editor-form-Bk9sOqqk.js.map → role-editor-form-BkcoVwtU.js.map} +1 -1
- package/dist/web/assets/{styles-mSx3A02F.js → styles-Dfjm_ApH.js} +3 -3
- package/dist/web/assets/{styles-mSx3A02F.js.map → styles-Dfjm_ApH.js.map} +1 -1
- package/package.json +10 -10
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DcWFsNod.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-BB5P8uYV.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B8gI4CR0.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ClpdcB7_.js.map +0 -1
- package/dist/web/assets/model-merger-BteeU9dp.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createPluginSpec, i as isEqual, m as mapValues, a as createEntityType, C as CASE_VALIDATORS, D as DefinitionReferenceMarker, g as get$1, R as REF_ANNOTATIONS_MARKER_SYMBOL, b as createDefinitionSchemaParserContext, s as set$1,
|
|
2
|
-
export { K as DefinitionDiffArrayIncludesField, I as DefinitionDiffKeyedArrayField, J as DefinitionDiffReplacementField, v as DefinitionEntityType, F as FeatureUtils, O as applyDefinitionDiff, E as applyModelMergerDiff, G as applyModelMergerResultInPlace, H as createAndApplyModelMergerResults, N as createDefinitionDiff, L as createDefinitionDiffConfig, x as createFeatureSchema, u as createInitializedPluginSpec, z as createModelMergerResult, B as createModelMergerResults, A as doesModelMergerResultsHaveChanges, w as featureNameSchema, y as modelMergerDefinitionDiffConfig } from '../model-merger-
|
|
3
|
-
import { importShared } from '../__federation_fn_import-
|
|
1
|
+
import { c as createPluginSpec, i as isEqual, m as mapValues, a as createEntityType, C as CASE_VALIDATORS, d as definitionSchema, D as DefinitionReferenceMarker, g as get$1, R as REF_ANNOTATIONS_MARKER_SYMBOL, b as createDefinitionSchemaParserContext, s as set$1, e as modelForeignRelationEntityType, f as modelLocalRelationEntityType, h as modelScalarFieldEntityType, j as modelTransformerEntityType, k as modelEntityType, l as modelEnumValueEntityType, n as featureEntityType, o as modelEnumEntityType, p as modelUniqueConstraintEntityType, q as createFeaturesSchema, M as ModelUtils, r as omit, t as cloneDeep } from '../model-merger-BVBtbNAj.js';
|
|
2
|
+
export { K as DefinitionDiffArrayIncludesField, I as DefinitionDiffKeyedArrayField, J as DefinitionDiffReplacementField, v as DefinitionEntityType, F as FeatureUtils, O as applyDefinitionDiff, E as applyModelMergerDiff, G as applyModelMergerResultInPlace, H as createAndApplyModelMergerResults, N as createDefinitionDiff, L as createDefinitionDiffConfig, x as createFeatureSchema, u as createInitializedPluginSpec, z as createModelMergerResult, B as createModelMergerResults, A as doesModelMergerResultsHaveChanges, w as featureNameSchema, y as modelMergerDefinitionDiffConfig } from '../model-merger-BVBtbNAj.js';
|
|
3
|
+
import { importShared } from '../__federation_fn_import-CGvRdRVe.js';
|
|
4
4
|
|
|
5
5
|
function createAdminCrudInputCompilerImplementation() {
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1459,7 +1459,7 @@ var produce = immer.produce;
|
|
|
1459
1459
|
immer.produceWithPatches.bind(
|
|
1460
1460
|
immer
|
|
1461
1461
|
);
|
|
1462
|
-
|
|
1462
|
+
immer.setAutoFreeze.bind(immer);
|
|
1463
1463
|
immer.setUseStrictShallowCopy.bind(immer);
|
|
1464
1464
|
immer.applyPatches.bind(immer);
|
|
1465
1465
|
immer.createDraft.bind(immer);
|
|
@@ -1526,7 +1526,6 @@ const pluginConfigSpec = createPluginSpec('core/plugin-config', {
|
|
|
1526
1526
|
|
|
1527
1527
|
function runPluginMigrations(projectDefinition, pluginImplementationStore) {
|
|
1528
1528
|
const pluginConfigService = pluginImplementationStore.getPluginSpec(pluginConfigSpec);
|
|
1529
|
-
setAutoFreeze(false);
|
|
1530
1529
|
return produce(projectDefinition, (draft) => {
|
|
1531
1530
|
for (const pluginDefinition of draft.plugins ?? []) {
|
|
1532
1531
|
const pluginMigrations = pluginConfigService.getMigrations(pluginEntityType.keyFromId(pluginDefinition.id));
|
|
@@ -1539,7 +1538,13 @@ function runPluginMigrations(projectDefinition, pluginImplementationStore) {
|
|
|
1539
1538
|
for (const migration of pluginMigrations) {
|
|
1540
1539
|
if (migration.version > currentSchemaVersion) {
|
|
1541
1540
|
try {
|
|
1542
|
-
|
|
1541
|
+
const migrationResult = migration.migrate(pluginDefinition.config, draft);
|
|
1542
|
+
if (migrationResult.updatedConfig !== undefined) {
|
|
1543
|
+
pluginDefinition.config = migrationResult.updatedConfig;
|
|
1544
|
+
}
|
|
1545
|
+
if (migrationResult.updateProjectDefinition) {
|
|
1546
|
+
migrationResult.updateProjectDefinition(draft);
|
|
1547
|
+
}
|
|
1543
1548
|
}
|
|
1544
1549
|
catch (error) {
|
|
1545
1550
|
throw new Error(`Error migrating plugin ${pluginDefinition.id} to version ${migration.version}: ${String(error)}`);
|
|
@@ -2256,8 +2261,6 @@ const AppUtils = {
|
|
|
2256
2261
|
getBackendRelativePath,
|
|
2257
2262
|
};
|
|
2258
2263
|
|
|
2259
|
-
const authRoleEntityType = createEntityType('role');
|
|
2260
|
-
|
|
2261
2264
|
const appEntityType = createEntityType('app');
|
|
2262
2265
|
function createAppEntryType(name) {
|
|
2263
2266
|
return name;
|
|
@@ -2277,6 +2280,21 @@ const baseAppValidators = {
|
|
|
2277
2280
|
};
|
|
2278
2281
|
const baseAppSchema = z$j.object(baseAppValidators);
|
|
2279
2282
|
|
|
2283
|
+
const {z: z$i} = await importShared('zod');
|
|
2284
|
+
const createBackendAppSchema = definitionSchema(() => z$i.object({
|
|
2285
|
+
...baseAppValidators,
|
|
2286
|
+
type: z$i.literal('backend'),
|
|
2287
|
+
enableStripe: z$i.boolean().optional(),
|
|
2288
|
+
enableRedis: z$i.boolean().optional(),
|
|
2289
|
+
enableBullQueue: z$i.boolean().optional(),
|
|
2290
|
+
enablePostmark: z$i.boolean().optional(),
|
|
2291
|
+
enableSubscriptions: z$i.boolean().optional(),
|
|
2292
|
+
enableAxios: z$i.boolean().optional(),
|
|
2293
|
+
}));
|
|
2294
|
+
const backendAppEntryType = createAppEntryType('backend');
|
|
2295
|
+
|
|
2296
|
+
const authRoleEntityType = createEntityType('role');
|
|
2297
|
+
|
|
2280
2298
|
/**
|
|
2281
2299
|
* Strips the DefinitionReferenceMarker from the value recursively.
|
|
2282
2300
|
* @param value - The value to strip the DefinitionReferenceMarker from.
|
|
@@ -2900,141 +2918,141 @@ const SCALAR_FIELD_TYPES = [
|
|
|
2900
2918
|
'enum',
|
|
2901
2919
|
];
|
|
2902
2920
|
|
|
2903
|
-
const {z: z$
|
|
2904
|
-
const oklchColor = z$
|
|
2921
|
+
const {z: z$h} = await importShared('zod');
|
|
2922
|
+
const oklchColor = z$h
|
|
2905
2923
|
.string()
|
|
2906
2924
|
.regex(/^oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)$/, {
|
|
2907
2925
|
message: 'OKLCH color must be of the format "oklch(l c h [/ a])" where l and c are between 0 and 1 and h is between 0 and 360 and a is between 0 and 100',
|
|
2908
2926
|
});
|
|
2909
|
-
const themeColorSchema = z$
|
|
2910
|
-
const paletteSchema = z$
|
|
2927
|
+
const themeColorSchema = z$h.record(z$h.enum(THEME_COLOR_KEYS), oklchColor);
|
|
2928
|
+
const paletteSchema = z$h
|
|
2911
2929
|
.object({
|
|
2912
|
-
paletteName: z$
|
|
2930
|
+
paletteName: z$h.string().min(1),
|
|
2913
2931
|
customBase: oklchColor.nullish(),
|
|
2914
|
-
shades: z$
|
|
2932
|
+
shades: z$h.record(z$h.enum(PALETTE_SHADES), oklchColor),
|
|
2915
2933
|
})
|
|
2916
2934
|
.refine((data) => data.paletteName !== 'custom' || !!data.paletteName, {
|
|
2917
2935
|
message: 'A custom base color is required if using a custom base palette',
|
|
2918
2936
|
path: ['customBase'],
|
|
2919
2937
|
});
|
|
2920
|
-
const palettesSchema = z$
|
|
2938
|
+
const palettesSchema = z$h.object({
|
|
2921
2939
|
base: paletteSchema,
|
|
2922
2940
|
primary: paletteSchema,
|
|
2923
2941
|
});
|
|
2924
|
-
const createThemeSchema = definitionSchema(() => z$
|
|
2925
|
-
palettes: z$
|
|
2942
|
+
const createThemeSchema = definitionSchema(() => z$h.object({
|
|
2943
|
+
palettes: z$h.object({
|
|
2926
2944
|
base: paletteSchema,
|
|
2927
2945
|
primary: paletteSchema,
|
|
2928
2946
|
}),
|
|
2929
|
-
colors: z$
|
|
2947
|
+
colors: z$h.object({
|
|
2930
2948
|
light: themeColorSchema,
|
|
2931
2949
|
dark: themeColorSchema,
|
|
2932
2950
|
}),
|
|
2933
2951
|
}));
|
|
2934
2952
|
|
|
2935
|
-
const {z: z$
|
|
2953
|
+
const {z: z$g} = await importShared('zod');
|
|
2936
2954
|
|
|
2937
2955
|
const VALIDATORS = {
|
|
2938
|
-
PASCAL_CASE_STRING: z$
|
|
2956
|
+
PASCAL_CASE_STRING: z$g
|
|
2939
2957
|
.string()
|
|
2940
2958
|
.regex(/^[A-Z][a-zA-Z0-9]*$/, "Should be PascalCase, e.g. 'MyModel'"),
|
|
2941
|
-
CAMEL_CASE_STRING: z$
|
|
2959
|
+
CAMEL_CASE_STRING: z$g
|
|
2942
2960
|
.string()
|
|
2943
2961
|
.regex(/^[a-z][a-zA-Z0-9]*$/, "Should be camelCase, e.g. 'myField'"),
|
|
2944
|
-
CONSTANT_CASE_STRING: z$
|
|
2962
|
+
CONSTANT_CASE_STRING: z$g
|
|
2945
2963
|
.string()
|
|
2946
2964
|
.regex(/^[A-Z][A-Z0-9_]*$/, "Should be CONSTANT_CASE, e.g. 'MY_CONSTANT'"),
|
|
2947
|
-
OPTIONAL_CONSTANT_CASE_STRING: z$
|
|
2965
|
+
OPTIONAL_CONSTANT_CASE_STRING: z$g
|
|
2948
2966
|
.string()
|
|
2949
2967
|
.regex(/^[A-Z][A-Z0-9_]*$/, "Should be CONSTANT_CASE, e.g. 'MY_CONSTANT'")
|
|
2950
|
-
.or(z$
|
|
2968
|
+
.or(z$g.literal(''))
|
|
2951
2969
|
.optional(),
|
|
2952
2970
|
};
|
|
2953
2971
|
|
|
2954
|
-
const {z: z$
|
|
2955
|
-
const createRoleArray = definitionSchema((ctx) => ctx.withDefault(z$
|
|
2972
|
+
const {z: z$f} = await importShared('zod');
|
|
2973
|
+
const createRoleArray = definitionSchema((ctx) => ctx.withDefault(z$f.array(ctx.withRef({
|
|
2956
2974
|
type: authRoleEntityType,
|
|
2957
2975
|
onDelete: 'DELETE',
|
|
2958
2976
|
})), []));
|
|
2959
|
-
const createModelGraphqlSchema = definitionSchema((ctx) => z$
|
|
2960
|
-
objectType: ctx.withDefault(z$
|
|
2961
|
-
enabled: ctx.withDefault(z$
|
|
2962
|
-
fields: ctx.withDefault(z$
|
|
2977
|
+
const createModelGraphqlSchema = definitionSchema((ctx) => z$f.object({
|
|
2978
|
+
objectType: ctx.withDefault(z$f.object({
|
|
2979
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2980
|
+
fields: ctx.withDefault(z$f.array(ctx.withRef({
|
|
2963
2981
|
type: modelScalarFieldEntityType,
|
|
2964
2982
|
onDelete: 'DELETE',
|
|
2965
2983
|
parentPath: { context: 'model' },
|
|
2966
2984
|
})), []),
|
|
2967
|
-
localRelations: ctx.withDefault(z$
|
|
2985
|
+
localRelations: ctx.withDefault(z$f.array(ctx.withRef({
|
|
2968
2986
|
type: modelLocalRelationEntityType,
|
|
2969
2987
|
onDelete: 'DELETE',
|
|
2970
2988
|
parentPath: { context: 'model' },
|
|
2971
2989
|
})), []),
|
|
2972
|
-
foreignRelations: ctx.withDefault(z$
|
|
2990
|
+
foreignRelations: ctx.withDefault(z$f.array(ctx.withRef({
|
|
2973
2991
|
type: modelForeignRelationEntityType,
|
|
2974
2992
|
onDelete: 'DELETE',
|
|
2975
2993
|
parentPath: { context: 'model' },
|
|
2976
2994
|
})), []),
|
|
2977
2995
|
}), {}),
|
|
2978
|
-
queries: ctx.withDefault(z$
|
|
2979
|
-
get: ctx.withDefault(z$
|
|
2980
|
-
enabled: ctx.withDefault(z$
|
|
2996
|
+
queries: ctx.withDefault(z$f.object({
|
|
2997
|
+
get: ctx.withDefault(z$f.object({
|
|
2998
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2981
2999
|
roles: createRoleArray(ctx),
|
|
2982
3000
|
}), {}),
|
|
2983
|
-
list: ctx.withDefault(z$
|
|
2984
|
-
enabled: ctx.withDefault(z$
|
|
3001
|
+
list: ctx.withDefault(z$f.object({
|
|
3002
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2985
3003
|
roles: createRoleArray(ctx),
|
|
2986
3004
|
}), {}),
|
|
2987
3005
|
}), {}),
|
|
2988
|
-
mutations: ctx.withDefault(z$
|
|
2989
|
-
create: ctx.withDefault(z$
|
|
2990
|
-
enabled: ctx.withDefault(z$
|
|
3006
|
+
mutations: ctx.withDefault(z$f.object({
|
|
3007
|
+
create: ctx.withDefault(z$f.object({
|
|
3008
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2991
3009
|
roles: createRoleArray(ctx),
|
|
2992
3010
|
}), {}),
|
|
2993
|
-
update: ctx.withDefault(z$
|
|
2994
|
-
enabled: ctx.withDefault(z$
|
|
3011
|
+
update: ctx.withDefault(z$f.object({
|
|
3012
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2995
3013
|
roles: createRoleArray(ctx),
|
|
2996
3014
|
}), {}),
|
|
2997
|
-
delete: ctx.withDefault(z$
|
|
2998
|
-
enabled: ctx.withDefault(z$
|
|
3015
|
+
delete: ctx.withDefault(z$f.object({
|
|
3016
|
+
enabled: ctx.withDefault(z$f.boolean(), false),
|
|
2999
3017
|
roles: createRoleArray(ctx),
|
|
3000
3018
|
}), {}),
|
|
3001
3019
|
}), {}),
|
|
3002
3020
|
}));
|
|
3003
3021
|
|
|
3004
|
-
const {z: z$
|
|
3022
|
+
const {z: z$e} = await importShared('zod');
|
|
3005
3023
|
|
|
3006
3024
|
const baseTransformerFields = {
|
|
3007
|
-
id: z$
|
|
3008
|
-
type: z$
|
|
3025
|
+
id: z$e.string(),
|
|
3026
|
+
type: z$e.string().min(1),
|
|
3009
3027
|
};
|
|
3010
|
-
const baseTransformerSchema = z$
|
|
3028
|
+
const baseTransformerSchema = z$e.object(baseTransformerFields);
|
|
3011
3029
|
function createModelTransformerType(payload) {
|
|
3012
3030
|
return payload;
|
|
3013
3031
|
}
|
|
3014
3032
|
|
|
3015
|
-
const {z: z$
|
|
3016
|
-
const createPasswordTransformerSchema = definitionSchema((ctx) => ctx.withEnt(z$
|
|
3033
|
+
const {z: z$d} = await importShared('zod');
|
|
3034
|
+
const createPasswordTransformerSchema = definitionSchema((ctx) => ctx.withEnt(z$d.object({
|
|
3017
3035
|
...baseTransformerFields,
|
|
3018
|
-
type: z$
|
|
3036
|
+
type: z$d.literal('password'),
|
|
3019
3037
|
}), {
|
|
3020
3038
|
type: modelTransformerEntityType,
|
|
3021
3039
|
parentPath: { context: 'model' },
|
|
3022
3040
|
getNameResolver: () => 'password',
|
|
3023
3041
|
}));
|
|
3024
|
-
const createEmbeddedRelationTransformerSchema = definitionSchema((ctx) => ctx.withRefBuilder(ctx.withEnt(z$
|
|
3042
|
+
const createEmbeddedRelationTransformerSchema = definitionSchema((ctx) => ctx.withRefBuilder(ctx.withEnt(z$d.object({
|
|
3025
3043
|
...baseTransformerFields,
|
|
3026
3044
|
foreignRelationRef: ctx.withRef({
|
|
3027
3045
|
type: modelForeignRelationEntityType,
|
|
3028
3046
|
onDelete: 'DELETE_PARENT',
|
|
3029
3047
|
parentPath: { context: 'model' },
|
|
3030
3048
|
}),
|
|
3031
|
-
type: z$
|
|
3032
|
-
embeddedFieldNames: z$
|
|
3049
|
+
type: z$d.literal('embeddedRelation'),
|
|
3050
|
+
embeddedFieldNames: z$d.array(ctx.withRef({
|
|
3033
3051
|
type: modelScalarFieldEntityType,
|
|
3034
3052
|
onDelete: 'RESTRICT',
|
|
3035
3053
|
parentPath: { context: 'embeddedModel' },
|
|
3036
3054
|
})),
|
|
3037
|
-
embeddedTransformerNames: z$
|
|
3055
|
+
embeddedTransformerNames: z$d
|
|
3038
3056
|
.array(ctx.withRef({
|
|
3039
3057
|
type: modelTransformerEntityType,
|
|
3040
3058
|
onDelete: 'RESTRICT',
|
|
@@ -3114,46 +3132,46 @@ const createTransformerSchema = definitionSchema((ctx) => baseTransformerSchema.
|
|
|
3114
3132
|
});
|
|
3115
3133
|
}));
|
|
3116
3134
|
|
|
3117
|
-
const {z: z$
|
|
3118
|
-
const createEnumValueSchema = definitionSchema((ctx) => ctx.withEnt(z$
|
|
3119
|
-
id: z$
|
|
3120
|
-
name: z$
|
|
3121
|
-
friendlyName: z$
|
|
3135
|
+
const {z: z$c} = await importShared('zod');
|
|
3136
|
+
const createEnumValueSchema = definitionSchema((ctx) => ctx.withEnt(z$c.object({
|
|
3137
|
+
id: z$c.string(),
|
|
3138
|
+
name: z$c.string().min(1),
|
|
3139
|
+
friendlyName: z$c.string().min(1),
|
|
3122
3140
|
}), {
|
|
3123
3141
|
type: modelEnumValueEntityType,
|
|
3124
3142
|
parentPath: { context: 'enum' },
|
|
3125
3143
|
}));
|
|
3126
|
-
const createEnumBaseSchema = definitionSchema((ctx) => z$
|
|
3127
|
-
id: z$
|
|
3128
|
-
name: z$
|
|
3144
|
+
const createEnumBaseSchema = definitionSchema((ctx) => z$c.object({
|
|
3145
|
+
id: z$c.string(),
|
|
3146
|
+
name: z$c.string().min(1),
|
|
3129
3147
|
featureRef: ctx.withRef({
|
|
3130
3148
|
type: featureEntityType,
|
|
3131
3149
|
onDelete: 'RESTRICT',
|
|
3132
3150
|
}),
|
|
3133
|
-
values: z$
|
|
3134
|
-
isExposed: z$
|
|
3151
|
+
values: z$c.array(createEnumValueSchema(ctx)),
|
|
3152
|
+
isExposed: z$c.boolean(),
|
|
3135
3153
|
}));
|
|
3136
3154
|
const createEnumSchema = definitionSchema((ctx) => ctx.withEnt(createEnumBaseSchema(ctx), {
|
|
3137
3155
|
type: modelEnumEntityType,
|
|
3138
3156
|
addContext: 'enum',
|
|
3139
3157
|
}));
|
|
3140
3158
|
|
|
3141
|
-
const {z: z$
|
|
3159
|
+
const {z: z$b} = await importShared('zod');
|
|
3142
3160
|
const createModelScalarFieldSchema = definitionSchema((ctx) => ctx
|
|
3143
|
-
.withEnt(z$
|
|
3144
|
-
id: z$
|
|
3161
|
+
.withEnt(z$b.object({
|
|
3162
|
+
id: z$b.string(),
|
|
3145
3163
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
3146
|
-
type: z$
|
|
3147
|
-
isOptional: z$
|
|
3148
|
-
options: ctx.withRefBuilder(z$
|
|
3164
|
+
type: z$b.enum(SCALAR_FIELD_TYPES),
|
|
3165
|
+
isOptional: z$b.boolean().default(false),
|
|
3166
|
+
options: ctx.withRefBuilder(z$b
|
|
3149
3167
|
.object({
|
|
3150
3168
|
// string options
|
|
3151
|
-
default: z$
|
|
3169
|
+
default: z$b.string().default(''),
|
|
3152
3170
|
// uuid options
|
|
3153
|
-
genUuid: z$
|
|
3171
|
+
genUuid: z$b.boolean().optional(),
|
|
3154
3172
|
// date options
|
|
3155
|
-
updatedAt: z$
|
|
3156
|
-
defaultToNow: z$
|
|
3173
|
+
updatedAt: z$b.boolean().optional(),
|
|
3174
|
+
defaultToNow: z$b.boolean().optional(),
|
|
3157
3175
|
// enum options
|
|
3158
3176
|
enumRef: ctx
|
|
3159
3177
|
.withRef({
|
|
@@ -3161,7 +3179,7 @@ const createModelScalarFieldSchema = definitionSchema((ctx) => ctx
|
|
|
3161
3179
|
onDelete: 'RESTRICT',
|
|
3162
3180
|
})
|
|
3163
3181
|
.optional(),
|
|
3164
|
-
defaultEnumValueRef: z$
|
|
3182
|
+
defaultEnumValueRef: z$b.string().optional(),
|
|
3165
3183
|
})
|
|
3166
3184
|
.transform((val) => ({
|
|
3167
3185
|
...val,
|
|
@@ -3213,13 +3231,13 @@ const REFERENTIAL_ACTIONS = [
|
|
|
3213
3231
|
'SetNull',
|
|
3214
3232
|
'SetDefault',
|
|
3215
3233
|
];
|
|
3216
|
-
const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$
|
|
3217
|
-
id: z$
|
|
3218
|
-
foreignId: z$
|
|
3234
|
+
const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$b.object({
|
|
3235
|
+
id: z$b.string(),
|
|
3236
|
+
foreignId: z$b
|
|
3219
3237
|
.string()
|
|
3220
3238
|
.default(() => modelForeignRelationEntityType.generateNewId()),
|
|
3221
3239
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
3222
|
-
references: z$
|
|
3240
|
+
references: z$b.array(z$b.object({
|
|
3223
3241
|
localRef: ctx.withRef({
|
|
3224
3242
|
type: modelScalarFieldEntityType,
|
|
3225
3243
|
onDelete: 'RESTRICT',
|
|
@@ -3231,10 +3249,10 @@ const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuil
|
|
|
3231
3249
|
parentPath: { context: 'foreignModel' },
|
|
3232
3250
|
}),
|
|
3233
3251
|
})),
|
|
3234
|
-
modelRef: z$
|
|
3252
|
+
modelRef: z$b.string().min(1),
|
|
3235
3253
|
foreignRelationName: VALIDATORS.CAMEL_CASE_STRING,
|
|
3236
|
-
onDelete: z$
|
|
3237
|
-
onUpdate: z$
|
|
3254
|
+
onDelete: z$b.enum(REFERENTIAL_ACTIONS).default('Cascade'),
|
|
3255
|
+
onUpdate: z$b.enum(REFERENTIAL_ACTIONS).default('Restrict'),
|
|
3238
3256
|
}), (builder) => {
|
|
3239
3257
|
builder.addReference({
|
|
3240
3258
|
type: modelEntityType,
|
|
@@ -3253,9 +3271,9 @@ const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuil
|
|
|
3253
3271
|
parentPath: 'modelRef',
|
|
3254
3272
|
});
|
|
3255
3273
|
}));
|
|
3256
|
-
const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(z$
|
|
3257
|
-
id: z$
|
|
3258
|
-
fields: z$
|
|
3274
|
+
const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(z$b.object({
|
|
3275
|
+
id: z$b.string(),
|
|
3276
|
+
fields: z$b.array(z$b.object({
|
|
3259
3277
|
fieldRef: ctx.withRef({
|
|
3260
3278
|
type: modelScalarFieldEntityType,
|
|
3261
3279
|
onDelete: 'RESTRICT',
|
|
@@ -3272,18 +3290,18 @@ const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(
|
|
|
3272
3290
|
});
|
|
3273
3291
|
},
|
|
3274
3292
|
}));
|
|
3275
|
-
const createModelServiceSchema = definitionSchema((ctx) => z$
|
|
3276
|
-
create: z$
|
|
3293
|
+
const createModelServiceSchema = definitionSchema((ctx) => z$b.object({
|
|
3294
|
+
create: z$b
|
|
3277
3295
|
.object({
|
|
3278
|
-
enabled: z$
|
|
3279
|
-
fields: z$
|
|
3296
|
+
enabled: z$b.boolean().default(false),
|
|
3297
|
+
fields: z$b
|
|
3280
3298
|
.array(ctx.withRef({
|
|
3281
3299
|
type: modelScalarFieldEntityType,
|
|
3282
3300
|
onDelete: 'DELETE',
|
|
3283
3301
|
parentPath: { context: 'model' },
|
|
3284
3302
|
}))
|
|
3285
3303
|
.optional(),
|
|
3286
|
-
transformerNames: z$
|
|
3304
|
+
transformerNames: z$b
|
|
3287
3305
|
.array(ctx.withRef({
|
|
3288
3306
|
type: modelTransformerEntityType,
|
|
3289
3307
|
onDelete: 'DELETE',
|
|
@@ -3292,17 +3310,17 @@ const createModelServiceSchema = definitionSchema((ctx) => z$c.object({
|
|
|
3292
3310
|
.optional(),
|
|
3293
3311
|
})
|
|
3294
3312
|
.default({ enabled: false }),
|
|
3295
|
-
update: z$
|
|
3313
|
+
update: z$b
|
|
3296
3314
|
.object({
|
|
3297
|
-
enabled: z$
|
|
3298
|
-
fields: z$
|
|
3315
|
+
enabled: z$b.boolean().default(false),
|
|
3316
|
+
fields: z$b
|
|
3299
3317
|
.array(ctx.withRef({
|
|
3300
3318
|
type: modelScalarFieldEntityType,
|
|
3301
3319
|
onDelete: 'DELETE',
|
|
3302
3320
|
parentPath: { context: 'model' },
|
|
3303
3321
|
}))
|
|
3304
3322
|
.optional(),
|
|
3305
|
-
transformerNames: z$
|
|
3323
|
+
transformerNames: z$b
|
|
3306
3324
|
.array(ctx.withRef({
|
|
3307
3325
|
type: modelTransformerEntityType,
|
|
3308
3326
|
onDelete: 'DELETE',
|
|
@@ -3311,33 +3329,33 @@ const createModelServiceSchema = definitionSchema((ctx) => z$c.object({
|
|
|
3311
3329
|
.optional(),
|
|
3312
3330
|
})
|
|
3313
3331
|
.default({ enabled: false }),
|
|
3314
|
-
delete: z$
|
|
3332
|
+
delete: z$b
|
|
3315
3333
|
.object({
|
|
3316
|
-
enabled: z$
|
|
3334
|
+
enabled: z$b.boolean().default(false),
|
|
3317
3335
|
})
|
|
3318
3336
|
.default({
|
|
3319
3337
|
enabled: false,
|
|
3320
3338
|
}),
|
|
3321
|
-
transformers: z$
|
|
3339
|
+
transformers: z$b.array(createTransformerSchema(ctx)).default([]),
|
|
3322
3340
|
}));
|
|
3323
|
-
const createModelBaseSchema = definitionSchema((ctx) => z$
|
|
3324
|
-
id: z$
|
|
3341
|
+
const createModelBaseSchema = definitionSchema((ctx) => z$b.object({
|
|
3342
|
+
id: z$b.string(),
|
|
3325
3343
|
name: VALIDATORS.PASCAL_CASE_STRING,
|
|
3326
3344
|
featureRef: ctx.withRef({
|
|
3327
3345
|
type: featureEntityType,
|
|
3328
3346
|
onDelete: 'RESTRICT',
|
|
3329
3347
|
}),
|
|
3330
|
-
model: z$
|
|
3331
|
-
fields: z$
|
|
3332
|
-
relations: z$
|
|
3333
|
-
primaryKeyFieldRefs: z$
|
|
3348
|
+
model: z$b.object({
|
|
3349
|
+
fields: z$b.array(createModelScalarFieldSchema(ctx)),
|
|
3350
|
+
relations: z$b.array(createModelRelationFieldSchema(ctx)).optional(),
|
|
3351
|
+
primaryKeyFieldRefs: z$b
|
|
3334
3352
|
.array(ctx.withRef({
|
|
3335
3353
|
type: modelScalarFieldEntityType,
|
|
3336
3354
|
onDelete: 'RESTRICT',
|
|
3337
3355
|
parentPath: { context: 'model' },
|
|
3338
3356
|
}))
|
|
3339
3357
|
.min(1),
|
|
3340
|
-
uniqueConstraints: z$
|
|
3358
|
+
uniqueConstraints: z$b
|
|
3341
3359
|
.array(createModelUniqueConstraintSchema(ctx))
|
|
3342
3360
|
.optional(),
|
|
3343
3361
|
}),
|
|
@@ -3358,22 +3376,22 @@ const adminSectionEntityType = createEntityType('admin-section', {
|
|
|
3358
3376
|
parentType: appEntityType,
|
|
3359
3377
|
});
|
|
3360
3378
|
|
|
3361
|
-
const {z: z$
|
|
3362
|
-
const createBaseAdminSectionValidators = definitionSchema((ctx) => z$
|
|
3363
|
-
id: z$
|
|
3364
|
-
name: z$
|
|
3379
|
+
const {z: z$a} = await importShared('zod');
|
|
3380
|
+
const createBaseAdminSectionValidators = definitionSchema((ctx) => z$a.object({
|
|
3381
|
+
id: z$a.string().default(adminSectionEntityType.generateNewId()),
|
|
3382
|
+
name: z$a.string().min(1),
|
|
3365
3383
|
featureRef: ctx.withRef({
|
|
3366
3384
|
type: featureEntityType,
|
|
3367
3385
|
onDelete: 'RESTRICT',
|
|
3368
3386
|
}),
|
|
3369
|
-
icon: z$
|
|
3370
|
-
type: z$
|
|
3387
|
+
icon: z$a.string().optional(),
|
|
3388
|
+
type: z$a.string().min(1),
|
|
3371
3389
|
}));
|
|
3372
3390
|
|
|
3373
|
-
const {z: z$
|
|
3374
|
-
const baseAdminCrudInputSchema = z$
|
|
3375
|
-
type: z$
|
|
3376
|
-
label: z$
|
|
3391
|
+
const {z: z$9} = await importShared('zod');
|
|
3392
|
+
const baseAdminCrudInputSchema = z$9.object({
|
|
3393
|
+
type: z$9.string().min(1),
|
|
3394
|
+
label: z$9.string().min(1),
|
|
3377
3395
|
});
|
|
3378
3396
|
function createAdminCrudInputType(payload) {
|
|
3379
3397
|
return payload;
|
|
@@ -3382,41 +3400,41 @@ const adminCrudEmbeddedFormEntityType = createEntityType('admin-crud-embedded-fo
|
|
|
3382
3400
|
parentType: adminSectionEntityType,
|
|
3383
3401
|
});
|
|
3384
3402
|
|
|
3385
|
-
const {z: z$
|
|
3386
|
-
const createAdminCrudTextInputSchema = definitionSchema((ctx) => z$
|
|
3387
|
-
type: z$
|
|
3388
|
-
label: z$
|
|
3403
|
+
const {z: z$8} = await importShared('zod');
|
|
3404
|
+
const createAdminCrudTextInputSchema = definitionSchema((ctx) => z$8.object({
|
|
3405
|
+
type: z$8.literal('text'),
|
|
3406
|
+
label: z$8.string().min(1),
|
|
3389
3407
|
modelFieldRef: ctx.withRef({
|
|
3390
3408
|
type: modelScalarFieldEntityType,
|
|
3391
3409
|
onDelete: 'RESTRICT',
|
|
3392
3410
|
parentPath: { context: 'model' },
|
|
3393
3411
|
}),
|
|
3394
|
-
validation: z$
|
|
3412
|
+
validation: z$8.string().optional(),
|
|
3395
3413
|
}));
|
|
3396
3414
|
const adminCrudTextInputType = createAdminCrudInputType({
|
|
3397
3415
|
name: 'text',
|
|
3398
3416
|
createSchema: createAdminCrudTextInputSchema,
|
|
3399
3417
|
});
|
|
3400
|
-
const createAdminCrudForeignInputSchema = definitionSchema((ctx) => z$
|
|
3401
|
-
type: z$
|
|
3402
|
-
label: z$
|
|
3418
|
+
const createAdminCrudForeignInputSchema = definitionSchema((ctx) => z$8.object({
|
|
3419
|
+
type: z$8.literal('foreign'),
|
|
3420
|
+
label: z$8.string().min(1),
|
|
3403
3421
|
localRelationRef: ctx.withRef({
|
|
3404
3422
|
type: modelLocalRelationEntityType,
|
|
3405
3423
|
onDelete: 'RESTRICT',
|
|
3406
3424
|
parentPath: { context: 'model' },
|
|
3407
3425
|
}),
|
|
3408
|
-
labelExpression: z$
|
|
3409
|
-
valueExpression: z$
|
|
3410
|
-
defaultLabel: z$
|
|
3411
|
-
nullLabel: z$
|
|
3426
|
+
labelExpression: z$8.string().min(1),
|
|
3427
|
+
valueExpression: z$8.string().min(1),
|
|
3428
|
+
defaultLabel: z$8.string().optional(),
|
|
3429
|
+
nullLabel: z$8.string().optional(),
|
|
3412
3430
|
}));
|
|
3413
3431
|
const adminCrudForeignInputType = createAdminCrudInputType({
|
|
3414
3432
|
name: 'foreign',
|
|
3415
3433
|
createSchema: createAdminCrudForeignInputSchema,
|
|
3416
3434
|
});
|
|
3417
|
-
const createAdminCrudEnumInputSchema = definitionSchema((ctx) => z$
|
|
3418
|
-
type: z$
|
|
3419
|
-
label: z$
|
|
3435
|
+
const createAdminCrudEnumInputSchema = definitionSchema((ctx) => z$8.object({
|
|
3436
|
+
type: z$8.literal('enum'),
|
|
3437
|
+
label: z$8.string().min(1),
|
|
3420
3438
|
modelFieldRef: ctx.withRef({
|
|
3421
3439
|
type: modelScalarFieldEntityType,
|
|
3422
3440
|
onDelete: 'RESTRICT',
|
|
@@ -3427,9 +3445,9 @@ const adminCrudEnumInputType = createAdminCrudInputType({
|
|
|
3427
3445
|
name: 'enum',
|
|
3428
3446
|
createSchema: createAdminCrudEnumInputSchema,
|
|
3429
3447
|
});
|
|
3430
|
-
const createAdminCrudEmbeddedInputSchema = definitionSchema((ctx) => z$
|
|
3431
|
-
type: z$
|
|
3432
|
-
label: z$
|
|
3448
|
+
const createAdminCrudEmbeddedInputSchema = definitionSchema((ctx) => z$8.object({
|
|
3449
|
+
type: z$8.literal('embedded'),
|
|
3450
|
+
label: z$8.string().min(1),
|
|
3433
3451
|
modelRelationRef: ctx.withRef({
|
|
3434
3452
|
type: modelForeignRelationEntityType,
|
|
3435
3453
|
onDelete: 'RESTRICT',
|
|
@@ -3445,9 +3463,9 @@ const adminCrudEmbeddedInputType = createAdminCrudInputType({
|
|
|
3445
3463
|
name: 'embedded',
|
|
3446
3464
|
createSchema: createAdminCrudEmbeddedInputSchema,
|
|
3447
3465
|
});
|
|
3448
|
-
const createAdminCrudEmbeddedLocalInputSchema = definitionSchema((ctx) => z$
|
|
3449
|
-
type: z$
|
|
3450
|
-
label: z$
|
|
3466
|
+
const createAdminCrudEmbeddedLocalInputSchema = definitionSchema((ctx) => z$8.object({
|
|
3467
|
+
type: z$8.literal('embeddedLocal'),
|
|
3468
|
+
label: z$8.string().min(1),
|
|
3451
3469
|
localRelationRef: ctx.withRef({
|
|
3452
3470
|
type: modelLocalRelationEntityType,
|
|
3453
3471
|
onDelete: 'RESTRICT',
|
|
@@ -3463,9 +3481,9 @@ const adminCrudEmbeddedLocalInputType = createAdminCrudInputType({
|
|
|
3463
3481
|
name: 'embeddedLocal',
|
|
3464
3482
|
createSchema: createAdminCrudEmbeddedLocalInputSchema,
|
|
3465
3483
|
});
|
|
3466
|
-
const createAdminCrudPasswordInputSchema = definitionSchema(() => z$
|
|
3467
|
-
type: z$
|
|
3468
|
-
label: z$
|
|
3484
|
+
const createAdminCrudPasswordInputSchema = definitionSchema(() => z$8.object({
|
|
3485
|
+
type: z$8.literal('password'),
|
|
3486
|
+
label: z$8.string().min(1),
|
|
3469
3487
|
}));
|
|
3470
3488
|
const adminCrudPasswordInputType = createAdminCrudInputType({
|
|
3471
3489
|
name: 'password',
|
|
@@ -3521,69 +3539,69 @@ const createAdminCrudInputSchema = definitionSchema((ctx) => baseAdminCrudInputS
|
|
|
3521
3539
|
});
|
|
3522
3540
|
}));
|
|
3523
3541
|
|
|
3524
|
-
const {z: z$
|
|
3542
|
+
const {z: z$7} = await importShared('zod');
|
|
3525
3543
|
// Table Columns
|
|
3526
|
-
const createAdminCrudForeignDisplaySchema = definitionSchema((ctx) => z$
|
|
3527
|
-
type: z$
|
|
3544
|
+
const createAdminCrudForeignDisplaySchema = definitionSchema((ctx) => z$7.object({
|
|
3545
|
+
type: z$7.literal('foreign'),
|
|
3528
3546
|
localRelationRef: ctx.withRef({
|
|
3529
3547
|
type: modelLocalRelationEntityType,
|
|
3530
3548
|
onDelete: 'RESTRICT',
|
|
3531
3549
|
parentPath: { context: 'model' },
|
|
3532
3550
|
}),
|
|
3533
|
-
labelExpression: z$
|
|
3534
|
-
valueExpression: z$
|
|
3551
|
+
labelExpression: z$7.string().min(1),
|
|
3552
|
+
valueExpression: z$7.string().min(1),
|
|
3535
3553
|
}));
|
|
3536
|
-
const createAdminCrudTextDisplaySchema = definitionSchema((ctx) => z$
|
|
3537
|
-
type: z$
|
|
3554
|
+
const createAdminCrudTextDisplaySchema = definitionSchema((ctx) => z$7.object({
|
|
3555
|
+
type: z$7.literal('text'),
|
|
3538
3556
|
modelFieldRef: ctx.withRef({
|
|
3539
3557
|
type: modelScalarFieldEntityType,
|
|
3540
3558
|
onDelete: 'RESTRICT',
|
|
3541
3559
|
parentPath: { context: 'model' },
|
|
3542
3560
|
}),
|
|
3543
3561
|
}));
|
|
3544
|
-
const createAdminCrudDisplaySchema = definitionSchema((ctx) => z$
|
|
3562
|
+
const createAdminCrudDisplaySchema = definitionSchema((ctx) => z$7.discriminatedUnion('type', [
|
|
3545
3563
|
createAdminCrudTextDisplaySchema(ctx),
|
|
3546
3564
|
createAdminCrudForeignDisplaySchema(ctx),
|
|
3547
3565
|
]));
|
|
3548
3566
|
// TODO: Improve this to be more dynamic in the future
|
|
3549
3567
|
const adminCrudDisplayTypes = ['text', 'foreign'];
|
|
3550
|
-
const createAdminCrudTableColumnSchema = definitionSchema((ctx) => z$
|
|
3551
|
-
label: z$
|
|
3568
|
+
const createAdminCrudTableColumnSchema = definitionSchema((ctx) => z$7.object({
|
|
3569
|
+
label: z$7.string().min(1),
|
|
3552
3570
|
display: createAdminCrudDisplaySchema(ctx),
|
|
3553
3571
|
}));
|
|
3554
3572
|
// Embedded Crud
|
|
3555
|
-
const createAdminCrudEmbeddedObjectSchema = definitionSchema((ctx) => z$
|
|
3556
|
-
id: z$
|
|
3557
|
-
name: z$
|
|
3573
|
+
const createAdminCrudEmbeddedObjectSchema = definitionSchema((ctx) => z$7.object({
|
|
3574
|
+
id: z$7.string().min(1),
|
|
3575
|
+
name: z$7.string().min(1),
|
|
3558
3576
|
modelRef: ctx.withRef({
|
|
3559
3577
|
type: modelEntityType,
|
|
3560
3578
|
onDelete: 'RESTRICT',
|
|
3561
3579
|
}),
|
|
3562
|
-
includeIdField: z$
|
|
3563
|
-
type: z$
|
|
3564
|
-
form: z$
|
|
3565
|
-
fields: z$
|
|
3580
|
+
includeIdField: z$7.boolean().optional(),
|
|
3581
|
+
type: z$7.literal('object'),
|
|
3582
|
+
form: z$7.object({
|
|
3583
|
+
fields: z$7.array(createAdminCrudInputSchema(ctx)),
|
|
3566
3584
|
}),
|
|
3567
3585
|
}));
|
|
3568
|
-
const createAdminCrudEmbeddedListSchema = definitionSchema((ctx) => z$
|
|
3569
|
-
id: z$
|
|
3570
|
-
name: z$
|
|
3586
|
+
const createAdminCrudEmbeddedListSchema = definitionSchema((ctx) => z$7.object({
|
|
3587
|
+
id: z$7.string().min(1),
|
|
3588
|
+
name: z$7.string().min(1),
|
|
3571
3589
|
modelRef: ctx.withRef({
|
|
3572
3590
|
type: modelEntityType,
|
|
3573
3591
|
onDelete: 'RESTRICT',
|
|
3574
3592
|
}),
|
|
3575
|
-
includeIdField: z$
|
|
3576
|
-
type: z$
|
|
3593
|
+
includeIdField: z$7.boolean().optional(),
|
|
3594
|
+
type: z$7.literal('list'),
|
|
3577
3595
|
// NOTE: These two fields need to be synced with crud section schema
|
|
3578
3596
|
// because the web app expects that (TODO)
|
|
3579
|
-
table: z$
|
|
3580
|
-
columns: z$
|
|
3597
|
+
table: z$7.object({
|
|
3598
|
+
columns: z$7.array(createAdminCrudTableColumnSchema(ctx)),
|
|
3581
3599
|
}),
|
|
3582
|
-
form: z$
|
|
3583
|
-
fields: z$
|
|
3600
|
+
form: z$7.object({
|
|
3601
|
+
fields: z$7.array(createAdminCrudInputSchema(ctx)),
|
|
3584
3602
|
}),
|
|
3585
3603
|
}));
|
|
3586
|
-
const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$
|
|
3604
|
+
const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$7.discriminatedUnion('type', [
|
|
3587
3605
|
createAdminCrudEmbeddedObjectSchema(ctx),
|
|
3588
3606
|
createAdminCrudEmbeddedListSchema(ctx),
|
|
3589
3607
|
]), (builder) => {
|
|
@@ -3594,75 +3612,58 @@ const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefB
|
|
|
3594
3612
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3595
3613
|
}));
|
|
3596
3614
|
// Admin Section
|
|
3597
|
-
const createAdminCrudSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createBaseAdminSectionValidators(ctx).and(z$
|
|
3598
|
-
type: z$
|
|
3615
|
+
const createAdminCrudSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createBaseAdminSectionValidators(ctx).and(z$7.object({
|
|
3616
|
+
type: z$7.literal('crud'),
|
|
3599
3617
|
modelRef: ctx.withRef({
|
|
3600
3618
|
type: modelEntityType,
|
|
3601
3619
|
onDelete: 'RESTRICT',
|
|
3602
3620
|
}),
|
|
3603
|
-
disableCreate: z$
|
|
3604
|
-
table: z$
|
|
3605
|
-
columns: z$
|
|
3621
|
+
disableCreate: z$7.boolean().optional(),
|
|
3622
|
+
table: z$7.object({
|
|
3623
|
+
columns: z$7.array(createAdminCrudTableColumnSchema(ctx)),
|
|
3606
3624
|
}),
|
|
3607
|
-
form: z$
|
|
3608
|
-
fields: z$
|
|
3625
|
+
form: z$7.object({
|
|
3626
|
+
fields: z$7.array(createAdminCrudInputSchema(ctx)),
|
|
3609
3627
|
}),
|
|
3610
|
-
embeddedForms: z$
|
|
3628
|
+
embeddedForms: z$7
|
|
3611
3629
|
.array(createAdminCrudEmbeddedFormSchema(ctx))
|
|
3612
3630
|
.optional(),
|
|
3613
3631
|
})), (builder) => {
|
|
3614
3632
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3615
3633
|
}));
|
|
3616
3634
|
|
|
3617
|
-
const {z: z$
|
|
3618
|
-
const
|
|
3635
|
+
const {z: z$6} = await importShared('zod');
|
|
3636
|
+
const createWebAdminSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createAdminCrudSectionSchema(ctx), (builder) => {
|
|
3619
3637
|
builder.addEntity({
|
|
3620
3638
|
type: adminSectionEntityType,
|
|
3621
3639
|
parentPath: { context: 'app' },
|
|
3622
3640
|
addContext: 'admin-section',
|
|
3623
3641
|
});
|
|
3624
3642
|
}));
|
|
3625
|
-
const createAdminAppSchema = definitionSchema((ctx) => z$
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
allowedRoles: z$
|
|
3629
|
-
.array(ctx.withRef({
|
|
3643
|
+
const createAdminAppSchema = definitionSchema((ctx) => ctx.withDefault(z$6.object({
|
|
3644
|
+
enabled: z$6.boolean(),
|
|
3645
|
+
pathPrefix: z$6.string().default('/admin'),
|
|
3646
|
+
allowedRoles: ctx.withDefault(z$6.array(ctx.withRef({
|
|
3630
3647
|
type: authRoleEntityType,
|
|
3631
3648
|
onDelete: 'DELETE',
|
|
3632
|
-
}))
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
}));
|
|
3636
|
-
const adminAppEntryType = createAppEntryType('admin');
|
|
3637
|
-
|
|
3638
|
-
const {z: z$6} = await importShared('zod');
|
|
3639
|
-
const createBackendAppSchema = definitionSchema(() => z$6.object({
|
|
3640
|
-
...baseAppValidators,
|
|
3641
|
-
type: z$6.literal('backend'),
|
|
3642
|
-
enableStripe: z$6.boolean().optional(),
|
|
3643
|
-
enableRedis: z$6.boolean().optional(),
|
|
3644
|
-
enableBullQueue: z$6.boolean().optional(),
|
|
3645
|
-
enablePostmark: z$6.boolean().optional(),
|
|
3646
|
-
enableSubscriptions: z$6.boolean().optional(),
|
|
3647
|
-
enableAxios: z$6.boolean().optional(),
|
|
3648
|
-
}));
|
|
3649
|
-
const backendAppEntryType = createAppEntryType('backend');
|
|
3649
|
+
})), []),
|
|
3650
|
+
sections: ctx.withDefault(z$6.array(createWebAdminSectionSchema(ctx)), []),
|
|
3651
|
+
}), { enabled: false, pathPrefix: '/admin' }));
|
|
3650
3652
|
|
|
3651
3653
|
const {z: z$5} = await importShared('zod');
|
|
3652
3654
|
const createWebAppSchema = definitionSchema((ctx) => z$5.object({
|
|
3653
3655
|
...baseAppValidators,
|
|
3654
3656
|
type: z$5.literal('web'),
|
|
3655
|
-
includeAuth: z$5.boolean()
|
|
3656
|
-
title: z$5.string().
|
|
3657
|
-
description: z$5.string().
|
|
3658
|
-
allowedRoles: z$5
|
|
3659
|
-
.array(ctx.withRef({
|
|
3657
|
+
includeAuth: ctx.withDefault(z$5.boolean(), false),
|
|
3658
|
+
title: z$5.string().default(''),
|
|
3659
|
+
description: z$5.string().default(''),
|
|
3660
|
+
allowedRoles: ctx.withDefault(z$5.array(ctx.withRef({
|
|
3660
3661
|
type: authRoleEntityType,
|
|
3661
3662
|
onDelete: 'DELETE',
|
|
3662
|
-
}))
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3663
|
+
})), []),
|
|
3664
|
+
includeUploadComponents: ctx.withDefault(z$5.boolean(), false),
|
|
3665
|
+
enableSubscriptions: ctx.withDefault(z$5.boolean(), false),
|
|
3666
|
+
adminApp: createAdminAppSchema(ctx),
|
|
3666
3667
|
}));
|
|
3667
3668
|
const webAppEntryType = createAppEntryType('web');
|
|
3668
3669
|
|
|
@@ -3746,7 +3747,6 @@ const {z: z$1} = await importShared('zod');
|
|
|
3746
3747
|
const createAppSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$1.discriminatedUnion('type', [
|
|
3747
3748
|
createBackendAppSchema(ctx),
|
|
3748
3749
|
createWebAppSchema(ctx),
|
|
3749
|
-
createAdminAppSchema(ctx),
|
|
3750
3750
|
]), (builder) => {
|
|
3751
3751
|
builder.addEntity({
|
|
3752
3752
|
type: appEntityType,
|
|
@@ -9092,6 +9092,48 @@ const migration015NullParentRefs = createSchemaMigration({
|
|
|
9092
9092
|
},
|
|
9093
9093
|
});
|
|
9094
9094
|
|
|
9095
|
+
const migration016WebAdminConfig = createSchemaMigration({
|
|
9096
|
+
version: 16,
|
|
9097
|
+
name: 'webAdminApp',
|
|
9098
|
+
description: 'Convert admin apps to web apps with adminApp and add adminApp to existing web apps',
|
|
9099
|
+
migrate: (config) => {
|
|
9100
|
+
if (!config.apps) {
|
|
9101
|
+
return config;
|
|
9102
|
+
}
|
|
9103
|
+
const apps = config.apps.map((app) => {
|
|
9104
|
+
// Convert admin apps to web apps with adminConfig enabled
|
|
9105
|
+
if (app.type === 'admin') {
|
|
9106
|
+
const { sections, allowedRoles, ...restApp } = app;
|
|
9107
|
+
return {
|
|
9108
|
+
...restApp,
|
|
9109
|
+
type: 'web',
|
|
9110
|
+
adminApp: {
|
|
9111
|
+
enabled: true,
|
|
9112
|
+
pathPrefix: '/admin',
|
|
9113
|
+
sections: sections ?? [],
|
|
9114
|
+
allowedRoles: allowedRoles ?? undefined,
|
|
9115
|
+
},
|
|
9116
|
+
};
|
|
9117
|
+
}
|
|
9118
|
+
// Add adminApp to web apps that don't already have it
|
|
9119
|
+
if (app.type === 'web' && !('adminApp' in app)) {
|
|
9120
|
+
return {
|
|
9121
|
+
...app,
|
|
9122
|
+
adminApp: {
|
|
9123
|
+
enabled: false,
|
|
9124
|
+
pathPrefix: '/admin',
|
|
9125
|
+
},
|
|
9126
|
+
};
|
|
9127
|
+
}
|
|
9128
|
+
return app;
|
|
9129
|
+
});
|
|
9130
|
+
return {
|
|
9131
|
+
...config,
|
|
9132
|
+
apps,
|
|
9133
|
+
};
|
|
9134
|
+
},
|
|
9135
|
+
});
|
|
9136
|
+
|
|
9095
9137
|
const SCHEMA_MIGRATIONS = [
|
|
9096
9138
|
migration005PrimaryUniqueRefs,
|
|
9097
9139
|
migration006IndividualServiceControllers,
|
|
@@ -9104,6 +9146,7 @@ const SCHEMA_MIGRATIONS = [
|
|
|
9104
9146
|
migration013MoveGeneralSettings,
|
|
9105
9147
|
migration014MigratePluginIds,
|
|
9106
9148
|
migration015NullParentRefs,
|
|
9149
|
+
migration016WebAdminConfig,
|
|
9107
9150
|
];
|
|
9108
9151
|
function isMigrateableProjectDefinition(projectDefinition) {
|
|
9109
9152
|
return (typeof projectDefinition === 'object' &&
|
|
@@ -10242,5 +10285,5 @@ function generateDefaultTheme() {
|
|
|
10242
10285
|
};
|
|
10243
10286
|
}
|
|
10244
10287
|
|
|
10245
|
-
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DefinitionRefBuilder, 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,
|
|
10246
|
-
//# sourceMappingURL=project-builder-lib-
|
|
10288
|
+
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DefinitionRefBuilder, 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, adminCrudDisplayTypes, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputSpec, adminSectionEntityType, appCompilerSpec, appEntityType, authConfigSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudInputSchema, 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, createAppCompiler, createAppCompilerPlugin, createAppEntryType, createAppSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, 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, createWebAdminSectionSchema, createWebAppSchema, createWebConfigImplementation, definitionSchema, deserializeSchemaWithTransformedReferences, extractDefinitionRefs, extractDefinitionRefsRecursive, 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 };
|
|
10289
|
+
//# sourceMappingURL=project-builder-lib-B7442OYh.js.map
|