@midscene/cli 0.15.0 → 0.15.1
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 +12 -5
- package/dist/es/index.js.map +1 -1
- package/dist/lib/index.js +12 -5
- package/dist/lib/index.js.map +1 -1
- package/package.json +4 -4
package/dist/lib/index.js
CHANGED
|
@@ -13950,7 +13950,7 @@ Usage: $0 [options] <path-to-yaml-script-file-or-directory>`
|
|
|
13950
13950
|
default: false,
|
|
13951
13951
|
description: "Keep the browser window open after the script finishes. This is useful when debugging, but will consume more resources"
|
|
13952
13952
|
}
|
|
13953
|
-
}).version("version", "Show version number", "0.15.
|
|
13953
|
+
}).version("version", "Show version number", "0.15.1").help().wrap(yargs_default().terminalWidth());
|
|
13954
13954
|
const argv = await args.argv;
|
|
13955
13955
|
return {
|
|
13956
13956
|
path: argv._[0],
|
|
@@ -14769,14 +14769,21 @@ Promise.resolve(
|
|
|
14769
14769
|
console.error(`no yaml files found in ${path2}`);
|
|
14770
14770
|
process.exit(1);
|
|
14771
14771
|
}
|
|
14772
|
+
const keepWindow = options["keep-window"] || false;
|
|
14772
14773
|
const success = await playYamlFiles(files, {
|
|
14773
14774
|
headed: !!options.headed,
|
|
14774
|
-
keepWindow
|
|
14775
|
+
keepWindow
|
|
14775
14776
|
});
|
|
14776
|
-
if (
|
|
14777
|
-
|
|
14777
|
+
if (keepWindow) {
|
|
14778
|
+
setInterval(() => {
|
|
14779
|
+
console.log("browser is still running, use ctrl+c to stop it");
|
|
14780
|
+
}, 5e3);
|
|
14781
|
+
} else {
|
|
14782
|
+
if (!success) {
|
|
14783
|
+
process.exit(1);
|
|
14784
|
+
}
|
|
14785
|
+
process.exit(0);
|
|
14778
14786
|
}
|
|
14779
|
-
process.exit(0);
|
|
14780
14787
|
})().catch((e) => {
|
|
14781
14788
|
console.error(e);
|
|
14782
14789
|
process.exit(1);
|