diff --git a/.gitignore b/.gitignore index be23f1a..35e3ffe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ examples/.deno_plugins examples/.autopilot_plugins screenshot.png myscripts/ +*.log diff --git a/README.md b/README.md index 4d3e3e1..37a413b 100644 --- a/README.md +++ b/README.md @@ -73,25 +73,25 @@ deno run --unstable -A file.ts **NOTE**: Prebuilt binaries are automatically downloaded the first time you import Autopilot in your project and are cached. ```typescript -import AutoPilot from 'https://deno.land/x/autopilot/mod.ts'; +import AutoPilot from 'https://deno.land/x/autopilot@0.2.1/mod.ts'; // create a new AutoPilot instance. var pilot = new AutoPilot(); // type a string -pilot.type("Yay! This works"); +await pilot.type("Yay! This works"); // alert something -pilot.alert("This is a alert"); +await pilot.alert("This is a alert"); // get screen size -pilot.screenSize(); +await pilot.screenSize(); // move mouse -pilot.moveMouse(200, 400); +await pilot.moveMouse(200, 400); // take a full-screen screenshot -pilot.screenshot("screenshot.png"); +await pilot.screenshot("screenshot.png"); ``` ### Env variables diff --git a/autopilot_deno/autopilot.ts b/autopilot_deno/autopilot.ts index bb1849f..1e374df 100644 --- a/autopilot_deno/autopilot.ts +++ b/autopilot_deno/autopilot.ts @@ -1,38 +1,35 @@ // Copyright 2020-present Divy Srivastava and friends. All rights reserved. MIT license. import { - runType, runAlert, - runScreenSize, - runMoveMouse, - runScreenShot, - runMouseClick, + runGetMonitors, + runGetWindow, runKeyTap, - runMouseScroll, + runMouseClick, runMousePosition, + runMouseScroll, + runMoveMouse, + runNotify, runPixelColor, - runToggleKey, runPointVisible, runScreenScale, - runGetWindow, + runScreenShot, + runScreenSize, + runToggleKey, runTransformByIndex, - runGetMonitors, - runNotify, + runType, } from "../autopilot_plugin/index.ts"; // Import types import { AlertOptions, ClickOptions, + NotificationParams, ScrollOptions, ToggleKeys, - NotificationParams, } from "./types.ts"; -import { - isAscii, - throwAsciiError, -} from "./utils/isAscii.ts"; +import { isAscii, throwAsciiError } from "./utils/isAscii.ts"; import { logger } from "../deps.ts"; diff --git a/autopilot_plugin/index.ts b/autopilot_plugin/index.ts index e5efba0..36f81b3 100644 --- a/autopilot_plugin/index.ts +++ b/autopilot_plugin/index.ts @@ -1,6 +1,6 @@ // Copyright 2020-present Divy Srivastava and friends. All rights reserved. MIT license. -import { prepare, logger } from "../deps.ts"; +import { logger, prepare } from "../deps.ts"; import parseMonitorsMac from "../autopilot_deno/utils/SP_displays_data_type_parser.ts"; import parseMonitorsWin from "../autopilot_deno/utils/wmic_data_parser.ts"; import { getMonitors as getMonitorsFallback } from "../autopilot_deno/monitors.ts"; diff --git a/benchmarks/collect.ts b/benchmarks/collect.ts index 9e16a47..35fdb67 100644 --- a/benchmarks/collect.ts +++ b/benchmarks/collect.ts @@ -1,10 +1,10 @@ // Copyright 2020-present Divy Srivastava and friends. All rights reserved. MIT license. import { - prettyBenchmarkResult, + bench, prettyBenchmarkProgress, + prettyBenchmarkResult, runBenchmarks, - bench, } from "./deps.ts"; import write from "./write.ts"; diff --git a/benchmarks/deps.ts b/benchmarks/deps.ts index 37d88b2..9059a3e 100644 --- a/benchmarks/deps.ts +++ b/benchmarks/deps.ts @@ -1,10 +1,10 @@ // Benchmark exports export { - runBenchmarks, bench, + runBenchmarks, } from "https://deno.land/std@0.56.0/testing/bench.ts"; export { - prettyBenchmarkResult, prettyBenchmarkProgress, + prettyBenchmarkResult, } from "https://deno.land/x/pretty_benching/mod.ts"; diff --git a/deps.ts b/deps.ts index 81d187f..004e567 100644 --- a/deps.ts +++ b/deps.ts @@ -1,6 +1,6 @@ // Copyright 2020-present Divy Srivastava and friends. All rights reserved. MIT license. -import { Houston, ConsoleTransport } from "https://deno.land/x/houston/mod.ts"; +import { ConsoleTransport, Houston } from "https://deno.land/x/houston/mod.ts"; export const logger = new Houston([new ConsoleTransport()]); export { prepare } from "https://deno.land/x/plugin_prepare@v0.8.0/mod.ts"; diff --git a/egg.yml b/egg.yml index eb47349..8e1299e 100644 --- a/egg.yml +++ b/egg.yml @@ -8,7 +8,8 @@ files: - ./LICENSE - ./mod.ts - ./deps.ts - - ./types.ts + - ./plugin_config.ts + - ./examples/**/* - ./version.ts - ./autopilot_plugin/**/* - ./autopilot_deno/**/* diff --git a/examples/notify.ts b/examples/notify.ts index 38475a2..160eace 100644 --- a/examples/notify.ts +++ b/examples/notify.ts @@ -3,4 +3,4 @@ import AutoPilot from "../mod.ts"; const pilot = new AutoPilot(); -await pilot.notify("Hello", "World!"); \ No newline at end of file +await pilot.notify("Hello", "World!");