@baseplate-dev/project-builder-lib 0.5.3 → 0.6.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/CHANGELOG.md +69 -0
- package/dist/definition/index.d.ts +0 -1
- package/dist/definition/index.d.ts.map +1 -1
- package/dist/definition/index.js +0 -1
- package/dist/definition/index.js.map +1 -1
- package/dist/definition/model/model-field-utils.js +2 -2
- package/dist/definition/model/model-field-utils.js.map +1 -1
- package/dist/definition/model/model-utils.d.ts.map +1 -1
- package/dist/definition/model/model-utils.js +2 -2
- package/dist/definition/model/model-utils.js.map +1 -1
- package/dist/definition/project-definition-container.d.ts +21 -12
- package/dist/definition/project-definition-container.d.ts.map +1 -1
- package/dist/definition/project-definition-container.js +42 -23
- package/dist/definition/project-definition-container.js.map +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +6 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/migration-024-graphql-object-type-field-auth.d.ts +30 -0
- package/dist/migrations/migration-024-graphql-object-type-field-auth.d.ts.map +1 -0
- package/dist/migrations/migration-024-graphql-object-type-field-auth.js +54 -0
- package/dist/migrations/migration-024-graphql-object-type-field-auth.js.map +1 -0
- package/dist/migrations/migration-025-service-method-auth.d.ts +44 -0
- package/dist/migrations/migration-025-service-method-auth.d.ts.map +1 -0
- package/dist/migrations/migration-025-service-method-auth.js +62 -0
- package/dist/migrations/migration-025-service-method-auth.js.map +1 -0
- package/dist/migrations/migration-026-query-shared-roles.d.ts +32 -0
- package/dist/migrations/migration-026-query-shared-roles.d.ts.map +1 -0
- package/dist/migrations/migration-026-query-shared-roles.js +48 -0
- package/dist/migrations/migration-026-query-shared-roles.js.map +1 -0
- package/dist/parser/apply-definition-fixes.d.ts +13 -0
- package/dist/parser/apply-definition-fixes.d.ts.map +1 -0
- package/dist/parser/apply-definition-fixes.js +25 -0
- package/dist/parser/apply-definition-fixes.js.map +1 -0
- package/dist/parser/clean-default-values.d.ts +14 -0
- package/dist/parser/clean-default-values.d.ts.map +1 -0
- package/dist/parser/clean-default-values.js +24 -0
- package/dist/parser/clean-default-values.js.map +1 -0
- package/dist/parser/collect-definition-issues.d.ts +36 -0
- package/dist/parser/collect-definition-issues.d.ts.map +1 -0
- package/dist/parser/collect-definition-issues.js +94 -0
- package/dist/parser/collect-definition-issues.js.map +1 -0
- package/dist/parser/collect-expression-issues.d.ts +17 -0
- package/dist/parser/collect-expression-issues.d.ts.map +1 -0
- package/dist/parser/collect-expression-issues.js +33 -0
- package/dist/parser/collect-expression-issues.js.map +1 -0
- package/dist/parser/definition-issue-checkers/mutation-roles-checker.d.ts +11 -0
- package/dist/parser/definition-issue-checkers/mutation-roles-checker.d.ts.map +1 -0
- package/dist/parser/definition-issue-checkers/mutation-roles-checker.js +41 -0
- package/dist/parser/definition-issue-checkers/mutation-roles-checker.js.map +1 -0
- package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.d.ts +10 -0
- package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.d.ts.map +1 -0
- package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.js +36 -0
- package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.js.map +1 -0
- package/dist/parser/definition-issue-utils.d.ts +23 -0
- package/dist/parser/definition-issue-utils.d.ts.map +1 -0
- package/dist/parser/definition-issue-utils.js +33 -0
- package/dist/parser/definition-issue-utils.js.map +1 -0
- package/dist/parser/index.d.ts +9 -0
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +8 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/parser.d.ts.map +1 -1
- package/dist/parser/parser.js +7 -2
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/schema-structure.d.ts +53 -0
- package/dist/parser/schema-structure.d.ts.map +1 -0
- package/dist/parser/schema-structure.js +171 -0
- package/dist/parser/schema-structure.js.map +1 -0
- package/dist/parser/transform-data-with-schema.d.ts +35 -0
- package/dist/parser/transform-data-with-schema.d.ts.map +1 -0
- package/dist/parser/transform-data-with-schema.js +140 -0
- package/dist/parser/transform-data-with-schema.js.map +1 -0
- package/dist/parser/types.d.ts +6 -3
- package/dist/parser/types.d.ts.map +1 -1
- package/dist/parser/walk-data-with-schema.d.ts +46 -0
- package/dist/parser/walk-data-with-schema.d.ts.map +1 -0
- package/dist/parser/walk-data-with-schema.js +140 -0
- package/dist/parser/walk-data-with-schema.js.map +1 -0
- package/dist/parser/walk-schema-structure.d.ts +60 -0
- package/dist/parser/walk-schema-structure.d.ts.map +1 -0
- package/dist/parser/walk-schema-structure.js +163 -0
- package/dist/parser/walk-schema-structure.js.map +1 -0
- package/dist/plugins/imports/loader.d.ts +1 -1
- package/dist/plugins/imports/loader.d.ts.map +1 -1
- package/dist/plugins/imports/loader.js +2 -2
- package/dist/plugins/imports/loader.js.map +1 -1
- package/dist/plugins/imports/types.d.ts +1 -1
- package/dist/plugins/imports/types.d.ts.map +1 -1
- package/dist/plugins/metadata/types.d.ts +1 -1
- package/dist/plugins/metadata/types.js +1 -1
- package/dist/plugins/plugins.test-utils.d.ts +15 -0
- package/dist/plugins/plugins.test-utils.d.ts.map +1 -1
- package/dist/plugins/plugins.test-utils.js +24 -0
- package/dist/plugins/plugins.test-utils.js.map +1 -1
- package/dist/plugins/spec/config-spec.d.ts +1 -0
- package/dist/plugins/spec/config-spec.d.ts.map +1 -1
- package/dist/plugins/spec/config-spec.js +1 -0
- package/dist/plugins/spec/config-spec.js.map +1 -1
- package/dist/plugins/store/store.d.ts +6 -1
- package/dist/plugins/store/store.d.ts.map +1 -1
- package/dist/plugins/store/store.js +9 -1
- package/dist/plugins/store/store.js.map +1 -1
- package/dist/references/definition-ref-registry.d.ts +105 -0
- package/dist/references/definition-ref-registry.d.ts.map +1 -0
- package/dist/references/definition-ref-registry.js +40 -0
- package/dist/references/definition-ref-registry.js.map +1 -0
- package/dist/references/deserialize-schema.d.ts +4 -6
- package/dist/references/deserialize-schema.d.ts.map +1 -1
- package/dist/references/deserialize-schema.js +4 -5
- package/dist/references/deserialize-schema.js.map +1 -1
- package/dist/references/expression-types.d.ts +46 -14
- package/dist/references/expression-types.d.ts.map +1 -1
- package/dist/references/expression-types.js +17 -0
- package/dist/references/expression-types.js.map +1 -1
- package/dist/references/extend-parser-context-with-refs.d.ts +32 -2
- package/dist/references/extend-parser-context-with-refs.d.ts.map +1 -1
- package/dist/references/extend-parser-context-with-refs.js +123 -163
- package/dist/references/extend-parser-context-with-refs.js.map +1 -1
- package/dist/references/extract-definition-refs.d.ts +9 -8
- package/dist/references/extract-definition-refs.d.ts.map +1 -1
- package/dist/references/extract-definition-refs.js +110 -26
- package/dist/references/extract-definition-refs.js.map +1 -1
- package/dist/references/fix-ref-deletions.d.ts +6 -6
- package/dist/references/fix-ref-deletions.d.ts.map +1 -1
- package/dist/references/fix-ref-deletions.js +2 -2
- package/dist/references/fix-ref-deletions.js.map +1 -1
- package/dist/references/index.d.ts +3 -0
- package/dist/references/index.d.ts.map +1 -1
- package/dist/references/index.js +3 -0
- package/dist/references/index.js.map +1 -1
- package/dist/references/parse-schema-with-references.d.ts +8 -6
- package/dist/references/parse-schema-with-references.d.ts.map +1 -1
- package/dist/references/parse-schema-with-references.js +10 -12
- package/dist/references/parse-schema-with-references.js.map +1 -1
- package/dist/references/ref-schema-visitor.d.ts +33 -0
- package/dist/references/ref-schema-visitor.d.ts.map +1 -0
- package/dist/references/ref-schema-visitor.js +61 -0
- package/dist/references/ref-schema-visitor.js.map +1 -0
- package/dist/references/resolve-slots.d.ts +1 -1
- package/dist/references/resolve-slots.d.ts.map +1 -1
- package/dist/references/serialize-schema.d.ts +9 -2
- package/dist/references/serialize-schema.d.ts.map +1 -1
- package/dist/references/serialize-schema.js +20 -4
- package/dist/references/serialize-schema.js.map +1 -1
- package/dist/schema/apps/web/admin/admin.d.ts +22 -37
- package/dist/schema/apps/web/admin/admin.d.ts.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.d.ts +6 -15
- package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.d.ts.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.js +3 -8
- package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.js.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.d.ts +6 -15
- package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.d.ts.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.js +3 -8
- package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.js.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.d.ts +9 -15
- package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.d.ts.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.js +3 -8
- package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.js.map +1 -1
- package/dist/schema/apps/web/admin/sections/crud.d.ts +6 -6
- package/dist/schema/apps/web/web-app.d.ts +32 -47
- package/dist/schema/apps/web/web-app.d.ts.map +1 -1
- package/dist/schema/creator/definition-default-registry.d.ts +22 -0
- package/dist/schema/creator/definition-default-registry.d.ts.map +1 -0
- package/dist/schema/creator/definition-default-registry.js +18 -0
- package/dist/schema/creator/definition-default-registry.js.map +1 -0
- package/dist/schema/creator/definition-fix-registry.d.ts +45 -0
- package/dist/schema/creator/definition-fix-registry.d.ts.map +1 -0
- package/dist/schema/creator/definition-fix-registry.js +41 -0
- package/dist/schema/creator/definition-fix-registry.js.map +1 -0
- package/dist/schema/creator/definition-issue-checker-spec.d.ts +37 -0
- package/dist/schema/creator/definition-issue-checker-spec.d.ts.map +1 -0
- package/dist/schema/creator/definition-issue-checker-spec.js +28 -0
- package/dist/schema/creator/definition-issue-checker-spec.js.map +1 -0
- package/dist/schema/creator/definition-issue-checkers.d.ts +16 -0
- package/dist/schema/creator/definition-issue-checkers.d.ts.map +1 -0
- package/dist/schema/creator/definition-issue-checkers.js +35 -0
- package/dist/schema/creator/definition-issue-checkers.js.map +1 -0
- package/dist/schema/creator/definition-issue-registry.d.ts +54 -0
- package/dist/schema/creator/definition-issue-registry.d.ts.map +1 -0
- package/dist/schema/creator/definition-issue-registry.js +47 -0
- package/dist/schema/creator/definition-issue-registry.js.map +1 -0
- package/dist/schema/creator/definition-issue-types.d.ts +53 -0
- package/dist/schema/creator/definition-issue-types.d.ts.map +1 -0
- package/dist/schema/creator/definition-issue-types.js +2 -0
- package/dist/schema/creator/definition-issue-types.js.map +1 -0
- package/dist/schema/creator/extend-parser-context-with-defaults.d.ts +20 -4
- package/dist/schema/creator/extend-parser-context-with-defaults.d.ts.map +1 -1
- package/dist/schema/creator/extend-parser-context-with-defaults.js +24 -42
- package/dist/schema/creator/extend-parser-context-with-defaults.js.map +1 -1
- package/dist/schema/creator/index.d.ts +6 -0
- package/dist/schema/creator/index.d.ts.map +1 -1
- package/dist/schema/creator/index.js +5 -0
- package/dist/schema/creator/index.js.map +1 -1
- package/dist/schema/creator/schema-creator.d.ts.map +1 -1
- package/dist/schema/creator/schema-creator.js +18 -4
- package/dist/schema/creator/schema-creator.js.map +1 -1
- package/dist/schema/creator/types.d.ts +3 -30
- package/dist/schema/creator/types.d.ts.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.d.ts.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js +116 -25
- package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts +82 -1
- package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-ast.js.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts +8 -9
- package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-parser.js +28 -35
- package/dist/schema/models/authorizer/authorizer-expression-parser.js.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts +42 -4
- package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts.map +1 -1
- package/dist/schema/models/authorizer/authorizer-expression-validator.js +119 -18
- package/dist/schema/models/authorizer/authorizer-expression-validator.js.map +1 -1
- package/dist/schema/models/graphql.d.ts +42 -111
- package/dist/schema/models/graphql.d.ts.map +1 -1
- package/dist/schema/models/graphql.js +59 -19
- package/dist/schema/models/graphql.js.map +1 -1
- package/dist/schema/models/models.d.ts +1134 -343
- package/dist/schema/models/models.d.ts.map +1 -1
- package/dist/schema/models/models.js +258 -86
- package/dist/schema/models/models.js.map +1 -1
- package/dist/schema/plugins/definition.d.ts +2 -30
- package/dist/schema/plugins/definition.d.ts.map +1 -1
- package/dist/schema/plugins/definition.js +26 -15
- package/dist/schema/plugins/definition.js.map +1 -1
- package/dist/schema/project-definition.d.ts +532 -186
- package/dist/schema/project-definition.d.ts.map +1 -1
- package/dist/schema/project-definition.js +15 -3
- package/dist/schema/project-definition.js.map +1 -1
- package/dist/schema/settings/general.d.ts +1 -1
- package/dist/schema/settings/general.d.ts.map +1 -1
- package/dist/schema/settings/general.js +4 -1
- package/dist/schema/settings/general.js.map +1 -1
- package/dist/schema/settings/settings.d.ts +3 -3
- package/dist/schema/settings/theme.d.ts +3 -3
- package/dist/testing/definition-helpers.test-helper.d.ts +12 -0
- package/dist/testing/definition-helpers.test-helper.d.ts.map +1 -0
- package/dist/testing/definition-helpers.test-helper.js +77 -0
- package/dist/testing/definition-helpers.test-helper.js.map +1 -0
- package/dist/testing/expression-stub-parser.test-helper.d.ts +59 -0
- package/dist/testing/expression-stub-parser.test-helper.d.ts.map +1 -0
- package/dist/testing/expression-stub-parser.test-helper.js +79 -0
- package/dist/testing/expression-stub-parser.test-helper.js.map +1 -0
- package/dist/testing/expression-warning-parser.test-helper.d.ts +39 -0
- package/dist/testing/expression-warning-parser.test-helper.d.ts.map +1 -0
- package/dist/testing/expression-warning-parser.test-helper.js +62 -0
- package/dist/testing/expression-warning-parser.test-helper.js.map +1 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +5 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/parser-context.test-helper.d.ts +8 -0
- package/dist/testing/parser-context.test-helper.d.ts.map +1 -0
- package/dist/testing/parser-context.test-helper.js +16 -0
- package/dist/testing/parser-context.test-helper.js.map +1 -0
- package/dist/{definition/project-definition-container.test-utils.d.ts → testing/project-definition-container.test-helper.d.ts} +4 -2
- package/dist/testing/project-definition-container.test-helper.d.ts.map +1 -0
- package/dist/{definition/project-definition-container.test-utils.js → testing/project-definition-container.test-helper.js} +11 -5
- package/dist/testing/project-definition-container.test-helper.js.map +1 -0
- package/dist/tools/assign-entity-ids.d.ts +17 -0
- package/dist/tools/assign-entity-ids.d.ts.map +1 -0
- package/dist/tools/assign-entity-ids.js +34 -0
- package/dist/tools/assign-entity-ids.js.map +1 -0
- package/dist/tools/entity-service/entity-navigation.d.ts +13 -0
- package/dist/tools/entity-service/entity-navigation.d.ts.map +1 -0
- package/dist/tools/entity-service/entity-navigation.js +84 -0
- package/dist/tools/entity-service/entity-navigation.js.map +1 -0
- package/dist/tools/entity-service/entity-read.d.ts +38 -0
- package/dist/tools/entity-service/entity-read.d.ts.map +1 -0
- package/dist/tools/entity-service/entity-read.js +56 -0
- package/dist/tools/entity-service/entity-read.js.map +1 -0
- package/dist/tools/entity-service/entity-type-map.d.ts +18 -0
- package/dist/tools/entity-service/entity-type-map.d.ts.map +1 -0
- package/dist/tools/entity-service/entity-type-map.js +75 -0
- package/dist/tools/entity-service/entity-type-map.js.map +1 -0
- package/dist/tools/entity-service/entity-write.d.ts +39 -0
- package/dist/tools/entity-service/entity-write.d.ts.map +1 -0
- package/dist/tools/entity-service/entity-write.js +99 -0
- package/dist/tools/entity-service/entity-write.js.map +1 -0
- package/dist/tools/entity-service/index.d.ts +5 -0
- package/dist/tools/entity-service/index.d.ts.map +1 -0
- package/dist/tools/entity-service/index.js +4 -0
- package/dist/tools/entity-service/index.js.map +1 -0
- package/dist/tools/entity-service/types.d.ts +41 -0
- package/dist/tools/entity-service/types.d.ts.map +1 -0
- package/dist/tools/entity-service/types.js +2 -0
- package/dist/tools/entity-service/types.js.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/merge-schema/diff-definition.d.ts +74 -0
- package/dist/tools/merge-schema/diff-definition.d.ts.map +1 -0
- package/dist/tools/merge-schema/diff-definition.js +163 -0
- package/dist/tools/merge-schema/diff-definition.js.map +1 -0
- package/dist/tools/merge-schema/entity-utils.d.ts +18 -0
- package/dist/tools/merge-schema/entity-utils.d.ts.map +1 -0
- package/dist/tools/merge-schema/entity-utils.js +42 -0
- package/dist/tools/merge-schema/entity-utils.js.map +1 -0
- package/dist/tools/merge-schema/index.d.ts +10 -0
- package/dist/tools/merge-schema/index.d.ts.map +1 -0
- package/dist/tools/merge-schema/index.js +7 -0
- package/dist/tools/merge-schema/index.js.map +1 -0
- package/dist/tools/merge-schema/merge-data-with-schema.d.ts +21 -0
- package/dist/tools/merge-schema/merge-data-with-schema.d.ts.map +1 -0
- package/dist/tools/merge-schema/merge-data-with-schema.js +168 -0
- package/dist/tools/merge-schema/merge-data-with-schema.js.map +1 -0
- package/dist/tools/merge-schema/merge-definition.d.ts +42 -0
- package/dist/tools/merge-schema/merge-definition.d.ts.map +1 -0
- package/dist/tools/merge-schema/merge-definition.js +53 -0
- package/dist/tools/merge-schema/merge-definition.js.map +1 -0
- package/dist/tools/merge-schema/merge-rule-registry.d.ts +47 -0
- package/dist/tools/merge-schema/merge-rule-registry.d.ts.map +1 -0
- package/dist/tools/merge-schema/merge-rule-registry.js +53 -0
- package/dist/tools/merge-schema/merge-rule-registry.js.map +1 -0
- package/dist/tools/merge-schema/walk-schema.d.ts +26 -0
- package/dist/tools/merge-schema/walk-schema.d.ts.map +1 -0
- package/dist/tools/merge-schema/walk-schema.js +94 -0
- package/dist/tools/merge-schema/walk-schema.js.map +1 -0
- package/dist/utils/definition-diff/definition-diff.js.map +1 -1
- package/dist/web/components/definition-diff-alert.d.ts +9 -0
- package/dist/web/components/definition-diff-alert.d.ts.map +1 -0
- package/dist/web/components/definition-diff-alert.js +17 -0
- package/dist/web/components/definition-diff-alert.js.map +1 -0
- package/dist/web/components/index.d.ts +1 -1
- package/dist/web/components/index.d.ts.map +1 -1
- package/dist/web/components/index.js +1 -1
- package/dist/web/components/index.js.map +1 -1
- package/dist/web/hooks/use-project-definition.d.ts +10 -2
- package/dist/web/hooks/use-project-definition.d.ts.map +1 -1
- package/dist/web/hooks/use-project-definition.js.map +1 -1
- package/dist/web/specs/entity-type-url-web-spec.d.ts +68 -0
- package/dist/web/specs/entity-type-url-web-spec.d.ts.map +1 -0
- package/dist/web/specs/entity-type-url-web-spec.js +27 -0
- package/dist/web/specs/entity-type-url-web-spec.js.map +1 -0
- package/dist/web/specs/index.d.ts +1 -0
- package/dist/web/specs/index.d.ts.map +1 -1
- package/dist/web/specs/index.js +1 -0
- package/dist/web/specs/index.js.map +1 -1
- package/package.json +12 -11
- package/dist/definition/project-definition-container.test-utils.d.ts.map +0 -1
- package/dist/definition/project-definition-container.test-utils.js.map +0 -1
- package/dist/references/collect-refs.d.ts +0 -24
- package/dist/references/collect-refs.d.ts.map +0 -1
- package/dist/references/collect-refs.js +0 -86
- package/dist/references/collect-refs.js.map +0 -1
- package/dist/references/markers.d.ts +0 -59
- package/dist/references/markers.d.ts.map +0 -1
- package/dist/references/markers.js +0 -29
- package/dist/references/markers.js.map +0 -1
- package/dist/references/strip-ref-markers.d.ts +0 -7
- package/dist/references/strip-ref-markers.d.ts.map +0 -1
- package/dist/references/strip-ref-markers.js +0 -25
- package/dist/references/strip-ref-markers.js.map +0 -1
- package/dist/schema/models/mocks.d.ts +0 -6
- package/dist/schema/models/mocks.d.ts.map +0 -1
- package/dist/schema/models/mocks.js +0 -55
- package/dist/schema/models/mocks.js.map +0 -1
- package/dist/tools/model-merger/index.d.ts +0 -2
- package/dist/tools/model-merger/index.d.ts.map +0 -1
- package/dist/tools/model-merger/index.js +0 -2
- package/dist/tools/model-merger/index.js.map +0 -1
- package/dist/tools/model-merger/model-merger.d.ts +0 -569
- package/dist/tools/model-merger/model-merger.d.ts.map +0 -1
- package/dist/tools/model-merger/model-merger.js +0 -319
- package/dist/tools/model-merger/model-merger.js.map +0 -1
- package/dist/web/components/model-merger-result-alert.d.ts +0 -8
- package/dist/web/components/model-merger-result-alert.d.ts.map +0 -1
- package/dist/web/components/model-merger-result-alert.js +0 -20
- package/dist/web/components/model-merger-result-alert.js.map +0 -1
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type: string;
|
|
9
|
-
label: string;
|
|
10
|
-
}, {
|
|
11
|
-
[x: string]: unknown;
|
|
12
|
-
id: string;
|
|
13
|
-
type: string;
|
|
14
|
-
label: string;
|
|
15
|
-
}>>, {
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { def } from '#src/schema/creator/index.js';
|
|
3
|
+
export declare const createAdminCrudInputSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
id: z.ZodDefault<z.ZodString>;
|
|
5
|
+
type: z.ZodString;
|
|
6
|
+
label: z.ZodString;
|
|
7
|
+
}, z.z.core.$loose>], "type">, {
|
|
16
8
|
modelSlot: import("../../../../../../index.js").DefinitionEntityType<false>;
|
|
17
9
|
adminSectionSlot: import("../../../../../../index.js").DefinitionEntityType<true>;
|
|
18
10
|
}>;
|
|
11
|
+
export type AdminCrudInputConfig = def.InferOutput<typeof createAdminCrudInputSchema>;
|
|
12
|
+
export type AdminCrudInputConfigInput = def.InferInput<typeof createAdminCrudInputSchema>;
|
|
19
13
|
//# sourceMappingURL=admin-crud-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-crud-input.d.ts","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-crud-input.d.ts","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAUxD,eAAO,MAAM,0BAA0B;;;;;;;EAWtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,WAAW,CAChD,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,UAAU,CACpD,OAAO,0BAA0B,CAClC,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
+
import z from 'zod';
|
|
1
2
|
import { definitionSchemaWithSlots } from '#src/schema/creator/schema-creator.js';
|
|
2
3
|
import { modelEntityType } from '#src/schema/models/index.js';
|
|
3
4
|
import { adminSectionEntityType } from '../types.js';
|
|
4
5
|
import { adminCrudInputSpec } from './admin-input-spec.js';
|
|
5
|
-
import { baseAdminCrudInputSchema } from './types.js';
|
|
6
6
|
export const createAdminCrudInputSchema = definitionSchemaWithSlots({ modelSlot: modelEntityType, adminSectionSlot: adminSectionEntityType }, (ctx, slots) => {
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
const inputDef = adminCrudInputs.get(data.type);
|
|
10
|
-
if (!inputDef)
|
|
11
|
-
return data;
|
|
12
|
-
return inputDef.createSchema(ctx, slots).parse(data);
|
|
13
|
-
});
|
|
7
|
+
const { inputs } = ctx.plugins.use(adminCrudInputSpec);
|
|
8
|
+
return z.discriminatedUnion('type', [...inputs.values()].map((input) => input.createSchema(ctx, slots)));
|
|
14
9
|
});
|
|
15
10
|
//# sourceMappingURL=admin-crud-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-crud-input.js","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-crud-input.js","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAI9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CACjE,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,EACxE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACvD,OAAO,CAAC,CAAC,kBAAkB,CACzB,MAAM,EACN,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAEjE,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -159,6 +159,7 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
159
159
|
type: "crud";
|
|
160
160
|
modelRef: string;
|
|
161
161
|
nameFieldRef: string;
|
|
162
|
+
disableCreate: boolean;
|
|
162
163
|
table: {
|
|
163
164
|
columns: {
|
|
164
165
|
[x: string]: unknown;
|
|
@@ -166,12 +167,12 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
166
167
|
type: string;
|
|
167
168
|
label: string;
|
|
168
169
|
}[];
|
|
169
|
-
actions
|
|
170
|
+
actions: {
|
|
170
171
|
[x: string]: unknown;
|
|
171
172
|
id: string;
|
|
172
173
|
type: string;
|
|
173
174
|
position: "inline" | "dropdown";
|
|
174
|
-
}[]
|
|
175
|
+
}[];
|
|
175
176
|
};
|
|
176
177
|
form: {
|
|
177
178
|
fields: {
|
|
@@ -181,7 +182,6 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
181
182
|
label: string;
|
|
182
183
|
}[];
|
|
183
184
|
};
|
|
184
|
-
disableCreate?: boolean | undefined;
|
|
185
185
|
embeddedForms?: ({
|
|
186
186
|
id: string;
|
|
187
187
|
name: string;
|
|
@@ -299,6 +299,7 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
299
299
|
type: "crud";
|
|
300
300
|
modelRef: string;
|
|
301
301
|
nameFieldRef: string;
|
|
302
|
+
disableCreate: boolean;
|
|
302
303
|
table: {
|
|
303
304
|
columns: {
|
|
304
305
|
[x: string]: unknown;
|
|
@@ -306,12 +307,12 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
306
307
|
type: string;
|
|
307
308
|
label: string;
|
|
308
309
|
}[];
|
|
309
|
-
actions
|
|
310
|
+
actions: {
|
|
310
311
|
[x: string]: unknown;
|
|
311
312
|
id: string;
|
|
312
313
|
type: string;
|
|
313
314
|
position: "inline" | "dropdown";
|
|
314
|
-
}[]
|
|
315
|
+
}[];
|
|
315
316
|
};
|
|
316
317
|
form: {
|
|
317
318
|
fields: {
|
|
@@ -321,7 +322,6 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
|
|
|
321
322
|
label: string;
|
|
322
323
|
}[];
|
|
323
324
|
};
|
|
324
|
-
disableCreate?: boolean | undefined;
|
|
325
325
|
embeddedForms?: ({
|
|
326
326
|
id: string;
|
|
327
327
|
name: string;
|
|
@@ -3,16 +3,16 @@ import type { def } from '#src/schema/creator/index.js';
|
|
|
3
3
|
export declare const createWebAppSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodObject<{
|
|
4
4
|
devPort: z.ZodNumber;
|
|
5
5
|
type: z.ZodLiteral<"web">;
|
|
6
|
-
includeAuth: z.
|
|
6
|
+
includeAuth: z.ZodPrefault<z.ZodBoolean>;
|
|
7
7
|
title: z.ZodDefault<z.ZodString>;
|
|
8
8
|
description: z.ZodDefault<z.ZodString>;
|
|
9
|
-
includeUploadComponents: z.
|
|
10
|
-
enableSubscriptions: z.
|
|
11
|
-
adminApp: z.
|
|
12
|
-
enabled:
|
|
13
|
-
pathPrefix:
|
|
14
|
-
allowedRoles
|
|
15
|
-
sections
|
|
9
|
+
includeUploadComponents: z.ZodPrefault<z.ZodBoolean>;
|
|
10
|
+
enableSubscriptions: z.ZodPrefault<z.ZodBoolean>;
|
|
11
|
+
adminApp: z.ZodPrefault<z.ZodObject<{
|
|
12
|
+
enabled: z.ZodBoolean;
|
|
13
|
+
pathPrefix: z.ZodDefault<z.ZodString>;
|
|
14
|
+
allowedRoles: z.ZodPrefault<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
15
|
+
sections: z.ZodPrefault<z.ZodArray<z.ZodType<{
|
|
16
16
|
id: string;
|
|
17
17
|
name: string;
|
|
18
18
|
featureRef: string;
|
|
@@ -22,6 +22,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
22
22
|
type: "crud";
|
|
23
23
|
modelRef: string;
|
|
24
24
|
nameFieldRef: string;
|
|
25
|
+
disableCreate: boolean;
|
|
25
26
|
table: {
|
|
26
27
|
columns: {
|
|
27
28
|
[x: string]: unknown;
|
|
@@ -29,12 +30,12 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
29
30
|
type: string;
|
|
30
31
|
label: string;
|
|
31
32
|
}[];
|
|
32
|
-
actions
|
|
33
|
+
actions: {
|
|
33
34
|
[x: string]: unknown;
|
|
34
35
|
id: string;
|
|
35
36
|
type: string;
|
|
36
37
|
position: "inline" | "dropdown";
|
|
37
|
-
}[]
|
|
38
|
+
}[];
|
|
38
39
|
};
|
|
39
40
|
form: {
|
|
40
41
|
fields: {
|
|
@@ -44,7 +45,6 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
44
45
|
label: string;
|
|
45
46
|
}[];
|
|
46
47
|
};
|
|
47
|
-
disableCreate?: boolean | undefined;
|
|
48
48
|
embeddedForms?: ({
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
@@ -82,12 +82,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
82
82
|
};
|
|
83
83
|
includeIdField?: boolean | undefined;
|
|
84
84
|
})[] | undefined;
|
|
85
|
-
}
|
|
86
|
-
} | undefined, {
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
pathPrefix?: string | undefined;
|
|
89
|
-
allowedRoles?: string[] | undefined;
|
|
90
|
-
sections?: ({
|
|
85
|
+
}, {
|
|
91
86
|
name: string;
|
|
92
87
|
featureRef: string;
|
|
93
88
|
type: string;
|
|
@@ -157,12 +152,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
157
152
|
};
|
|
158
153
|
includeIdField?: boolean | undefined;
|
|
159
154
|
})[] | undefined;
|
|
160
|
-
}
|
|
161
|
-
} | undefined, z.core.$ZodTypeInternals<{
|
|
162
|
-
enabled: boolean;
|
|
163
|
-
pathPrefix: string;
|
|
164
|
-
allowedRoles?: string[] | undefined;
|
|
165
|
-
sections?: ({
|
|
155
|
+
}, z.core.$ZodTypeInternals<{
|
|
166
156
|
id: string;
|
|
167
157
|
name: string;
|
|
168
158
|
featureRef: string;
|
|
@@ -172,6 +162,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
172
162
|
type: "crud";
|
|
173
163
|
modelRef: string;
|
|
174
164
|
nameFieldRef: string;
|
|
165
|
+
disableCreate: boolean;
|
|
175
166
|
table: {
|
|
176
167
|
columns: {
|
|
177
168
|
[x: string]: unknown;
|
|
@@ -179,12 +170,12 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
179
170
|
type: string;
|
|
180
171
|
label: string;
|
|
181
172
|
}[];
|
|
182
|
-
actions
|
|
173
|
+
actions: {
|
|
183
174
|
[x: string]: unknown;
|
|
184
175
|
id: string;
|
|
185
176
|
type: string;
|
|
186
177
|
position: "inline" | "dropdown";
|
|
187
|
-
}[]
|
|
178
|
+
}[];
|
|
188
179
|
};
|
|
189
180
|
form: {
|
|
190
181
|
fields: {
|
|
@@ -194,7 +185,6 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
194
185
|
label: string;
|
|
195
186
|
}[];
|
|
196
187
|
};
|
|
197
|
-
disableCreate?: boolean | undefined;
|
|
198
188
|
embeddedForms?: ({
|
|
199
189
|
id: string;
|
|
200
190
|
name: string;
|
|
@@ -232,12 +222,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
232
222
|
};
|
|
233
223
|
includeIdField?: boolean | undefined;
|
|
234
224
|
})[] | undefined;
|
|
235
|
-
}
|
|
236
|
-
} | undefined, {
|
|
237
|
-
enabled: boolean;
|
|
238
|
-
pathPrefix?: string | undefined;
|
|
239
|
-
allowedRoles?: string[] | undefined;
|
|
240
|
-
sections?: ({
|
|
225
|
+
}, {
|
|
241
226
|
name: string;
|
|
242
227
|
featureRef: string;
|
|
243
228
|
type: string;
|
|
@@ -307,8 +292,8 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
|
|
|
307
292
|
};
|
|
308
293
|
includeIdField?: boolean | undefined;
|
|
309
294
|
})[] | undefined;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
295
|
+
}>>>>;
|
|
296
|
+
}, z.core.$strip>>;
|
|
312
297
|
id: z.ZodDefault<z.ZodString>;
|
|
313
298
|
name: z.ZodString;
|
|
314
299
|
}, z.core.$strip>, {
|
|
@@ -318,18 +303,16 @@ export type WebAppConfig = def.InferOutput<typeof createWebAppSchema>;
|
|
|
318
303
|
export declare const webAppEntryType: import("../types.js").AppEntryType<{
|
|
319
304
|
devPort: number;
|
|
320
305
|
type: "web";
|
|
306
|
+
includeAuth: boolean;
|
|
321
307
|
title: string;
|
|
322
308
|
description: string;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
includeUploadComponents?: boolean | undefined;
|
|
327
|
-
enableSubscriptions?: boolean | undefined;
|
|
328
|
-
adminApp?: {
|
|
309
|
+
includeUploadComponents: boolean;
|
|
310
|
+
enableSubscriptions: boolean;
|
|
311
|
+
adminApp: {
|
|
329
312
|
enabled: boolean;
|
|
330
313
|
pathPrefix: string;
|
|
331
|
-
allowedRoles
|
|
332
|
-
sections
|
|
314
|
+
allowedRoles: string[];
|
|
315
|
+
sections: ({
|
|
333
316
|
id: string;
|
|
334
317
|
name: string;
|
|
335
318
|
featureRef: string;
|
|
@@ -339,6 +322,7 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
|
|
|
339
322
|
type: "crud";
|
|
340
323
|
modelRef: string;
|
|
341
324
|
nameFieldRef: string;
|
|
325
|
+
disableCreate: boolean;
|
|
342
326
|
table: {
|
|
343
327
|
columns: {
|
|
344
328
|
[x: string]: unknown;
|
|
@@ -346,12 +330,12 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
|
|
|
346
330
|
type: string;
|
|
347
331
|
label: string;
|
|
348
332
|
}[];
|
|
349
|
-
actions
|
|
333
|
+
actions: {
|
|
350
334
|
[x: string]: unknown;
|
|
351
335
|
id: string;
|
|
352
336
|
type: string;
|
|
353
337
|
position: "inline" | "dropdown";
|
|
354
|
-
}[]
|
|
338
|
+
}[];
|
|
355
339
|
};
|
|
356
340
|
form: {
|
|
357
341
|
fields: {
|
|
@@ -361,7 +345,6 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
|
|
|
361
345
|
label: string;
|
|
362
346
|
}[];
|
|
363
347
|
};
|
|
364
|
-
disableCreate?: boolean | undefined;
|
|
365
348
|
embeddedForms?: ({
|
|
366
349
|
id: string;
|
|
367
350
|
name: string;
|
|
@@ -399,7 +382,9 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
|
|
|
399
382
|
};
|
|
400
383
|
includeIdField?: boolean | undefined;
|
|
401
384
|
})[] | undefined;
|
|
402
|
-
})[]
|
|
403
|
-
}
|
|
385
|
+
})[];
|
|
386
|
+
};
|
|
387
|
+
id: string;
|
|
388
|
+
name: string;
|
|
404
389
|
}>;
|
|
405
390
|
//# sourceMappingURL=web-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../../../src/schema/apps/web/web-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAQxD,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../../../src/schema/apps/web/web-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAQxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Metadata stored on a schema node annotated by `withDefault`.
|
|
4
|
+
*
|
|
5
|
+
* During serialization, `cleanDefaultValues()` walks the schema and uses this
|
|
6
|
+
* metadata to identify and remove values that match their defaults.
|
|
7
|
+
*/
|
|
8
|
+
interface DefaultSchemaMeta {
|
|
9
|
+
readonly defaultValue: unknown;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Registry that stores default-value metadata on Zod schema instances.
|
|
13
|
+
*
|
|
14
|
+
* Uses a WeakMap to avoid interfering with Zod's type system.
|
|
15
|
+
* Annotated by `withDefault()`; read by `cleanDefaultValues()`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const definitionDefaultRegistry: {
|
|
18
|
+
set(schema: z.ZodType, meta: DefaultSchemaMeta): void;
|
|
19
|
+
get(schema: z.ZodType): DefaultSchemaMeta | undefined;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=definition-default-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-default-registry.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-default-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED;;;;;GAKG;AAEH,eAAO,MAAM,yBAAyB;gBAGtB,CAAC,CAAC,OAAO,QAAQ,iBAAiB,GAAG,IAAI;gBAGzC,CAAC,CAAC,OAAO,GAAG,iBAAiB,GAAG,SAAS;CAIrD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry that stores default-value metadata on Zod schema instances.
|
|
3
|
+
*
|
|
4
|
+
* Uses a WeakMap to avoid interfering with Zod's type system.
|
|
5
|
+
* Annotated by `withDefault()`; read by `cleanDefaultValues()`.
|
|
6
|
+
*/
|
|
7
|
+
export const definitionDefaultRegistry = (() => {
|
|
8
|
+
const map = new WeakMap();
|
|
9
|
+
return {
|
|
10
|
+
set(schema, meta) {
|
|
11
|
+
map.set(schema, meta);
|
|
12
|
+
},
|
|
13
|
+
get(schema) {
|
|
14
|
+
return map.get(schema);
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
//# sourceMappingURL=definition-default-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-default-registry.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-default-registry.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAI,OAAO,EAAgC,CAAC;IACxD,OAAO;QACL,GAAG,CAAC,MAAiB,EAAE,IAAuB;YAC5C,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACxB,CAAC;QACD,GAAG,CAAC,MAAiB;YACnB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { ReferencePath } from '#src/references/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Context passed to fix functions during the schema+data walk.
|
|
5
|
+
* Contains only the path — fixes operate on local values without rootData access.
|
|
6
|
+
*/
|
|
7
|
+
export interface DefinitionFixContext {
|
|
8
|
+
/** The absolute path to the current node in the data */
|
|
9
|
+
readonly path: ReferencePath;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A fix function that silently transforms a value during the save pipeline.
|
|
13
|
+
* Return the fixed value, or the original value if no fix is needed.
|
|
14
|
+
*/
|
|
15
|
+
export type DefinitionFix<T = unknown> = (value: T, ctx: DefinitionFixContext) => T;
|
|
16
|
+
/**
|
|
17
|
+
* Metadata stored on a schema node annotated by `withFix`.
|
|
18
|
+
* Exposed as readonly; the registry manages mutation internally.
|
|
19
|
+
*/
|
|
20
|
+
export interface FixSchemaMeta {
|
|
21
|
+
readonly fixes: readonly DefinitionFix[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Registry that stores fix metadata on Zod schema instances.
|
|
25
|
+
*
|
|
26
|
+
* Uses a WeakMap to avoid interfering with Zod's type system.
|
|
27
|
+
* Annotated by `withFix()`; read by `applyDefinitionFixes()`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const definitionFixRegistry: {
|
|
30
|
+
add(schema: z.ZodType, fix: DefinitionFix): void;
|
|
31
|
+
get(schema: z.ZodType): FixSchemaMeta | undefined;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Creates a schema decorator that registers a silent auto-fix.
|
|
35
|
+
*
|
|
36
|
+
* Used with `.apply()`:
|
|
37
|
+
* ```typescript
|
|
38
|
+
* z.object({ ... }).apply(withFix<MyType>((value, ctx) => fixedValue))
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param fix - The fix function to register
|
|
42
|
+
* @returns A function that decorates a schema with the fix
|
|
43
|
+
*/
|
|
44
|
+
export declare function withFix<T extends z.ZodType>(fix: DefinitionFix<z.output<T>>): (schema: T) => T;
|
|
45
|
+
//# sourceMappingURL=definition-fix-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-fix-registry.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-fix-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CACvC,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,oBAAoB,KACtB,CAAC,CAAC;AAEP;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C;AAOD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;gBAGlB,CAAC,CAAC,OAAO,OAAO,aAAa,GAAG,IAAI;gBAQpC,CAAC,CAAC,OAAO,GAAG,aAAa,GAAG,SAAS;CAIjD,CAAC;AAEL;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EACzC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAC9B,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAKlB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry that stores fix metadata on Zod schema instances.
|
|
3
|
+
*
|
|
4
|
+
* Uses a WeakMap to avoid interfering with Zod's type system.
|
|
5
|
+
* Annotated by `withFix()`; read by `applyDefinitionFixes()`.
|
|
6
|
+
*/
|
|
7
|
+
export const definitionFixRegistry = (() => {
|
|
8
|
+
const map = new WeakMap();
|
|
9
|
+
return {
|
|
10
|
+
add(schema, fix) {
|
|
11
|
+
const existing = map.get(schema);
|
|
12
|
+
if (existing) {
|
|
13
|
+
existing.fixes.push(fix);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
map.set(schema, { fixes: [fix] });
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
get(schema) {
|
|
20
|
+
return map.get(schema);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
/**
|
|
25
|
+
* Creates a schema decorator that registers a silent auto-fix.
|
|
26
|
+
*
|
|
27
|
+
* Used with `.apply()`:
|
|
28
|
+
* ```typescript
|
|
29
|
+
* z.object({ ... }).apply(withFix<MyType>((value, ctx) => fixedValue))
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param fix - The fix function to register
|
|
33
|
+
* @returns A function that decorates a schema with the fix
|
|
34
|
+
*/
|
|
35
|
+
export function withFix(fix) {
|
|
36
|
+
return (schema) => {
|
|
37
|
+
definitionFixRegistry.add(schema, fix);
|
|
38
|
+
return schema;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=definition-fix-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-fix-registry.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-fix-registry.ts"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE;IACzC,MAAM,GAAG,GAAG,IAAI,OAAO,EAAmC,CAAC;IAC3D,OAAO;QACL,GAAG,CAAC,MAAiB,EAAE,GAAkB;YACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjC,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;QACD,GAAG,CAAC,MAAiB;YACnB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAEL;;;;;;;;;;GAUG;AACH,MAAM,UAAU,OAAO,CACrB,GAA+B;IAE/B,OAAO,CAAC,MAAS,EAAK,EAAE;QACtB,qBAAqB,CAAC,GAAG,CAAC,MAAM,EAAE,GAAoB,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ProjectDefinitionContainer } from '#src/definition/project-definition-container.js';
|
|
2
|
+
import type { DefinitionIssue } from './definition-issue-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A definition-level issue checker that operates on the full project definition.
|
|
5
|
+
* Can propose definition-wide auto-fixes.
|
|
6
|
+
*
|
|
7
|
+
* Unlike field-level checkers (registered via `withIssueChecker` on schema nodes),
|
|
8
|
+
* definition-level checkers receive the definition container and can perform
|
|
9
|
+
* cross-cutting validations like port conflicts, FK type mismatches, or missing
|
|
10
|
+
* models required by plugins.
|
|
11
|
+
*/
|
|
12
|
+
export type DefinitionIssueChecker = (container: ProjectDefinitionContainer) => DefinitionIssue[];
|
|
13
|
+
/**
|
|
14
|
+
* Plugin spec for registering definition-level issue checkers.
|
|
15
|
+
*
|
|
16
|
+
* Built-in checkers (relation type mismatch, mutation roles) are registered
|
|
17
|
+
* by `collectDefinitionIssues` at runtime to avoid circular imports between
|
|
18
|
+
* schema/creator/ and parser/. Plugins can register additional checkers during
|
|
19
|
+
* initialization:
|
|
20
|
+
* ```typescript
|
|
21
|
+
* createPluginModule({
|
|
22
|
+
* dependencies: { issueCheckers: definitionIssueCheckerSpec },
|
|
23
|
+
* initialize: ({ issueCheckers }, { pluginKey }) => {
|
|
24
|
+
* issueCheckers.checkers.set(pluginKey, (container) => {
|
|
25
|
+
* // validate container.definition and return issues
|
|
26
|
+
* return [];
|
|
27
|
+
* });
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const definitionIssueCheckerSpec: import("../../index.js").PluginSpec<{
|
|
33
|
+
checkers: import("@baseplate-dev/utils").MapContainer<string, DefinitionIssueChecker>;
|
|
34
|
+
}, {
|
|
35
|
+
getAllCheckers: () => Map<string, DefinitionIssueChecker>;
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=definition-issue-checker-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-issue-checker-spec.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checker-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAIlG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,SAAS,EAAE,0BAA0B,KAClC,eAAe,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B;;;0BAOb,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC;EAI5D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createFieldMapSpec } from '#src/plugins/utils/create-field-map-spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin spec for registering definition-level issue checkers.
|
|
4
|
+
*
|
|
5
|
+
* Built-in checkers (relation type mismatch, mutation roles) are registered
|
|
6
|
+
* by `collectDefinitionIssues` at runtime to avoid circular imports between
|
|
7
|
+
* schema/creator/ and parser/. Plugins can register additional checkers during
|
|
8
|
+
* initialization:
|
|
9
|
+
* ```typescript
|
|
10
|
+
* createPluginModule({
|
|
11
|
+
* dependencies: { issueCheckers: definitionIssueCheckerSpec },
|
|
12
|
+
* initialize: ({ issueCheckers }, { pluginKey }) => {
|
|
13
|
+
* issueCheckers.checkers.set(pluginKey, (container) => {
|
|
14
|
+
* // validate container.definition and return issues
|
|
15
|
+
* return [];
|
|
16
|
+
* });
|
|
17
|
+
* },
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const definitionIssueCheckerSpec = createFieldMapSpec('core/definition-issue-checkers', (t) => ({
|
|
22
|
+
checkers: t.map(),
|
|
23
|
+
}), {
|
|
24
|
+
use: (values) => ({
|
|
25
|
+
getAllCheckers: () => values.checkers,
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=definition-issue-checker-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-issue-checker-spec.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checker-spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAiBjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAC1D,gCAAgC,EAChC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAkC;CAClD,CAAC,EACF;IACE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChB,cAAc,EAAE,GAAwC,EAAE,CACxD,MAAM,CAAC,QAAQ;KAClB,CAAC;CACH,CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DefinitionFieldIssueChecker } from './definition-issue-registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates an issue checker that detects duplicate values for a given field
|
|
4
|
+
* in an array of objects.
|
|
5
|
+
*
|
|
6
|
+
* Used with `.apply(withIssueChecker(checkUniqueField(...)))` on array schemas.
|
|
7
|
+
*
|
|
8
|
+
* @param field - The field name to check for uniqueness
|
|
9
|
+
* @param options.label - Human-readable label for the field (e.g. "name", "port")
|
|
10
|
+
* @param options.severity - Severity level for duplicate issues (default: 'error')
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkUniqueField<K extends string>(field: K, options?: {
|
|
13
|
+
label?: string;
|
|
14
|
+
severity?: 'error' | 'warning';
|
|
15
|
+
}): DefinitionFieldIssueChecker<Record<K, unknown>[]>;
|
|
16
|
+
//# sourceMappingURL=definition-issue-checkers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-issue-checkers.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checkers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,2BAA2B,EAE5B,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAC/C,KAAK,EAAE,CAAC,EACR,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC3B,GACL,2BAA2B,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAyBnD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an issue checker that detects duplicate values for a given field
|
|
3
|
+
* in an array of objects.
|
|
4
|
+
*
|
|
5
|
+
* Used with `.apply(withIssueChecker(checkUniqueField(...)))` on array schemas.
|
|
6
|
+
*
|
|
7
|
+
* @param field - The field name to check for uniqueness
|
|
8
|
+
* @param options.label - Human-readable label for the field (e.g. "name", "port")
|
|
9
|
+
* @param options.severity - Severity level for duplicate issues (default: 'error')
|
|
10
|
+
*/
|
|
11
|
+
export function checkUniqueField(field, options = {}) {
|
|
12
|
+
const { label = field, severity = 'error' } = options;
|
|
13
|
+
return (items) => {
|
|
14
|
+
const issues = [];
|
|
15
|
+
const seen = new Map();
|
|
16
|
+
for (const [i, item] of items.entries()) {
|
|
17
|
+
const value = item[field];
|
|
18
|
+
if (value === undefined || value === null || value === '')
|
|
19
|
+
continue;
|
|
20
|
+
const existingPath = seen.get(value);
|
|
21
|
+
if (existingPath) {
|
|
22
|
+
issues.push({
|
|
23
|
+
message: `Duplicate ${label} "${String(value)}"`,
|
|
24
|
+
path: [i, field],
|
|
25
|
+
severity,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
seen.set(value, [i, field]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return issues;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=definition-issue-checkers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-issue-checkers.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checkers.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAQ,EACR,UAGI,EAAE;IAEN,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,QAAQ,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;IAEtD,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,MAAM,GAAuB,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,IAAI,GAAG,EAA0B,CAAC;QAE/C,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;gBAAE,SAAS;YAEpE,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrC,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,aAAa,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG;oBAChD,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC;oBAChB,QAAQ;iBACT,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|