Support the migrated plugins in the host tests

- The pty_open mocks in layout/workbench and plugins/lifecycle send
  output through the channel that api.pty passes. Without a channel they
  keep the old events, so released Terminal versions still pass.
- plugins/gitToolbar resolves the Git plugin's "@runestone/plugin-sdk"
  imports to this repository's SDK build. The smoke runner builds the
  SDK when it is missing.
- The menu audit no longer compares the Terminal plugin's copies of the
  host menu files. The plugin now uses host menus through the SDK.

Checked with the released plugins and with the migrated Terminal, Git,
and Project Management branches.
This commit is contained in:
Knotty Wyvern
2026-10-28 03:11:07 -07:00
parent d62ee5d0b7
commit 4d09da30d9
6 changed files with 33 additions and 17 deletions
-7
View File
@@ -45,13 +45,6 @@ export async function checkInventory() {
else if (!entry.design || !entry.check) failures.push(`Missing design or check: ${file}`);
}
for (const file of Object.keys(inventory.surfaces)) if (!(file in surfaces)) failures.push(`Stale inventory: ${file}`);
for (const name of ['actionMenu.ts', 'managedActionMenu.ts', 'IconButton.svelte']) {
try {
const host = await readFile(path.join(root, 'src/lib/ui', name), 'utf8');
const terminal = await readFile(path.resolve(pluginRepos, 'RuneStone_Terminal/vendor/runestone/ui', name), 'utf8');
if (host.replaceAll('\r\n', '\n') !== terminal.replaceAll('\r\n', '\n')) failures.push(`Terminal shared snapshot differs: ${name}`);
} catch (error) { failures.push(`Cannot check Terminal snapshot ${name}: ${error.code}`); }
}
if (failures.length) { console.error(failures.join('\n')); return false; }
console.log(`PASS: ${Object.keys(surfaces).length} source files across ${projects.length} projects match the reviewed menu inventory. Runtime checks remain separate.`);
return true;
+7
View File
@@ -181,6 +181,13 @@ if (list) {
}
findChrome();
// Tests that load plugin source resolve "@runestone/plugin-sdk" to this build.
if (!existsSync(path.join(root, "packages", "plugin-sdk", "dist", "index.js"))) {
console.log("Building the plugin SDK...");
const build = spawn(process.execPath, [path.join(root, "scripts", "buildSdk.mjs")], { cwd: root, stdio: "inherit", windowsHide: true });
const code = await new Promise(resolve => build.on("close", resolve));
if (code !== 0) throw new Error("The plugin SDK build failed. Run pnpm sdk:build.");
}
await mkdir(logRoot, { recursive: true });
let server;
if (!(await reachable(env.SMOKE_URL))) {