stim 1.2.0 → 1.3.1

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 (59) hide show
  1. package/README.md +34 -3
  2. package/dist/{android-Bcmev2s2.mjs → android-CT-PkXUh.mjs} +157 -62
  3. package/dist/{android-cas-D6HPZ6UQ.mjs → android-cas-DXorPCi_.mjs} +5 -5
  4. package/dist/android-hMj83VpN.mjs +1374 -0
  5. package/dist/{app-install-NFxUahnH.mjs → app-install-DIp9riNx.mjs} +6 -6
  6. package/dist/{build-slots-D0b6sJyo.mjs → build-slots-C4AouyNz.mjs} +2 -2
  7. package/dist/{cache-manifest-Cu4_Znw9.mjs → cache-manifest-CXR-Y8pH.mjs} +1 -1
  8. package/dist/cache-manifest.mjs +1 -1
  9. package/dist/cli.mjs +13 -13
  10. package/dist/collector-run.d.mts +3 -1
  11. package/dist/collector-run.mjs +33 -8
  12. package/dist/{config-CMtIaTk9.mjs → config-CcefMY2Q.mjs} +93 -12
  13. package/dist/{deps-BLBsTNDS.mjs → deps-0Yt0Inly.mjs} +1 -1
  14. package/dist/{dev-client-RpvXxCXV.mjs → dev-client-VfSZNLT4.mjs} +186 -9
  15. package/dist/{device-CoCPmazS.mjs → device-Bbv45Z9Z.mjs} +19 -11
  16. package/dist/{device-lease-Dpik41RY.mjs → device-lease-CJwK7OZr.mjs} +107 -83
  17. package/dist/{device-pool-B5pEVa3t.mjs → device-pool-CcBNTvM7.mjs} +18 -12
  18. package/dist/{device-remote-E81KAdXf.mjs → device-remote-DAA0Zm6Z.mjs} +7 -7
  19. package/dist/{doctor-CqPeMsSm.mjs → doctor-B4EITgQB.mjs} +11 -12
  20. package/dist/{doctor-D_CX7ib5.mjs → doctor-BueDfLYG.mjs} +4 -4
  21. package/dist/{error-diagnostics-Dw8Gn3yw.mjs → error-diagnostics-DwhNBFDU.mjs} +62 -52
  22. package/dist/{gc-B7KkDinF.mjs → gc-BRu62v4o.mjs} +66 -57
  23. package/dist/{guide-BS2Xc24o.mjs → guide-D95E0u3i.mjs} +307 -74
  24. package/dist/{ios-B7KLgIp5.mjs → ios-DAju3TVy.mjs} +183 -54
  25. package/dist/{ios-D1h1Di39.mjs → ios-Deh5js5V.mjs} +78 -40
  26. package/dist/{ios-device-xNt0Lg6v.mjs → ios-device-CWOM_S44.mjs} +1 -1
  27. package/dist/{logs-DcX9AvRF.mjs → logs-CAdwW6c2.mjs} +34 -6
  28. package/dist/{logs-query-oqn47Ffx.mjs → logs-query-Cdp5aaCH.mjs} +23 -6
  29. package/dist/{metro-COslRK_F.mjs → metro-CORqXyTL.mjs} +2 -2
  30. package/dist/{ndjson-DcAtEx_K.mjs → ndjson-BZwI1NBv.mjs} +5 -2
  31. package/dist/{ownership-CGPart6T.mjs → ownership-8O073GIC.mjs} +3 -3
  32. package/dist/{ownership-CYOyqxUo.mjs → ownership-DXcol4oU.mjs} +3 -3
  33. package/dist/{ownership-claim-7zRxxTfZ.mjs → ownership-claim-BtPtJVmq.mjs} +38 -23
  34. package/dist/{project-BBTVABUz.mjs → project-fKmuIaMI.mjs} +2 -2
  35. package/dist/{reclaim-C5Jmuahx.mjs → reclaim-CUmwucWG.mjs} +80 -74
  36. package/dist/{reload-Z8nKifAk.mjs → reload-CWpXoOgN.mjs} +32 -24
  37. package/dist/{server-bare-DEk37Mz2.mjs → server-bare-DEzPZLvf.mjs} +2 -2
  38. package/dist/server-expo-44em5Pmg.mjs +2 -0
  39. package/dist/{server-expo-C3ktAwUG.mjs → server-expo-DizT4OMk.mjs} +4 -4
  40. package/dist/{settings-DwU1_U_q.mjs → settings-DEJf6_kJ.mjs} +2 -2
  41. package/dist/slot-launch-CZklomj6.mjs +19 -0
  42. package/dist/{start-BrY4EuIg.mjs → start-B5G4NjiA.mjs} +11 -11
  43. package/dist/{state-CZ-ER-8d.mjs → state-B3XA2wp2.mjs} +9 -9
  44. package/dist/{stats-BCWEVLrM.mjs → stats-BR-kwj0B.mjs} +1 -1
  45. package/dist/{stats-BsF15Bti.mjs → stats-CaaQr4yN.mjs} +3 -3
  46. package/dist/{status-DFI1Hfpg.mjs → status-CI9clRSb.mjs} +55 -24
  47. package/dist/{stop-B7DR4awK.mjs → stop-CQhffpmX.mjs} +2 -2
  48. package/dist/{stop-Btg770vV.mjs → stop-CjlgDk0a.mjs} +93 -42
  49. package/dist/supervisor-run.d.mts +1 -2
  50. package/dist/supervisor-run.mjs +5 -5
  51. package/dist/{remote-cache-DDmJ1Roq.mjs → teardown--gESs9ck.mjs} +985 -887
  52. package/dist/{workspace-process-lock-BKfdys1q.mjs → workspace-process-lock-IBj1Towr.mjs} +1 -1
  53. package/dist/{worktree-BPTbI-LN.mjs → worktree-DtQGO9-s.mjs} +121 -111
  54. package/dist/{worktree-C79xx_kM.mjs → worktree-Eq6TLH8N.mjs} +1 -1
  55. package/dist/{xcode-DeKCribl.mjs → xcode-xnxyvJkD.mjs} +159 -96
  56. package/package.json +5 -5
  57. package/dist/android-K63_0UfF.mjs +0 -727
  58. package/dist/build-lock-BsVoLDaq.mjs +0 -645
  59. package/dist/server-expo-Drd7ksHu.mjs +0 -2
