MCPcopy
hub / github.com/simstudioai/sim / resolveMode

Function resolveMode

packages/db/tx-tripwire.ts:21–25  ·  view source on GitHub ↗

* Tripwire mode resolution: * - `DB_TX_TRIPWIRE=off|warn|throw` overrides everything * - otherwise `throw` outside production (bugs fail loudly in dev/CI) and * `warn` in production (rate-limited error log, never breaks traffic)

()

Source from the content-addressed store, hash-verified

19 * `warn` in production (rate-limited error log, never breaks traffic)
20 */
21function resolveMode(): TripwireMode {
22 const override = process.env.DB_TX_TRIPWIRE
23 if (override === 'off' || override === 'warn' || override === 'throw') return override
24 return process.env.NODE_ENV === 'production' ? 'warn' : 'throw'
25}
26
27/**
28 * True while the current async context is inside a transaction callback on an

Callers 1

reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected