diff options
author | 2023-10-16 20:01:24 -0700 | |
---|---|---|
committer | 2023-10-16 20:01:24 -0700 | |
commit | a3958190e8f106adca7fbf4ba2605056cb22aced (patch) | |
tree | 475057061d3470f1dc4d06b901d6bad0b898cb09 /src/js/_codegen/client-js.ts | |
parent | 6504bfef74b552aa834324adfe102c9ba0193039 (diff) | |
download | bun-a3958190e8f106adca7fbf4ba2605056cb22aced.tar.gz bun-a3958190e8f106adca7fbf4ba2605056cb22aced.tar.zst bun-a3958190e8f106adca7fbf4ba2605056cb22aced.zip |
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 <jarred@jarredsumner.com>
Diffstat (limited to 'src/js/_codegen/client-js.ts')
-rw-r--r-- | src/js/_codegen/client-js.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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); } : () => {}; `; } |