mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-16 04:11:29 +00:00
* fix: cookie wrapper callback mode returns never-resolving Promise tough-cookie's createPromiseCallback() intentionally never resolves the returned Promise when a callback is provided — only the callback fires. The cookie jar wrapper was propagating this never-resolving Promise via `return cookieJar.getCookies(url, cb)` in callback-mode paths. When user scripts did `await jar.getCookie(url, name, callback)` in the Node VM (developer sandbox), the await hung forever, blocking the CLI runner. Fix: drop the return value in all callback-mode paths so the wrapper returns void (undefined). `await undefined` resolves immediately. Affected methods: getCookie, getCookies, hasCookie, clear, deleteCookies. * fix: validation-error callback paths also return void instead of callback result The validation guards (e.g. missing URL) did `return callback(error)` which leaks whatever the user's callback returns. Apply the same pattern used for the main callback paths: call the callback, then return void. Also makes deleteCookie's `return executeDelete(callback)` consistent (executeDelete already returns void, but the explicit pattern is clearer).