@takeshape/schema 8.45.2 → 8.48.1

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.
Files changed (70) hide show
  1. package/es/flatten-templates.js +1 -1
  2. package/es/migration/index.js +6 -1
  3. package/es/migration/to/v3.12.0.js +10 -0
  4. package/es/project-schema/index.js +1 -0
  5. package/es/project-schema/v3.12.0.js +1 -0
  6. package/es/refs.js +5 -1
  7. package/es/schemas/index.js +4 -3
  8. package/es/schemas/index.ts +4 -2
  9. package/es/schemas/project-schema/v3.12.0.json +2143 -0
  10. package/es/schemas/project-schema.json +3 -1
  11. package/es/template-shapes/templates.js +6 -3
  12. package/es/template-shapes/where.js +39 -30
  13. package/es/types/utils.js +2 -1
  14. package/examples/latest/blog-schema.json +1 -1
  15. package/examples/latest/brewery-schema.json +1 -1
  16. package/examples/latest/complex-project-schema.json +1 -1
  17. package/examples/latest/fabric-ecommerce.json +1 -1
  18. package/examples/latest/frank-and-fred-schema.json +1 -1
  19. package/examples/latest/massive-schema.json +1 -1
  20. package/examples/latest/mill-components-schema.json +1 -1
  21. package/examples/latest/pet-oneof-array.json +1 -1
  22. package/examples/latest/post-schema.json +1 -1
  23. package/examples/latest/pruned-shopify-product-schema.json +1 -1
  24. package/examples/latest/real-world-schema.json +1 -1
  25. package/examples/latest/recursive-repeater-schema.json +1 -1
  26. package/examples/latest/recursive-schema.json +1 -1
  27. package/examples/latest/rick-and-morty-ast.json +1 -1
  28. package/examples/latest/rick-and-morty-graphql.json +1 -1
  29. package/examples/latest/rick-and-morty-rest.json +1 -1
  30. package/examples/latest/schema-with-repeater-draftjs.json +1 -1
  31. package/examples/latest/shape-books-v3_2_0.json +1 -1
  32. package/examples/latest/shape-books.json +1 -1
  33. package/examples/latest/shopify-lookbook.json +1 -1
  34. package/examples/latest/shopify-store-with-widget.json +1 -1
  35. package/examples/latest/stripe-starter-resolved.json +1 -1
  36. package/examples/latest/user-schema-no-required.json +1 -1
  37. package/examples/latest/user-schema-with-defaults.json +1 -1
  38. package/lib/flatten-templates.js +1 -1
  39. package/lib/migration/index.d.ts.map +1 -1
  40. package/lib/migration/index.js +6 -0
  41. package/lib/migration/to/v3.12.0.d.ts +4 -0
  42. package/lib/migration/to/v3.12.0.d.ts.map +1 -0
  43. package/lib/migration/to/v3.12.0.js +18 -0
  44. package/lib/project-schema/index.d.ts +3 -1
  45. package/lib/project-schema/index.d.ts.map +1 -1
  46. package/lib/project-schema/index.js +27 -14
  47. package/lib/project-schema/latest.d.ts +7 -3
  48. package/lib/project-schema/latest.d.ts.map +1 -1
  49. package/lib/project-schema/v3.12.0.d.ts +1215 -0
  50. package/lib/project-schema/v3.12.0.d.ts.map +1 -0
  51. package/lib/project-schema/v3.12.0.js +5 -0
  52. package/lib/refs.d.ts.map +1 -1
  53. package/lib/refs.js +5 -1
  54. package/lib/schemas/index.d.ts +375 -375
  55. package/lib/schemas/index.d.ts.map +1 -1
  56. package/lib/schemas/index.js +18 -16
  57. package/lib/schemas/index.ts +4 -2
  58. package/lib/schemas/project-schema/v3.12.0.json +2143 -0
  59. package/lib/schemas/project-schema.json +3 -1
  60. package/lib/template-shapes/templates.d.ts.map +1 -1
  61. package/lib/template-shapes/templates.js +5 -2
  62. package/lib/template-shapes/where.d.ts +2 -2
  63. package/lib/template-shapes/where.d.ts.map +1 -1
  64. package/lib/template-shapes/where.js +39 -28
  65. package/lib/types/types.d.ts +2 -2
  66. package/lib/types/types.d.ts.map +1 -1
  67. package/lib/types/utils.d.ts +1 -0
  68. package/lib/types/utils.d.ts.map +1 -1
  69. package/lib/types/utils.js +4 -2
  70. package/package.json +6 -4
