@takeshape/schema 8.64.0 → 8.67.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/es/index.js +2 -1
- package/es/migration/index.js +8 -2
- package/es/migration/to/v3.14.0.js +10 -0
- package/es/project-schema/index.js +1 -0
- package/es/project-schema/v3.13.1.js +1 -0
- package/es/project-schema/v3.14.0.js +1 -0
- package/es/rewrite.js +59 -0
- package/es/schema-util.js +3 -3
- package/es/schemas/index.js +4 -3
- package/es/schemas/index.ts +4 -2
- package/es/schemas/project-schema/v3.14.0.json +2379 -0
- package/es/schemas/project-schema.json +2 -1
- package/es/template-shapes/templates.js +56 -45
- package/es/template-shapes/types.js +8 -1
- package/es/types/utils.js +1 -0
- package/examples/latest/betzino.json +1 -1
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +1 -1
- package/examples/latest/complex-project-schema.json +1 -1
- package/examples/latest/fabric-ecommerce.json +1 -1
- package/examples/latest/frank-and-fred-schema.json +1 -1
- package/examples/latest/massive-schema.json +1 -1
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/pet-oneof-array.json +1 -1
- package/examples/latest/post-schema.json +1 -1
- package/examples/latest/pruned-shopify-product-schema.json +1 -1
- package/examples/latest/real-world-schema.json +1 -1
- package/examples/latest/recursive-repeater-schema.json +1 -1
- package/examples/latest/recursive-schema.json +1 -1
- package/examples/latest/rick-and-morty-ast.json +1 -1
- package/examples/latest/rick-and-morty-graphql.json +1 -1
- package/examples/latest/rick-and-morty-rest.json +1 -1
- package/examples/latest/schema-with-repeater-draftjs.json +1 -1
- package/examples/latest/shape-books-v3_2_0.json +1 -1
- package/examples/latest/shape-books.json +1 -1
- package/examples/latest/shopify-lookbook.json +1 -1
- package/examples/latest/shopify-store-with-widget.json +1 -1
- package/examples/latest/stripe-starter-resolved.json +1 -1
- package/examples/latest/user-schema-no-required.json +1 -1
- package/examples/latest/user-schema-with-defaults.json +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -0
- package/lib/migration/index.d.ts.map +1 -1
- package/lib/migration/index.js +8 -1
- package/lib/migration/to/v3.14.0.d.ts +4 -0
- package/lib/migration/to/v3.14.0.d.ts.map +1 -0
- package/lib/migration/to/v3.14.0.js +18 -0
- package/lib/project-schema/index.d.ts +3 -1
- package/lib/project-schema/index.d.ts.map +1 -1
- package/lib/project-schema/index.js +32 -19
- package/lib/project-schema/latest.d.ts +120 -1
- package/lib/project-schema/latest.d.ts.map +1 -1
- package/lib/project-schema/v3.13.1.d.ts +1413 -0
- package/lib/project-schema/v3.13.1.d.ts.map +1 -0
- package/lib/project-schema/v3.13.1.js +5 -0
- package/lib/project-schema/v3.14.0.d.ts +1437 -0
- package/lib/project-schema/v3.14.0.d.ts.map +1 -0
- package/lib/project-schema/v3.14.0.js +5 -0
- package/lib/rewrite.d.ts +10 -0
- package/lib/rewrite.d.ts.map +1 -0
- package/lib/rewrite.js +69 -0
- package/lib/schema-util.d.ts +1 -1
- package/lib/schema-util.d.ts.map +1 -1
- package/lib/schema-util.js +5 -4
- package/lib/schemas/index.d.ts +2 -2
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +23 -21
- package/lib/schemas/index.ts +4 -2
- package/lib/schemas/project-schema/v3.14.0.json +2379 -0
- package/lib/schemas/project-schema.json +2 -1
- package/lib/template-shapes/templates.d.ts +11 -4
- package/lib/template-shapes/templates.d.ts.map +1 -1
- package/lib/template-shapes/templates.js +60 -49
- package/lib/template-shapes/types.d.ts +6 -0
- package/lib/template-shapes/types.d.ts.map +1 -1
- package/lib/template-shapes/types.js +11 -1
- package/lib/types/types.d.ts +2 -2
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils.d.ts +2 -1
- package/lib/types/utils.d.ts.map +1 -1
- package/lib/types/utils.js +3 -1
- package/package.json +4 -4
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
{"$ref": "https://schema.takeshape.io/project-schema/v3.12.0#"},
|
|
21
21
|
{"$ref": "https://schema.takeshape.io/project-schema/v3.12.1#"},
|
|
22
22
|
{"$ref": "https://schema.takeshape.io/project-schema/v3.12.2#"},
|
|
23
|
-
{"$ref": "https://schema.takeshape.io/project-schema/v3.13.0#"}
|
|
23
|
+
{"$ref": "https://schema.takeshape.io/project-schema/v3.13.0#"},
|
|
24
|
+
{"$ref": "https://schema.takeshape.io/project-schema/v3.14.0#"}
|
|
24
25
|
]
|
|
25
26
|
}
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
+
import { TemplateVerbs } from './types';
|
|
1
2
|
import { listTypePrefix } from '../migration';
|
|
2
3
|
import { isDefined, pascalCase } from '@takeshape/util';
|
|
3
4
|
import keyBy from 'lodash/keyBy';
|
|
4
5
|
import { createShape, getShapeDependencies, isIndexedRemoteShape, mergeSchemaProperties } from '../schema-util';
|
|
6
|
+
import { rewriteSchema } from '../rewrite';
|
|
5
7
|
import { getFlattenedTemplateShapeName, getRefShapeName } from '../refs';
|
|
6
8
|
import { getWhereSearchArg } from './where';
|
|
7
|
-
const CREATE = 'create';
|
|
8
|
-
const UPDATE = 'update';
|
|
9
|
-
const DELETE = 'delete';
|
|
10
|
-
const DUPLICATE = 'duplicate';
|
|
11
9
|
export const TSGetArgs = getIDQueryArgs('TSGetArgs');
|
|
12
10
|
export const TSGetSingletonArgs = getIDQueryArgs('TSGetSingletonArgs');
|
|
13
11
|
export const TSListArgs = getShapeListQueryArgs('TSListArgs', true);
|
|
14
12
|
export const TSSearchArgs = getShapeListQueryArgs('TSSearchArgs', false);
|
|
15
|
-
export const CreateArgs = getMutationArgs('CreateArgs',
|
|
16
|
-
export const UpdateArgs = getMutationArgs('UpdateArgs',
|
|
17
|
-
export const DuplicateArgs = getMutationArgs('DuplicateArgs',
|
|
18
|
-
export const DeleteArgs = getMutationArgs('DeleteArgs',
|
|
13
|
+
export const CreateArgs = getMutationArgs('CreateArgs', TemplateVerbs.Create);
|
|
14
|
+
export const UpdateArgs = getMutationArgs('UpdateArgs', TemplateVerbs.Update);
|
|
15
|
+
export const DuplicateArgs = getMutationArgs('DuplicateArgs', TemplateVerbs.Duplicate);
|
|
16
|
+
export const DeleteArgs = getMutationArgs('DeleteArgs', TemplateVerbs.Delete);
|
|
19
17
|
export const PaginatedList = getPaginatedListShape;
|
|
20
18
|
export const SearchResults = getSearchResultsShape;
|
|
21
|
-
export const CreateResult = getMutationResultType(
|
|
22
|
-
export const UpdateResult = getMutationResultType(
|
|
23
|
-
export const DuplicateResult = getMutationResultType(
|
|
24
|
-
export const DeleteResult = getMutationResultType(
|
|
19
|
+
export const CreateResult = getMutationResultType(TemplateVerbs.Create);
|
|
20
|
+
export const UpdateResult = getMutationResultType(TemplateVerbs.Update);
|
|
21
|
+
export const DuplicateResult = getMutationResultType(TemplateVerbs.Duplicate);
|
|
22
|
+
export const DeleteResult = getMutationResultType(TemplateVerbs.Delete);
|
|
25
23
|
export const TSSearchSortInput = createShape('TSSearchSortInput', {
|
|
26
24
|
type: 'object',
|
|
27
25
|
properties: {
|
|
@@ -166,25 +164,6 @@ const idSchema = {
|
|
|
166
164
|
},
|
|
167
165
|
required: ['_id']
|
|
168
166
|
};
|
|
169
|
-
export function rewriteSchema(shapeSchema) {
|
|
170
|
-
return JSON.parse(JSON.stringify(shapeSchema), (key, value) => {
|
|
171
|
-
if (typeof value === 'object') {
|
|
172
|
-
var _value$required;
|
|
173
|
-
|
|
174
|
-
// Remove required
|
|
175
|
-
if ((_value$required = value.required) !== null && _value$required !== void 0 && _value$required.length) {
|
|
176
|
-
delete value.required;
|
|
177
|
-
} // Remove default
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (value.type !== undefined && value.default !== undefined) {
|
|
181
|
-
delete value.default;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return value;
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
167
|
export function getIDQueryArgs(templateName) {
|
|
189
168
|
return (context, shape) => {
|
|
190
169
|
var _shape$model;
|
|
@@ -206,18 +185,49 @@ function mergeObjectSchemas(...args) {
|
|
|
206
185
|
properties: {}
|
|
207
186
|
});
|
|
208
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Construct a shape name used for a mutation input shape.
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
export function getMutationInputShapeName(verb) {
|
|
194
|
+
return shapeName => {
|
|
195
|
+
return pascalCase([verb, shapeName, 'input']);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Create a shape name variant for an input. Updates will typically want a partial input.
|
|
201
|
+
*/
|
|
202
|
+
function getInputShapeName(shapeName, {
|
|
203
|
+
isPartial
|
|
204
|
+
}) {
|
|
205
|
+
return isPartial ? `${shapeName}PartialInput` : `${shapeName}Input`;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Construct shapes for a mutation inputs, given source shape info.
|
|
209
|
+
*/
|
|
210
|
+
|
|
209
211
|
|
|
210
212
|
export function getMutationArgs(templateName, verb) {
|
|
213
|
+
const getShapeName = getMutationInputShapeName(verb);
|
|
214
|
+
const addLocale = verb === TemplateVerbs.Update || verb === TemplateVerbs.Duplicate;
|
|
215
|
+
const addStructure = verb === TemplateVerbs.Update;
|
|
216
|
+
const isUpdate = verb === TemplateVerbs.Update || verb === TemplateVerbs.Duplicate;
|
|
211
217
|
return ({
|
|
212
218
|
projectSchema
|
|
213
219
|
}, shape) => {
|
|
214
|
-
const
|
|
215
|
-
const addStructure = verb === UPDATE;
|
|
216
|
-
const inputName = pascalCase([verb, shape.name, 'input']);
|
|
220
|
+
const inputName = getShapeName(shape.name);
|
|
217
221
|
const isSingleton = shape.model && shape.model.type === 'single';
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
|
|
222
|
+
const shouldRequireId = !isSingleton && (verb === TemplateVerbs.Update || verb === TemplateVerbs.Delete || verb === TemplateVerbs.Duplicate);
|
|
223
|
+
const rewrittenSchema = verb !== TemplateVerbs.Delete ? rewriteSchema(shape.schema, isUpdate ? {
|
|
224
|
+
removeDefault: true,
|
|
225
|
+
removeRequired: true,
|
|
226
|
+
replaceInput: true
|
|
227
|
+
} : {
|
|
228
|
+
replaceInput: true
|
|
229
|
+
}) : undefined;
|
|
230
|
+
const inputShape = createShape(inputName, mergeObjectSchemas(shouldRequireId ? idSchema : undefined, rewrittenSchema), {
|
|
221
231
|
description: `${verb} ${shape.name} input`
|
|
222
232
|
});
|
|
223
233
|
const argsShapeName = getFlattenedTemplateShapeName(shape.name, templateName);
|
|
@@ -233,15 +243,12 @@ export function getMutationArgs(templateName, verb) {
|
|
|
233
243
|
},
|
|
234
244
|
required: ['input']
|
|
235
245
|
}, addStructure ? contentStructureFields : undefined, addLocale ? localeProps : undefined));
|
|
236
|
-
|
|
237
|
-
const getInputShapeName = shapeName => isUpdate ? `${shapeName}PartialInput` : `${shapeName}Input`;
|
|
238
|
-
|
|
239
246
|
return {
|
|
240
247
|
shapeName: argsShapeName,
|
|
241
248
|
dependencies: {
|
|
242
249
|
[inputName]: inputShape,
|
|
243
250
|
[argsShapeName]: argsShape,
|
|
244
|
-
...(verb !==
|
|
251
|
+
...(verb !== TemplateVerbs.Delete && keyBy(getShapeDependencies(projectSchema, shape, propSchema => {
|
|
245
252
|
if (!propSchema['@resolver']) {
|
|
246
253
|
return false;
|
|
247
254
|
}
|
|
@@ -249,17 +256,21 @@ export function getMutationArgs(templateName, verb) {
|
|
|
249
256
|
const shapeName = getRefShapeName(projectSchema, propSchema);
|
|
250
257
|
|
|
251
258
|
if (shapeName) {
|
|
252
|
-
return shapeName !== 'TSRelationship' && !projectSchema.shapes[getInputShapeName(shapeName
|
|
259
|
+
return shapeName !== 'TSRelationship' && !projectSchema.shapes[getInputShapeName(shapeName, {
|
|
260
|
+
isPartial: isUpdate
|
|
261
|
+
})];
|
|
253
262
|
}
|
|
254
263
|
|
|
255
264
|
return true;
|
|
256
265
|
}).map(shapeName => {
|
|
257
266
|
const shape = projectSchema.shapes[shapeName];
|
|
258
|
-
const name = getInputShapeName(shapeName
|
|
267
|
+
const name = getInputShapeName(shapeName, {
|
|
268
|
+
isPartial: isUpdate
|
|
269
|
+
});
|
|
259
270
|
return { ...shape,
|
|
260
271
|
name,
|
|
261
272
|
id: name,
|
|
262
|
-
schema:
|
|
273
|
+
schema: rewrittenSchema
|
|
263
274
|
};
|
|
264
275
|
}), 'name')),
|
|
265
276
|
...(addStructure ? {
|
|
@@ -272,7 +283,7 @@ export function getMutationArgs(templateName, verb) {
|
|
|
272
283
|
export function getMutationResultType(verb) {
|
|
273
284
|
return (context, shape) => {
|
|
274
285
|
const shapeName = pascalCase([verb, shape.name, 'result']);
|
|
275
|
-
const result = verb ===
|
|
286
|
+
const result = verb === TemplateVerbs.Delete ? {
|
|
276
287
|
type: 'boolean'
|
|
277
288
|
} : {
|
|
278
289
|
'@ref': `local:${shape.name}`
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let TemplateVerbs;
|
|
2
|
+
|
|
3
|
+
(function (TemplateVerbs) {
|
|
4
|
+
TemplateVerbs["Create"] = "create";
|
|
5
|
+
TemplateVerbs["Update"] = "update";
|
|
6
|
+
TemplateVerbs["Duplicate"] = "duplicate";
|
|
7
|
+
TemplateVerbs["Delete"] = "delete";
|
|
8
|
+
})(TemplateVerbs || (TemplateVerbs = {}));
|
package/es/types/utils.js
CHANGED
|
@@ -75,6 +75,7 @@ export const isProjectSchemaV3_12_1 = createVersionPredicate('3.12.1');
|
|
|
75
75
|
export const isProjectSchemaV3_12_2 = createVersionPredicate('3.12.2');
|
|
76
76
|
export const isProjectSchemaV3_12_3 = createVersionPredicate('3.12.3');
|
|
77
77
|
export const isProjectSchemaV3_13_0 = createVersionPredicate('3.13.0');
|
|
78
|
+
export const isProjectSchemaV3_14_0 = createVersionPredicate('3.14.0');
|
|
78
79
|
export const isLatestProjectSchema = createVersionPredicate(CURRENT_SCHEMA_VERSION);
|
|
79
80
|
export function isV1XSchema(maybeSchema) {
|
|
80
81
|
return isObject(maybeSchema) && isString(maybeSchema.projectId) && isObject(maybeSchema.contentTypes) && (isUndefined(maybeSchema.schemaVersion) || maybeSchema.schemaVersion === '1' || maybeSchema.schemaVersion === '1.0.0');
|
|
@@ -45168,6 +45168,6 @@
|
|
|
45168
45168
|
}
|
|
45169
45169
|
}
|
|
45170
45170
|
},
|
|
45171
|
-
"schemaVersion": "3.
|
|
45171
|
+
"schemaVersion": "3.14.0",
|
|
45172
45172
|
"services": {}
|
|
45173
45173
|
}
|
|
@@ -10516,5 +10516,5 @@
|
|
|
10516
10516
|
}
|
|
10517
10517
|
}
|
|
10518
10518
|
},
|
|
10519
|
-
"schemaVersion": "3.
|
|
10519
|
+
"schemaVersion": "3.14.0"
|
|
10520
10520
|
}
|
|
@@ -20505,6 +20505,6 @@
|
|
|
20505
20505
|
}
|
|
20506
20506
|
}
|
|
20507
20507
|
},
|
|
20508
|
-
"schemaVersion": "3.
|
|
20508
|
+
"schemaVersion": "3.14.0",
|
|
20509
20509
|
"services": {}
|
|
20510
20510
|
}
|
|
@@ -12534,5 +12534,5 @@
|
|
|
12534
12534
|
}
|
|
12535
12535
|
}
|
|
12536
12536
|
},
|
|
12537
|
-
"schemaVersion": "3.
|
|
12537
|
+
"schemaVersion": "3.14.0"
|
|
12538
12538
|
}
|
|
@@ -29315,5 +29315,5 @@
|
|
|
29315
29315
|
}
|
|
29316
29316
|
}
|
|
29317
29317
|
},
|
|
29318
|
-
"schemaVersion": "3.
|
|
29318
|
+
"schemaVersion": "3.14.0"
|
|
29319
29319
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,mBAAmB,EAAE,6BAA6B,EAAC,MAAM,mBAAmB,CAAC;AAE1F,Y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AC;AAC5B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,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,WAAW,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -361,4 +361,18 @@ Object.keys(_relationships).forEach(function (key) {
|
|
|
361
361
|
return _relationships[key];
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
var _rewrite = require("./rewrite");
|
|
367
|
+
|
|
368
|
+
Object.keys(_rewrite).forEach(function (key) {
|
|
369
|
+
if (key === "default" || key === "__esModule") return;
|
|
370
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
371
|
+
if (key in exports && exports[key] === _rewrite[key]) return;
|
|
372
|
+
Object.defineProperty(exports, key, {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
get: function () {
|
|
375
|
+
return _rewrite[key];
|
|
376
|
+
}
|
|
377
|
+
});
|
|
364
378
|
});
|
|
@@ -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;
|
|
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;AA2C3D,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAG9C,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,gBAAgB,GAC9B,OAAO,CAAC,aAAa,CAAC,CAkFxB;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,6BAA6B,EACtC,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAMpC"}
|
package/lib/migration/index.js
CHANGED
|
@@ -50,6 +50,8 @@ var _v17 = _interopRequireDefault(require("./to/v3.12.3"));
|
|
|
50
50
|
|
|
51
51
|
var _v18 = _interopRequireDefault(require("./to/v3.13.0"));
|
|
52
52
|
|
|
53
|
+
var _v19 = _interopRequireDefault(require("./to/v3.14.0"));
|
|
54
|
+
|
|
53
55
|
var _utils2 = require("./utils");
|
|
54
56
|
|
|
55
57
|
Object.keys(_utils2).forEach(function (key) {
|
|
@@ -66,7 +68,8 @@ Object.keys(_utils2).forEach(function (key) {
|
|
|
66
68
|
|
|
67
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
68
70
|
|
|
69
|
-
const listTypePrefix = 'PaginatedList';
|
|
71
|
+
const listTypePrefix = 'PaginatedList'; // eslint-disable-next-line complexity
|
|
72
|
+
|
|
70
73
|
exports.listTypePrefix = listTypePrefix;
|
|
71
74
|
|
|
72
75
|
async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
@@ -146,6 +149,10 @@ async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
|
146
149
|
projectSchema = (0, _v18.default)(projectSchema);
|
|
147
150
|
}
|
|
148
151
|
|
|
152
|
+
if ((0, _utils.isProjectSchemaV3_13_0)(projectSchema)) {
|
|
153
|
+
projectSchema = (0, _v19.default)(projectSchema);
|
|
154
|
+
}
|
|
155
|
+
|
|
149
156
|
return projectSchema;
|
|
150
157
|
}
|
|
151
158
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3.14.0.d.ts","sourceRoot":"","sources":["../../../../src/migration/to/v3.14.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_14_0(projectSchema) {
|
|
9
|
+
/**
|
|
10
|
+
* No migration needed all changes are backwards compatible.
|
|
11
|
+
*/
|
|
12
|
+
return { ...projectSchema,
|
|
13
|
+
schemaVersion: '3.14.0'
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var _default = migrateToV3_14_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.14.0';
|
|
3
4
|
export * from './v3.13.0';
|
|
4
5
|
export * from './v3.12.3';
|
|
5
6
|
export * from './v3.12.2';
|
|
@@ -20,6 +21,7 @@ export * from './v3.1.0';
|
|
|
20
21
|
export * from './v3.0.0';
|
|
21
22
|
export * from './v1.0.0';
|
|
22
23
|
import { ProjectSchemaV4_0_0 } from './v4.0.0';
|
|
24
|
+
import { ProjectSchemaV3_14_0 } from './v3.14.0';
|
|
23
25
|
import { ProjectSchemaV3_13_0 } from './v3.13.0';
|
|
24
26
|
import { ProjectSchemaV3_12_3 } from './v3.12.3';
|
|
25
27
|
import { ProjectSchemaV3_12_2 } from './v3.12.2';
|
|
@@ -40,5 +42,5 @@ import { ProjectSchemaV3_1_0 } from './v3.1.0';
|
|
|
40
42
|
import { ProjectSchemaV3_0_0 } from './v3.0.0';
|
|
41
43
|
import { ProjectSchemaV1_0_0 } from './v1.0.0';
|
|
42
44
|
import { ProjectSchema } from './latest';
|
|
43
|
-
export declare type AnyProjectSchema = ProjectSchemaV4_0_0 | ProjectSchemaV3_13_0 | ProjectSchemaV3_12_3 | ProjectSchemaV3_12_2 | ProjectSchemaV3_12_1 | 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;
|
|
45
|
+
export declare type AnyProjectSchema = ProjectSchemaV4_0_0 | ProjectSchemaV3_14_0 | ProjectSchemaV3_13_0 | ProjectSchemaV3_12_3 | ProjectSchemaV3_12_2 | ProjectSchemaV3_12_1 | 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;
|
|
44
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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