Skip to content

Commit 77f7b1b

Browse files
committed
(#310) Migrated all exported instances to not use adapters
1 parent 2b09f70 commit 77f7b1b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

index.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import {NativeAdapter} from "./lib/adapter/native.adapter.class";
2-
import {VisionAdapter} from "./lib/adapter/vision.adapter.class";
31
import {AssertClass} from "./lib/assert.class";
42
import {ClipboardClass} from "./lib/clipboard.class";
53
import {KeyboardClass} from "./lib/keyboard.class";
@@ -37,18 +35,16 @@ export {Region} from "./lib/region.class";
3735
export {Window} from "./lib/window.class";
3836
export {FileType} from "./lib/file-type.enum";
3937

40-
const screenActions = new VisionAdapter(providerRegistry);
41-
const nativeActions = new NativeAdapter(providerRegistry);
4238
const lineHelper = new LineHelper();
4339

44-
const clipboard = new ClipboardClass(nativeActions);
45-
const keyboard = new KeyboardClass(nativeActions);
46-
const mouse = new MouseClass(nativeActions);
47-
const screen = new ScreenClass(screenActions);
40+
const clipboard = new ClipboardClass(providerRegistry);
41+
const keyboard = new KeyboardClass(providerRegistry);
42+
const mouse = new MouseClass(providerRegistry);
43+
const screen = new ScreenClass(providerRegistry);
4844
const assert = new AssertClass(screen);
4945

50-
const {straightTo, up, down, left, right} = createMovementApi(nativeActions, lineHelper);
51-
const {getWindows, getActiveWindow} = createWindowApi(nativeActions);
46+
const {straightTo, up, down, left, right} = createMovementApi(providerRegistry, lineHelper);
47+
const {getWindows, getActiveWindow} = createWindowApi(providerRegistry);
5248

5349
const loadImage = providerRegistry.getImageReader().load;
5450
const saveImage = providerRegistry.getImageWriter().store;

0 commit comments

Comments
 (0)