@@ -15,6 +15,8 @@
15
15
  {"$ref": "https://schema.takeshape.io/project-schema/v3.7.0#"},
16
16
  {"$ref": "https://schema.takeshape.io/project-schema/v3.8.0#"},
17
17
  {"$ref": "https://schema.takeshape.io/project-schema/v3.9.0#"},
18
- {"$ref": "https://schema.takeshape.io/project-schema/v3.10.0#"}
18
+ {"$ref": "https://schema.takeshape.io/project-schema/v3.10.0#"},
19
+ {"$ref": "https://schema.takeshape.io/project-schema/v3.11.0#"},
20
+ {"$ref": "https://schema.takeshape.io/project-schema/v3.12.0#"}
19
21
  ]
20
22
  }
@@ -1,7 +1,7 @@
1
1
  import { listTypePrefix } from '../migration';
2
2
  import { isDefined, pascalCase } from '@takeshape/util';
3
3
  import keyBy from 'lodash/keyBy';
4
- import { createShape, getShapeDependencies, mergeSchemaProperties } from '../schema-util';
4
+ import { createShape, getShapeDependencies, isIndexedRemoteShape, mergeSchemaProperties } from '../schema-util';
5
5
  import { getFlattenedTemplateShapeName, getRefShapeName } from '../refs';
6
6
  import { getWhereSearchArg } from './where';
7
7
  const CREATE = 'create';
@@ -361,13 +361,16 @@ const shapeFilterProps = {
361
361
  };
