@midscene/test 1.17.4-beta-20261030030502.0 → 1.17.4
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/dist/es/test-cli.mjs +12 -8
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/test-cli.js +16 -12
- package/dist/lib/test-cli.js.map +1 -1
- package/package.json +13 -13
package/dist/lib/test-cli.js
CHANGED
|
@@ -28,7 +28,9 @@ var __webpack_modules__ = {
|
|
|
28
28
|
module.exports = require("yargs/yargs");
|
|
29
29
|
},
|
|
30
30
|
"./package.json" (module) {
|
|
31
|
-
module.exports =
|
|
31
|
+
module.exports = {
|
|
32
|
+
rE: "1.17.4"
|
|
33
|
+
};
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
var __webpack_module_cache__ = {};
|
|
@@ -90,10 +92,12 @@ var __webpack_exports__ = {};
|
|
|
90
92
|
(()=>{
|
|
91
93
|
var external_node_fs_ = __webpack_require__("node:fs");
|
|
92
94
|
var external_node_path_ = __webpack_require__("node:path");
|
|
93
|
-
const test_runner_namespaceObject = require("@midscene/core/internal/test-runner");
|
|
94
|
-
const logger_namespaceObject = require("@midscene/shared/logger");
|
|
95
|
-
var package_0 = __webpack_require__("./package.json");
|
|
96
95
|
const external_node_util_namespaceObject = require("node:util");
|
|
96
|
+
var external_chalk_ = __webpack_require__("chalk");
|
|
97
|
+
var external_chalk_default = /*#__PURE__*/ __webpack_require__.n(external_chalk_);
|
|
98
|
+
const external_string_width_namespaceObject = require("string-width");
|
|
99
|
+
var external_string_width_default = /*#__PURE__*/ __webpack_require__.n(external_string_width_namespaceObject);
|
|
100
|
+
var package_0 = __webpack_require__("./package.json");
|
|
97
101
|
const formatCliError = (error)=>'string' == typeof error ? error : (0, external_node_util_namespaceObject.inspect)(error, {
|
|
98
102
|
colors: false,
|
|
99
103
|
depth: null,
|
|
@@ -121,11 +125,8 @@ var __webpack_exports__ = {};
|
|
|
121
125
|
if (!messages.length) return current instanceof Error ? current.message : formatCliError(current);
|
|
122
126
|
return messages.join('\nCaused by: ');
|
|
123
127
|
}
|
|
124
|
-
var external_chalk_ = __webpack_require__("chalk");
|
|
125
|
-
var external_chalk_default = /*#__PURE__*/ __webpack_require__.n(external_chalk_);
|
|
126
|
-
const external_string_width_namespaceObject = require("string-width");
|
|
127
|
-
var external_string_width_default = /*#__PURE__*/ __webpack_require__.n(external_string_width_namespaceObject);
|
|
128
128
|
const external_node_url_namespaceObject = require("node:url");
|
|
129
|
+
const test_runner_namespaceObject = require("@midscene/core/internal/test-runner");
|
|
129
130
|
const oneLine = (value)=>(0, external_node_util_namespaceObject.stripVTControlCharacters)(value).replace(/\s+/g, ' ').trim();
|
|
130
131
|
const shorten = (value, length)=>{
|
|
131
132
|
const text = oneLine(value);
|
|
@@ -1114,6 +1115,7 @@ var __webpack_exports__ = {};
|
|
|
1114
1115
|
].join('\n');
|
|
1115
1116
|
(0, external_node_fs_.appendFileSync)(output, `${summary}\n`);
|
|
1116
1117
|
}
|
|
1118
|
+
const logger_namespaceObject = require("@midscene/shared/logger");
|
|
1117
1119
|
const v4_namespaceObject = require("zod/v4");
|
|
1118
1120
|
const GENERATED_COMMENT = '<!-- Generated by `midscene-test nodes`. Do not edit directly. -->';
|
|
1119
1121
|
const sortNodesForSpec = (nodes)=>{
|
|
@@ -3665,10 +3667,9 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3665
3667
|
io.log(`Summary: ${result.summaryPath}`);
|
|
3666
3668
|
if (result.markdownPath && 'verbose' === reporter.mode) io.log(`Markdown: ${result.markdownPath}`);
|
|
3667
3669
|
if (result.reportPath) io.log(`Report: ${result.reportPath}`);
|
|
3668
|
-
writeGitHubSummary(result);
|
|
3669
3670
|
return result.exitCode;
|
|
3670
3671
|
};
|
|
3671
|
-
async function runTestCli(args, io = defaultCliIO) {
|
|
3672
|
+
async function runTestCli(args, io = defaultCliIO, onResult) {
|
|
3672
3673
|
try {
|
|
3673
3674
|
if ('model' === args[0]) {
|
|
3674
3675
|
const { runModelCommand } = await __webpack_require__.e("703").then(__webpack_require__.bind(__webpack_require__, "./src/cli/model-command.ts"));
|
|
@@ -3710,9 +3711,12 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3710
3711
|
} catch (error) {
|
|
3711
3712
|
if (!(error instanceof test_runner_namespaceObject.WorkflowExecutionFailure)) throw error;
|
|
3712
3713
|
reportTestProjectResult(error.result, io, reporter, projectRoot, error.errors);
|
|
3714
|
+
onResult?.(error.result);
|
|
3713
3715
|
return 1;
|
|
3714
3716
|
}
|
|
3715
|
-
|
|
3717
|
+
const exitCode = reportTestProjectResult(result, io, reporter, projectRoot);
|
|
3718
|
+
onResult?.(result);
|
|
3719
|
+
return exitCode;
|
|
3716
3720
|
});
|
|
3717
3721
|
} finally{
|
|
3718
3722
|
try {
|
|
@@ -3726,7 +3730,7 @@ Legacy tasks/flow YAML and its CLI options belong to the midscene command.
|
|
|
3726
3730
|
return 1;
|
|
3727
3731
|
}
|
|
3728
3732
|
}
|
|
3729
|
-
runTestCli(process.argv.slice(2)).then((exitCode)=>{
|
|
3733
|
+
runTestCli(process.argv.slice(2), void 0, writeGitHubSummary).then((exitCode)=>{
|
|
3730
3734
|
process.exitCode = exitCode;
|
|
3731
3735
|
});
|
|
3732
3736
|
})();
|