From ea764f637e2b5a9bc4b3481009af7d035f7aed5b Mon Sep 17 00:00:00 2001 From: nav Date: Thu, 16 Apr 2026 10:37:01 +0000 Subject: [PATCH] refactor: replace Yonexus.Client dependency with Protocol crypto Server no longer needs Yonexus.Client at build or runtime. verifySignature, generateKeyPair, signMessage now imported from Protocol. --- plugin/core/runtime.ts | 2 +- protocol | 2 +- tests/auth-failures.test.ts | 2 +- tests/runtime-flow.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/core/runtime.ts b/plugin/core/runtime.ts index 8f0bd58..03aa2ca 100644 --- a/plugin/core/runtime.ts +++ b/plugin/core/runtime.ts @@ -38,7 +38,7 @@ import { type ClientRecord, type ServerRegistry } from "./persistence.js"; -import { verifySignature } from "../../../Yonexus.Client/plugin/crypto/keypair.js"; +import { verifySignature } from "../../../Yonexus.Protocol/src/crypto.js"; import type { YonexusServerStore } from "./store.js"; import { type ClientConnection, type ServerTransport } from "./transport.js"; import { createPairingService, type PairingService } from "../services/pairing.js"; diff --git a/protocol b/protocol index 2611304..ccdf167 160000 --- a/protocol +++ b/protocol @@ -1 +1 @@ -Subproject commit 26113040844cc6804e6a2b617d0c9ce1cbdb92df +Subproject commit ccdf167daf3da8504e9855f1866b58ef1d952822 diff --git a/tests/auth-failures.test.ts b/tests/auth-failures.test.ts index 85d72f5..e91ec6a 100644 --- a/tests/auth-failures.test.ts +++ b/tests/auth-failures.test.ts @@ -10,7 +10,7 @@ import { createYonexusServerRuntime } from "../plugin/core/runtime.js"; import type { ClientRecord } from "../plugin/core/persistence.js"; import type { YonexusServerStore } from "../plugin/core/store.js"; import type { ClientConnection, ServerTransport } from "../plugin/core/transport.js"; -import { generateKeyPair, signMessage } from "../../Yonexus.Client/plugin/crypto/keypair.js"; +import { generateKeyPair, signMessage } from "../../Yonexus.Protocol/src/crypto.js"; function createMockSocket() { return { close: vi.fn() } as unknown as ClientConnection["ws"]; diff --git a/tests/runtime-flow.test.ts b/tests/runtime-flow.test.ts index 778177b..2efb69f 100644 --- a/tests/runtime-flow.test.ts +++ b/tests/runtime-flow.test.ts @@ -17,7 +17,7 @@ import { createYonexusServerRuntime } from "../plugin/core/runtime.js"; import type { ClientRecord } from "../plugin/core/persistence.js"; import type { YonexusServerStore } from "../plugin/core/store.js"; import type { ClientConnection, ServerTransport } from "../plugin/core/transport.js"; -import { generateKeyPair, signMessage, verifySignature } from "../../Yonexus.Client/plugin/crypto/keypair.js"; +import { generateKeyPair, signMessage, verifySignature } from "../../Yonexus.Protocol/src/crypto.js"; function createMockSocket() { return {