@phreshos/cli 0.1.35 → 0.1.36

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.
package/dist/launch.js CHANGED
@@ -48,7 +48,6 @@ export default async function launch(mode, directory = process.cwd(), options =
48
48
  await project.build();
49
49
  program = await system.forceCreateProgram(definition);
50
50
  ended = await consume(program.process.run({ options }, { signal: controller.signal }), client);
51
- console.log(`\n ${dim("ran as")} ${ended.process}`);
52
51
  }
53
52
  catch (error) {
54
53
  if (!interrupted)
@@ -56,12 +55,16 @@ export default async function launch(mode, directory = process.cwd(), options =
56
55
  }
57
56
  finally {
58
57
  controller.abort(new Error("The local Program run ended"));
59
- await client?.stop();
60
- if (program)
61
- await forget(program);
58
+ const cleanup = await Promise.allSettled([
59
+ client?.stop(),
60
+ program ? forget(program) : undefined
61
+ ]);
62
62
  for (const signal of ["SIGINT", "SIGTERM"])
63
63
  process.off(signal, stop);
64
64
  await system.disconnect();
65
+ const failure = cleanup.find(result => result.status === "rejected");
66
+ if (failure?.status === "rejected")
67
+ throw failure.reason;
65
68
  }
66
69
  if (interrupted)
67
70
  process.exit(130);
@@ -98,8 +101,10 @@ async function consume(lifecycle, client) {
98
101
  if (outcome.result.done)
99
102
  break;
100
103
  const event = outcome.result.value;
101
- if (event.event === "started")
104
+ if (event.event === "started") {
102
105
  process = event.process.identity;
106
+ line("process", process);
107
+ }
103
108
  else if (event.event === "output")
104
109
  write(event.stream, event.text);
105
110
  else
@@ -22,7 +22,7 @@
22
22
  "react-dom": "^19.2.8"
23
23
  },
24
24
  "devDependencies": {
25
- "@phreshos/cli": "^0.1.35",
25
+ "@phreshos/cli": "^0.1.36",
26
26
  "@types/node": "^26.2.0",
27
27
  "@types/react": "^19.2.18",
28
28
  "@types/react-dom": "^19.2.4",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@phreshos/cli",
3
3
  "type": "module",
4
- "version": "0.1.35",
4
+ "version": "0.1.36",
5
5
  "description": "The Phresh command-line interface for Program projects and system management.",
6
6
  "engines": {
7
7
  "node": ">=20.10"