@mablhq/mabl-cli 1.43.11 → 1.43.15
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/cli.js +2 -50
- package/commands/test-runs/test-runs_cmds/export.js +1 -0
- package/execution/index.js +1 -1
- package/mablApi/index.js +1 -1
- package/middleware.js +62 -0
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -23,25 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
__setModuleDefault(result, mod);
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
-
};
|
|
29
|
-
var _a;
|
|
30
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
27
|
const yargs = __importStar(require("yargs"));
|
|
32
|
-
const analytics_1 = require("./util/analytics");
|
|
33
28
|
const env_1 = require("./env/env");
|
|
34
29
|
const constants_1 = require("./commands/constants");
|
|
35
|
-
const
|
|
36
|
-
const versionUtil_1 = require("./commands/commandUtil/versionUtil");
|
|
37
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
38
|
-
const loggingProvider_1 = require("./providers/logging/loggingProvider");
|
|
39
|
-
const logLineMessaging_1 = require("./core/messaging/logLineMessaging");
|
|
40
|
-
const messaging_1 = require("./core/messaging/messaging");
|
|
41
|
-
const updateNotifier = require('update-notifier');
|
|
42
|
-
const cliPackage = require('./package.json');
|
|
43
|
-
const UPDATE_CHECK_INTERVAL_MILLISECONDS = 24 * 60 * 60 * 1000;
|
|
44
|
-
const MIN_SUPPORTED_NODE_VERSION = (0, versionUtil_1.extractNodeVersionTuple)((_a = cliPackage === null || cliPackage === void 0 ? void 0 : cliPackage.engines) === null || _a === void 0 ? void 0 : _a.node);
|
|
30
|
+
const middleware_1 = require("./middleware");
|
|
45
31
|
require('v8-compile-cache');
|
|
46
32
|
require('yargonaut').style('cyan').helpStyle('magenta').errorsStyle('red');
|
|
47
33
|
const excludeInternal = env_1.ENV === 'prod' ? { exclude: /.*/gm } : undefined;
|
|
@@ -70,38 +56,4 @@ yargs
|
|
|
70
56
|
.alias(constants_1.CommandArgVersion, constants_1.CommandArgAliases.Version)
|
|
71
57
|
.wrap(null)
|
|
72
58
|
.epilogue('Read full docs @ https://help.mabl.com/docs/mabl-cli')
|
|
73
|
-
.middleware(
|
|
74
|
-
() => {
|
|
75
|
-
(0, logLineMessaging_1.registerConsoleLoggerForOutput)(messaging_1.mablEventEmitter);
|
|
76
|
-
},
|
|
77
|
-
() => {
|
|
78
|
-
try {
|
|
79
|
-
const nodeVersion = (0, versionUtil_1.extractNodeVersionTuple)(process.version);
|
|
80
|
-
if ((0, versionUtil_1.compareNodeVersions)(nodeVersion, MIN_SUPPORTED_NODE_VERSION) < 0) {
|
|
81
|
-
loggingProvider_1.logger.info(chalk_1.default.bgYellow.black(`WARNING: Unsupported Node.js detected (`) +
|
|
82
|
-
chalk_1.default.bgYellow.bold.white((0, versionUtil_1.nodeVersionToString)(nodeVersion)) +
|
|
83
|
-
chalk_1.default.bgYellow.black(`). \nmabl-cli functionality may be limited, please update to `) +
|
|
84
|
-
chalk_1.default.bgYellow.bold.white((0, versionUtil_1.nodeVersionToString)(MIN_SUPPORTED_NODE_VERSION)) +
|
|
85
|
-
chalk_1.default.bgYellow.black(' or later'));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch (_) {
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
async (argv) => (0, analytics_1.trackCliEvent)(argv._, (0, pureUtil_1.extractKeyCountsFromArgs)(argv)),
|
|
92
|
-
() => {
|
|
93
|
-
updateNotifier({
|
|
94
|
-
pkg: cliPackage,
|
|
95
|
-
updateCheckInterval: UPDATE_CHECK_INTERVAL_MILLISECONDS,
|
|
96
|
-
}).notify({
|
|
97
|
-
isGlobal: true,
|
|
98
|
-
boxenOptions: {
|
|
99
|
-
padding: 1,
|
|
100
|
-
margin: 0,
|
|
101
|
-
align: 'center',
|
|
102
|
-
borderColor: 'cyan',
|
|
103
|
-
borderStyle: 'round',
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
]).argv;
|
|
59
|
+
.middleware(middleware_1.CLI_MIDDLEWARE).argv;
|
|
@@ -26,6 +26,7 @@ exports.builder = (yargs) => {
|
|
|
26
26
|
default: [mablApi_1.ExportRequest.TargetContentEnum.Screenshots.toString()],
|
|
27
27
|
choices: [
|
|
28
28
|
mablApi_1.ExportRequest.TargetContentEnum.Screenshots,
|
|
29
|
+
mablApi_1.ExportRequest.TargetContentEnum.ConsoleLogs,
|
|
29
30
|
mablApi_1.ExportRequest.TargetContentEnum.Doms,
|
|
30
31
|
mablApi_1.ExportRequest.TargetContentEnum.Hars,
|
|
31
32
|
mablApi_1.ExportRequest.TargetContentEnum.Traces,
|