@midscene/cli 0.8.10-beta-20241225153237.0 → 0.8.10
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/index.js +2 -2
- package/dist/lib/index.js +6 -6
- package/package.json +3 -3
package/dist/es/index.js
CHANGED
|
@@ -15011,7 +15011,7 @@ var require_package2 = __commonJS({
|
|
|
15011
15011
|
module.exports = {
|
|
15012
15012
|
name: "@midscene/cli",
|
|
15013
15013
|
description: "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
|
|
15014
|
-
version: "0.8.10
|
|
15014
|
+
version: "0.8.10",
|
|
15015
15015
|
repository: "https://github.com/web-infra-dev/midscene",
|
|
15016
15016
|
homepage: "https://midscenejs.com/",
|
|
15017
15017
|
"jsnext:source": "./src/index.ts",
|
|
@@ -15588,7 +15588,7 @@ var require_source = __commonJS({
|
|
|
15588
15588
|
|
|
15589
15589
|
// src/printer.ts
|
|
15590
15590
|
import { basename, dirname, relative } from "path";
|
|
15591
|
-
import { flowItemBrief } from "@midscene/web";
|
|
15591
|
+
import { flowItemBrief } from "@midscene/web/yaml";
|
|
15592
15592
|
function indicatorForStatus(status) {
|
|
15593
15593
|
if (status === "init") {
|
|
15594
15594
|
return import_chalk.default.gray("◌");
|
package/dist/lib/index.js
CHANGED
|
@@ -5556,7 +5556,7 @@ var require_package2 = __commonJS({
|
|
|
5556
5556
|
module2.exports = {
|
|
5557
5557
|
name: "@midscene/cli",
|
|
5558
5558
|
description: "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
|
|
5559
|
-
version: "0.8.10
|
|
5559
|
+
version: "0.8.10",
|
|
5560
5560
|
repository: "https://github.com/web-infra-dev/midscene",
|
|
5561
5561
|
homepage: "https://midscenejs.com/",
|
|
5562
5562
|
"jsnext:source": "./src/index.ts",
|
|
@@ -15439,12 +15439,12 @@ function matchYamlFiles(fileGlob) {
|
|
|
15439
15439
|
// src/yaml-runner.ts
|
|
15440
15440
|
var import_node_fs3 = require("fs");
|
|
15441
15441
|
var import_node_path4 = require("path");
|
|
15442
|
-
var
|
|
15442
|
+
var import_yaml2 = require("@midscene/web/yaml");
|
|
15443
15443
|
var import_http_server = require("http-server");
|
|
15444
15444
|
|
|
15445
15445
|
// src/printer.ts
|
|
15446
15446
|
var import_node_path3 = require("path");
|
|
15447
|
-
var
|
|
15447
|
+
var import_yaml = require("@midscene/web/yaml");
|
|
15448
15448
|
var import_chalk = __toESM(require_source());
|
|
15449
15449
|
var isTTY = process.env.MIDSCENE_CLI_LOG_ON_NON_TTY ? false : process.stdout.isTTY;
|
|
15450
15450
|
var indent = " ";
|
|
@@ -15501,7 +15501,7 @@ var singleTaskInfo = (task) => {
|
|
|
15501
15501
|
stepText = import_chalk.default.gray("(navigating)");
|
|
15502
15502
|
} else if (typeof task.currentStep === "number") {
|
|
15503
15503
|
const currentFlowItem = task.flow[task.currentStep];
|
|
15504
|
-
const taskBrief = currentFlowItem && (0,
|
|
15504
|
+
const taskBrief = currentFlowItem && (0, import_yaml.flowItemBrief)(currentFlowItem);
|
|
15505
15505
|
const actionText = taskBrief ? `, ${taskBrief}` : "";
|
|
15506
15506
|
stepText = import_chalk.default.gray(
|
|
15507
15507
|
`(step ${task.currentStep + 1}/${task.totalSteps}${actionText})`.trim()
|
|
@@ -16073,14 +16073,14 @@ function playYamlFiles(files, options) {
|
|
|
16073
16073
|
return __async(this, null, function* () {
|
|
16074
16074
|
const fileContextList = [];
|
|
16075
16075
|
for (const file of files) {
|
|
16076
|
-
const script = (0,
|
|
16076
|
+
const script = (0, import_yaml2.parseYamlScript)((0, import_node_fs3.readFileSync)(file, "utf-8"), file);
|
|
16077
16077
|
const fileName = (0, import_node_path4.basename)(file, (0, import_node_path4.extname)(file));
|
|
16078
16078
|
const preference = {
|
|
16079
16079
|
headed: options == null ? void 0 : options.headed,
|
|
16080
16080
|
keepWindow: options == null ? void 0 : options.keepWindow,
|
|
16081
16081
|
testId: fileName
|
|
16082
16082
|
};
|
|
16083
|
-
const player = new
|
|
16083
|
+
const player = new import_yaml2.ScriptPlayer(
|
|
16084
16084
|
script,
|
|
16085
16085
|
(target) => __async(this, null, function* () {
|
|
16086
16086
|
const freeFn = [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/cli",
|
|
3
3
|
"description": "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
|
|
4
|
-
"version": "0.8.10
|
|
4
|
+
"version": "0.8.10",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"jsnext:source": "./src/index.ts",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"puppeteer": "23.0.2",
|
|
19
19
|
"http-server": "14.1.1",
|
|
20
|
-
"@midscene/
|
|
21
|
-
"@midscene/
|
|
20
|
+
"@midscene/core": "0.8.10",
|
|
21
|
+
"@midscene/web": "0.8.10"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@modern-js/module-tools": "2.60.6",
|