@takeshape/schema 9.47.0 → 9.49.0
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/content-schema-transform.d.ts +6 -6
- package/dist/content-schema-transform.d.ts.map +1 -1
- package/dist/create-input-schema.d.ts +2 -2
- package/dist/create-input-schema.d.ts.map +1 -1
- package/dist/flatten-templates.d.ts +2 -2
- package/dist/flatten-templates.d.ts.map +1 -1
- package/dist/get-is-leaf.d.ts +2 -2
- package/dist/get-is-leaf.d.ts.map +1 -1
- package/dist/interfaces.d.ts +6 -6
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/layers/layers.d.ts +3 -3
- package/dist/layers/layers.d.ts.map +1 -1
- package/dist/layers/refs.d.ts +4 -4
- package/dist/layers/refs.d.ts.map +1 -1
- package/dist/migration/index.d.ts +43 -42
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +4 -1
- package/dist/migration/to/utils/v3.34.0-utils.d.ts +1 -0
- package/dist/migration/to/utils/v3.34.0-utils.d.ts.map +1 -0
- package/dist/migration/to/utils/v3.34.0-utils.js +1 -0
- package/dist/migration/to/v3.0.0.d.ts +2 -2
- package/dist/migration/to/v3.0.0.d.ts.map +1 -1
- package/dist/migration/to/v3.1.0.d.ts +2 -2
- package/dist/migration/to/v3.1.0.d.ts.map +1 -1
- package/dist/migration/to/v3.10.0.d.ts +2 -2
- package/dist/migration/to/v3.10.0.d.ts.map +1 -1
- package/dist/migration/to/v3.11.0.d.ts +2 -2
- package/dist/migration/to/v3.11.0.d.ts.map +1 -1
- package/dist/migration/to/v3.12.0.d.ts +2 -2
- package/dist/migration/to/v3.12.0.d.ts.map +1 -1
- package/dist/migration/to/v3.12.1.d.ts +2 -2
- package/dist/migration/to/v3.12.1.d.ts.map +1 -1
- package/dist/migration/to/v3.12.2.d.ts +2 -2
- package/dist/migration/to/v3.12.2.d.ts.map +1 -1
- package/dist/migration/to/v3.12.3.d.ts +2 -2
- package/dist/migration/to/v3.12.3.d.ts.map +1 -1
- package/dist/migration/to/v3.13.0.d.ts +2 -2
- package/dist/migration/to/v3.13.0.d.ts.map +1 -1
- package/dist/migration/to/v3.14.0.d.ts +2 -2
- package/dist/migration/to/v3.14.0.d.ts.map +1 -1
- package/dist/migration/to/v3.15.0.d.ts +2 -2
- package/dist/migration/to/v3.15.0.d.ts.map +1 -1
- package/dist/migration/to/v3.16.0.d.ts +2 -2
- package/dist/migration/to/v3.16.0.d.ts.map +1 -1
- package/dist/migration/to/v3.17.0.d.ts +2 -2
- package/dist/migration/to/v3.17.0.d.ts.map +1 -1
- package/dist/migration/to/v3.17.1.d.ts +2 -2
- package/dist/migration/to/v3.17.1.d.ts.map +1 -1
- package/dist/migration/to/v3.18.0.d.ts +2 -2
- package/dist/migration/to/v3.18.0.d.ts.map +1 -1
- package/dist/migration/to/v3.18.1.d.ts +2 -2
- package/dist/migration/to/v3.18.1.d.ts.map +1 -1
- package/dist/migration/to/v3.18.2.d.ts +2 -2
- package/dist/migration/to/v3.18.2.d.ts.map +1 -1
- package/dist/migration/to/v3.19.0.d.ts +2 -2
- package/dist/migration/to/v3.19.0.d.ts.map +1 -1
- package/dist/migration/to/v3.2.0.d.ts +2 -2
- package/dist/migration/to/v3.2.0.d.ts.map +1 -1
- package/dist/migration/to/v3.20.0.d.ts +2 -2
- package/dist/migration/to/v3.20.0.d.ts.map +1 -1
- package/dist/migration/to/v3.21.0.d.ts +2 -2
- package/dist/migration/to/v3.21.0.d.ts.map +1 -1
- package/dist/migration/to/v3.22.0.d.ts +2 -2
- package/dist/migration/to/v3.22.0.d.ts.map +1 -1
- package/dist/migration/to/v3.23.0.d.ts +2 -2
- package/dist/migration/to/v3.23.0.d.ts.map +1 -1
- package/dist/migration/to/v3.24.0.d.ts +2 -2
- package/dist/migration/to/v3.24.0.d.ts.map +1 -1
- package/dist/migration/to/v3.25.0.d.ts +2 -2
- package/dist/migration/to/v3.25.0.d.ts.map +1 -1
- package/dist/migration/to/v3.26.0.d.ts +2 -2
- package/dist/migration/to/v3.26.0.d.ts.map +1 -1
- package/dist/migration/to/v3.27.0.d.ts +2 -2
- package/dist/migration/to/v3.27.0.d.ts.map +1 -1
- package/dist/migration/to/v3.28.0.d.ts +2 -2
- package/dist/migration/to/v3.28.0.d.ts.map +1 -1
- package/dist/migration/to/v3.29.0.d.ts +2 -2
- package/dist/migration/to/v3.29.0.d.ts.map +1 -1
- package/dist/migration/to/v3.3.0.d.ts +2 -2
- package/dist/migration/to/v3.3.0.d.ts.map +1 -1
- package/dist/migration/to/v3.30.0.d.ts +2 -2
- package/dist/migration/to/v3.30.0.d.ts.map +1 -1
- package/dist/migration/to/v3.31.0.d.ts +2 -2
- package/dist/migration/to/v3.31.0.d.ts.map +1 -1
- package/dist/migration/to/v3.32.0.d.ts +2 -2
- package/dist/migration/to/v3.32.0.d.ts.map +1 -1
- package/dist/migration/to/v3.33.0.d.ts +2 -2
- package/dist/migration/to/v3.33.0.d.ts.map +1 -1
- package/dist/migration/to/v3.34.0.d.ts +4 -4
- package/dist/migration/to/v3.34.0.d.ts.map +1 -1
- package/dist/migration/to/v3.34.0.js +28 -6
- package/dist/migration/to/v3.35.0.d.ts +5 -0
- package/dist/migration/to/v3.35.0.d.ts.map +1 -0
- package/dist/migration/to/v3.35.0.js +18 -0
- package/dist/migration/to/v3.4.0.d.ts +2 -2
- package/dist/migration/to/v3.4.0.d.ts.map +1 -1
- package/dist/migration/to/v3.5.0.d.ts +2 -2
- package/dist/migration/to/v3.5.0.d.ts.map +1 -1
- package/dist/migration/to/v3.5.1.d.ts +2 -2
- package/dist/migration/to/v3.5.1.d.ts.map +1 -1
- package/dist/migration/to/v3.6.0.d.ts +2 -2
- package/dist/migration/to/v3.6.0.d.ts.map +1 -1
- package/dist/migration/to/v3.7.0.d.ts +2 -2
- package/dist/migration/to/v3.7.0.d.ts.map +1 -1
- package/dist/migration/to/v3.8.0.d.ts +2 -2
- package/dist/migration/to/v3.8.0.d.ts.map +1 -1
- package/dist/migration/to/v3.9.0.d.ts +2 -2
- package/dist/migration/to/v3.9.0.d.ts.map +1 -1
- package/dist/migration/types.d.ts +6 -6
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/mocks.d.ts +5 -5
- package/dist/mocks.d.ts.map +1 -1
- package/dist/models/project-schema.d.ts +36 -0
- package/dist/models/project-schema.d.ts.map +1 -0
- package/dist/models/project-schema.js +132 -0
- package/dist/models/query.d.ts +18 -0
- package/dist/models/query.d.ts.map +1 -0
- package/dist/models/query.js +44 -0
- package/dist/models/service.d.ts +13 -0
- package/dist/models/service.d.ts.map +1 -0
- package/dist/models/service.js +34 -0
- package/dist/models/shape.d.ts +42 -0
- package/dist/models/shape.d.ts.map +1 -0
- package/dist/models/shape.js +116 -0
- package/dist/project-schema/index.d.ts +94 -91
- package/dist/project-schema/index.d.ts.map +1 -1
- package/dist/project-schema/index.js +154 -137
- package/dist/project-schema/latest.d.ts +145 -126
- package/dist/project-schema/latest.d.ts.map +1 -1
- package/dist/project-schema/migrate.d.ts +3 -3
- package/dist/project-schema/migrate.d.ts.map +1 -1
- package/dist/project-schema/migrate.js +49 -45
- package/dist/project-schema/v1.0.0.d.ts +13 -13
- package/dist/project-schema/v1.0.0.d.ts.map +1 -1
- package/dist/project-schema/v3.0.0.d.ts +23 -23
- package/dist/project-schema/v3.0.0.d.ts.map +1 -1
- package/dist/project-schema/v3.1.0.d.ts +35 -35
- package/dist/project-schema/v3.1.0.d.ts.map +1 -1
- package/dist/project-schema/v3.10.0.d.ts +104 -104
- package/dist/project-schema/v3.10.0.d.ts.map +1 -1
- package/dist/project-schema/v3.11.0.d.ts +104 -104
- package/dist/project-schema/v3.11.0.d.ts.map +1 -1
- package/dist/project-schema/v3.12.0.d.ts +104 -104
- package/dist/project-schema/v3.12.0.d.ts.map +1 -1
- package/dist/project-schema/v3.12.1.d.ts +110 -110
- package/dist/project-schema/v3.12.1.d.ts.map +1 -1
- package/dist/project-schema/v3.12.2.d.ts +111 -111
- package/dist/project-schema/v3.12.2.d.ts.map +1 -1
- package/dist/project-schema/v3.12.3.d.ts +114 -114
- package/dist/project-schema/v3.12.3.d.ts.map +1 -1
- package/dist/project-schema/v3.13.0.d.ts +115 -115
- package/dist/project-schema/v3.13.0.d.ts.map +1 -1
- package/dist/project-schema/v3.14.0.d.ts +116 -116
- package/dist/project-schema/v3.14.0.d.ts.map +1 -1
- package/dist/project-schema/v3.15.0.d.ts +119 -119
- package/dist/project-schema/v3.15.0.d.ts.map +1 -1
- package/dist/project-schema/v3.16.0.d.ts +119 -119
- package/dist/project-schema/v3.16.0.d.ts.map +1 -1
- package/dist/project-schema/v3.17.0.d.ts +119 -119
- package/dist/project-schema/v3.17.0.d.ts.map +1 -1
- package/dist/project-schema/v3.17.1.d.ts +119 -119
- package/dist/project-schema/v3.17.1.d.ts.map +1 -1
- package/dist/project-schema/v3.18.0.d.ts +117 -117
- package/dist/project-schema/v3.18.0.d.ts.map +1 -1
- package/dist/project-schema/v3.18.1.d.ts +117 -117
- package/dist/project-schema/v3.18.1.d.ts.map +1 -1
- package/dist/project-schema/v3.18.2.d.ts +117 -117
- package/dist/project-schema/v3.18.2.d.ts.map +1 -1
- package/dist/project-schema/v3.19.0.d.ts +117 -117
- package/dist/project-schema/v3.19.0.d.ts.map +1 -1
- package/dist/project-schema/v3.2.0.d.ts +36 -36
- package/dist/project-schema/v3.2.0.d.ts.map +1 -1
- package/dist/project-schema/v3.20.0.d.ts +117 -117
- package/dist/project-schema/v3.20.0.d.ts.map +1 -1
- package/dist/project-schema/v3.21.0.d.ts +117 -117
- package/dist/project-schema/v3.21.0.d.ts.map +1 -1
- package/dist/project-schema/v3.22.0.d.ts +118 -118
- package/dist/project-schema/v3.22.0.d.ts.map +1 -1
- package/dist/project-schema/v3.23.0.d.ts +120 -120
- package/dist/project-schema/v3.23.0.d.ts.map +1 -1
- package/dist/project-schema/v3.24.0.d.ts +120 -120
- package/dist/project-schema/v3.24.0.d.ts.map +1 -1
- package/dist/project-schema/v3.25.0.d.ts +120 -120
- package/dist/project-schema/v3.25.0.d.ts.map +1 -1
- package/dist/project-schema/v3.26.0.d.ts +121 -121
- package/dist/project-schema/v3.26.0.d.ts.map +1 -1
- package/dist/project-schema/v3.27.0.d.ts +122 -122
- package/dist/project-schema/v3.27.0.d.ts.map +1 -1
- package/dist/project-schema/v3.28.0.d.ts +123 -123
- package/dist/project-schema/v3.28.0.d.ts.map +1 -1
- package/dist/project-schema/v3.29.0.d.ts +124 -124
- package/dist/project-schema/v3.29.0.d.ts.map +1 -1
- package/dist/project-schema/v3.3.0.d.ts +36 -36
- package/dist/project-schema/v3.3.0.d.ts.map +1 -1
- package/dist/project-schema/v3.30.0.d.ts +123 -123
- package/dist/project-schema/v3.30.0.d.ts.map +1 -1
- package/dist/project-schema/v3.31.0.d.ts +125 -125
- package/dist/project-schema/v3.31.0.d.ts.map +1 -1
- package/dist/project-schema/v3.32.0.d.ts +124 -124
- package/dist/project-schema/v3.32.0.d.ts.map +1 -1
- package/dist/project-schema/v3.33.0.d.ts +125 -125
- package/dist/project-schema/v3.33.0.d.ts.map +1 -1
- package/dist/project-schema/v3.34.0.d.ts +125 -125
- package/dist/project-schema/v3.34.0.d.ts.map +1 -1
- package/dist/project-schema/v3.35.0.d.ts +1465 -0
- package/dist/project-schema/v3.35.0.d.ts.map +1 -0
- package/dist/project-schema/v3.35.0.js +5 -0
- package/dist/project-schema/v3.4.0.d.ts +36 -36
- package/dist/project-schema/v3.4.0.d.ts.map +1 -1
- package/dist/project-schema/v3.5.0.d.ts +36 -36
- package/dist/project-schema/v3.5.0.d.ts.map +1 -1
- package/dist/project-schema/v3.5.1.d.ts +36 -36
- package/dist/project-schema/v3.5.1.d.ts.map +1 -1
- package/dist/project-schema/v3.6.0.d.ts +37 -37
- package/dist/project-schema/v3.6.0.d.ts.map +1 -1
- package/dist/project-schema/v3.7.0.d.ts +37 -37
- package/dist/project-schema/v3.7.0.d.ts.map +1 -1
- package/dist/project-schema/v3.8.0.d.ts +39 -39
- package/dist/project-schema/v3.8.0.d.ts.map +1 -1
- package/dist/project-schema/v3.9.0.d.ts +39 -39
- package/dist/project-schema/v3.9.0.d.ts.map +1 -1
- package/dist/project-schema/v4.0.0.d.ts +113 -113
- package/dist/project-schema/v4.0.0.d.ts.map +1 -1
- package/dist/refs.d.ts +16 -13
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +21 -0
- package/dist/relationships.d.ts +5 -5
- package/dist/relationships.d.ts.map +1 -1
- package/dist/schema-util.d.ts +46 -40
- package/dist/schema-util.d.ts.map +1 -1
- package/dist/schema-util.js +34 -29
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +6 -4
- package/dist/schemas/index.ts +4 -2
- package/dist/schemas/project-schema/latest.json +42 -7
- package/dist/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
- package/dist/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
- package/dist/schemas/project-schema/v1.0.0.json +1 -1
- package/dist/schemas/project-schema/v3.0.0.json +2 -2
- package/dist/schemas/project-schema/v3.1.0.json +4 -4
- package/dist/schemas/project-schema/v3.10.0.json +5 -5
- package/dist/schemas/project-schema/v3.11.0.json +5 -5
- package/dist/schemas/project-schema/v3.12.0.json +5 -5
- package/dist/schemas/project-schema/v3.12.1.json +5 -5
- package/dist/schemas/project-schema/v3.12.2.json +5 -5
- package/dist/schemas/project-schema/v3.12.3.json +5 -5
- package/dist/schemas/project-schema/v3.13.0.json +5 -5
- package/dist/schemas/project-schema/v3.14.0.json +5 -5
- package/dist/schemas/project-schema/v3.15.0.json +5 -5
- package/dist/schemas/project-schema/v3.16.0.json +5 -5
- package/dist/schemas/project-schema/v3.17.0.json +5 -5
- package/dist/schemas/project-schema/v3.17.1.json +5 -5
- package/dist/schemas/project-schema/v3.18.0.json +5 -5
- package/dist/schemas/project-schema/v3.18.1.json +5 -5
- package/dist/schemas/project-schema/v3.18.2.json +5 -5
- package/dist/schemas/project-schema/v3.19.0.json +5 -5
- package/dist/schemas/project-schema/v3.2.0.json +4 -4
- package/dist/schemas/project-schema/v3.20.0.json +5 -5
- package/dist/schemas/project-schema/v3.21.0.json +5 -5
- package/dist/schemas/project-schema/v3.22.0.json +5 -5
- package/dist/schemas/project-schema/v3.23.0.json +5 -5
- package/dist/schemas/project-schema/v3.24.0.json +5 -5
- package/dist/schemas/project-schema/v3.25.0.json +5 -5
- package/dist/schemas/project-schema/v3.26.0.json +6 -6
- package/dist/schemas/project-schema/v3.27.0.json +6 -6
- package/dist/schemas/project-schema/v3.28.0.json +5 -5
- package/dist/schemas/project-schema/v3.29.0.json +5 -5
- package/dist/schemas/project-schema/v3.3.0.json +4 -4
- package/dist/schemas/project-schema/v3.30.0.json +5 -5
- package/dist/schemas/project-schema/v3.31.0.json +6 -6
- package/dist/schemas/project-schema/v3.32.0.json +6 -6
- package/dist/schemas/project-schema/v3.33.0.json +6 -6
- package/dist/schemas/project-schema/v3.34.0.json +5 -5
- package/dist/schemas/project-schema/v3.35.0.json +3123 -0
- package/dist/schemas/project-schema/v3.4.0.json +4 -4
- package/dist/schemas/project-schema/v3.5.0.json +4 -4
- package/dist/schemas/project-schema/v3.5.1.json +4 -4
- package/dist/schemas/project-schema/v3.6.0.json +4 -4
- package/dist/schemas/project-schema/v3.7.0.json +4 -4
- package/dist/schemas/project-schema/v3.8.0.json +4 -4
- package/dist/schemas/project-schema/v3.9.0.json +4 -4
- package/dist/schemas/project-schema/v4.0.0.json +5 -5
- package/dist/schemas/project-schema.json +3 -0
- package/dist/services.d.ts +12 -12
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +3 -3
- package/dist/taxonomies.d.ts +4 -4
- package/dist/taxonomies.d.ts.map +1 -1
- package/dist/template-shapes/index.d.ts +2 -2
- package/dist/template-shapes/index.d.ts.map +1 -1
- package/dist/template-shapes/templates.d.ts +21 -21
- package/dist/template-shapes/templates.d.ts.map +1 -1
- package/dist/template-shapes/types.d.ts +3 -3
- package/dist/template-shapes/types.d.ts.map +1 -1
- package/dist/template-shapes/where.d.ts +6 -6
- package/dist/template-shapes/where.d.ts.map +1 -1
- package/dist/types/types.d.ts +10 -9
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +5 -4
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/utils.js +5 -0
- package/dist/unions.d.ts +8 -8
- package/dist/unions.d.ts.map +1 -1
- package/dist/util/api-indexing.d.ts +4 -4
- package/dist/util/api-indexing.d.ts.map +1 -1
- package/dist/util/detect-cycles.d.ts +3 -3
- package/dist/util/detect-cycles.d.ts.map +1 -1
- package/dist/util/find-shape-at-path.d.ts +3 -3
- package/dist/util/find-shape-at-path.d.ts.map +1 -1
- package/dist/util/form-config.d.ts +3 -3
- package/dist/util/form-config.d.ts.map +1 -1
- package/dist/util/get-conflicting-properties.d.ts +2 -2
- package/dist/util/get-conflicting-properties.d.ts.map +1 -1
- package/dist/util/get-return-shape.d.ts +4 -2
- package/dist/util/get-return-shape.d.ts.map +1 -1
- package/dist/util/get-return-shape.js +5 -0
- package/dist/util/has-arg.d.ts +2 -2
- package/dist/util/has-arg.d.ts.map +1 -1
- package/dist/util/merge.d.ts +3 -3
- package/dist/util/merge.d.ts.map +1 -1
- package/dist/util/patch-schema.d.ts +2 -2
- package/dist/util/patch-schema.d.ts.map +1 -1
- package/dist/validate.d.ts +3 -3
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +84 -5
- package/dist/workflows.d.ts +3 -3
- package/dist/workflows.d.ts.map +1 -1
- package/es/migration/index.js +3 -1
- package/es/migration/to/utils/v3.34.0-utils.js +0 -0
- package/es/migration/to/v3.34.0.js +28 -7
- package/es/migration/to/v3.35.0.js +10 -0
- package/es/models/project-schema.js +116 -0
- package/es/models/query.js +35 -0
- package/es/models/service.js +25 -0
- package/es/models/shape.js +105 -0
- package/es/project-schema/index.js +47 -45
- package/es/project-schema/migrate.js +50 -46
- package/es/project-schema/v3.35.0.js +1 -0
- package/es/refs.js +15 -0
- package/es/schema-util.js +32 -29
- package/es/schemas/index.js +4 -3
- package/es/schemas/index.ts +4 -2
- package/es/schemas/project-schema/latest.json +42 -7
- package/es/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
- package/es/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
- package/es/schemas/project-schema/v1.0.0.json +1 -1
- package/es/schemas/project-schema/v3.0.0.json +2 -2
- package/es/schemas/project-schema/v3.1.0.json +4 -4
- package/es/schemas/project-schema/v3.10.0.json +5 -5
- package/es/schemas/project-schema/v3.11.0.json +5 -5
- package/es/schemas/project-schema/v3.12.0.json +5 -5
- package/es/schemas/project-schema/v3.12.1.json +5 -5
- package/es/schemas/project-schema/v3.12.2.json +5 -5
- package/es/schemas/project-schema/v3.12.3.json +5 -5
- package/es/schemas/project-schema/v3.13.0.json +5 -5
- package/es/schemas/project-schema/v3.14.0.json +5 -5
- package/es/schemas/project-schema/v3.15.0.json +5 -5
- package/es/schemas/project-schema/v3.16.0.json +5 -5
- package/es/schemas/project-schema/v3.17.0.json +5 -5
- package/es/schemas/project-schema/v3.17.1.json +5 -5
- package/es/schemas/project-schema/v3.18.0.json +5 -5
- package/es/schemas/project-schema/v3.18.1.json +5 -5
- package/es/schemas/project-schema/v3.18.2.json +5 -5
- package/es/schemas/project-schema/v3.19.0.json +5 -5
- package/es/schemas/project-schema/v3.2.0.json +4 -4
- package/es/schemas/project-schema/v3.20.0.json +5 -5
- package/es/schemas/project-schema/v3.21.0.json +5 -5
- package/es/schemas/project-schema/v3.22.0.json +5 -5
- package/es/schemas/project-schema/v3.23.0.json +5 -5
- package/es/schemas/project-schema/v3.24.0.json +5 -5
- package/es/schemas/project-schema/v3.25.0.json +5 -5
- package/es/schemas/project-schema/v3.26.0.json +6 -6
- package/es/schemas/project-schema/v3.27.0.json +6 -6
- package/es/schemas/project-schema/v3.28.0.json +5 -5
- package/es/schemas/project-schema/v3.29.0.json +5 -5
- package/es/schemas/project-schema/v3.3.0.json +4 -4
- package/es/schemas/project-schema/v3.30.0.json +5 -5
- package/es/schemas/project-schema/v3.31.0.json +6 -6
- package/es/schemas/project-schema/v3.32.0.json +6 -6
- package/es/schemas/project-schema/v3.33.0.json +6 -6
- package/es/schemas/project-schema/v3.34.0.json +5 -5
- package/es/schemas/project-schema/v3.35.0.json +3123 -0
- package/es/schemas/project-schema/v3.4.0.json +4 -4
- package/es/schemas/project-schema/v3.5.0.json +4 -4
- package/es/schemas/project-schema/v3.5.1.json +4 -4
- package/es/schemas/project-schema/v3.6.0.json +4 -4
- package/es/schemas/project-schema/v3.7.0.json +4 -4
- package/es/schemas/project-schema/v3.8.0.json +4 -4
- package/es/schemas/project-schema/v3.9.0.json +4 -4
- package/es/schemas/project-schema/v4.0.0.json +5 -5
- package/es/schemas/project-schema.json +3 -0
- package/es/services.js +3 -3
- package/es/types/utils.js +3 -0
- package/es/util/get-return-shape.js +3 -0
- package/es/validate.js +85 -6
- package/examples/latest/betzino.json +1 -1
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +1 -1
- package/examples/latest/complex-project-schema.json +1 -1
- package/examples/latest/complex-schema.json +1 -1
- package/examples/latest/fabric-ecommerce.json +1 -1
- package/examples/latest/frank-and-fred-schema.json +1 -1
- package/examples/latest/klirr-schema.json +1 -1
- package/examples/latest/massive-schema.json +1 -1
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/one-earth.json +1 -1
- package/examples/latest/pet-oneof-array.json +1 -1
- package/examples/latest/post-schema.json +1 -1
- package/examples/latest/pruned-shopify-product-schema.json +1 -1
- package/examples/latest/real-world-schema.json +1 -1
- package/examples/latest/recursive-repeater-schema.json +1 -1
- package/examples/latest/recursive-schema.json +1 -1
- package/examples/latest/rick-and-morty-ast.json +1 -1
- package/examples/latest/rick-and-morty-graphql.json +1 -1
- package/examples/latest/rick-and-morty-rest.json +1 -1
- package/examples/latest/schema-with-repeater-draftjs.json +1 -1
- package/examples/latest/shape-books-v3_2_0.json +1 -1
- package/examples/latest/shape-books.json +1 -1
- package/examples/latest/shape-editor-schema-edited.json +2 -2
- package/examples/latest/shape-editor-schema-initial.json +1 -1
- package/examples/latest/shopify-lookbook.json +1 -1
- package/examples/latest/shopify-product-2022-07.json +1 -1
- package/examples/latest/shopify-product-2023-04.json +1 -1
- package/examples/latest/shopify-store-with-widget.json +1 -1
- package/examples/latest/stripe-product-runtime-schema.json +1 -1
- package/examples/latest/stripe-starter-resolved.json +1 -1
- package/examples/latest/user-schema-no-required.json +1 -1
- package/examples/latest/user-schema-with-defaults.json +1 -1
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.4.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"additionalProperties": false
|
|
318
318
|
},
|
|
319
319
|
"storedServiceConfig": {
|
|
320
|
-
"title": "
|
|
320
|
+
"title": "Service Config JSON",
|
|
321
321
|
"type": "object",
|
|
322
322
|
"properties": {
|
|
323
323
|
"id": {
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
]
|
|
370
370
|
},
|
|
371
371
|
"storedServiceMap": {
|
|
372
|
-
"title": "
|
|
372
|
+
"title": "Service Map JSON",
|
|
373
373
|
"type": "object",
|
|
374
374
|
"patternProperties": {
|
|
375
375
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.5.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"additionalProperties": false
|
|
318
318
|
},
|
|
319
319
|
"storedServiceConfig": {
|
|
320
|
-
"title": "
|
|
320
|
+
"title": "Service Config JSON",
|
|
321
321
|
"type": "object",
|
|
322
322
|
"properties": {
|
|
323
323
|
"id": {
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
]
|
|
370
370
|
},
|
|
371
371
|
"storedServiceMap": {
|
|
372
|
-
"title": "
|
|
372
|
+
"title": "Service Map JSON",
|
|
373
373
|
"type": "object",
|
|
374
374
|
"patternProperties": {
|
|
375
375
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.5.1#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"additionalProperties": false
|
|
318
318
|
},
|
|
319
319
|
"storedServiceConfig": {
|
|
320
|
-
"title": "
|
|
320
|
+
"title": "Service Config JSON",
|
|
321
321
|
"type": "object",
|
|
322
322
|
"properties": {
|
|
323
323
|
"id": {
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
]
|
|
370
370
|
},
|
|
371
371
|
"storedServiceMap": {
|
|
372
|
-
"title": "
|
|
372
|
+
"title": "Service Map JSON",
|
|
373
373
|
"type": "object",
|
|
374
374
|
"patternProperties": {
|
|
375
375
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.6.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
"additionalProperties": false
|
|
334
334
|
},
|
|
335
335
|
"storedServiceConfig": {
|
|
336
|
-
"title": "
|
|
336
|
+
"title": "Service Config JSON",
|
|
337
337
|
"type": "object",
|
|
338
338
|
"properties": {
|
|
339
339
|
"id": {
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
]
|
|
386
386
|
},
|
|
387
387
|
"storedServiceMap": {
|
|
388
|
-
"title": "
|
|
388
|
+
"title": "Service Map JSON",
|
|
389
389
|
"type": "object",
|
|
390
390
|
"patternProperties": {
|
|
391
391
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.7.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
"additionalProperties": false
|
|
334
334
|
},
|
|
335
335
|
"storedServiceConfig": {
|
|
336
|
-
"title": "
|
|
336
|
+
"title": "Service Config JSON",
|
|
337
337
|
"type": "object",
|
|
338
338
|
"properties": {
|
|
339
339
|
"id": {
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
]
|
|
386
386
|
},
|
|
387
387
|
"storedServiceMap": {
|
|
388
|
-
"title": "
|
|
388
|
+
"title": "Service Map JSON",
|
|
389
389
|
"type": "object",
|
|
390
390
|
"patternProperties": {
|
|
391
391
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.8.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"additionalProperties": false
|
|
347
347
|
},
|
|
348
348
|
"storedServiceConfig": {
|
|
349
|
-
"title": "
|
|
349
|
+
"title": "Service Config JSON",
|
|
350
350
|
"type": "object",
|
|
351
351
|
"properties": {
|
|
352
352
|
"id": {
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
]
|
|
399
399
|
},
|
|
400
400
|
"storedServiceMap": {
|
|
401
|
-
"title": "
|
|
401
|
+
"title": "Service Map JSON",
|
|
402
402
|
"type": "object",
|
|
403
403
|
"patternProperties": {
|
|
404
404
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schema.takeshape.io/project-schema/v3.9.0#",
|
|
4
|
-
"title": "Project Schema",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"shape": {
|
|
7
|
-
"title": "Shape",
|
|
7
|
+
"title": "Shape JSON",
|
|
8
8
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"additionalProperties": false
|
|
347
347
|
},
|
|
348
348
|
"storedServiceConfig": {
|
|
349
|
-
"title": "
|
|
349
|
+
"title": "Service Config JSON",
|
|
350
350
|
"type": "object",
|
|
351
351
|
"properties": {
|
|
352
352
|
"id": {
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
]
|
|
399
399
|
},
|
|
400
400
|
"storedServiceMap": {
|
|
401
|
-
"title": "
|
|
401
|
+
"title": "Service Map JSON",
|
|
402
402
|
"type": "object",
|
|
403
403
|
"patternProperties": {
|
|
404
404
|
"[0-9A-Za-z_-]+": {
|
|
@@ -1284,7 +1284,7 @@
|
|
|
1284
1284
|
"oneOf": [{"$ref": "#/definitions/basicResolver"}, {"$ref": "#/definitions/composeResolver"}]
|
|
1285
1285
|
},
|
|
1286
1286
|
"query": {
|
|
1287
|
-
"title": "Query",
|
|
1287
|
+
"title": "Query JSON",
|
|
1288
1288
|
"type": "object",
|
|
1289
1289
|
"properties": {
|
|
1290
1290
|
"args": {
|
|
@@ -1457,7 +1457,7 @@
|
|
|
1457
1457
|
"additionalProperties": false
|
|
1458
1458
|
},
|
|
1459
1459
|
"shape": {
|
|
1460
|
-
"title": "Shape",
|
|
1460
|
+
"title": "Shape JSON",
|
|
1461
1461
|
"description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
|
|
1462
1462
|
"type": "object",
|
|
1463
1463
|
"properties": {
|
|
@@ -1800,7 +1800,7 @@
|
|
|
1800
1800
|
"additionalProperties": false
|
|
1801
1801
|
},
|
|
1802
1802
|
"storedServiceConfig": {
|
|
1803
|
-
"title": "
|
|
1803
|
+
"title": "Service Config JSON",
|
|
1804
1804
|
"type": "object",
|
|
1805
1805
|
"properties": {
|
|
1806
1806
|
"title": {
|
|
@@ -1848,7 +1848,7 @@
|
|
|
1848
1848
|
]
|
|
1849
1849
|
},
|
|
1850
1850
|
"storedServiceMap": {
|
|
1851
|
-
"title": "
|
|
1851
|
+
"title": "Service Map JSON",
|
|
1852
1852
|
"type": "object",
|
|
1853
1853
|
"patternProperties": {
|
|
1854
1854
|
"[0-9A-Za-z_-]+": {
|
|
@@ -2227,7 +2227,7 @@
|
|
|
2227
2227
|
]
|
|
2228
2228
|
}
|
|
2229
2229
|
},
|
|
2230
|
-
"title": "Project Schema",
|
|
2230
|
+
"title": "Project Schema JSON",
|
|
2231
2231
|
"type": "object",
|
|
2232
2232
|
"properties": {
|
|
2233
2233
|
"$schema": {
|
package/es/services.js
CHANGED
|
@@ -34,12 +34,12 @@ export function decryptServiceConfig(decryptFn, storedServiceConfig) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Given a `
|
|
37
|
+
* Given a `ServiceMapJSON` returns a usable `ServiceMap` with all the
|
|
38
38
|
* authentication objects decrypted.
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
export async function decryptServiceMap(decryptFn,
|
|
42
|
-
return Object.entries(
|
|
41
|
+
export async function decryptServiceMap(decryptFn, ServiceMapJSON) {
|
|
42
|
+
return Object.entries(ServiceMapJSON).reduce((result, [serviceKey, serviceConfig]) => {
|
|
43
43
|
return result.set(serviceKey, decryptServiceConfig(decryptFn, serviceConfig));
|
|
44
44
|
}, new Map());
|
|
45
45
|
}
|
package/es/types/utils.js
CHANGED
|
@@ -23,6 +23,9 @@ function getReturnShapeHelper(projectSchema, propOrQuery) {
|
|
|
23
23
|
return shape;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export function getReturnShapeRef(context, propOrQuery) {
|
|
27
|
+
return isQuery(propOrQuery) ? parseReturnShape(context, propOrQuery.shape).ref : getRef(context, propOrQuery);
|
|
28
|
+
}
|
|
26
29
|
const cache = new WeakMap();
|
|
27
30
|
export function getReturnShape(projectSchema, propOrQuery) {
|
|
28
31
|
let result = cache.get(propOrQuery);
|
package/es/validate.js
CHANGED
|
@@ -16,7 +16,7 @@ import { getAllRefs } from './schema-util';
|
|
|
16
16
|
import { builtInShapes } from './builtin-schema';
|
|
17
17
|
import { isValidTemplate } from './template-shapes';
|
|
18
18
|
import { isBasicResolver, isComposeResolver, isExtendsSchema, isObjectSchema } from './types/utils';
|
|
19
|
-
import { refItemToShapeName, getRefShapeName, parsePropertyRef, propertyRefItemToResolverPath, createGetNamespace, propertyRefItemToPath } from './refs';
|
|
19
|
+
import { refItemToShapeName, getRefShapeName, parsePropertyRef, propertyRefItemToResolverPath, createGetNamespace, propertyRefItemToPath, atRefToRefItem, refItemToShape } from './refs';
|
|
20
20
|
import { scalars } from './scalars';
|
|
21
21
|
import { isUnionSchema } from './unions';
|
|
22
22
|
import { isEnumLikeSchema } from './enum';
|
|
@@ -438,6 +438,78 @@ async function validateQueryConfigs(context, projectSchema) {
|
|
|
438
438
|
return flatten(await Promise.all(promises));
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
function listShapeJoins(projectSchema) {
|
|
442
|
+
const joins = [];
|
|
443
|
+
|
|
444
|
+
for (const shapeKey of Object.keys(projectSchema.shapes)) {
|
|
445
|
+
const shape = projectSchema.shapes[shapeKey];
|
|
446
|
+
|
|
447
|
+
if ('joins' in shape) {
|
|
448
|
+
for (const joinRef of Object.keys(shape.joins)) {
|
|
449
|
+
const join = shape.joins[joinRef];
|
|
450
|
+
joins.push({
|
|
451
|
+
ref: joinRef,
|
|
452
|
+
path: ['shapes', shapeKey, 'joins', joinRef],
|
|
453
|
+
join
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return joins;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function validateLocalShapeJoinRef(projectSchema, item) {
|
|
463
|
+
const refItem = atRefToRefItem(projectSchema, item.ref);
|
|
464
|
+
|
|
465
|
+
if (refItem.serviceKey === 'local') {
|
|
466
|
+
const shape = refItemToShape(projectSchema, refItem);
|
|
467
|
+
|
|
468
|
+
if (!shape) {
|
|
469
|
+
return [{
|
|
470
|
+
type: 'notFound',
|
|
471
|
+
path: item.path,
|
|
472
|
+
message: `Invalid join "${item.ref}" not found`
|
|
473
|
+
}];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return [];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
function validateLocalShapeJoins(projectSchema) {
|
|
481
|
+
return listShapeJoins(projectSchema).flatMap(item => validateLocalShapeJoinRef(projectSchema, item).concat(validateResolver(projectSchema, item.path.concat('resolver'), item.join.resolver)));
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
async function validateShapeJoinRef(context, projectSchema, item) {
|
|
485
|
+
const refItem = atRefToRefItem(projectSchema, item.ref);
|
|
486
|
+
|
|
487
|
+
if (refItem) {
|
|
488
|
+
const layer = await context.resolveLayer(refItem.serviceKey);
|
|
489
|
+
const valid = isValidRef(context, projectSchema, layer, refItem);
|
|
490
|
+
|
|
491
|
+
if (!valid) {
|
|
492
|
+
return [{
|
|
493
|
+
type: 'notFound',
|
|
494
|
+
path: item.path,
|
|
495
|
+
message: `Invalid join "${item.ref}" not found`
|
|
496
|
+
}];
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
return [];
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
async function validateShapeJoins(context, projectSchema) {
|
|
504
|
+
const promises = [];
|
|
505
|
+
|
|
506
|
+
for (const item of listShapeJoins(projectSchema)) {
|
|
507
|
+
promises.push(validateShapeJoinRef(context, projectSchema, item), validateResolverReferences(context, projectSchema, item.path, item.join.resolver));
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return flatten(await Promise.all(promises));
|
|
511
|
+
}
|
|
512
|
+
|
|
441
513
|
function validateIndexedShapeConfig(projectSchema, shapeName, config) {
|
|
442
514
|
var _config$queries;
|
|
443
515
|
|
|
@@ -633,6 +705,15 @@ function validateLocalRefs(projectSchema) {
|
|
|
633
705
|
return errors;
|
|
634
706
|
}
|
|
635
707
|
|
|
708
|
+
function isValidRef(context, projectSchema, layer, item) {
|
|
709
|
+
const {
|
|
710
|
+
serviceKey: layerId
|
|
711
|
+
} = item;
|
|
712
|
+
const shapeName = refItemToShapeName(item);
|
|
713
|
+
const localShapeExists = Boolean(projectSchema.shapes[shapeName]) || builtInShapeNames.has(shapeName);
|
|
714
|
+
return layerId === 'local' ? localShapeExists : localShapeExists || isValidShapeReference(context, layer, shapeName);
|
|
715
|
+
}
|
|
716
|
+
|
|
636
717
|
async function validateRefs(context, projectSchema) {
|
|
637
718
|
const {
|
|
638
719
|
resolveLayer
|
|
@@ -661,9 +742,7 @@ async function validateRefs(context, projectSchema) {
|
|
|
661
742
|
const {
|
|
662
743
|
serviceKey: layerId
|
|
663
744
|
} = item;
|
|
664
|
-
const
|
|
665
|
-
const localShapeExists = Boolean(projectSchema.shapes[shapeName]) || builtInShapeNames.has(shapeName);
|
|
666
|
-
const valid = layerId === 'local' ? localShapeExists : localShapeExists || isValidShapeReference(context, layersById[layerId], shapeName);
|
|
745
|
+
const valid = isValidRef(context, projectSchema, layersById[layerId], item);
|
|
667
746
|
|
|
668
747
|
if (!valid) {
|
|
669
748
|
errors.push({
|
|
@@ -1022,13 +1101,13 @@ const validators = [{
|
|
|
1022
1101
|
validateSyntax(schemaVersion, context, obj) {
|
|
1023
1102
|
const schema = obj;
|
|
1024
1103
|
let errors = [];
|
|
1025
|
-
errors = errors.concat(checkShapeNames(schema.shapes)).concat(checkShapeIds(schema.shapes)).concat(validateWorkflowsV3(schema)).concat(validateLocalQueryConfigs(schema)).concat(validateLocalRefs(schema)).concat(validateDirectives(schema)).concat(validateLocales(schema)).concat(checkWorkflowStepNames(schema.workflows)).concat(checkWorkflowStepKeys(schema.workflows)).concat(validateOneOfs(schema)).concat(validateIndexedShapes(schema)).concat(validateInterfaces(schema)).concat(validateInterfaceImplementations(schema));
|
|
1104
|
+
errors = errors.concat(checkShapeNames(schema.shapes)).concat(checkShapeIds(schema.shapes)).concat(validateWorkflowsV3(schema)).concat(validateLocalQueryConfigs(schema)).concat(validateLocalRefs(schema)).concat(validateLocalShapeJoins(schema)).concat(validateDirectives(schema)).concat(validateLocales(schema)).concat(checkWorkflowStepNames(schema.workflows)).concat(checkWorkflowStepKeys(schema.workflows)).concat(validateOneOfs(schema)).concat(validateIndexedShapes(schema)).concat(validateInterfaces(schema)).concat(validateInterfaceImplementations(schema));
|
|
1026
1105
|
return formatValidationResult(context, errors, schema);
|
|
1027
1106
|
},
|
|
1028
1107
|
|
|
1029
1108
|
async validateReferences(schemaVersion, context, obj) {
|
|
1030
1109
|
const schema = obj;
|
|
1031
|
-
const errors = flatten(await Promise.all([validateRefs(context, schema), validateQueryConfigs(context, schema)]));
|
|
1110
|
+
const errors = flatten(await Promise.all([validateRefs(context, schema), validateQueryConfigs(context, schema), validateShapeJoins(context, schema)]));
|
|
1032
1111
|
return formatValidationResult(context, errors, schema);
|
|
1033
1112
|
}
|
|
1034
1113
|
|
|
@@ -52781,6 +52781,6 @@
|
|
|
52781
52781
|
}
|
|
52782
52782
|
}
|
|
52783
52783
|
},
|
|
52784
|
-
"schemaVersion": "3.
|
|
52784
|
+
"schemaVersion": "3.35.0",
|
|
52785
52785
|
"services": {}
|
|
52786
52786
|
}
|
|
@@ -10474,5 +10474,5 @@
|
|
|
10474
10474
|
}
|
|
10475
10475
|
}
|
|
10476
10476
|
},
|
|
10477
|
-
"schemaVersion": "3.
|
|
10477
|
+
"schemaVersion": "3.35.0"
|
|
10478
10478
|
}
|
|
@@ -23446,6 +23446,6 @@
|
|
|
23446
23446
|
}
|
|
23447
23447
|
}
|
|
23448
23448
|
},
|
|
23449
|
-
"schemaVersion": "3.
|
|
23449
|
+
"schemaVersion": "3.35.0",
|
|
23450
23450
|
"services": {}
|
|
23451
23451
|
}
|
|
@@ -35163,6 +35163,6 @@
|
|
|
35163
35163
|
}
|
|
35164
35164
|
}
|
|
35165
35165
|
},
|
|
35166
|
-
"schemaVersion": "3.
|
|
35166
|
+
"schemaVersion": "3.35.0",
|
|
35167
35167
|
"services": {}
|
|
35168
35168
|
}
|
|
@@ -14766,6 +14766,6 @@
|
|
|
14766
14766
|
}
|
|
14767
14767
|
}
|
|
14768
14768
|
},
|
|
14769
|
-
"schemaVersion": "3.
|
|
14769
|
+
"schemaVersion": "3.35.0",
|
|
14770
14770
|
"services": {}
|
|
14771
14771
|
}
|