Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/node-modules-inspector/src/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ cli
.option('--host <host>', 'Host', { default: process.env.HOST || '127.0.0.1' })
.option('--port <port>', 'Port', { default: process.env.PORT || 9999 })
.option('--open', 'Open browser', { default: true })
.option('--auth', 'Require the one-time-code auth handshake before RPC calls', { default: true })
.option('--auth', 'Require the one-time-code auth handshake before RPC calls')
.action(async (options) => {
const host = options.host
const auth = options.auth ?? (host === '0.0.0.0' || host === '::')
const port = await resolveDevServerPort(devframe, {
host,
defaultPort: Number(options.port),
Expand All @@ -137,9 +138,8 @@ cli
config: options.config,
depth: Number(options.depth),
// Forwarded to createDevServer's own auth resolution (not consumed by
// devframe.setup) — `--no-auth` opts out of the interactive OTP gate
// for trusted automation (e.g. the e2e suite driving a headless browser).
auth: options.auth,
// devframe.setup). Explicit --auth/--no-auth override the host default.
auth,
},
openBrowser: options.open ? url : false,
})
Expand Down
6 changes: 1 addition & 5 deletions test/e2e/utils/orchestrate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ async function startServers() {
start(
'dev',
'node',
// `--no-auth` skips devframe's interactive OTP handshake — a headless
// Playwright browser can't complete the "open the printed magic link"
// step, and the RPC calls the SPA makes on load would otherwise be
// rejected as untrusted (DF0036).
['packages/node-modules-inspector/bin.mjs', '--port', String(PORT_DEV), '--host', '127.0.0.1', '--no-open', '--no-auth'],
['packages/node-modules-inspector/bin.mjs', '--port', String(PORT_DEV), '--host', '127.0.0.1', '--no-open'],
)
start(
'build',
Expand Down
Loading