feat(v0.5.0): secure project previews and fix host UI compatibility
This commit is contained in:
@@ -90,7 +90,7 @@ function runChild(envHome, name, withOfficial = false) {
|
||||
"import { homedir } from 'node:os'",
|
||||
"const mod = await import(pathToFileURL(process.argv[1]).href)",
|
||||
"const routes = []",
|
||||
"const fakeCtx = { webServer: { register: (r) => { routes.push(r) } }, effect: () => {}, logger: { warn() {}, info() {} } }",
|
||||
"const fakeCtx = { webServer: { register: (r) => { routes.push(r) } }, get: () => ({ admit: () => ({ peer: { principal: { kind: 'owner' } } }) }), effect: (fn) => fn(), logger: { warn() {}, info() {} } }",
|
||||
"mod.apply(fakeCtx)",
|
||||
"const route = routes.find((r) => r.path === '/api/worktable/workspaces')",
|
||||
"let status = 0; let body = ''",
|
||||
@@ -162,7 +162,7 @@ function runChild(envHome, name, withOfficial = false) {
|
||||
"import { pathToFileURL } from 'node:url'",
|
||||
"const mod = await import(pathToFileURL(process.argv[1]).href)",
|
||||
"const routes = []",
|
||||
"const fakeCtx = { webServer: { register: (r) => { routes.push(r) } }, effect: () => {}, logger: { warn() {}, info() {} } }",
|
||||
"const fakeCtx = { webServer: { register: (r) => { routes.push(r) } }, get: () => ({ admit: () => ({ peer: { principal: { kind: 'owner' } } }) }), effect: (fn) => fn(), logger: { warn() {}, info() {} } }",
|
||||
"mod.apply(fakeCtx)",
|
||||
"const route = routes.find((r) => r.path === '/api/worktable/workspaces')",
|
||||
"let status = 0; let body = ''",
|
||||
|
||||
Reference in New Issue
Block a user