362
362
  export function getShapeListQueryArgs(templateName, legacyArgs) {
363
363
  return (context, shape) => {
364
+ const {
365
+ projectSchema
366
+ } = context;
364
367
  const isAllShapes = shape.name === 'TSSearchable';
365
368
  const shapeName = isAllShapes ? templateName : getFlattenedTemplateShapeName(shape.name, templateName);
366
- const shapes = isAllShapes ? Object.values(context.projectSchema.shapes) : [shape];
369
+ const shapes = isAllShapes ? Object.values(projectSchema.shapes).filter(s => s.model !== undefined || isIndexedRemoteShape(projectSchema, s)) : [shape];
367
370
  const {
368
371
  schema,
369
372
  dependencies
370
- } = getWhereSearchArg(context.projectSchema, shapes);
373
+ } = getWhereSearchArg(projectSchema, shapes);
371
374
  return {
372
375
  shapeName,
373
376
  dependencies: { ...dependencies,
@@ -5,11 +5,13 @@ import isEqual from 'lodash/isEqual';
5
5
  import get from 'lodash/get';
6
6
  import unset from 'lodash/unset';
7
7
  import isFunction from 'lodash/isFunction';
8
- import { createSchemaPropertyList, createShape, getAllRefsInShapes, getShapeById, isIndexedRemoteShape } from '../schema-util';
8
+ import { createSchemaPropertyList, createShape, getAllRefsInShapes, getShapeById } from '../schema-util';
9
9
  import { workflowsEnabled } from '../api-version';
10
- import { followRef, getRefOrItemsRef, hasRefProperty, hasResolvableRef, refItemToShapeName } from '../refs';
10
+ import { followRef, getRef, getRefOrItemsRef, hasRefProperty, hasResolvableRef, refItemToShape, refItemToShapeName } from '../refs';
11
11
  import { enumerateOneOfKeys, isUnionSchema } from '../unions';
12
12
  import { isObjectSchema } from '../types';
13
+ import uniqBy from 'lodash/uniqBy';
14
+ import md5 from 'blueimp-md5';
13
15
  export const MAX_RELATIONSHIP_DEPTH = 1;
14
16
  export const exceededRelationshipDepth = (depth = 0) => depth >= MAX_RELATIONSHIP_DEPTH;
15
17
 
@@ -197,7 +199,12 @@ function getPropType(projectSchema, name, prop) {
197
199
  return prop.type;
198
200
  }
199
201
 
200
- function getRelatedShapeNames(prop, projectSchema) {
202
+ function truncateNames(names) {
203
+ // For unions of many types hash the names this reduces shape name size while still allowing reuse
204
+ return names.length > 80 ? md5(names) : names;
205
+ }
206
+
207
+ function getRelatedShapeNames(projectSchema, prop) {
201
208
  var _prop$Relationship;
202
209
 
203
210
  const names = (_prop$Relationship = prop['@relationship']) === null || _prop$Relationship === void 0 ? void 0 : _prop$Relationship.shapeIds.map(id => {
@@ -229,13 +236,13 @@ function getTypeName(name, prop, shapeName, context) {
229
236
  }
230
237
 
231
238
  if (prop['@relationship']) {
232
- const shapeNames = getRelatedShapeNames(prop, projectSchema);
239
+ const shapeNames = truncateNames(getRelatedShapeNames(projectSchema, prop));
233
240
  return `TSWhere${shapeNames}Relationship`;
234
241
  }
235
242
 
236
243
  if (isUnionSchema(prop)) {
237
244
  if (prop.oneOf.length > 1) {
238
- const shapeNames = joinShapeNames(enumerateOneOfKeys(projectSchema, prop.oneOf).map(child => child.shapeName));
245
+ const shapeNames = truncateNames(joinShapeNames(enumerateOneOfKeys(projectSchema, prop.oneOf).map(child => child.shapeName)));
239
246
  return `TSWhere${shapeNames}Union`;
240
247
  }
241
248
 
@@ -260,7 +267,6 @@ function skipField(name, prop, projectSchema, exceededRelationshipDepth) {
260
267
 
261
268
  export function getFields(typeName, shapes, context) {
262
269
  const {
263
- shapeCache,
264
270
  relationshipDepth,
265
271
  booleanOperators,
266
272
  projectSchema
@@ -276,28 +282,15 @@ export function getFields(typeName, shapes, context) {
276
282
  }
277
283
  }
278
284
 
279
- return tooDeep || booleanOperators === false ? result : Object.assign(result, getBooleanOperatorTypes(result, typeName, shapeCache));
285
+ return tooDeep || booleanOperators === false ? result : Object.assign(result, getBooleanOperatorTypes(typeName));
280
286
  }
281
287
 
282
- function getBooleanOperatorTypes(fields, typeName, shapeCache) {
288
+ function getBooleanOperatorTypes(typeName) {
283
289
  const result = {};
284
290
 
285
291
  for (const op of booleanOperators) {
286
- const name = `${typeName}${pascalCase(op)}Operator`;
287
-
288
- if (!shapeCache.has(name)) {
289
- shapeCache.set(name, () => createShape(name, {
290
- type: 'object',
291
- properties: { ...fields,
292
- ...(op !== 'NOT' && getBooleanOperatorTypes(fields, typeName, shapeCache))
293
- }
294
- }, {
295
- description: boolOpDescriptionMap[op]
296
- }));
297
- }
298
-
299
292
  const refSchema = {
300
- '@ref': `local:${name}`
293
+ '@ref': `local:${typeName}`
301
294
  };
302
295
  result[op] = op === 'NOT' ? refSchema : {
303
296
  type: 'array',
@@ -456,12 +449,28 @@ function pruneEmpty(shapes) {
456
449
  return shapes;
457
450
  }
458
451
 
459
- export function getWhereShape(projectSchema, shapes) {
460
- const isManyContentTypes = shapes.length > 1;
461
- const shapeName = isManyContentTypes ? 'TSWhereInput' : `TSWhere${pascalCase(shapes[0].name)}Input`;
452
+ function getReferencedShape(context) {
453
+ return prop => {
454
+ const ref = getRef(context, prop);
455
+ return ref && refItemToShape(context, ref);
456
+ };
457
+ }
458
+ /**
459
+ * Expand union shapes
460
+ */
461
+
462
+
463
+ function expandUnionShapes(projectSchema, shapes) {
464
+ return uniqBy(shapes.flatMap(shape => isUnionSchema(shape.schema) ? shape.schema.oneOf.map(getReferencedShape(projectSchema)).filter(isDefined) : shape), 'name');
465
+ }
466
+
467
+ export function getWhereShape(projectSchema, selectedShapes) {
468
+ const shapeName = selectedShapes.length === 1 ? `TSWhere${pascalCase(selectedShapes[0].name)}Input` : 'TSWhereInput';
469
+ const expandedShapes = expandUnionShapes(projectSchema, selectedShapes);
470
+ const isManyContentTypes = expandedShapes.length > 1;
462
471
  const shapeCache = new ShapeCache();
463
- const conflictingProperties = getConflictingProperties(projectSchema, shapes);
464
- const fields = getFields(shapeName, shapes, {
472
+ const conflictingProperties = getConflictingProperties(projectSchema, expandedShapes);
473
+ const fields = getFields(shapeName, expandedShapes, {
465
474
  projectSchema,
466
475
  shapeCache,
467
476
  conflictingProperties,
@@ -473,18 +482,18 @@ export function getWhereShape(projectSchema, shapes) {
473
482
  [shapeName]: createShape(shapeName, {
474
483
  type: 'object',
475
484
  properties: { ...fields,
476
- ...(isManyContentTypes && getBooleanOperatorTypes(fields, shapeName, shapeCache))
485
+ ...(isManyContentTypes && getBooleanOperatorTypes(shapeName))
477
486
  }
478
487
  }),
479
488
  ...shapeCache.resolveAll()
480
489
  })
481
490
  };
482
491
  }
483
- export function getWhereSearchArg(projectSchema, shapes) {
492
+ export function getWhereSearchArg(projectSchema, selectedShapes) {
484
493
  const {
485
494
  shapeName,
486
495
  dependencies
487
- } = getWhereShape(projectSchema, shapes.filter(s => s.model !== undefined || isIndexedRemoteShape(projectSchema, s)));
496
+ } = getWhereShape(projectSchema, selectedShapes);
488
497
  const schema = {
489
498
  type: 'object',
490
499
  properties: {
package/es/types/utils.js CHANGED
@@ -69,6 +69,7 @@ export const isProjectSchemaV3_8 = createVersionPredicate('3.8.0');
69
69
  export const isProjectSchemaV3_9 = createVersionPredicate('3.9.0');
70
70
  export const isProjectSchemaV3_10 = createVersionPredicate('3.10.0');
71
71
  export const isProjectSchemaV3_11 = createVersionPredicate('3.11.0');
72
+ export const isProjectSchemaV3_12 = createVersionPredicate('3.12.0');
72
73
  export const isLatestProjectSchema = createVersionPredicate(CURRENT_SCHEMA_VERSION);
73
74
  export function isV3XSchema(maybeSchema) {
74
75
  if (!isObject(maybeSchema) || !isString(maybeSchema.projectId) || !isString(maybeSchema.schemaVersion)) {
@@ -88,7 +89,7 @@ export function isAnyProjectSchema(value) {
88
89
  }
89
90
 
90
91
  const maybeSchema = value;
91
- return isObject(value) && isString(maybeSchema.projectId) && (isProjectSchemaV1(maybeSchema) || isProjectSchemaV3(maybeSchema) || isProjectSchemaV3_1(maybeSchema) || isProjectSchemaV3_2(maybeSchema) || isProjectSchemaV3_3(maybeSchema) || isProjectSchemaV3_4(maybeSchema) || isProjectSchemaV3_5(maybeSchema) || isProjectSchemaV3_5_1(maybeSchema) || isProjectSchemaV3_6(maybeSchema) || isProjectSchemaV3_7(maybeSchema) || isProjectSchemaV3_8(maybeSchema) || isProjectSchemaV3_9(maybeSchema) || isProjectSchemaV3_10(maybeSchema) || isProjectSchemaV3_11(maybeSchema));
92
+ return isObject(value) && isString(maybeSchema.projectId) && (isProjectSchemaV1(maybeSchema) || isProjectSchemaV3(maybeSchema) || isProjectSchemaV3_1(maybeSchema) || isProjectSchemaV3_2(maybeSchema) || isProjectSchemaV3_3(maybeSchema) || isProjectSchemaV3_4(maybeSchema) || isProjectSchemaV3_5(maybeSchema) || isProjectSchemaV3_5_1(maybeSchema) || isProjectSchemaV3_6(maybeSchema) || isProjectSchemaV3_7(maybeSchema) || isProjectSchemaV3_8(maybeSchema) || isProjectSchemaV3_9(maybeSchema) || isProjectSchemaV3_10(maybeSchema) || isProjectSchemaV3_11(maybeSchema) || isProjectSchemaV3_12(maybeSchema));
92
93
  }
93
94
  export function isProjectSchemaWithServices(schema) {
94
95
  return typeof schema.dataKey !== 'undefined' && typeof schema.services !== 'undefined';
@@ -373,6 +373,6 @@
373
373
  }
374
374
  }
375
375
  },
376
- "schemaVersion": "3.11.0",
376
+ "schemaVersion": "3.12.0",
377
377
  "services": {}
378
378
  }
@@ -378,6 +378,6 @@
378
378
  }
379
379
  }
380
380
  },
381
- "schemaVersion": "3.11.0",
381
+ "schemaVersion": "3.12.0",
382
382
  "services": {}
383
383
  }
@@ -3892,6 +3892,6 @@
3892
3892
  }
3893
3893
  }
3894
3894
  },
3895
- "schemaVersion": "3.11.0",
3895
+ "schemaVersion": "3.12.0",
3896
3896
  "services": {}
3897
3897
  }
@@ -10516,5 +10516,5 @@
10516
10516
  }
10517
10517
  }
10518
10518
  },
10519
- "schemaVersion": "3.11.0"
10519
+ "schemaVersion": "3.12.0"
10520
10520
  }
@@ -19833,6 +19833,6 @@
19833
19833
  }
19834
19834
  }
19835
19835
  },
19836
- "schemaVersion": "3.11.0",
19836
+ "schemaVersion": "3.12.0",
19837
19837
  "services": {}
19838
19838
  }
@@ -7021,6 +7021,6 @@
7021
7021
  }
