gm-plugkit 2.0.1671 → 2.0.1673

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/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.1673",
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": {
@@ -303,7 +303,7 @@ function injectUpdateWarning(parsed) {
303
303
  if (!parsed || typeof parsed !== 'object') return;
304
304
  let upd;
305
305
  try {
306
- upd = JSON.parse(fs.readFileSync(path.join(spoolDir, '.update-available.json'), 'utf-8'));
306
+ upd = JSON.parse(fs.readFileSync(path.join(spoolDirForSentinel(), '.update-available.json'), 'utf-8'));
307
307
  } catch (_) { return; }
308
308
  if (!upd || !upd.installed || !upd.latest || upd.installed === upd.latest) return;
309
309
  const target = (parsed.data && typeof parsed.data === 'object') ? parsed.data : parsed;