@takeshape/schema 9.46.0 → 9.48.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 -41
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +7 -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 +7 -0
- package/dist/migration/to/v3.34.0.d.ts.map +1 -0
- package/dist/migration/to/v3.34.0.js +183 -0
- 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 +95 -89
- package/dist/project-schema/index.d.ts.map +1 -1
- package/dist/project-schema/index.js +168 -134
- 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 +52 -44
- 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 +1446 -0
- package/dist/project-schema/v3.34.0.d.ts.map +1 -0
- package/dist/project-schema/v3.34.0.js +5 -0
- 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 +8 -4
- package/dist/schemas/index.ts +6 -2
- package/dist/schemas/project-schema/latest.json +43 -8
- 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 +3088 -0
- 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 +6 -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 +5 -1
- package/es/migration/to/utils/v3.34.0-utils.js +0 -0
- package/es/migration/to/v3.34.0.js +161 -0
- 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 +48 -44
- package/es/project-schema/migrate.js +53 -45
- package/es/project-schema/v3.34.0.js +1 -0
- 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 +5 -3
- package/es/schemas/index.ts +6 -2
- package/es/schemas/project-schema/latest.json +43 -8
- 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 +3088 -0
- 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 +6 -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 +2012 -1756
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +31 -26
- package/examples/latest/complex-project-schema.json +645 -480
- package/examples/latest/complex-schema.json +866 -671
- package/examples/latest/fabric-ecommerce.json +7 -38
- package/examples/latest/frank-and-fred-schema.json +866 -671
- package/examples/latest/klirr-schema.json +1641 -1264
- package/examples/latest/massive-schema.json +897 -681
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/one-earth.json +3012 -2462
- 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 +19 -14
- 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 +39 -226
- package/examples/latest/rick-and-morty-graphql.json +35 -222
- 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 +19 -14
- package/examples/latest/shape-books.json +19 -14
- package/examples/latest/shape-editor-schema-edited.json +1 -1
- package/examples/latest/shape-editor-schema-initial.json +2 -2
- package/examples/latest/shopify-lookbook.json +9 -39
- package/examples/latest/shopify-product-2022-07.json +21 -213
- package/examples/latest/shopify-product-2023-04.json +21 -213
- package/examples/latest/shopify-store-with-widget.json +97 -360
- package/examples/latest/stripe-product-runtime-schema.json +21 -213
- package/examples/latest/stripe-starter-resolved.json +21 -213
- 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
|
@@ -42,6 +42,8 @@ export * from './v3.30.0';
|
|
|
42
42
|
export * from './v3.31.0';
|
|
43
43
|
export * from './v3.32.0';
|
|
44
44
|
export * from './v3.33.0';
|
|
45
|
+
export * from './v3.34.0';
|
|
46
|
+
export * from './v3.35.0';
|
|
45
47
|
export * from './v4.0.0';
|
|
46
48
|
|
|
47
49
|
// Schema type utilities
|
|
@@ -63,47 +65,49 @@ function createVersionPredicate(expectedVersion) {
|
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
79
|
-
export const
|
|
80
|
-
export const
|
|
81
|
-
export const
|
|
82
|
-
export const
|
|
83
|
-
export const
|
|
84
|
-
export const
|
|
85
|
-
export const
|
|
86
|
-
export const
|
|
87
|
-
export const
|
|
88
|
-
export const
|
|
89
|
-
export const
|
|
90
|
-
export const
|
|
91
|
-
export const
|
|
92
|
-
export const
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
95
|
-
export const
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
98
|
-
export const
|
|
99
|
-
export const
|
|
100
|
-
export const
|
|
101
|
-
export const
|
|
102
|
-
export const
|
|
103
|
-
export const
|
|
104
|
-
export const
|
|
105
|
-
export const
|
|
106
|
-
export const
|
|
107
|
-
export const
|
|
108
|
-
export const
|
|
109
|
-
export const
|
|
68
|
+
export const isProjectSchemaJSONV1_0_0 = createVersionPredicate('1.0.0');
|
|
69
|
+
export const isProjectSchemaJSONV3_0_0 = createVersionPredicate('3.0.0');
|
|
70
|
+
export const isProjectSchemaJSONV3_1_0 = createVersionPredicate('3.1.0');
|
|
71
|
+
export const isProjectSchemaJSONV3_2_0 = createVersionPredicate('3.2.0');
|
|
72
|
+
export const isProjectSchemaJSONV3_3_0 = createVersionPredicate('3.3.0');
|
|
73
|
+
export const isProjectSchemaJSONV3_4_0 = createVersionPredicate('3.4.0');
|
|
74
|
+
export const isProjectSchemaJSONV3_5_0 = createVersionPredicate('3.5.0');
|
|
75
|
+
export const isProjectSchemaJSONV3_5_1 = createVersionPredicate('3.5.1');
|
|
76
|
+
export const isProjectSchemaJSONV3_6_0 = createVersionPredicate('3.6.0');
|
|
77
|
+
export const isProjectSchemaJSONV3_7_0 = createVersionPredicate('3.7.0');
|
|
78
|
+
export const isProjectSchemaJSONV3_8_0 = createVersionPredicate('3.8.0');
|
|
79
|
+
export const isProjectSchemaJSONV3_9_0 = createVersionPredicate('3.9.0');
|
|
80
|
+
export const isProjectSchemaJSONV3_10_0 = createVersionPredicate('3.10.0');
|
|
81
|
+
export const isProjectSchemaJSONV3_11_0 = createVersionPredicate('3.11.0');
|
|
82
|
+
export const isProjectSchemaJSONV3_12_0 = createVersionPredicate('3.12.0');
|
|
83
|
+
export const isProjectSchemaJSONV3_12_1 = createVersionPredicate('3.12.1');
|
|
84
|
+
export const isProjectSchemaJSONV3_12_2 = createVersionPredicate('3.12.2');
|
|
85
|
+
export const isProjectSchemaJSONV3_12_3 = createVersionPredicate('3.12.3');
|
|
86
|
+
export const isProjectSchemaJSONV3_13_0 = createVersionPredicate('3.13.0');
|
|
87
|
+
export const isProjectSchemaJSONV3_14_0 = createVersionPredicate('3.14.0');
|
|
88
|
+
export const isProjectSchemaJSONV3_15_0 = createVersionPredicate('3.15.0');
|
|
89
|
+
export const isProjectSchemaJSONV3_16_0 = createVersionPredicate('3.16.0');
|
|
90
|
+
export const isProjectSchemaJSONV3_17_0 = createVersionPredicate('3.17.0');
|
|
91
|
+
export const isProjectSchemaJSONV3_17_1 = createVersionPredicate('3.17.1');
|
|
92
|
+
export const isProjectSchemaJSONV3_18_0 = createVersionPredicate('3.18.0');
|
|
93
|
+
export const isProjectSchemaJSONV3_18_1 = createVersionPredicate('3.18.1');
|
|
94
|
+
export const isProjectSchemaJSONV3_18_2 = createVersionPredicate('3.18.2');
|
|
95
|
+
export const isProjectSchemaJSONV3_19_0 = createVersionPredicate('3.19.0');
|
|
96
|
+
export const isProjectSchemaJSONV3_20_0 = createVersionPredicate('3.20.0');
|
|
97
|
+
export const isProjectSchemaJSONV3_21_0 = createVersionPredicate('3.21.0');
|
|
98
|
+
export const isProjectSchemaJSONV3_22_0 = createVersionPredicate('3.22.0');
|
|
99
|
+
export const isProjectSchemaJSONV3_23_0 = createVersionPredicate('3.23.0');
|
|
100
|
+
export const isProjectSchemaJSONV3_24_0 = createVersionPredicate('3.24.0');
|
|
101
|
+
export const isProjectSchemaJSONV3_25_0 = createVersionPredicate('3.25.0');
|
|
102
|
+
export const isProjectSchemaJSONV3_26_0 = createVersionPredicate('3.26.0');
|
|
103
|
+
export const isProjectSchemaJSONV3_27_0 = createVersionPredicate('3.27.0');
|
|
104
|
+
export const isProjectSchemaJSONV3_28_0 = createVersionPredicate('3.28.0');
|
|
105
|
+
export const isProjectSchemaJSONV3_29_0 = createVersionPredicate('3.29.0');
|
|
106
|
+
export const isProjectSchemaJSONV3_30_0 = createVersionPredicate('3.30.0');
|
|
107
|
+
export const isProjectSchemaJSONV3_31_0 = createVersionPredicate('3.31.0');
|
|
108
|
+
export const isProjectSchemaJSONV3_32_0 = createVersionPredicate('3.32.0');
|
|
109
|
+
export const isProjectSchemaJSONV3_33_0 = createVersionPredicate('3.33.0');
|
|
110
|
+
export const isProjectSchemaJSONV3_34_0 = createVersionPredicate('3.34.0');
|
|
111
|
+
export const isProjectSchemaJSONV3_35_0 = createVersionPredicate('3.35.0');
|
|
112
|
+
export const isLatestProjectSchemaJSON = createVersionPredicate('3.35.0');
|
|
113
|
+
export const isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
|
|
@@ -1,184 +1,192 @@
|
|
|
1
1
|
// This file is generated by "pnpm json2ts"
|
|
2
2
|
import { migrateTo } from '../migration';
|
|
3
|
-
import {
|
|
3
|
+
import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from './index'; // eslint-disable-next-line complexity
|
|
4
4
|
|
|
5
5
|
export async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
6
|
-
if (
|
|
6
|
+
if (isLatestProjectSchemaJSON(projectSchema)) {
|
|
7
7
|
return projectSchema;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
if (
|
|
10
|
+
if (isProjectSchemaJSONV1_0_0(projectSchema)) {
|
|
11
11
|
projectSchema = await migrateTo['v3.0.0'](context, projectSchema);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (
|
|
14
|
+
if (isProjectSchemaJSONV3_0_0(projectSchema)) {
|
|
15
15
|
projectSchema = await migrateTo['v3.1.0'](context, projectSchema);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
if (
|
|
18
|
+
if (isProjectSchemaJSONV3_1_0(projectSchema)) {
|
|
19
19
|
projectSchema = await migrateTo['v3.2.0'](context, projectSchema);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
if (
|
|
22
|
+
if (isProjectSchemaJSONV3_2_0(projectSchema)) {
|
|
23
23
|
projectSchema = await migrateTo['v3.3.0'](context, projectSchema);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
if (
|
|
26
|
+
if (isProjectSchemaJSONV3_3_0(projectSchema)) {
|
|
27
27
|
projectSchema = await migrateTo['v3.4.0'](context, projectSchema);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (
|
|
30
|
+
if (isProjectSchemaJSONV3_4_0(projectSchema)) {
|
|
31
31
|
projectSchema = await migrateTo['v3.5.0'](context, projectSchema);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
if (
|
|
34
|
+
if (isProjectSchemaJSONV3_5_0(projectSchema)) {
|
|
35
35
|
projectSchema = await migrateTo['v3.5.1'](context, projectSchema);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
if (
|
|
38
|
+
if (isProjectSchemaJSONV3_5_1(projectSchema)) {
|
|
39
39
|
projectSchema = await migrateTo['v3.6.0'](context, projectSchema);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
if (
|
|
42
|
+
if (isProjectSchemaJSONV3_6_0(projectSchema)) {
|
|
43
43
|
projectSchema = await migrateTo['v3.7.0'](context, projectSchema);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
if (
|
|
46
|
+
if (isProjectSchemaJSONV3_7_0(projectSchema)) {
|
|
47
47
|
projectSchema = await migrateTo['v3.8.0'](context, projectSchema);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
if (
|
|
50
|
+
if (isProjectSchemaJSONV3_8_0(projectSchema)) {
|
|
51
51
|
projectSchema = await migrateTo['v3.9.0'](context, projectSchema);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
if (
|
|
54
|
+
if (isProjectSchemaJSONV3_9_0(projectSchema)) {
|
|
55
55
|
projectSchema = await migrateTo['v3.10.0'](context, projectSchema);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
if (
|
|
58
|
+
if (isProjectSchemaJSONV3_10_0(projectSchema)) {
|
|
59
59
|
projectSchema = await migrateTo['v3.11.0'](context, projectSchema);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
if (
|
|
62
|
+
if (isProjectSchemaJSONV3_11_0(projectSchema)) {
|
|
63
63
|
projectSchema = await migrateTo['v3.12.0'](context, projectSchema);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
if (
|
|
66
|
+
if (isProjectSchemaJSONV3_12_0(projectSchema)) {
|
|
67
67
|
projectSchema = await migrateTo['v3.12.1'](context, projectSchema);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
if (
|
|
70
|
+
if (isProjectSchemaJSONV3_12_1(projectSchema)) {
|
|
71
71
|
projectSchema = await migrateTo['v3.12.2'](context, projectSchema);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
if (
|
|
74
|
+
if (isProjectSchemaJSONV3_12_2(projectSchema)) {
|
|
75
75
|
projectSchema = await migrateTo['v3.12.3'](context, projectSchema);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
if (
|
|
78
|
+
if (isProjectSchemaJSONV3_12_3(projectSchema)) {
|
|
79
79
|
projectSchema = await migrateTo['v3.13.0'](context, projectSchema);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
if (
|
|
82
|
+
if (isProjectSchemaJSONV3_13_0(projectSchema)) {
|
|
83
83
|
projectSchema = await migrateTo['v3.14.0'](context, projectSchema);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
if (
|
|
86
|
+
if (isProjectSchemaJSONV3_14_0(projectSchema)) {
|
|
87
87
|
projectSchema = await migrateTo['v3.15.0'](context, projectSchema);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
if (
|
|
90
|
+
if (isProjectSchemaJSONV3_15_0(projectSchema)) {
|
|
91
91
|
projectSchema = await migrateTo['v3.16.0'](context, projectSchema);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
if (
|
|
94
|
+
if (isProjectSchemaJSONV3_16_0(projectSchema)) {
|
|
95
95
|
projectSchema = await migrateTo['v3.17.0'](context, projectSchema);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
if (
|
|
98
|
+
if (isProjectSchemaJSONV3_17_0(projectSchema)) {
|
|
99
99
|
projectSchema = await migrateTo['v3.17.1'](context, projectSchema);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
if (
|
|
102
|
+
if (isProjectSchemaJSONV3_17_1(projectSchema)) {
|
|
103
103
|
projectSchema = await migrateTo['v3.18.0'](context, projectSchema);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
if (
|
|
106
|
+
if (isProjectSchemaJSONV3_18_0(projectSchema)) {
|
|
107
107
|
projectSchema = await migrateTo['v3.18.1'](context, projectSchema);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
if (
|
|
110
|
+
if (isProjectSchemaJSONV3_18_1(projectSchema)) {
|
|
111
111
|
projectSchema = await migrateTo['v3.18.2'](context, projectSchema);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
if (
|
|
114
|
+
if (isProjectSchemaJSONV3_18_2(projectSchema)) {
|
|
115
115
|
projectSchema = await migrateTo['v3.19.0'](context, projectSchema);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
if (
|
|
118
|
+
if (isProjectSchemaJSONV3_19_0(projectSchema)) {
|
|
119
119
|
projectSchema = await migrateTo['v3.20.0'](context, projectSchema);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
if (
|
|
122
|
+
if (isProjectSchemaJSONV3_20_0(projectSchema)) {
|
|
123
123
|
projectSchema = await migrateTo['v3.21.0'](context, projectSchema);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
if (
|
|
126
|
+
if (isProjectSchemaJSONV3_21_0(projectSchema)) {
|
|
127
127
|
projectSchema = await migrateTo['v3.22.0'](context, projectSchema);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
if (
|
|
130
|
+
if (isProjectSchemaJSONV3_22_0(projectSchema)) {
|
|
131
131
|
projectSchema = await migrateTo['v3.23.0'](context, projectSchema);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
if (
|
|
134
|
+
if (isProjectSchemaJSONV3_23_0(projectSchema)) {
|
|
135
135
|
projectSchema = await migrateTo['v3.24.0'](context, projectSchema);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
if (
|
|
138
|
+
if (isProjectSchemaJSONV3_24_0(projectSchema)) {
|
|
139
139
|
projectSchema = await migrateTo['v3.25.0'](context, projectSchema);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
if (
|
|
142
|
+
if (isProjectSchemaJSONV3_25_0(projectSchema)) {
|
|
143
143
|
projectSchema = await migrateTo['v3.26.0'](context, projectSchema);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
if (
|
|
146
|
+
if (isProjectSchemaJSONV3_26_0(projectSchema)) {
|
|
147
147
|
projectSchema = await migrateTo['v3.27.0'](context, projectSchema);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
if (
|
|
150
|
+
if (isProjectSchemaJSONV3_27_0(projectSchema)) {
|
|
151
151
|
projectSchema = await migrateTo['v3.28.0'](context, projectSchema);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
if (
|
|
154
|
+
if (isProjectSchemaJSONV3_28_0(projectSchema)) {
|
|
155
155
|
projectSchema = await migrateTo['v3.29.0'](context, projectSchema);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
if (
|
|
158
|
+
if (isProjectSchemaJSONV3_29_0(projectSchema)) {
|
|
159
159
|
projectSchema = await migrateTo['v3.30.0'](context, projectSchema);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
if (
|
|
162
|
+
if (isProjectSchemaJSONV3_30_0(projectSchema)) {
|
|
163
163
|
projectSchema = await migrateTo['v3.31.0'](context, projectSchema);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
if (
|
|
166
|
+
if (isProjectSchemaJSONV3_31_0(projectSchema)) {
|
|
167
167
|
projectSchema = await migrateTo['v3.32.0'](context, projectSchema);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
if (
|
|
170
|
+
if (isProjectSchemaJSONV3_32_0(projectSchema)) {
|
|
171
171
|
projectSchema = await migrateTo['v3.33.0'](context, projectSchema);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
if (
|
|
174
|
+
if (isProjectSchemaJSONV3_33_0(projectSchema)) {
|
|
175
|
+
projectSchema = await migrateTo['v3.34.0'](context, projectSchema);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (isProjectSchemaJSONV3_34_0(projectSchema)) {
|
|
179
|
+
projectSchema = await migrateTo['v3.35.0'](context, projectSchema);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (isProjectSchemaJSONV4_0_0(projectSchema)) {
|
|
175
183
|
throw new Error('You are using an unreleased schema version. Migration is not possible');
|
|
176
184
|
}
|
|
177
185
|
|
|
178
186
|
return projectSchema;
|
|
179
187
|
}
|
|
180
188
|
export async function ensureLatest(context, schema) {
|
|
181
|
-
if (!schema ||
|
|
189
|
+
if (!schema || isLatestProjectSchemaJSON(schema)) {
|
|
182
190
|
return schema;
|
|
183
191
|
}
|
|
184
192
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/refs.js
CHANGED
|
@@ -250,6 +250,9 @@ export function shapeNameToRefItem(context, shapeName, template) {
|
|
|
250
250
|
isForeign: parsed.serviceId !== 'local'
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
+
export function shapeToRefItem(context, shape) {
|
|
254
|
+
return shapeNameToRefItem(context, shape.name);
|
|
255
|
+
}
|
|
253
256
|
/**
|
|
254
257
|
* Given a property schema and project schema, finds a `@ref` or `$ref` and
|
|
255
258
|
* returns a `RefItem` suitable for loading a referenced schema...
|
|
@@ -553,6 +556,18 @@ export function parsePropertyRef(refStr) {
|
|
|
553
556
|
export function serializePropertyRef(propertyRef) {
|
|
554
557
|
return `${propertyRef.serviceId}:${propertyRef.shapeName}.${propertyRef.propertyName}`;
|
|
555
558
|
}
|
|
559
|
+
export function propertyRefToShapeRef(propertyRef) {
|
|
560
|
+
const parsed = parsePropertyRef(propertyRef);
|
|
561
|
+
|
|
562
|
+
if (!parsed) {
|
|
563
|
+
throw new Error(`Invalid property ref "${propertyRef}`);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return formatShapeRef(parsed.serviceId, parsed.shapeName);
|
|
567
|
+
}
|
|
568
|
+
export function formatShapeRef(serviceId, shapeName) {
|
|
569
|
+
return `${serviceId}:${shapeName}`;
|
|
570
|
+
}
|
|
556
571
|
export function applyNamespace(namespace, name) {
|
|
557
572
|
return namespace ? `${namespace}_${name}` : name;
|
|
558
573
|
}
|
package/es/schema-util.js
CHANGED
|
@@ -428,6 +428,9 @@ export function applyDefaultsToSchema(projectSchema) {
|
|
|
428
428
|
export function getShapeById(projectSchema, shapeId) {
|
|
429
429
|
return find(projectSchema.shapes, shape => shape.id === shapeId);
|
|
430
430
|
}
|
|
431
|
+
export function getShapeByRef(projectSchema, shapeRef) {
|
|
432
|
+
return refItemToShape(projectSchema, atRefToRefItem(projectSchema, shapeRef));
|
|
433
|
+
}
|
|
431
434
|
export function ensureShapeById(projectSchema, shapeId) {
|
|
432
435
|
const shape = getShapeById(projectSchema, shapeId);
|
|
433
436
|
|
|
@@ -1026,47 +1029,47 @@ export const createSchemaPropertyList = curry((context, shapeOrSchema) => {
|
|
|
1026
1029
|
function isShape(shapeOrSchema) {
|
|
1027
1030
|
return 'schema' in shapeOrSchema;
|
|
1028
1031
|
}
|
|
1029
|
-
/**
|
|
1030
|
-
* Creates a schema property accessor, allowing you to safely access schema
|
|
1031
|
-
* properties.
|
|
1032
|
-
*/
|
|
1033
|
-
|
|
1034
1032
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1033
|
+
class SchemaPropertyAccessor {
|
|
1034
|
+
constructor(context, shapeOrSchema) {
|
|
1035
|
+
const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
|
|
1036
|
+
this.schema = dereferenceSchema(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
|
|
1037
|
+
this.entries = isObjectSchema(this.schema) ? Object.entries(this.schema.properties) : [];
|
|
1038
|
+
this.properties = new Map(this.entries);
|
|
1039
|
+
}
|
|
1039
1040
|
|
|
1040
|
-
|
|
1041
|
-
return
|
|
1042
|
-
}
|
|
1041
|
+
getValue(propertyName) {
|
|
1042
|
+
return this.properties.get(propertyName);
|
|
1043
|
+
}
|
|
1043
1044
|
|
|
1044
|
-
|
|
1045
|
-
var
|
|
1045
|
+
findValue(predicate) {
|
|
1046
|
+
var _this$entries$find;
|
|
1046
1047
|
|
|
1047
|
-
return (
|
|
1048
|
-
}
|
|
1048
|
+
return (_this$entries$find = this.entries.find(predicate)) === null || _this$entries$find === void 0 ? void 0 : _this$entries$find[1];
|
|
1049
|
+
}
|
|
1049
1050
|
|
|
1050
|
-
|
|
1051
|
-
var
|
|
1051
|
+
findName(predicate) {
|
|
1052
|
+
var _this$entries$find2;
|
|
1052
1053
|
|
|
1053
|
-
return (
|
|
1054
|
-
}
|
|
1054
|
+
return (_this$entries$find2 = this.entries.find(predicate)) === null || _this$entries$find2 === void 0 ? void 0 : _this$entries$find2[0];
|
|
1055
|
+
}
|
|
1055
1056
|
|
|
1056
|
-
|
|
1057
|
-
const value =
|
|
1057
|
+
getKey(propertyName) {
|
|
1058
|
+
const value = this.properties.get(propertyName);
|
|
1058
1059
|
|
|
1059
1060
|
if (value) {
|
|
1060
1061
|
return getStorageKey(value);
|
|
1061
1062
|
}
|
|
1062
|
-
}
|
|
1063
|
+
}
|
|
1063
1064
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Creates a schema property accessor, allowing you to safely access schema
|
|
1069
|
+
* properties.
|
|
1070
|
+
*/
|
|
1071
|
+
export const createSchemaPropertyAccessor = curry((context, shapeOrSchema) => {
|
|
1072
|
+
return new SchemaPropertyAccessor(context, shapeOrSchema);
|
|
1070
1073
|
});
|
|
1071
1074
|
|
|
1072
1075
|
function findQueryHelper(slice, shapeName, resolver, type) {
|
package/es/schemas/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is generated by "pnpm json2ts"
|
|
2
|
-
export const CURRENT_SCHEMA_VERSION = '3.
|
|
2
|
+
export const CURRENT_SCHEMA_VERSION = '3.35.0';
|
|
3
3
|
export { default as anyProjectSchema } from './project-schema.json';
|
|
4
|
-
export { default as latestSchemaJson } from './project-schema/v3.
|
|
4
|
+
export { default as latestSchemaJson } from './project-schema/v3.35.0.json';
|
|
5
5
|
import metaSchemaV1_0_0 from './project-schema/meta-schema-v1.0.0.json';
|
|
6
6
|
import projectSchemaV1_0_0 from './project-schema/v1.0.0.json';
|
|
7
7
|
import metaSchemaV3_0_0 from './project-schema/meta-schema-v3.0.0.json';
|
|
@@ -56,5 +56,7 @@ import projectSchemaV3_30_0 from './project-schema/v3.30.0.json';
|
|
|
56
56
|
import projectSchemaV3_31_0 from './project-schema/v3.31.0.json';
|
|
57
57
|
import projectSchemaV3_32_0 from './project-schema/v3.32.0.json';
|
|
58
58
|
import projectSchemaV3_33_0 from './project-schema/v3.33.0.json';
|
|
59
|
+
import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
|
|
60
|
+
import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
|
|
59
61
|
import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
|
|
60
|
-
export const allProjectSchemas = [metaSchemaV1_0_0, projectSchemaV1_0_0, metaSchemaV3_0_0, projectSchemaV3_0_0, metaSchemaV3_1_0, projectSchemaV3_1_0, metaSchemaV3_2_0, projectSchemaV3_2_0, metaSchemaV3_3_0, projectSchemaV3_3_0, metaSchemaV3_4_0, projectSchemaV3_4_0, metaSchemaV3_5_0, projectSchemaV3_5_0, metaSchemaV3_5_1, projectSchemaV3_5_1, metaSchemaV3_6_0, projectSchemaV3_6_0, metaSchemaV3_7_0, projectSchemaV3_7_0, metaSchemaV3_8_0, projectSchemaV3_8_0, metaSchemaV3_9_0, projectSchemaV3_9_0, projectSchemaV3_10_0, projectSchemaV3_11_0, projectSchemaV3_12_0, projectSchemaV3_12_1, projectSchemaV3_12_2, projectSchemaV3_12_3, projectSchemaV3_13_0, projectSchemaV3_14_0, projectSchemaV3_15_0, projectSchemaV3_16_0, projectSchemaV3_17_0, projectSchemaV3_17_1, projectSchemaV3_18_0, projectSchemaV3_18_1, projectSchemaV3_18_2, projectSchemaV3_19_0, projectSchemaV3_20_0, projectSchemaV3_21_0, projectSchemaV3_22_0, projectSchemaV3_23_0, projectSchemaV3_24_0, projectSchemaV3_25_0, projectSchemaV3_26_0, projectSchemaV3_27_0, projectSchemaV3_28_0, projectSchemaV3_29_0, projectSchemaV3_30_0, projectSchemaV3_31_0, projectSchemaV3_32_0, projectSchemaV3_33_0, projectSchemaV4_0_0];
|
|
62
|
+
export const allProjectSchemas = [metaSchemaV1_0_0, projectSchemaV1_0_0, metaSchemaV3_0_0, projectSchemaV3_0_0, metaSchemaV3_1_0, projectSchemaV3_1_0, metaSchemaV3_2_0, projectSchemaV3_2_0, metaSchemaV3_3_0, projectSchemaV3_3_0, metaSchemaV3_4_0, projectSchemaV3_4_0, metaSchemaV3_5_0, projectSchemaV3_5_0, metaSchemaV3_5_1, projectSchemaV3_5_1, metaSchemaV3_6_0, projectSchemaV3_6_0, metaSchemaV3_7_0, projectSchemaV3_7_0, metaSchemaV3_8_0, projectSchemaV3_8_0, metaSchemaV3_9_0, projectSchemaV3_9_0, projectSchemaV3_10_0, projectSchemaV3_11_0, projectSchemaV3_12_0, projectSchemaV3_12_1, projectSchemaV3_12_2, projectSchemaV3_12_3, projectSchemaV3_13_0, projectSchemaV3_14_0, projectSchemaV3_15_0, projectSchemaV3_16_0, projectSchemaV3_17_0, projectSchemaV3_17_1, projectSchemaV3_18_0, projectSchemaV3_18_1, projectSchemaV3_18_2, projectSchemaV3_19_0, projectSchemaV3_20_0, projectSchemaV3_21_0, projectSchemaV3_22_0, projectSchemaV3_23_0, projectSchemaV3_24_0, projectSchemaV3_25_0, projectSchemaV3_26_0, projectSchemaV3_27_0, projectSchemaV3_28_0, projectSchemaV3_29_0, projectSchemaV3_30_0, projectSchemaV3_31_0, projectSchemaV3_32_0, projectSchemaV3_33_0, projectSchemaV3_34_0, projectSchemaV3_35_0, projectSchemaV4_0_0];
|
package/es/schemas/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is generated by "pnpm json2ts"
|
|
2
|
-
export const CURRENT_SCHEMA_VERSION = '3.
|
|
2
|
+
export const CURRENT_SCHEMA_VERSION = '3.35.0';
|
|
3
3
|
export {default as anyProjectSchema} from './project-schema.json';
|
|
4
|
-
export {default as latestSchemaJson} from './project-schema/v3.
|
|
4
|
+
export {default as latestSchemaJson} from './project-schema/v3.35.0.json';
|
|
5
5
|
import metaSchemaV1_0_0 from './project-schema/meta-schema-v1.0.0.json';
|
|
6
6
|
import projectSchemaV1_0_0 from './project-schema/v1.0.0.json';
|
|
7
7
|
import metaSchemaV3_0_0 from './project-schema/meta-schema-v3.0.0.json';
|
|
@@ -56,6 +56,8 @@ import projectSchemaV3_30_0 from './project-schema/v3.30.0.json';
|
|
|
56
56
|
import projectSchemaV3_31_0 from './project-schema/v3.31.0.json';
|
|
57
57
|
import projectSchemaV3_32_0 from './project-schema/v3.32.0.json';
|
|
58
58
|
import projectSchemaV3_33_0 from './project-schema/v3.33.0.json';
|
|
59
|
+
import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
|
|
60
|
+
import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
|
|
59
61
|
import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
|
|
60
62
|
export const allProjectSchemas = [
|
|
61
63
|
metaSchemaV1_0_0,
|
|
@@ -112,5 +114,7 @@ export const allProjectSchemas = [
|
|
|
112
114
|
projectSchemaV3_31_0,
|
|
113
115
|
projectSchemaV3_32_0,
|
|
114
116
|
projectSchemaV3_33_0,
|
|
117
|
+
projectSchemaV3_34_0,
|
|
118
|
+
projectSchemaV3_35_0,
|
|
115
119
|
projectSchemaV4_0_0
|
|
116
120
|
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://schema.takeshape.io/project-schema/v3.
|
|
4
|
-
"title": "Project Schema",
|
|
3
|
+
"$id": "https://schema.takeshape.io/project-schema/v3.35.0#",
|
|
4
|
+
"title": "Project Schema JSON",
|
|
5
5
|
"definitions": {
|
|
6
6
|
"schemaArray": {
|
|
7
7
|
"title": "Schema Array",
|
|
@@ -1766,7 +1766,7 @@
|
|
|
1766
1766
|
"additionalProperties": false
|
|
1767
1767
|
},
|
|
1768
1768
|
"query": {
|
|
1769
|
-
"title": "Query",
|
|
1769
|
+
"title": "Query JSON",
|
|
1770
1770
|
"type": "object",
|
|
1771
1771
|
"properties": {
|
|
1772
1772
|
"args": {
|
|
@@ -2008,7 +2008,7 @@
|
|
|
2008
2008
|
"additionalProperties": false
|
|
2009
2009
|
},
|
|
2010
2010
|
"shape": {
|
|
2011
|
-
"title": "Shape",
|
|
2011
|
+
"title": "Shape JSON",
|
|
2012
2012
|
"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",
|
|
2013
2013
|
"type": "object",
|
|
2014
2014
|
"properties": {
|
|
@@ -2067,6 +2067,9 @@
|
|
|
2067
2067
|
"loaders": {
|
|
2068
2068
|
"$ref": "#/definitions/shapeLoaders"
|
|
2069
2069
|
},
|
|
2070
|
+
"joins": {
|
|
2071
|
+
"$ref": "#/definitions/shapeJoins"
|
|
2072
|
+
},
|
|
2070
2073
|
"cache": {
|
|
2071
2074
|
"$ref": "#/definitions/shapeCacheConfig"
|
|
2072
2075
|
},
|
|
@@ -2149,6 +2152,38 @@
|
|
|
2149
2152
|
"enabled"
|
|
2150
2153
|
]
|
|
2151
2154
|
},
|
|
2155
|
+
"shapeJoin": {
|
|
2156
|
+
"title": "ShapeJoin",
|
|
2157
|
+
"type": "object",
|
|
2158
|
+
"properties": {
|
|
2159
|
+
"resolver": {
|
|
2160
|
+
"oneOf": [
|
|
2161
|
+
{
|
|
2162
|
+
"$ref": "#/definitions/delegateResolver"
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"$ref": "#/definitions/shapedbResolver"
|
|
2166
|
+
}
|
|
2167
|
+
]
|
|
2168
|
+
},
|
|
2169
|
+
"dependencies": {
|
|
2170
|
+
"type": "string"
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
"required": [
|
|
2174
|
+
"resolver"
|
|
2175
|
+
],
|
|
2176
|
+
"additionalProperties": false
|
|
2177
|
+
},
|
|
2178
|
+
"shapeJoins": {
|
|
2179
|
+
"title": "ShapeJoins",
|
|
2180
|
+
"type": "object",
|
|
2181
|
+
"patternProperties": {
|
|
2182
|
+
"[:0-9A-Za-z_-]+": {
|
|
2183
|
+
"$ref": "#/definitions/shapeJoin"
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2152
2187
|
"shapeLoaders": {
|
|
2153
2188
|
"title": "ShapeLoaders",
|
|
2154
2189
|
"type": "object",
|
|
@@ -2826,7 +2861,7 @@
|
|
|
2826
2861
|
"additionalProperties": false
|
|
2827
2862
|
},
|
|
2828
2863
|
"storedServiceConfig": {
|
|
2829
|
-
"title": "
|
|
2864
|
+
"title": "Service Config JSON",
|
|
2830
2865
|
"type": "object",
|
|
2831
2866
|
"properties": {
|
|
2832
2867
|
"id": {
|
|
@@ -2894,7 +2929,7 @@
|
|
|
2894
2929
|
]
|
|
2895
2930
|
},
|
|
2896
2931
|
"storedServiceMap": {
|
|
2897
|
-
"title": "
|
|
2932
|
+
"title": "Service Map JSON",
|
|
2898
2933
|
"type": "object",
|
|
2899
2934
|
"patternProperties": {
|
|
2900
2935
|
"[0-9A-Za-z_-]+": {
|
|
@@ -3018,7 +3053,7 @@
|
|
|
3018
3053
|
"schemaVersion": {
|
|
3019
3054
|
"type": "string",
|
|
3020
3055
|
"enum": [
|
|
3021
|
-
"3.
|
|
3056
|
+
"3.35.0"
|
|
3022
3057
|
],
|
|
3023
3058
|
"description": "The version of the schema format your project is using. We increase the version as we make breaking changes to the schema format."
|
|
3024
3059
|
},
|
|
@@ -3085,4 +3120,4 @@
|
|
|
3085
3120
|
"mutations",
|
|
3086
3121
|
"workflows"
|
|
3087
3122
|
]
|
|
3088
|
-
}
|
|
3123
|
+
}
|