@midscene/test 1.17.3 → 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 +10 -8
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/test-cli.js +14 -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";
|
|
@@ -30,7 +30,7 @@ var __webpack_modules__ = {
|
|
|
30
30
|
},
|
|
31
31
|
"./package.json" (module) {
|
|
32
32
|
module.exports = {
|
|
33
|
-
rE: "1.17.
|
|
33
|
+
rE: "1.17.4"
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -105,6 +105,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
105
105
|
})();
|
|
106
106
|
var external_node_fs_ = __webpack_require__("node:fs");
|
|
107
107
|
var external_node_path_ = __webpack_require__("node:path");
|
|
108
|
+
var external_chalk_ = __webpack_require__("chalk");
|
|
108
109
|
var package_0 = __webpack_require__("./package.json");
|
|
109
110
|
const formatCliError = (error)=>'string' == typeof error ? error : inspect(error, {
|
|
110
111
|
colors: false,
|
|
@@ -133,7 +134,6 @@ function formatConciseError(error) {
|
|
|
133
134
|
if (!messages.length) return current instanceof Error ? current.message : formatCliError(current);
|
|
134
135
|
return messages.join('\nCaused by: ');
|
|
135
136
|
}
|
|
136
|
-
var external_chalk_ = __webpack_require__("chalk");
|
|
137
137
|
const oneLine = (value)=>stripVTControlCharacters(value).replace(/\s+/g, ' ').trim();
|
|
138
138
|
const shorten = (value, length)=>{
|
|
139
139
|
const text = oneLine(value);
|
|
@@ -3665,10 +3665,9 @@ const reportTestProjectResult = (result, io, reporter, projectRoot, infrastructu
|
|
|
3665
3665
|
io.log(`Summary: ${result.summaryPath}`);
|
|
3666
3666
|
if (result.markdownPath && 'verbose' === reporter.mode) io.log(`Markdown: ${result.markdownPath}`);
|
|
3667
3667
|
if (result.reportPath) io.log(`Report: ${result.reportPath}`);
|
|
3668
|
-
writeGitHubSummary(result);
|
|
3669
3668
|
return result.exitCode;
|
|
3670
3669
|
};
|
|
3671
|
-
async function runTestCli(args, io = defaultCliIO) {
|
|
3670
|
+
async function runTestCli(args, io = defaultCliIO, onResult) {
|
|
3672
3671
|
try {
|
|
3673
3672
|
if ('model' === args[0]) {
|
|
3674
3673
|
const { runModelCommand } = await __webpack_require__.e("731").then(__webpack_require__.bind(__webpack_require__, "./src/cli/model-command.ts?3cff"));
|
|
@@ -3710,9 +3709,12 @@ async function runTestCli(args, io = defaultCliIO) {
|
|
|
3710
3709
|
} catch (error) {
|
|
3711
3710
|
if (!(error instanceof WorkflowExecutionFailure)) throw error;
|
|
3712
3711
|
reportTestProjectResult(error.result, io, reporter, projectRoot, error.errors);
|
|
3712
|
+
onResult?.(error.result);
|
|
3713
3713
|
return 1;
|
|
3714
3714
|
}
|
|
3715
|
-
|
|
3715
|
+
const exitCode = reportTestProjectResult(result, io, reporter, projectRoot);
|
|
3716
|
+
onResult?.(result);
|
|
3717
|
+
return exitCode;
|
|
3716
3718
|
});
|
|
3717
3719
|
} finally{
|
|
3718
3720
|
try {
|
|
@@ -3726,7 +3728,7 @@ async function runTestCli(args, io = defaultCliIO) {
|
|
|
3726
3728
|
return 1;
|
|
3727
3729
|
}
|
|
3728
3730
|
}
|
|
3729
|
-
runTestCli(process.argv.slice(2)).then((exitCode)=>{
|
|
3731
|
+
runTestCli(process.argv.slice(2), void 0, writeGitHubSummary).then((exitCode)=>{
|
|
3730
3732
|
process.exitCode = exitCode;
|
|
3731
3733
|
});
|
|
3732
3734
|
|