@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/es/test-cli.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import * as __rspack_external__midscene_shared_env_0c37bb76 from "@midscene/shar
|
|
|
2
2
|
import * as __rspack_external_chalk from "chalk";
|
|
3
3
|
import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
|
|
4
4
|
import * as __rspack_external_node_path_c5b9b54f from "node:path";
|
|
5
|
-
import { NodeRegistry, WorkflowError, WorkflowExecutionFailure, WorkflowParseError, WorkflowPublicationError, asExecutionError, buildTestRunReportDump, buildTestRunReportPlan, classifyWorkflowDocumentFormat, collectTestRunReportSources, createProjectRuntime, decideRetry, getPendingScopeOperations, getResourceCleanupCompletion, isFatalDeviceError, isReportSecretKey, isResourceRecoveryError, normalizeSteps, observeResourceOperations, runDocumentAttempts, runWorkflowDocument, sanitizeReportError, sanitizeReportText, sanitizeReportValue, sumTestRunReportMetrics, trackResourceOperation, waitForScopeOperations } from "@midscene/core/internal/test-runner";
|
|
6
|
-
import { getDebug, runWithConsoleLogHandler, runWithConsoleLogScope } from "@midscene/shared/logger";
|
|
7
5
|
import { inspect, stripVTControlCharacters } from "node:util";
|
|
8
6
|
import string_width from "string-width";
|
|
9
7
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
|
+
import { NodeRegistry, WorkflowError, WorkflowExecutionFailure, WorkflowParseError, WorkflowPublicationError, asExecutionError, buildTestRunReportDump, buildTestRunReportPlan, classifyWorkflowDocumentFormat, collectTestRunReportSources, createProjectRuntime, decideRetry, getPendingScopeOperations, getResourceCleanupCompletion, isFatalDeviceError, isReportSecretKey, isResourceRecoveryError, normalizeSteps, observeResourceOperations, runDocumentAttempts, runWorkflowDocument, sanitizeReportError, sanitizeReportText, sanitizeReportValue, sumTestRunReportMetrics, trackResourceOperation, waitForScopeOperations } from "@midscene/core/internal/test-runner";
|
|
9
|
+
import { getDebug, runWithConsoleLogHandler, runWithConsoleLogScope } from "@midscene/shared/logger";
|
|
10
10
|
import { z } from "zod/v4";
|
|
11
11
|
import { require as api_require } from "tsx/cjs/api";
|
|
12
12
|
import { globSync } from "tinyglobby";
|
|
@@ -29,7 +29,9 @@ var __webpack_modules__ = {
|
|
|
29
29
|
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
30
30
|
},
|
|
31
31
|
"./package.json" (module) {
|
|
32
|
-
module.exports =
|
|
32
|
+
module.exports = {
|
|
33
|
+
rE: "1.17.4"
|
|
34
|
+
};
|
|
33
35
|
}
|
|
34
36
|
};
|
|
35
37
|
var __webpack_module_cache__ = {};
|
|
@@ -103,6 +105,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
103
105
|
})();
|
|
104
106
|
var external_node_fs_ = __webpack_require__("node:fs");
|
|
105
107
|
var external_node_path_ = __webpack_require__("node:path");
|
|
108
|
+
var external_chalk_ = __webpack_require__("chalk");
|
|
106
109
|
var package_0 = __webpack_require__("./package.json");
|
|
107
110
|
const formatCliError = (error)=>'string' == typeof error ? error : inspect(error, {
|
|
108
111
|
colors: false,
|
|
@@ -131,7 +134,6 @@ function formatConciseError(error) {
|
|
|
131
134
|
if (!messages.length) return current instanceof Error ? current.message : formatCliError(current);
|
|
132
135
|
return messages.join('\nCaused by: ');
|
|
133
136
|
}
|
|
134
|
-
var external_chalk_ = __webpack_require__("chalk");
|
|
135
137
|
const oneLine = (value)=>stripVTControlCharacters(value).replace(/\s+/g, ' ').trim();
|
|
136
138
|
const shorten = (value, length)=>{
|
|
137
139
|
const text = oneLine(value);
|
|
@@ -3663,10 +3665,9 @@ const reportTestProjectResult = (result, io, reporter, projectRoot, infrastructu
|
|
|
3663
3665
|
io.log(`Summary: ${result.summaryPath}`);
|
|
3664
3666
|
if (result.markdownPath && 'verbose' === reporter.mode) io.log(`Markdown: ${result.markdownPath}`);
|
|
3665
3667
|
if (result.reportPath) io.log(`Report: ${result.reportPath}`);
|
|
3666
|
-
writeGitHubSummary(result);
|
|
3667
3668
|
return result.exitCode;
|
|
3668
3669
|
};
|
|
3669
|
-
async function runTestCli(args, io = defaultCliIO) {
|
|
3670
|
+
async function runTestCli(args, io = defaultCliIO, onResult) {
|
|
3670
3671
|
try {
|
|
3671
3672
|
if ('model' === args[0]) {
|
|
3672
3673
|
const { runModelCommand } = await __webpack_require__.e("731").then(__webpack_require__.bind(__webpack_require__, "./src/cli/model-command.ts?3cff"));
|
|
@@ -3708,9 +3709,12 @@ async function runTestCli(args, io = defaultCliIO) {
|
|
|
3708
3709
|
} catch (error) {
|
|
3709
3710
|
if (!(error instanceof WorkflowExecutionFailure)) throw error;
|
|
3710
3711
|
reportTestProjectResult(error.result, io, reporter, projectRoot, error.errors);
|
|
3712
|
+
onResult?.(error.result);
|
|
3711
3713
|
return 1;
|
|
3712
3714
|
}
|
|
3713
|
-
|
|
3715
|
+
const exitCode = reportTestProjectResult(result, io, reporter, projectRoot);
|
|
3716
|
+
onResult?.(result);
|
|
3717
|
+
return exitCode;
|
|
3714
3718
|
});
|
|
3715
3719
|
} finally{
|
|
3716
3720
|
try {
|
|
@@ -3724,7 +3728,7 @@ async function runTestCli(args, io = defaultCliIO) {
|
|
|
3724
3728
|
return 1;
|
|
3725
3729
|
}
|
|
3726
3730
|
}
|
|
3727
|
-
runTestCli(process.argv.slice(2)).then((exitCode)=>{
|
|
3731
|
+
runTestCli(process.argv.slice(2), void 0, writeGitHubSummary).then((exitCode)=>{
|
|
3728
3732
|
process.exitCode = exitCode;
|
|
3729
3733
|
});
|
|
3730
3734
|
|