From 9e8b9aba1fc3f482e4fe12bb236ce42690597efd Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Wed, 18 Mar 2026 02:20:57 +0000 Subject: [PATCH] WhatsApp: isolate lazy action runtime boundary --- extensions/whatsapp/action-runtime.runtime.ts | 1 + src/plugins/runtime/runtime-whatsapp.ts | 4 ++-- src/plugins/runtime/types-channel.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 extensions/whatsapp/action-runtime.runtime.ts diff --git a/extensions/whatsapp/action-runtime.runtime.ts b/extensions/whatsapp/action-runtime.runtime.ts new file mode 100644 index 00000000000..aeb44fc866b --- /dev/null +++ b/extensions/whatsapp/action-runtime.runtime.ts @@ -0,0 +1 @@ +export { handleWhatsAppAction } from "./src/action-runtime.js"; diff --git a/src/plugins/runtime/runtime-whatsapp.ts b/src/plugins/runtime/runtime-whatsapp.ts index 72bb3fd6af0..ba653942550 100644 --- a/src/plugins/runtime/runtime-whatsapp.ts +++ b/src/plugins/runtime/runtime-whatsapp.ts @@ -68,7 +68,7 @@ let webLoginQrPromise: Promise< > | null = null; let webChannelPromise: Promise | null = null; let whatsappActionsPromise: Promise< - typeof import("../../../extensions/whatsapp/runtime-api.js") + typeof import("../../../extensions/whatsapp/action-runtime.runtime.js") > | null = null; function loadWebLoginQr() { @@ -82,7 +82,7 @@ function loadWebChannel() { } function loadWhatsAppActions() { - whatsappActionsPromise ??= import("../../../extensions/whatsapp/runtime-api.js"); + whatsappActionsPromise ??= import("../../../extensions/whatsapp/action-runtime.runtime.js"); return whatsappActionsPromise; } diff --git a/src/plugins/runtime/types-channel.ts b/src/plugins/runtime/types-channel.ts index 6b0a0e3a8f6..f13dd010c0e 100644 --- a/src/plugins/runtime/types-channel.ts +++ b/src/plugins/runtime/types-channel.ts @@ -217,7 +217,7 @@ export type PluginRuntimeChannel = { startWebLoginWithQr: typeof import("../../../extensions/whatsapp/login-qr-api.js").startWebLoginWithQr; waitForWebLogin: typeof import("../../../extensions/whatsapp/login-qr-api.js").waitForWebLogin; monitorWebChannel: typeof import("../../channels/web/index.js").monitorWebChannel; - handleWhatsAppAction: typeof import("../../../extensions/whatsapp/runtime-api.js").handleWhatsAppAction; + handleWhatsAppAction: typeof import("../../../extensions/whatsapp/action-runtime.runtime.js").handleWhatsAppAction; createLoginTool: typeof import("./runtime-whatsapp-login-tool.js").createRuntimeWhatsAppLoginTool; }; line: {