@contrail/cli 1.0.57 → 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.
@@ -266,7 +266,7 @@ function saveData(reducedData, dir) {
266
266
  if (!fileLabel) {
267
267
  console.warn('skipping bad data:', item);
268
268
  }
269
- fs.writeFileSync(path.join(subDir, `${fileLabel}.yml`), yamlStr, 'utf8');
269
+ fs.writeFileSync(path.join(subDir, `${removeSlash(fileLabel)}.yml`), yamlStr, 'utf8');
270
270
  }
271
271
  }
272
272
  else {
@@ -275,3 +275,7 @@ function saveData(reducedData, dir) {
275
275
  }
276
276
  }
277
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.57",
3
+ "version": "1.0.59",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -301,7 +301,7 @@ function saveData(reducedData, dir: string) {
301
301
  if(!fileLabel) {
302
302
  console.warn('skipping bad data:', item);
303
303
  }
304
- fs.writeFileSync(path.join(subDir, `${fileLabel}.yml`), yamlStr, 'utf8');
304
+ fs.writeFileSync(path.join(subDir, `${removeSlash(fileLabel)}.yml`), yamlStr, 'utf8');
305
305
  }
306
306
  } else {
307
307
  const yamlStr = yaml.dump(reducedData[key]);
@@ -309,4 +309,9 @@ function saveData(reducedData, dir: string) {
309
309
  }
310
310
 
311
311
  }
312
+ }
313
+
314
+ function removeSlash(string) {
315
+ const re = /\//gi;
316
+ return string.replace(re, '-');
312
317
  }