From a0d420517c8d42d998213bc3b12892a15a9c17f0 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Fri, 20 Dec 2024 12:21:50 +0100 Subject: [PATCH] feat: some shit --- store/src/db/schema.ts | 2 +- store/src/routes/node/node.schema.ts | 2 +- store/src/routes/node/node.service.ts | 6 +++--- store/src/routes/node/worker/{types.ts => messages.ts} | 2 +- store/src/routes/node/worker/node.worker.ts | 4 ++-- store/src/routes/node/worker/utils.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename store/src/routes/node/worker/{types.ts => messages.ts} (84%) diff --git a/store/src/db/schema.ts b/store/src/db/schema.ts index d22ac0c..b1953cc 100644 --- a/store/src/db/schema.ts +++ b/store/src/db/schema.ts @@ -1,2 +1,2 @@ export * from "../routes/user/user.schema.ts"; -export * from "../routes/node/schemas/node.schema.ts"; +export * from "../routes/node/node.schema.ts"; diff --git a/store/src/routes/node/node.schema.ts b/store/src/routes/node/node.schema.ts index 83b4b6e..2e648c5 100644 --- a/store/src/routes/node/node.schema.ts +++ b/store/src/routes/node/node.schema.ts @@ -8,7 +8,7 @@ import { varchar, } from "drizzle-orm/pg-core"; import { relations } from "drizzle-orm/relations"; -import { usersTable } from "../../user/user.schema.ts"; +import { usersTable } from "../user/user.schema.ts"; const bytea = customType<{ data: ArrayBuffer; diff --git a/store/src/routes/node/node.service.ts b/store/src/routes/node/node.service.ts index eefdb0c..41987b2 100644 --- a/store/src/routes/node/node.service.ts +++ b/store/src/routes/node/node.service.ts @@ -1,9 +1,9 @@ import { db } from "../../db/db.ts"; -import { nodeTable } from "./schemas/node.schema.ts"; -import { NodeDefinition, NodeDefinitionSchema } from "./schemas/types.ts"; +import { nodeTable } from "./node.schema.ts"; +import { NodeDefinition, NodeDefinitionSchema } from "./validations/types.ts"; import { and, eq } from "drizzle-orm"; import { createHash } from "node:crypto"; -import { WorkerMessage } from "./worker/types.ts"; +import { WorkerMessage } from "./worker/messages.ts"; export type CreateNodeDTO = { id: string; diff --git a/store/src/routes/node/worker/types.ts b/store/src/routes/node/worker/messages.ts similarity index 84% rename from store/src/routes/node/worker/types.ts rename to store/src/routes/node/worker/messages.ts index 6c1f6f1..8042567 100644 --- a/store/src/routes/node/worker/types.ts +++ b/store/src/routes/node/worker/messages.ts @@ -1,4 +1,4 @@ -import { NodeDefinition } from "../schemas/types.ts"; +import { NodeDefinition } from "../validations/types.ts"; type ExtractDefinitionMessage = { action: "extract-definition"; diff --git a/store/src/routes/node/worker/node.worker.ts b/store/src/routes/node/worker/node.worker.ts index 3247983..e2277d1 100644 --- a/store/src/routes/node/worker/node.worker.ts +++ b/store/src/routes/node/worker/node.worker.ts @@ -1,7 +1,7 @@ /// -import { NodeDefinitionSchema } from "../schemas/types.ts"; -import { WorkerMessage } from "./types.ts"; +import { NodeDefinitionSchema } from "../validations/types.ts"; +import { WorkerMessage } from "./messages.ts"; import { createWasmWrapper } from "./utils.ts"; const workerSelf = self as DedicatedWorkerGlobalScope & { diff --git a/store/src/routes/node/worker/utils.ts b/store/src/routes/node/worker/utils.ts index 4ff334e..12131c3 100644 --- a/store/src/routes/node/worker/utils.ts +++ b/store/src/routes/node/worker/utils.ts @@ -1,5 +1,5 @@ // @ts-nocheck: Nocheck -import { NodeDefinition } from "../schemas/types.ts"; +import { NodeDefinition } from "../validations/types.ts"; const cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true,