gm-plugkit 2.0.1487 → 2.0.1489

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1487",
3
+ "version": "2.0.1489",
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": {
package/plugkit.version CHANGED
@@ -1 +1 @@
1
- 0.1.610
1
+ 0.1.611
package/supervisor.js CHANGED
@@ -144,13 +144,16 @@ function spawnWatcher(bootReason) {
144
144
  const shutdownReason = readShutdownReason();
145
145
  const reason = shutdownReason && shutdownReason.reason;
146
146
  const idleClean = reason === 'idle';
147
+ const lockRejected = code === 75;
147
148
  const plannedReasons = new Set(['idle', 'sigterm', 'version-change', 'wrapper-change', 'peer-stale-takeover', 'external-planned']);
148
- const isPlanned = plannedReasons.has(reason);
149
+ const isPlanned = plannedReasons.has(reason) || lockRejected;
149
150
  const eventName = idleClean
150
151
  ? 'supervisor.watcher-exited-idle'
151
152
  : reason === 'version-change'
152
153
  ? 'supervisor.watcher-exited-for-update'
153
- : 'supervisor.watcher-exited-unexpectedly';
154
+ : lockRejected
155
+ ? 'supervisor.watcher-exited-lock-rejected'
156
+ : 'supervisor.watcher-exited-unexpectedly';
154
157
  logEvent(eventName, {
155
158
  watcher_pid: currentChildPid,
156
159
  exit_code: code,
@@ -166,6 +169,11 @@ function spawnWatcher(bootReason) {
166
169
  try { fs.unlinkSync(SUPERVISOR_PATH); } catch (_) {}
167
170
  process.exit(0);
168
171
  }
172
+ if (lockRejected) {
173
+ writeSupervisorStatus('exited-lock-rejected', { watcher_pid: currentChildPid });
174
+ try { fs.unlinkSync(SUPERVISOR_PATH); } catch (_) {}
175
+ process.exit(0);
176
+ }
169
177
  const respawnReason = reason === 'version-change' ? 'planned-restart-version-change' : 'unplanned-restart-after-exit';
170
178
  writeSupervisorStatus('restarting', {
171
179
  prior_watcher_pid: currentChildPid,