CLI: skip runner rebuilds when dist is fresh (#1231)
Co-authored-by: mukhtharcm <mukhtharcm@users.noreply.github.com>
This commit is contained in:
@@ -102,8 +102,10 @@ const normalizePluginsConfig = (config?: ClawdbotConfig["plugins"]): NormalizedP
|
||||
|
||||
const resolvePluginSdkAlias = (): string | null => {
|
||||
try {
|
||||
const preferDist = process.env.VITEST || process.env.NODE_ENV === "test";
|
||||
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
||||
const modulePath = fileURLToPath(import.meta.url);
|
||||
const isDistRuntime = modulePath.split(path.sep).includes("dist");
|
||||
const preferDist = process.env.VITEST || process.env.NODE_ENV === "test" || isDistRuntime;
|
||||
let cursor = path.dirname(modulePath);
|
||||
for (let i = 0; i < 6; i += 1) {
|
||||
const srcCandidate = path.join(cursor, "src", "plugin-sdk", "index.ts");
|
||||
const distCandidate = path.join(cursor, "dist", "plugin-sdk", "index.js");
|
||||
|
||||
Reference in New Issue
Block a user