@contrail/cli 3.4.0-alpha → 3.4.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 -151
- package/dist/__mocks__/@contrail/sdk.d.ts +123 -0
- package/dist/__mocks__/@contrail/sdk.js +716 -0
- package/dist/api/types.d.ts +0 -35
- package/dist/api/types.js +1 -47
- package/dist/auth/login.js +8 -0
- package/dist/basecommand.d.ts +1 -3
- package/dist/basecommand.js +1 -1
- package/dist/commands/app/create.js +1 -14
- package/dist/commands/app/extension/deploy.js +4 -2
- package/dist/commands/app/init.js +0 -14
- package/dist/commands/types/uploadTypes.d.ts +2 -1
- package/dist/commands/types/uploadTypes.js +9 -3
- package/dist/commands/types/uploadUsageInfo.js +16 -2
- package/dist/common.d.ts +1 -1
- package/dist/helpers/app/app-deployer.js +8 -4
- package/dist/helpers/app/extension-package-deployer.js +1 -1
- package/dist/helpers/app/setup-template.d.ts +0 -2
- package/dist/helpers/app/setup-template.js +1 -2
- package/dist/helpers/config/config.js +3 -3
- package/dist/helpers/file-helpers.d.ts +0 -1
- package/dist/helpers/file-helpers.js +1 -19
- package/dist/helpers/types/type-uploader.d.ts +3 -1
- package/dist/helpers/types/type-uploader.js +55 -37
- package/dist/helpers/types/type-uploader.spec.js +506 -0
- package/dist/interfaces.d.ts +1 -0
- package/dist/templates/typescript/README.md +3 -1
- package/dist/templates/typescript/app.yml +1 -1
- package/dist/templates/typescript/assets/sample.json +1 -1
- package/dist/templates/typescript/eslintrc.json +1 -4
- package/dist/templates/typescript/tsconfig.json +5 -21
- package/oclif.manifest.json +9 -361
- package/package.json +5 -6
- package/dist/commands/entities/create.d.ts +0 -37
- package/dist/commands/entities/create.js +0 -555
- package/dist/commands/entities/create.spec.d.ts +0 -1
- package/dist/commands/entities/create.spec.js +0 -514
- package/dist/commands/entities/delete.d.ts +0 -16
- package/dist/commands/entities/delete.js +0 -118
- package/dist/commands/entities/get.d.ts +0 -20
- package/dist/commands/entities/get.js +0 -204
- package/dist/commands/entities/update.d.ts +0 -18
- package/dist/commands/entities/update.js +0 -116
- package/dist/helpers/entities/assortment-items.d.ts +0 -10
- package/dist/helpers/entities/assortment-items.js +0 -84
- package/dist/helpers/entities/batchFetch.d.ts +0 -8
- package/dist/helpers/entities/batchFetch.js +0 -41
- package/dist/helpers/entities/index.d.ts +0 -3
- package/dist/helpers/entities/index.js +0 -6
- package/dist/helpers/entities/items.d.ts +0 -10
- package/dist/helpers/entities/items.js +0 -102
- package/dist/helpers/entities/project-items.d.ts +0 -3
- package/dist/helpers/entities/project-items.js +0 -65
- package/dist/helpers/propertySpecifications/dateRanges.d.ts +0 -38
- package/dist/helpers/propertySpecifications/dateRanges.js +0 -89
- package/dist/helpers/propertySpecifications/dateRanges.spec.d.ts +0 -1
- package/dist/helpers/propertySpecifications/dateRanges.spec.js +0 -95
- package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -27
- package/dist/helpers/propertySpecifications/propertySpecifications.js +0 -70
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +0 -1
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +0 -266
|
@@ -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/dist/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
### Running your app
|
|
2
|
+
|
|
2
3
|
Run `npm run start` at the root directory of your app (where the `package.json` file is located).
|
|
3
4
|
|
|
4
5
|
### Publishing your app
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
Run `contrail app publish` to publish a new version of the app.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
appIdentifier: 'APP_IDENTIFIER_STUB' # Change to be your company root domain and the name of the app
|
|
2
2
|
appName: 'APP_NAME_STUB' # Give your app a name
|
|
3
3
|
appDescription: 'APP_DESCRIPTION_STUB' # Give your app a description
|
|
4
|
-
nodeRuntime: '
|
|
4
|
+
nodeRuntime: 'nodejs22.x' # The Node.js runtime version to use for your app
|
|
5
5
|
visibility: private # This should be private unless you want to develop an app for all VibeIQ customers to use
|
|
6
6
|
# Access Grants
|
|
7
7
|
# Use this section to share this app with other organizations.
|
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
|
26
26
|
"no-trailing-spaces": "error",
|
|
27
27
|
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
|
28
|
-
"@typescript-eslint/no-empty-function": [
|
|
29
|
-
"error",
|
|
30
|
-
{ "allow": ["arrowFunctions"] }
|
|
31
|
-
],
|
|
28
|
+
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
|
|
32
29
|
"@typescript-eslint/no-explicit-any": "off",
|
|
33
30
|
"@typescript-eslint/no-var-requires": "warn",
|
|
34
31
|
"no-unused-vars": "off",
|
|
@@ -4,15 +4,7 @@
|
|
|
4
4
|
"emitDecoratorMetadata": true,
|
|
5
5
|
"esModuleInterop": true,
|
|
6
6
|
"experimentalDecorators": true,
|
|
7
|
-
"lib": [
|
|
8
|
-
"es5",
|
|
9
|
-
"ES2015",
|
|
10
|
-
"ES2016",
|
|
11
|
-
"ES2017",
|
|
12
|
-
"ES2020",
|
|
13
|
-
"dom",
|
|
14
|
-
"esnext.asynciterable"
|
|
15
|
-
],
|
|
7
|
+
"lib": ["es5", "ES2015", "ES2016", "ES2017", "ES2020", "dom", "esnext.asynciterable"],
|
|
16
8
|
"module": "CommonJS",
|
|
17
9
|
// "moduleResolution": "node",
|
|
18
10
|
"noImplicitAny": false,
|
|
@@ -22,16 +14,8 @@
|
|
|
22
14
|
"strict": false,
|
|
23
15
|
"strictPropertyInitialization": false,
|
|
24
16
|
"target": "ES2020",
|
|
25
|
-
"types": [
|
|
26
|
-
"node", "jest"
|
|
27
|
-
]
|
|
17
|
+
"types": ["node", "jest"]
|
|
28
18
|
},
|
|
29
|
-
"exclude": [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
33
|
-
"include": [
|
|
34
|
-
"src",
|
|
35
|
-
"package.json"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
19
|
+
"exclude": ["node_modules", "**/__tests__/*"],
|
|
20
|
+
"include": ["src", "package.json"]
|
|
21
|
+
}
|