@midscene/cli 0.8.5-beta-20241203162056.0 → 0.8.5
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 +5 -4
- package/dist/lib/index.js +4 -3
- package/package.json +3 -3
package/dist/es/index.js
CHANGED
|
@@ -15050,7 +15050,7 @@ var require_package2 = __commonJS({
|
|
|
15050
15050
|
module.exports = {
|
|
15051
15051
|
name: "@midscene/cli",
|
|
15052
15052
|
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.",
|
|
15053
|
-
version: "0.8.5
|
|
15053
|
+
version: "0.8.5",
|
|
15054
15054
|
repository: "https://github.com/web-infra-dev/midscene",
|
|
15055
15055
|
homepage: "https://midscenejs.com/",
|
|
15056
15056
|
"jsnext:source": "./src/index.ts",
|
|
@@ -16184,7 +16184,7 @@ var init_tty_renderer = __esm({
|
|
|
16184
16184
|
"src/tty-renderer.ts"() {
|
|
16185
16185
|
"use strict";
|
|
16186
16186
|
init_restore_cursor();
|
|
16187
|
-
DEFAULT_RENDER_INTERVAL =
|
|
16187
|
+
DEFAULT_RENDER_INTERVAL = 160;
|
|
16188
16188
|
ESC = "\x1B[";
|
|
16189
16189
|
CLEAR_LINE = `${ESC}K`;
|
|
16190
16190
|
MOVE_CURSOR_ONE_ROW_UP = `${ESC}1A`;
|
|
@@ -16394,7 +16394,7 @@ function playYamlFiles(files, options) {
|
|
|
16394
16394
|
return !ifFail;
|
|
16395
16395
|
});
|
|
16396
16396
|
}
|
|
16397
|
-
var defaultUA, defaultViewportWidth, defaultViewportHeight, defaultViewportScale, launchServer, ttyRenderer, ScriptPlayer;
|
|
16397
|
+
var defaultUA, defaultViewportWidth, defaultViewportHeight, defaultViewportScale, defaultWaitForNetworkIdleTimeout, launchServer, ttyRenderer, ScriptPlayer;
|
|
16398
16398
|
var init_yaml_player = __esm({
|
|
16399
16399
|
"src/yaml-player.ts"() {
|
|
16400
16400
|
"use strict";
|
|
@@ -16405,6 +16405,7 @@ var init_yaml_player = __esm({
|
|
|
16405
16405
|
defaultViewportWidth = 1280;
|
|
16406
16406
|
defaultViewportHeight = 960;
|
|
16407
16407
|
defaultViewportScale = process.platform === "darwin" ? 2 : 1;
|
|
16408
|
+
defaultWaitForNetworkIdleTimeout = 10 * 1e3;
|
|
16408
16409
|
launchServer = (dir) => __async(void 0, null, function* () {
|
|
16409
16410
|
return new Promise((resolve, reject) => {
|
|
16410
16411
|
const server = createServer({
|
|
@@ -16626,7 +16627,7 @@ var init_yaml_player = __esm({
|
|
|
16626
16627
|
yield page.setCookie(...JSON.parse(cookieFileContent));
|
|
16627
16628
|
}
|
|
16628
16629
|
yield page.goto(urlToVisit);
|
|
16629
|
-
const waitForNetworkIdleTimeout = typeof ((_c2 = target.waitForNetworkIdle) == null ? void 0 : _c2.timeout) === "number" ? target.waitForNetworkIdle.timeout :
|
|
16630
|
+
const waitForNetworkIdleTimeout = typeof ((_c2 = target.waitForNetworkIdle) == null ? void 0 : _c2.timeout) === "number" ? target.waitForNetworkIdle.timeout : defaultWaitForNetworkIdleTimeout;
|
|
16630
16631
|
try {
|
|
16631
16632
|
if (waitForNetworkIdleTimeout > 0) {
|
|
16632
16633
|
yield page.waitForNetworkIdle({
|
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.5
|
|
5559
|
+
version: "0.8.5",
|
|
5560
5560
|
repository: "https://github.com/web-infra-dev/midscene",
|
|
5561
5561
|
homepage: "https://midscenejs.com/",
|
|
5562
5562
|
"jsnext:source": "./src/index.ts",
|
|
@@ -15984,7 +15984,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
15984
15984
|
var restore_cursor_default = restoreCursor;
|
|
15985
15985
|
|
|
15986
15986
|
// src/tty-renderer.ts
|
|
15987
|
-
var DEFAULT_RENDER_INTERVAL =
|
|
15987
|
+
var DEFAULT_RENDER_INTERVAL = 160;
|
|
15988
15988
|
var ESC = "\x1B[";
|
|
15989
15989
|
var CLEAR_LINE = `${ESC}K`;
|
|
15990
15990
|
var MOVE_CURSOR_ONE_ROW_UP = `${ESC}1A`;
|
|
@@ -16133,6 +16133,7 @@ var defaultUA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537
|
|
|
16133
16133
|
var defaultViewportWidth = 1280;
|
|
16134
16134
|
var defaultViewportHeight = 960;
|
|
16135
16135
|
var defaultViewportScale = process.platform === "darwin" ? 2 : 1;
|
|
16136
|
+
var defaultWaitForNetworkIdleTimeout = 10 * 1e3;
|
|
16136
16137
|
function loadYamlScript(content, filePath) {
|
|
16137
16138
|
const obj = js_yaml_default.load(content);
|
|
16138
16139
|
const pathTip = filePath ? `, failed to load ${filePath}` : "";
|
|
@@ -16424,7 +16425,7 @@ var ScriptPlayer = class {
|
|
|
16424
16425
|
yield page.setCookie(...JSON.parse(cookieFileContent));
|
|
16425
16426
|
}
|
|
16426
16427
|
yield page.goto(urlToVisit);
|
|
16427
|
-
const waitForNetworkIdleTimeout = typeof ((_c2 = target.waitForNetworkIdle) == null ? void 0 : _c2.timeout) === "number" ? target.waitForNetworkIdle.timeout :
|
|
16428
|
+
const waitForNetworkIdleTimeout = typeof ((_c2 = target.waitForNetworkIdle) == null ? void 0 : _c2.timeout) === "number" ? target.waitForNetworkIdle.timeout : defaultWaitForNetworkIdleTimeout;
|
|
16428
16429
|
try {
|
|
16429
16430
|
if (waitForNetworkIdleTimeout > 0) {
|
|
16430
16431
|
yield page.waitForNetworkIdle({
|
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.5
|
|
4
|
+
"version": "0.8.5",
|
|
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
|
"http-server": "14.1.1",
|
|
19
19
|
"puppeteer": "23.0.2",
|
|
20
|
-
"@midscene/core": "0.8.5
|
|
21
|
-
"@midscene/web": "0.8.5
|
|
20
|
+
"@midscene/core": "0.8.5",
|
|
21
|
+
"@midscene/web": "0.8.5"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@modern-js/module-tools": "2.60.6",
|