@nwire/supervisor 0.10.0 → 0.11.0
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/supervisor.d.ts +6 -0
- package/dist/supervisor.js +8 -0
- package/package.json +3 -3
package/dist/supervisor.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ export interface ManagedProcess {
|
|
|
30
30
|
readonly topology: string;
|
|
31
31
|
readonly port?: number;
|
|
32
32
|
readonly startedAt: string;
|
|
33
|
+
/** Working directory the child was spawned in — used to scope process
|
|
34
|
+
* listings per project in multi-project Studio. */
|
|
35
|
+
readonly cwd: string;
|
|
36
|
+
/** Env-var overrides the caller passed at start time (does not include
|
|
37
|
+
* the parent's process.env). Empty object when none were supplied. */
|
|
38
|
+
readonly env: Record<string, string>;
|
|
33
39
|
status: ProcessStatus;
|
|
34
40
|
pid?: number;
|
|
35
41
|
exitCode?: number | null;
|
package/dist/supervisor.js
CHANGED
|
@@ -57,6 +57,12 @@ export class RunnerSupervisor extends EventEmitter {
|
|
|
57
57
|
const env = {
|
|
58
58
|
...process.env,
|
|
59
59
|
NWIRE_TOPOLOGY: options.topology,
|
|
60
|
+
// Studio relies on the /_nwire/* introspection surface for the
|
|
61
|
+
// live stream, dispatch, and trace pages. Setting NWIRE_INSPECT=1
|
|
62
|
+
// tells httpKoa to mount it automatically — so a fresh project
|
|
63
|
+
// whose main.ts doesn't opt in still works the moment Studio
|
|
64
|
+
// boots it. Caller can override via the env passthrough below.
|
|
65
|
+
NWIRE_INSPECT: "1",
|
|
60
66
|
...(options.port ? { PORT: String(options.port) } : {}),
|
|
61
67
|
...(options.env ?? {}),
|
|
62
68
|
};
|
|
@@ -71,6 +77,8 @@ export class RunnerSupervisor extends EventEmitter {
|
|
|
71
77
|
topology: options.topology,
|
|
72
78
|
port: options.port,
|
|
73
79
|
startedAt,
|
|
80
|
+
cwd,
|
|
81
|
+
env: { ...(options.env ?? {}) },
|
|
74
82
|
status: "starting",
|
|
75
83
|
pid: child.pid,
|
|
76
84
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nwire/supervisor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Spawns and watches Nwire wire processes for dev tooling. Used by `nwire dev` and Studio's vite dev server. Generic process supervisor with stdout/stderr ring buffer, health-check polling, SIGTERM-then-SIGKILL graceful stop.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"dev",
|
|
8
|
-
"
|
|
8
|
+
"nwire",
|
|
9
9
|
"process",
|
|
10
|
-
"
|
|
10
|
+
"supervisor"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"files": [
|