From a3958190e8f106adca7fbf4ba2605056cb22aced Mon Sep 17 00:00:00 2001 From: dave caruso Date: Mon, 16 Oct 2023 20:01:24 -0700 Subject: fix(runtime): improve IPC reliability + organization pass on that code (#6475) * dfghj * Handle messages that did not finish * tidy * ok * a * Merge remote-tracking branch 'origin/main' into dave/ipc-fixes * test failures --------- Co-authored-by: Jarred Sumner --- src/js/_codegen/client-js.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/js/_codegen/client-js.ts') diff --git a/src/js/_codegen/client-js.ts b/src/js/_codegen/client-js.ts index bd9ed63f4..4dfa6acf6 100644 --- a/src/js/_codegen/client-js.ts +++ b/src/js/_codegen/client-js.ts @@ -16,9 +16,10 @@ let $debug_log_enabled = ((env) => ( .join("_") .toUpperCase()}) ))(Bun.env); +let $debug_pid_prefix = Bun.env.SHOW_PID === '1'; let $debug_log = $debug_log_enabled ? (...args) => { // warn goes to stderr without colorizing - console.warn(Bun.enableANSIColors ? '\\x1b[90m[${publicName}]\\x1b[0m' : '[${publicName}]', ...args); + console.warn(($debug_pid_prefix ? \`[\${process.pid}] \` : '') + (Bun.enableANSIColors ? '\\x1b[90m[${publicName}]\\x1b[0m' : '[${publicName}]'), ...args); } : () => {}; `; } -- cgit v1.2.3