stim 1.18.0 → 1.19.0

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 (140) hide show
  1. package/README.md +1 -1
  2. package/dist/{activity-BxnkDZDi.mjs → activity-BSw0x84R.mjs} +3 -3
  3. package/dist/{agent-device-usage-output-CZ66YA4T.mjs → agent-device-usage-output-Bjxu_VmX.mjs} +5 -5
  4. package/dist/{android-BvwuMUJ9.mjs → android-BXc6BmEi.mjs} +507 -347
  5. package/dist/{android-DC3ZLuw0.mjs → android-BdQC6zs1.mjs} +6 -6
  6. package/dist/{android-BKA16DTf.mjs → android-BvV1gGdN.mjs} +3 -3
  7. package/dist/{android-CBwCNicO.mjs → android-DE5g_5gv.mjs} +2 -2
  8. package/dist/{android-cas-BBFyr9CA.mjs → android-cas-C87geAg-.mjs} +3 -3
  9. package/dist/android-cas-compiler.mjs +1 -1
  10. package/dist/{api-D0VtFhqk.mjs → api-DIf_s86s.mjs} +5 -7
  11. package/dist/api-run.mjs +8 -8
  12. package/dist/api.d.mts +8 -2
  13. package/dist/api.mjs +1 -1
  14. package/dist/{app-install-D-PUENug.mjs → app-install-CFI4ptUL.mjs} +33 -13
  15. package/dist/{web-DTU0uiWj.mjs → browser-web-CDhqQxhv.mjs} +134 -172
  16. package/dist/{budget-DIhL2BKx.mjs → budget-Dz-kyXLv.mjs} +15 -202
  17. package/dist/{build-facts-DcLv2HSd.d.mts → build-facts-B87vo-Im.d.mts} +32 -1
  18. package/dist/{cache-manifest-BI7ozfmH.mjs → cache-manifest-DiwKSyv9.mjs} +1 -1
  19. package/dist/cache-manifest.mjs +1 -1
  20. package/dist/{chrome-DJnmnS5q.mjs → chrome-BTUOo8p2.mjs} +1 -1
  21. package/dist/{cli-DNJMwADx.mjs → cli-C9Zvgbdc.mjs} +20 -20
  22. package/dist/cli.mjs +1 -1
  23. package/dist/{client-DzhapoMB.mjs → client-CuUo8Nvg.mjs} +248 -23
  24. package/dist/collector-run.d.mts +6 -0
  25. package/dist/collector-run.mjs +6 -6
  26. package/dist/{command-output-CBtzyIgF.mjs → command-output-Bt8ygHE7.mjs} +1 -1
  27. package/dist/{config-CgYMahz7.mjs → config-DC5jEtd1.mjs} +6 -2
  28. package/dist/{created-devices-DKbeWsiK.mjs → created-devices-D0s26Hx5.mjs} +2 -2
  29. package/dist/{dependency-state-xKoOypBm.mjs → dependency-state-DKaS1OM9.mjs} +2 -2
  30. package/dist/{detached-entry-BLfcgc4O.mjs → detached-entry-pB_IPfV4.mjs} +1 -1
  31. package/dist/{dev-client-CLnIH02x.mjs → dev-client-CDY_zAmD.mjs} +2 -2
  32. package/dist/{device-D7oCHGWi.mjs → device-BHw0WlHl.mjs} +8 -8
  33. package/dist/{device-capacity-EUOOYr8T.mjs → device-capacity-BoN1jQkO.mjs} +23 -12
  34. package/dist/device-host-worker.mjs +14 -14
  35. package/dist/{gradle-C6GKnunQ.mjs → device-ios-B2ruohE-.mjs} +659 -105
  36. package/dist/{device-lease-Co-EwifR.mjs → device-lease-Cu7PtQpZ.mjs} +5 -5
  37. package/dist/{device-lease-run-w1xhCqIW.mjs → device-lease-run-D38SnZtt.mjs} +4 -4
  38. package/dist/{device-pool-F5WvRPtD.mjs → device-pool-CP4rAsHx.mjs} +3 -3
  39. package/dist/{device-remote-tHbd1fKy.mjs → device-remote-B5GiUifk.mjs} +15 -16
  40. package/dist/{doctor-B9ckYUoU.mjs → doctor-PRJH94v6.mjs} +53 -29
  41. package/dist/doctor-watchman-wZhyTdp4.mjs +259 -0
  42. package/dist/{error-diagnostics-BRXOqDzG.mjs → error-diagnostics--v5HGOU0.mjs} +10 -10
  43. package/dist/{exec-DWhCZDGm.mjs → exec-i8GDPwq9.mjs} +32 -8
  44. package/dist/{gc-Dh6mXOKC.mjs → gc-CyHMcKcn.mjs} +19 -19
  45. package/dist/{guide-tm6igAaa.mjs → guide-dRaQJJk9.mjs} +409 -472
  46. package/dist/{hosted-android-Bv285t_t.mjs → hosted-android-Bs7fytj7.mjs} +3 -3
  47. package/dist/{hosted-client-C-rMtppF.mjs → hosted-client-C5G4h_OJ.mjs} +1 -1
  48. package/dist/{hosted-ios-D5mNmtj4.mjs → hosted-ios-Bik035eL.mjs} +1 -1
  49. package/dist/{hosted-logs-DN8Iz4mJ.mjs → hosted-logs-CI9Az9a4.mjs} +7 -7
  50. package/dist/{hosted-macos-B-wEjlwG.mjs → hosted-macos-DABm3ScO.mjs} +4 -4
  51. package/dist/{hosted-native-DeeOG8xZ.mjs → hosted-native-DbV2aUVw.mjs} +12 -8
  52. package/dist/{idle-shutdown-jjtxAn5C.mjs → idle-shutdown-DYiMBn34.mjs} +7 -7
  53. package/dist/{ios-B3SbOWdw.mjs → ios-BWbHFZVz.mjs} +5 -5
  54. package/dist/{ios-Bvbf0SGY.mjs → ios-DCrkgXEM.mjs} +1 -1
  55. package/dist/{ios-DNpdygiv.mjs → ios-DYUr9LGc.mjs} +7 -6
  56. package/dist/ios-ITYno9rO.mjs +2241 -0
  57. package/dist/{ios-device-vOaByMhw.mjs → ios-device-CJ_ZOGky.mjs} +3 -3
  58. package/dist/{ios-device-Bn7jWDB1.mjs → ios-device-CrW8aMb5.mjs} +1 -1
  59. package/dist/{ios-state-B2pES6Vs.mjs → ios-state-By0XuLTQ.mjs} +1 -1
  60. package/dist/{launch-verify-hskNcWkZ.mjs → launch-verify-DCveSE6d.mjs} +4 -4
  61. package/dist/{logs-1Ylc1Ri6.mjs → logs-Bao1HOMy.mjs} +10 -10
  62. package/dist/{macos-DF6C7wUU.mjs → macos-ciyBdTY5.mjs} +108 -130
  63. package/dist/macos-nIOATJmR.mjs +2 -0
  64. package/dist/macos-run.mjs +1 -1
  65. package/dist/maintenance-run.mjs +7 -7
  66. package/dist/manifest-CX0d1IkZ.mjs +148 -0
  67. package/dist/{metro-Dh8T4Ytd.mjs → metro-DI2AjPF_.mjs} +194 -41
  68. package/dist/{metro-gateway-CEUw9RMH.mjs → metro-gateway-BxpJLIwh.mjs} +2 -2
  69. package/dist/{plan-placement-CtxkCO54.mjs → miss-reason-CjQCOKqq.mjs} +180 -296
  70. package/dist/{named-ports-BFIz1Shz.mjs → named-ports-B4iWH4E-.mjs} +12 -5
  71. package/dist/{native-runtime-D_603JiC.mjs → native-runtime-BGxsbfny.mjs} +6 -6
  72. package/dist/offload-worker.d.mts +1 -29
  73. package/dist/offload-worker.mjs +9 -8
  74. package/dist/{ownership-D6Se7gg_.mjs → ownership-EB0ySdGK.mjs} +2 -2
  75. package/dist/{placement-log-BcPhRwR4.mjs → placement-log-Dxe34rJm.mjs} +7 -3
  76. package/dist/plan-placement-BVY59qa8.mjs +290 -0
  77. package/dist/{ports-BLTtfBq-.mjs → ports-ByPc0_97.mjs} +3 -3
  78. package/dist/{prebuild-juCyreaR.mjs → prebuild-BKJ3wJI1.mjs} +4 -4
  79. package/dist/{preview-D5V07Nrl.mjs → preview-BbSottmO.mjs} +16 -17
  80. package/dist/project-B5eQ1USs.mjs +612 -0
  81. package/dist/{pull-request-u4vp7zmK.mjs → pull-request-IHNdMnG8.mjs} +1 -1
  82. package/dist/pull-requests.mjs +1 -1
  83. package/dist/react-native-ios-BMh2i25I.mjs +2 -0
  84. package/dist/react-native-ios-CSpIxexZ.mjs +2083 -0
  85. package/dist/{recordings-BAWltsVt.mjs → recordings-Bv8McZN4.mjs} +1 -1
  86. package/dist/{reload-DvyWzVjJ.mjs → reload-rAPdqeRR.mjs} +13 -14
  87. package/dist/{remote-cache-BGg7aGIZ.mjs → remote-cache-N3hAEaAL.mjs} +4 -4
  88. package/dist/{run-vhtDgpHO.mjs → run-lAkle1-c.mjs} +2 -2
  89. package/dist/{server-bare-B9E7S1aR.mjs → server-bare-CkIjnegq.mjs} +3 -3
  90. package/dist/server-expo-DGsdUGX2.mjs +2 -0
  91. package/dist/{server-expo-DoBHhuzK.mjs → server-expo-n3tUi3Em.mjs} +3 -3
  92. package/dist/{settings-Byp2AQ_E.mjs → settings-2am7TSxp.mjs} +5 -6
  93. package/dist/{settings-CQyMElEP.mjs → settings-CxgngUZk.mjs} +767 -15
  94. package/dist/settings.schema.json +72 -6
  95. package/dist/{simslim-EHBQ2R4G.mjs → simslim-D9LkJxIO.mjs} +5 -5
  96. package/dist/{slot-launch-C1nqh4mu.mjs → slot-launch-HV_KtPIw.mjs} +6 -6
  97. package/dist/{stage-g_WqWeaE.mjs → stage-BgaZJVZY.mjs} +1 -1
  98. package/dist/{start-NTc1Ifqs.mjs → start-D8NbxNBb.mjs} +1 -1
  99. package/dist/{start-D-IeOyoK.mjs → start-DtxthMfI.mjs} +29 -22
  100. package/dist/{state-BG-aAk4k.mjs → state-D2KtnALG.mjs} +2 -2
  101. package/dist/{state-xnqpx3AD.mjs → state-Tp4uImDS.mjs} +4 -2
  102. package/dist/{stats-DY6ekz8F.mjs → stats-8EJ5ivFT.mjs} +6 -6
  103. package/dist/{status-DCjZeE-K.mjs → status-BOyp0CUl.mjs} +25 -27
  104. package/dist/{stim-desktop-Behws_fi.mjs → stim-desktop-C65jk_q2.mjs} +1 -1
  105. package/dist/{stim-installations-aR_WsNOA.mjs → stim-installations-DbmUjsLv.mjs} +1 -1
  106. package/dist/stop-D0UIpZuh.mjs +72 -0
  107. package/dist/{stop-DIJtD2GL.mjs → stop-DRipAg-e.mjs} +2 -2
  108. package/dist/{stop-BTjs3xbc.mjs → stop-zDlknFoz.mjs} +78 -31
  109. package/dist/supervisor-run.mjs +14 -14
  110. package/dist/{support-BaayeYCf.mjs → support-CNqYkV0y.mjs} +7 -7
  111. package/dist/{support-Bwvbrq5-.mjs → support-DsNaFg6D.mjs} +5 -5
  112. package/dist/swiftpm-macos-aJzPAj1t.mjs +119 -0
  113. package/dist/{toolchain-Bnyd_K3A.mjs → toolchain-C3xSoyUl.mjs} +27 -270
  114. package/dist/{trigger-CJMhwXe8.mjs → trigger-CAhmG-4s.mjs} +3 -3
  115. package/dist/trigger-CoalsMTV.mjs +2 -0
  116. package/dist/{warm-progress-CjB-MP6H.mjs → warm-progress-pFLB2e6P.mjs} +133 -36
  117. package/dist/{status-Dcr0Qexd.mjs → watchman-BL1IdOtq.mjs} +75 -7
  118. package/dist/web-DFpFeZu5.mjs +2 -0
  119. package/dist/web-DbbrPUn0.mjs +127 -0
  120. package/dist/web-run.mjs +7 -7
  121. package/dist/{workspace-state-C59dqG-Z.mjs → workspace-state-CR9X86xJ.mjs} +1 -1
  122. package/dist/{workspaces-xXItD8Dj.mjs → workspaces-Djb2gfi9.mjs} +102 -18
  123. package/dist/{worktree-BSYlofkq.mjs → worktree-BL4M1rhB.mjs} +45 -42
  124. package/dist/{worktree-BJfnU6r5.mjs → worktree-DV-A0LNL.mjs} +1 -1
  125. package/package.json +5 -5
  126. package/shim/bundle-response.cjs +2 -1
  127. package/shim/bundle-response.d.cts +1 -1
  128. package/shim/expo-metro-config.cjs +1 -1
  129. package/dist/device-ios-6MewKKnc.mjs +0 -412
  130. package/dist/guide-status-Bhf9SJXc.mjs +0 -125
  131. package/dist/ios-CPdkoKaa.mjs +0 -3953
  132. package/dist/macos-Ck7OBMNY.mjs +0 -2
  133. package/dist/native-run-B06FkmZx.mjs +0 -158
  134. package/dist/project-C3ChRLZy.mjs +0 -212
  135. package/dist/projects-DD7dBTCj.mjs +0 -92
  136. package/dist/server-expo-Db9HBUoa.mjs +0 -2
  137. package/dist/stop-BGhKMOuH.mjs +0 -48
  138. package/dist/trigger-DWAq9hkw.mjs +0 -2
  139. package/dist/web-B6_bFDn7.mjs +0 -2
  140. package/dist/worktree-CsKYexJM.mjs +0 -753
