@sjawhar/pi-envoy 10.6.0 → 10.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/dispatch.js +12 -4
  2. package/package.json +1 -1
package/dist/dispatch.js CHANGED
@@ -19251,9 +19251,17 @@ async function runDispatchCli(argv, rawEnv, io) {
19251
19251
 
19252
19252
  // ../envoy-client/bin/dispatch.ts
19253
19253
  var readText = (path2) => readFileSync4(path2 === "-" ? 0 : path2, "utf-8");
19254
- process.exit(await runDispatchCli(Bun.argv.slice(2), process.env, {
19255
- stdout: (text) => process.stdout.write(text),
19256
- stderr: (text) => process.stderr.write(text),
19254
+ var pending = [];
19255
+ var writeTo = (stream) => (text) => {
19256
+ const { promise: promise2, resolve: resolve2 } = Promise.withResolvers();
19257
+ stream.write(text, () => resolve2());
19258
+ pending.push(promise2);
19259
+ };
19260
+ var code = await runDispatchCli(Bun.argv.slice(2), process.env, {
19261
+ stdout: writeTo(process.stdout),
19262
+ stderr: writeTo(process.stderr),
19257
19263
  readText,
19258
19264
  cwd: process.cwd()
19259
- }));
19265
+ });
19266
+ await Promise.all(pending);
19267
+ process.exit(code);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "10.6.0",
3
+ "version": "10.6.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {