mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 00:01:17 +00:00
test: baseline bundled runtime sidecar paths
This commit is contained in:
35
scripts/generate-runtime-sidecar-paths-baseline.ts
Normal file
35
scripts/generate-runtime-sidecar-paths-baseline.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env node
|
||||
import path from "node:path";
|
||||
import { writeBundledRuntimeSidecarPathBaseline } from "../src/plugins/runtime-sidecar-paths-baseline.js";
|
||||
|
||||
const args = new Set(process.argv.slice(2));
|
||||
const checkOnly = args.has("--check");
|
||||
const writeMode = args.has("--write");
|
||||
|
||||
if (checkOnly === writeMode) {
|
||||
console.error("Use exactly one of --check or --write.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const repoRoot = process.cwd();
|
||||
const result = await writeBundledRuntimeSidecarPathBaseline({
|
||||
repoRoot,
|
||||
check: checkOnly,
|
||||
});
|
||||
|
||||
if (checkOnly) {
|
||||
if (result.changed) {
|
||||
console.error(
|
||||
[
|
||||
"Bundled runtime sidecar path baseline drift detected.",
|
||||
`Expected current: ${path.relative(repoRoot, result.jsonPath)}`,
|
||||
"If this bundled plugin runtime-sidecar change is intentional, run `pnpm runtime-sidecars:gen` and commit the updated baseline file.",
|
||||
"If not intentional, fix the bundled plugin metadata/public surface drift first.",
|
||||
].join("\n"),
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`OK ${path.relative(repoRoot, result.jsonPath)}`);
|
||||
} else {
|
||||
console.log(`Wrote ${path.relative(repoRoot, result.jsonPath)}`);
|
||||
}
|
||||
36
scripts/lib/bundled-runtime-sidecar-paths.json
Normal file
36
scripts/lib/bundled-runtime-sidecar-paths.json
Normal file
@@ -0,0 +1,36 @@
|
||||
[
|
||||
"dist/extensions/acpx/runtime-api.js",
|
||||
"dist/extensions/bluebubbles/runtime-api.js",
|
||||
"dist/extensions/browser/runtime-api.js",
|
||||
"dist/extensions/copilot-proxy/runtime-api.js",
|
||||
"dist/extensions/diffs/runtime-api.js",
|
||||
"dist/extensions/discord/runtime-api.js",
|
||||
"dist/extensions/feishu/runtime-api.js",
|
||||
"dist/extensions/google/runtime-api.js",
|
||||
"dist/extensions/googlechat/runtime-api.js",
|
||||
"dist/extensions/imessage/runtime-api.js",
|
||||
"dist/extensions/line/runtime-api.js",
|
||||
"dist/extensions/lobster/runtime-api.js",
|
||||
"dist/extensions/matrix/helper-api.js",
|
||||
"dist/extensions/matrix/runtime-api.js",
|
||||
"dist/extensions/matrix/thread-bindings-runtime.js",
|
||||
"dist/extensions/mattermost/runtime-api.js",
|
||||
"dist/extensions/memory-core/runtime-api.js",
|
||||
"dist/extensions/msteams/runtime-api.js",
|
||||
"dist/extensions/nextcloud-talk/runtime-api.js",
|
||||
"dist/extensions/nostr/runtime-api.js",
|
||||
"dist/extensions/ollama/runtime-api.js",
|
||||
"dist/extensions/open-prose/runtime-api.js",
|
||||
"dist/extensions/qqbot/runtime-api.js",
|
||||
"dist/extensions/signal/runtime-api.js",
|
||||
"dist/extensions/slack/runtime-api.js",
|
||||
"dist/extensions/telegram/runtime-api.js",
|
||||
"dist/extensions/tlon/runtime-api.js",
|
||||
"dist/extensions/twitch/runtime-api.js",
|
||||
"dist/extensions/voice-call/runtime-api.js",
|
||||
"dist/extensions/whatsapp/light-runtime-api.js",
|
||||
"dist/extensions/whatsapp/runtime-api.js",
|
||||
"dist/extensions/zai/runtime-api.js",
|
||||
"dist/extensions/zalo/runtime-api.js",
|
||||
"dist/extensions/zalouser/runtime-api.js"
|
||||
]
|
||||
@@ -5,7 +5,7 @@ import { existsSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/public-artifacts.ts";
|
||||
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-paths.ts";
|
||||
import { parseReleaseVersion, resolveNpmCommandInvocation } from "./openclaw-npm-release-check.ts";
|
||||
|
||||
type InstalledPackageJson = {
|
||||
|
||||
Reference in New Issue
Block a user