7022
7022
  }
7023
7023
  },
7024
- "schemaVersion": "3.11.0",
7024
+ "schemaVersion": "3.12.0",
7025
7025
  "services": {}
7026
7026
  }
@@ -1787,6 +1787,6 @@
1787
1787
  }
1788
1788
  }
1789
1789
  },
1790
- "schemaVersion": "3.11.0",
1790
+ "schemaVersion": "3.12.0",
1791
1791
  "services": {}
1792
1792
  }
@@ -404,6 +404,6 @@
404
404
  }
405
405
  }
406
406
  },
407
- "schemaVersion": "3.11.0",
407
+ "schemaVersion": "3.12.0",
408
408
  "services": {}
409
409
  }
@@ -220,6 +220,6 @@
220
220
  }
221
221
  }
222
222
  },
223
- "schemaVersion": "3.11.0",
223
+ "schemaVersion": "3.12.0",
224
224
  "services": {}
225
225
  }
@@ -9760,5 +9760,5 @@
9760
9760
  }
9761
9761
  }
9762
9762
  },
9763
- "schemaVersion": "3.11.0"
9763
+ "schemaVersion": "3.12.0"
9764
9764
  }
@@ -990,6 +990,6 @@
990
990
  }
991
991
  }
992
992
  },
993
- "schemaVersion": "3.11.0",
993
+ "schemaVersion": "3.12.0",
994
994
  "services": {}