@@ -1,13 +1,13 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { f as getProject, k as withDirLock } from "./config-CMtIaTk9.mjs";
3
- import { f as readWorkspaceLaunches, p as readWorkspaceState } from "./state-CZ-ER-8d.mjs";
2
+ import { I as deviceSlotKey, L as deviceSlotPlatforms, f as getProject, k as withDirLock } from "./config-CcefMY2Q.mjs";
3
+ import { f as readWorkspaceLaunches, p as readWorkspaceState } from "./state-B3XA2wp2.mjs";
4
4
  import { n as deviceConsoleLevel } from "./ios-device-D3pzTKQE.mjs";
5
- import { i as resolveProjectMetro } from "./metro-COslRK_F.mjs";
5
+ import { i as resolveProjectMetro } from "./metro-CORqXyTL.mjs";
6
6
  import { n as parseLogcatLine, t as androidClockOffset } from "./android-BW8i_YxU.mjs";
7
7
  import { _ as launchErrorPreview } from "./command-output-8wHMEde0.mjs";
8
- import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-Dpik41RY.mjs";
9
- import { n as androidHome } from "./android-K63_0UfF.mjs";
10
- import { c as readLogRecords, t as attachExpoErrorContext } from "./logs-query-oqn47Ffx.mjs";
8
+ import { n as androidHome } from "./android-hMj83VpN.mjs";
9
+ import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-CJwK7OZr.mjs";
10
+ import { l as readLogRecords, t as attachExpoErrorContext } from "./logs-query-Cdp5aaCH.mjs";
11
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
13
  import { basename, dirname, join, resolve, sep } from "node:path";
