@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.
|
@@ -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
package/src/types/interfaces.ts
CHANGED
|
@@ -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
|
}
|