From 9e1cf659d2a2f25ffebbd2e68bc2331ac0c0d670 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Fri, 9 Dec 2022 13:10:48 +0000 Subject: [PATCH] Introduce the interface manager as a sub library. This will want splitting out for other matrix bots to use eventually. MatrixInterfaceCommand needs decoupling from Mjolnir and then it will be added too. --- src/commands/{ => interface-manager}/ApplicationCommand.ts | 0 src/commands/{ => interface-manager}/CommandReader.ts | 2 +- .../interface-manager}/MatrixRoomReference.ts | 0 src/commands/{ => interface-manager}/Validation.ts | 0 test/commands/CommandReaderTest.ts | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename src/commands/{ => interface-manager}/ApplicationCommand.ts (100%) rename src/commands/{ => interface-manager}/CommandReader.ts (99%) rename src/{models => commands/interface-manager}/MatrixRoomReference.ts (100%) rename src/commands/{ => interface-manager}/Validation.ts (100%) diff --git a/src/commands/ApplicationCommand.ts b/src/commands/interface-manager/ApplicationCommand.ts similarity index 100% rename from src/commands/ApplicationCommand.ts rename to src/commands/interface-manager/ApplicationCommand.ts diff --git a/src/commands/CommandReader.ts b/src/commands/interface-manager/CommandReader.ts similarity index 99% rename from src/commands/CommandReader.ts rename to src/commands/interface-manager/CommandReader.ts index 1a090fd2..e3c36285 100644 --- a/src/commands/CommandReader.ts +++ b/src/commands/interface-manager/CommandReader.ts @@ -4,7 +4,7 @@ */ import { UserID } from "matrix-bot-sdk"; -import { MatrixRoomReference } from "../models/MatrixRoomReference"; +import { MatrixRoomReference } from "./MatrixRoomReference"; /** * Helper for peeking and reading character by character. diff --git a/src/models/MatrixRoomReference.ts b/src/commands/interface-manager/MatrixRoomReference.ts similarity index 100% rename from src/models/MatrixRoomReference.ts rename to src/commands/interface-manager/MatrixRoomReference.ts diff --git a/src/commands/Validation.ts b/src/commands/interface-manager/Validation.ts similarity index 100% rename from src/commands/Validation.ts rename to src/commands/interface-manager/Validation.ts diff --git a/test/commands/CommandReaderTest.ts b/test/commands/CommandReaderTest.ts index 4570ec88..15133e29 100644 --- a/test/commands/CommandReaderTest.ts +++ b/test/commands/CommandReaderTest.ts @@ -1,6 +1,6 @@ import expect from "expect"; -import { Keyword, readCommand, ReadItem } from "../../src/commands/CommandReader"; -import { MatrixRoomReference } from "../../src/models/MatrixRoomReference"; +import { Keyword, readCommand, ReadItem } from "../../src/commands/interface-manager/CommandReader"; +import { MatrixRoomReference } from "../../src/commands/interface-manager/MatrixRoomReference"; describe("Can read", function() { it("Can read a simple command with only strings", function() {