@takeshape/schema 11.45.5 → 11.46.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/cjs/src/agents.js +6 -6
- package/dist/cjs/src/api-version.js +1 -1
- package/dist/cjs/src/content-schema-transform.js +12 -12
- package/dist/cjs/src/create-input-schema.js +1 -1
- package/dist/cjs/src/enum.js +1 -1
- package/dist/cjs/src/flatten-templates.js +4 -4
- package/dist/cjs/src/get-is-leaf.js +1 -1
- package/dist/cjs/src/interfaces.js +11 -9
- package/dist/cjs/src/layers/layers.js +11 -5
- package/dist/cjs/src/layers/refs.js +3 -3
- package/dist/cjs/src/layers/type-utils.js +1 -1
- package/dist/cjs/src/migration/index.js +3 -1
- package/dist/cjs/src/migration/to/v3.0.0.js +20 -8
- package/dist/cjs/src/migration/to/v3.1.0.js +6 -4
- package/dist/cjs/src/migration/to/v3.10.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.13.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.17.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.18.0.js +4 -4
- package/dist/cjs/src/migration/to/v3.18.1.js +1 -1
- package/dist/cjs/src/migration/to/v3.18.2.js +1 -1
- package/dist/cjs/src/migration/to/v3.20.0.js +5 -2
- package/dist/cjs/src/migration/to/v3.22.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.31.0.js +2 -2
- package/dist/cjs/src/migration/to/v3.32.0.js +3 -1
- package/dist/cjs/src/migration/to/v3.34.0.js +6 -9
- package/dist/cjs/src/migration/to/v3.36.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.39.0.js +8 -8
- package/dist/cjs/src/migration/to/v3.40.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.46.0.js +1 -1
- package/dist/cjs/src/migration/to/v3.51.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.9.0.js +3 -3
- package/dist/cjs/src/models/project-schema.js +4 -4
- package/dist/cjs/src/models/shape.js +2 -2
- package/dist/cjs/src/project-schema/index.js +4 -2
- package/dist/cjs/src/project-schema/migrate.js +3 -1
- package/dist/cjs/src/project-schema/v3.51.0.js +8 -0
- package/dist/cjs/src/refs.js +28 -18
- package/dist/cjs/src/relationships.js +25 -20
- package/dist/cjs/src/runtime-schema.js +16 -9
- package/dist/cjs/src/schema-transform.js +3 -3
- package/dist/cjs/src/schema-util.js +38 -30
- package/dist/cjs/src/schemas/auth-schemas.json +18 -78
- package/dist/cjs/src/schemas/index.js +18 -16
- package/dist/cjs/src/schemas/project-schema/experimental.json +7 -20
- package/dist/cjs/src/schemas/project-schema/latest.json +166 -566
- package/dist/cjs/src/schemas/project-schema/meta-schema-v1.0.0.json +3 -17
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.0.0.json +4 -4
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.1.0.json +4 -4
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.2.0.json +5 -5
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.3.0.json +5 -5
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.4.0.json +11 -43
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.5.0.json +7 -7
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.5.1.json +8 -11
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.6.0.json +8 -11
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.7.0.json +11 -9
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.8.0.json +11 -9
- package/dist/cjs/src/schemas/project-schema/meta-schema-v3.9.0.json +24 -22
- package/dist/cjs/src/schemas/project-schema/v1.0.0.json +3 -3
- package/dist/cjs/src/schemas/project-schema/v3.0.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.1.0.json +2 -2
- package/dist/cjs/src/schemas/project-schema/v3.10.0.json +32 -30
- package/dist/cjs/src/schemas/project-schema/v3.11.0.json +32 -30
- package/dist/cjs/src/schemas/project-schema/v3.12.0.json +33 -36
- package/dist/cjs/src/schemas/project-schema/v3.12.1.json +33 -36
- package/dist/cjs/src/schemas/project-schema/v3.12.2.json +2122 -2125
- package/dist/cjs/src/schemas/project-schema/v3.12.3.json +2175 -2178
- package/dist/cjs/src/schemas/project-schema/v3.13.0.json +32 -30
- package/dist/cjs/src/schemas/project-schema/v3.14.0.json +32 -30
- package/dist/cjs/src/schemas/project-schema/v3.15.0.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.16.0.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.17.0.json +47 -39
- package/dist/cjs/src/schemas/project-schema/v3.17.1.json +2204 -2196
- package/dist/cjs/src/schemas/project-schema/v3.18.0.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.18.1.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.18.2.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.19.0.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.2.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.20.0.json +40 -38
- package/dist/cjs/src/schemas/project-schema/v3.21.0.json +41 -39
- package/dist/cjs/src/schemas/project-schema/v3.22.0.json +41 -39
- package/dist/cjs/src/schemas/project-schema/v3.23.0.json +43 -43
- package/dist/cjs/src/schemas/project-schema/v3.24.0.json +105 -458
- package/dist/cjs/src/schemas/project-schema/v3.25.0.json +105 -458
- package/dist/cjs/src/schemas/project-schema/v3.26.0.json +107 -466
- package/dist/cjs/src/schemas/project-schema/v3.27.0.json +107 -466
- package/dist/cjs/src/schemas/project-schema/v3.28.0.json +112 -471
- package/dist/cjs/src/schemas/project-schema/v3.29.0.json +112 -471
- package/dist/cjs/src/schemas/project-schema/v3.3.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.30.0.json +112 -472
- package/dist/cjs/src/schemas/project-schema/v3.31.0.json +112 -486
- package/dist/cjs/src/schemas/project-schema/v3.32.0.json +113 -488
- package/dist/cjs/src/schemas/project-schema/v3.33.0.json +113 -488
- package/dist/cjs/src/schemas/project-schema/v3.34.0.json +113 -488
- package/dist/cjs/src/schemas/project-schema/v3.35.0.json +114 -491
- package/dist/cjs/src/schemas/project-schema/v3.36.0.json +114 -491
- package/dist/cjs/src/schemas/project-schema/v3.37.0.json +118 -511
- package/dist/cjs/src/schemas/project-schema/v3.38.0.json +118 -511
- package/dist/cjs/src/schemas/project-schema/v3.39.0.json +118 -511
- package/dist/cjs/src/schemas/project-schema/v3.4.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.40.0.json +118 -512
- package/dist/cjs/src/schemas/project-schema/v3.41.0.json +118 -512
- package/dist/cjs/src/schemas/project-schema/v3.42.0.json +118 -512
- package/dist/cjs/src/schemas/project-schema/v3.43.0.json +118 -512
- package/dist/cjs/src/schemas/project-schema/v3.44.0.json +125 -540
- package/dist/cjs/src/schemas/project-schema/v3.45.0.json +128 -554
- package/dist/cjs/src/schemas/project-schema/v3.46.0.json +129 -560
- package/dist/cjs/src/schemas/project-schema/v3.47.0.json +131 -568
- package/dist/cjs/src/schemas/project-schema/v3.48.0.json +132 -572
- package/dist/cjs/src/schemas/project-schema/v3.49.0.json +132 -558
- package/dist/cjs/src/schemas/project-schema/v3.5.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.5.1.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.50.0.json +165 -565
- package/dist/cjs/src/schemas/project-schema/v3.51.0.json +3320 -0
- package/dist/cjs/src/schemas/project-schema/v3.6.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.7.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.8.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.9.0.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v4.0.0.json +31 -29
- package/dist/cjs/src/schemas/project-schema.json +3 -0
- package/dist/cjs/src/schemas/user-schema.json +2 -9
- package/dist/cjs/src/service-dependencies.js +15 -9
- package/dist/cjs/src/services/services.js +12 -11
- package/dist/cjs/src/services/util.js +4 -4
- package/dist/cjs/src/template-shapes/templates.js +18 -12
- package/dist/cjs/src/template-shapes/where.js +23 -14
- package/dist/cjs/src/types/utils.js +3 -3
- package/dist/cjs/src/unions.js +6 -8
- package/dist/cjs/src/util/api-indexing.js +4 -4
- package/dist/cjs/src/util/detect-cycles.js +2 -2
- package/dist/cjs/src/util/find-shape-at-path.js +1 -1
- package/dist/cjs/src/util/form-config.js +0 -1
- package/dist/cjs/src/util/get-conflicting-properties.js +1 -1
- package/dist/cjs/src/util/merge.js +22 -13
- package/dist/cjs/src/util/patch-schema.js +2 -2
- package/dist/cjs/src/util/shapes.js +2 -2
- package/dist/cjs/src/validate.js +64 -47
- package/dist/cjs/src/workflows.js +4 -4
- package/dist/esm/src/agents.js +6 -6
- package/dist/esm/src/api-version.js +1 -1
- package/dist/esm/src/content-schema-transform.js +12 -12
- package/dist/esm/src/create-input-schema.js +1 -1
- package/dist/esm/src/enum.js +1 -1
- package/dist/esm/src/flatten-templates.js +4 -4
- package/dist/esm/src/get-is-leaf.js +1 -1
- package/dist/esm/src/interfaces.js +12 -10
- package/dist/esm/src/layers/layers.js +12 -6
- package/dist/esm/src/layers/refs.js +3 -3
- package/dist/esm/src/layers/type-utils.js +1 -1
- package/dist/esm/src/migration/index.js +3 -1
- package/dist/esm/src/migration/to/v3.0.0.js +20 -8
- package/dist/esm/src/migration/to/v3.1.0.js +6 -4
- package/dist/esm/src/migration/to/v3.10.0.js +1 -1
- package/dist/esm/src/migration/to/v3.13.0.js +1 -1
- package/dist/esm/src/migration/to/v3.17.0.js +1 -1
- package/dist/esm/src/migration/to/v3.18.0.js +4 -4
- package/dist/esm/src/migration/to/v3.18.1.js +1 -1
- package/dist/esm/src/migration/to/v3.18.2.js +1 -1
- package/dist/esm/src/migration/to/v3.20.0.js +5 -2
- package/dist/esm/src/migration/to/v3.22.0.js +1 -1
- package/dist/esm/src/migration/to/v3.31.0.js +2 -2
- package/dist/esm/src/migration/to/v3.32.0.js +3 -1
- package/dist/esm/src/migration/to/v3.34.0.js +6 -9
- package/dist/esm/src/migration/to/v3.36.0.js +1 -1
- package/dist/esm/src/migration/to/v3.39.0.js +8 -8
- package/dist/esm/src/migration/to/v3.40.0.js +1 -1
- package/dist/esm/src/migration/to/v3.46.0.js +1 -1
- package/dist/esm/src/migration/to/v3.51.0.js +10 -0
- package/dist/esm/src/migration/to/v3.9.0.js +3 -3
- package/dist/esm/src/mocks.js +1 -1
- package/dist/esm/src/models/project-schema.js +4 -4
- package/dist/esm/src/models/shape.js +2 -2
- package/dist/esm/src/project-schema/index.js +3 -1
- package/dist/esm/src/project-schema/migrate.js +4 -2
- package/dist/esm/src/project-schema/v3.51.0.js +7 -0
- package/dist/esm/src/refs.js +29 -19
- package/dist/esm/src/relationships.js +26 -21
- package/dist/esm/src/runtime-schema.js +16 -9
- package/dist/esm/src/schema-transform.js +3 -3
- package/dist/esm/src/schema-util.js +40 -32
- package/dist/esm/src/schemas/auth-schemas.json +18 -78
- package/dist/esm/src/schemas/index.js +15 -13
- package/dist/esm/src/schemas/project-schema/experimental.json +7 -20
- package/dist/esm/src/schemas/project-schema/latest.json +166 -566
- package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +3 -17
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +4 -4
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +4 -4
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +5 -5
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +5 -5
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +11 -43
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +7 -7
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +8 -11
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +8 -11
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +11 -9
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +11 -9
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +24 -22
- package/dist/esm/src/schemas/project-schema/v1.0.0.json +3 -3
- package/dist/esm/src/schemas/project-schema/v3.0.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.1.0.json +2 -2
- package/dist/esm/src/schemas/project-schema/v3.10.0.json +32 -30
- package/dist/esm/src/schemas/project-schema/v3.11.0.json +32 -30
- package/dist/esm/src/schemas/project-schema/v3.12.0.json +33 -36
- package/dist/esm/src/schemas/project-schema/v3.12.1.json +33 -36
- package/dist/esm/src/schemas/project-schema/v3.12.2.json +2122 -2125
- package/dist/esm/src/schemas/project-schema/v3.12.3.json +2175 -2178
- package/dist/esm/src/schemas/project-schema/v3.13.0.json +32 -30
- package/dist/esm/src/schemas/project-schema/v3.14.0.json +32 -30
- package/dist/esm/src/schemas/project-schema/v3.15.0.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.16.0.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.17.0.json +47 -39
- package/dist/esm/src/schemas/project-schema/v3.17.1.json +2204 -2196
- package/dist/esm/src/schemas/project-schema/v3.18.0.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.18.1.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.18.2.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.19.0.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.2.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.20.0.json +40 -38
- package/dist/esm/src/schemas/project-schema/v3.21.0.json +41 -39
- package/dist/esm/src/schemas/project-schema/v3.22.0.json +41 -39
- package/dist/esm/src/schemas/project-schema/v3.23.0.json +43 -43
- package/dist/esm/src/schemas/project-schema/v3.24.0.json +105 -458
- package/dist/esm/src/schemas/project-schema/v3.25.0.json +105 -458
- package/dist/esm/src/schemas/project-schema/v3.26.0.json +107 -466
- package/dist/esm/src/schemas/project-schema/v3.27.0.json +107 -466
- package/dist/esm/src/schemas/project-schema/v3.28.0.json +112 -471
- package/dist/esm/src/schemas/project-schema/v3.29.0.json +112 -471
- package/dist/esm/src/schemas/project-schema/v3.3.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.30.0.json +112 -472
- package/dist/esm/src/schemas/project-schema/v3.31.0.json +112 -486
- package/dist/esm/src/schemas/project-schema/v3.32.0.json +113 -488
- package/dist/esm/src/schemas/project-schema/v3.33.0.json +113 -488
- package/dist/esm/src/schemas/project-schema/v3.34.0.json +113 -488
- package/dist/esm/src/schemas/project-schema/v3.35.0.json +114 -491
- package/dist/esm/src/schemas/project-schema/v3.36.0.json +114 -491
- package/dist/esm/src/schemas/project-schema/v3.37.0.json +118 -511
- package/dist/esm/src/schemas/project-schema/v3.38.0.json +118 -511
- package/dist/esm/src/schemas/project-schema/v3.39.0.json +118 -511
- package/dist/esm/src/schemas/project-schema/v3.4.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.40.0.json +118 -512
- package/dist/esm/src/schemas/project-schema/v3.41.0.json +118 -512
- package/dist/esm/src/schemas/project-schema/v3.42.0.json +118 -512
- package/dist/esm/src/schemas/project-schema/v3.43.0.json +118 -512
- package/dist/esm/src/schemas/project-schema/v3.44.0.json +125 -540
- package/dist/esm/src/schemas/project-schema/v3.45.0.json +128 -554
- package/dist/esm/src/schemas/project-schema/v3.46.0.json +129 -560
- package/dist/esm/src/schemas/project-schema/v3.47.0.json +131 -568
- package/dist/esm/src/schemas/project-schema/v3.48.0.json +132 -572
- package/dist/esm/src/schemas/project-schema/v3.49.0.json +132 -558
- package/dist/esm/src/schemas/project-schema/v3.5.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.5.1.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +165 -565
- package/dist/esm/src/schemas/project-schema/v3.51.0.json +3320 -0
- package/dist/esm/src/schemas/project-schema/v3.6.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.7.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.8.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.9.0.json +1 -1
- package/dist/esm/src/schemas/project-schema/v4.0.0.json +31 -29
- package/dist/esm/src/schemas/project-schema.json +3 -0
- package/dist/esm/src/schemas/user-schema.json +2 -9
- package/dist/esm/src/service-dependencies.js +17 -11
- package/dist/esm/src/services/services.js +12 -11
- package/dist/esm/src/services/util.js +4 -4
- package/dist/esm/src/template-shapes/templates.js +18 -12
- package/dist/esm/src/template-shapes/where.js +24 -15
- package/dist/esm/src/types/utils.js +3 -3
- package/dist/esm/src/unions.js +6 -8
- package/dist/esm/src/util/api-indexing.js +4 -4
- package/dist/esm/src/util/detect-cycles.js +2 -2
- package/dist/esm/src/util/find-shape-at-path.js +1 -1
- package/dist/esm/src/util/form-config.js +0 -1
- package/dist/esm/src/util/get-conflicting-properties.js +1 -1
- package/dist/esm/src/util/merge.js +23 -14
- package/dist/esm/src/util/patch-schema.js +2 -2
- package/dist/esm/src/util/shapes.js +2 -2
- package/dist/esm/src/validate.js +64 -47
- package/dist/esm/src/workflows.js +4 -4
- package/dist/types/src/agents.d.ts +1 -1
- package/dist/types/src/builtin-schema.d.ts +2 -2
- package/dist/types/src/content-schema-transform.d.ts +1 -1
- package/dist/types/src/create-input-schema.d.ts +1 -1
- package/dist/types/src/enum.d.ts +1 -1
- package/dist/types/src/flatten-templates.d.ts +1 -1
- package/dist/types/src/layers/layers.d.ts +1 -1
- package/dist/types/src/layers/refs.d.ts +1 -1
- package/dist/types/src/layers/type-utils.d.ts +1 -1
- package/dist/types/src/layers/visitor.d.ts +2 -2
- package/dist/types/src/migration/index.d.ts +1 -0
- package/dist/types/src/migration/to/v3.17.1.d.ts +1 -1
- package/dist/types/src/migration/to/v3.19.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.21.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.22.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.23.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.24.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.25.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.26.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.27.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.28.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.29.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.30.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.31.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.32.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.33.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.34.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.35.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.36.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.37.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.38.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.39.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.40.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.41.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.42.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.43.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.44.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.45.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.46.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.47.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.48.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.49.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.50.0.d.ts +1 -1
- package/dist/types/src/migration/to/v3.51.0.d.ts +4 -0
- package/dist/types/src/migration/types.d.ts +1 -1
- package/dist/types/src/mocks.d.ts +1 -1
- package/dist/types/src/models/project-schema.d.ts +3 -3
- package/dist/types/src/models/query.d.ts +2 -2
- package/dist/types/src/models/service.d.ts +2 -2
- package/dist/types/src/models/shape.d.ts +2 -2
- package/dist/types/src/project-schema/index.d.ts +4 -1
- package/dist/types/src/project-schema/latest.d.ts +28 -10
- package/dist/types/src/project-schema/v3.50.0.d.ts +27 -9
- package/dist/types/src/project-schema/v3.51.0.d.ts +2189 -0
- package/dist/types/src/refs.d.ts +1 -1
- package/dist/types/src/relationships.d.ts +2 -2
- package/dist/types/src/runtime-schema.d.ts +1 -1
- package/dist/types/src/schema-transform.d.ts +1 -1
- package/dist/types/src/schema-util.d.ts +2 -2
- package/dist/types/src/schemas/index.d.ts +2 -2
- package/dist/types/src/service-dependencies.d.ts +2 -2
- package/dist/types/src/services/services.d.ts +3 -3
- package/dist/types/src/services/util.d.ts +2 -2
- package/dist/types/src/template-shapes/index.d.ts +2 -2
- package/dist/types/src/template-shapes/names.d.ts +1 -1
- package/dist/types/src/template-shapes/types.d.ts +2 -2
- package/dist/types/src/template-shapes/where.d.ts +1 -1
- package/dist/types/src/types/transforms.d.ts +1 -1
- package/dist/types/src/types/types.d.ts +4 -4
- package/dist/types/src/types/utils.d.ts +2 -2
- package/dist/types/src/unions.d.ts +2 -2
- package/dist/types/src/util/ai-tools.d.ts +1 -1
- package/dist/types/src/util/api-indexing.d.ts +1 -1
- package/dist/types/src/util/detect-cycles.d.ts +1 -1
- package/dist/types/src/util/find-shape-at-path.d.ts +1 -1
- package/dist/types/src/util/form-config.d.ts +1 -1
- package/dist/types/src/util/get-conflicting-properties.d.ts +1 -1
- package/dist/types/src/util/get-return-shape.d.ts +1 -1
- package/dist/types/src/util/has-arg.d.ts +2 -2
- package/dist/types/src/util/merge.d.ts +1 -1
- package/dist/types/src/util/patch-schema.d.ts +2 -2
- package/dist/types/src/util/shapes.d.ts +1 -1
- package/dist/types/src/validate.d.ts +4 -4
- package/dist/types/src/workflows.d.ts +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/examples/latest/agent-schema.json +5 -13
- package/examples/latest/all-fields-shapes-inline.json +19 -53
- package/examples/latest/all-fields-shapes.json +27 -77
- package/examples/latest/betzino.json +903 -3140
- package/examples/latest/blog-schema.json +9 -29
- package/examples/latest/brewery-schema.json +8 -26
- package/examples/latest/clear-cache-schema.json +4 -8
- package/examples/latest/complex-project-schema.json +99 -360
- package/examples/latest/complex-schema.json +487 -1754
- package/examples/latest/edit-schema.json +5 -12
- package/examples/latest/fabric-ecommerce.json +188 -839
- package/examples/latest/frank-and-fred-schema.json +489 -1756
- package/examples/latest/klirr-schema.json +683 -2412
- package/examples/latest/layers/rick-and-morty-layer.json +12 -33
- package/examples/latest/layers/shopify-layer-2023-01.json +2207 -8638
- package/examples/latest/layers/shopify-storefront-2023-04.json +403 -1713
- package/examples/latest/layers/wordpress-2024-01.json +689 -2744
- package/examples/latest/massive-schema.json +132 -585
- package/examples/latest/mill-components-schema.json +30 -126
- package/examples/latest/nested-shape-arrays.json +8 -20
- package/examples/latest/one-earth.json +237 -1114
- package/examples/latest/pet-oneof-array.json +8 -23
- package/examples/latest/post-schema.json +7 -21
- package/examples/latest/pruned-shopify-product-schema.json +186 -831
- package/examples/latest/rag-example.json +6 -16
- package/examples/latest/real-world-schema.json +15 -57
- package/examples/latest/recursive-repeater-schema.json +5 -12
- package/examples/latest/recursive-schema.json +5 -12
- package/examples/latest/rick-and-morty-ast.json +46 -175
- package/examples/latest/rick-and-morty-graphql.json +26 -101
- package/examples/latest/rick-and-morty-rest.json +4 -8
- package/examples/latest/rick-and-morty-with-indexing.json +6 -14
- package/examples/latest/schema-where-filter.json +12 -41
- package/examples/latest/schema-with-repeater-draftjs.json +4 -9
- package/examples/latest/schema-with-rick-and-morty.json +3 -5
- package/examples/latest/shape-books-v3_2_0.json +18 -72
- package/examples/latest/shape-books.json +18 -72
- package/examples/latest/shape-editor-schema-edited.json +24 -70
- package/examples/latest/shape-editor-schema-initial.json +11 -29
- package/examples/latest/shapedb-crud-every-prop-type.json +9 -23
- package/examples/latest/shopify-lookbook.json +6 -20
- package/examples/latest/shopify-product-2022-07.json +727 -3218
- package/examples/latest/shopify-product-2023-04.json +1013 -4497
- package/examples/latest/shopify-store-with-widget.json +214 -943
- package/examples/latest/stripe-product-runtime-schema.json +82 -278
- package/examples/latest/stripe-starter-resolved.json +477 -1954
- package/examples/latest/user-schema-no-required.json +4 -14
- package/examples/latest/user-schema-with-defaults.json +6 -28
- package/examples/latest/valvoline-ai-demo.json +18 -70
- package/examples/latest/vector-search-schema.json +9 -25
- package/examples/source/agent-schema.json +29 -16
- package/examples/source/all-fields-shapes-inline.json +21 -30
- package/examples/source/all-fields-shapes.json +26 -76
- package/examples/source/betzino.json +1501 -4960
- package/examples/source/blog-schema.json +1 -1
- package/examples/source/brewery-schema.json +1 -1
- package/examples/source/clear-cache-schema.json +4 -4
- package/examples/source/complex-project-schema.json +196 -688
- package/examples/source/edit-schema.json +3 -3
- package/examples/source/fabric-ecommerce.json +186 -837
- package/examples/source/frank-and-fred-schema.json +1136 -3929
- package/examples/source/layers/rick-and-morty-layer.json +10 -31
- package/examples/source/layers/shopify-layer-2023-01.json +2205 -8636
- package/examples/source/layers/shopify-storefront-2023-04.json +401 -1711
- package/examples/source/layers/wordpress-2024-01.json +689 -2743
- package/examples/source/massive-schema.json +386 -1455
- package/examples/source/nested-shape-arrays.json +12 -12
- package/examples/source/pet-oneof-array.json +31 -29
- package/examples/source/post-schema.json +1 -1
- package/examples/source/pruned-shopify-product-schema.json +184 -829
- package/examples/source/rag-example.json +5 -15
- package/examples/source/real-world-schema.json +32 -119
- package/examples/source/recursive-repeater-schema.json +3 -8
- package/examples/source/recursive-schema.json +1 -1
- package/examples/source/rick-and-morty-ast.json +66 -251
- package/examples/source/rick-and-morty-graphql.json +41 -162
- package/examples/source/rick-and-morty-rest.json +24 -6
- package/examples/source/rick-and-morty-with-indexing.json +25 -25
- package/examples/source/schema-where-filter.json +29 -50
- package/examples/source/schema-with-repeater-draftjs.json +9 -31
- package/examples/source/schema-with-rick-and-morty.json +4 -4
- package/examples/source/shape-books.json +49 -181
- package/examples/source/shape-editor-schema-edited.json +22 -68
- package/examples/source/shape-editor-schema-initial.json +9 -27
- package/examples/source/shapedb-crud-every-prop-type.json +20 -29
- package/examples/source/shopify-product-2022-07.json +736 -3261
- package/examples/source/shopify-product-2023-04.json +1022 -4540
- package/examples/source/shopify-store-with-widget.json +212 -941
- package/examples/source/stripe-product-runtime-schema.json +91 -321
- package/examples/source/stripe-starter-resolved.json +475 -1952
- package/examples/source/user-schema-with-defaults.json +1 -9
- package/examples/source/valvoline-ai-demo.json +175 -219
- package/examples/source/vector-search-schema.json +37 -38
- package/examples/v4_0_0/rick-and-morty-notes/flattened-schema.json +15 -49
- package/examples/v4_0_0/rick-and-morty-notes/layers/character-notes.json +8 -8
- package/examples/v4_0_0/rick-and-morty-notes/layers/takeshape-builtins.json +1 -3
- package/examples/v4_0_0/rick-and-morty-notes/layers/takeshape-static-sites.json +19 -79
- package/examples/v4_0_0/rick-and-morty-notes/schema.json +8 -5
- package/examples/v4_0_0/shopify-lookbook/flattened-schema.json +190 -851
- package/examples/v4_0_0/shopify-lookbook/layers/andrews-store.json +1103 -4431
- package/examples/v4_0_0/shopify-lookbook/layers/lookbook.json +64 -56
- package/examples/v4_0_0/shopify-lookbook/layers/takeshape-assets.json +1 -4
- package/examples/v4_0_0/shopify-lookbook/layers/takeshape-builtins.json +1 -3
- package/examples/v4_0_0/shopify-lookbook/schema.json +3 -10
- package/package.json +12 -9
package/dist/cjs/src/agents.js
CHANGED
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.addAiQueries = exports.createArgs = exports.removeBuiltInArgs = exports.getInspectAgentSessionQueryName = exports.getAgentEndStates = exports.getAgentEndTransitions = exports.BUILT_IN_CHAT_ARG_NAMES = exports.BUILT_IN_CHAT_ARGS = exports.END_AGENT_EXECUTION = void 0;
|
|
7
|
-
const upperFirst_js_1 = __importDefault(require("lodash/upperFirst.js"));
|
|
8
7
|
const uniq_js_1 = __importDefault(require("lodash/uniq.js"));
|
|
9
8
|
const uniqBy_js_1 = __importDefault(require("lodash/uniqBy.js"));
|
|
9
|
+
const upperFirst_js_1 = __importDefault(require("lodash/upperFirst.js"));
|
|
10
10
|
exports.END_AGENT_EXECUTION = 'endAgentExecution';
|
|
11
11
|
exports.BUILT_IN_CHAT_ARGS = [
|
|
12
12
|
{
|
|
@@ -19,7 +19,7 @@ exports.BUILT_IN_CHAT_ARGS = [
|
|
|
19
19
|
argType: 'sessionId'
|
|
20
20
|
}
|
|
21
21
|
];
|
|
22
|
-
exports.BUILT_IN_CHAT_ARG_NAMES = exports.BUILT_IN_CHAT_ARGS.map(arg => arg.argName);
|
|
22
|
+
exports.BUILT_IN_CHAT_ARG_NAMES = exports.BUILT_IN_CHAT_ARGS.map((arg) => arg.argName);
|
|
23
23
|
const transitionCanEnd = (transition, includeSuspend = false) => {
|
|
24
24
|
if (!transition || transition.length === 0) {
|
|
25
25
|
return true;
|
|
@@ -59,11 +59,11 @@ const getInspectAgentSessionQueryName = (agentName) => {
|
|
|
59
59
|
};
|
|
60
60
|
exports.getInspectAgentSessionQueryName = getInspectAgentSessionQueryName;
|
|
61
61
|
const removeBuiltInArgs = (args) => {
|
|
62
|
-
return args.filter(arg => !exports.BUILT_IN_CHAT_ARG_NAMES.includes(arg.argName));
|
|
62
|
+
return args.filter((arg) => !exports.BUILT_IN_CHAT_ARG_NAMES.includes(arg.argName));
|
|
63
63
|
};
|
|
64
64
|
exports.removeBuiltInArgs = removeBuiltInArgs;
|
|
65
65
|
const createArgs = (agent) => {
|
|
66
|
-
let apiArguments = (0, uniqBy_js_1.default)(agent.api.arguments ?? [], arg => arg.argName);
|
|
66
|
+
let apiArguments = (0, uniqBy_js_1.default)(agent.api.arguments ?? [], (arg) => arg.argName);
|
|
67
67
|
if (agent.api.type === 'chat') {
|
|
68
68
|
apiArguments = (0, exports.removeBuiltInArgs)(apiArguments).concat(exports.BUILT_IN_CHAT_ARGS);
|
|
69
69
|
}
|
|
@@ -76,7 +76,7 @@ const createArgs = (agent) => {
|
|
|
76
76
|
};
|
|
77
77
|
return acc;
|
|
78
78
|
}, {}),
|
|
79
|
-
required: apiArguments.filter(arg => arg.required).map(arg => arg.argName)
|
|
79
|
+
required: apiArguments.filter((arg) => arg.required).map((arg) => arg.argName)
|
|
80
80
|
}
|
|
81
81
|
: undefined;
|
|
82
82
|
};
|
|
@@ -96,7 +96,7 @@ function addAiQueries(projectSchema) {
|
|
|
96
96
|
// TODO In the future the agent will have a return type defined and we will instead validate
|
|
97
97
|
// that all the return states will return the correct shape.
|
|
98
98
|
const returnStates = [...(0, exports.getAgentEndStates)(agent, true)];
|
|
99
|
-
const returnTypes = (0, uniq_js_1.default)(returnStates.map(stateId => {
|
|
99
|
+
const returnTypes = (0, uniq_js_1.default)(returnStates.map((stateId) => {
|
|
100
100
|
const { execution } = agent.states[stateId];
|
|
101
101
|
if (execution.type === 'chat') {
|
|
102
102
|
return 'TSChatResponse';
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.whereClauseEnabled = exports.workflowsEnabled = exports.createVersionPredicate = void 0;
|
|
7
|
-
const gte_js_1 = __importDefault(require("semver/functions/gte.js"));
|
|
8
7
|
const coerce_js_1 = __importDefault(require("semver/functions/coerce.js"));
|
|
8
|
+
const gte_js_1 = __importDefault(require("semver/functions/gte.js"));
|
|
9
9
|
const createVersionPredicate = (featureVersion, comparison) => {
|
|
10
10
|
const coercedFeatureVersion = (0, coerce_js_1.default)(featureVersion);
|
|
11
11
|
if (!coercedFeatureVersion) {
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getPropertyInfo = exports.getContentTransform = exports.findTransforms = exports.preferSourceKey = exports.preferName = exports.preferKey = exports.getType = void 0;
|
|
7
|
-
const forEach_js_1 = __importDefault(require("lodash/forEach.js"));
|
|
8
7
|
const difference_js_1 = __importDefault(require("lodash/difference.js"));
|
|
9
|
-
const
|
|
8
|
+
const forEach_js_1 = __importDefault(require("lodash/forEach.js"));
|
|
10
9
|
const get_js_1 = __importDefault(require("lodash/get.js"));
|
|
10
|
+
const pick_js_1 = __importDefault(require("lodash/pick.js"));
|
|
11
|
+
const refs_1 = require("./refs");
|
|
11
12
|
const schema_util_1 = require("./schema-util");
|
|
12
13
|
const utils_1 = require("./types/utils");
|
|
13
|
-
const refs_1 = require("./refs");
|
|
14
14
|
const unions_1 = require("./unions");
|
|
15
15
|
const typeCache = new WeakMap();
|
|
16
16
|
function getType(schema) {
|
|
@@ -21,9 +21,9 @@ function getType(schema) {
|
|
|
21
21
|
type = schema.type;
|
|
22
22
|
// Handle nullable types for example: ['object', 'null']
|
|
23
23
|
if (Array.isArray(type)) {
|
|
24
|
-
const filtered = type.filter(name => name !== 'null');
|
|
24
|
+
const filtered = type.filter((name) => name !== 'null');
|
|
25
25
|
if (!filtered.length) {
|
|
26
|
-
throw new Error(
|
|
26
|
+
throw new Error('Invalid schema');
|
|
27
27
|
}
|
|
28
28
|
type = filtered[0];
|
|
29
29
|
}
|
|
@@ -41,16 +41,16 @@ exports.preferKey = preferKey;
|
|
|
41
41
|
/**
|
|
42
42
|
* A key transform to select the field name
|
|
43
43
|
*/
|
|
44
|
-
const preferName = name => name;
|
|
44
|
+
const preferName = (name) => name;
|
|
45
45
|
exports.preferName = preferName;
|
|
46
46
|
function getLocalizedKey(key, locale) {
|
|
47
47
|
return locale ? `${key}:${locale}` : key;
|
|
48
48
|
}
|
|
49
49
|
function getNonDefaultLocales(projectSchema) {
|
|
50
|
-
return projectSchema.locales.filter(locale => locale !== projectSchema.defaultLocale);
|
|
50
|
+
return projectSchema.locales.filter((locale) => locale !== projectSchema.defaultLocale);
|
|
51
51
|
}
|
|
52
52
|
function getLocalizedSourceKeys(keys, locales) {
|
|
53
|
-
return keys.flatMap(key => [{ key }, ...locales.map(locale => ({ key: `${key}:${locale}`, locale }))]);
|
|
53
|
+
return keys.flatMap((key) => [{ key }, ...locales.map((locale) => ({ key: `${key}:${locale}`, locale }))]);
|
|
54
54
|
}
|
|
55
55
|
function preferSourceKey(name, schema) {
|
|
56
56
|
const key = (0, schema_util_1.getStorageKey)(schema);
|
|
@@ -61,7 +61,7 @@ function findTransforms(pluginMap, schema, name, shape) {
|
|
|
61
61
|
const type = getType(schema);
|
|
62
62
|
if (pluginMap && (pluginMap[type] ?? pluginMap['*'])) {
|
|
63
63
|
const plugins = (pluginMap[type] ?? []).concat(pluginMap['*'] ?? []);
|
|
64
|
-
return plugins.find(plugin => plugin.filter(schema, name, shape));
|
|
64
|
+
return plugins.find((plugin) => plugin.filter(schema, name, shape));
|
|
65
65
|
}
|
|
66
66
|
return undefined;
|
|
67
67
|
}
|
|
@@ -72,9 +72,9 @@ function getContentTransform({ transforms, accumulators, keyTransform = preferKe
|
|
|
72
72
|
const shapeName = (0, refs_1.getRefShapeName)(projectSchema, schema);
|
|
73
73
|
schema = (0, refs_1.dereferenceSchema)(projectSchema, schema);
|
|
74
74
|
if (accumulators) {
|
|
75
|
-
|
|
75
|
+
for (const accumulator of accumulators) {
|
|
76
76
|
accumulator.accumulate(obj, schema, name);
|
|
77
|
-
}
|
|
77
|
+
}
|
|
78
78
|
}
|
|
79
79
|
const shape = shapeName ? projectSchema.shapes[shapeName] : undefined;
|
|
80
80
|
const transform = findTransforms(transforms, schema, name, shape);
|
|
@@ -117,7 +117,7 @@ function getContentTransform({ transforms, accumulators, keyTransform = preferKe
|
|
|
117
117
|
if ((0, utils_1.isArraySchema)(schema)) {
|
|
118
118
|
const itemSchema = schema.items;
|
|
119
119
|
if (Array.isArray(obj)) {
|
|
120
|
-
return obj.map(item => prepare(itemSchema, item, name));
|
|
120
|
+
return obj.map((item) => prepare(itemSchema, item, name));
|
|
121
121
|
}
|
|
122
122
|
if (obj === undefined) {
|
|
123
123
|
prepare(itemSchema, obj, name);
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createInputSchema = void 0;
|
|
7
|
-
const defaults_js_1 = __importDefault(require("lodash/fp/defaults.js"));
|
|
8
7
|
const util_1 = require("@takeshape/util");
|
|
8
|
+
const defaults_js_1 = __importDefault(require("lodash/fp/defaults.js"));
|
|
9
9
|
const inputSchemaCache = new Map();
|
|
10
10
|
function getInputSchemaCache(options) {
|
|
11
11
|
// Ensure key order does not invalidate the cache
|
package/dist/cjs/src/enum.js
CHANGED
|
@@ -6,7 +6,7 @@ function isEnumLikeSchema(schema) {
|
|
|
6
6
|
return true;
|
|
7
7
|
}
|
|
8
8
|
if (schema.oneOf) {
|
|
9
|
-
return schema.oneOf.every(optionSchema => optionSchema.title !== undefined && (optionSchema.enum ?? optionSchema.const));
|
|
9
|
+
return schema.oneOf.every((optionSchema) => optionSchema.title !== undefined && (optionSchema.enum ?? optionSchema.const));
|
|
10
10
|
}
|
|
11
11
|
return false;
|
|
12
12
|
}
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.flattenTemplates = void 0;
|
|
7
|
-
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
8
7
|
const util_1 = require("@takeshape/util");
|
|
9
|
-
const
|
|
10
|
-
const schema_util_1 = require("./schema-util");
|
|
8
|
+
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
11
9
|
const refs_1 = require("./refs");
|
|
10
|
+
const schema_util_1 = require("./schema-util");
|
|
11
|
+
const template_shapes_1 = require("./template-shapes");
|
|
12
12
|
function flattenTemplates(projectSchema) {
|
|
13
|
-
const templateRefs = (0, schema_util_1.getAllRefs)(projectSchema, ref => Boolean(ref.template));
|
|
13
|
+
const templateRefs = (0, schema_util_1.getAllRefs)(projectSchema, (ref) => Boolean(ref.template));
|
|
14
14
|
if (!templateRefs.length) {
|
|
15
15
|
return projectSchema;
|
|
16
16
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getIsLeaf = void 0;
|
|
4
4
|
const content_schema_transform_1 = require("./content-schema-transform");
|
|
5
|
-
const schema_util_1 = require("./schema-util");
|
|
6
5
|
const refs_1 = require("./refs");
|
|
6
|
+
const schema_util_1 = require("./schema-util");
|
|
7
7
|
const types_1 = require("./types");
|
|
8
8
|
const scalarTags = new Set(['draftjs']);
|
|
9
9
|
function isLeafTypeV3(projectSchema, propertySchema) {
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getPossibleShapeNames = exports.interfaceToUnion = exports.getImplementingShapes = exports.pruneUnusedInterfaces = exports.getImplementationShapeNameMap = exports.getImplementationShapeMap = exports.isInterfaceRef = exports.isInterfaceShape = void 0;
|
|
7
|
-
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
8
7
|
const util_1 = require("@takeshape/util");
|
|
8
|
+
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
9
9
|
const refs_1 = require("./refs");
|
|
10
10
|
const unions_1 = require("./unions");
|
|
11
11
|
function isInterfaceShape(shape) {
|
|
@@ -35,18 +35,18 @@ function getImplementationsHelper(shapeMap, mapFn) {
|
|
|
35
35
|
return result;
|
|
36
36
|
}
|
|
37
37
|
function getImplementationShapeMap(shapeMap) {
|
|
38
|
-
return getImplementationsHelper(shapeMap, x => x);
|
|
38
|
+
return getImplementationsHelper(shapeMap, (x) => x);
|
|
39
39
|
}
|
|
40
40
|
exports.getImplementationShapeMap = getImplementationShapeMap;
|
|
41
41
|
function getImplementationShapeNameMap(shapeMap) {
|
|
42
|
-
return getImplementationsHelper(shapeMap, shape => shape.name);
|
|
42
|
+
return getImplementationsHelper(shapeMap, (shape) => shape.name);
|
|
43
43
|
}
|
|
44
44
|
exports.getImplementationShapeNameMap = getImplementationShapeNameMap;
|
|
45
45
|
function pruneUnusedInterfaces(projectSchema, shapeMap) {
|
|
46
|
-
return (0, mapValues_js_1.default)(shapeMap, shape => {
|
|
46
|
+
return (0, mapValues_js_1.default)(shapeMap, (shape) => {
|
|
47
47
|
const { interfaces } = shape;
|
|
48
48
|
if (interfaces?.length) {
|
|
49
|
-
const filteredInterfaces = interfaces.filter(refExpression => shapeMap[(0, refs_1.refItemToNamespacedShapeName)((0, refs_1.refExpressionToRefItem)(projectSchema, refExpression))]);
|
|
49
|
+
const filteredInterfaces = interfaces.filter((refExpression) => shapeMap[(0, refs_1.refItemToNamespacedShapeName)((0, refs_1.refExpressionToRefItem)(projectSchema, refExpression))]);
|
|
50
50
|
if (interfaces.length !== filteredInterfaces.length) {
|
|
51
51
|
return { ...shape, interfaces: filteredInterfaces };
|
|
52
52
|
}
|
|
@@ -62,7 +62,7 @@ function getImplementingShapes(context, interfaceRef) {
|
|
|
62
62
|
const shapeMap = context.shapes;
|
|
63
63
|
const implementingShapes = [];
|
|
64
64
|
for (const shape of Object.values(shapeMap)) {
|
|
65
|
-
if (shape.interfaces?.find(interfaceRefExpression => compareRefItems((0, refs_1.refExpressionToRefItem)(context, interfaceRefExpression), interfaceRef))) {
|
|
65
|
+
if (shape.interfaces?.find((interfaceRefExpression) => compareRefItems((0, refs_1.refExpressionToRefItem)(context, interfaceRefExpression), interfaceRef))) {
|
|
66
66
|
implementingShapes.push(shape);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -72,18 +72,20 @@ exports.getImplementingShapes = getImplementingShapes;
|
|
|
72
72
|
function interfaceToUnion(context, interfaceRef) {
|
|
73
73
|
const shapes = getImplementingShapes(context, interfaceRef);
|
|
74
74
|
return {
|
|
75
|
-
oneOf: shapes.map(shape => ({
|
|
75
|
+
oneOf: shapes.map((shape) => ({
|
|
76
|
+
'@ref': (0, refs_1.normalizeRefExpression)(context, shape.name)
|
|
77
|
+
}))
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
80
|
exports.interfaceToUnion = interfaceToUnion;
|
|
79
81
|
function getPossibleShapeNames(projectSchema, shape) {
|
|
80
82
|
let names;
|
|
81
83
|
if (isInterfaceShape(shape)) {
|
|
82
|
-
names = getImplementingShapes(projectSchema, (0, refs_1.shapeToRefItem)(projectSchema, shape)).map(shape => shape.name);
|
|
84
|
+
names = getImplementingShapes(projectSchema, (0, refs_1.shapeToRefItem)(projectSchema, shape)).map((shape) => shape.name);
|
|
83
85
|
}
|
|
84
86
|
else if ((0, unions_1.isUnionSchema)(shape.schema)) {
|
|
85
87
|
names = shape.schema.oneOf
|
|
86
|
-
.map(member => {
|
|
88
|
+
.map((member) => {
|
|
87
89
|
const ref = (0, refs_1.getRef)(projectSchema, member);
|
|
88
90
|
return ref && (0, refs_1.refItemToNamespacedShapeName)(ref);
|
|
89
91
|
})
|
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.flattenSchema = exports.collectReferencedShapeNames = exports.getAllRefs = exports.getAllRefsInQueries = exports.getAllRefsInQuery = exports.getAllRefsInShapes = exports.isObjectSchemaV4_0_0 = void 0;
|
|
7
|
-
const minimatch_1 = __importDefault(require("minimatch"));
|
|
8
7
|
const util_1 = require("@takeshape/util");
|
|
9
|
-
const uniq_js_1 = __importDefault(require("lodash/uniq.js"));
|
|
10
8
|
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
9
|
+
const uniq_js_1 = __importDefault(require("lodash/uniq.js"));
|
|
10
|
+
const minimatch_1 = __importDefault(require("minimatch"));
|
|
11
11
|
const refs_1 = require("../refs");
|
|
12
12
|
const refs_2 = require("./refs");
|
|
13
13
|
const type_utils_1 = require("./type-utils");
|
|
@@ -171,7 +171,7 @@ function collectReferencedShapeNames(layerId, refSet) {
|
|
|
171
171
|
}
|
|
172
172
|
exports.collectReferencedShapeNames = collectReferencedShapeNames;
|
|
173
173
|
function collectServiceRefs(flattenedSchema, getLayer) {
|
|
174
|
-
const refs = new Set(getAllRefs(flattenedSchema, refItem => refItem.layerId !== 'local').map(refs_2.refItemToString));
|
|
174
|
+
const refs = new Set(getAllRefs(flattenedSchema, (refItem) => refItem.layerId !== 'local').map(refs_2.refItemToString));
|
|
175
175
|
if (refs.size) {
|
|
176
176
|
for (const ref of refs) {
|
|
177
177
|
const [layerId, shapeName] = (0, refs_2.splitAtRef)(ref);
|
|
@@ -190,7 +190,13 @@ function ensureServiceLayer(flattenedSchema, layerId) {
|
|
|
190
190
|
flattenedSchema.serviceLayers ||= {};
|
|
191
191
|
let serviceLayer = flattenedSchema.serviceLayers[layerId];
|
|
192
192
|
if (!serviceLayer) {
|
|
193
|
-
serviceLayer = {
|
|
193
|
+
serviceLayer = {
|
|
194
|
+
layerId,
|
|
195
|
+
schemaVersion: '4.0.0',
|
|
196
|
+
shapes: {},
|
|
197
|
+
queries: {},
|
|
198
|
+
mutations: {}
|
|
199
|
+
};
|
|
194
200
|
flattenedSchema.serviceLayers[layerId] = serviceLayer;
|
|
195
201
|
}
|
|
196
202
|
return serviceLayer;
|
|
@@ -252,7 +258,7 @@ function flattenSchema(projectSchema, getLayer) {
|
|
|
252
258
|
};
|
|
253
259
|
const filteredLayers = layers
|
|
254
260
|
.reverse()
|
|
255
|
-
.map(layer => {
|
|
261
|
+
.map((layer) => {
|
|
256
262
|
const config = typeof layer === 'string' ? { ...layerDefaults, id: layer } : layer;
|
|
257
263
|
const layerSchema = getLayer(config.id);
|
|
258
264
|
if (!layerSchema) {
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.parseReturnShape = exports.dereferenceSchema = exports.getArgsReferenceWithPath = exports.hasResolvableRef = exports.hasRef = exports.followRef = exports.omitRefAndExtend = exports.refItemToShape = exports.refItemToString = exports.getRefOrItemsRef = exports.hasRefProperty = exports.getRefWithPath = exports.getRef = exports.atRefToRefItem = exports.splitAtRef = exports.refExpressionToShape = exports.refExpressionToRefItem = void 0;
|
|
7
|
+
const util_1 = require("@takeshape/util");
|
|
7
8
|
const assign_js_1 = __importDefault(require("lodash/fp/assign.js"));
|
|
8
9
|
const omit_js_1 = __importDefault(require("lodash/fp/omit.js"));
|
|
9
|
-
const util_1 = require("@takeshape/util");
|
|
10
10
|
const isEmpty_js_1 = __importDefault(require("lodash/isEmpty.js"));
|
|
11
11
|
const refs_1 = require("../refs");
|
|
12
12
|
const type_utils_1 = require("./type-utils");
|
|
@@ -169,10 +169,10 @@ function hasResolvableRef(shapes, contentSchema) {
|
|
|
169
169
|
return Boolean(refItemToShape(shapes, getRef(contentSchema)));
|
|
170
170
|
}
|
|
171
171
|
if ((0, type_utils_1.isAllOfSchema)(contentSchema)) {
|
|
172
|
-
return Boolean(contentSchema.allOf.find(s => hasResolvableRef(shapes, s)));
|
|
172
|
+
return Boolean(contentSchema.allOf.find((s) => hasResolvableRef(shapes, s)));
|
|
173
173
|
}
|
|
174
174
|
if ((0, type_utils_1.isOneOfSchema)(contentSchema)) {
|
|
175
|
-
return Boolean(contentSchema.oneOf.find(s => hasResolvableRef(shapes, s)));
|
|
175
|
+
return Boolean(contentSchema.oneOf.find((s) => hasResolvableRef(shapes, s)));
|
|
176
176
|
}
|
|
177
177
|
return false;
|
|
178
178
|
}
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.isObjectSchema = exports.isArraySchema = exports.isOneOfSchema = exports.isAllOfSchema = exports.isRefSchema = exports.isParameterSerializeStyleOptions = exports.isParameterOpOp = exports.isParameterOpValue = exports.isParameterOpMapping = exports.isParameterOpNested = exports.isParameterOp = exports.isParameterSerializeContentOptions = exports.isDirectiveConfig = exports.isDirectiveMappingArray = exports.isDirectiveMappingMap = exports.isUtilResolver = exports.isAwsLambdaResolver = exports.isRestResolver = exports.isGraphqlResolver = exports.isTakeshapeResolver = exports.isComposeResolver = exports.isBasicResolver = void 0;
|
|
7
7
|
const util_1 = require("@takeshape/util");
|
|
8
|
+
const isArray_js_1 = __importDefault(require("lodash/isArray.js"));
|
|
8
9
|
const isPlainObject_js_1 = __importDefault(require("lodash/isPlainObject.js"));
|
|
9
10
|
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
10
|
-
const isArray_js_1 = __importDefault(require("lodash/isArray.js"));
|
|
11
11
|
const schemas_1 = require("../schemas");
|
|
12
12
|
/** Resolver Type Utils **/
|
|
13
13
|
/**
|
|
@@ -76,6 +76,7 @@ const v3_47_0_1 = __importDefault(require("./to/v3.47.0"));
|
|
|
76
76
|
const v3_48_0_1 = __importDefault(require("./to/v3.48.0"));
|
|
77
77
|
const v3_49_0_1 = __importDefault(require("./to/v3.49.0"));
|
|
78
78
|
const v3_50_0_1 = __importDefault(require("./to/v3.50.0"));
|
|
79
|
+
const v3_51_0_1 = __importDefault(require("./to/v3.51.0"));
|
|
79
80
|
exports.migrateTo = {
|
|
80
81
|
'v3.0.0': v3_0_0_1.default,
|
|
81
82
|
'v3.1.0': v3_1_0_1.default,
|
|
@@ -134,7 +135,8 @@ exports.migrateTo = {
|
|
|
134
135
|
'v3.47.0': v3_47_0_1.default,
|
|
135
136
|
'v3.48.0': v3_48_0_1.default,
|
|
136
137
|
'v3.49.0': v3_49_0_1.default,
|
|
137
|
-
'v3.50.0': v3_50_0_1.default
|
|
138
|
+
'v3.50.0': v3_50_0_1.default,
|
|
139
|
+
'v3.51.0': v3_51_0_1.default
|
|
138
140
|
};
|
|
139
141
|
__exportStar(require("./utils"), exports);
|
|
140
142
|
exports.listTypePrefix = 'PaginatedList';
|
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const util_1 = require("@takeshape/util");
|
|
6
7
|
const forEach_js_1 = __importDefault(require("lodash/forEach.js"));
|
|
7
8
|
const pick_js_1 = __importDefault(require("lodash/pick.js"));
|
|
8
|
-
const util_1 = require("@takeshape/util");
|
|
9
9
|
const schema_util_1 = require("../../schema-util");
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const annotationMap = {
|
|
@@ -42,7 +42,6 @@ function getRelationshipSchema(relationship) {
|
|
|
42
42
|
'@relationship': relationship
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
// eslint-disable-next-line complexity
|
|
46
45
|
function migrateToContentSchemaV3(params) {
|
|
47
46
|
const { schema, service, name, key, setSource, omitAllSources } = params;
|
|
48
47
|
const { type } = schema;
|
|
@@ -51,12 +50,13 @@ function migrateToContentSchemaV3(params) {
|
|
|
51
50
|
if (annotationMap[key]) {
|
|
52
51
|
const newAnnotation = annotationMap[key];
|
|
53
52
|
schema[newAnnotation] = value;
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
55
53
|
delete schema[key];
|
|
56
54
|
}
|
|
57
55
|
});
|
|
58
56
|
if (type === 'string' || type === 'boolean' || type === 'number' || type === 'integer') {
|
|
59
|
-
return {
|
|
57
|
+
return {
|
|
58
|
+
schema: { ...(0, pick_js_1.default)(schema, schema_util_1.scalarSchemaKeys), '@mapping': mapping }
|
|
59
|
+
};
|
|
60
60
|
}
|
|
61
61
|
const { relationship } = schema;
|
|
62
62
|
if (relationship) {
|
|
@@ -74,10 +74,22 @@ function migrateToContentSchemaV3(params) {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
if (type === 'object' && schema.draftjs) {
|
|
77
|
-
return {
|
|
77
|
+
return {
|
|
78
|
+
schema: {
|
|
79
|
+
...(0, pick_js_1.default)(schema, schema_util_1.scalarSchemaKeys),
|
|
80
|
+
'@mapping': mapping,
|
|
81
|
+
'@tag': 'draftjs'
|
|
82
|
+
}
|
|
83
|
+
};
|
|
78
84
|
}
|
|
79
85
|
if (isColor(schema)) {
|
|
80
|
-
return {
|
|
86
|
+
return {
|
|
87
|
+
schema: {
|
|
88
|
+
...(0, pick_js_1.default)(schema, schema_util_1.scalarSchemaKeys),
|
|
89
|
+
$ref: '#/shapes/TSColor/schema',
|
|
90
|
+
'@mapping': mapping
|
|
91
|
+
}
|
|
92
|
+
};
|
|
81
93
|
}
|
|
82
94
|
if (type === 'object' && schema.properties) {
|
|
83
95
|
const properties = {};
|
|
@@ -184,11 +196,11 @@ const migrate = async (_, projectSchema) => {
|
|
|
184
196
|
const { contentTypes, created, updated, ...rest } = projectSchema;
|
|
185
197
|
const shapes = {};
|
|
186
198
|
const forms = {};
|
|
187
|
-
Object.keys(contentTypes)
|
|
199
|
+
for (const contentTypeId of Object.keys(contentTypes)) {
|
|
188
200
|
const contentType = contentTypes[contentTypeId];
|
|
189
201
|
Object.assign(shapes, contentTypeToShape(contentType, contentTypeId));
|
|
190
202
|
forms[(0, util_1.pascalCase)(contentType.name)] = contentType.forms;
|
|
191
|
-
}
|
|
203
|
+
}
|
|
192
204
|
// Use deepClone to drop undefined values, this improves compatibility with validation and testing
|
|
193
205
|
// Schemas are typically saved in Dynamo or JSON files which also remove undefined values
|
|
194
206
|
// Dropping them here is done for consistency's sake
|
|
@@ -3,24 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const util_1 = require("@takeshape/util");
|
|
7
7
|
const isObject_js_1 = __importDefault(require("lodash/isObject.js"));
|
|
8
8
|
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
9
9
|
const isUndefined_js_1 = __importDefault(require("lodash/isUndefined.js"));
|
|
10
|
-
const
|
|
10
|
+
const p_reduce_1 = __importDefault(require("p-reduce"));
|
|
11
11
|
const utils_1 = require("../../types/utils");
|
|
12
12
|
/**
|
|
13
13
|
* `graphql:my-key` `my-key`
|
|
14
14
|
*/
|
|
15
15
|
function parseV3ServiceStr(service) {
|
|
16
16
|
const parts = service.split(':');
|
|
17
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
provider: parts.length > 1 ? parts[0] : undefined,
|
|
19
|
+
id: parts.length > 1 ? parts[1] : parts[0]
|
|
20
|
+
};
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* Ensures a consistent service config, inluding updating the service
|
|
21
24
|
* authentication object.
|
|
22
25
|
*/
|
|
23
|
-
// eslint-disable-next-line complexity
|
|
24
26
|
function updateServiceConfigV3ToV3_1(serviceConfig, serviceKey) {
|
|
25
27
|
if ((0, utils_1.isAnyServiceConfig)(serviceConfig)) {
|
|
26
28
|
if ((0, isString_js_1.default)(serviceConfig.authentication) || (0, isUndefined_js_1.default)(serviceConfig.authentication)) {
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
7
6
|
const set_js_1 = __importDefault(require("lodash/fp/set.js"));
|
|
7
|
+
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
8
8
|
function $refToPath(ref) {
|
|
9
9
|
return ref.substr(2).split('/');
|
|
10
10
|
}
|
|
@@ -11,7 +11,7 @@ const migrate = async (_, projectSchema) => {
|
|
|
11
11
|
parent['@backreference'] = { enabled: true };
|
|
12
12
|
if (relationship.relatedName) {
|
|
13
13
|
parent['@backreference'].name = relationship.relatedName;
|
|
14
|
-
|
|
14
|
+
relationship.relatedName = undefined;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
return {
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const util_1 = require("@takeshape/util");
|
|
7
7
|
const get_js_1 = __importDefault(require("lodash/get.js"));
|
|
8
|
-
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
9
8
|
const omit_js_1 = __importDefault(require("lodash/omit.js"));
|
|
9
|
+
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
10
10
|
const migrate = async (_, projectSchema) => {
|
|
11
11
|
(0, util_1.visit)(projectSchema, ['@user'], (_, path) => {
|
|
12
12
|
const parentPath = path.slice(0, -1);
|
|
@@ -5,17 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const util_1 = require("@takeshape/util");
|
|
7
7
|
const get_js_1 = __importDefault(require("lodash/get.js"));
|
|
8
|
-
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
9
8
|
const omit_js_1 = __importDefault(require("lodash/omit.js"));
|
|
9
|
+
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
10
10
|
const migrate = async (_, projectSchema) => {
|
|
11
11
|
(0, util_1.visit)(projectSchema, ['@relationship'], (relationship, path) => {
|
|
12
12
|
const propertyPath = path.slice(0, -1);
|
|
13
13
|
const originalPropertySchema = (0, get_js_1.default)(projectSchema, propertyPath);
|
|
14
14
|
const propertySchema = (0, omit_js_1.default)(originalPropertySchema, ['@relationship', 'type', '$ref']);
|
|
15
|
-
const shapeIdMap = new Map(Object.values(projectSchema.shapes).map(shape => [shape.id, shape]));
|
|
15
|
+
const shapeIdMap = new Map(Object.values(projectSchema.shapes).map((shape) => [shape.id, shape]));
|
|
16
16
|
const shapeIdsToShapeRefs = (shapeIds) => {
|
|
17
17
|
return shapeIds
|
|
18
|
-
.map(shapeId => {
|
|
18
|
+
.map((shapeId) => {
|
|
19
19
|
let shape;
|
|
20
20
|
if (shapeId === 'ASSET') {
|
|
21
21
|
shape = { name: 'Asset' };
|
|
@@ -45,7 +45,7 @@ const migrate = async (_, projectSchema) => {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
|
|
48
|
+
propertySchema.type = undefined;
|
|
49
49
|
Object.assign(propertySchema, shapeRefsSchema);
|
|
50
50
|
propertySchema['@input'] = {
|
|
51
51
|
'@ref': 'local:TSRelationship'
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
7
6
|
const pick_js_1 = __importDefault(require("lodash/fp/pick.js"));
|
|
7
|
+
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
8
8
|
const pruneQuery = (0, pick_js_1.default)(['args', 'resolver', 'shape', 'description']);
|
|
9
9
|
const migrate = async (_, projectSchema) => {
|
|
10
10
|
/**
|
|
@@ -8,7 +8,7 @@ function updateGenericServices(projectSchema) {
|
|
|
8
8
|
if (projectSchema.services) {
|
|
9
9
|
return {
|
|
10
10
|
...projectSchema,
|
|
11
|
-
services: (0, mapValues_js_1.default)(projectSchema.services, serviceConfig =>
|
|
11
|
+
services: (0, mapValues_js_1.default)(projectSchema.services, (serviceConfig) =>
|
|
12
12
|
// generic provider has been renamed to match service type
|
|
13
13
|
serviceConfig.provider === 'generic' ? { ...serviceConfig, provider: serviceConfig.serviceType } : serviceConfig)
|
|
14
14
|
};
|
|
@@ -8,10 +8,13 @@ function updateGenericServices(projectSchema) {
|
|
|
8
8
|
if (projectSchema.services) {
|
|
9
9
|
return {
|
|
10
10
|
...projectSchema,
|
|
11
|
-
services: (0, mapValues_js_1.default)(projectSchema.services, serviceConfig =>
|
|
11
|
+
services: (0, mapValues_js_1.default)(projectSchema.services, (serviceConfig) =>
|
|
12
12
|
// generic provider has been renamed to match service type
|
|
13
13
|
serviceConfig.provider === 'shopify'
|
|
14
|
-
? {
|
|
14
|
+
? {
|
|
15
|
+
...serviceConfig,
|
|
16
|
+
options: { ...serviceConfig.options, legacyApp: true }
|
|
17
|
+
}
|
|
15
18
|
: serviceConfig)
|
|
16
19
|
};
|
|
17
20
|
}
|
|
@@ -21,7 +21,7 @@ const migrate = async (_, projectSchema) => {
|
|
|
21
21
|
ignoreFields,
|
|
22
22
|
maxDepth: objectDepthLimit
|
|
23
23
|
},
|
|
24
|
-
queries: (0, mapValues_js_1.default)(indexedShape.queries, config => config && (0, omit_js_1.default)(config, ['ignoreFields', 'objectDepthLimit']))
|
|
24
|
+
queries: (0, mapValues_js_1.default)(indexedShape.queries, (config) => config && (0, omit_js_1.default)(config, ['ignoreFields', 'objectDepthLimit']))
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const util_1 = require("@takeshape/util");
|
|
7
|
-
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
8
|
-
const last_js_1 = __importDefault(require("lodash/last.js"));
|
|
9
7
|
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
8
|
+
const last_js_1 = __importDefault(require("lodash/last.js"));
|
|
9
|
+
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
10
10
|
const unset_js_1 = __importDefault(require("lodash/unset.js"));
|
|
11
11
|
const TAKESHAPE_RESOLVERS = ['takeshape:getUser', 'takeshape:search', 'takeshape:queryApiIndex', 'util:wrap'];
|
|
12
12
|
function getServicePath(path) {
|
|
@@ -36,7 +36,9 @@ const migrate = async (_, projectSchema) => {
|
|
|
36
36
|
name,
|
|
37
37
|
id: name,
|
|
38
38
|
title: name,
|
|
39
|
-
schema: {
|
|
39
|
+
schema: {
|
|
40
|
+
extends: [{ '@ref': (0, refs_1.normalizeRefExpression)(projectSchema, name) }]
|
|
41
|
+
}
|
|
40
42
|
};
|
|
41
43
|
const loaders = queriesToLoaders(config.queries);
|
|
42
44
|
if (loaders) {
|