995
995
  }
@@ -138,6 +138,6 @@
138
138
  }
139
139
  }
140
140
  },
141
- "schemaVersion": "3.11.0",
141
+ "schemaVersion": "3.12.0",
142
142
  "services": {}
143
143
  }
@@ -145,6 +145,6 @@
145
145
  }
146
146
  }
147
147
  },
148
- "schemaVersion": "3.11.0",
148
+ "schemaVersion": "3.12.0",
149
149
  "services": {}
150
150
  }
@@ -2673,5 +2673,5 @@
2673
2673
  }
2674
2674
  }
2675
2675
  },
2676
- "schemaVersion": "3.11.0"
2676
+ "schemaVersion": "3.12.0"
2677
2677
  }
@@ -2198,5 +2198,5 @@
2198
2198
  }
2199
2199
  }
2200
2200
  },
2201
- "schemaVersion": "3.11.0"
2201
+ "schemaVersion": "3.12.0"
2202
2202
  }
@@ -96,5 +96,5 @@
96
96
  }
97
97
  }
98
98
  },
99
- "schemaVersion": "3.11.0"
99
+ "schemaVersion": "3.12.0"
100
100
  }
@@ -377,6 +377,6 @@
377
377
  }
378
378
  }
379
379
  },
380
- "schemaVersion": "3.11.0",
380
+ "schemaVersion": "3.12.0",
381
381
  "services": {}
382
382
  }
@@ -1077,6 +1077,6 @@
1077
1077
  }
1078
1078
  }
1079
1079
  },
1080
- "schemaVersion": "3.11.0",
1080
+ "schemaVersion": "3.12.0",
1081
1081
  "services": {}
1082
1082
  }
