@contrail/cli 1.0.56 → 1.0.59

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.
@@ -22,6 +22,7 @@ export interface ReducedTypeProperty {
22
22
  inherited: boolean;
23
23
  formulaFunction?: string;
24
24
  validationFunction?: string;
25
+ numberFormat?: any;
25
26
  }
26
27
  export interface ReducedOptionSet {
27
28
  name: string;
@@ -214,6 +214,7 @@ export function reduceTypes(dataHolder) {
214
214
  inherited: typeProperty.inherited,
215
215
  formulaFunction: typeProperty.formulaFunction,
216
216
  validationFunction: typeProperty.validationFunction,
217
+ numberFormat: typeProperty.numberFormat,
217
218
  };
218
219
  reducedTypeProperties.push(reducedTypeProperty);
219
220
  }
@@ -265,7 +266,7 @@ function saveData(reducedData, dir) {
265
266
  if (!fileLabel) {
266
267
  console.warn('skipping bad data:', item);
267
268
  }
268
- fs.writeFileSync(path.join(subDir, `${fileLabel}.yml`), yamlStr, 'utf8');
269
+ fs.writeFileSync(path.join(subDir, `${removeSlash(fileLabel)}.yml`), yamlStr, 'utf8');
269
270
  }
270
271
  }
271
272
  else {
@@ -274,3 +275,7 @@ function saveData(reducedData, dir) {
274
275
  }
275
276
  }
276
277
  }
278
+ function removeSlash(string) {
279
+ const re = /\//gi;
280
+ return string.replace(re, '-');
281
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "1.0.56",
3
+ "version": "1.0.59",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -23,6 +23,7 @@ export interface ReducedTypeProperty {
23
23
  inherited: boolean;
24
24
  formulaFunction?: string;
25
25
  validationFunction?: string;
26
+ numberFormat?: any;
26
27
  }
27
28
 
28
29
  export interface ReducedOptionSet {
@@ -242,6 +242,7 @@ export function reduceTypes(dataHolder: DataHolder) {
242
242
  inherited: typeProperty.inherited,
243
243
  formulaFunction: typeProperty.formulaFunction,
244
244
  validationFunction: typeProperty.validationFunction,
245
+ numberFormat: typeProperty.numberFormat,
245
246
  };
246
247
 
247
248
  reducedTypeProperties.push(reducedTypeProperty);
@@ -300,7 +301,7 @@ function saveData(reducedData, dir: string) {
300
301
  if(!fileLabel) {
301
302
  console.warn('skipping bad data:', item);
302
303
  }
303
- fs.writeFileSync(path.join(subDir, `${fileLabel}.yml`), yamlStr, 'utf8');
304
+ fs.writeFileSync(path.join(subDir, `${removeSlash(fileLabel)}.yml`), yamlStr, 'utf8');
304
305
  }
305
306
  } else {
306
307
  const yamlStr = yaml.dump(reducedData[key]);
@@ -308,4 +309,9 @@ function saveData(reducedData, dir: string) {
308
309
  }
309
310
 
310
311
  }
312
+ }
313
+
314
+ function removeSlash(string) {
315
+ const re = /\//gi;
316
+ return string.replace(re, '-');
311
317
  }