gm-plugkit 2.0.1671 → 2.0.1672

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/cli.js +13 -0
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -198,6 +198,19 @@ function writeCliError(phase, err) {
198
198
  ensureSpoolDir();
199
199
  writeCliStatus({ phase: 'starting', args });
200
200
 
201
+ const already = readStatus(spoolDir());
202
+ if (statusServing(already, 12000)) {
203
+ writeCliStatus({ phase: 'ready', already_serving: true, watcher_pid: already.pid });
204
+ console.log(JSON.stringify({
205
+ ok: true,
206
+ already_serving: true,
207
+ watcher_pid: already.pid,
208
+ version: already.version,
209
+ message: 'plugkit already serving, no bootstrap/spawn needed',
210
+ }));
211
+ process.exit(0);
212
+ }
213
+
201
214
  let bootstrapResult;
202
215
  try {
203
216
  bootstrapResult = await ensureReady();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1671",
3
+ "version": "2.0.1672",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
5
5
  "main": "index.js",
6
6
  "bin": {