datagrok-tools 4.6.2 → 4.6.3

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.
@@ -124,7 +124,7 @@ function checkImportStatements(packagePath, files, externals) {
124
124
  if (key.includes('/')) modules.push(key.split('/', 1)[0]);
125
125
  }
126
126
 
127
- var importRegex = new RegExp("import\\s+.*(".concat(modules.join('|'), ").*(?=\\s+?)"), 'g');
127
+ var importRegex = new RegExp("^(?!\\/{2})\\s*import\\s+.*(".concat(modules.join('|'), ").*(?=\\s+?)"), 'g');
128
128
  var validImportRegex = new RegExp("import\\s+.*(".concat(Object.keys(externals).join('|'), ")['\"]{1}"));
129
129
  var warnings = [];
130
130
 
@@ -216,7 +216,7 @@ function config(args) {
216
216
  answers = _context.sent;
217
217
 
218
218
  if (!answers['edit-config']) {
219
- _context.next = 23;
219
+ _context.next = 24;
220
220
  break;
221
221
  }
222
222
 
@@ -263,25 +263,27 @@ function config(args) {
263
263
 
264
264
  case 21:
265
265
  defaultServer = _context.sent;
266
- config["default"] = defaultServer['default-server']; // fs.writeFileSync(confPath, yaml.dump(config));
266
+ config["default"] = defaultServer['default-server'];
267
267
 
268
- case 23:
269
- _context.next = 30;
268
+ _fs["default"].writeFileSync(confPath, _jsYaml["default"].dump(config));
269
+
270
+ case 24:
271
+ _context.next = 31;
270
272
  break;
271
273
 
272
- case 25:
273
- _context.prev = 25;
274
+ case 26:
275
+ _context.prev = 26;
274
276
  _context.t2 = _context["catch"](0);
275
277
  color.error('The file is corrupted. Please run `grok config --reset` to restore the default template');
276
278
  console.error(_context.t2);
277
279
  return _context.abrupt("return", false);
278
280
 
279
- case 30:
281
+ case 31:
280
282
  case "end":
281
283
  return _context.stop();
282
284
  }
283
285
  }
284
- }, _callee, null, [[0, 25]]);
286
+ }, _callee, null, [[0, 26]]);
285
287
  }))();
286
288
 
287
289
  _fs["default"].writeFileSync(confPath, _jsYaml["default"].dump(config));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.6.2",
3
+ "version": "4.6.3",
4
4
  "description": "Utility to upload and publish packages to Datagrok",
5
5
  "homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
6
6
  "dependencies": {