From 16a0ff4d25cabfbbec3e989125cb8efc48f801d1 Mon Sep 17 00:00:00 2001 From: Rinse Date: Sun, 5 Jul 2026 07:06:13 +0000 Subject: [PATCH] perf: import pkc-js via the slim ./client entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BaseCommand._connectToPkcRpc() is RPC-only (it always passes pkcRpcClientsOptions), so it can use @pkcprotocol/pkc-js/client — a slim export that defers the local-node/signer/kubo/undici graphs behind lazy imports. On a slow host this cuts the pkc-js import from ~1.97s to ~1.22s. Blocked on @pkcprotocol/pkc-js releasing the ./client export (pkcprotocol/pkc-js#178 / #179); bump the pkc-js dependency to that release before merging. --- src/cli/base-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/base-command.ts b/src/cli/base-command.ts index 3a0c6e7..f8d2eb3 100644 --- a/src/cli/base-command.ts +++ b/src/cli/base-command.ts @@ -1,6 +1,6 @@ import { Command, Flags } from "@oclif/core"; import defaults from "../common-utils/defaults.js"; -import PKC from "@pkcprotocol/pkc-js"; +import PKC from "@pkcprotocol/pkc-js/client"; import { PKCLogger, setupDebugLogger, type PKCLoggerType } from "../util.js"; type PKCInstance = Awaited>; type PKCConnectOverride = (pkcRpcUrl: string) => Promise;