@@ -1037,6 +1037,6 @@
1037
1037
  }
1038
1038
  }
1039
1039
  },
1040
- "schemaVersion": "3.11.0",
1040
+ "schemaVersion": "3.12.0",
1041
1041
  "services": {}
1042
1042
  }
@@ -1176,5 +1176,5 @@
1176
1176
  }
1177
1177
  }
1178
1178
  },
1179
- "schemaVersion": "3.11.0"
1179
+ "schemaVersion": "3.12.0"
1180
1180
  }
@@ -12534,5 +12534,5 @@
12534
12534
  }
12535
12535
  }
12536
12536
  },
12537
- "schemaVersion": "3.11.0"
12537
+ "schemaVersion": "3.12.0"
12538
12538
  }
@@ -29312,5 +29312,5 @@
29312
29312
  }
29313
29313
  }
29314
29314
  },
29315
- "schemaVersion": "3.11.0"
29315
+ "schemaVersion": "3.12.0"
29316
29316
  }
@@ -169,6 +169,6 @@
169
169
  }
170
170
  }
171
171
  },
172
- "schemaVersion": "3.11.0",
172
+ "schemaVersion": "3.12.0",
173
173
  "services": {}
174
174
  }
@@ -194,6 +194,6 @@
194
194
  }
195
195
  }
196
196
  },
197
- "schemaVersion": "3.11.0",
197
+ "schemaVersion": "3.12.0",
198
198
  "services": {}
199
199
  }
@@ -32,7 +32,7 @@ function flattenTemplates(projectSchema) {
32
32
  shapeName,
33
33
  dependencies
34
34
  } = (0, _templateShapes.resolveTemplate)(projectSchema, ref.template, (0, _refs.refItemToShapeName)(ref));
35
- (0, _set.default)(newSchema, ref.path, shapeName);
35
+ (0, _set.default)(newSchema, ref.path, ref.path[ref.path.length - 1] === '@ref' ? `local:${shapeName}` : shapeName);
36
36
  Object.assign(newSchema.shapes, dependencies);
37
37
  }
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,SAAS,CAAC;AA+B3D,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,gBAAgB,GAC9B,OAAO,CAAC,aAAa,CAAC,CA0DxB;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,6BAA6B,EACtC,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAMpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,SAAS,CAAC;AAiC3D,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,gBAAgB,GAC9B,OAAO,CAAC,aAAa,CAAC,CA8DxB;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,6BAA6B,EACtC,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAMpC"}
@@ -40,6 +40,8 @@ var _v12 = _interopRequireDefault(require("./to/v3.10.0"));
40
40
 
41
41
  var _v13 = _interopRequireDefault(require("./to/v3.11.0"));
42
42
 
43
+ var _v14 = _interopRequireDefault(require("./to/v3.12.0"));
44
+
43
45
  var _utils2 = require("./utils");
44
46
 
45
47
  Object.keys(_utils2).forEach(function (key) {
@@ -116,6 +118,10 @@ async function migrateToLatestProjectSchema(context, projectSchema) {
116
118
  projectSchema = (0, _v13.default)(context, projectSchema);
117
119
  }
118
120
 
121
+ if ((0, _utils.isProjectSchemaV3_11)(projectSchema)) {
122
+ projectSchema = (0, _v14.default)(projectSchema);
123
+ }
124
+
119
125
  return projectSchema;
120
126
  }
121
127
 
@@ -0,0 +1,4 @@
1
+ import type { ProjectSchemaV3_11_0, ProjectSchemaV3_12_0 } from '../../project-schema';
2
+ declare function migrateToV3_12_0(projectSchema: ProjectSchemaV3_11_0): ProjectSchemaV3_12_0;
3
+ export default migrateToV3_12_0;
4
+ //# sourceMappingURL=v3.12.0.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v3.12.0.d.ts","sourceRoot":"","sources":["../../../../src/migration/to/v3.12.0.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAErF,iBAAS,gBAAgB,CAAC,aAAa,EAAE,oBAAoB,GAAG,oBAAoB,CAQnF;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ function migrateToV3_12_0(projectSchema) {
9
+ /**
10
+ * No migration needed all changes are backwards compatible.
11
+ */
12
+ return { ...projectSchema,
13
+ schemaVersion: '3.12.0'
14
+ };
15
+ }
16
+
17
+ var _default = migrateToV3_12_0;
18
+ exports.default = _default;
@@ -1,5 +1,6 @@
1
1
  export * from './latest';
