@rigxyz/tapd 0.6.3 → 0.6.4

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/bin.js CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  findConflictSidecars,
16
16
  importStateDbPath,
17
17
  init,
18
+ isSyncPaused,
18
19
  join,
19
20
  list,
20
21
  loadIgnore,
@@ -26,7 +27,7 @@ import {
26
27
  revoke,
27
28
  safeResolveRigPath,
28
29
  start
29
- } from "./chunk-54AIKODH.js";
30
+ } from "./chunk-F3HYZR2Y.js";
30
31
 
31
32
  // src/bin.ts
32
33
  import { join as pathJoin, resolve } from "path";
@@ -280,7 +281,7 @@ import { existsSync as existsSync4 } from "fs";
280
281
  import { join as join4 } from "path";
281
282
 
282
283
  // src/version.ts
283
- var TAPD_VERSION = "0.6.3";
284
+ var TAPD_VERSION = "0.6.4";
284
285
 
285
286
  // src/status.ts
286
287
  var STATE_KEY_LAST_APPLY_ERROR = "last_apply_error";
@@ -1210,6 +1211,11 @@ async function runUninit(flags2) {
1210
1211
  }
1211
1212
  async function runStart(flags2) {
1212
1213
  const rootDir = resolve(flags2.get("dir") ?? process.cwd());
1214
+ if (isSyncPaused(rootDir)) {
1215
+ console.log(kleur.dim("tapd start: sync is paused for this workspace (.rig/sync-paused.json) \u2014 not starting."));
1216
+ console.log(kleur.dim(" run `rig resume` to start syncing again."));
1217
+ process.exit(0);
1218
+ }
1213
1219
  const pollSeconds = flags2.has("poll-seconds") ? Number(flags2.get("poll-seconds")) : void 0;
1214
1220
  const pidfilePath = flags2.get("no-pidfile") === true ? null : pathJoin(rootDir, DAEMON_PIDFILE_REL3);
1215
1221
  let handle = null;
@@ -1241,7 +1247,17 @@ async function runStart(flags2) {
1241
1247
  }
1242
1248
  }
1243
1249
  try {
1244
- handle = await start({ rootDir, pollSeconds });
1250
+ handle = await start({
1251
+ rootDir,
1252
+ pollSeconds,
1253
+ // The relay says our binding is gone (410 binding_deleted). The
1254
+ // subscription + writer have already stopped and the pause flag is
1255
+ // already written (start.ts) — exit the process the same clean way
1256
+ // ctrl+c does, so the pidfile doesn't strand.
1257
+ onBindingDeleted: () => {
1258
+ void cleanup();
1259
+ }
1260
+ });
1245
1261
  } catch (err) {
1246
1262
  if (pidfilePath) release(pidfilePath);
1247
1263
  console.error(kleur.red("error:"), err.message);