datagrok-tools 4.13.10 → 4.13.11
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/CHANGELOG.md +6 -1
- package/bin/commands/publish.js +24 -8
- package/bin/utils/utils.js +26 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
# Datagrok-tools changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## 4.13.11 (2024-07-30)
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Added commit label to context panel for 'manually' published versions
|
|
9
|
+
|
|
4
10
|
## 4.13.10 (2024-07-29)
|
|
5
11
|
|
|
6
12
|
### Bug Fixes
|
|
7
13
|
|
|
8
14
|
* Added ability to select test by args variable
|
|
9
15
|
|
|
10
|
-
|
|
11
16
|
## 4.13.9 (2024-07-29)
|
|
12
17
|
|
|
13
18
|
### Bug Fixes
|
package/bin/commands/publish.js
CHANGED
|
@@ -26,6 +26,8 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
26
26
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
27
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } // @ts-ignore
|
|
28
28
|
// @ts-ignore
|
|
29
|
+
var _require = require('child_process'),
|
|
30
|
+
exec = _require.exec;
|
|
29
31
|
var grokDir = _path["default"].join(_os["default"].homedir(), '.grok');
|
|
30
32
|
var confPath = _path["default"].join(grokDir, 'config.yaml');
|
|
31
33
|
var confTemplateDir = _path["default"].join(_path["default"].dirname(_path["default"].dirname(__dirname)), 'config-template.yaml');
|
|
@@ -352,25 +354,39 @@ function publish(args) {
|
|
|
352
354
|
case 0:
|
|
353
355
|
code = 0;
|
|
354
356
|
_context.prev = 1;
|
|
355
|
-
|
|
357
|
+
exec('git rev-parse HEAD', function (error, stdout, stderr) {
|
|
358
|
+
if (error) {
|
|
359
|
+
console.error("Error executing command: ".concat(error.message));
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if (stderr) {
|
|
363
|
+
console.error("Standard Error: ".concat(stderr));
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
if (!args.suffix && stdout) args.suffix = stdout.toString().substring(0, 8);
|
|
367
|
+
});
|
|
368
|
+
_context.next = 5;
|
|
369
|
+
return utils.delay(100);
|
|
370
|
+
case 5:
|
|
371
|
+
_context.next = 7;
|
|
356
372
|
return processPackage(!args.release, Boolean(args.rebuild), url, key, packageName, args.suffix);
|
|
357
|
-
case
|
|
373
|
+
case 7:
|
|
358
374
|
code = _context.sent;
|
|
359
|
-
_context.next =
|
|
375
|
+
_context.next = 14;
|
|
360
376
|
break;
|
|
361
|
-
case
|
|
362
|
-
_context.prev =
|
|
377
|
+
case 10:
|
|
378
|
+
_context.prev = 10;
|
|
363
379
|
_context.t0 = _context["catch"](1);
|
|
364
380
|
console.error(_context.t0);
|
|
365
381
|
code = 1;
|
|
366
|
-
case
|
|
382
|
+
case 14:
|
|
367
383
|
console.log("Exiting with code ".concat(code));
|
|
368
384
|
process.exit(code);
|
|
369
|
-
case
|
|
385
|
+
case 16:
|
|
370
386
|
case "end":
|
|
371
387
|
return _context.stop();
|
|
372
388
|
}
|
|
373
|
-
}, _callee, null, [[1,
|
|
389
|
+
}, _callee, null, [[1, 10]]);
|
|
374
390
|
})));
|
|
375
391
|
return true;
|
|
376
392
|
}
|
package/bin/utils/utils.js
CHANGED
|
@@ -7,7 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.absUrlRegex = exports.TemplateBuilder = void 0;
|
|
8
8
|
exports.camelCaseToKebab = camelCaseToKebab;
|
|
9
9
|
exports.checkScriptLocation = checkScriptLocation;
|
|
10
|
-
exports.
|
|
10
|
+
exports.commentMap = void 0;
|
|
11
|
+
exports.delay = delay;
|
|
12
|
+
exports.dgToTsTypeMap = exports.dgImports = void 0;
|
|
11
13
|
exports.friendlyNameToName = friendlyNameToName;
|
|
12
14
|
exports.getParam = getParam;
|
|
13
15
|
exports.getScriptInputs = getScriptInputs;
|
|
@@ -23,14 +25,37 @@ exports.removeScope = removeScope;
|
|
|
23
25
|
exports.scriptWrapperTemplate = exports.scriptLangExtMap = exports.scriptExtensions = exports.replacers = void 0;
|
|
24
26
|
exports.spaceToCamelCase = spaceToCamelCase;
|
|
25
27
|
exports.wordsToCamelCase = wordsToCamelCase;
|
|
28
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
26
29
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
27
30
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
28
31
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
32
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
29
33
|
var _fs = _interopRequireDefault(require("fs"));
|
|
30
34
|
var _path = _interopRequireDefault(require("path"));
|
|
31
35
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
32
36
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
37
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
38
|
+
/* Waits [ms] milliseconds */
|
|
39
|
+
function delay(_x) {
|
|
40
|
+
return _delay.apply(this, arguments);
|
|
41
|
+
}
|
|
42
|
+
function _delay() {
|
|
43
|
+
_delay = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ms) {
|
|
44
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
45
|
+
while (1) switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
_context.next = 2;
|
|
48
|
+
return new Promise(function (r) {
|
|
49
|
+
return setTimeout(r, ms);
|
|
50
|
+
});
|
|
51
|
+
case 2:
|
|
52
|
+
case "end":
|
|
53
|
+
return _context.stop();
|
|
54
|
+
}
|
|
55
|
+
}, _callee);
|
|
56
|
+
}));
|
|
57
|
+
return _delay.apply(this, arguments);
|
|
58
|
+
}
|
|
34
59
|
function isEmpty(dir) {
|
|
35
60
|
return _fs["default"].readdirSync(dir).length === 0;
|
|
36
61
|
}
|
package/package.json
CHANGED