@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 CHANGED
@@ -13955,7 +13955,7 @@ Usage: $0 [options] <path-to-yaml-script-file-or-directory>`
13955
13955
  default: false,
13956
13956
  description: "Keep the browser window open after the script finishes. This is useful when debugging, but will consume more resources"
13957
13957
  }
13958
- }).version("version", "Show version number", "0.15.0").help().wrap(yargs_default().terminalWidth());
13958
+ }).version("version", "Show version number", "0.15.1").help().wrap(yargs_default().terminalWidth());
13959
13959
  const argv = await args.argv;
13960
13960
  return {
13961
13961
  path: argv._[0],
@@ -14774,14 +14774,21 @@ Promise.resolve(
14774
14774
  console.error(`no yaml files found in ${path2}`);
14775
14775
  process.exit(1);
14776
14776
  }
14777
+ const keepWindow = options["keep-window"] || false;
14777
14778
  const success = await playYamlFiles(files, {
14778
14779
  headed: !!options.headed,
14779
- keepWindow: !!options["keep-window"]
14780
+ keepWindow
14780
14781
  });
14781
- if (!success) {
14782
- process.exit(1);
14782
+ if (keepWindow) {
14783
+ setInterval(() => {
14784
+ console.log("browser is still running, use ctrl+c to stop it");
14785
+ }, 5e3);
14786
+ } else {
14787
+ if (!success) {
14788
+ process.exit(1);
14789
+ }
14790
+ process.exit(0);
14783
14791
  }
14784
- process.exit(0);
14785
14792
  })().catch((e) => {
14786
14793
  console.error(e);
14787
14794
  process.exit(1);