From 34bc5d9bb392001e3df321df93e5b1adb55fff8c Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 20 Feb 2021 18:40:22 +0100 Subject: [PATCH] Fixed git modules --- .gitmodules | 3 +++ vendor/TeaClientServices | 1 + vendor/TeaClientServices/src/Action.ts | 34 -------------------------- vendor/TeaEventBus | 2 +- 4 files changed, 5 insertions(+), 35 deletions(-) create mode 160000 vendor/TeaClientServices delete mode 100644 vendor/TeaClientServices/src/Action.ts diff --git a/.gitmodules b/.gitmodules index 43996094..e7103948 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "vendor/TeaEventBus"] path = vendor/TeaEventBus url = https://github.com/WolverinDEV/TeaEventBus.git +[submodule "vendor\\TeaClientServices"] + path = vendor\\TeaClientServices + url = https://github.com/WolverinDEV/TeaClientServices.git diff --git a/vendor/TeaClientServices b/vendor/TeaClientServices new file mode 160000 index 00000000..f9267daa --- /dev/null +++ b/vendor/TeaClientServices @@ -0,0 +1 @@ +Subproject commit f9267daa208f7f97a7bc56d52b89dac7cc0004e7 diff --git a/vendor/TeaClientServices/src/Action.ts b/vendor/TeaClientServices/src/Action.ts deleted file mode 100644 index 6374a906..00000000 --- a/vendor/TeaClientServices/src/Action.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {MessageCommandErrorResult} from "./Messages"; -import {clientServiceLogger} from "./Logging"; - -export type ActionResult = { - unwrap() : T; -} & ({ - status: "success", - result: T -} | { - status: "error", - result: MessageCommandErrorResult -}); - - -export function createErrorResult(result: MessageCommandErrorResult) : ActionResult { - return { - status: "error", - result: result, - unwrap(): T { - clientServiceLogger.logError("Tried to unwrap an action which failed: %o", result); - throw "action failed with " + result.type; - } - } -} - -export function createResult(result: T) : ActionResult { - return { - status: "success", - result: result, - unwrap(): T { - return result; - } - } -} \ No newline at end of file diff --git a/vendor/TeaEventBus b/vendor/TeaEventBus index 9caad339..8310382d 160000 --- a/vendor/TeaEventBus +++ b/vendor/TeaEventBus @@ -1 +1 @@ -Subproject commit 9caad3399af830606e25e66f51ee40239bc3b457 +Subproject commit 8310382d8a851b2e7095b400807141065811da53