@hestia-earth/schema-convert 7.5.0 → 7.6.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/convert-json.js CHANGED
@@ -96,19 +96,17 @@ exports.run = function () { return __awaiter(void 0, void 0, void 0, function ()
96
96
  case 0: return [4 /*yield*/, lstat(path)];
97
97
  case 1:
98
98
  stat = _d.sent();
99
- return [4 /*yield*/, json_schema_1.loadSchemas()];
100
- case 2:
101
- schemas = _d.sent();
99
+ schemas = json_schema_1.loadSchemas();
102
100
  _b = (_a = Promise).all;
103
- if (!stat.isDirectory()) return [3 /*break*/, 4];
101
+ if (!stat.isDirectory()) return [3 /*break*/, 3];
104
102
  return [4 /*yield*/, listFiles(path)];
105
- case 3:
103
+ case 2:
106
104
  _c = (_d.sent()).map(function (file) { return processFile(schemas, path_1.join(path, file)); });
107
- return [3 /*break*/, 5];
108
- case 4:
105
+ return [3 /*break*/, 4];
106
+ case 3:
109
107
  _c = [processFile(schemas, path)];
110
- _d.label = 5;
111
- case 5: return [2 /*return*/, _b.apply(_a, [_c])];
108
+ _d.label = 4;
109
+ case 4: return [2 /*return*/, _b.apply(_a, [_c])];
112
110
  }
113
111
  });
114
112
  }); };
package/csv.js CHANGED
@@ -117,7 +117,7 @@ exports.toCsv = function (nodes, includeExising, useBrackets, selectedHeaders) {
117
117
  var _a = __read(header.split('.')), type = _a[0], rest = _a.slice(1);
118
118
  var ntype = node.type || node['@type'];
119
119
  var value = typeToColumnName(ntype) === type ? get(node, rest.join('.'), noValue) : noValue;
120
- return Array.isArray(value) ? value.join(';') : escapeField(value);
120
+ return Array.isArray(value) ? escapeField(value.join(';')) : escapeField(value);
121
121
  }).join(exports.csvColSep);
122
122
  }).join('\n')
123
123
  ].join('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/schema-convert",
3
- "version": "7.5.0",
3
+ "version": "7.6.0",
4
4
  "description": "Hestia Schema Converters",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",