feat(runtime): upgrade DSH and bundled plugins with startup migration
This commit is contained in:
@@ -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 } } };
|
||||
|
||||
Reference in New Issue
Block a user