@mablhq/mabl-cli 1.25.1 → 1.25.5
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/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +3 -0
- package/commands/deploy/deploy_cmds/awaitDeploymentCompletion.js +2 -6
- package/commands/deploy/deploy_cmds/create.js +0 -3
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +9 -27
- package/commands/tests/testsUtil.js +24 -20
- package/execution/index.js +1 -1
- package/execution/index.js.LICENSE.txt +0 -2
- package/package.json +5 -5
- package/util/markdownUtil.js +3 -21
- package/util/timeUtil.js +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@types/fs-extra": "8.1.1",
|
|
30
30
|
"@types/serve-handler": "6.1.0",
|
|
31
31
|
"@types/tmp": "0.2.0",
|
|
32
|
+
"@types/tough-cookie": "4.0.0",
|
|
32
33
|
"agent-base": "6.0.2",
|
|
33
34
|
"analytics-node": "3.5.0",
|
|
34
35
|
"async-mutex": "0.3.1",
|
|
@@ -62,16 +63,15 @@
|
|
|
62
63
|
"markdown-table": "2.0.0",
|
|
63
64
|
"mime-types": "2.1.27",
|
|
64
65
|
"mochawesome-report-generator": "5.2.0",
|
|
65
|
-
"moment": "2.
|
|
66
|
-
"
|
|
67
|
-
"newman": "5.2.3",
|
|
66
|
+
"moment": "2.29.3",
|
|
67
|
+
"newman": "5.3.2",
|
|
68
68
|
"open": "6.4.0",
|
|
69
69
|
"ora": "4.0.4",
|
|
70
70
|
"playwright-core": "1.22.2",
|
|
71
71
|
"pluralize": "8.0.0",
|
|
72
72
|
"pngjs": "6.0.0",
|
|
73
73
|
"portfinder": "1.0.26",
|
|
74
|
-
"postman-collection": "
|
|
74
|
+
"postman-collection": "4.1.3",
|
|
75
75
|
"query-string": "6.13.1",
|
|
76
76
|
"range_check": "2.0.4",
|
|
77
77
|
"retry": "0.13.1",
|
package/util/markdownUtil.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.summaryToElapsedTime = exports.journeyRunToElapsedTime = exports.maybeCapitalize = exports.humanizedMablStatusToGithubIcon = exports.humanizeMablStatus = exports.formatResultsAsGithubMarkdown = void 0;
|
|
4
4
|
const change_case_1 = require("change-case");
|
|
5
|
-
const moment = require("moment");
|
|
6
5
|
const mablApi_1 = require("../mablApi");
|
|
6
|
+
const timeUtil_1 = require("./timeUtil");
|
|
7
7
|
const table = require('markdown-table');
|
|
8
|
-
const momentDurationFormatSetup = require('moment-duration-format');
|
|
9
|
-
momentDurationFormatSetup(moment);
|
|
10
8
|
var HumanizedMablStatuses;
|
|
11
9
|
(function (HumanizedMablStatuses) {
|
|
12
10
|
HumanizedMablStatuses["Failed"] = "Failed";
|
|
@@ -115,26 +113,10 @@ function maybeCapitalize(input) {
|
|
|
115
113
|
}
|
|
116
114
|
exports.maybeCapitalize = maybeCapitalize;
|
|
117
115
|
function journeyRunToElapsedTime(journeyRun) {
|
|
118
|
-
|
|
119
|
-
const startTime = journeyRun.start_time;
|
|
120
|
-
const stopTime = journeyRun.stop_time;
|
|
121
|
-
if (startTime && stopTime) {
|
|
122
|
-
elapsedTimeString = moment
|
|
123
|
-
.duration(stopTime - startTime, 'ms')
|
|
124
|
-
.format('hh:mm:ss', { trim: false });
|
|
125
|
-
}
|
|
126
|
-
return elapsedTimeString;
|
|
116
|
+
return (0, timeUtil_1.elapsedTimeToString)(journeyRun.start_time, journeyRun.stop_time);
|
|
127
117
|
}
|
|
128
118
|
exports.journeyRunToElapsedTime = journeyRunToElapsedTime;
|
|
129
119
|
function summaryToElapsedTime(summary) {
|
|
130
|
-
|
|
131
|
-
const startTime = summary.start_time;
|
|
132
|
-
const stopTime = summary.stop_time;
|
|
133
|
-
if (startTime && stopTime) {
|
|
134
|
-
elapsedTimeString = moment
|
|
135
|
-
.duration(stopTime - startTime, 'ms')
|
|
136
|
-
.format('hh:mm:ss', { trim: false });
|
|
137
|
-
}
|
|
138
|
-
return elapsedTimeString;
|
|
120
|
+
return (0, timeUtil_1.elapsedTimeToString)(summary.start_time, summary.stop_time);
|
|
139
121
|
}
|
|
140
122
|
exports.summaryToElapsedTime = summaryToElapsedTime;
|
package/util/timeUtil.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.elapsedTimeDurationToString = exports.elapsedTimeToString = void 0;
|
|
4
|
+
function elapsedTimeToString(startTimeInMillis, stopTimeInMillis) {
|
|
5
|
+
if (startTimeInMillis && stopTimeInMillis) {
|
|
6
|
+
return elapsedTimeDurationToString(stopTimeInMillis - startTimeInMillis);
|
|
7
|
+
}
|
|
8
|
+
return elapsedTimeDurationToString(undefined);
|
|
9
|
+
}
|
|
10
|
+
exports.elapsedTimeToString = elapsedTimeToString;
|
|
11
|
+
function elapsedTimeDurationToString(elapsedTimeInMillis) {
|
|
12
|
+
let elapsedTimeString = '--:--:--';
|
|
13
|
+
if (elapsedTimeInMillis !== undefined) {
|
|
14
|
+
if (elapsedTimeInMillis < 0) {
|
|
15
|
+
elapsedTimeString =
|
|
16
|
+
'-' + elapsedTimeDurationToString(elapsedTimeInMillis * -1);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
const diffInSeconds = Math.round(elapsedTimeInMillis / 1000);
|
|
20
|
+
const seconds = diffInSeconds % 60;
|
|
21
|
+
const minutes = Math.floor(diffInSeconds / 60) % 60;
|
|
22
|
+
const hours = Math.floor(diffInSeconds / (60 * 60));
|
|
23
|
+
elapsedTimeString = `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return elapsedTimeString;
|
|
27
|
+
}
|
|
28
|
+
exports.elapsedTimeDurationToString = elapsedTimeDurationToString;
|
|
29
|
+
function pad(input) {
|
|
30
|
+
return input.toString().padStart(2, '0');
|
|
31
|
+
}
|