2
2
  export * from './v4.0.0';
3
+ export * from './v3.12.0';
3
4
  export * from './v3.11.0';
4
5
  export * from './v3.10.0';
5
6
  export * from './v3.9.0';
@@ -15,6 +16,7 @@ export * from './v3.1.0';
15
16
  export * from './v3.0.0';
16
17
  export * from './v1.0.0';
17
18
  import { ProjectSchemaV4_0_0 } from './v4.0.0';
19
+ import { ProjectSchemaV3_12_0 } from './v3.12.0';
18
20
  import { ProjectSchemaV3_11_0 } from './v3.11.0';
19
21
  import { ProjectSchemaV3_10_0 } from './v3.10.0';
20
22
  import { ProjectSchemaV3_9_0 } from './v3.9.0';
@@ -30,5 +32,5 @@ import { ProjectSchemaV3_1_0 } from './v3.1.0';
30
32
  import { ProjectSchemaV3_0_0 } from './v3.0.0';
31
33
  import { ProjectSchemaV1_0_0 } from './v1.0.0';
32
34
  import { ProjectSchema } from './latest';
33
- export declare type AnyProjectSchema = ProjectSchemaV4_0_0 | ProjectSchemaV3_11_0 | ProjectSchemaV3_10_0 | ProjectSchemaV3_9_0 | ProjectSchemaV3_8_0 | ProjectSchemaV3_7_0 | ProjectSchemaV3_6_0 | ProjectSchemaV3_5_1 | ProjectSchemaV3_5_0 | ProjectSchemaV3_4_0 | ProjectSchemaV3_3_0 | ProjectSchemaV3_2_0 | ProjectSchemaV3_1_0 | ProjectSchemaV3_0_0 | ProjectSchemaV1_0_0 | ProjectSchema;
35
+ export declare type AnyProjectSchema = ProjectSchemaV4_0_0 | ProjectSchemaV3_12_0 | ProjectSchemaV3_11_0 | ProjectSchemaV3_10_0 | ProjectSchemaV3_9_0 | ProjectSchemaV3_8_0 | ProjectSchemaV3_7_0 | ProjectSchemaV3_6_0 | ProjectSchemaV3_5_1 | ProjectSchemaV3_5_0 | ProjectSchemaV3_4_0 | ProjectSchemaV3_3_0 | ProjectSchemaV3_2_0 | ProjectSchemaV3_1_0 | ProjectSchemaV3_0_0 | ProjectSchemaV1_0_0 | ProjectSchema;
34
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/project-schema/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,oBAAY,gBAAgB,GACxB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/project-schema/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,oBAAY,gBAAgB,GACxB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,CAAC"}
@@ -30,7 +30,7 @@ Object.keys(_v).forEach(function (key) {
30
30
  });
31
31
  });
32
32
 
33
- var _v2 = require("./v3.11.0");
33
+ var _v2 = require("./v3.12.0");
34
34
 
35
35
  Object.keys(_v2).forEach(function (key) {
36
36
  if (key === "default" || key === "__esModule") return;
@@ -43,7 +43,7 @@ Object.keys(_v2).forEach(function (key) {
43
43
  });
44
44
  });
45
45
 
46
- var _v3 = require("./v3.10.0");
46
+ var _v3 = require("./v3.11.0");
47
47
 
48
48
  Object.keys(_v3).forEach(function (key) {
49
49
  if (key === "default" || key === "__esModule") return;
@@ -56,7 +56,7 @@ Object.keys(_v3).forEach(function (key) {
56
56
  });
57
57
  });
58
58
 
59
- var _v4 = require("./v3.9.0");
59
+ var _v4 = require("./v3.10.0");
60
60
 
61
61
  Object.keys(_v4).forEach(function (key) {
62
62
  if (key === "default" || key === "__esModule") return;
@@ -69,7 +69,7 @@ Object.keys(_v4).forEach(function (key) {
69
69
  });
70
70
  });
71
71
 
72
- var _v5 = require("./v3.8.0");
72
+ var _v5 = require("./v3.9.0");
73
73
 
74
74
  Object.keys(_v5).forEach(function (key) {
75
75
  if (key === "default" || key === "__esModule") return;
@@ -82,7 +82,7 @@ Object.keys(_v5).forEach(function (key) {
82
82
  });
83
83
  });
