@takeshape/schema 10.4.6 → 10.4.14
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/api-version.d.ts +1 -1
- package/dist/api-version.d.ts.map +1 -1
- package/dist/builtin-schema.d.ts +2 -2
- package/dist/builtin-schema.d.ts.map +1 -1
- package/dist/content-schema-transform.d.ts +10 -10
- package/dist/content-schema-transform.d.ts.map +1 -1
- package/dist/content-schema-transform.js +1 -1
- package/dist/create-input-schema.d.ts +3 -3
- package/dist/create-input-schema.d.ts.map +1 -1
- package/dist/enum.d.ts +1 -1
- package/dist/enum.d.ts.map +1 -1
- package/dist/enum.js +1 -1
- package/dist/flatten-templates.d.ts +1 -1
- package/dist/flatten-templates.d.ts.map +1 -1
- package/dist/flatten-templates.js +2 -2
- package/dist/get-is-leaf.js +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -49
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js +2 -2
- package/dist/layers/layers.d.ts +2 -2
- package/dist/layers/layers.d.ts.map +1 -1
- package/dist/layers/layers.js +23 -27
- package/dist/layers/refs.d.ts +7 -7
- package/dist/layers/refs.d.ts.map +1 -1
- package/dist/layers/refs.js +2 -2
- package/dist/layers/type-utils.d.ts +1 -1
- package/dist/layers/type-utils.d.ts.map +1 -1
- package/dist/layers/visitor.d.ts +2 -2
- package/dist/layers/visitor.d.ts.map +1 -1
- package/dist/migration/to/v3.0.0.d.ts +1 -1
- package/dist/migration/to/v3.0.0.d.ts.map +1 -1
- package/dist/migration/to/v3.0.0.js +1 -1
- package/dist/migration/to/v3.1.0.d.ts +1 -1
- package/dist/migration/to/v3.1.0.d.ts.map +1 -1
- package/dist/migration/to/v3.10.0.d.ts.map +1 -1
- package/dist/migration/to/v3.11.0.d.ts.map +1 -1
- package/dist/migration/to/v3.13.0.d.ts.map +1 -1
- package/dist/migration/to/v3.17.0.d.ts +1 -1
- package/dist/migration/to/v3.17.0.d.ts.map +1 -1
- package/dist/migration/to/v3.17.1.d.ts +1 -1
- package/dist/migration/to/v3.17.1.d.ts.map +1 -1
- package/dist/migration/to/v3.18.0.d.ts +1 -1
- package/dist/migration/to/v3.18.0.d.ts.map +1 -1
- package/dist/migration/to/v3.18.1.d.ts.map +1 -1
- package/dist/migration/to/v3.18.2.d.ts.map +1 -1
- package/dist/migration/to/v3.19.0.d.ts +1 -1
- package/dist/migration/to/v3.19.0.d.ts.map +1 -1
- package/dist/migration/to/v3.20.0.d.ts.map +1 -1
- package/dist/migration/to/v3.21.0.d.ts +1 -1
- package/dist/migration/to/v3.21.0.d.ts.map +1 -1
- package/dist/migration/to/v3.22.0.d.ts +1 -1
- package/dist/migration/to/v3.22.0.d.ts.map +1 -1
- package/dist/migration/to/v3.23.0.d.ts +1 -1
- package/dist/migration/to/v3.23.0.d.ts.map +1 -1
- package/dist/migration/to/v3.24.0.d.ts +1 -1
- package/dist/migration/to/v3.24.0.d.ts.map +1 -1
- package/dist/migration/to/v3.25.0.d.ts +1 -1
- package/dist/migration/to/v3.25.0.d.ts.map +1 -1
- package/dist/migration/to/v3.26.0.d.ts +1 -1
- package/dist/migration/to/v3.26.0.d.ts.map +1 -1
- package/dist/migration/to/v3.27.0.d.ts +1 -1
- package/dist/migration/to/v3.27.0.d.ts.map +1 -1
- package/dist/migration/to/v3.28.0.d.ts +1 -1
- package/dist/migration/to/v3.28.0.d.ts.map +1 -1
- package/dist/migration/to/v3.29.0.d.ts +1 -1
- package/dist/migration/to/v3.29.0.d.ts.map +1 -1
- package/dist/migration/to/v3.30.0.d.ts +1 -1
- package/dist/migration/to/v3.30.0.d.ts.map +1 -1
- package/dist/migration/to/v3.31.0.d.ts +1 -1
- package/dist/migration/to/v3.31.0.d.ts.map +1 -1
- package/dist/migration/to/v3.32.0.d.ts +1 -1
- package/dist/migration/to/v3.32.0.d.ts.map +1 -1
- package/dist/migration/to/v3.32.0.js +10 -12
- package/dist/migration/to/v3.33.0.d.ts +1 -1
- package/dist/migration/to/v3.33.0.d.ts.map +1 -1
- package/dist/migration/to/v3.34.0.d.ts +1 -1
- package/dist/migration/to/v3.34.0.d.ts.map +1 -1
- package/dist/migration/to/v3.34.0.js +7 -10
- package/dist/migration/to/v3.35.0.d.ts +1 -1
- package/dist/migration/to/v3.35.0.d.ts.map +1 -1
- package/dist/migration/to/v3.36.0.d.ts +1 -1
- package/dist/migration/to/v3.36.0.d.ts.map +1 -1
- package/dist/migration/to/v3.36.0.js +13 -15
- package/dist/migration/to/v3.37.0.d.ts +1 -1
- package/dist/migration/to/v3.37.0.d.ts.map +1 -1
- package/dist/migration/to/v3.38.0.d.ts +1 -1
- package/dist/migration/to/v3.38.0.d.ts.map +1 -1
- package/dist/migration/to/v3.39.0.d.ts +1 -1
- package/dist/migration/to/v3.39.0.d.ts.map +1 -1
- package/dist/migration/to/v3.9.0.d.ts +1 -1
- package/dist/migration/to/v3.9.0.d.ts.map +1 -1
- package/dist/migration/types.d.ts +4 -4
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/migration/utils.js +1 -1
- package/dist/mocks.d.ts.map +1 -1
- package/dist/mocks.js +1 -1
- package/dist/models/project-schema.d.ts +4 -4
- package/dist/models/project-schema.d.ts.map +1 -1
- package/dist/models/project-schema.js +4 -4
- package/dist/models/query.d.ts +2 -2
- package/dist/models/query.d.ts.map +1 -1
- package/dist/models/service.d.ts +2 -2
- package/dist/models/service.d.ts.map +1 -1
- package/dist/models/shape.d.ts +3 -3
- package/dist/models/shape.d.ts.map +1 -1
- package/dist/patterns.d.ts +4 -4
- package/dist/patterns.d.ts.map +1 -1
- package/dist/refs.d.ts +14 -14
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +4 -4
- package/dist/relationships.d.ts.map +1 -1
- package/dist/relationships.js +2 -4
- package/dist/schema-transform.d.ts +1 -1
- package/dist/schema-transform.d.ts.map +1 -1
- package/dist/schema-transform.js +1 -1
- package/dist/schema-util.d.ts +7 -7
- package/dist/schema-util.d.ts.map +1 -1
- package/dist/schema-util.js +9 -9
- package/dist/services.d.ts +2 -3
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +2 -2
- package/dist/taxonomies.d.ts +4 -4
- package/dist/taxonomies.d.ts.map +1 -1
- package/dist/taxonomies.js +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 +1 -1
- package/dist/template-shapes/templates.d.ts.map +1 -1
- package/dist/template-shapes/templates.js +4 -4
- package/dist/template-shapes/types.d.ts +5 -5
- package/dist/template-shapes/types.d.ts.map +1 -1
- package/dist/template-shapes/where.d.ts +2 -2
- package/dist/template-shapes/where.d.ts.map +1 -1
- package/dist/template-shapes/where.js +3 -3
- package/dist/types/types.d.ts +22 -22
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +2 -2
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/utils.js +2 -2
- package/dist/unions.d.ts +3 -3
- package/dist/unions.d.ts.map +1 -1
- package/dist/unions.js +2 -2
- package/dist/util/api-indexing.d.ts +1 -1
- package/dist/util/api-indexing.d.ts.map +1 -1
- package/dist/util/api-indexing.js +1 -1
- package/dist/util/detect-cycles.d.ts +1 -1
- package/dist/util/detect-cycles.d.ts.map +1 -1
- package/dist/util/detect-cycles.js +1 -1
- package/dist/util/find-shape-at-path.d.ts +1 -1
- package/dist/util/find-shape-at-path.d.ts.map +1 -1
- package/dist/util/form-config.d.ts +2 -3
- package/dist/util/form-config.d.ts.map +1 -1
- package/dist/util/form-config.js +4 -8
- 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-conflicting-properties.js +1 -1
- package/dist/util/get-return-shape.d.ts +2 -2
- package/dist/util/get-return-shape.d.ts.map +1 -1
- 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 +1 -1
- package/dist/util/merge.d.ts.map +1 -1
- package/dist/util/merge.js +3 -5
- package/dist/util/patch-schema.d.ts +2 -2
- package/dist/util/patch-schema.d.ts.map +1 -1
- package/dist/validate.d.ts +11 -11
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +12 -13
- package/dist/workflows.d.ts +3 -3
- package/dist/workflows.d.ts.map +1 -1
- package/dist/workflows.js +4 -1
- package/es/content-schema-transform.js +1 -1
- package/es/enum.js +1 -1
- package/es/flatten-templates.js +2 -2
- package/es/get-is-leaf.js +1 -1
- package/es/index.js +3 -3
- package/es/interfaces.js +2 -2
- package/es/layers/layers.js +4 -8
- package/es/layers/refs.js +2 -2
- package/es/migration/to/v3.0.0.js +1 -1
- package/es/migration/to/v3.32.0.js +10 -12
- package/es/migration/to/v3.34.0.js +7 -10
- package/es/migration/to/v3.36.0.js +13 -15
- package/es/migration/utils.js +1 -1
- package/es/mocks.js +1 -1
- package/es/models/project-schema.js +4 -4
- package/es/models/shape.js +0 -1
- package/es/refs.js +4 -4
- package/es/relationships.js +2 -4
- package/es/schema-transform.js +1 -1
- package/es/schema-util.js +9 -9
- package/es/services.js +2 -2
- package/es/taxonomies.js +1 -1
- package/es/template-shapes/templates.js +4 -4
- package/es/template-shapes/where.js +3 -3
- package/es/types/utils.js +2 -3
- package/es/unions.js +2 -2
- package/es/util/api-indexing.js +1 -1
- package/es/util/detect-cycles.js +1 -1
- package/es/util/form-config.js +4 -8
- package/es/util/get-conflicting-properties.js +1 -1
- package/es/util/merge.js +3 -5
- package/es/validate.js +12 -13
- package/es/workflows.js +4 -1
- package/package.json +6 -6
package/dist/api-version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import SemVer from 'semver/classes/semver';
|
|
1
|
+
import type SemVer from 'semver/classes/semver';
|
|
2
2
|
export type VersionCompareFn = (apiVersion: string | SemVer, featureVersion: string | SemVer) => boolean;
|
|
3
3
|
export declare const createVersionPredicate: (featureVersion: string | SemVer, comparison: VersionCompareFn) => (apiVersion: string | SemVer) => boolean;
|
|
4
4
|
export declare const workflowsEnabled: (apiVersion: string | SemVer) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-version.d.ts","sourceRoot":"","sources":["../../src/api-version.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"api-version.d.ts","sourceRoot":"","sources":["../../src/api-version.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAC;AAEzG,eAAO,MAAM,sBAAsB,mBACjB,MAAM,GAAG,MAAM,cACnB,gBAAgB,kBACb,MAAM,GAAG,MAAM,KAAK,OAcpC,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAhBZ,MAAM,GAAG,MAAM,KAAK,OAgB+B,CAAC;AAErE,eAAO,MAAM,kBAAkB,eAlBd,MAAM,GAAG,MAAM,KAAK,OAkBiC,CAAC"}
|
package/dist/builtin-schema.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormMap, ShapeJSON, ShapeMap } from './project-schema';
|
|
2
|
-
import { Content } from './types/types';
|
|
1
|
+
import { type FormMap, type ShapeJSON, type ShapeMap } from './project-schema';
|
|
2
|
+
import { type Content } from './types/types';
|
|
3
3
|
export declare function isAsset(content: Content): boolean;
|
|
4
4
|
export declare function getAssetS3Path(content: Content): string | undefined;
|
|
5
5
|
export declare function setAssetS3Path(content: Content, path: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-schema.d.ts","sourceRoot":"","sources":["../../src/builtin-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"builtin-schema.d.ts","sourceRoot":"","sources":["../../src/builtin-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;AAID,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEnE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED,eAAO,MAAM,SAAS,EAAE,SAKvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QA8U3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAsN1B,CAAC"}
|
|
@@ -5,19 +5,19 @@ export declare function toName(name: string): string;
|
|
|
5
5
|
export type ContentTransform = (schema: PropertySchema, obj: unknown, name?: string) => unknown;
|
|
6
6
|
export type SourceKeyTransform = (name: string, schema: PropertySchema, parent: unknown) => string | string[];
|
|
7
7
|
export type KeyTransform = (name: string, schema: PropertySchema, sourceKey?: string) => string;
|
|
8
|
-
export
|
|
8
|
+
export type PropertyTransform = {
|
|
9
9
|
keyTransform?: KeyTransform;
|
|
10
10
|
filter(schema: PropertySchema, name: string, shape?: ShapeJSON): boolean;
|
|
11
11
|
process(value: unknown, schema: PropertySchema, name: string, shape: ShapeJSON | undefined, next: (value: unknown, schema: PropertySchema, name: string) => unknown): unknown;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
12
|
+
};
|
|
13
|
+
export type Accumulator<T = unknown> = {
|
|
14
14
|
accumulate(value: unknown, schema: PropertySchema, name: string): void;
|
|
15
15
|
getResults(): T;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
export type PropertyTransformMap = {
|
|
18
18
|
[key in SchemaType]?: PropertyTransform[];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type ContentTransformParams = {
|
|
21
21
|
transforms?: PropertyTransformMap;
|
|
22
22
|
accumulators?: Accumulator[];
|
|
23
23
|
projectSchema: ProjectSchemaJSON;
|
|
@@ -25,20 +25,20 @@ export interface ContentTransformParams {
|
|
|
25
25
|
sourceKeyTransform?: SourceKeyTransform;
|
|
26
26
|
passThrough?: boolean;
|
|
27
27
|
allowNullObjects?: boolean;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
export declare function preferKey(name: string, schema: PropertySchema): string;
|
|
30
30
|
export declare function preferSourceKey(name: string, schema: PropertySchema): string[];
|
|
31
31
|
export declare function findTransforms(pluginMap: PropertyTransformMap | undefined, schema: PropertySchema, name: string, shape?: ShapeJSON): PropertyTransform | undefined;
|
|
32
32
|
export declare function getContentTransform({ transforms, accumulators, keyTransform, sourceKeyTransform, passThrough, allowNullObjects, projectSchema }: ContentTransformParams): ContentTransform;
|
|
33
|
-
export
|
|
33
|
+
export type PropertyInfo = {
|
|
34
34
|
schema: PropertySchema;
|
|
35
35
|
key: string;
|
|
36
36
|
isRequired: boolean;
|
|
37
|
-
}
|
|
38
|
-
export
|
|
37
|
+
};
|
|
38
|
+
export type GetPropertyInfoContext = {
|
|
39
39
|
projectSchema: ProjectSchemaJSON;
|
|
40
40
|
transforms?: PropertyTransformMap;
|
|
41
41
|
keyTransform?: KeyTransform;
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
export declare function getPropertyInfo(context: GetPropertyInfoContext, schema: PropertySchema, path: string): PropertyInfo[];
|
|
44
44
|
//# sourceMappingURL=content-schema-transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-schema-transform.d.ts","sourceRoot":"","sources":["../../src/content-schema-transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content-schema-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AC;IACZ,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE,iBAAiB,CAAC;IACjC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAoCrH"}
|
|
@@ -52,7 +52,7 @@ function preferSourceKey(name, schema) {
|
|
|
52
52
|
}
|
|
53
53
|
function findTransforms(pluginMap, schema, name, shape) {
|
|
54
54
|
const type = getType(schema);
|
|
55
|
-
if (pluginMap && (pluginMap[type]
|
|
55
|
+
if (pluginMap && (pluginMap[type] ?? pluginMap['*'])) {
|
|
56
56
|
const plugins = (pluginMap[type] ?? []).concat(pluginMap['*'] ?? []);
|
|
57
57
|
return plugins.find(plugin => plugin.filter(schema, name, shape));
|
|
58
58
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ProjectSchemaJSON, ShapeSchema, PropertySchema } from './project-schema';
|
|
2
|
-
export
|
|
1
|
+
import { type ProjectSchemaJSON, type ShapeSchema, type PropertySchema } from './project-schema';
|
|
2
|
+
export type CreateInputSchemaOptions = {
|
|
3
3
|
isUpdate?: boolean;
|
|
4
|
-
}
|
|
4
|
+
};
|
|
5
5
|
/**
|
|
6
6
|
* Convert all output properties in the schema to be input properties,
|
|
7
7
|
* For an update, remove `required` and `default` fields as well.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-input-schema.d.ts","sourceRoot":"","sources":["../../src/create-input-schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-input-schema.d.ts","sourceRoot":"","sources":["../../src/create-input-schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAE/F,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAkBF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,GAAG,WAAW,GAAG,cAAc,EAC1F,MAAM,EAAE,CAAC,EACT,OAAO,GAAE,wBAA6B,GACrC,CAAC,CA4DH"}
|
package/dist/enum.d.ts
CHANGED
package/dist/enum.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAYhE"}
|
package/dist/enum.js
CHANGED
|
@@ -9,7 +9,7 @@ function isEnumLikeSchema(schema) {
|
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
11
|
if (schema.oneOf) {
|
|
12
|
-
return schema.oneOf.every(optionSchema => optionSchema.title !== undefined && (optionSchema.enum
|
|
12
|
+
return schema.oneOf.every(optionSchema => optionSchema.title !== undefined && (optionSchema.enum ?? optionSchema.const));
|
|
13
13
|
}
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatten-templates.d.ts","sourceRoot":"","sources":["../../src/flatten-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flatten-templates.d.ts","sourceRoot":"","sources":["../../src/flatten-templates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAIxD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CAgBjF"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.flattenTemplates = flattenTemplates;
|
|
7
|
-
var _templateShapes = require("./template-shapes");
|
|
8
|
-
var _schemaUtil = require("./schema-util");
|
|
9
7
|
var _set = _interopRequireDefault(require("lodash/set"));
|
|
10
8
|
var _util = require("@takeshape/util");
|
|
9
|
+
var _templateShapes = require("./template-shapes");
|
|
10
|
+
var _schemaUtil = require("./schema-util");
|
|
11
11
|
var _refs = require("./refs");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function flattenTemplates(projectSchema) {
|
package/dist/get-is-leaf.js
CHANGED
|
@@ -17,7 +17,7 @@ function isLeafTypeV3(projectSchema, propertySchema) {
|
|
|
17
17
|
// If is not a structure, then is a leaf
|
|
18
18
|
!['object', 'array'].includes(type) ||
|
|
19
19
|
// If is relationship, then is a leaf
|
|
20
|
-
(0, _types.isPropertySchemaWithRelationship)(propertySchema['@output'] ?? propertySchema) || propertySchema['@tag'] && scalarTags.has(propertySchema['@tag']) ||
|
|
20
|
+
(0, _types.isPropertySchemaWithRelationship)(propertySchema['@output'] ?? propertySchema) || Boolean(propertySchema['@tag'] && scalarTags.has(propertySchema['@tag'])) ||
|
|
21
21
|
// If is array, then should not be a synchronized structure
|
|
22
22
|
type === 'array' && !propertySchema['@syncLocaleStructure'] || (0, _schemaUtil.isBuiltinType)(projectSchema, propertySchema)));
|
|
23
23
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { ProjectSchemaUpdate, ProjectSchemaMigrationContext } from './migration/types';
|
|
2
1
|
export type { User } from './user-schema';
|
|
2
|
+
export type { ProjectSchemaUpdate } from './migration/types';
|
|
3
3
|
export * from './content-schema-transform';
|
|
4
4
|
export * from './get-is-leaf';
|
|
5
5
|
export * from './project-schema';
|
|
@@ -9,12 +9,11 @@ export * from './services';
|
|
|
9
9
|
export * from './template-shapes';
|
|
10
10
|
export * from './taxonomies';
|
|
11
11
|
export * from './workflows';
|
|
12
|
-
export * from './builtin-schema';
|
|
13
12
|
export * from './auth-schemas';
|
|
14
13
|
export * from './api-version';
|
|
15
14
|
export * from './migration';
|
|
16
15
|
export * from './validate';
|
|
17
|
-
export
|
|
16
|
+
export * from './builtin-schema';
|
|
18
17
|
export * from './versions';
|
|
19
18
|
export * from './mocks';
|
|
20
19
|
export * from './util';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACxC,YAAY,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,19 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
builtInShapes: true
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "builtInShapes", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _builtinSchema.builtInShapes;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
6
|
var _contentSchemaTransform = require("./content-schema-transform");
|
|
16
7
|
Object.keys(_contentSchemaTransform).forEach(function (key) {
|
|
17
8
|
if (key === "default" || key === "__esModule") return;
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
9
|
if (key in exports && exports[key] === _contentSchemaTransform[key]) return;
|
|
20
10
|
Object.defineProperty(exports, key, {
|
|
21
11
|
enumerable: true,
|
|
@@ -27,7 +17,6 @@ Object.keys(_contentSchemaTransform).forEach(function (key) {
|
|
|
27
17
|
var _getIsLeaf = require("./get-is-leaf");
|
|
28
18
|
Object.keys(_getIsLeaf).forEach(function (key) {
|
|
29
19
|
if (key === "default" || key === "__esModule") return;
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
20
|
if (key in exports && exports[key] === _getIsLeaf[key]) return;
|
|
32
21
|
Object.defineProperty(exports, key, {
|
|
33
22
|
enumerable: true,
|
|
@@ -39,7 +28,6 @@ Object.keys(_getIsLeaf).forEach(function (key) {
|
|
|
39
28
|
var _projectSchema = require("./project-schema");
|
|
40
29
|
Object.keys(_projectSchema).forEach(function (key) {
|
|
41
30
|
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
43
31
|
if (key in exports && exports[key] === _projectSchema[key]) return;
|
|
44
32
|
Object.defineProperty(exports, key, {
|
|
45
33
|
enumerable: true,
|
|
@@ -51,7 +39,6 @@ Object.keys(_projectSchema).forEach(function (key) {
|
|
|
51
39
|
var _migrate = require("./project-schema/migrate");
|
|
52
40
|
Object.keys(_migrate).forEach(function (key) {
|
|
53
41
|
if (key === "default" || key === "__esModule") return;
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
55
42
|
if (key in exports && exports[key] === _migrate[key]) return;
|
|
56
43
|
Object.defineProperty(exports, key, {
|
|
57
44
|
enumerable: true,
|
|
@@ -63,7 +50,6 @@ Object.keys(_migrate).forEach(function (key) {
|
|
|
63
50
|
var _schemaUtil = require("./schema-util");
|
|
64
51
|
Object.keys(_schemaUtil).forEach(function (key) {
|
|
65
52
|
if (key === "default" || key === "__esModule") return;
|
|
66
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
67
53
|
if (key in exports && exports[key] === _schemaUtil[key]) return;
|
|
68
54
|
Object.defineProperty(exports, key, {
|
|
69
55
|
enumerable: true,
|
|
@@ -75,7 +61,6 @@ Object.keys(_schemaUtil).forEach(function (key) {
|
|
|
75
61
|
var _services = require("./services");
|
|
76
62
|
Object.keys(_services).forEach(function (key) {
|
|
77
63
|
if (key === "default" || key === "__esModule") return;
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
79
64
|
if (key in exports && exports[key] === _services[key]) return;
|
|
80
65
|
Object.defineProperty(exports, key, {
|
|
81
66
|
enumerable: true,
|
|
@@ -87,7 +72,6 @@ Object.keys(_services).forEach(function (key) {
|
|
|
87
72
|
var _templateShapes = require("./template-shapes");
|
|
88
73
|
Object.keys(_templateShapes).forEach(function (key) {
|
|
89
74
|
if (key === "default" || key === "__esModule") return;
|
|
90
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
91
75
|
if (key in exports && exports[key] === _templateShapes[key]) return;
|
|
92
76
|
Object.defineProperty(exports, key, {
|
|
93
77
|
enumerable: true,
|
|
@@ -99,7 +83,6 @@ Object.keys(_templateShapes).forEach(function (key) {
|
|
|
99
83
|
var _taxonomies = require("./taxonomies");
|
|
100
84
|
Object.keys(_taxonomies).forEach(function (key) {
|
|
101
85
|
if (key === "default" || key === "__esModule") return;
|
|
102
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
103
86
|
if (key in exports && exports[key] === _taxonomies[key]) return;
|
|
104
87
|
Object.defineProperty(exports, key, {
|
|
105
88
|
enumerable: true,
|
|
@@ -111,7 +94,6 @@ Object.keys(_taxonomies).forEach(function (key) {
|
|
|
111
94
|
var _workflows = require("./workflows");
|
|
112
95
|
Object.keys(_workflows).forEach(function (key) {
|
|
113
96
|
if (key === "default" || key === "__esModule") return;
|
|
114
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
115
97
|
if (key in exports && exports[key] === _workflows[key]) return;
|
|
116
98
|
Object.defineProperty(exports, key, {
|
|
117
99
|
enumerable: true,
|
|
@@ -120,22 +102,9 @@ Object.keys(_workflows).forEach(function (key) {
|
|
|
120
102
|
}
|
|
121
103
|
});
|
|
122
104
|
});
|
|
123
|
-
var _builtinSchema = require("./builtin-schema");
|
|
124
|
-
Object.keys(_builtinSchema).forEach(function (key) {
|
|
125
|
-
if (key === "default" || key === "__esModule") return;
|
|
126
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
127
|
-
if (key in exports && exports[key] === _builtinSchema[key]) return;
|
|
128
|
-
Object.defineProperty(exports, key, {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function () {
|
|
131
|
-
return _builtinSchema[key];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
105
|
var _authSchemas = require("./auth-schemas");
|
|
136
106
|
Object.keys(_authSchemas).forEach(function (key) {
|
|
137
107
|
if (key === "default" || key === "__esModule") return;
|
|
138
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
139
108
|
if (key in exports && exports[key] === _authSchemas[key]) return;
|
|
140
109
|
Object.defineProperty(exports, key, {
|
|
141
110
|
enumerable: true,
|
|
@@ -147,7 +116,6 @@ Object.keys(_authSchemas).forEach(function (key) {
|
|
|
147
116
|
var _apiVersion = require("./api-version");
|
|
148
117
|
Object.keys(_apiVersion).forEach(function (key) {
|
|
149
118
|
if (key === "default" || key === "__esModule") return;
|
|
150
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
151
119
|
if (key in exports && exports[key] === _apiVersion[key]) return;
|
|
152
120
|
Object.defineProperty(exports, key, {
|
|
153
121
|
enumerable: true,
|
|
@@ -159,7 +127,6 @@ Object.keys(_apiVersion).forEach(function (key) {
|
|
|
159
127
|
var _migration = require("./migration");
|
|
160
128
|
Object.keys(_migration).forEach(function (key) {
|
|
161
129
|
if (key === "default" || key === "__esModule") return;
|
|
162
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
163
130
|
if (key in exports && exports[key] === _migration[key]) return;
|
|
164
131
|
Object.defineProperty(exports, key, {
|
|
165
132
|
enumerable: true,
|
|
@@ -171,7 +138,6 @@ Object.keys(_migration).forEach(function (key) {
|
|
|
171
138
|
var _validate = require("./validate");
|
|
172
139
|
Object.keys(_validate).forEach(function (key) {
|
|
173
140
|
if (key === "default" || key === "__esModule") return;
|
|
174
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
175
141
|
if (key in exports && exports[key] === _validate[key]) return;
|
|
176
142
|
Object.defineProperty(exports, key, {
|
|
177
143
|
enumerable: true,
|
|
@@ -180,10 +146,20 @@ Object.keys(_validate).forEach(function (key) {
|
|
|
180
146
|
}
|
|
181
147
|
});
|
|
182
148
|
});
|
|
149
|
+
var _builtinSchema = require("./builtin-schema");
|
|
150
|
+
Object.keys(_builtinSchema).forEach(function (key) {
|
|
151
|
+
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _builtinSchema[key]) return;
|
|
153
|
+
Object.defineProperty(exports, key, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () {
|
|
156
|
+
return _builtinSchema[key];
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
183
160
|
var _versions = require("./versions");
|
|
184
161
|
Object.keys(_versions).forEach(function (key) {
|
|
185
162
|
if (key === "default" || key === "__esModule") return;
|
|
186
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
187
163
|
if (key in exports && exports[key] === _versions[key]) return;
|
|
188
164
|
Object.defineProperty(exports, key, {
|
|
189
165
|
enumerable: true,
|
|
@@ -195,7 +171,6 @@ Object.keys(_versions).forEach(function (key) {
|
|
|
195
171
|
var _mocks = require("./mocks");
|
|
196
172
|
Object.keys(_mocks).forEach(function (key) {
|
|
197
173
|
if (key === "default" || key === "__esModule") return;
|
|
198
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
199
174
|
if (key in exports && exports[key] === _mocks[key]) return;
|
|
200
175
|
Object.defineProperty(exports, key, {
|
|
201
176
|
enumerable: true,
|
|
@@ -207,7 +182,6 @@ Object.keys(_mocks).forEach(function (key) {
|
|
|
207
182
|
var _util = require("./util");
|
|
208
183
|
Object.keys(_util).forEach(function (key) {
|
|
209
184
|
if (key === "default" || key === "__esModule") return;
|
|
210
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
211
185
|
if (key in exports && exports[key] === _util[key]) return;
|
|
212
186
|
Object.defineProperty(exports, key, {
|
|
213
187
|
enumerable: true,
|
|
@@ -219,7 +193,6 @@ Object.keys(_util).forEach(function (key) {
|
|
|
219
193
|
var _scalars = require("./scalars");
|
|
220
194
|
Object.keys(_scalars).forEach(function (key) {
|
|
221
195
|
if (key === "default" || key === "__esModule") return;
|
|
222
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
223
196
|
if (key in exports && exports[key] === _scalars[key]) return;
|
|
224
197
|
Object.defineProperty(exports, key, {
|
|
225
198
|
enumerable: true,
|
|
@@ -231,7 +204,6 @@ Object.keys(_scalars).forEach(function (key) {
|
|
|
231
204
|
var _refs = require("./refs");
|
|
232
205
|
Object.keys(_refs).forEach(function (key) {
|
|
233
206
|
if (key === "default" || key === "__esModule") return;
|
|
234
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
235
207
|
if (key in exports && exports[key] === _refs[key]) return;
|
|
236
208
|
Object.defineProperty(exports, key, {
|
|
237
209
|
enumerable: true,
|
|
@@ -243,7 +215,6 @@ Object.keys(_refs).forEach(function (key) {
|
|
|
243
215
|
var _unions = require("./unions");
|
|
244
216
|
Object.keys(_unions).forEach(function (key) {
|
|
245
217
|
if (key === "default" || key === "__esModule") return;
|
|
246
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
247
218
|
if (key in exports && exports[key] === _unions[key]) return;
|
|
248
219
|
Object.defineProperty(exports, key, {
|
|
249
220
|
enumerable: true,
|
|
@@ -255,7 +226,6 @@ Object.keys(_unions).forEach(function (key) {
|
|
|
255
226
|
var _enum = require("./enum");
|
|
256
227
|
Object.keys(_enum).forEach(function (key) {
|
|
257
228
|
if (key === "default" || key === "__esModule") return;
|
|
258
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
259
229
|
if (key in exports && exports[key] === _enum[key]) return;
|
|
260
230
|
Object.defineProperty(exports, key, {
|
|
261
231
|
enumerable: true,
|
|
@@ -267,7 +237,6 @@ Object.keys(_enum).forEach(function (key) {
|
|
|
267
237
|
var _patterns = require("./patterns");
|
|
268
238
|
Object.keys(_patterns).forEach(function (key) {
|
|
269
239
|
if (key === "default" || key === "__esModule") return;
|
|
270
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
271
240
|
if (key in exports && exports[key] === _patterns[key]) return;
|
|
272
241
|
Object.defineProperty(exports, key, {
|
|
273
242
|
enumerable: true,
|
|
@@ -279,7 +248,6 @@ Object.keys(_patterns).forEach(function (key) {
|
|
|
279
248
|
var _types = require("./types/types");
|
|
280
249
|
Object.keys(_types).forEach(function (key) {
|
|
281
250
|
if (key === "default" || key === "__esModule") return;
|
|
282
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
283
251
|
if (key in exports && exports[key] === _types[key]) return;
|
|
284
252
|
Object.defineProperty(exports, key, {
|
|
285
253
|
enumerable: true,
|
|
@@ -291,7 +259,6 @@ Object.keys(_types).forEach(function (key) {
|
|
|
291
259
|
var _utils = require("./types/utils");
|
|
292
260
|
Object.keys(_utils).forEach(function (key) {
|
|
293
261
|
if (key === "default" || key === "__esModule") return;
|
|
294
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
295
262
|
if (key in exports && exports[key] === _utils[key]) return;
|
|
296
263
|
Object.defineProperty(exports, key, {
|
|
297
264
|
enumerable: true,
|
|
@@ -303,7 +270,6 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
303
270
|
var _flattenTemplates = require("./flatten-templates");
|
|
304
271
|
Object.keys(_flattenTemplates).forEach(function (key) {
|
|
305
272
|
if (key === "default" || key === "__esModule") return;
|
|
306
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
307
273
|
if (key in exports && exports[key] === _flattenTemplates[key]) return;
|
|
308
274
|
Object.defineProperty(exports, key, {
|
|
309
275
|
enumerable: true,
|
|
@@ -315,7 +281,6 @@ Object.keys(_flattenTemplates).forEach(function (key) {
|
|
|
315
281
|
var _relationships = require("./relationships");
|
|
316
282
|
Object.keys(_relationships).forEach(function (key) {
|
|
317
283
|
if (key === "default" || key === "__esModule") return;
|
|
318
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
319
284
|
if (key in exports && exports[key] === _relationships[key]) return;
|
|
320
285
|
Object.defineProperty(exports, key, {
|
|
321
286
|
enumerable: true,
|
|
@@ -327,7 +292,6 @@ Object.keys(_relationships).forEach(function (key) {
|
|
|
327
292
|
var _createInputSchema = require("./create-input-schema");
|
|
328
293
|
Object.keys(_createInputSchema).forEach(function (key) {
|
|
329
294
|
if (key === "default" || key === "__esModule") return;
|
|
330
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
331
295
|
if (key in exports && exports[key] === _createInputSchema[key]) return;
|
|
332
296
|
Object.defineProperty(exports, key, {
|
|
333
297
|
enumerable: true,
|
|
@@ -339,7 +303,6 @@ Object.keys(_createInputSchema).forEach(function (key) {
|
|
|
339
303
|
var _schemaTransform = require("./schema-transform");
|
|
340
304
|
Object.keys(_schemaTransform).forEach(function (key) {
|
|
341
305
|
if (key === "default" || key === "__esModule") return;
|
|
342
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
343
306
|
if (key in exports && exports[key] === _schemaTransform[key]) return;
|
|
344
307
|
Object.defineProperty(exports, key, {
|
|
345
308
|
enumerable: true,
|
|
@@ -351,7 +314,6 @@ Object.keys(_schemaTransform).forEach(function (key) {
|
|
|
351
314
|
var _interfaces = require("./interfaces");
|
|
352
315
|
Object.keys(_interfaces).forEach(function (key) {
|
|
353
316
|
if (key === "default" || key === "__esModule") return;
|
|
354
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
355
317
|
if (key in exports && exports[key] === _interfaces[key]) return;
|
|
356
318
|
Object.defineProperty(exports, key, {
|
|
357
319
|
enumerable: true,
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/interfaces.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gBlG"}
|
package/dist/interfaces.js
CHANGED
|
@@ -11,10 +11,10 @@ exports.interfaceToUnion = interfaceToUnion;
|
|
|
11
11
|
exports.isInterfaceRef = isInterfaceRef;
|
|
12
12
|
exports.isInterfaceShape = isInterfaceShape;
|
|
13
13
|
exports.pruneUnusedInterfaces = pruneUnusedInterfaces;
|
|
14
|
-
var _refs = require("./refs");
|
|
15
14
|
var _mapValues = _interopRequireDefault(require("lodash/mapValues"));
|
|
16
|
-
var _unions = require("./unions");
|
|
17
15
|
var _util = require("@takeshape/util");
|
|
16
|
+
var _refs = require("./refs");
|
|
17
|
+
var _unions = require("./unions");
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
function isInterfaceShape(shape) {
|
|
20
20
|
return shape?.type === 'interface';
|
package/dist/layers/layers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropertySchemaV4_0_0, FlattenedSchemaV4_0_0, LayerSchemaV4_0_0, ObjectSchemaV4_0_0, ProjectSchemaJSONV4_0_0, QueryJSONV4_0_0, ShapeMapV4_0_0 } from '../project-schema';
|
|
2
|
-
import { RefItemWithPath } from './refs';
|
|
1
|
+
import { type PropertySchemaV4_0_0, type FlattenedSchemaV4_0_0, type LayerSchemaV4_0_0, type ObjectSchemaV4_0_0, type ProjectSchemaJSONV4_0_0, type QueryJSONV4_0_0, type ShapeMapV4_0_0 } from '../project-schema';
|
|
2
|
+
import { type RefItemWithPath } from './refs';
|
|
3
3
|
export type GetLayer = (layerId: string) => LayerSchemaV4_0_0 | undefined;
|
|
4
4
|
export declare function isObjectSchemaV4_0_0(maybeObjectSchema: PropertySchemaV4_0_0): maybeObjectSchema is ObjectSchemaV4_0_0;
|
|
5
5
|
export type RefPredicate = (ref: RefItemWithPath) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/layers/layers.ts"],"names":[],"m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