Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/server/src/debugApi

LIN-137 (part of LIN-82/epic ) -- the debug chain's UI half: one route, POST /api/debug/read, over packages/core/debug-chain.mjs's four choosers (debug.reproduce -> debug.isolate -> debug.fix -> debug.verify).

Cockpit server, next. Source: ui/server/src/debugApi.mjs.

Variables#

MAX_ANSWERS#

const MAX_ANSWERS: 4 = 4

Defined in: ui/server/src/debugApi.mjs:24


MAX_FEATURE#

const MAX_FEATURE: 100 = 100

Defined in: ui/server/src/debugApi.mjs:23


MAX_REQUEST_BYTES#

const MAX_REQUEST_BYTES: number

Defined in: ui/server/src/debugApi.mjs:25

Functions#

createDebugRouter()#

createDebugRouter(deps): any

Defined in: ui/server/src/debugApi.mjs:99

Parameters#

deps
clientOrigin?

string

getRoot

() => { ok: true; root: string; } | { body?: any; ok: false; status?: number; }

Returns#

any


readDebug()#

readDebug(body, root, trace?): object

Defined in: ui/server/src/debugApi.mjs:42

Read one step of the debug chain, or (once every chooser is answered) the compiled plan.

Parameters#

body

feature (the unit under debug) and answers, a list of { chooser, option } in the order they were made, one per chooser of debug-chain.mjs.

answers?

unknown

feature?

unknown

root

string

The open project's root (only used once every chooser is answered, to derive touches).

trace?

Filled in once the chain is fully answered: the closed questions answered so far, ready for recordChoices.

choices

any[]

planValidated?

boolean

Returns#

object

body

body: any

status

status: number