@shardworks/nexus 0.1.270 → 0.1.271
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/README.md +15 -1
- package/dist/commands/clock.d.ts +225 -0
- package/dist/commands/clock.d.ts.map +1 -0
- package/dist/commands/clock.js +652 -0
- package/dist/commands/clock.js.map +1 -0
- package/dist/commands/index.d.ts +14 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +18 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/signal.d.ts +41 -0
- package/dist/commands/signal.d.ts.map +1 -0
- package/dist/commands/signal.js +85 -0
- package/dist/commands/signal.js.map +1 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +59 -40
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.d.ts.map +1 -1
- package/dist/commands/stop.js +1 -41
- package/dist/commands/stop.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +17 -2
- package/dist/program.js.map +1 -1
- package/dist/started-guild.d.ts +41 -0
- package/dist/started-guild.d.ts.map +1 -0
- package/dist/started-guild.js +47 -0
- package/dist/started-guild.js.map +1 -0
- package/package.json +5 -4
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-internal carrier for the `StartedGuild` returned by
|
|
3
|
+
* `createGuild()`.
|
|
4
|
+
*
|
|
5
|
+
* The `Guild` accessor in `@shardworks/nexus-core` deliberately
|
|
6
|
+
* narrows away `shutdown()` because plugin code has no legitimate
|
|
7
|
+
* reason to tear down the guild it is running inside (commission
|
|
8
|
+
* decision D1). The bootstrap caller — `program.ts` — does have a
|
|
9
|
+
* reason: when a long-lived foreground command (the `nsg start`
|
|
10
|
+
* daemon, the Clockworks foreground daemon entry) finishes, the
|
|
11
|
+
* SIGTERM/SIGINT handler must invoke `shutdown()` on the way out so
|
|
12
|
+
* every apparatus's optional `stop()` runs and handles get released.
|
|
13
|
+
*
|
|
14
|
+
* The threading channel used to be implicit (handlers called
|
|
15
|
+
* `guild()` and trusted the singleton). With the lifecycle contract
|
|
16
|
+
* in place, the daemon handlers need the richer `StartedGuild` value;
|
|
17
|
+
* this module is where `program.ts` deposits it for those handlers to
|
|
18
|
+
* read without changing the `tool({ … })` factory's signature.
|
|
19
|
+
*
|
|
20
|
+
* Per D8 the threading is explicit: `program.ts` sets, the start
|
|
21
|
+
* tool's handler gets. There is no transparent fallback to the
|
|
22
|
+
* `guild()` singleton — if no one called `setStartedGuild()` the
|
|
23
|
+
* accessor returns `undefined` and the daemon decides what to do.
|
|
24
|
+
*/
|
|
25
|
+
let _started;
|
|
26
|
+
/** Record the `StartedGuild` returned by Arbor's `createGuild()`. */
|
|
27
|
+
export function setStartedGuild(g) {
|
|
28
|
+
_started = g;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Read the `StartedGuild` deposited by `program.ts`. Returns
|
|
32
|
+
* `undefined` when no guild has been started in this process —
|
|
33
|
+
* callers in daemon paths should treat that as a fail-loud
|
|
34
|
+
* misconfiguration.
|
|
35
|
+
*/
|
|
36
|
+
export function getStartedGuild() {
|
|
37
|
+
return _started;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Clear the stored reference. Provided for test isolation; production
|
|
41
|
+
* code never calls this directly — `StartedGuild.shutdown()` is what
|
|
42
|
+
* tears the guild down, and the process exits shortly after.
|
|
43
|
+
*/
|
|
44
|
+
export function clearStartedGuild() {
|
|
45
|
+
_started = undefined;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=started-guild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"started-guild.js","sourceRoot":"","sources":["../src/started-guild.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,IAAI,QAAkC,CAAC;AAEvC,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,CAAe;IAC7C,QAAQ,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,QAAQ,GAAG,SAAS,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shardworks/nexus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.271",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "14.0.3",
|
|
23
23
|
"zod": "4.3.6",
|
|
24
|
-
"@shardworks/nexus-core": "0.1.
|
|
25
|
-
"@shardworks/
|
|
26
|
-
"@shardworks/
|
|
24
|
+
"@shardworks/nexus-core": "0.1.271",
|
|
25
|
+
"@shardworks/tools-apparatus": "0.1.271",
|
|
26
|
+
"@shardworks/clockworks-apparatus": "0.1.271",
|
|
27
|
+
"@shardworks/nexus-arbor": "0.1.271"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@types/node": "25.5.0"
|