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.
- package/bin/commands/check.js +1 -1
- package/bin/commands/config.js +10 -8
- package/package.json +1 -1
package/bin/commands/check.js
CHANGED
|
@@ -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
|
|
package/bin/commands/config.js
CHANGED
|
@@ -216,7 +216,7 @@ function config(args) {
|
|
|
216
216
|
answers = _context.sent;
|
|
217
217
|
|
|
218
218
|
if (!answers['edit-config']) {
|
|
219
|
-
_context.next =
|
|
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'];
|
|
266
|
+
config["default"] = defaultServer['default-server'];
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
_fs["default"].writeFileSync(confPath, _jsYaml["default"].dump(config));
|
|
269
|
+
|
|
270
|
+
case 24:
|
|
271
|
+
_context.next = 31;
|
|
270
272
|
break;
|
|
271
273
|
|
|
272
|
-
case
|
|
273
|
-
_context.prev =
|
|
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
|
|
281
|
+
case 31:
|
|
280
282
|
case "end":
|
|
281
283
|
return _context.stop();
|
|
282
284
|
}
|
|
283
285
|
}
|
|
284
|
-
}, _callee, null, [[0,
|
|
286
|
+
}, _callee, null, [[0, 26]]);
|
|
285
287
|
}))();
|
|
286
288
|
|
|
287
289
|
_fs["default"].writeFileSync(confPath, _jsYaml["default"].dump(config));
|
package/package.json
CHANGED