-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat-settings-window
- Loading branch information
Showing
69 changed files
with
383 additions
and
356 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "ueli", | ||
"description": "Cross-Platform Keystroke Launcher", | ||
"version": "9.11.1", | ||
"version": "9.12.0", | ||
"license": "MIT", | ||
"author": { | ||
"email": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/Core/UeliCommand/UeliCommandActionHandler.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { SearchResultItemAction } from "@common/Core"; | ||
import { describe, expect, it, vi } from "vitest"; | ||
import type { UeliCommandInvoker } from "./Contract"; | ||
import { UeliCommandActionHandler } from "./UeliCommandActionHandler"; | ||
|
||
describe(UeliCommandActionHandler, () => { | ||
it("should invoke an ueli command", async () => { | ||
const invokeUeliCommandMock = vi.fn(); | ||
const ueliCommandInvoker = <UeliCommandInvoker>{ invokeUeliCommand: (u) => invokeUeliCommandMock(u) }; | ||
const ueliCommandActionHandler = new UeliCommandActionHandler(ueliCommandInvoker); | ||
|
||
await ueliCommandActionHandler.invokeAction(<SearchResultItemAction>{ argument: "test ueli command" }); | ||
|
||
expect(invokeUeliCommandMock).toHaveBeenCalledWith("test ueli command"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { SearchResultItemAction } from "@common/Core"; | ||
import type { ActionHandler } from "@Core/ActionHandler"; | ||
import type { UeliCommand, UeliCommandInvoker } from "./Contract"; | ||
|
||
export class UeliCommandActionHandler implements ActionHandler { | ||
public readonly id = "UeliCommand"; | ||
|
||
public constructor(private readonly ueliCommandInvoker: UeliCommandInvoker) {} | ||
|
||
public async invokeAction(action: SearchResultItemAction): Promise<void> { | ||
await this.ueliCommandInvoker.invokeUeliCommand(action.argument as UeliCommand); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import type { Dependencies } from "@Core/Dependencies"; | ||
import type { DependencyRegistry } from "@Core/DependencyRegistry"; | ||
import { UeliCommandActionHandler } from "./UeliCommandActionHandler"; | ||
import { UeliCommandInvoker } from "./UeliCommandInvoker"; | ||
|
||
export class UeliCommandModule { | ||
public static bootstrap(dependencyRegistry: DependencyRegistry<Dependencies>) { | ||
const app = dependencyRegistry.get("App"); | ||
const eventEmitter = dependencyRegistry.get("EventEmitter"); | ||
const actionHandlerRegistry = dependencyRegistry.get("ActionHandlerRegistry"); | ||
const settingsManager = dependencyRegistry.get("SettingsManager"); | ||
|
||
dependencyRegistry.register("UeliCommandInvoker", new UeliCommandInvoker(app, eventEmitter)); | ||
const ueliCommandInvoker = new UeliCommandInvoker(app, eventEmitter, settingsManager); | ||
|
||
dependencyRegistry.register("UeliCommandInvoker", ueliCommandInvoker); | ||
|
||
actionHandlerRegistry.register(new UeliCommandActionHandler(ueliCommandInvoker)); | ||
} | ||
} |
57 changes: 0 additions & 57 deletions
57
src/main/Extensions/UeliCommand/UeliCommandActionHandler.test.ts
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/main/Extensions/UeliCommand/UeliCommandActionHandler.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.