cruddl 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cruddl-version.js +1 -1
- package/dist/src/meta-schema/meta-schema.js +19 -17
- package/dist/src/meta-schema/meta-schema.js.map +1 -1
- package/package.json +1 -1
- package/dist/spec/authorization/move-errors-to-output-nodes.spec.d.ts +0 -1
- package/dist/spec/authorization/move-errors-to-output-nodes.spec.js +0 -111
- package/dist/spec/authorization/move-errors-to-output-nodes.spec.js.map +0 -1
- package/dist/spec/authorization/permission-descriptor.spec.d.ts +0 -1
- package/dist/spec/authorization/permission-descriptor.spec.js +0 -85
- package/dist/spec/authorization/permission-descriptor.spec.js.map +0 -1
- package/dist/spec/authorization/permission-profile.spec.d.ts +0 -1
- package/dist/spec/authorization/permission-profile.spec.js +0 -110
- package/dist/spec/authorization/permission-profile.spec.js.map +0 -1
- package/dist/spec/database/arangodb/aql-generator.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/aql-generator.spec.js +0 -21
- package/dist/spec/database/arangodb/aql-generator.spec.js.map +0 -1
- package/dist/spec/database/arangodb/aql.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/aql.spec.js +0 -78
- package/dist/spec/database/arangodb/aql.spec.js.map +0 -1
- package/dist/spec/database/arangodb/arangodb-adapter.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/arangodb-adapter.spec.js +0 -192
- package/dist/spec/database/arangodb/arangodb-adapter.spec.js.map +0 -1
- package/dist/spec/database/arangodb/arangodb-test-utils.d.ts +0 -1
- package/dist/spec/database/arangodb/arangodb-test-utils.js +0 -8
- package/dist/spec/database/arangodb/arangodb-test-utils.js.map +0 -1
- package/dist/spec/database/arangodb/retry.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/retry.spec.js +0 -74
- package/dist/spec/database/arangodb/retry.spec.js.map +0 -1
- package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.js +0 -76
- package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.js.map +0 -1
- package/dist/spec/database/arangodb/ttl.spec.d.ts +0 -1
- package/dist/spec/database/arangodb/ttl.spec.js +0 -346
- package/dist/spec/database/arangodb/ttl.spec.js.map +0 -1
- package/dist/spec/database/like-helper.spec.d.ts +0 -1
- package/dist/spec/database/like-helper.spec.js +0 -87
- package/dist/spec/database/like-helper.spec.js.map +0 -1
- package/dist/spec/dev/fast-server.d.ts +0 -4
- package/dist/spec/dev/fast-server.js +0 -57
- package/dist/spec/dev/fast-server.js.map +0 -1
- package/dist/spec/dev/server.d.ts +0 -12
- package/dist/spec/dev/server.js +0 -121
- package/dist/spec/dev/server.js.map +0 -1
- package/dist/spec/dev/start.d.ts +0 -1
- package/dist/spec/dev/start.js +0 -10
- package/dist/spec/dev/start.js.map +0 -1
- package/dist/spec/graphql/query-distiller.spec.d.ts +0 -1
- package/dist/spec/graphql/query-distiller.spec.js +0 -220
- package/dist/spec/graphql/query-distiller.spec.js.map +0 -1
- package/dist/spec/helpers/log4js-logger-provider.d.ts +0 -11
- package/dist/spec/helpers/log4js-logger-provider.js +0 -18
- package/dist/spec/helpers/log4js-logger-provider.js.map +0 -1
- package/dist/spec/init.mocha.d.ts +0 -1
- package/dist/spec/init.mocha.js +0 -11
- package/dist/spec/init.mocha.js.map +0 -1
- package/dist/spec/meta-schema/meta-schema.spec.d.ts +0 -1
- package/dist/spec/meta-schema/meta-schema.spec.js +0 -951
- package/dist/spec/meta-schema/meta-schema.spec.js.map +0 -1
- package/dist/spec/model/create-model.spec.d.ts +0 -1
- package/dist/spec/model/create-model.spec.js +0 -158
- package/dist/spec/model/create-model.spec.js.map +0 -1
- package/dist/spec/model/implementation/billing-validation.spec.d.ts +0 -1
- package/dist/spec/model/implementation/billing-validation.spec.js +0 -180
- package/dist/spec/model/implementation/billing-validation.spec.js.map +0 -1
- package/dist/spec/model/implementation/collect-path.spec.d.ts +0 -1
- package/dist/spec/model/implementation/collect-path.spec.js +0 -678
- package/dist/spec/model/implementation/collect-path.spec.js.map +0 -1
- package/dist/spec/model/implementation/entity-extenion-type.spec.d.ts +0 -1
- package/dist/spec/model/implementation/entity-extenion-type.spec.js +0 -71
- package/dist/spec/model/implementation/entity-extenion-type.spec.js.map +0 -1
- package/dist/spec/model/implementation/field.spec.d.ts +0 -1
- package/dist/spec/model/implementation/field.spec.js +0 -648
- package/dist/spec/model/implementation/field.spec.js.map +0 -1
- package/dist/spec/model/implementation/flex-search-validation.spec.d.ts +0 -1
- package/dist/spec/model/implementation/flex-search-validation.spec.js +0 -288
- package/dist/spec/model/implementation/flex-search-validation.spec.js.map +0 -1
- package/dist/spec/model/implementation/i18n-fields.spec.d.ts +0 -1
- package/dist/spec/model/implementation/i18n-fields.spec.js +0 -208
- package/dist/spec/model/implementation/i18n-fields.spec.js.map +0 -1
- package/dist/spec/model/implementation/i18n-types.spec.d.ts +0 -1
- package/dist/spec/model/implementation/i18n-types.spec.js +0 -160
- package/dist/spec/model/implementation/i18n-types.spec.js.map +0 -1
- package/dist/spec/model/implementation/i18n-validation.spec.d.ts +0 -1
- package/dist/spec/model/implementation/i18n-validation.spec.js +0 -210
- package/dist/spec/model/implementation/i18n-validation.spec.js.map +0 -1
- package/dist/spec/model/implementation/indices.spec.d.ts +0 -1
- package/dist/spec/model/implementation/indices.spec.js +0 -96
- package/dist/spec/model/implementation/indices.spec.js.map +0 -1
- package/dist/spec/model/implementation/model.spec.d.ts +0 -1
- package/dist/spec/model/implementation/model.spec.js +0 -101
- package/dist/spec/model/implementation/model.spec.js.map +0 -1
- package/dist/spec/model/implementation/namespace.spec.d.ts +0 -1
- package/dist/spec/model/implementation/namespace.spec.js +0 -231
- package/dist/spec/model/implementation/namespace.spec.js.map +0 -1
- package/dist/spec/model/implementation/object-type.spec.d.ts +0 -1
- package/dist/spec/model/implementation/object-type.spec.js +0 -65
- package/dist/spec/model/implementation/object-type.spec.js.map +0 -1
- package/dist/spec/model/implementation/relation.spec.d.ts +0 -1
- package/dist/spec/model/implementation/relation.spec.js +0 -99
- package/dist/spec/model/implementation/relation.spec.js.map +0 -1
- package/dist/spec/model/implementation/root-entity-type.spec.d.ts +0 -1
- package/dist/spec/model/implementation/root-entity-type.spec.js +0 -470
- package/dist/spec/model/implementation/root-entity-type.spec.js.map +0 -1
- package/dist/spec/model/implementation/type.spec.d.ts +0 -1
- package/dist/spec/model/implementation/type.spec.js +0 -52
- package/dist/spec/model/implementation/type.spec.js.map +0 -1
- package/dist/spec/model/implementation/validation-utils.d.ts +0 -7
- package/dist/spec/model/implementation/validation-utils.js +0 -34
- package/dist/spec/model/implementation/validation-utils.js.map +0 -1
- package/dist/spec/model/model-spec.helper.d.ts +0 -3
- package/dist/spec/model/model-spec.helper.js +0 -35
- package/dist/spec/model/model-spec.helper.js.map +0 -1
- package/dist/spec/performance/associations.perf.d.ts +0 -3
- package/dist/spec/performance/associations.perf.js +0 -78
- package/dist/spec/performance/associations.perf.js.map +0 -1
- package/dist/spec/performance/count.perf.d.ts +0 -5
- package/dist/spec/performance/count.perf.js +0 -52
- package/dist/spec/performance/count.perf.js.map +0 -1
- package/dist/spec/performance/crud.perf.d.ts +0 -3
- package/dist/spec/performance/crud.perf.js +0 -100
- package/dist/spec/performance/crud.perf.js.map +0 -1
- package/dist/spec/performance/filter.perf.d.ts +0 -3
- package/dist/spec/performance/filter.perf.js +0 -32
- package/dist/spec/performance/filter.perf.js.map +0 -1
- package/dist/spec/performance/index.d.ts +0 -1
- package/dist/spec/performance/index.js +0 -21
- package/dist/spec/performance/index.js.map +0 -1
- package/dist/spec/performance/pagination.perf.d.ts +0 -5
- package/dist/spec/performance/pagination.perf.js +0 -50
- package/dist/spec/performance/pagination.perf.js.map +0 -1
- package/dist/spec/performance/query-pipeline.perf.d.ts +0 -3
- package/dist/spec/performance/query-pipeline.perf.js +0 -196
- package/dist/spec/performance/query-pipeline.perf.js.map +0 -1
- package/dist/spec/performance/references.perf.d.ts +0 -3
- package/dist/spec/performance/references.perf.js +0 -62
- package/dist/spec/performance/references.perf.js.map +0 -1
- package/dist/spec/performance/support/async-bench.d.ts +0 -92
- package/dist/spec/performance/support/async-bench.js +0 -237
- package/dist/spec/performance/support/async-bench.js.map +0 -1
- package/dist/spec/performance/support/helpers.d.ts +0 -28
- package/dist/spec/performance/support/helpers.js +0 -130
- package/dist/spec/performance/support/helpers.js.map +0 -1
- package/dist/spec/performance/support/runner.d.ts +0 -2
- package/dist/spec/performance/support/runner.js +0 -72
- package/dist/spec/performance/support/runner.js.map +0 -1
- package/dist/spec/project/project.spec.d.ts +0 -1
- package/dist/spec/project/project.spec.js +0 -72
- package/dist/spec/project/project.spec.js.map +0 -1
- package/dist/spec/query-tree/utils/simplify-booleans.spec.d.ts +0 -1
- package/dist/spec/query-tree/utils/simplify-booleans.spec.js +0 -87
- package/dist/spec/query-tree/utils/simplify-booleans.spec.js.map +0 -1
- package/dist/spec/regression/drop-test-db.d.ts +0 -1
- package/dist/spec/regression/drop-test-db.js +0 -5
- package/dist/spec/regression/drop-test-db.js.map +0 -1
- package/dist/spec/regression/initialization.d.ts +0 -10
- package/dist/spec/regression/initialization.js +0 -148
- package/dist/spec/regression/initialization.js.map +0 -1
- package/dist/spec/regression/regression-suite.d.ts +0 -28
- package/dist/spec/regression/regression-suite.js +0 -228
- package/dist/spec/regression/regression-suite.js.map +0 -1
- package/dist/spec/regression/regressions.spec.d.ts +0 -1
- package/dist/spec/regression/regressions.spec.js +0 -54
- package/dist/spec/regression/regressions.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/business-object.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/business-object.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/business-object.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.js +0 -73
- package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/collect-validation.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/collect-validation.spec.js +0 -633
- package/dist/spec/schema/ast-validation-modules/collect-validation.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.js +0 -94
- package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.js +0 -235
- package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/helpers.d.ts +0 -10
- package/dist/spec/schema/ast-validation-modules/helpers.js +0 -85
- package/dist/spec/schema/ast-validation-modules/helpers.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.js +0 -24
- package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/indices-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/indices-validator.spec.js +0 -117
- package/dist/spec/schema/ast-validation-modules/indices-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.js +0 -139
- package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.js +0 -31
- package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.js +0 -32
- package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.js +0 -29
- package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.js +0 -53
- package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.js +0 -30
- package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/parent-field.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/parent-field.spec.js +0 -451
- package/dist/spec/schema/ast-validation-modules/parent-field.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.js +0 -40
- package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.js +0 -74
- package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.js +0 -26
- package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.js +0 -26
- package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/relations.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/relations.spec.js +0 -145
- package/dist/spec/schema/ast-validation-modules/relations.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.js +0 -31
- package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.js +0 -35
- package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.js +0 -27
- package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/root-field.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/root-field.spec.js +0 -405
- package/dist/spec/schema/ast-validation-modules/root-field.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/ttl.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/ttl.spec.js +0 -362
- package/dist/spec/schema/ast-validation-modules/ttl.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.js +0 -79
- package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.js.map +0 -1
- package/dist/spec/schema/ast-validation-modules/undefined-types.spec.d.ts +0 -1
- package/dist/spec/schema/ast-validation-modules/undefined-types.spec.js +0 -38
- package/dist/spec/schema/ast-validation-modules/undefined-types.spec.js.map +0 -1
- package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.d.ts +0 -1
- package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.js +0 -53
- package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.js.map +0 -1
- package/dist/spec/schema/scalars/date-time.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/date-time.spec.js +0 -74
- package/dist/spec/schema/scalars/date-time.spec.js.map +0 -1
- package/dist/spec/schema/scalars/fixed-point-decimals.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/fixed-point-decimals.spec.js +0 -66
- package/dist/spec/schema/scalars/fixed-point-decimals.spec.js.map +0 -1
- package/dist/spec/schema/scalars/int53.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/int53.spec.js +0 -45
- package/dist/spec/schema/scalars/int53.spec.js.map +0 -1
- package/dist/spec/schema/scalars/local-date.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/local-date.spec.js +0 -30
- package/dist/spec/schema/scalars/local-date.spec.js.map +0 -1
- package/dist/spec/schema/scalars/local-time.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/local-time.spec.js +0 -64
- package/dist/spec/schema/scalars/local-time.spec.js.map +0 -1
- package/dist/spec/schema/scalars/offset-date-time.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/offset-date-time.spec.js +0 -82
- package/dist/spec/schema/scalars/offset-date-time.spec.js.map +0 -1
- package/dist/spec/schema/scalars/string-map.spec.d.ts +0 -1
- package/dist/spec/schema/scalars/string-map.spec.js +0 -230
- package/dist/spec/schema/scalars/string-map.spec.js.map +0 -1
- package/dist/spec/schema/schema-builder.spec.d.ts +0 -1
- package/dist/spec/schema/schema-builder.spec.js +0 -105
- package/dist/spec/schema/schema-builder.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.js +0 -30
- package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.js +0 -36
- package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.js +0 -30
- package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/graphql-rules.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/graphql-rules.spec.js +0 -89
- package/dist/spec/schema/source-validation-modules/graphql-rules.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.js +0 -99
- package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.js +0 -145
- package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/source-validation-helper.d.ts +0 -3
- package/dist/spec/schema/source-validation-modules/source-validation-helper.js +0 -12
- package/dist/spec/schema/source-validation-modules/source-validation-helper.js.map +0 -1
- package/dist/spec/schema/source-validation-modules/yaml-parser.spec.d.ts +0 -1
- package/dist/spec/schema/source-validation-modules/yaml-parser.spec.js +0 -87
- package/dist/spec/schema/source-validation-modules/yaml-parser.spec.js.map +0 -1
- package/dist/spec/schema-generation/create-input-type-generator.spec.d.ts +0 -1
- package/dist/spec/schema-generation/create-input-type-generator.spec.js +0 -518
- package/dist/spec/schema-generation/create-input-type-generator.spec.js.map +0 -1
- package/dist/spec/schema-generation/createdat-updatedat-modification.spec.d.ts +0 -1
- package/dist/spec/schema-generation/createdat-updatedat-modification.spec.js +0 -160
- package/dist/spec/schema-generation/createdat-updatedat-modification.spec.js.map +0 -1
- package/dist/spec/schema-generation/enum-type-generator.spec.d.ts +0 -1
- package/dist/spec/schema-generation/enum-type-generator.spec.js +0 -21
- package/dist/spec/schema-generation/enum-type-generator.spec.js.map +0 -1
- package/dist/spec/schema-generation/memorize-decorator.spec.d.ts +0 -1
- package/dist/spec/schema-generation/memorize-decorator.spec.js +0 -39
- package/dist/spec/schema-generation/memorize-decorator.spec.js.map +0 -1
- package/dist/spec/schema-generation/order-by-enum-generator.spec.d.ts +0 -1
- package/dist/spec/schema-generation/order-by-enum-generator.spec.js +0 -188
- package/dist/spec/schema-generation/order-by-enum-generator.spec.js.map +0 -1
- package/dist/spec/utils/group-by-equivalence.spec.d.ts +0 -1
- package/dist/spec/utils/group-by-equivalence.spec.js +0 -11
- package/dist/spec/utils/group-by-equivalence.spec.js.map +0 -1
- package/dist/spec/utils/utils.spec.d.ts +0 -1
- package/dist/spec/utils/utils.spec.js +0 -24
- package/dist/spec/utils/utils.spec.js.map +0 -1
- package/dist/spec/utils/visitor.spec.d.ts +0 -1
- package/dist/spec/utils/visitor.spec.js +0 -119
- package/dist/spec/utils/visitor.spec.js.map +0 -1
|
@@ -1,678 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const chai_1 = require("chai");
|
|
4
|
-
const model_1 = require("../../../src/model");
|
|
5
|
-
describe('CollectPath', () => {
|
|
6
|
-
const model = new model_1.Model({
|
|
7
|
-
types: [
|
|
8
|
-
{
|
|
9
|
-
name: 'Item',
|
|
10
|
-
kind: model_1.TypeKind.CHILD_ENTITY,
|
|
11
|
-
fields: [
|
|
12
|
-
{
|
|
13
|
-
name: 'itemNumber',
|
|
14
|
-
typeName: 'String',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'DangerousGoodsInfo',
|
|
20
|
-
kind: model_1.TypeKind.ENTITY_EXTENSION,
|
|
21
|
-
fields: [
|
|
22
|
-
{
|
|
23
|
-
name: 'dangerousItems',
|
|
24
|
-
typeName: 'Item',
|
|
25
|
-
isList: true,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'DeliveryContent',
|
|
31
|
-
kind: model_1.TypeKind.CHILD_ENTITY,
|
|
32
|
-
fields: [
|
|
33
|
-
{
|
|
34
|
-
name: 'items',
|
|
35
|
-
typeName: 'Item',
|
|
36
|
-
isList: true,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'subContents',
|
|
40
|
-
typeName: 'DeliveryContent',
|
|
41
|
-
isList: true,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'Order',
|
|
47
|
-
kind: model_1.TypeKind.ROOT_ENTITY,
|
|
48
|
-
fields: [
|
|
49
|
-
{
|
|
50
|
-
name: 'handlingUnits',
|
|
51
|
-
typeName: 'HandlingUnit',
|
|
52
|
-
isList: true,
|
|
53
|
-
isRelation: true,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'delivery',
|
|
57
|
-
typeName: 'Delivery',
|
|
58
|
-
isRelation: true,
|
|
59
|
-
inverseOfFieldName: 'order',
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'PurchaseOrder',
|
|
65
|
-
kind: model_1.TypeKind.ROOT_ENTITY,
|
|
66
|
-
fields: [
|
|
67
|
-
{
|
|
68
|
-
name: 'handlingUnits',
|
|
69
|
-
typeName: 'HandlingUnit',
|
|
70
|
-
isList: true,
|
|
71
|
-
isRelation: true,
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'delivery',
|
|
75
|
-
typeName: 'Delivery',
|
|
76
|
-
isRelation: true,
|
|
77
|
-
inverseOfFieldName: 'order',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: 'shipment',
|
|
81
|
-
typeName: 'Shipment',
|
|
82
|
-
isRelation: true,
|
|
83
|
-
inverseOfFieldName: 'purchaseOrder',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'Shipment',
|
|
89
|
-
kind: model_1.TypeKind.ROOT_ENTITY,
|
|
90
|
-
fields: [
|
|
91
|
-
{
|
|
92
|
-
name: 'shipmentNumber',
|
|
93
|
-
typeName: 'String',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: 'handlingUnits',
|
|
97
|
-
typeName: 'HandlingUnit',
|
|
98
|
-
isList: true,
|
|
99
|
-
isRelation: true,
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'order',
|
|
103
|
-
typeName: 'Order',
|
|
104
|
-
isRelation: true,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'purchaseOrder',
|
|
108
|
-
typeName: 'PurchaseOrder',
|
|
109
|
-
isRelation: true,
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: 'HandlingUnit',
|
|
115
|
-
kind: model_1.TypeKind.ROOT_ENTITY,
|
|
116
|
-
fields: [
|
|
117
|
-
{
|
|
118
|
-
name: 'handlingUnitNumber',
|
|
119
|
-
typeName: 'String',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'childHandlingUnits',
|
|
123
|
-
typeName: 'HandlingUnit',
|
|
124
|
-
isList: true,
|
|
125
|
-
isRelation: true,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'parentHandlingUnit',
|
|
129
|
-
typeName: 'HandlingUnit',
|
|
130
|
-
isRelation: true,
|
|
131
|
-
inverseOfFieldName: 'childHandlingUnits',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'items',
|
|
135
|
-
typeName: 'Item',
|
|
136
|
-
isList: true,
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: 'Delivery',
|
|
142
|
-
kind: model_1.TypeKind.ROOT_ENTITY,
|
|
143
|
-
fields: [
|
|
144
|
-
{
|
|
145
|
-
name: 'deliveryNumber',
|
|
146
|
-
typeName: 'String',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: 'items',
|
|
150
|
-
typeName: 'Item',
|
|
151
|
-
isList: true,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: 'contents',
|
|
155
|
-
typeName: 'DeliveryContent',
|
|
156
|
-
isList: true,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: 'dangerousGoodsInfo',
|
|
160
|
-
typeName: 'DangerousGoodsInfo',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: 'order',
|
|
164
|
-
typeName: 'Order',
|
|
165
|
-
isRelation: true,
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: 'shipments',
|
|
169
|
-
typeName: 'Shipment',
|
|
170
|
-
isRelation: true,
|
|
171
|
-
isList: true,
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
name: 'handlingUnits',
|
|
175
|
-
typeName: 'HandlingUnit',
|
|
176
|
-
isRelation: true,
|
|
177
|
-
isList: true,
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
});
|
|
183
|
-
const shipmentType = model.getRootEntityTypeOrThrow('Shipment');
|
|
184
|
-
const handlingUnitType = model.getRootEntityTypeOrThrow('HandlingUnit');
|
|
185
|
-
const orderType = model.getRootEntityTypeOrThrow('Order');
|
|
186
|
-
const purchaseOrderType = model.getRootEntityTypeOrThrow('PurchaseOrder');
|
|
187
|
-
const itemType = model.getChildEntityTypeOrThrow('Item');
|
|
188
|
-
const dangerousGoodsInfoType = model.getEntityExtensionTypeOrThrow('DangerousGoodsInfo');
|
|
189
|
-
const deliveryContentType = model.getChildEntityTypeOrThrow('DeliveryContent');
|
|
190
|
-
const deliveryType = model.getRootEntityTypeOrThrow('Delivery');
|
|
191
|
-
function assertSegmentsEqual(path, expectedSegments) {
|
|
192
|
-
const context = new model_1.ValidationContext();
|
|
193
|
-
path.validate(context);
|
|
194
|
-
const errors = context.asResult().getErrors();
|
|
195
|
-
(0, chai_1.expect)(errors, errors.map((e) => e.toString()).join('\n')).to.be.empty;
|
|
196
|
-
const actualSegments = path.segments;
|
|
197
|
-
// don't use deep.equal because it would deep-compare the Field instnaces which are *really* deep (with graphql stuff)
|
|
198
|
-
(0, chai_1.expect)(actualSegments).to.have.lengthOf(expectedSegments.length);
|
|
199
|
-
for (let i = 0; i < expectedSegments.length; i++) {
|
|
200
|
-
const actual = actualSegments[i];
|
|
201
|
-
const expected = expectedSegments[i];
|
|
202
|
-
for (const key of Object.keys(expected)) {
|
|
203
|
-
(0, chai_1.expect)(actual[key], key).to.equal(expected[key]);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
it('resolves direct to-n relations', () => {
|
|
208
|
-
const path = new model_1.CollectPath({ path: 'shipments' }, deliveryType);
|
|
209
|
-
const shipmentsField = deliveryType.getFieldOrThrow('shipments');
|
|
210
|
-
assertSegmentsEqual(path, [
|
|
211
|
-
{
|
|
212
|
-
kind: 'relation',
|
|
213
|
-
resultingType: shipmentType,
|
|
214
|
-
isListSegment: true,
|
|
215
|
-
resultIsList: true,
|
|
216
|
-
isNullableSegment: false,
|
|
217
|
-
resultIsNullable: false,
|
|
218
|
-
resultMayContainDuplicateEntities: false,
|
|
219
|
-
minDepth: 1,
|
|
220
|
-
maxDepth: 1,
|
|
221
|
-
field: shipmentsField,
|
|
222
|
-
relationSide: shipmentsField.getRelationSideOrThrow(),
|
|
223
|
-
},
|
|
224
|
-
]);
|
|
225
|
-
(0, chai_1.expect)(path.resultingType).to.equal(shipmentType);
|
|
226
|
-
});
|
|
227
|
-
it('resolves direct to-1 relations', () => {
|
|
228
|
-
const path = new model_1.CollectPath({ path: 'order' }, deliveryType);
|
|
229
|
-
const orderField = deliveryType.getFieldOrThrow('order');
|
|
230
|
-
assertSegmentsEqual(path, [
|
|
231
|
-
{
|
|
232
|
-
kind: 'relation',
|
|
233
|
-
resultingType: orderType,
|
|
234
|
-
isListSegment: false,
|
|
235
|
-
resultIsList: false,
|
|
236
|
-
isNullableSegment: true,
|
|
237
|
-
resultIsNullable: true,
|
|
238
|
-
resultMayContainDuplicateEntities: false,
|
|
239
|
-
minDepth: 1,
|
|
240
|
-
maxDepth: 1,
|
|
241
|
-
field: orderField,
|
|
242
|
-
relationSide: orderField.getRelationSideOrThrow(),
|
|
243
|
-
},
|
|
244
|
-
]);
|
|
245
|
-
(0, chai_1.expect)(path.resultingType).to.equal(orderType);
|
|
246
|
-
});
|
|
247
|
-
it('resolves to-n-then-to-n relations', () => {
|
|
248
|
-
const path = new model_1.CollectPath({ path: 'shipments.handlingUnits' }, deliveryType);
|
|
249
|
-
const shipmentsField = deliveryType.getFieldOrThrow('shipments');
|
|
250
|
-
const handlingUnitsField = shipmentType.getFieldOrThrow('handlingUnits');
|
|
251
|
-
assertSegmentsEqual(path, [
|
|
252
|
-
{
|
|
253
|
-
kind: 'relation',
|
|
254
|
-
resultingType: shipmentType,
|
|
255
|
-
isListSegment: true,
|
|
256
|
-
resultIsList: true,
|
|
257
|
-
isNullableSegment: false,
|
|
258
|
-
resultIsNullable: false,
|
|
259
|
-
resultMayContainDuplicateEntities: false,
|
|
260
|
-
minDepth: 1,
|
|
261
|
-
maxDepth: 1,
|
|
262
|
-
field: shipmentsField,
|
|
263
|
-
relationSide: shipmentsField.getRelationSideOrThrow(),
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
kind: 'relation',
|
|
267
|
-
resultingType: handlingUnitType,
|
|
268
|
-
isListSegment: true,
|
|
269
|
-
resultIsList: true,
|
|
270
|
-
isNullableSegment: false,
|
|
271
|
-
resultIsNullable: false,
|
|
272
|
-
resultMayContainDuplicateEntities: true,
|
|
273
|
-
minDepth: 1,
|
|
274
|
-
maxDepth: 1,
|
|
275
|
-
field: handlingUnitsField,
|
|
276
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
277
|
-
},
|
|
278
|
-
]);
|
|
279
|
-
(0, chai_1.expect)(path.resultingType).to.equal(handlingUnitType);
|
|
280
|
-
});
|
|
281
|
-
it('resolves to-1-then-to-n relations', () => {
|
|
282
|
-
const path = new model_1.CollectPath({ path: 'order.handlingUnits' }, deliveryType);
|
|
283
|
-
const orderField = deliveryType.getFieldOrThrow('order');
|
|
284
|
-
const handlingUnitsField = orderType.getFieldOrThrow('handlingUnits');
|
|
285
|
-
assertSegmentsEqual(path, [
|
|
286
|
-
{
|
|
287
|
-
kind: 'relation',
|
|
288
|
-
resultingType: orderType,
|
|
289
|
-
isListSegment: false,
|
|
290
|
-
resultIsList: false,
|
|
291
|
-
isNullableSegment: true,
|
|
292
|
-
resultIsNullable: true,
|
|
293
|
-
resultMayContainDuplicateEntities: false,
|
|
294
|
-
minDepth: 1,
|
|
295
|
-
maxDepth: 1,
|
|
296
|
-
field: orderField,
|
|
297
|
-
relationSide: orderField.getRelationSideOrThrow(),
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
kind: 'relation',
|
|
301
|
-
resultingType: handlingUnitType,
|
|
302
|
-
isListSegment: true,
|
|
303
|
-
resultIsList: true,
|
|
304
|
-
isNullableSegment: false,
|
|
305
|
-
resultIsNullable: false,
|
|
306
|
-
resultMayContainDuplicateEntities: false,
|
|
307
|
-
minDepth: 1,
|
|
308
|
-
maxDepth: 1,
|
|
309
|
-
field: handlingUnitsField,
|
|
310
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
311
|
-
},
|
|
312
|
-
]);
|
|
313
|
-
(0, chai_1.expect)(path.resultingType).to.equal(handlingUnitType);
|
|
314
|
-
});
|
|
315
|
-
it('resolves to-n-then-1-to-1 relations', () => {
|
|
316
|
-
const path = new model_1.CollectPath({ path: 'shipments.purchaseOrder' }, deliveryType);
|
|
317
|
-
const shipmentsField = deliveryType.getFieldOrThrow('shipments');
|
|
318
|
-
const purchaseOrderField = shipmentType.getFieldOrThrow('purchaseOrder');
|
|
319
|
-
assertSegmentsEqual(path, [
|
|
320
|
-
{
|
|
321
|
-
kind: 'relation',
|
|
322
|
-
resultingType: shipmentType,
|
|
323
|
-
isListSegment: true,
|
|
324
|
-
resultIsList: true,
|
|
325
|
-
isNullableSegment: false,
|
|
326
|
-
resultIsNullable: false,
|
|
327
|
-
resultMayContainDuplicateEntities: false,
|
|
328
|
-
minDepth: 1,
|
|
329
|
-
maxDepth: 1,
|
|
330
|
-
field: shipmentsField,
|
|
331
|
-
relationSide: shipmentsField.getRelationSideOrThrow(),
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
kind: 'relation',
|
|
335
|
-
resultingType: purchaseOrderType,
|
|
336
|
-
isListSegment: false,
|
|
337
|
-
resultIsList: true,
|
|
338
|
-
isNullableSegment: true,
|
|
339
|
-
resultIsNullable: true,
|
|
340
|
-
resultMayContainDuplicateEntities: false,
|
|
341
|
-
minDepth: 1,
|
|
342
|
-
maxDepth: 1,
|
|
343
|
-
field: purchaseOrderField,
|
|
344
|
-
relationSide: purchaseOrderField.getRelationSideOrThrow(),
|
|
345
|
-
},
|
|
346
|
-
]);
|
|
347
|
-
(0, chai_1.expect)(path.resultingType).to.equal(purchaseOrderType);
|
|
348
|
-
(0, chai_1.expect)(path.resultIsList).to.equal(true);
|
|
349
|
-
});
|
|
350
|
-
it('resolves to-n-then-n-to-1 relations', () => {
|
|
351
|
-
const path = new model_1.CollectPath({ path: 'shipments.order' }, deliveryType);
|
|
352
|
-
const shipmentsField = deliveryType.getFieldOrThrow('shipments');
|
|
353
|
-
const orderField = shipmentType.getFieldOrThrow('order');
|
|
354
|
-
assertSegmentsEqual(path, [
|
|
355
|
-
{
|
|
356
|
-
kind: 'relation',
|
|
357
|
-
resultingType: shipmentType,
|
|
358
|
-
isListSegment: true,
|
|
359
|
-
resultIsList: true,
|
|
360
|
-
isNullableSegment: false,
|
|
361
|
-
resultIsNullable: false,
|
|
362
|
-
resultMayContainDuplicateEntities: false,
|
|
363
|
-
minDepth: 1,
|
|
364
|
-
maxDepth: 1,
|
|
365
|
-
field: shipmentsField,
|
|
366
|
-
relationSide: shipmentsField.getRelationSideOrThrow(),
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
kind: 'relation',
|
|
370
|
-
resultingType: orderType,
|
|
371
|
-
isListSegment: false,
|
|
372
|
-
resultIsList: true,
|
|
373
|
-
isNullableSegment: true,
|
|
374
|
-
resultIsNullable: true,
|
|
375
|
-
resultMayContainDuplicateEntities: true,
|
|
376
|
-
minDepth: 1,
|
|
377
|
-
maxDepth: 1,
|
|
378
|
-
field: orderField,
|
|
379
|
-
relationSide: orderField.getRelationSideOrThrow(),
|
|
380
|
-
},
|
|
381
|
-
]);
|
|
382
|
-
(0, chai_1.expect)(path.resultingType).to.equal(orderType);
|
|
383
|
-
(0, chai_1.expect)(path.resultIsList).to.equal(true);
|
|
384
|
-
});
|
|
385
|
-
it('resolves to-1-then-to-1 relations', () => {
|
|
386
|
-
const path = new model_1.CollectPath({ path: 'order.delivery' }, deliveryType);
|
|
387
|
-
const orderField = deliveryType.getFieldOrThrow('order');
|
|
388
|
-
const deliveryField = orderType.getFieldOrThrow('delivery');
|
|
389
|
-
assertSegmentsEqual(path, [
|
|
390
|
-
{
|
|
391
|
-
kind: 'relation',
|
|
392
|
-
resultingType: orderType,
|
|
393
|
-
isListSegment: false,
|
|
394
|
-
resultIsList: false,
|
|
395
|
-
isNullableSegment: true,
|
|
396
|
-
resultIsNullable: true,
|
|
397
|
-
resultMayContainDuplicateEntities: false,
|
|
398
|
-
minDepth: 1,
|
|
399
|
-
maxDepth: 1,
|
|
400
|
-
field: orderField,
|
|
401
|
-
relationSide: orderField.getRelationSideOrThrow(),
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
kind: 'relation',
|
|
405
|
-
resultingType: deliveryType,
|
|
406
|
-
isListSegment: false,
|
|
407
|
-
resultIsList: false,
|
|
408
|
-
isNullableSegment: true,
|
|
409
|
-
resultIsNullable: true,
|
|
410
|
-
resultMayContainDuplicateEntities: false,
|
|
411
|
-
minDepth: 1,
|
|
412
|
-
maxDepth: 1,
|
|
413
|
-
field: deliveryField,
|
|
414
|
-
relationSide: deliveryField.getRelationSideOrThrow(),
|
|
415
|
-
},
|
|
416
|
-
]);
|
|
417
|
-
(0, chai_1.expect)(path.resultingType).to.equal(deliveryType);
|
|
418
|
-
(0, chai_1.expect)(path.resultIsList).to.equal(false);
|
|
419
|
-
});
|
|
420
|
-
it('resolves recursive relations', () => {
|
|
421
|
-
const path = new model_1.CollectPath({ path: 'handlingUnits.childHandlingUnits.childHandlingUnits' }, deliveryType);
|
|
422
|
-
const handlingUnitsField = deliveryType.getFieldOrThrow('handlingUnits');
|
|
423
|
-
const childHandlingUnitsField = handlingUnitType.getFieldOrThrow('childHandlingUnits');
|
|
424
|
-
assertSegmentsEqual(path, [
|
|
425
|
-
{
|
|
426
|
-
kind: 'relation',
|
|
427
|
-
resultingType: handlingUnitType,
|
|
428
|
-
isListSegment: true,
|
|
429
|
-
resultIsList: true,
|
|
430
|
-
isNullableSegment: false,
|
|
431
|
-
resultIsNullable: false,
|
|
432
|
-
resultMayContainDuplicateEntities: false,
|
|
433
|
-
minDepth: 1,
|
|
434
|
-
maxDepth: 1,
|
|
435
|
-
field: handlingUnitsField,
|
|
436
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
kind: 'relation',
|
|
440
|
-
resultingType: handlingUnitType,
|
|
441
|
-
isListSegment: true,
|
|
442
|
-
resultIsList: true,
|
|
443
|
-
isNullableSegment: false,
|
|
444
|
-
resultIsNullable: false,
|
|
445
|
-
resultMayContainDuplicateEntities: false,
|
|
446
|
-
minDepth: 1,
|
|
447
|
-
maxDepth: 1,
|
|
448
|
-
field: childHandlingUnitsField,
|
|
449
|
-
relationSide: childHandlingUnitsField.getRelationSideOrThrow(),
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
kind: 'relation',
|
|
453
|
-
resultingType: handlingUnitType,
|
|
454
|
-
isListSegment: true,
|
|
455
|
-
resultIsList: true,
|
|
456
|
-
isNullableSegment: false,
|
|
457
|
-
resultIsNullable: false,
|
|
458
|
-
resultMayContainDuplicateEntities: false,
|
|
459
|
-
minDepth: 1,
|
|
460
|
-
maxDepth: 1,
|
|
461
|
-
field: childHandlingUnitsField,
|
|
462
|
-
relationSide: childHandlingUnitsField.getRelationSideOrThrow(),
|
|
463
|
-
},
|
|
464
|
-
]);
|
|
465
|
-
(0, chai_1.expect)(path.resultingType).to.equal(handlingUnitType);
|
|
466
|
-
});
|
|
467
|
-
it('resolves relations with exact depth specifier', () => {
|
|
468
|
-
const path = new model_1.CollectPath({ path: 'handlingUnits.childHandlingUnits{2}' }, deliveryType);
|
|
469
|
-
const handlingUnitsField = deliveryType.getFieldOrThrow('handlingUnits');
|
|
470
|
-
const childHandlingUnitsField = handlingUnitType.getFieldOrThrow('childHandlingUnits');
|
|
471
|
-
assertSegmentsEqual(path, [
|
|
472
|
-
{
|
|
473
|
-
kind: 'relation',
|
|
474
|
-
resultingType: handlingUnitType,
|
|
475
|
-
isListSegment: true,
|
|
476
|
-
resultIsList: true,
|
|
477
|
-
isNullableSegment: false,
|
|
478
|
-
resultIsNullable: false,
|
|
479
|
-
resultMayContainDuplicateEntities: false,
|
|
480
|
-
minDepth: 1,
|
|
481
|
-
maxDepth: 1,
|
|
482
|
-
field: handlingUnitsField,
|
|
483
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
kind: 'relation',
|
|
487
|
-
resultingType: handlingUnitType,
|
|
488
|
-
isListSegment: true,
|
|
489
|
-
resultIsList: true,
|
|
490
|
-
isNullableSegment: false,
|
|
491
|
-
resultIsNullable: false,
|
|
492
|
-
resultMayContainDuplicateEntities: false,
|
|
493
|
-
minDepth: 2,
|
|
494
|
-
maxDepth: 2,
|
|
495
|
-
field: childHandlingUnitsField,
|
|
496
|
-
relationSide: childHandlingUnitsField.getRelationSideOrThrow(),
|
|
497
|
-
},
|
|
498
|
-
]);
|
|
499
|
-
(0, chai_1.expect)(path.resultingType).to.equal(handlingUnitType);
|
|
500
|
-
});
|
|
501
|
-
it('resolves relations with min and max depth specifier', () => {
|
|
502
|
-
const path = new model_1.CollectPath({ path: 'handlingUnits.childHandlingUnits{2,4}' }, deliveryType);
|
|
503
|
-
const handlingUnitsField = deliveryType.getFieldOrThrow('handlingUnits');
|
|
504
|
-
const childHandlingUnitsField = handlingUnitType.getFieldOrThrow('childHandlingUnits');
|
|
505
|
-
assertSegmentsEqual(path, [
|
|
506
|
-
{
|
|
507
|
-
kind: 'relation',
|
|
508
|
-
resultingType: handlingUnitType,
|
|
509
|
-
isListSegment: true,
|
|
510
|
-
resultIsList: true,
|
|
511
|
-
isNullableSegment: false,
|
|
512
|
-
resultIsNullable: false,
|
|
513
|
-
resultMayContainDuplicateEntities: false,
|
|
514
|
-
minDepth: 1,
|
|
515
|
-
maxDepth: 1,
|
|
516
|
-
field: handlingUnitsField,
|
|
517
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
kind: 'relation',
|
|
521
|
-
resultingType: handlingUnitType,
|
|
522
|
-
isListSegment: true,
|
|
523
|
-
resultIsList: true,
|
|
524
|
-
isNullableSegment: false,
|
|
525
|
-
resultIsNullable: false,
|
|
526
|
-
resultMayContainDuplicateEntities: false,
|
|
527
|
-
minDepth: 2,
|
|
528
|
-
maxDepth: 4,
|
|
529
|
-
field: childHandlingUnitsField,
|
|
530
|
-
relationSide: childHandlingUnitsField.getRelationSideOrThrow(),
|
|
531
|
-
},
|
|
532
|
-
]);
|
|
533
|
-
(0, chai_1.expect)(path.resultingType).to.equal(handlingUnitType);
|
|
534
|
-
});
|
|
535
|
-
it('resolves direct child entities', () => {
|
|
536
|
-
const path = new model_1.CollectPath({ path: 'items' }, deliveryType);
|
|
537
|
-
const itemsField = deliveryType.getFieldOrThrow('items');
|
|
538
|
-
assertSegmentsEqual(path, [
|
|
539
|
-
{
|
|
540
|
-
kind: 'field',
|
|
541
|
-
resultingType: itemType,
|
|
542
|
-
isListSegment: true,
|
|
543
|
-
resultIsList: true,
|
|
544
|
-
isNullableSegment: false,
|
|
545
|
-
resultIsNullable: false,
|
|
546
|
-
resultMayContainDuplicateEntities: false,
|
|
547
|
-
field: itemsField,
|
|
548
|
-
},
|
|
549
|
-
]);
|
|
550
|
-
(0, chai_1.expect)(path.resultingType).to.equal(itemType);
|
|
551
|
-
});
|
|
552
|
-
it('resolves indirect child entities', () => {
|
|
553
|
-
const path = new model_1.CollectPath({ path: 'contents.items' }, deliveryType);
|
|
554
|
-
const contentsField = deliveryType.getFieldOrThrow('contents');
|
|
555
|
-
const itemsField = deliveryContentType.getFieldOrThrow('items');
|
|
556
|
-
assertSegmentsEqual(path, [
|
|
557
|
-
{
|
|
558
|
-
kind: 'field',
|
|
559
|
-
resultingType: deliveryContentType,
|
|
560
|
-
isListSegment: true,
|
|
561
|
-
resultIsList: true,
|
|
562
|
-
isNullableSegment: false,
|
|
563
|
-
resultIsNullable: false,
|
|
564
|
-
resultMayContainDuplicateEntities: false,
|
|
565
|
-
field: contentsField,
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
kind: 'field',
|
|
569
|
-
resultingType: itemType,
|
|
570
|
-
isListSegment: true,
|
|
571
|
-
resultIsList: true,
|
|
572
|
-
isNullableSegment: false,
|
|
573
|
-
resultIsNullable: false,
|
|
574
|
-
resultMayContainDuplicateEntities: false,
|
|
575
|
-
field: itemsField,
|
|
576
|
-
},
|
|
577
|
-
]);
|
|
578
|
-
(0, chai_1.expect)(path.resultingType).to.equal(itemType);
|
|
579
|
-
});
|
|
580
|
-
it('resolves child entities of entity extensions', () => {
|
|
581
|
-
const path = new model_1.CollectPath({ path: 'dangerousGoodsInfo.dangerousItems' }, deliveryType);
|
|
582
|
-
const dangerousGoodsField = deliveryType.getFieldOrThrow('dangerousGoodsInfo');
|
|
583
|
-
const itemsField = dangerousGoodsInfoType.getFieldOrThrow('dangerousItems');
|
|
584
|
-
assertSegmentsEqual(path, [
|
|
585
|
-
{
|
|
586
|
-
kind: 'field',
|
|
587
|
-
resultingType: dangerousGoodsInfoType,
|
|
588
|
-
isListSegment: false,
|
|
589
|
-
resultIsList: false,
|
|
590
|
-
isNullableSegment: false,
|
|
591
|
-
resultIsNullable: false,
|
|
592
|
-
resultMayContainDuplicateEntities: false,
|
|
593
|
-
field: dangerousGoodsField,
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
kind: 'field',
|
|
597
|
-
resultingType: itemType,
|
|
598
|
-
isListSegment: true,
|
|
599
|
-
resultIsList: true,
|
|
600
|
-
isNullableSegment: false,
|
|
601
|
-
resultIsNullable: false,
|
|
602
|
-
resultMayContainDuplicateEntities: false,
|
|
603
|
-
field: itemsField,
|
|
604
|
-
},
|
|
605
|
-
]);
|
|
606
|
-
(0, chai_1.expect)(path.resultingType).to.equal(itemType);
|
|
607
|
-
});
|
|
608
|
-
it('resolves recursive child entities', () => {
|
|
609
|
-
const path = new model_1.CollectPath({ path: 'contents.subContents.subContents' }, deliveryType);
|
|
610
|
-
const contentsField = deliveryType.getFieldOrThrow('contents');
|
|
611
|
-
const subContentsField = deliveryContentType.getFieldOrThrow('subContents');
|
|
612
|
-
assertSegmentsEqual(path, [
|
|
613
|
-
{
|
|
614
|
-
kind: 'field',
|
|
615
|
-
resultingType: deliveryContentType,
|
|
616
|
-
isListSegment: true,
|
|
617
|
-
resultIsList: true,
|
|
618
|
-
isNullableSegment: false,
|
|
619
|
-
resultIsNullable: false,
|
|
620
|
-
resultMayContainDuplicateEntities: false,
|
|
621
|
-
field: contentsField,
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
kind: 'field',
|
|
625
|
-
resultingType: deliveryContentType,
|
|
626
|
-
isListSegment: true,
|
|
627
|
-
resultIsList: true,
|
|
628
|
-
isNullableSegment: false,
|
|
629
|
-
resultIsNullable: false,
|
|
630
|
-
resultMayContainDuplicateEntities: false,
|
|
631
|
-
field: subContentsField,
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
kind: 'field',
|
|
635
|
-
resultingType: deliveryContentType,
|
|
636
|
-
isListSegment: true,
|
|
637
|
-
resultIsList: true,
|
|
638
|
-
isNullableSegment: false,
|
|
639
|
-
resultIsNullable: false,
|
|
640
|
-
resultMayContainDuplicateEntities: false,
|
|
641
|
-
field: subContentsField,
|
|
642
|
-
},
|
|
643
|
-
]);
|
|
644
|
-
(0, chai_1.expect)(path.resultingType).to.equal(deliveryContentType);
|
|
645
|
-
});
|
|
646
|
-
it('resolves child entities of relations', () => {
|
|
647
|
-
const path = new model_1.CollectPath({ path: 'handlingUnits.items' }, deliveryType);
|
|
648
|
-
const handlingUnitsField = deliveryType.getFieldOrThrow('handlingUnits');
|
|
649
|
-
const itemsField = handlingUnitType.getFieldOrThrow('items');
|
|
650
|
-
assertSegmentsEqual(path, [
|
|
651
|
-
{
|
|
652
|
-
kind: 'relation',
|
|
653
|
-
resultingType: handlingUnitType,
|
|
654
|
-
isListSegment: true,
|
|
655
|
-
resultIsList: true,
|
|
656
|
-
isNullableSegment: false,
|
|
657
|
-
resultIsNullable: false,
|
|
658
|
-
resultMayContainDuplicateEntities: false,
|
|
659
|
-
minDepth: 1,
|
|
660
|
-
maxDepth: 1,
|
|
661
|
-
field: handlingUnitsField,
|
|
662
|
-
relationSide: handlingUnitsField.getRelationSideOrThrow(),
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
kind: 'field',
|
|
666
|
-
resultingType: itemType,
|
|
667
|
-
isListSegment: true,
|
|
668
|
-
resultIsList: true,
|
|
669
|
-
isNullableSegment: false,
|
|
670
|
-
resultIsNullable: false,
|
|
671
|
-
resultMayContainDuplicateEntities: false,
|
|
672
|
-
field: itemsField,
|
|
673
|
-
},
|
|
674
|
-
]);
|
|
675
|
-
(0, chai_1.expect)(path.resultingType).to.equal(itemType);
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
//# sourceMappingURL=collect-path.spec.js.map
|