feat(runtime): upgrade DSH and bundled plugins with startup migration

This commit is contained in:
2026-10-18 02:14:27 +08:00
parent eb7e809999
commit 2e31e74972
18 changed files with 501 additions and 80 deletions
+7
View File
@@ -4,6 +4,13 @@ import { runInNewContext } from 'node:vm';
import { readFileSync } from 'node:fs';
import { patchSettings, target } from './install-host-settings.mjs';
test("next host settings API remains unchanged", () => {
const source = "this.ctx.remote.settings.describe(); this.ctx.remote.settings.mutate(namespace, ops, revision);";
assert.equal(patchSettings(source, "0.2.1-rc.2"), source);
assert.throws(() => patchSettings(target, "0.2.1-rc.2"), /native host settings/);
assert.throws(() => patchSettings("", "0.2.1-rc.2"), /native host settings/);
});
test('settings use host persistence on domains without changing loopback facts', () => {
for (const isLoopback of [false, true]) {
const ctx = { remote: { $host: { isLoopback } } };