@@ -1,17 +1,18 @@
1
1
  import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
- import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
3
- import { a as formatElapsed, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-CBtzyIgF.mjs";
4
- import { A as directorySize, B as parseDeviceSlotKey, D as withConfigLock$1, F as volumeRootFor, H as projectDeviceSlots, M as isOnMountedVolume, P as measuredDirectorySize, R as deviceSlotKey, _ as loadConfig$1, a as clearDevice, d as getConfigDir, j as formatBytes, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-CgYMahz7.mjs";
5
- import { l as resolveProjectMetro, r as killMetroTree } from "./metro-Dh8T4Ytd.mjs";
6
- import { C as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, d as sharedBuildCache, h as supervisorPidFile, o as withWorkspaceStateLock, r as readWorkspaceState$1, t as clearWorkspaceStateKey, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
7
- import { a as capacity, l as environmentState, u as formatSpace } from "./status-Dcr0Qexd.mjs";
8
- import { i as registeredCaches } from "./cache-manifest-BI7ozfmH.mjs";
9
- import { A as teardownParkedIosSim, C as eraseParkedAvd, E as teardownOwnedAvd, I as canonicalPath, M as listBuildSlots, O as teardownOwnedIosSim, P as recordGcResult, a as collectWorkspaceOutputs, f as withIdleWorkspace, k as teardownParkedAvd, m as resolveSupervisorTarget, r as clearWorkspaceOutputs, w as eraseParkedIosSim } from "./workspaces-xXItD8Dj.mjs";
10
- import { i as createDeviceProcessTables, o as idleForMs, p as workspaceActivity, r as createActivityReader } from "./activity-BxnkDZDi.mjs";
11
- import { h as listBuildLocks, i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-Co-EwifR.mjs";
12
- import { A as listAvds, I as ownedAvdDirectory, at as isStimOwnedSim, ct as dropParked, it as isStimOwnedAvd, pt as readParked, z as ownedAvdSerialResolver } from "./android-DC3ZLuw0.mjs";
13
- import { d as listAllIosSims, p as listIosDeviceTypes, v as parseRuntimeVersion } from "./ios-B3SbOWdw.mjs";
14
- import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-BFIz1Shz.mjs";
2
+ import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
3
+ import { a as formatElapsed, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-Bt8ygHE7.mjs";
4
+ import { A as directorySize, D as withConfigLock$1, F as volumeRootFor, H as projectDeviceSlots, M as isOnMountedVolume, P as measuredDirectorySize, _ as loadConfig$1, a as clearDevice, d as getConfigDir, j as formatBytes, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-DC5jEtd1.mjs";
5
+ import { a as updateWorkspaceState, c as writeWorkspaceState, d as sharedBuildCache, r as readWorkspaceState$1, t as clearWorkspaceStateKey, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
6
+ import { D as readPidFile, T as clearWorkspaceSupervisor } from "./project-B5eQ1USs.mjs";
7
+ import { r as killMetroTree, u as resolveProjectMetro } from "./metro-DI2AjPF_.mjs";
8
+ import { a as parseWatchmanPid, d as capacity, g as formatSpace, h as environmentState, i as parseWatchmanClients, n as parseTriggerCount, r as parseWatchRoots, t as parseSubscriberNames } from "./watchman-BL1IdOtq.mjs";
9
+ import { i as registeredCaches } from "./cache-manifest-DiwKSyv9.mjs";
10
+ import { A as teardownParkedAvd, D as teardownOwnedAvd, F as recordGcResult, L as canonicalPath, N as listBuildSlots, T as eraseParkedIosSim, a as collectWorkspaceOutputs, f as withIdleWorkspace, j as teardownParkedIosSim, k as teardownOwnedIosSim, m as resolveSupervisorTarget, r as clearWorkspaceOutputs, w as eraseParkedAvd } from "./workspaces-Djb2gfi9.mjs";
11
+ import { i as createDeviceProcessTables, o as idleForMs, p as workspaceActivity, r as createActivityReader } from "./activity-BSw0x84R.mjs";
12
+ import { h as listBuildLocks, i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-Cu7PtQpZ.mjs";
13
+ import { A as listAvds, I as ownedAvdDirectory, at as isStimOwnedSim, ct as dropParked, it as isStimOwnedAvd, pt as readParked, z as ownedAvdSerialResolver } from "./android-BdQC6zs1.mjs";
14
+ import { d as listAllIosSims, p as listIosDeviceTypes, v as parseRuntimeVersion } from "./ios-BWbHFZVz.mjs";
15
+ import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-B4iWH4E-.mjs";
15
16
  import { c as supervisorError } from "./metro-store-BAHFcJm6.mjs";
16
17
  import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
17
18
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, statfsSync, writeFileSync } from "node:fs";
@@ -551,194 +552,6 @@ function attributeMachineUsage({ processes, footprints, environments, roots, sim
551
552
  };
552
553
  }
553
554
  //#endregion
554
- //#region src/supervisor/state.ts
555
- const MODE_BARE = "bare-inproc";
556
- const MODE_EXPO = "expo-child";
557
- function readMetroTunnel(root) {
558
- const record = readWorkspaceState$1(root)?.metroTunnel;
559
- if (!record || typeof record !== "object") return null;
560
- const kind = record.kind;
561
- const url = record.url;
562
- if (typeof url !== "string" || url.length === 0) return null;
563
- if (kind === "expo") return {
564
- kind: "expo",
565
- url
566
- };
567
- if (kind === "managed") {
568
- const provider = record.provider;
569
- const pid = record.pid;
570
- const port = record.port;
571
- const startedAt = record.startedAt;
572
- const processToken = record.processToken;
573
- const logFile = record.logFile;
574
- if (provider !== "ngrok" && provider !== "cloudflared" && provider !== "tailscale" || typeof pid !== "number" || typeof port !== "number") return null;
575
- return {
576
- kind: "managed",
577
- provider,
578
- pid,
579
- url,
580
- port,
581
- startedAt: typeof startedAt === "string" ? startedAt : "",
582
- processToken: typeof processToken === "string" && processToken.length > 0 ? processToken : null,
583
- ...typeof logFile === "string" && logFile.length > 0 ? { logFile } : {}
584
- };
585
- }
586
- return null;
587
- }
588
- function parseWorkspaceLaunchRecord(value) {
589
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
590
- const record = value;
591
- if (typeof record.appId !== "string" || record.appId.length === 0) return null;
592
- if (typeof record.deviceId !== "string" || record.deviceId.length === 0) return null;
593
- if (record.metroPort !== null && typeof record.metroPort !== "number") return null;
594
- if (typeof record.release !== "boolean") return null;
595
- if (typeof record.launchedAt !== "string") return null;
596
- return record;
597
- }
598
- function readWorkspaceLaunches(root) {
599
- const launches = readWorkspaceState$1(root)?.launches;
600
- if (!launches || typeof launches !== "object" || Array.isArray(launches)) return {};
601
- const records = {};
602
- for (const [key, value] of Object.entries(launches)) {
603
- const record = parseWorkspaceLaunchRecord(value);
604
- if (parseDeviceSlotKey(key) && record) records[key] = record;
605
- }
606
- return records;
607
- }
608
- function writeWorkspaceLaunch(root, platform, record, slot = "default") {
609
- updateWorkspaceState(root, (state) => {
610
- const launches = state.launches && typeof state.launches === "object" ? state.launches : {};
611
- return {
612
- ...state,
613
- launches: {
614
- ...launches,
615
- [deviceSlotKey(platform, slot)]: record
616
- }
617
- };
618
- });
619
- }
620
- function clearWorkspaceLaunches(root, slot) {
621
- updateWorkspaceState(root, (state) => {
622
- if (!state.launches || typeof state.launches !== "object") return state;
623
- const launches = { ...state.launches };
624
- delete launches[deviceSlotKey("ios", slot)];
625
- delete launches[deviceSlotKey("android", slot)];
626
- return {
627
- ...state,
628
- launches
629
- };
630
- });
631
- }
632
- function readRemoteSession(root) {
633
- const record = readWorkspaceState$1(root)?.remoteDevice;
634
- if (!record || typeof record !== "object") return null;
635
- const id = record.sessionId;
636
- if (typeof id !== "string" || id.length === 0) return null;
637
- const platform = record.platform;
638
- const startedAt = record.startedAt;
639
- const webPreviewUrl = record.webPreviewUrl;
640
- const deviceType = record.deviceType;
641
- return {
642
- platform: platform === "ios" || platform === "android" ? platform : null,
643
- sessionId: id,
644
- startedAt: typeof startedAt === "string" ? startedAt : null,
645
- webPreviewUrl: typeof webPreviewUrl === "string" && webPreviewUrl.length > 0 ? webPreviewUrl : null,
646
- deviceType: typeof deviceType === "string" && deviceType.length > 0 ? deviceType : null
647
- };
648
- }
649
- function readRemoteSessionId(root) {
650
- return readRemoteSession(root)?.sessionId ?? null;
651
- }
652
- function clearRemoteSession(root, expectedSessionId) {
653
- clearWorkspaceStateKey(root, "remoteDevice", (value) => {
654
- if (typeof value !== "object" || value === null) return false;
655
- return value.sessionId === expectedSessionId;
656
- });
657
- }
658
- function clearWorkspaceSupervisor(root, expected) {
659
- return withWorkspaceStateLock(root, () => {
660
- const current = readWorkspaceState$1(root)?.supervisor;
661
- if (current && expected !== void 0 && !(0, process_identity_exports.sameProcessRecord)(current, expected)) return false;
662
- clearWorkspaceStateKey(root, "supervisor", () => true);
663
- clearExpoMetroTunnel(root);
664
- if (expected === void 0 || readPidFile(root) === expected?.pid) rmSync(supervisorPidFile(root), { force: true });
665
- return true;
666
- });
667
- }
668
- function clearExpoMetroTunnel(root) {
669
- clearWorkspaceStateKey(root, "metroTunnel", (value) => {
670
- return typeof value === "object" && value !== null && value.kind === "expo";
671
- });
672
- }
673
- function clearManagedMetroTunnel(root, expected) {
674
- if (!existsSync(workspaceStateFile(root))) return true;
675
- return clearWorkspaceStateKey(root, "metroTunnel", (value) => {
676
- if (typeof value !== "object" || value === null) return false;
677
- const record = value;
678
- return record.kind === "managed" && record.provider === expected.provider && record.pid === expected.pid && record.url === expected.url && record.port === expected.port && record.startedAt === expected.startedAt && (record.processToken ?? null) === (expected.processToken ?? null) && (record.logFile ?? null) === (expected.logFile ?? null);
679
- });
680
- }
681
- function writePidFile(root, pid) {
682
- const file = supervisorPidFile(root);
683
- mkdirSync(dirname(file), { recursive: true });
684
- writeFileSync(file, `${pid}\n`);
685
- return file;
686
- }
687
- function readPidFile(root) {
688
- try {
689
- const pid = parseInt(readFileSync(supervisorPidFile(root), "utf-8").trim(), 10);
690
- return Number.isFinite(pid) ? pid : null;
691
- } catch {
692
- return null;
693
- }
694
- }
695
- //#endregion
696
- //#region src/watchman.ts
697
- /** Runs one watchman command with `--no-spawn`, so Stim never starts a daemon, and parses its JSON answer. */
698
- const runWatchman = async (args, timeoutMs) => JSON.parse(await getExecutor().runFileAsync("watchman", ["--no-spawn", ...args], { timeoutMs }));
699
- function parseWatchRoots(payload) {
700
- const roots = payload?.roots;
701
- if (!Array.isArray(roots)) return null;
702
- return roots.filter((root) => typeof root === "string");
703
- }
704
- function parseSubscriberNames(payload) {
705
- if (!payload || typeof payload !== "object" || "error" in payload) return null;
706
- const subscribers = payload.subscribers;
707
- if (subscribers === void 0) return [];
708
- if (!Array.isArray(subscribers)) return null;
709
- const names = [];
710
- for (const subscriber of subscribers) {
711
- const name = subscriber?.info?.name;
712
- if (typeof name !== "string") return null;
713
- names.push(name);
714
- }
715
- return names;
716
- }
717
- function parseTriggerCount(payload) {
718
- const triggers = payload?.triggers;
719
- return Array.isArray(triggers) ? triggers.length : null;
720
- }
721
- function parseWatchmanPid(payload) {
722
- const pid = payload?.pid;
723
- return typeof pid === "number" && Number.isInteger(pid) && pid > 0 ? pid : null;
724
- }
725
- /** The connected clients in a `debug-status` answer, or null when the answer does not list them. */
726
- function parseWatchmanClients(payload) {
727
- if (!payload || typeof payload !== "object" || "error" in payload) return null;
728
- const clients = payload.clients;
729
- if (!Array.isArray(clients)) return null;
730
- const parsed = [];
731
- for (const client of clients) {
732
- const peer = client?.peer;
733
- if (typeof peer?.pid !== "number") return null;
734
- parsed.push({
735
- pid: peer.pid,
736
- name: typeof peer.name === "string" ? peer.name : null
737
- });
738
- }
739
- return parsed;
740
- }
741
- //#endregion
742
555
  //#region src/commands/gc/progress.ts
743
556
  function phase(label, text) {
744
557
  console.error(chalk.dim(phaseLine(label, text)));
@@ -4254,4 +4067,4 @@ function budgetLine(report) {
4254
4067
  return `${report.volumes.length ? `${report.volumes.map((v) => `${v.freeGb} GB free on ${v.volume}`).join(", ")} (reclaims below ${Math.max(budget.minFreeDiskGb, budget.hardFloorDiskGb)} GB, ${budget.hardFloorDiskGb ? `refuses below ${budget.hardFloorDiskGb} GB` : "never refuses"})` : "disk budget off"}; ${report.memory ? `roughly ${report.memory.committedGb} GB of a ${budget.maxCommittedMemoryGb} GB memory budget committed` : "memory budget off"}`;
4255
4068
  }
4256
4069
  //#endregion
4257
- export { describeUnverifiableDevices as $, sizeCaches as $t, buildReport as A, phase as At, readStats$1 as B, clearWorkspaceLaunches as Bt, idleDeviceLines as C, memoryCacheKind as Ct, ACTIVE_BUILD_KEY as D, memoryWorkPending as Dt, workspaceBuildInProgress as E, memorySweepIsScoped as Et, recordFinishedBuild as F, MODE_BARE as Ft, DEVICE_LIST_TIMEOUT_MS$1 as G, readRemoteSessionId as Gt, recordCapacityWait as H, readMetroTunnel as Ht, startBuildProgress as I, MODE_EXPO as It, collectParkedSims as J, writeWorkspaceLaunch as Jt, collectDeviceLeases as K, readWorkspaceLaunches as Kt, tapBuildLog as L, clearExpoMetroTunnel as Lt, estimateBuild as M, parseTriggerCount as Mt, parseActiveBuild as N, parseWatchRoots as Nt, NO_BUILD_PROGRESS as O, reclaimMemory as Ot, recordBuildPhase as P, runWatchman as Pt, describeParkedSims as Q, pruneCache as Qt, createRunRecorder as R, clearManagedMetroTunnel as Rt, collectOwnedDeviceActivity as S, inspectWatchmanMemory as St, shutDownIdleDevices as T, memoryScope as Tt, recordRunStats as U, readPidFile as Ut, recordCapacityRefusal as V, clearWorkspaceSupervisor as Vt, statsProjectKey$1 as W, readRemoteSession as Wt, deleteParkedSims as X, readFootprints as Xt, deleteParkedAvds as Y, attributeMachineUsage as Yt, deleteProjectDevices as Z, discoverCaches as Zt, metroLastStop as _, trimCaches as _t, inspectBudget as a, unverifiedDeviceCommand as at, withdrawDevServerStopRequest as b, WATCHMAN_KIND as bt, readVolumeSpace as c, includesArchives as ct, stopOwnedMetroForReset as d, includesWorkspaceOutputs as dt, deviceSweepIsScoped as et, describeDevServerStop as f, isWorkspacesScope as ft, logVanishedSupervisor as g, selectsBeyondCaches as gt, devServerStopRecord as h, selectCaches as ht, enforceBudget as i, findStaleProjectDevices as it, buildStatusLine as j, parseSubscriberNames as jt, activeBuildState as k, scopedMemoryReport as kt, resolveBudget as l, includesParkedDevices as lt, devServerStopLevel as m, previewScopedEmptying as mt, budgetLine as n, findOrphanedDevices as nt, machineNumber as o, withAndroidAvdSizes as ot, describeMetroLastStop as p, planCacheEmptying as pt, collectParkedAvds as q, writePidFile as qt, cacheLabel as r, findStaleDeviceRecords as rt, peekBudget as s, emptyCaches as st, budgetGate as t, eraseParkedDevices as tt, trimmableCaches as u, includesRecordings as ut, requestDevServerStop as v, parseArchiveSelector as vt, parseIdleDuration as w, memoryLines as wt, collectIdleDevices as x, collectMemoryReport as xt, vanishedSupervisorMessage as y, GRADLE_DAEMONS_KIND as yt, readRunEstimates as z, clearRemoteSession as zt };
4070
+ export { describeUnverifiableDevices as $, buildReport as A, phase as At, readStats$1 as B, idleDeviceLines as C, memoryCacheKind as Ct, ACTIVE_BUILD_KEY as D, memoryWorkPending as Dt, workspaceBuildInProgress as E, memorySweepIsScoped as Et, recordFinishedBuild as F, sizeCaches as Ft, DEVICE_LIST_TIMEOUT_MS$1 as G, recordCapacityWait as H, startBuildProgress as I, collectParkedSims as J, collectDeviceLeases as K, tapBuildLog as L, estimateBuild as M, readFootprints as Mt, parseActiveBuild as N, discoverCaches as Nt, NO_BUILD_PROGRESS as O, reclaimMemory as Ot, recordBuildPhase as P, pruneCache as Pt, describeParkedSims as Q, createRunRecorder as R, collectOwnedDeviceActivity as S, inspectWatchmanMemory as St, shutDownIdleDevices as T, memoryScope as Tt, recordRunStats as U, recordCapacityRefusal as V, statsProjectKey$1 as W, deleteParkedSims as X, deleteParkedAvds as Y, deleteProjectDevices as Z, metroLastStop as _, trimCaches as _t, inspectBudget as a, unverifiedDeviceCommand as at, withdrawDevServerStopRequest as b, WATCHMAN_KIND as bt, readVolumeSpace as c, includesArchives as ct, stopOwnedMetroForReset as d, includesWorkspaceOutputs as dt, deviceSweepIsScoped as et, describeDevServerStop as f, isWorkspacesScope as ft, logVanishedSupervisor as g, selectsBeyondCaches as gt, devServerStopRecord as h, selectCaches as ht, enforceBudget as i, findStaleProjectDevices as it, buildStatusLine as j, attributeMachineUsage as jt, activeBuildState as k, scopedMemoryReport as kt, resolveBudget as l, includesParkedDevices as lt, devServerStopLevel as m, previewScopedEmptying as mt, budgetLine as n, findOrphanedDevices as nt, machineNumber as o, withAndroidAvdSizes as ot, describeMetroLastStop as p, planCacheEmptying as pt, collectParkedAvds as q, cacheLabel as r, findStaleDeviceRecords as rt, peekBudget as s, emptyCaches as st, budgetGate as t, eraseParkedDevices as tt, trimmableCaches as u, includesRecordings as ut, requestDevServerStop as v, parseArchiveSelector as vt, parseIdleDuration as w, memoryLines as wt, collectIdleDevices as x, collectMemoryReport as xt, vanishedSupervisorMessage as y, GRADLE_DAEMONS_KIND as yt, readRunEstimates as z };
@@ -1,3 +1,34 @@
1
+ import "./state-lKh8shBp.mjs";
2
+ import "./ndjson-Du3j0AQ9.mjs";
3
+ import "@stim-cli/core/state";
4
+ //#region src/optimizations.d.ts
5
+ interface Optimizations {
6
+ buildCache: boolean;
7
+ remoteBuildCache: boolean;
8
+ releaseBundleSwap: boolean;
9
+ metroSharedCache: boolean;
10
+ metroWarmup: boolean;
11
+ ios: {
12
+ compilationCache: boolean;
13
+ swiftCompilationCache: boolean | null;
14
+ prefixMapping: boolean;
15
+ };
16
+ android: {
17
+ compilerCache: "ccache" | "cas" | "none";
18
+ casToolchain: string | null;
19
+ compilerCacheFallback: CompilerCacheFallback | null;
20
+ pch: "auto" | "on" | "off";
21
+ gradleBuildCache: boolean;
22
+ targetAbiOnly: boolean;
23
+ };
24
+ }
25
+ interface CompilerCacheFallback {
26
+ key: string;
27
+ reason: string;
28
+ fromEnvironment: boolean;
29
+ manifest: string | null;
30
+ }
31
+ //#endregion
1
32
  //#region src/engine/build-facts.d.ts
2
33
  type CacheHitLevel = "local" | "remote" | false;
3
34
  type LaunchStatus = boolean | "unverified" | "bundling";
@@ -108,4 +139,4 @@ interface AndroidFacts {
108
139
  devServer?: DevServerStart;
109
140
  }
110
141
  //#endregion
111
- export { IosFacts as i, CcacheActivity as n, CompilationCacheActivity as r, AndroidFacts as t };
142
+ export { Optimizations as a, IosFacts as i, CcacheActivity as n, CompilationCacheActivity as r, AndroidFacts as t };
@@ -1,4 +1,4 @@
1
- import { d as getConfigDir } from "./config-CgYMahz7.mjs";
1
+ import { d as getConfigDir } from "./config-DC5jEtd1.mjs";
2
2
  import { isAbsolute, join, resolve } from "path";
3
3
  import { existsSync } from "fs";
4
4
  import { readCacheManifest, updateCacheManifest } from "@stim-cli/core";
@@ -1,2 +1,2 @@
1
- import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-BI7ozfmH.mjs";
1
+ import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-DiwKSyv9.mjs";
2
2
  export { manifestPath, readManifest, register, registeredCaches, unregister };
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
1
+ import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { homedir } from "node:os";
@@ -1,27 +1,27 @@
1
- import { n as debugLog } from "./exec-DWhCZDGm.mjs";
2
- import { y as refuseRelativeStimPaths } from "./config-CgYMahz7.mjs";
1
+ import { n as debugLog } from "./exec-i8GDPwq9.mjs";
2
+ import { y as refuseRelativeStimPaths } from "./config-DC5jEtd1.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { runId } from "@stim-cli/core/state";
5
5
  import { Command } from "commander";
6
6
  //#region bin/cli.ts
7
7
  const commands = /* @__PURE__ */ new Map([
8
- ["doctor", () => import("./doctor-B9ckYUoU.mjs")],
9
- ["worktree", () => import("./worktree-BJfnU6r5.mjs")],
10
- ["start", () => import("./start-NTc1Ifqs.mjs")],
11
- ["ports", () => import("./ports-BLTtfBq-.mjs")],
12
- ["stop", () => import("./stop-DIJtD2GL.mjs")],
13
- ["ios", () => import("./ios-DNpdygiv.mjs")],
14
- ["android", () => import("./android-BKA16DTf.mjs")],
15
- ["web", () => import("./web-B6_bFDn7.mjs")],
16
- ["macos", () => import("./macos-Ck7OBMNY.mjs")],
17
- ["reload", () => import("./reload-DvyWzVjJ.mjs")],
18
- ["device", () => import("./device-D7oCHGWi.mjs")],
19
- ["logs", () => import("./logs-1Ylc1Ri6.mjs")],
20
- ["settings", () => import("./settings-Byp2AQ_E.mjs")],
21
- ["status", () => import("./status-DCjZeE-K.mjs")],
22
- ["stats", () => import("./stats-DY6ekz8F.mjs")],
23
- ["gc", () => import("./gc-Dh6mXOKC.mjs")],
24
- ["guide", () => import("./guide-tm6igAaa.mjs")]
8
+ ["doctor", () => import("./doctor-PRJH94v6.mjs")],
9
+ ["worktree", () => import("./worktree-DV-A0LNL.mjs")],
10
+ ["start", () => import("./start-D8NbxNBb.mjs")],
11
+ ["ports", () => import("./ports-ByPc0_97.mjs")],
12
+ ["stop", () => import("./stop-DRipAg-e.mjs")],
13
+ ["ios", () => import("./ios-DYUr9LGc.mjs")],
14
+ ["android", () => import("./android-BvV1gGdN.mjs")],
15
+ ["web", () => import("./web-DFpFeZu5.mjs")],
16
+ ["macos", () => import("./macos-nIOATJmR.mjs")],
17
+ ["reload", () => import("./reload-rAPdqeRR.mjs")],
18
+ ["device", () => import("./device-BHw0WlHl.mjs")],
19
+ ["logs", () => import("./logs-Bao1HOMy.mjs")],
20
+ ["settings", () => import("./settings-2am7TSxp.mjs")],
21
+ ["status", () => import("./status-BOyp0CUl.mjs")],
22
+ ["stats", () => import("./stats-8EJ5ivFT.mjs")],
23
+ ["gc", () => import("./gc-CyHMcKcn.mjs")],
24
+ ["guide", () => import("./guide-dRaQJJk9.mjs")]
25
25
  ]);
26
26
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
27
27
  const program = new Command();
@@ -52,7 +52,7 @@ try {
52
52
  }));
53
53
  }
54
54
  try {
55
- const { triggerMaintenance } = await import("./trigger-DWAq9hkw.mjs");
55
+ const { triggerMaintenance } = await import("./trigger-CoalsMTV.mjs");
56
56
  triggerMaintenance(action.name());
57
57
  } catch {}
58
58
  });
package/dist/cli.mjs CHANGED
@@ -4,6 +4,6 @@ const encode = (version) => version.split(".", 3).reduce((sum, part) => sum * 1e
4
4
  if (encode(process.versions.node) < encode("22.12.0")) {
5
5
  process.stderr.write(`STIM_NODE_UNSUPPORTED: Stim needs Node 22.12.0 or later; this is Node ${process.versions.node} at ${process.execPath}. To run Stim where a project pins an older Node, see https://stim.appandflow.com/docs/requirements#older-node-pins\n`);
6
6
  process.exitCode = 1;
7
- } else import("./cli-DNJMwADx.mjs");
7
+ } else import("./cli-C9Zvgbdc.mjs");
8
8
  //#endregion
9
9
  export {};