build: fix ineffective dynamic imports with lazy boundaries (#33690)
Merged via squash. Prepared head SHA: 38b3c23d6f8f2b4c8a36a88ee65b508102f1ec36 Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
a4850b1b8f
commit
21e8d88c1d
1
src/plugins/runtime/runtime-whatsapp-login.runtime.ts
Normal file
1
src/plugins/runtime/runtime-whatsapp-login.runtime.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { loginWeb } from "../../web/login.js";
|
||||
1
src/plugins/runtime/runtime-whatsapp-outbound.runtime.ts
Normal file
1
src/plugins/runtime/runtime-whatsapp-outbound.runtime.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { sendMessageWhatsApp, sendPollWhatsApp } from "../../web/outbound.js";
|
||||
@@ -55,21 +55,22 @@ const handleWhatsAppActionLazy: PluginRuntime["channel"]["whatsapp"]["handleWhat
|
||||
return handleWhatsAppAction(...args);
|
||||
};
|
||||
|
||||
let webOutboundPromise: Promise<typeof import("../../web/outbound.js")> | null = null;
|
||||
let webLoginPromise: Promise<typeof import("../../web/login.js")> | null = null;
|
||||
let webLoginQrPromise: Promise<typeof import("../../web/login-qr.js")> | null = null;
|
||||
let webChannelPromise: Promise<typeof import("../../channels/web/index.js")> | null = null;
|
||||
let webOutboundPromise: Promise<typeof import("./runtime-whatsapp-outbound.runtime.js")> | null =
|
||||
null;
|
||||
let webLoginPromise: Promise<typeof import("./runtime-whatsapp-login.runtime.js")> | null = null;
|
||||
let whatsappActionsPromise: Promise<
|
||||
typeof import("../../agents/tools/whatsapp-actions.js")
|
||||
> | null = null;
|
||||
|
||||
function loadWebOutbound() {
|
||||
webOutboundPromise ??= import("../../web/outbound.js");
|
||||
webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime.js");
|
||||
return webOutboundPromise;
|
||||
}
|
||||
|
||||
function loadWebLogin() {
|
||||
webLoginPromise ??= import("../../web/login.js");
|
||||
webLoginPromise ??= import("./runtime-whatsapp-login.runtime.js");
|
||||
return webLoginPromise;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user