推进 INI 面板浏览器 control-page contract 暴露

This commit is contained in:
2026-06-15 06:03:44 +08:00
parent 41caecf116
commit 37b79c1d1a
5 changed files with 104 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const root = resolve(__dirname, "../../..");
const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8");
const shellText = readFileSync(resolve(root, "runtime/ui/ini-panel/ui-shell.js"), "utf8");
const controlPageText = readFileSync(resolve(root, "runtime/ui/ini-panel/control-page.js"), "utf8");
const refreshWorkflowText = readFileSync(
resolve(root, "runtime/ui/ini-panel/control-page-refresh-workflow.js"),
"utf8",
@@ -119,6 +120,9 @@ assert.deepEqual(
assert.equal(createIniPanelShellViewModel().controlPage.readStatus, readMachineSessionReadonlyStatus);
assert.equal(createIniPanelShellViewModel().controlPage.refresh, refreshMachineSessionControlPage);
assert.equal(typeof createIniPanelShellViewModel().controlPage.renderView, "function");
assert.match(controlPageText, /\bgetControlPageContract\b/);
assert.match(controlPageText, /\bcreateIniPanelShellControlPageContract\b/);
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageContract\b/);
for (const entry of INI_PANEL_ENTRIES) {
const escapedHref = entry.href.replace(".", "\\.");