mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 10:30:44 +00:00
refactor(plugin-sdk): split infra runtime barrel
This commit is contained in:
@@ -21,7 +21,7 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
describe("plugin loader git path regression", () => {
|
||||
it("loads git-style package extension entries when they import plugin-sdk infra-runtime (#49806)", async () => {
|
||||
it("loads git-style package extension entries when they import plugin-sdk subpaths (#49806)", async () => {
|
||||
const copiedExtensionRoot = path.join(makeTempDir(), "extensions", "imessage");
|
||||
const copiedSourceDir = path.join(copiedExtensionRoot, "src");
|
||||
const copiedPluginSdkDir = path.join(copiedExtensionRoot, "plugin-sdk");
|
||||
@@ -31,7 +31,7 @@ describe("plugin loader git path regression", () => {
|
||||
fs.writeFileSync(jitiBaseFile, "export {};\n", "utf-8");
|
||||
fs.writeFileSync(
|
||||
path.join(copiedSourceDir, "channel.runtime.ts"),
|
||||
`import { resolveOutboundSendDep } from "openclaw/plugin-sdk/infra-runtime";
|
||||
`import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { PAIRING_APPROVED_MESSAGE } from "../runtime-api.js";
|
||||
|
||||
export const copiedRuntimeMarker = {
|
||||
@@ -47,7 +47,7 @@ export const copiedRuntimeMarker = {
|
||||
`,
|
||||
"utf-8",
|
||||
);
|
||||
const copiedChannelRuntimeShim = path.join(copiedPluginSdkDir, "infra-runtime.ts");
|
||||
const copiedChannelRuntimeShim = path.join(copiedPluginSdkDir, "outbound-send-deps.ts");
|
||||
fs.writeFileSync(
|
||||
copiedChannelRuntimeShim,
|
||||
`export function resolveOutboundSendDep() {
|
||||
@@ -75,7 +75,7 @@ export const copiedRuntimeMarker = {
|
||||
tryNative: false,
|
||||
extensions: [".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".js", ".mjs", ".cjs", ".json"],
|
||||
alias: {
|
||||
"openclaw/plugin-sdk/infra-runtime": ${JSON.stringify(copiedChannelRuntimeShim)},
|
||||
"openclaw/plugin-sdk/outbound-send-deps": ${JSON.stringify(copiedChannelRuntimeShim)},
|
||||
},
|
||||
});
|
||||
const mod = withAlias(${JSON.stringify(copiedChannelRuntime)});
|
||||
|
||||
Reference in New Issue
Block a user