@contrail/cli 2.3.3 → 2.3.4

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 CHANGED
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
17
17
  $ contrail COMMAND
18
18
  running command...
19
19
  $ contrail (--version)
20
- @contrail/cli/2.3.3 darwin-arm64 node-v18.13.0
20
+ @contrail/cli/2.3.4 darwin-arm64 node-v20.12.1
21
21
  $ contrail --help [COMMAND]
22
22
  USAGE
23
23
  $ contrail COMMAND
@@ -312,6 +312,9 @@ function reduceTypes(dataHolder) {
312
312
  for (const type of dataHolder.types) {
313
313
  const reducedTypeProperties = [];
314
314
  for (const typeProperty of type.typeProperties) {
315
+ if (typeProperty.inherited) {
316
+ continue;
317
+ }
315
318
  const reducedTypeProperty = {
316
319
  slug: typeProperty.slug,
317
320
  id: typeProperty.id,
@@ -325,10 +328,14 @@ function reduceTypes(dataHolder) {
325
328
  formula: typeProperty.formula,
326
329
  referencedTypePath: typeProperty.referencedTypePath,
327
330
  referencedTypeRootSlug: typeProperty.referencedTypeRootSlug,
331
+ typePropertyUserListId: typeProperty.typePropertyUserListId,
332
+ referencedTypeRole: typeProperty.referencedTypeRole,
328
333
  defaultValue: typeProperty.defaultValue,
329
334
  propertyLevel: typeProperty.propertyLevel,
330
335
  carryOverBehavior: typeProperty.carryOverBehavior,
331
336
  carryOverDefault: typeProperty.carryOverDefault,
337
+ isUniqueProperty: typeProperty.isUniqueProperty,
338
+ isUniquePropertyInFamily: typeProperty.isUniquePropertyInFamily,
332
339
  inherited: typeProperty.inherited,
333
340
  formulaFunction: typeProperty.formulaFunction,
334
341
  validationFunction: typeProperty.validationFunction,
@@ -53,13 +53,13 @@ async function uploadReducedTypes(dir) {
53
53
  });
54
54
  currentTypes.push(typeWithProperties);
55
55
  }
56
- const currentTypesBySlug = {};
56
+ const currentTypesByTypePath = {};
57
57
  for (const currentType of currentTypes) {
58
- currentTypesBySlug[currentType.slug] = currentType;
58
+ currentTypesByTypePath[currentType.typePath] = currentType;
59
59
  }
60
- const newTypesBySlug = {};
60
+ const newTypesByTypePath = {};
61
61
  for (const type of types) {
62
- newTypesBySlug[type.slug] = type;
62
+ newTypesByTypePath[type.typePath] = type;
63
63
  }
64
64
  const optionSets = await new sdk_1.Entities().get({
65
65
  entityName: 'type-property-option-set',
@@ -70,13 +70,13 @@ async function uploadReducedTypes(dir) {
70
70
  }
71
71
  for (const type of types) {
72
72
  try {
73
- const found = currentTypesBySlug[type.slug];
73
+ const found = currentTypesByTypePath[type.typePath];
74
74
  if (!found) {
75
75
  if (!type.typePath.includes(':')) {
76
76
  logger_1.default.info(`Cannot create a base type. Skipping: ${type.slug}`);
77
77
  continue;
78
78
  }
79
- logger_1.default.info(`Creating Type: ${type.slug}`);
79
+ logger_1.default.info(`Creating Type: ${type.typePath}`);
80
80
  const createdType = await new sdk_1.Entities().create({
81
81
  entityName: 'type',
82
82
  object: {
@@ -126,7 +126,7 @@ async function uploadReducedTypes(dir) {
126
126
  });
127
127
  }
128
128
  else {
129
- logger_1.default.debug(`Skipping empty update of type ${type.slug}`);
129
+ logger_1.default.debug(`Skipping empty update of type ${type.typePath}`);
130
130
  }
131
131
  await uploadReducedTypeProperties(updatedType, found.typeProperties, type.typeProperties, optionSets);
132
132
  }
@@ -171,6 +171,10 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
171
171
  carryOverDefault: newPropertyType.carryOverDefault,
172
172
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug,
173
173
  defaultValue: newPropertyType.defaultValue,
174
+ typePropertyUserListId: newPropertyType.typePropertyUserListId,
175
+ referencedTypeRole: newPropertyType.referencedTypeRole,
176
+ isUniqueProperty: newPropertyType.isUniqueProperty,
177
+ isUniquePropertyInFamily: newPropertyType.isUniquePropertyInFamily,
174
178
  propertyLevel: newPropertyType.propertyLevel,
175
179
  formulaFunction: newPropertyType.formulaFunction,
176
180
  validationFunction: newPropertyType.validationFunction,
@@ -203,6 +207,10 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
203
207
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug ?? null,
204
208
  defaultValue: newPropertyType.defaultValue ?? null,
205
209
  propertyLevel: newPropertyType.propertyLevel ?? null,
210
+ typePropertyUserListId: newPropertyType.typePropertyUserListId ?? null,
211
+ referencedTypeRole: newPropertyType.referencedTypeRole ?? null,
212
+ isUniqueProperty: newPropertyType.isUniqueProperty ?? null,
213
+ isUniquePropertyInFamily: newPropertyType.isUniquePropertyInFamily ?? null,
206
214
  formulaFunction: newPropertyType.formulaFunction ?? null,
207
215
  validationFunction: newPropertyType.validationFunction ?? null,
208
216
  numberFormat: newPropertyType.numberFormat ?? null,
@@ -330,6 +330,10 @@ export interface ReducedTypeProperty {
330
330
  typePropertyOptionSetSlug: string;
331
331
  formula: string;
332
332
  referencedTypePath: string;
333
+ referencedTypeRole: string;
334
+ typePropertyUserListId: string;
335
+ isUniqueProperty: boolean;
336
+ isUniquePropertyInFamily: boolean;
333
337
  referencedTypeRootSlug: string;
334
338
  defaultValue: string;
335
339
  propertyLevel: string;