Skip to content

Commit

Permalink
(NT-67) Switch to latest snapshot libnut provider package and use new…
Browse files Browse the repository at this point in the history
… interface
  • Loading branch information
s1hofmann committed Feb 11, 2024
1 parent 58c12fb commit 44d1f2f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
16 changes: 8 additions & 8 deletions lib/provider/provider-registry.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { MouseProviderInterface } from "./mouse-provider.interface";
import { ScreenProviderInterface } from "./screen-provider.interface";
import { WindowProviderInterface } from "./window-provider.interface";

import Mouse from "./native/libnut-mouse.class";
import Keyboard from "./native/libnut-keyboard.class";
import Screen from "./native/libnut-screen.class";
import Window from "./native/libnut-window.class";
import { ImageReader } from "./image-reader.type";
import { ImageWriter } from "./image-writer.type";
import { ImageProcessor } from "./image-processor.interface";
Expand Down Expand Up @@ -375,16 +371,20 @@ if (!process.env[DISABLE_DEFAULT_PROVIDERS_ENV_VAR]) {
providerRegistry.registerClipboardProvider(new Clipboard());
}
if (!process.env[DISABLE_DEFAULT_KEYBOARD_PROVIDER_ENV_VAR]) {
providerRegistry.registerKeyboardProvider(new Keyboard());
const { DefaultKeyboardAction } = require("@nut-tree/libnut");
providerRegistry.registerKeyboardProvider(new DefaultKeyboardAction());
}
if (!process.env[DISABLE_DEFAULT_MOUSE_PROVIDER_ENV_VAR]) {
providerRegistry.registerMouseProvider(new Mouse());
const { DefaultMouseAction } = require("@nut-tree/libnut");
providerRegistry.registerMouseProvider(new DefaultMouseAction());
}
if (!process.env[DISABLE_DEFAULT_SCREEN_PROVIDER_ENV_VAR]) {
providerRegistry.registerScreenProvider(new Screen());
const { DefaultScreenAction } = require("@nut-tree/libnut");
providerRegistry.registerScreenProvider(new DefaultScreenAction());
}
if (!process.env[DISABLE_DEFAULT_WINDOW_PROVIDER_ENV_VAR]) {
providerRegistry.registerWindowProvider(new Window());
const { DefaultWindowAction } = require("@nut-tree/libnut");
providerRegistry.registerWindowProvider(new DefaultWindowAction());
}
}

Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"@nut-tree/default-clipboard-provider": "1.0.0",
"@nut-tree/libnut": "2.6.0",
"@nut-tree/libnut": "^2.6.1-next.20240211200808",
"jimp": "0.22.10",
"node-abort-controller": "2.0.0"
},
Expand Down

0 comments on commit 44d1f2f

Please sign in to comment.