@takeshape/schema 7.194.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/README.md +5 -0
- package/es/api-version.js +21 -0
- package/es/auth-schemas.js +0 -0
- package/es/builtin-schema.js +590 -0
- package/es/content-schema-transform.js +192 -0
- package/es/entitlements.js +0 -0
- package/es/enum.js +11 -0
- package/es/get-is-leaf.js +58 -0
- package/es/index.js +25 -0
- package/es/migration.js +413 -0
- package/es/mocks.js +47 -0
- package/es/patterns.js +0 -0
- package/es/project-schema/index.js +10 -0
- package/es/project-schema/v1.0.0.js +0 -0
- package/es/project-schema/v3.0.0.js +0 -0
- package/es/project-schema/v3.1.0.js +0 -0
- package/es/project-schema/v3.2.0.js +0 -0
- package/es/project-schema/v3.3.0.js +0 -0
- package/es/project-schema/v3.4.0.js +0 -0
- package/es/project-schema/v3.5.0.js +0 -0
- package/es/project-schema/v3.5.1.js +0 -0
- package/es/project-schema/v3.6.0.js +0 -0
- package/es/refs.js +301 -0
- package/es/resolvers.js +2 -0
- package/es/scalars.js +4 -0
- package/es/schema-util.js +1197 -0
- package/es/schemas/auth-schemas.json +313 -0
- package/es/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
- package/es/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
- package/es/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
- package/es/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
- package/es/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
- package/es/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
- package/es/schemas/project-schema/v1.0.0.json +321 -0
- package/es/schemas/project-schema/v3.0.0.json +411 -0
- package/es/schemas/project-schema/v3.1.0.json +569 -0
- package/es/schemas/project-schema/v3.2.0.json +577 -0
- package/es/schemas/project-schema/v3.3.0.json +578 -0
- package/es/schemas/project-schema/v3.4.0.json +568 -0
- package/es/schemas/project-schema/v3.5.0.json +568 -0
- package/es/schemas/project-schema/v3.5.1.json +568 -0
- package/es/schemas/project-schema/v3.6.0.json +584 -0
- package/es/schemas/project-schema.json +16 -0
- package/es/schemas/user-schema.json +58 -0
- package/es/services.js +379 -0
- package/es/taxonomies.js +55 -0
- package/es/template-shapes.js +79 -0
- package/es/types.js +202 -0
- package/es/unions.js +137 -0
- package/es/user-schema.js +0 -0
- package/es/util/detect-cycles.js +54 -0
- package/es/util/index.js +1 -0
- package/es/validate.js +764 -0
- package/es/versions.js +4 -0
- package/es/workflows.js +69 -0
- package/examples/.pnpm-debug.log +20 -0
- package/examples/v1_0_0/beer-schema.json +125 -0
- package/examples/v1_0_0/blog-schema.json +192 -0
- package/examples/v1_0_0/brewery-schema.json +232 -0
- package/examples/v1_0_0/complex-project-schema.json +3197 -0
- package/examples/v1_0_0/error-schema.json +275 -0
- package/examples/v1_0_0/frank-and-fred-schema.json +21387 -0
- package/examples/v1_0_0/massive-schema.json +6930 -0
- package/examples/v1_0_0/post-schema.json +83 -0
- package/examples/v1_0_0/real-world-schema.json +797 -0
- package/examples/v1_0_0/recursive-repeater-schema.json +69 -0
- package/examples/v1_0_0/recursive-schema.json +79 -0
- package/examples/v1_0_0/schema-with-repeater-draftjs.json +292 -0
- package/examples/v1_0_0/shape-books.json +797 -0
- package/examples/v1_0_0/user-schema-no-required.json +84 -0
- package/examples/v1_0_0/user-schema-with-defaults.json +105 -0
- package/examples/v1_0_0/user-schema-with-obj-prop.json +92 -0
- package/examples/v1_0_0/user-schema.json +87 -0
- package/examples/v3_0_0/rick-and-morty-rest.json +62 -0
- package/examples/v3_0_0/shopify-lookbook.json +1172 -0
- package/examples/v3_0_0/shopify-store-with-widget.json +11323 -0
- package/examples/v3_2_0/blog-schema.json +378 -0
- package/examples/v3_2_0/brewery-schema.json +385 -0
- package/examples/v3_2_0/complex-project-schema.json +3748 -0
- package/examples/v3_2_0/frank-and-fred-schema.json +19217 -0
- package/examples/v3_2_0/massive-schema.json +6676 -0
- package/examples/v3_2_0/pet-oneof-array.json +323 -0
- package/examples/v3_2_0/post-schema.json +265 -0
- package/examples/v3_2_0/real-world-schema.json +970 -0
- package/examples/v3_2_0/recursive-repeater-schema.json +144 -0
- package/examples/v3_2_0/recursive-schema.json +151 -0
- package/examples/v3_2_0/rick-and-morty-rest.json +65 -0
- package/examples/v3_2_0/schema-with-repeater-draftjs.json +381 -0
- package/examples/v3_2_0/shape-books.json +1044 -0
- package/examples/v3_2_0/shopify-store-with-widget.json +11016 -0
- package/examples/v3_2_0/user-schema-no-required.json +174 -0
- package/examples/v3_2_0/user-schema-with-defaults.json +187 -0
- package/examples/v3_3_0/blog-schema.json +405 -0
- package/examples/v3_3_0/brewery-schema.json +406 -0
- package/examples/v3_3_0/complex-project-schema.json +4076 -0
- package/examples/v3_3_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_3_0/massive-schema.json +7309 -0
- package/examples/v3_3_0/pet-oneof-array.json +380 -0
- package/examples/v3_3_0/post-schema.json +248 -0
- package/examples/v3_3_0/real-world-schema.json +1046 -0
- package/examples/v3_3_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_3_0/recursive-schema.json +161 -0
- package/examples/v3_3_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_3_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_3_0/shape-books.json +1121 -0
- package/examples/v3_3_0/shopify-lookbook.json +1196 -0
- package/examples/v3_3_0/shopify-store-with-widget.json +11320 -0
- package/examples/v3_3_0/user-schema-no-required.json +185 -0
- package/examples/v3_3_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_4_0/blog-schema.json +405 -0
- package/examples/v3_4_0/brewery-schema.json +406 -0
- package/examples/v3_4_0/complex-project-schema.json +4076 -0
- package/examples/v3_4_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_4_0/massive-schema.json +7309 -0
- package/examples/v3_4_0/pet-oneof-array.json +420 -0
- package/examples/v3_4_0/post-schema.json +248 -0
- package/examples/v3_4_0/real-world-schema.json +1046 -0
- package/examples/v3_4_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_4_0/recursive-schema.json +161 -0
- package/examples/v3_4_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_4_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_4_0/shape-books.json +1121 -0
- package/examples/v3_4_0/shopify-lookbook.json +1196 -0
- package/examples/v3_4_0/shopify-store-with-widget.json +11323 -0
- package/examples/v3_4_0/user-schema-no-required.json +185 -0
- package/examples/v3_4_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_5_0/blog-schema.json +405 -0
- package/examples/v3_5_0/brewery-schema.json +406 -0
- package/examples/v3_5_0/complex-project-schema.json +4076 -0
- package/examples/v3_5_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_5_0/massive-schema.json +7309 -0
- package/examples/v3_5_0/pet-oneof-array.json +420 -0
- package/examples/v3_5_0/post-schema.json +248 -0
- package/examples/v3_5_0/real-world-schema.json +1046 -0
- package/examples/v3_5_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_5_0/recursive-schema.json +161 -0
- package/examples/v3_5_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_5_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_5_0/shape-books.json +1121 -0
- package/examples/v3_5_0/shopify-lookbook.json +1196 -0
- package/examples/v3_5_0/shopify-store-with-widget.json +12271 -0
- package/examples/v3_5_0/user-schema-no-required.json +185 -0
- package/examples/v3_5_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_5_1/blog-schema.json +405 -0
- package/examples/v3_5_1/brewery-schema.json +406 -0
- package/examples/v3_5_1/complex-project-schema.json +4076 -0
- package/examples/v3_5_1/frank-and-fred-schema.json +20913 -0
- package/examples/v3_5_1/massive-schema.json +7309 -0
- package/examples/v3_5_1/pet-oneof-array.json +420 -0
- package/examples/v3_5_1/post-schema.json +248 -0
- package/examples/v3_5_1/real-world-schema.json +1046 -0
- package/examples/v3_5_1/recursive-repeater-schema.json +154 -0
- package/examples/v3_5_1/recursive-schema.json +161 -0
- package/examples/v3_5_1/rick-and-morty-rest.json +101 -0
- package/examples/v3_5_1/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_5_1/shape-books.json +1121 -0
- package/examples/v3_5_1/shopify-lookbook.json +1196 -0
- package/examples/v3_5_1/shopify-store-with-widget.json +12271 -0
- package/examples/v3_5_1/stripe-starter-resolved.json +21419 -0
- package/examples/v3_5_1/user-schema-no-required.json +185 -0
- package/examples/v3_5_1/user-schema-with-defaults.json +210 -0
- package/examples/v3_6_0/blog-schema.json +405 -0
- package/examples/v3_6_0/brewery-schema.json +406 -0
- package/examples/v3_6_0/complex-project-schema.json +4076 -0
- package/examples/v3_6_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_6_0/massive-schema.json +7309 -0
- package/examples/v3_6_0/pet-oneof-array.json +420 -0
- package/examples/v3_6_0/post-schema.json +248 -0
- package/examples/v3_6_0/real-world-schema.json +1046 -0
- package/examples/v3_6_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_6_0/recursive-schema.json +161 -0
- package/examples/v3_6_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_6_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_6_0/shape-books.json +1121 -0
- package/examples/v3_6_0/shopify-lookbook.json +1196 -0
- package/examples/v3_6_0/shopify-store-with-widget.json +12271 -0
- package/examples/v3_6_0/stripe-starter-resolved.json +21419 -0
- package/examples/v3_6_0/user-schema-no-required.json +185 -0
- package/examples/v3_6_0/user-schema-with-defaults.json +210 -0
- package/lib/api-version.d.ts +6 -0
- package/lib/api-version.d.ts.map +1 -0
- package/lib/api-version.js +36 -0
- package/lib/auth-schemas.d.ts +105 -0
- package/lib/auth-schemas.d.ts.map +1 -0
- package/lib/auth-schemas.js +1 -0
- package/lib/builtin-schema.d.ts +8 -0
- package/lib/builtin-schema.d.ts.map +1 -0
- package/lib/builtin-schema.js +606 -0
- package/lib/content-schema-transform.d.ts +41 -0
- package/lib/content-schema-transform.d.ts.map +1 -0
- package/lib/content-schema-transform.js +217 -0
- package/lib/entitlements.d.ts +1 -0
- package/lib/entitlements.d.ts.map +1 -0
- package/lib/entitlements.js +1 -0
- package/lib/enum.d.ts +3 -0
- package/lib/enum.d.ts.map +1 -0
- package/lib/enum.js +18 -0
- package/lib/get-is-leaf.d.ts +4 -0
- package/lib/get-is-leaf.d.ts.map +1 -0
- package/lib/get-is-leaf.js +68 -0
- package/lib/index.d.ts +27 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +359 -0
- package/lib/migration.d.ts +55 -0
- package/lib/migration.d.ts.map +1 -0
- package/lib/migration.js +463 -0
- package/lib/mocks.d.ts +13 -0
- package/lib/mocks.d.ts.map +1 -0
- package/lib/mocks.js +61 -0
- package/lib/patterns.d.ts +13 -0
- package/lib/patterns.d.ts.map +1 -0
- package/lib/patterns.js +1 -0
- package/lib/project-schema/index.d.ts +21 -0
- package/lib/project-schema/index.d.ts.map +1 -0
- package/lib/project-schema/index.js +122 -0
- package/lib/project-schema/v1.0.0.d.ts +293 -0
- package/lib/project-schema/v1.0.0.d.ts.map +1 -0
- package/lib/project-schema/v1.0.0.js +1 -0
- package/lib/project-schema/v3.0.0.d.ts +480 -0
- package/lib/project-schema/v3.0.0.d.ts.map +1 -0
- package/lib/project-schema/v3.0.0.js +1 -0
- package/lib/project-schema/v3.1.0.d.ts +623 -0
- package/lib/project-schema/v3.1.0.d.ts.map +1 -0
- package/lib/project-schema/v3.1.0.js +1 -0
- package/lib/project-schema/v3.2.0.d.ts +634 -0
- package/lib/project-schema/v3.2.0.d.ts.map +1 -0
- package/lib/project-schema/v3.2.0.js +1 -0
- package/lib/project-schema/v3.3.0.d.ts +634 -0
- package/lib/project-schema/v3.3.0.d.ts.map +1 -0
- package/lib/project-schema/v3.3.0.js +1 -0
- package/lib/project-schema/v3.4.0.d.ts +626 -0
- package/lib/project-schema/v3.4.0.d.ts.map +1 -0
- package/lib/project-schema/v3.4.0.js +1 -0
- package/lib/project-schema/v3.5.0.d.ts +651 -0
- package/lib/project-schema/v3.5.0.d.ts.map +1 -0
- package/lib/project-schema/v3.5.0.js +1 -0
- package/lib/project-schema/v3.5.1.d.ts +651 -0
- package/lib/project-schema/v3.5.1.d.ts.map +1 -0
- package/lib/project-schema/v3.5.1.js +1 -0
- package/lib/project-schema/v3.6.0.d.ts +660 -0
- package/lib/project-schema/v3.6.0.d.ts.map +1 -0
- package/lib/project-schema/v3.6.0.js +1 -0
- package/lib/refs.d.ts +122 -0
- package/lib/refs.d.ts.map +1 -0
- package/lib/refs.js +359 -0
- package/lib/resolvers.d.ts +4 -0
- package/lib/resolvers.d.ts.map +1 -0
- package/lib/resolvers.js +10 -0
- package/lib/scalars.d.ts +3 -0
- package/lib/scalars.d.ts.map +1 -0
- package/lib/scalars.js +13 -0
- package/lib/schema-util.d.ts +201 -0
- package/lib/schema-util.d.ts.map +1 -0
- package/lib/schema-util.js +1353 -0
- package/lib/schemas/auth-schemas.json +313 -0
- package/lib/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
- package/lib/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
- package/lib/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
- package/lib/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
- package/lib/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
- package/lib/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
- package/lib/schemas/project-schema/v1.0.0.json +321 -0
- package/lib/schemas/project-schema/v3.0.0.json +411 -0
- package/lib/schemas/project-schema/v3.1.0.json +569 -0
- package/lib/schemas/project-schema/v3.2.0.json +577 -0
- package/lib/schemas/project-schema/v3.3.0.json +578 -0
- package/lib/schemas/project-schema/v3.4.0.json +568 -0
- package/lib/schemas/project-schema/v3.5.0.json +568 -0
- package/lib/schemas/project-schema/v3.5.1.json +568 -0
- package/lib/schemas/project-schema/v3.6.0.json +584 -0
- package/lib/schemas/project-schema.json +16 -0
- package/lib/schemas/user-schema.json +58 -0
- package/lib/services.d.ts +71 -0
- package/lib/services.d.ts.map +1 -0
- package/lib/services.js +413 -0
- package/lib/taxonomies.d.ts +16 -0
- package/lib/taxonomies.d.ts.map +1 -0
- package/lib/taxonomies.js +69 -0
- package/lib/template-shapes.d.ts +32 -0
- package/lib/template-shapes.d.ts.map +1 -0
- package/lib/template-shapes.js +100 -0
- package/lib/types.d.ts +187 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +289 -0
- package/lib/unions.d.ts +29 -0
- package/lib/unions.d.ts.map +1 -0
- package/lib/unions.js +167 -0
- package/lib/user-schema.d.ts +39 -0
- package/lib/user-schema.d.ts.map +1 -0
- package/lib/user-schema.js +1 -0
- package/lib/util/detect-cycles.d.ts +6 -0
- package/lib/util/detect-cycles.d.ts.map +1 -0
- package/lib/util/detect-cycles.js +61 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/validate.d.ts +49 -0
- package/lib/validate.d.ts.map +1 -0
- package/lib/validate.js +823 -0
- package/lib/versions.d.ts +5 -0
- package/lib/versions.d.ts.map +1 -0
- package/lib/versions.js +14 -0
- package/lib/workflows.d.ts +15 -0
- package/lib/workflows.d.ts.map +1 -0
- package/lib/workflows.js +92 -0
- package/package.json +65 -0
package/es/versions.js
ADDED
package/es/workflows.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { getShapeById } from './schema-util';
|
|
2
|
+
export const defaultWorkflow = {
|
|
3
|
+
name: 'default',
|
|
4
|
+
title: 'Default',
|
|
5
|
+
steps: [{
|
|
6
|
+
name: 'disabled',
|
|
7
|
+
title: 'Disabled',
|
|
8
|
+
key: 'r1uCfi4ZL',
|
|
9
|
+
color: '#bdbdbd',
|
|
10
|
+
live: false
|
|
11
|
+
}, {
|
|
12
|
+
name: 'enabled',
|
|
13
|
+
title: 'Enabled',
|
|
14
|
+
key: 'rkhRGs4WL',
|
|
15
|
+
color: '#5cd79b',
|
|
16
|
+
live: true
|
|
17
|
+
}]
|
|
18
|
+
};
|
|
19
|
+
export function getWorkflow(projectSchema, shapeId) {
|
|
20
|
+
var _getShapeById;
|
|
21
|
+
|
|
22
|
+
const workflow = (_getShapeById = getShapeById(projectSchema, shapeId)) === null || _getShapeById === void 0 ? void 0 : _getShapeById.workflow;
|
|
23
|
+
return projectSchema.workflows[workflow !== null && workflow !== void 0 ? workflow : 'default'];
|
|
24
|
+
}
|
|
25
|
+
export function statusFallback(workflow, enabled) {
|
|
26
|
+
var _workflow$steps$find;
|
|
27
|
+
|
|
28
|
+
return (_workflow$steps$find = workflow.steps.find(workflow => workflow.live === enabled)) !== null && _workflow$steps$find !== void 0 ? _workflow$steps$find : workflow.steps[0];
|
|
29
|
+
}
|
|
30
|
+
export function findWorkflowStep(workflow, keyOrName) {
|
|
31
|
+
const index = workflow.steps.findIndex(workflow => workflow.key === keyOrName || workflow.name === keyOrName);
|
|
32
|
+
return index === -1 ? undefined : {
|
|
33
|
+
index,
|
|
34
|
+
step: workflow.steps[index]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function getStatusField(workflows, shape) {
|
|
38
|
+
const workflow = shape.workflow && workflows[shape.workflow] || defaultWorkflow;
|
|
39
|
+
return {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'Status',
|
|
42
|
+
'@workflow': workflow.name
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function getStepRange(steps, index, op) {
|
|
46
|
+
if (op === 'eq' || op === 'in') {
|
|
47
|
+
return [steps[index]];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const offset = op === 'lte' || op === 'gte' ? 0 : 1;
|
|
51
|
+
const start = op === 'gt' || op === 'gte' ? index + offset : 0;
|
|
52
|
+
const end = op === 'lt' || op === 'lte' ? index + 1 - offset : steps.length;
|
|
53
|
+
return steps.slice(start, end);
|
|
54
|
+
}
|
|
55
|
+
export function getWorkflowStepKeys(workflow, stepKey, op) {
|
|
56
|
+
const context = findWorkflowStep(workflow, stepKey);
|
|
57
|
+
|
|
58
|
+
if (!context) {
|
|
59
|
+
throw new Error(`Cannot find step "${stepKey}" in workflow "${workflow.title}"`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const {
|
|
63
|
+
index
|
|
64
|
+
} = context;
|
|
65
|
+
return getStepRange(workflow.steps, index, op).map(step => step.key);
|
|
66
|
+
}
|
|
67
|
+
export function getLiveStepKeys(workflow) {
|
|
68
|
+
return workflow.steps.filter(step => step.live).map(step => step.key);
|
|
69
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"0 debug pnpm:scope": {
|
|
3
|
+
"selected": 1,
|
|
4
|
+
"workspacePrefix": "/Users/als/code/takeshape"
|
|
5
|
+
},
|
|
6
|
+
"1 error pnpm": {
|
|
7
|
+
"errno": 2,
|
|
8
|
+
"code": "ELIFECYCLE",
|
|
9
|
+
"pkgid": "@takeshape/schema@7.185.1",
|
|
10
|
+
"stage": "typecheck",
|
|
11
|
+
"script": "tsc --noEmit",
|
|
12
|
+
"pkgname": "@takeshape/schema",
|
|
13
|
+
"err": {
|
|
14
|
+
"name": "Error",
|
|
15
|
+
"message": "@takeshape/schema@7.185.1 typecheck: `tsc --noEmit`\nExit status 2",
|
|
16
|
+
"code": "ELIFECYCLE",
|
|
17
|
+
"stack": "Error: @takeshape/schema@7.185.1 typecheck: `tsc --noEmit`\nExit status 2\n at EventEmitter.<anonymous> (/Users/als/.nvm/versions/node/v14.16.0/pnpm-global/4/node_modules/.pnpm/pnpm@6.11.5/node_modules/pnpm/dist/pnpm.cjs:104748:20)\n at EventEmitter.emit (events.js:315:20)\n at ChildProcess.<anonymous> (/Users/als/.nvm/versions/node/v14.16.0/pnpm-global/4/node_modules/.pnpm/pnpm@6.11.5/node_modules/pnpm/dist/pnpm.cjs:93054:18)\n at ChildProcess.emit (events.js:315:20)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.takeshape.io/project-schema#",
|
|
3
|
+
"projectId": "project-id",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"apiVersion": "1",
|
|
6
|
+
"author": "<userId>",
|
|
7
|
+
"created": 1466522179051,
|
|
8
|
+
"updated": 1466522179051,
|
|
9
|
+
"locales": ["en"],
|
|
10
|
+
"defaultLocale": "en",
|
|
11
|
+
"workflows": {},
|
|
12
|
+
"contentTypes": {
|
|
13
|
+
"<beer-content-type-id>": {
|
|
14
|
+
"single": false,
|
|
15
|
+
"name": "beer",
|
|
16
|
+
"title": "Beer",
|
|
17
|
+
"schema": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"_enabled": {
|
|
21
|
+
"title": "Enabled",
|
|
22
|
+
"type": "boolean"
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"description": "Very impressive very important",
|
|
26
|
+
"title": "Name",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"key": "rk-Vsa4Gl",
|
|
29
|
+
"minLength": 1
|
|
30
|
+
},
|
|
31
|
+
"about": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"draftjs": true,
|
|
34
|
+
"title": "About",
|
|
35
|
+
"key": "S1p2CYznZ"
|
|
36
|
+
},
|
|
37
|
+
"_updatedAt": {
|
|
38
|
+
"title": "Updated Date",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "date-time"
|
|
41
|
+
},
|
|
42
|
+
"_contentTypeId": {
|
|
43
|
+
"title": "Content Type Id",
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"dropdown": {
|
|
47
|
+
"oneOf": [
|
|
48
|
+
{
|
|
49
|
+
"title": "Option 1",
|
|
50
|
+
"enum": [
|
|
51
|
+
"option1"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"title": "Option 2",
|
|
56
|
+
"enum": [
|
|
57
|
+
"option2"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"type": "string",
|
|
62
|
+
"title": "Dropdown",
|
|
63
|
+
"key": "SylJmaIVz"
|
|
64
|
+
},
|
|
65
|
+
"_enabledAt": {
|
|
66
|
+
"title": "Enabled Date",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": "date-time"
|
|
69
|
+
},
|
|
70
|
+
"_version": {
|
|
71
|
+
"title": "Version",
|
|
72
|
+
"type": "integer"
|
|
73
|
+
},
|
|
74
|
+
"_id": {
|
|
75
|
+
"title": "Id",
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"_createdAt": {
|
|
79
|
+
"title": "Created Date",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"format": "date-time"
|
|
82
|
+
},
|
|
83
|
+
"publishDate": {
|
|
84
|
+
"format": "date-time",
|
|
85
|
+
"type": "string",
|
|
86
|
+
"title": "Publish Date",
|
|
87
|
+
"key": "Hy8mZOdZf"
|
|
88
|
+
},
|
|
89
|
+
"_contentTypeName": {
|
|
90
|
+
"title": "Content Type Name",
|
|
91
|
+
"type": "string"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"name",
|
|
96
|
+
"image"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"forms": {
|
|
100
|
+
"default": {
|
|
101
|
+
"properties": {
|
|
102
|
+
"name": {
|
|
103
|
+
"widget": "singleLineText"
|
|
104
|
+
},
|
|
105
|
+
"publishDate": {
|
|
106
|
+
"widget": "datetime"
|
|
107
|
+
},
|
|
108
|
+
"about": {
|
|
109
|
+
"widget": "wysiwygText"
|
|
110
|
+
},
|
|
111
|
+
"dropdown": {
|
|
112
|
+
"widget": "dropdown"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"order": [
|
|
116
|
+
"name",
|
|
117
|
+
"publishDate",
|
|
118
|
+
"about",
|
|
119
|
+
"dropdown"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.takeshape.io/project-schema#",
|
|
3
|
+
"projectId": "project-id",
|
|
4
|
+
"defaultLocale": "en",
|
|
5
|
+
"locales": ["en", "es"],
|
|
6
|
+
"version": 1,
|
|
7
|
+
"apiVersion": "2",
|
|
8
|
+
"author": "<userId>",
|
|
9
|
+
"created": 1466522179051,
|
|
10
|
+
"updated": 1466522179051,
|
|
11
|
+
"workflows": {},
|
|
12
|
+
"contentTypes": {
|
|
13
|
+
"<homepageContentTypeId>": {
|
|
14
|
+
"name": "homepage",
|
|
15
|
+
"title": "Home Page",
|
|
16
|
+
"description": "The homepage",
|
|
17
|
+
"single": true,
|
|
18
|
+
"schema": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"headline": {
|
|
22
|
+
"key": "headlineId",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"l10n": true
|
|
26
|
+
},
|
|
27
|
+
"hero": {
|
|
28
|
+
"mutable": true,
|
|
29
|
+
"key": "heroId",
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"image": {
|
|
33
|
+
"title": "Image",
|
|
34
|
+
"l10n": true,
|
|
35
|
+
"relationship": {
|
|
36
|
+
"contentTypeIds": ["ASSET"]
|
|
37
|
+
},
|
|
38
|
+
"type": "object",
|
|
39
|
+
"key": "imageId",
|
|
40
|
+
"properties": {
|
|
41
|
+
"contentTypeId": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["ASSET"]
|
|
44
|
+
},
|
|
45
|
+
"id": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["contentTypeId", "id"]
|
|
50
|
+
},
|
|
51
|
+
"featuredPosts": {
|
|
52
|
+
"key": "featuredPostsId",
|
|
53
|
+
"l10n": true,
|
|
54
|
+
"relationship": {
|
|
55
|
+
"type": "multiple",
|
|
56
|
+
"relatedName": "heroFeaturedPosts",
|
|
57
|
+
"contentTypeIds": ["<postContentTypeId>"]
|
|
58
|
+
},
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"contentTypeId": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": ["<postContentTypeId>"]
|
|
66
|
+
},
|
|
67
|
+
"id": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": ["contentTypeId", "id"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": ["headline"]
|
|
78
|
+
},
|
|
79
|
+
"forms": {
|
|
80
|
+
"default": {
|
|
81
|
+
"order": ["headline", "hero"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"<postContentTypeId>": {
|
|
86
|
+
"name": "post",
|
|
87
|
+
"title": "Post",
|
|
88
|
+
"description": "A Post model",
|
|
89
|
+
"schema": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"title": {
|
|
93
|
+
"key": "titleId",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"l10n": true
|
|
96
|
+
},
|
|
97
|
+
"body": {
|
|
98
|
+
"key": "bodyId",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"l10n": true,
|
|
101
|
+
"pattern": "\\w"
|
|
102
|
+
},
|
|
103
|
+
"rating": {
|
|
104
|
+
"key": "ratingId",
|
|
105
|
+
"type": "integer"
|
|
106
|
+
},
|
|
107
|
+
"otherStuff": {
|
|
108
|
+
"mutable": true,
|
|
109
|
+
"key": "otherStuffId",
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"comments": {
|
|
113
|
+
"l10n": true,
|
|
114
|
+
"syncLocaleStructure": true,
|
|
115
|
+
"key": "commentsId",
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"text": {
|
|
121
|
+
"key": "textId",
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"authors": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"key": "authorsId",
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"name": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"key": "nameId"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"tags": {
|
|
143
|
+
"key": "tagsId",
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {
|
|
148
|
+
"contentTypeId": {
|
|
149
|
+
"enum": ["<tagContentTypeId>"],
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"id": {"type": "string"}
|
|
153
|
+
},
|
|
154
|
+
"required": ["contentTypeId", "id"]
|
|
155
|
+
},
|
|
156
|
+
"relationship": {
|
|
157
|
+
"contentTypeIds": ["<tagContentTypeId>"],
|
|
158
|
+
"type": "multiple",
|
|
159
|
+
"relatedName": "firstTags"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": ["title"]
|
|
164
|
+
},
|
|
165
|
+
"forms": {
|
|
166
|
+
"default": {
|
|
167
|
+
"order": ["title", "body", "rating", "otherStuff", "tags"]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"<tagContentTypeId>": {
|
|
172
|
+
"name": "tag",
|
|
173
|
+
"title": "Tag",
|
|
174
|
+
"description": "A Tag model",
|
|
175
|
+
"schema": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"name": {
|
|
179
|
+
"key": "nameId",
|
|
180
|
+
"type": "string"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": ["name"]
|
|
184
|
+
},
|
|
185
|
+
"forms": {
|
|
186
|
+
"default": {
|
|
187
|
+
"order": ["name"]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://takeshape.io/schemas/project-schema#",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"author": "<userId>",
|
|
5
|
+
"apiVersion": "2",
|
|
6
|
+
"projectId": "project-id",
|
|
7
|
+
"defaultLocale": "en-us",
|
|
8
|
+
"locales": ["en-us"],
|
|
9
|
+
"workflows": {},
|
|
10
|
+
"created": 1466522179051,
|
|
11
|
+
"updated": 1466522179051,
|
|
12
|
+
"contentTypes": {
|
|
13
|
+
"BREWERY": {
|
|
14
|
+
"name": "brewery",
|
|
15
|
+
"single": false,
|
|
16
|
+
"schema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": {
|
|
20
|
+
"pattern": "^[\\S\\s]*?$",
|
|
21
|
+
"description": "",
|
|
22
|
+
"title": "Name",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"key": "SkngG4Tkl",
|
|
25
|
+
"minLength": 0
|
|
26
|
+
},
|
|
27
|
+
"addresses": {
|
|
28
|
+
"description": "",
|
|
29
|
+
"type": "array",
|
|
30
|
+
"title": "Addresses",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"image": {
|
|
35
|
+
"description": "",
|
|
36
|
+
"title": "Image",
|
|
37
|
+
"key": "HkIsDL6ye",
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"contentTypeId": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": ["ASSET"]
|
|
43
|
+
},
|
|
44
|
+
"id": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": ["contentTypeId", "id"],
|
|
49
|
+
"relationship": {
|
|
50
|
+
"contentTypeIds": ["ASSET"],
|
|
51
|
+
"type": "single"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"zipCode": {
|
|
55
|
+
"pattern": "^[\\S\\s]*?$",
|
|
56
|
+
"description": "",
|
|
57
|
+
"title": "Zip Code",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"key": "ryyeGNp1g",
|
|
60
|
+
"minLength": 0
|
|
61
|
+
},
|
|
62
|
+
"state": {
|
|
63
|
+
"pattern": "^[\\S\\s]*?$",
|
|
64
|
+
"description": "",
|
|
65
|
+
"title": "State",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"key": "SJuRbE6yx",
|
|
68
|
+
"minLength": 0
|
|
69
|
+
},
|
|
70
|
+
"city": {
|
|
71
|
+
"pattern": "^[\\S\\s]*?$",
|
|
72
|
+
"description": "",
|
|
73
|
+
"title": "City",
|
|
74
|
+
"type": "string",
|
|
75
|
+
"key": "S1ICWNa1e",
|
|
76
|
+
"minLength": 0
|
|
77
|
+
},
|
|
78
|
+
"street": {
|
|
79
|
+
"pattern": "^[\\S\\s]*?$",
|
|
80
|
+
"description": "",
|
|
81
|
+
"title": "Street",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"key": "Hy40-N61l",
|
|
84
|
+
"minLength": 0
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"key": "Hk56WNpke"
|
|
89
|
+
},
|
|
90
|
+
"_id": {
|
|
91
|
+
"title": "Id",
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"_contentTypeId": {
|
|
95
|
+
"title": "Content Type Id",
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"_version": {
|
|
99
|
+
"title": "Version",
|
|
100
|
+
"type": "integer"
|
|
101
|
+
},
|
|
102
|
+
"_createdAt": {
|
|
103
|
+
"title": "Created Date",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"format": "date-time"
|
|
106
|
+
},
|
|
107
|
+
"_updatedAt": {
|
|
108
|
+
"title": "Updated Date",
|
|
109
|
+
"type": "string",
|
|
110
|
+
"format": "date-time"
|
|
111
|
+
},
|
|
112
|
+
"_enabled": {
|
|
113
|
+
"title": "Enabled",
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"_enabledAt": {
|
|
117
|
+
"title": "Enabled Date",
|
|
118
|
+
"type": "string",
|
|
119
|
+
"format": "date-time"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": ["name"]
|
|
123
|
+
},
|
|
124
|
+
"title": "Brewery",
|
|
125
|
+
"forms": {
|
|
126
|
+
"default": {
|
|
127
|
+
"properties": {
|
|
128
|
+
"name": {
|
|
129
|
+
"widget": "singleLineText"
|
|
130
|
+
},
|
|
131
|
+
"addresses": {
|
|
132
|
+
"properties": {
|
|
133
|
+
"image": {
|
|
134
|
+
"widget": "image"
|
|
135
|
+
},
|
|
136
|
+
"zipCode": {
|
|
137
|
+
"widget": "singleLineText"
|
|
138
|
+
},
|
|
139
|
+
"state": {
|
|
140
|
+
"widget": "singleLineText"
|
|
141
|
+
},
|
|
142
|
+
"city": {
|
|
143
|
+
"widget": "singleLineText"
|
|
144
|
+
},
|
|
145
|
+
"street": {
|
|
146
|
+
"widget": "singleLineText"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"widget": "repeater",
|
|
150
|
+
"order": ["image", "street", "city", "state", "zipCode"]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"order": ["name", "addresses"]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"ASSET": {
|
|
158
|
+
"name": "asset",
|
|
159
|
+
"title": "Asset",
|
|
160
|
+
"description": "The built-in TakeShape asset model",
|
|
161
|
+
"schema": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"_enabled": {
|
|
165
|
+
"title": "Enabled",
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"filename": {
|
|
169
|
+
"title": "Filename",
|
|
170
|
+
"key": "H1oYQOM9",
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"mimeType": {
|
|
174
|
+
"title": "MIME type",
|
|
175
|
+
"key": "SyCYX_Gq",
|
|
176
|
+
"type": "string"
|
|
177
|
+
},
|
|
178
|
+
"_updatedAt": {
|
|
179
|
+
"title": "Updated Date",
|
|
180
|
+
"type": "string",
|
|
181
|
+
"format": "date-time"
|
|
182
|
+
},
|
|
183
|
+
"uploadStatus": {
|
|
184
|
+
"title": "Upload status",
|
|
185
|
+
"key": "ByeAYXdG9",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": ["PENDING", "COMPLETE"]
|
|
188
|
+
},
|
|
189
|
+
"_enabledAt": {
|
|
190
|
+
"title": "Enabled Date",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"format": "date-time"
|
|
193
|
+
},
|
|
194
|
+
"title": {
|
|
195
|
+
"title": "Title",
|
|
196
|
+
"key": "By5tQOMc",
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"_version": {
|
|
200
|
+
"title": "Version",
|
|
201
|
+
"type": "integer"
|
|
202
|
+
},
|
|
203
|
+
"_id": {
|
|
204
|
+
"title": "Id",
|
|
205
|
+
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"_contentTypeId": {
|
|
208
|
+
"title": "Content Type Id",
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"_createdAt": {
|
|
212
|
+
"title": "Created Date",
|
|
213
|
+
"type": "string",
|
|
214
|
+
"format": "date-time"
|
|
215
|
+
},
|
|
216
|
+
"path": {
|
|
217
|
+
"title": "s3 key",
|
|
218
|
+
"key": "Hk6FQuz5",
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": ["filename", "path"]
|
|
223
|
+
},
|
|
224
|
+
"forms": {
|
|
225
|
+
"default": {
|
|
226
|
+
"order": ["title"]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"hidden": true
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|