@rxova/journey-devtools-bridge
v1.0.1
Published
Bridge API to connect Journey machines to browser devtools.
Readme
@rxova/journey-devtools-bridge
Connect current Journey Core machines to the Chrome DevTools extension.
Install
npm install @rxova/journey-devtools-bridgeUsage
import { createLinearJourney } from "@rxova/journey-core";
import { attachJourneyDevtools } from "@rxova/journey-devtools-bridge";
const machine = createLinearJourney(definition);
const detach = attachJourneyDevtools(machine, {
machineId: "checkout",
label: "Checkout",
eventTypes: ["continue", "cancel"],
mutationsEnabled: false,
});The bridge registers the machine, streams v7 snapshots and observation events, and exposes generic operation descriptors to the panel. It accepts v6 invoke envelopes and tolerates v5 registration during rolling upgrades.
The bridge is enabled by default only outside production. When a bridge is enabled, mutating
operations are enabled by default; pass mutationsEnabled: false for inspection-only access.
Attaching never starts the machine.
The transport uses same-page window.postMessage. Treat inspected snapshot/context data as visible
to other scripts on the page, avoid secrets in journey state, keep production attachment disabled
unless required, and detach on teardown.
License
MIT
