@contrail/cli 3.3.5 → 3.3.6-alpha.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 +4 -2
- package/dist/__mocks__/@contrail/sdk.d.ts +123 -0
- package/dist/__mocks__/@contrail/sdk.js +716 -0
- package/dist/commands/types/uploadTypes.d.ts +2 -1
- package/dist/commands/types/uploadTypes.js +9 -3
- package/dist/commands/types/uploadUsageInfo.js +2 -0
- package/dist/helpers/types/type-uploader.d.ts +3 -1
- package/dist/helpers/types/type-uploader.js +50 -39
- package/dist/helpers/types/type-uploader.spec.js +506 -0
- package/oclif.manifest.json +9 -1
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const type_uploader_1 = require("./type-uploader");
|
|
4
|
+
const login_1 = require("../../auth/login");
|
|
5
|
+
const sdk_1 = require("../../__mocks__/@contrail/sdk");
|
|
6
|
+
jest.mock('../../auth/login');
|
|
4
7
|
describe('extractValueDifferences', () => {
|
|
5
8
|
it('should return the correct value differences', () => {
|
|
6
9
|
const object1 = {
|
|
@@ -117,3 +120,506 @@ describe('extractValueDifferences', () => {
|
|
|
117
120
|
expect(valueDiff).toEqual(expectedValueDiff);
|
|
118
121
|
});
|
|
119
122
|
});
|
|
123
|
+
describe('uploadTypes', () => {
|
|
124
|
+
let updateSpy;
|
|
125
|
+
let createSpy;
|
|
126
|
+
let requestSpy;
|
|
127
|
+
let fsSpy;
|
|
128
|
+
let authUserMock;
|
|
129
|
+
beforeEach(() => {
|
|
130
|
+
// Mock authUser
|
|
131
|
+
authUserMock = login_1.authUser;
|
|
132
|
+
authUserMock.mockResolvedValue({ orgSlug: 'test-org' });
|
|
133
|
+
const sdk = require('@contrail/sdk');
|
|
134
|
+
updateSpy = jest.spyOn(sdk.Entities.prototype, 'update');
|
|
135
|
+
createSpy = jest.spyOn(sdk.Entities.prototype, 'create');
|
|
136
|
+
// Mock Request.request as a function
|
|
137
|
+
sdk.Request = { request: jest.fn() };
|
|
138
|
+
requestSpy = sdk.Request.request;
|
|
139
|
+
// Mock filesystem operations
|
|
140
|
+
jest.spyOn(require('fs'), 'readdirSync').mockReturnValue(['color.yml']);
|
|
141
|
+
fsSpy = jest.spyOn(require('fs'), 'readFileSync');
|
|
142
|
+
fsSpy.mockReturnValue(FULL_TYPE_YML);
|
|
143
|
+
});
|
|
144
|
+
afterEach(() => {
|
|
145
|
+
jest.restoreAllMocks();
|
|
146
|
+
});
|
|
147
|
+
it('should fully re-populate type and its properties when not merging', async () => {
|
|
148
|
+
fsSpy.mockReturnValue(FULL_TYPE_YML);
|
|
149
|
+
await (0, type_uploader_1.uploadTypes)('mock-dir', { isMerge: false });
|
|
150
|
+
const nonCoreTypePropertiesCount = sdk_1.BASE_TYPE_WITH_PROPERTIES.typeProperties.filter((prop) => !prop.core).length;
|
|
151
|
+
expect(updateSpy).toHaveBeenCalledTimes(nonCoreTypePropertiesCount + 1); // +1 for the type update
|
|
152
|
+
expect(requestSpy).toHaveBeenCalledTimes(0);
|
|
153
|
+
expect(createSpy).toHaveBeenCalledTimes(0);
|
|
154
|
+
});
|
|
155
|
+
it('should modify property "label" on type only', async () => {
|
|
156
|
+
fsSpy.mockReturnValue(TYPE_WITH_UPDATED_LABEL_YML);
|
|
157
|
+
await (0, type_uploader_1.uploadTypes)('mock-dir', { isMerge: true });
|
|
158
|
+
expect(requestSpy).toHaveBeenCalledTimes(0);
|
|
159
|
+
expect(createSpy).toHaveBeenCalledTimes(0);
|
|
160
|
+
expect(updateSpy).toHaveBeenCalledTimes(1);
|
|
161
|
+
expect(updateSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
162
|
+
entityName: 'type',
|
|
163
|
+
object: {
|
|
164
|
+
typePath: 'color',
|
|
165
|
+
label: 'Color 2',
|
|
166
|
+
},
|
|
167
|
+
}));
|
|
168
|
+
});
|
|
169
|
+
it('should update type-property on existing type only', async () => {
|
|
170
|
+
fsSpy.mockReturnValue(TYPE_WITH_UPDATED_PROPERTY_YML);
|
|
171
|
+
await (0, type_uploader_1.uploadTypes)('mock-dir', { isMerge: true });
|
|
172
|
+
expect(requestSpy).toHaveBeenCalledTimes(0);
|
|
173
|
+
expect(createSpy).toHaveBeenCalledTimes(0);
|
|
174
|
+
expect(updateSpy).toHaveBeenCalledTimes(1);
|
|
175
|
+
expect(updateSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
176
|
+
entityName: 'type-property',
|
|
177
|
+
object: {
|
|
178
|
+
slug: 'rgb',
|
|
179
|
+
isArchived: true,
|
|
180
|
+
typePropertyUserListId: null,
|
|
181
|
+
},
|
|
182
|
+
}));
|
|
183
|
+
});
|
|
184
|
+
it('should add new type-property to existing type', async () => {
|
|
185
|
+
fsSpy.mockReturnValue(TYPE_WITH_NEW_PROPERTY_YML);
|
|
186
|
+
await (0, type_uploader_1.uploadTypes)('mock-dir', { isMerge: true });
|
|
187
|
+
expect(createSpy).toHaveBeenCalledTimes(0);
|
|
188
|
+
expect(updateSpy).toHaveBeenCalledTimes(0);
|
|
189
|
+
expect(requestSpy).toHaveBeenCalledTimes(1);
|
|
190
|
+
expect(requestSpy).toHaveBeenCalledWith(expect.stringMatching(/^\/types\/[^/]+\/type-properties$/), expect.objectContaining({
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body: JSON.stringify({
|
|
193
|
+
isArchived: false,
|
|
194
|
+
propertyType: 'number',
|
|
195
|
+
slug: 'code',
|
|
196
|
+
label: 'Code',
|
|
197
|
+
editable: true,
|
|
198
|
+
searchable: false,
|
|
199
|
+
core: false,
|
|
200
|
+
formula: null,
|
|
201
|
+
referencedTypePath: null,
|
|
202
|
+
carryOverBehavior: null,
|
|
203
|
+
carryOverDefault: null,
|
|
204
|
+
referencedTypeRootSlug: null,
|
|
205
|
+
defaultValue: null,
|
|
206
|
+
typePropertyUserListId: null,
|
|
207
|
+
referencedTypeRole: null,
|
|
208
|
+
isUniqueProperty: false,
|
|
209
|
+
isUniquePropertyInFamily: false,
|
|
210
|
+
propertyLevel: null,
|
|
211
|
+
formulaFunction: null,
|
|
212
|
+
validationFunction: null,
|
|
213
|
+
numberFormat: null,
|
|
214
|
+
sequenceSeedValue: null,
|
|
215
|
+
}),
|
|
216
|
+
}));
|
|
217
|
+
});
|
|
218
|
+
it('should create new subtype with property', async () => {
|
|
219
|
+
fsSpy.mockReturnValue(SUBTYPE_WITH_PROPERTY_YML);
|
|
220
|
+
await (0, type_uploader_1.uploadTypes)('mock-dir', { isMerge: true });
|
|
221
|
+
expect(updateSpy).toHaveBeenCalledTimes(0);
|
|
222
|
+
expect(createSpy).toHaveBeenCalledTimes(1);
|
|
223
|
+
expect(createSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
224
|
+
entityName: 'type',
|
|
225
|
+
object: {
|
|
226
|
+
slug: 'test-subtype',
|
|
227
|
+
label: 'Color Test Subtype',
|
|
228
|
+
typePath: 'color:test-subtype',
|
|
229
|
+
isArchived: false,
|
|
230
|
+
},
|
|
231
|
+
}));
|
|
232
|
+
expect(requestSpy).toHaveBeenCalledTimes(1);
|
|
233
|
+
expect(requestSpy).toHaveBeenCalledWith(expect.stringMatching(/^\/types\/[^/]+\/type-properties$/), expect.objectContaining({
|
|
234
|
+
method: 'POST',
|
|
235
|
+
body: JSON.stringify({
|
|
236
|
+
isArchived: false,
|
|
237
|
+
propertyType: 'number',
|
|
238
|
+
slug: 'subtypeProperty',
|
|
239
|
+
label: 'Subtype Property',
|
|
240
|
+
editable: true,
|
|
241
|
+
searchable: false,
|
|
242
|
+
core: false,
|
|
243
|
+
formula: null,
|
|
244
|
+
referencedTypePath: null,
|
|
245
|
+
carryOverBehavior: null,
|
|
246
|
+
carryOverDefault: null,
|
|
247
|
+
referencedTypeRootSlug: null,
|
|
248
|
+
defaultValue: null,
|
|
249
|
+
typePropertyUserListId: null,
|
|
250
|
+
referencedTypeRole: null,
|
|
251
|
+
isUniqueProperty: false,
|
|
252
|
+
isUniquePropertyInFamily: false,
|
|
253
|
+
propertyLevel: null,
|
|
254
|
+
formulaFunction: null,
|
|
255
|
+
validationFunction: null,
|
|
256
|
+
numberFormat: null,
|
|
257
|
+
sequenceSeedValue: null,
|
|
258
|
+
}),
|
|
259
|
+
}));
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
const FULL_TYPE_YML = `
|
|
263
|
+
- typePath: color
|
|
264
|
+
slug: color
|
|
265
|
+
label: Color
|
|
266
|
+
isArchived: false
|
|
267
|
+
typeProperties:
|
|
268
|
+
- slug: blue
|
|
269
|
+
isArchived: false
|
|
270
|
+
propertyType: number
|
|
271
|
+
label: Blue
|
|
272
|
+
editable: true
|
|
273
|
+
searchable: false
|
|
274
|
+
core: false
|
|
275
|
+
formula: null
|
|
276
|
+
referencedTypePath: null
|
|
277
|
+
referencedTypeRootSlug: null
|
|
278
|
+
typePropertyUserListId: null
|
|
279
|
+
typePropertyUserListName: ''
|
|
280
|
+
referencedTypeRole: null
|
|
281
|
+
defaultValue: null
|
|
282
|
+
propertyLevel: null
|
|
283
|
+
carryOverBehavior: null
|
|
284
|
+
carryOverDefault: null
|
|
285
|
+
isUniqueProperty: false
|
|
286
|
+
isUniquePropertyInFamily: false
|
|
287
|
+
inherited: false
|
|
288
|
+
formulaFunction: null
|
|
289
|
+
validationFunction: null
|
|
290
|
+
numberFormat: null
|
|
291
|
+
sequenceSeedValue: null
|
|
292
|
+
- slug: createdOn
|
|
293
|
+
isArchived: false
|
|
294
|
+
propertyType: date
|
|
295
|
+
label: Created On
|
|
296
|
+
editable: false
|
|
297
|
+
searchable: false
|
|
298
|
+
core: true
|
|
299
|
+
formula: null
|
|
300
|
+
referencedTypePath: null
|
|
301
|
+
referencedTypeRootSlug: null
|
|
302
|
+
typePropertyUserListId: null
|
|
303
|
+
typePropertyUserListName: ''
|
|
304
|
+
referencedTypeRole: null
|
|
305
|
+
defaultValue: null
|
|
306
|
+
propertyLevel: null
|
|
307
|
+
carryOverBehavior: null
|
|
308
|
+
carryOverDefault: null
|
|
309
|
+
isUniqueProperty: false
|
|
310
|
+
isUniquePropertyInFamily: false
|
|
311
|
+
inherited: false
|
|
312
|
+
formulaFunction: null
|
|
313
|
+
validationFunction: null
|
|
314
|
+
numberFormat: null
|
|
315
|
+
sequenceSeedValue: null
|
|
316
|
+
- slug: federatedId
|
|
317
|
+
isArchived: false
|
|
318
|
+
propertyType: sequence
|
|
319
|
+
label: Federated Id
|
|
320
|
+
editable: true
|
|
321
|
+
searchable: false
|
|
322
|
+
core: false
|
|
323
|
+
formula: null
|
|
324
|
+
referencedTypePath: null
|
|
325
|
+
referencedTypeRootSlug: null
|
|
326
|
+
typePropertyUserListId: null
|
|
327
|
+
typePropertyUserListName: ''
|
|
328
|
+
referencedTypeRole: null
|
|
329
|
+
defaultValue: null
|
|
330
|
+
propertyLevel: null
|
|
331
|
+
carryOverBehavior: null
|
|
332
|
+
carryOverDefault: null
|
|
333
|
+
isUniqueProperty: false
|
|
334
|
+
isUniquePropertyInFamily: false
|
|
335
|
+
inherited: false
|
|
336
|
+
formulaFunction: null
|
|
337
|
+
validationFunction: null
|
|
338
|
+
numberFormat: null
|
|
339
|
+
sequenceSeedValue: 1
|
|
340
|
+
- slug: green
|
|
341
|
+
isArchived: false
|
|
342
|
+
propertyType: number
|
|
343
|
+
label: Green
|
|
344
|
+
editable: true
|
|
345
|
+
searchable: false
|
|
346
|
+
core: false
|
|
347
|
+
formula: null
|
|
348
|
+
referencedTypePath: null
|
|
349
|
+
referencedTypeRootSlug: null
|
|
350
|
+
typePropertyUserListId: null
|
|
351
|
+
typePropertyUserListName: ''
|
|
352
|
+
referencedTypeRole: null
|
|
353
|
+
defaultValue: null
|
|
354
|
+
propertyLevel: null
|
|
355
|
+
carryOverBehavior: null
|
|
356
|
+
carryOverDefault: null
|
|
357
|
+
isUniqueProperty: false
|
|
358
|
+
isUniquePropertyInFamily: false
|
|
359
|
+
inherited: false
|
|
360
|
+
formulaFunction: null
|
|
361
|
+
validationFunction: null
|
|
362
|
+
numberFormat: null
|
|
363
|
+
sequenceSeedValue: null
|
|
364
|
+
- slug: hex
|
|
365
|
+
isArchived: false
|
|
366
|
+
propertyType: string
|
|
367
|
+
label: Hex
|
|
368
|
+
editable: true
|
|
369
|
+
searchable: false
|
|
370
|
+
core: false
|
|
371
|
+
formula: null
|
|
372
|
+
referencedTypePath: null
|
|
373
|
+
referencedTypeRootSlug: null
|
|
374
|
+
typePropertyUserListId: null
|
|
375
|
+
typePropertyUserListName: ''
|
|
376
|
+
referencedTypeRole: null
|
|
377
|
+
defaultValue: null
|
|
378
|
+
propertyLevel: null
|
|
379
|
+
carryOverBehavior: null
|
|
380
|
+
carryOverDefault: null
|
|
381
|
+
isUniqueProperty: false
|
|
382
|
+
isUniquePropertyInFamily: false
|
|
383
|
+
inherited: false
|
|
384
|
+
formulaFunction: null
|
|
385
|
+
validationFunction: null
|
|
386
|
+
numberFormat: null
|
|
387
|
+
sequenceSeedValue: null
|
|
388
|
+
- slug: hexCode
|
|
389
|
+
isArchived: false
|
|
390
|
+
propertyType: string
|
|
391
|
+
label: Hex Code
|
|
392
|
+
editable: true
|
|
393
|
+
searchable: false
|
|
394
|
+
core: false
|
|
395
|
+
formula: null
|
|
396
|
+
referencedTypePath: null
|
|
397
|
+
referencedTypeRootSlug: null
|
|
398
|
+
typePropertyUserListId: null
|
|
399
|
+
typePropertyUserListName: ''
|
|
400
|
+
referencedTypeRole: null
|
|
401
|
+
defaultValue: null
|
|
402
|
+
propertyLevel: null
|
|
403
|
+
carryOverBehavior: null
|
|
404
|
+
carryOverDefault: null
|
|
405
|
+
isUniqueProperty: false
|
|
406
|
+
isUniquePropertyInFamily: false
|
|
407
|
+
inherited: false
|
|
408
|
+
formulaFunction: null
|
|
409
|
+
validationFunction: null
|
|
410
|
+
numberFormat: null
|
|
411
|
+
sequenceSeedValue: null
|
|
412
|
+
- slug: isArchived
|
|
413
|
+
isArchived: false
|
|
414
|
+
propertyType: boolean
|
|
415
|
+
label: Archived
|
|
416
|
+
editable: true
|
|
417
|
+
searchable: false
|
|
418
|
+
core: false
|
|
419
|
+
formula: null
|
|
420
|
+
referencedTypePath: null
|
|
421
|
+
referencedTypeRootSlug: null
|
|
422
|
+
typePropertyUserListId: null
|
|
423
|
+
typePropertyUserListName: ''
|
|
424
|
+
referencedTypeRole: null
|
|
425
|
+
defaultValue: null
|
|
426
|
+
propertyLevel: null
|
|
427
|
+
carryOverBehavior: null
|
|
428
|
+
carryOverDefault: null
|
|
429
|
+
isUniqueProperty: false
|
|
430
|
+
isUniquePropertyInFamily: false
|
|
431
|
+
inherited: false
|
|
432
|
+
formulaFunction: null
|
|
433
|
+
validationFunction: null
|
|
434
|
+
numberFormat: null
|
|
435
|
+
sequenceSeedValue: null
|
|
436
|
+
- slug: name
|
|
437
|
+
isArchived: false
|
|
438
|
+
propertyType: string
|
|
439
|
+
label: Name
|
|
440
|
+
editable: true
|
|
441
|
+
searchable: false
|
|
442
|
+
core: false
|
|
443
|
+
formula: null
|
|
444
|
+
referencedTypePath: null
|
|
445
|
+
referencedTypeRootSlug: null
|
|
446
|
+
typePropertyUserListId: null
|
|
447
|
+
typePropertyUserListName: ''
|
|
448
|
+
referencedTypeRole: null
|
|
449
|
+
defaultValue: null
|
|
450
|
+
propertyLevel: null
|
|
451
|
+
carryOverBehavior: null
|
|
452
|
+
carryOverDefault: null
|
|
453
|
+
isUniqueProperty: false
|
|
454
|
+
isUniquePropertyInFamily: false
|
|
455
|
+
inherited: false
|
|
456
|
+
formulaFunction: null
|
|
457
|
+
validationFunction: null
|
|
458
|
+
numberFormat: null
|
|
459
|
+
sequenceSeedValue: null
|
|
460
|
+
- slug: red
|
|
461
|
+
isArchived: false
|
|
462
|
+
propertyType: number
|
|
463
|
+
label: Red
|
|
464
|
+
editable: true
|
|
465
|
+
searchable: false
|
|
466
|
+
core: false
|
|
467
|
+
formula: null
|
|
468
|
+
referencedTypePath: null
|
|
469
|
+
referencedTypeRootSlug: null
|
|
470
|
+
typePropertyUserListId: null
|
|
471
|
+
typePropertyUserListName: ''
|
|
472
|
+
referencedTypeRole: null
|
|
473
|
+
defaultValue: null
|
|
474
|
+
propertyLevel: null
|
|
475
|
+
carryOverBehavior: null
|
|
476
|
+
carryOverDefault: null
|
|
477
|
+
isUniqueProperty: false
|
|
478
|
+
isUniquePropertyInFamily: false
|
|
479
|
+
inherited: false
|
|
480
|
+
formulaFunction: null
|
|
481
|
+
validationFunction: null
|
|
482
|
+
numberFormat: null
|
|
483
|
+
sequenceSeedValue: null
|
|
484
|
+
- slug: rgb
|
|
485
|
+
isArchived: false
|
|
486
|
+
propertyType: string
|
|
487
|
+
label: RGB
|
|
488
|
+
editable: true
|
|
489
|
+
searchable: false
|
|
490
|
+
core: false
|
|
491
|
+
formula: null
|
|
492
|
+
referencedTypePath: null
|
|
493
|
+
referencedTypeRootSlug: null
|
|
494
|
+
typePropertyUserListId: null
|
|
495
|
+
typePropertyUserListName: ''
|
|
496
|
+
referencedTypeRole: null
|
|
497
|
+
defaultValue: null
|
|
498
|
+
propertyLevel: null
|
|
499
|
+
carryOverBehavior: null
|
|
500
|
+
carryOverDefault: null
|
|
501
|
+
isUniqueProperty: false
|
|
502
|
+
isUniquePropertyInFamily: false
|
|
503
|
+
inherited: false
|
|
504
|
+
formulaFunction: null
|
|
505
|
+
validationFunction: null
|
|
506
|
+
numberFormat: null
|
|
507
|
+
sequenceSeedValue: null
|
|
508
|
+
- slug: rgba
|
|
509
|
+
isArchived: false
|
|
510
|
+
propertyType: string
|
|
511
|
+
label: RGBA
|
|
512
|
+
editable: true
|
|
513
|
+
searchable: false
|
|
514
|
+
core: false
|
|
515
|
+
formula: null
|
|
516
|
+
referencedTypePath: null
|
|
517
|
+
referencedTypeRootSlug: null
|
|
518
|
+
typePropertyUserListId: null
|
|
519
|
+
typePropertyUserListName: ''
|
|
520
|
+
referencedTypeRole: null
|
|
521
|
+
defaultValue: null
|
|
522
|
+
propertyLevel: null
|
|
523
|
+
carryOverBehavior: null
|
|
524
|
+
carryOverDefault: null
|
|
525
|
+
isUniqueProperty: false
|
|
526
|
+
isUniquePropertyInFamily: false
|
|
527
|
+
inherited: false
|
|
528
|
+
formulaFunction: null
|
|
529
|
+
validationFunction: null
|
|
530
|
+
numberFormat: null
|
|
531
|
+
sequenceSeedValue: null
|
|
532
|
+
- slug: updatedOn
|
|
533
|
+
isArchived: false
|
|
534
|
+
propertyType: date
|
|
535
|
+
label: Updated On
|
|
536
|
+
editable: false
|
|
537
|
+
searchable: false
|
|
538
|
+
core: true
|
|
539
|
+
formula: null
|
|
540
|
+
referencedTypePath: null
|
|
541
|
+
referencedTypeRootSlug: null
|
|
542
|
+
typePropertyUserListId: null
|
|
543
|
+
typePropertyUserListName: ''
|
|
544
|
+
referencedTypeRole: null
|
|
545
|
+
defaultValue: null
|
|
546
|
+
propertyLevel: null
|
|
547
|
+
carryOverBehavior: null
|
|
548
|
+
carryOverDefault: null
|
|
549
|
+
isUniqueProperty: false
|
|
550
|
+
isUniquePropertyInFamily: false
|
|
551
|
+
inherited: false
|
|
552
|
+
formulaFunction: null
|
|
553
|
+
validationFunction: null
|
|
554
|
+
numberFormat: null
|
|
555
|
+
sequenceSeedValue: null
|
|
556
|
+
`;
|
|
557
|
+
const SUBTYPE_WITH_PROPERTY_YML = `
|
|
558
|
+
- typePath: color:test-subtype
|
|
559
|
+
slug: test-subtype
|
|
560
|
+
label: Color Test Subtype
|
|
561
|
+
isArchived: false
|
|
562
|
+
typeProperties:
|
|
563
|
+
- slug: subtypeProperty
|
|
564
|
+
isArchived: false
|
|
565
|
+
propertyType: number
|
|
566
|
+
label: Subtype Property
|
|
567
|
+
editable: true
|
|
568
|
+
searchable: false
|
|
569
|
+
core: false
|
|
570
|
+
formula: null
|
|
571
|
+
referencedTypePath: null
|
|
572
|
+
referencedTypeRootSlug: null
|
|
573
|
+
typePropertyUserListId: null
|
|
574
|
+
typePropertyUserListName: ''
|
|
575
|
+
referencedTypeRole: null
|
|
576
|
+
defaultValue: null
|
|
577
|
+
propertyLevel: null
|
|
578
|
+
carryOverBehavior: null
|
|
579
|
+
carryOverDefault: null
|
|
580
|
+
isUniqueProperty: false
|
|
581
|
+
isUniquePropertyInFamily: false
|
|
582
|
+
inherited: false
|
|
583
|
+
formulaFunction: null
|
|
584
|
+
validationFunction: null
|
|
585
|
+
numberFormat: null
|
|
586
|
+
sequenceSeedValue: null
|
|
587
|
+
`;
|
|
588
|
+
const TYPE_WITH_UPDATED_LABEL_YML = `
|
|
589
|
+
- typePath: color
|
|
590
|
+
label: Color 2
|
|
591
|
+
`;
|
|
592
|
+
const TYPE_WITH_NEW_PROPERTY_YML = `
|
|
593
|
+
- typePath: color
|
|
594
|
+
typeProperties:
|
|
595
|
+
- slug: code
|
|
596
|
+
isArchived: false
|
|
597
|
+
propertyType: number
|
|
598
|
+
label: Code
|
|
599
|
+
editable: true
|
|
600
|
+
searchable: false
|
|
601
|
+
core: false
|
|
602
|
+
formula: null
|
|
603
|
+
referencedTypePath: null
|
|
604
|
+
referencedTypeRootSlug: null
|
|
605
|
+
typePropertyUserListId: null
|
|
606
|
+
typePropertyUserListName: ''
|
|
607
|
+
referencedTypeRole: null
|
|
608
|
+
defaultValue: null
|
|
609
|
+
propertyLevel: null
|
|
610
|
+
carryOverBehavior: null
|
|
611
|
+
carryOverDefault: null
|
|
612
|
+
isUniqueProperty: false
|
|
613
|
+
isUniquePropertyInFamily: false
|
|
614
|
+
inherited: false
|
|
615
|
+
formulaFunction: null
|
|
616
|
+
validationFunction: null
|
|
617
|
+
numberFormat: null
|
|
618
|
+
sequenceSeedValue: null
|
|
619
|
+
`;
|
|
620
|
+
const TYPE_WITH_UPDATED_PROPERTY_YML = `
|
|
621
|
+
- typePath: color
|
|
622
|
+
typeProperties:
|
|
623
|
+
- slug: rgb
|
|
624
|
+
isArchived: true
|
|
625
|
+
`;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.3.
|
|
2
|
+
"version": "3.3.6-alpha.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"app:create": {
|
|
5
5
|
"id": "app:create",
|
|
@@ -2373,6 +2373,14 @@
|
|
|
2373
2373
|
"required": false,
|
|
2374
2374
|
"multiple": false,
|
|
2375
2375
|
"default": "."
|
|
2376
|
+
},
|
|
2377
|
+
"merge": {
|
|
2378
|
+
"name": "merge",
|
|
2379
|
+
"type": "boolean",
|
|
2380
|
+
"char": "m",
|
|
2381
|
+
"description": "Merge types and type properties without deleting missing ones. Only adds/updates those present in the source files.",
|
|
2382
|
+
"required": false,
|
|
2383
|
+
"allowNo": false
|
|
2376
2384
|
}
|
|
2377
2385
|
},
|
|
2378
2386
|
"args": {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6-alpha.0",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@contrail/entity-types": "^1.3.0",
|
|
26
|
-
"@contrail/org-config-migration": "^1.1.
|
|
26
|
+
"@contrail/org-config-migration": "^1.1.7",
|
|
27
27
|
"@contrail/sdk": "^1.4.6",
|
|
28
28
|
"@contrail/types": "^3.0.48",
|
|
29
29
|
"@contrail/util": "^1.1.10",
|