84
84
 
85
- var _v6 = require("./v3.7.0");
85
+ var _v6 = require("./v3.8.0");
86
86
 
87
87
  Object.keys(_v6).forEach(function (key) {
88
88
  if (key === "default" || key === "__esModule") return;
@@ -95,7 +95,7 @@ Object.keys(_v6).forEach(function (key) {
95
95
  });
96
96
  });
97
97
 
98
- var _v7 = require("./v3.6.0");
98
+ var _v7 = require("./v3.7.0");
99
99
 
100
100
  Object.keys(_v7).forEach(function (key) {
101
101
  if (key === "default" || key === "__esModule") return;
@@ -108,7 +108,7 @@ Object.keys(_v7).forEach(function (key) {
108
108
  });
109
109
  });
110
110
 
111
- var _v8 = require("./v3.5.1");
111
+ var _v8 = require("./v3.6.0");
112
112
 
113
113
  Object.keys(_v8).forEach(function (key) {
114
114
  if (key === "default" || key === "__esModule") return;
@@ -121,7 +121,7 @@ Object.keys(_v8).forEach(function (key) {
121
121
  });
122
122
  });
123
123
 
124
- var _v9 = require("./v3.5.0");
124
+ var _v9 = require("./v3.5.1");
125
125
 
126
126
  Object.keys(_v9).forEach(function (key) {
127
127
  if (key === "default" || key === "__esModule") return;
@@ -134,7 +134,7 @@ Object.keys(_v9).forEach(function (key) {
134
134
  });
135
135
  });
136
136
 
137
- var _v10 = require("./v3.4.0");
137
+ var _v10 = require("./v3.5.0");
138
138
 
139
139
  Object.keys(_v10).forEach(function (key) {
140
140
  if (key === "default" || key === "__esModule") return;
@@ -147,7 +147,7 @@ Object.keys(_v10).forEach(function (key) {
147
147
  });
148
148
  });
149
149
 
150
- var _v11 = require("./v3.3.0");
150
+ var _v11 = require("./v3.4.0");
151
151
 
152
152
  Object.keys(_v11).forEach(function (key) {
153
153
  if (key === "default" || key === "__esModule") return;
@@ -160,7 +160,7 @@ Object.keys(_v11).forEach(function (key) {
160
160
  });
161
161
  });
162
162
 
163
- var _v12 = require("./v3.2.0");
163
+ var _v12 = require("./v3.3.0");
164
164
 
165
165
  Object.keys(_v12).forEach(function (key) {
166
166
  if (key === "default" || key === "__esModule") return;
@@ -173,7 +173,7 @@ Object.keys(_v12).forEach(function (key) {
173
173
  });
174
174
  });
175
175
 
176
- var _v13 = require("./v3.1.0");
176
+ var _v13 = require("./v3.2.0");
177
177
 
178
178
  Object.keys(_v13).forEach(function (key) {
179
179
  if (key === "default" || key === "__esModule") return;
@@ -186,7 +186,7 @@ Object.keys(_v13).forEach(function (key) {
186
186
  });
187
187
  });
188
188
 
189
- var _v14 = require("./v3.0.0");
189
+ var _v14 = require("./v3.1.0");
190
190
 
191
191
  Object.keys(_v14).forEach(function (key) {
192
192
  if (key === "default" || key === "__esModule") return;
@@ -199,7 +199,7 @@ Object.keys(_v14).forEach(function (key) {
199
199
  });
200
200
  });
201
201
 
202
- var _v15 = require("./v1.0.0");
202
+ var _v15 = require("./v3.0.0");
203
203
 
204
204
  Object.keys(_v15).forEach(function (key) {
205
205
  if (key === "default" || key === "__esModule") return;
@@ -210,4 +210,17 @@ Object.keys(_v15).forEach(function (key) {
210
210
  return _v15[key];
211
211
  }
212
212
  });
213
+ });
214
+
215
+ var _v16 = require("./v1.0.0");
216
+
217
+ Object.keys(_v16).forEach(function (key) {
218
+ if (key === "default" || key === "__esModule") return;
219
+ if (key in exports && exports[key] === _v16[key]) return;
220
+ Object.defineProperty(exports, key, {
221
+ enumerable: true,
222
+ get: function () {
223
+ return _v16[key];
224
+ }
225
+ });
213
226
  });