@@ -333,14 +333,18 @@ function captureNativeCrashes(target, logsDir) {
333
333
  if (text) records = parseAndroidCrashes(text, target, offset).map((record) => symbolicateAndroid(record, target.root, deadline));
334
334
  }
335
335
  } catch {}
336
- for (const record of records) try {
337
- const key = createHash("sha256").update(JSON.stringify([
338
- record.deviceId,
339
- record.incident ?? record.deviceTs,
340
- record.rawReport
341
- ])).digest("hex");
342
- writeDiagnosticOnce(join(logsDir, `native-crash-${key}.ndjson`), `${JSON.stringify(record)}\n`);
343
- } catch {}
336
+ for (const record of records) {
337
+ if (target.slot && target.slot !== "default") record.slot = target.slot;
338
+ try {
339
+ const key = createHash("sha256").update(JSON.stringify([
340
+ record.slot,
341
+ record.deviceId,
342
+ record.incident ?? record.deviceTs,
343
+ record.rawReport
344
+ ])).digest("hex");
345
+ writeDiagnosticOnce(join(logsDir, `native-crash-${key}.ndjson`), `${JSON.stringify(record)}\n`);
346
+ } catch {}
347
+ }
344
348
  return records;
345
349
  }
346
350
  function printNativeCrashReport(target, logsDir, emit, remote) {
@@ -350,45 +354,51 @@ function printNativeCrashReport(target, logsDir, emit, remote) {
350
354
  function captureWorkspaceCrashes(root, logsDir) {
351
355
  const attempts = readLogRecords(logsDir).filter((record) => record.event === "launch_attempt");
352
356
  const launches = readWorkspaceLaunches(root);
353
- for (const platform of ["ios", "android"]) try {
354
- const attempt = attempts.findLast((record) => record.platform === platform);
355
- if (!attempt || attempt.remote) continue;
356
- const { deviceId, appId } = attempt;
357
- const since = attempt.ts;
358
- const until = Date.now();
359
- if (typeof deviceId !== "string" || typeof appId !== "string" || typeof since !== "number" || !Number.isFinite(since)) continue;
360
- if (attempt.physical) {
361
- const holder = fileLeaseIo.readHolder(root)[platform];
362
- const lease = parseLease(fileLeaseIo.readLease(deviceLeasePath(platform, deviceId)));
363
- if (holder?.id !== deviceId || !lease || lease.platform !== platform || lease.id !== deviceId || lease.holder !== root || lease.token !== holder.token || Date.parse(lease.expiresAt) <= until || !lease.grantedAt || !Number.isFinite(Date.parse(lease.grantedAt)) || Date.parse(lease.grantedAt) > since) continue;
364
- } else {
365
- const launch = launches[platform];
366
- if (!launch || launch.deviceId !== deviceId || launch.appId !== appId || Date.parse(launch.launchedAt) !== since) continue;
367
- const configured = getProject(root)?.platforms?.[platform];
368
- if (!configured?.owned) continue;
369
- if (platform === "ios" && configured.deviceUdid !== deviceId) continue;
370
- if (platform === "android") {
371
- if (!configured.avdName) continue;
372
- if (getExecutor().runFileQuiet("adb", [
373
- "-s",
374
- deviceId,
375
- "emu",
376
- "avd",
377
- "name"
378
- ], { timeoutMs: 2e3 })?.split("\n")[0]?.trim() !== configured.avdName) continue;
357
+ const latest = /* @__PURE__ */ new Map();
358
+ for (const attempt of attempts) if (attempt.platform === "ios" || attempt.platform === "android") latest.set(deviceSlotKey(attempt.platform, String(attempt.slot ?? "default")), attempt);
359
+ for (const [key, attempt] of latest) {
360
+ const platform = attempt.platform;
361
+ const slot = String(attempt.slot ?? "default");
362
+ try {
363
+ if (!attempt || attempt.remote) continue;
364
+ const { deviceId, appId } = attempt;
365
+ const since = attempt.ts;
366
+ const until = Date.now();
367
+ if (typeof deviceId !== "string" || typeof appId !== "string" || typeof since !== "number" || !Number.isFinite(since)) continue;
368
+ if (attempt.physical) {
369
+ const holder = fileLeaseIo.readHolder(root)[key];
370
+ const lease = parseLease(fileLeaseIo.readLease(deviceLeasePath(platform, deviceId)));
371
+ if (holder?.id !== deviceId || !lease || lease.platform !== platform || lease.id !== deviceId || lease.holder !== root || lease.token !== holder.token || Date.parse(lease.expiresAt) <= until || !lease.grantedAt || !Number.isFinite(Date.parse(lease.grantedAt)) || Date.parse(lease.grantedAt) > since) continue;
372
+ } else {
373
+ const launch = launches[key];
374
+ if (!launch || launch.deviceId !== deviceId || launch.appId !== appId || Date.parse(launch.launchedAt) !== since) continue;
375
+ const configured = deviceSlotPlatforms(getProject(root), slot)?.[platform];
376
+ if (!configured?.owned) continue;
377
+ if (platform === "ios" && configured.deviceUdid !== deviceId) continue;
378
+ if (platform === "android") {
379
+ if (!configured.avdName) continue;
380
+ if (getExecutor().runFileQuiet("adb", [
381
+ "-s",
382
+ deviceId,
383
+ "emu",
384
+ "avd",
385
+ "name"
386
+ ], { timeoutMs: 2e3 })?.split("\n")[0]?.trim() !== configured.avdName) continue;
387
+ }
379
388
  }
380
- }
381
- captureNativeCrashes({
382
- root,
383
- platform,
384
- deviceId,
385
- appId,
386
- since: Number(since),
387
- until,
388
- physical: attempt?.physical === true,
389
- appPath: attempt?.appPath ?? readWorkspaceState(root)?.lastBuild?.appPath
390
- }, logsDir);
391
- } catch {}
389
+ captureNativeCrashes({
390
+ root,
391
+ slot,
392
+ platform,
393
+ deviceId,
394
+ appId,
395
+ since: Number(since),
396
+ until,
397
+ physical: attempt?.physical === true,
398
+ appPath: attempt?.appPath ?? readWorkspaceState(root)?.lastBuild?.appPath
399
+ }, logsDir);
400
+ } catch {}
401
+ }
392
402
  }
393
403
  //#endregion
394
404
  //#region src/error-symbolication.ts
@@ -1,20 +1,19 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { A as directorySize, M as isOnMountedVolume, N as listMountedVolumes, P as volumeRootFor, g as loadConfig, i as clearDevice, j as formatBytes, u as getConfigDir, v as removeProject } from "./config-CMtIaTk9.mjs";
3
- import { i as registeredCaches } from "./cache-manifest-Cu4_Znw9.mjs";
4
- import { T as workspaceDir, k as workspaceStateFile } from "./state-CZ-ER-8d.mjs";
5
- import { g as repoRoot, s as gitCommonDir } from "./worktree-C79xx_kM.mjs";
6
- import { a as findProjectRoot, i as detectIsExpo } from "./project-BBTVABUz.mjs";
7
- import { S as readParked, _ as teardownParkedIosSim, b as dropParked, d as resolveEasCliBin, g as teardownParkedAvd, h as teardownOwnedIosSim, m as teardownOwnedAvd, v as POOL_SETTING_REMEDY, x as parkedMaxSetting } from "./remote-cache-DDmJ1Roq.mjs";
8
- import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-DwU1_U_q.mjs";
2
+ import { A as directorySize, M as isOnMountedVolume, N as listMountedVolumes, P as volumeRootFor, g as loadConfig, i as clearDevice, j as formatBytes, u as getConfigDir, v as removeProject, z as projectDeviceSlots } from "./config-CcefMY2Q.mjs";
3
+ import { i as registeredCaches } from "./cache-manifest-CXR-Y8pH.mjs";
4
+ import { T as workspaceDir, k as workspaceStateFile } from "./state-B3XA2wp2.mjs";
5
+ import { g as repoRoot, s as gitCommonDir } from "./worktree-Eq6TLH8N.mjs";
6
+ import { a as findProjectRoot, i as detectIsExpo } from "./project-fKmuIaMI.mjs";
9
7
  import { m as shortUdid, o as formatLongDuration, u as plural } from "./command-output-8wHMEde0.mjs";
10
- import { d as listIosDeviceTypes, g as parseRuntimeVersion, u as listAllIosSims } from "./ios-D1h1Di39.mjs";
11
- import { r as listBuildLocks } from "./build-lock-BsVoLDaq.mjs";
12
- import { d as readClaimSet, o as clearFreeClaimSet } from "./ownership-claim-7zRxxTfZ.mjs";
13
- import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-Dpik41RY.mjs";
14
- import { n as listBuildSlots } from "./build-slots-D0b6sJyo.mjs";
15
- import { S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-K63_0UfF.mjs";
16
- import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-E81KAdXf.mjs";
17
- import { n as reclaimProject, t as describeDereferenced } from "./reclaim-C5Jmuahx.mjs";
8
+ import { o as clearFreeClaimSet, u as readClaimSet } from "./ownership-claim-BtPtJVmq.mjs";
9
+ import { B as listBuildLocks, S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-hMj83VpN.mjs";
10
+ import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-DEJf6_kJ.mjs";
11
+ import { a as POOL_SETTING_REMEDY, c as parkedMaxSetting, i as teardownParkedIosSim, l as readParked, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, x as resolveEasCliBin } from "./teardown--gESs9ck.mjs";
12
+ import { d as listIosDeviceTypes, g as parseRuntimeVersion, u as listAllIosSims } from "./ios-Deh5js5V.mjs";
13
+ import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-CJwK7OZr.mjs";
14
+ import { n as listBuildSlots } from "./build-slots-C4AouyNz.mjs";
15
+ import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-DAA0Zm6Z.mjs";
16
+ import { n as reclaimProject, t as describeDereferenced } from "./reclaim-CUmwucWG.mjs";
18
17
  import { InvalidArgumentError } from "commander";
19
18
  import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "fs";
20
19
  import { homedir, tmpdir } from "os";
@@ -413,16 +412,18 @@ function findOrphanedDevices({ sims = [], avds = [], config, isMounted, deadProj
413
412
  for (const [path, proj] of Object.entries(config?.projects || {})) {
414
413
  if (dead.has(path)) continue;
415
414
  const mounted = isMounted ? isMounted(path) : true;
416
- const ios = proj?.platforms?.ios;
417
- if (ios?.deviceUdid) referenced.set(ios.deviceUdid, {
418
- path,
419
- mounted
420
- });
421
- const android = proj?.platforms?.android;
422
- if (android?.avdName) referenced.set(android.avdName, {
423
- path,
424
- mounted
425
- });
415
+ for (const { platforms } of projectDeviceSlots(proj)) {
416
+ const ios = platforms.ios;
417
+ if (ios?.deviceUdid) referenced.set(ios.deviceUdid, {
418
+ path,
419
+ mounted
420
+ });
421
+ const android = platforms.android;
422
+ if (android?.avdName) referenced.set(android.avdName, {
423
+ path,
424
+ mounted
425
+ });
426
+ }
426
427
  }
427
428
  for (const sim of readParked("ios", { config })) referenced.set(sim.udid, {
428
429
  path: "the simulator pool",
@@ -481,22 +482,26 @@ function findStaleProjectDevices({ config, sims = [], avds = [], olderThanDays,
481
482
  const touched = lastTouched(path);
482
483
  if (!Number.isFinite(touched) || touched >= cutoff) continue;
483
484
  const idleDays = Math.floor((now - touched) / DAY_MS);
484
- const ios = proj?.platforms?.ios;
485
- if (ios?.owned && ios.deviceUdid && liveSims.has(ios.deviceUdid)) stale.push({
486
- kind: "ios",
487
- id: ios.deviceUdid,
488
- name: liveSims.get(ios.deviceUdid),
489
- project: path,
490
- idleDays
491
- });
492
- const android = proj?.platforms?.android;
493
- if (android?.owned && android.avdName && liveAvds.has(android.avdName)) stale.push({
494
- kind: "android",
495
- id: android.avdName,
496
- name: android.avdName,
497
- project: path,
498
- idleDays
499
- });
485
+ for (const { slot, platforms } of projectDeviceSlots(proj)) {
486
+ const ios = platforms.ios;
487
+ if (ios?.owned && ios.deviceUdid && liveSims.has(ios.deviceUdid)) stale.push({
488
+ kind: "ios",
489
+ id: ios.deviceUdid,
490
+ name: liveSims.get(ios.deviceUdid),
491
+ project: path,
492
+ ...slot === "default" ? {} : { slot },
493
+ idleDays
494
+ });
495
+ const android = platforms.android;
496
+ if (android?.owned && android.avdName && liveAvds.has(android.avdName)) stale.push({
497
+ kind: "android",
498
+ id: android.avdName,
499
+ name: android.avdName,
500
+ project: path,
501
+ idleDays,
502
+ ...slot === "default" ? {} : { slot }
503
+ });
504
+ }
500
505
  }
501
506
  return stale;
502
507
  }
@@ -507,20 +512,24 @@ function findStaleDeviceRecords({ config, sims = [], avds = [], deadProjects = [
507
512
  const stale = [];
508
513
  for (const [path, proj] of Object.entries(config?.projects || {})) {
509
514
  if (dead.has(path)) continue;
510
- const ios = proj?.platforms?.ios;
511
- if (simsChecked && ios?.deviceUdid && !liveSims.has(ios.deviceUdid)) stale.push({
512
- kind: "ios",
513
- id: ios.deviceUdid,
514
- project: path,
515
- owned: Boolean(ios.owned)
516
- });
517
- const android = proj?.platforms?.android;
518
- if (avdsChecked && android?.avdName && !liveAvds.has(android.avdName)) stale.push({
519
- kind: "android",
520
- id: android.avdName,
521
- project: path,
522
- owned: Boolean(android.owned)
523
- });
515
+ for (const { slot, platforms } of projectDeviceSlots(proj)) {
516
+ const ios = platforms.ios;
517
+ if (simsChecked && ios?.deviceUdid && !liveSims.has(ios.deviceUdid)) stale.push({
518
+ kind: "ios",
519
+ id: ios.deviceUdid,
520
+ project: path,
521
+ ...slot === "default" ? {} : { slot },
522
+ owned: Boolean(ios.owned)
523
+ });
524
+ const android = platforms.android;
525
+ if (avdsChecked && android?.avdName && !liveAvds.has(android.avdName)) stale.push({
526
+ kind: "android",
527
+ id: android.avdName,
528
+ project: path,
529
+ ...slot === "default" ? {} : { slot },
530
+ owned: Boolean(android.owned)
531
+ });
532
+ }
524
533
  }
525
534
  return stale;
526
535
  }
@@ -704,12 +713,12 @@ function deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRecords)
704
713
  for (const d of staleDevices) {
705
714
  const status = reap(d);
706
715
  if (status === "torn-down" || status === "missing") {
707
- clearDevice(d.project, d.kind);
716
+ clearDevice(d.project, d.kind, d.slot);
708
717
  console.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
709
718
  }
710
719
  }
711
720
  for (const r of staleDeviceRecords) {
712
- clearDevice(r.project, r.kind);
721
+ clearDevice(r.project, r.kind, r.slot);
713
722
  console.log(chalk.green(`Cleared the ${r.kind} record for ${r.project} (${r.id} is not on this machine)`));
714
723
  }
715
724
  return deleteFailures;