stim 1.3.1 → 1.4.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 (63) hide show
  1. package/README.md +13 -0
  2. package/dist/{android-CT-PkXUh.mjs → android-BTR1KTMP.mjs} +197 -114
  3. package/dist/{android-hMj83VpN.mjs → android-BkM4qTaN.mjs} +65 -72
  4. package/dist/{android-cas-DXorPCi_.mjs → android-cas-BjLRZyks.mjs} +15 -12
  5. package/dist/{app-install-DIp9riNx.mjs → app-install--PAocWvq.mjs} +2 -2
  6. package/dist/{build-slots-C4AouyNz.mjs → build-slots-D6sDzOe-.mjs} +7 -8
  7. package/dist/{cache-manifest-CXR-Y8pH.mjs → cache-manifest-D02TpYjA.mjs} +1 -1
  8. package/dist/cache-manifest.mjs +1 -1
  9. package/dist/cli.mjs +14 -13
  10. package/dist/collector-run.mjs +4 -4
  11. package/dist/{command-output-8wHMEde0.mjs → command-output-BuIb_ZOI.mjs} +1 -4
  12. package/dist/{config-CcefMY2Q.mjs → config-6vdGngKa.mjs} +51 -51
  13. package/dist/dependency-state-BMirHEPD.mjs +76 -0
  14. package/dist/{deps-0Yt0Inly.mjs → deps-Ck4wuTwa.mjs} +1 -1
  15. package/dist/{dev-client-VfSZNLT4.mjs → dev-client-Cd0v7iZk.mjs} +12 -12
  16. package/dist/{device-Bbv45Z9Z.mjs → device-CKXLnRRb.mjs} +7 -7
  17. package/dist/{xcode-xnxyvJkD.mjs → device-CMDFzx7C.mjs} +208 -967
  18. package/dist/{device-lease-CJwK7OZr.mjs → device-lease-DDJr85OK.mjs} +3 -3
  19. package/dist/{device-pool-CcBNTvM7.mjs → device-pool-DJvbIBGW.mjs} +4 -4
  20. package/dist/{device-remote-DAA0Zm6Z.mjs → device-remote-CMfHhoc8.mjs} +7 -6
  21. package/dist/{doctor-B4EITgQB.mjs → doctor-B_mfURdt.mjs} +536 -114
  22. package/dist/{error-diagnostics-DwhNBFDU.mjs → error-diagnostics-_VmkqRZo.mjs} +7 -6
  23. package/dist/{gc-BRu62v4o.mjs → gc-0AyxmECv.mjs} +61 -27
  24. package/dist/{guide-D95E0u3i.mjs → guide-CGxdmQ0K.mjs} +126 -7
  25. package/dist/{ios-DAju3TVy.mjs → ios-CtmGLx3X.mjs} +2667 -2607
  26. package/dist/{ios-device-CWOM_S44.mjs → ios-device-DJOi9FR5.mjs} +1 -1
  27. package/dist/{logs-CAdwW6c2.mjs → logs-BF3qPA7w.mjs} +5 -5
  28. package/dist/metro-DFLmaVz8.mjs +99 -0
  29. package/dist/named-ports-BO7Zpjp0.mjs +137 -0
  30. package/dist/{ownership-8O073GIC.mjs → ownership-BvSpZVBk.mjs} +5 -5
  31. package/dist/{ownership-DXcol4oU.mjs → ownership-C08Yzrp7.mjs} +6 -6
  32. package/dist/ports-BiKqP92J.mjs +39 -0
  33. package/dist/ports-ClqG8GPt.mjs +90 -0
  34. package/dist/{project-fKmuIaMI.mjs → project-CBFCwnN5.mjs} +2 -2
  35. package/dist/{reclaim-CUmwucWG.mjs → reclaim-DpDVo-AP.mjs} +20 -13
  36. package/dist/{reload-CWpXoOgN.mjs → reload-ByTqg6ZI.mjs} +8 -8
  37. package/dist/rolldown-runtime-BsOwBuO_.mjs +30 -0
  38. package/dist/{server-bare-DEzPZLvf.mjs → server-bare-Buk-k8tI.mjs} +3 -6
  39. package/dist/{server-expo-DizT4OMk.mjs → server-expo-D4P7iTvf.mjs} +3 -3
  40. package/dist/server-expo-Dho5Raiw.mjs +2 -0
  41. package/dist/{settings-DEJf6_kJ.mjs → settings-DwfltIXQ.mjs} +2 -2
  42. package/dist/{slot-launch-CZklomj6.mjs → slot-launch-DeKen9e5.mjs} +4 -4
  43. package/dist/{start-B5G4NjiA.mjs → start-BpKUHcU_.mjs} +15 -13
  44. package/dist/state-CDbvmZdt.mjs +131 -0
  45. package/dist/{stats-BR-kwj0B.mjs → stats-C59QLKm2.mjs} +1 -1
  46. package/dist/{stats-CaaQr4yN.mjs → stats-k5qMjyxo.mjs} +4 -4
  47. package/dist/{status-CI9clRSb.mjs → status-Y2ij3dm6.mjs} +12 -11
  48. package/dist/{stop-CjlgDk0a.mjs → stop-_P2OQwmZ.mjs} +15 -14
  49. package/dist/{stop-CQhffpmX.mjs → stop-vKmmxhea.mjs} +2 -2
  50. package/dist/supervisor-run.d.mts +3 -27
  51. package/dist/supervisor-run.mjs +7 -6
  52. package/dist/{teardown--gESs9ck.mjs → teardown-KsPpvldq.mjs} +148 -109
  53. package/dist/{workspace-process-lock-IBj1Towr.mjs → workspace-process-lock-UEIrvZMJ.mjs} +4 -4
  54. package/dist/workspace-state-Do1e2mOH.mjs +146 -0
  55. package/dist/{worktree-DtQGO9-s.mjs → worktree-BvcAIMdJ.mjs} +24 -25
  56. package/dist/{worktree-Eq6TLH8N.mjs → worktree-DWNx4tUg.mjs} +32 -2
  57. package/dist/xcode-D9tVItl-.mjs +860 -0
  58. package/package.json +7 -7
  59. package/dist/doctor-BueDfLYG.mjs +0 -530
  60. package/dist/metro-CORqXyTL.mjs +0 -184
  61. package/dist/ownership-claim-BtPtJVmq.mjs +0 -584
  62. package/dist/server-expo-44em5Pmg.mjs +0 -2
  63. package/dist/state-B3XA2wp2.mjs +0 -268
@@ -0,0 +1,76 @@
1
+ import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
+ import { _ as repoRoot } from "./worktree-DWNx4tUg.mjs";
3
+ import { existsSync } from "node:fs";
4
+ import { dirname, join, relative } from "node:path";
5
+ //#region src/dependency-state.ts
6
+ function installedNpmTreeIsValid(projectRoot) {
7
+ try {
8
+ getExecutor().runFile("npm", [
9
+ "ls",
10
+ "--all",
11
+ "--json",
12
+ "--silent"
13
+ ], {
14
+ cwd: projectRoot,
15
+ timeoutMs: 3e4
16
+ });
17
+ return true;
18
+ } catch {
19
+ return false;
20
+ }
21
+ }
22
+ const DEPENDENCY_STATES = [
23
+ {
24
+ lock: "pnpm-lock.yaml",
25
+ installed: ["node_modules"],
26
+ command: "pnpm install"
27
+ },
28
+ {
29
+ lock: "yarn.lock",
30
+ installed: [
31
+ "node_modules",
32
+ ".pnp.cjs",
33
+ ".pnp.js"
34
+ ],
35
+ command: "yarn install"
36
+ },
37
+ {
38
+ lock: "bun.lock",
39
+ installed: ["node_modules"],
40
+ command: "bun install"
41
+ },
42
+ {
43
+ lock: "bun.lockb",
44
+ installed: ["node_modules"],
45
+ command: "bun install"
46
+ },
47
+ {
48
+ lock: "package-lock.json",
49
+ installed: ["node_modules"],
50
+ command: "npm ci"
51
+ }
52
+ ];
53
+ function dependencyState(projectRoot) {
54
+ const root = repoRoot(projectRoot) ?? projectRoot;
55
+ let dir = projectRoot;
56
+ while (true) {
57
+ const state = DEPENDENCY_STATES.find((candidate) => existsSync(join(dir, candidate.lock)));
58
+ if (state) return {
59
+ ...state,
60
+ root: dir
61
+ };
62
+ if (dir === root) return null;
63
+ const parent = dirname(dir);
64
+ if (parent === dir || relative(root, parent).startsWith("..")) return null;
65
+ dir = parent;
66
+ }
67
+ }
68
+ function hasInstalledDependencies(projectRoot, markers = [
69
+ "node_modules",
70
+ ".pnp.cjs",
71
+ ".pnp.js"
72
+ ]) {
73
+ return markers.some((entry) => existsSync(join(projectRoot, entry)));
74
+ }
75
+ //#endregion
76
+ export { hasInstalledDependencies as n, installedNpmTreeIsValid as r, dependencyState as t };
@@ -1,6 +1,6 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
2
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-C7IlIzd7.mjs";
3
- import { f as startBuildHeartbeat, h as bundlerPin, r as HEARTBEAT_INTERVAL_MS } from "./xcode-xnxyvJkD.mjs";
3
+ import { d as startBuildHeartbeat, m as bundlerPin, n as HEARTBEAT_INTERVAL_MS } from "./xcode-D9tVItl-.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { dirname, join, relative, resolve, sep } from "node:path";
6
6
  import { homedir } from "node:os";
@@ -1,15 +1,15 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { y as ensureWorkspaceStorage } from "./state-B3XA2wp2.mjs";
3
- import { C as removeTemporaryEntry, S as makeTemporaryDirectory } from "./worktree-Eq6TLH8N.mjs";
4
- import { i as detectIsExpo, o as isPackageResolvable } from "./project-fKmuIaMI.mjs";
2
+ import { E as ownership_claim_exports } from "./config-6vdGngKa.mjs";
3
+ import { c as ensureWorkspaceStorage } from "./workspace-state-Do1e2mOH.mjs";
4
+ import { C as makeTemporaryDirectory, w as removeTemporaryEntry } from "./worktree-DWNx4tUg.mjs";
5
+ import { i as detectIsExpo, o as isPackageResolvable } from "./project-CBFCwnN5.mjs";
5
6
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-C7IlIzd7.mjs";
6
- import { t as NOT_OURS_FOREIGN_CWD } from "./metro-CORqXyTL.mjs";
7
- import { r as claimFailure } from "./ownership-claim-BtPtJVmq.mjs";
8
- import { V as releaseBuildLock, z as acquireBuildLock } from "./android-hMj83VpN.mjs";
9
- import { i as expoBinRefusal, r as expoBinPath, t as cleanLine } from "./server-expo-DizT4OMk.mjs";
10
- import { x as resolveEasCliBin } from "./teardown--gESs9ck.mjs";
11
- import { i as LAUNCH_BUNDLING, s as LAUNCH_UNVERIFIED } from "./app-install-DIp9riNx.mjs";
12
- import { f as startBuildHeartbeat, p as tailLines, r as HEARTBEAT_INTERVAL_MS } from "./xcode-xnxyvJkD.mjs";
7
+ import { t as NOT_OURS_FOREIGN_CWD } from "./metro-DFLmaVz8.mjs";
8
+ import { V as releaseBuildLock, z as acquireBuildLock } from "./android-BkM4qTaN.mjs";
9
+ import { i as expoBinRefusal, r as expoBinPath, t as cleanLine } from "./server-expo-D4P7iTvf.mjs";
10
+ import { S as resolveEasCliBin } from "./teardown-KsPpvldq.mjs";
11
+ import { i as LAUNCH_BUNDLING, s as LAUNCH_UNVERIFIED } from "./app-install--PAocWvq.mjs";
12
+ import { d as startBuildHeartbeat, f as tailLines, n as HEARTBEAT_INTERVAL_MS } from "./xcode-D9tVItl-.mjs";
13
13
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
14
14
  import { createHash } from "node:crypto";
15
15
  import { basename, join } from "node:path";
@@ -50,7 +50,7 @@ function selectEasBuild(builds, { platform, profile, fingerprint, projectId, phy
50
50
  if (!Array.isArray(builds)) throw new Error("EAS build:list did not return an array.");
51
51
  for (const value of builds) {
52
52
  const build = object(value);
53
- if (typeof build.id === "string" && build.id.length > 0 && build.status === "FINISHED" && build.platform === platform.toUpperCase() && build.buildProfile === profile && object(build.fingerprint).hash === fingerprint && object(build.project).id === projectId && (platform !== "ios" || build.isForIosSimulator === !physical) && build.distribution === "INTERNAL" && typeof object(build.artifacts).applicationArchiveUrl === "string") return build.id;
53
+ if (typeof build.id === "string" && build.id.length > 0 && build.status === "FINISHED" && build.platform === platform.toUpperCase() && build.buildProfile === profile && object(build.fingerprint).hash === fingerprint && (object(build.app).id ?? object(build.project).id) === projectId && (platform !== "ios" || build.isForIosSimulator === !physical) && build.distribution === "INTERNAL" && typeof object(build.artifacts).applicationArchiveUrl === "string") return build.id;
54
54
  }
55
55
  return null;
56
56
  }
@@ -161,7 +161,7 @@ async function resolveEasDevelopmentBuild({ root, platform, profile, note, isExp
161
161
  cacheHit: "remote"
162
162
  };
163
163
  } catch (error) {
164
- const claim = claimFailure(error, null);
164
+ const claim = (0, ownership_claim_exports.claimFailure)(error, null);
165
165
  if (claim) return {
166
166
  ok: false,
167
167
  code: claim.code,
@@ -1,10 +1,10 @@
1
- import { V as validateDeviceSlot } from "./config-CcefMY2Q.mjs";
2
- import { a as findProjectRoot } from "./project-fKmuIaMI.mjs";
3
- import { r as clockTime } from "./command-output-8wHMEde0.mjs";
4
- import { C as memoizeEmulatorProbe, P as resolvePhysicalDevice, i as androidPoolNoCandidatesRefusal, j as probeEmulatorSerial, k as physicalDeviceModel, r as androidPoolCandidates, y as listAdbDevices } from "./android-hMj83VpN.mjs";
5
- import { f as takeLease, l as releaseWorkspaceLeases, n as fileLeaseIo, o as parseLeaseDuration } from "./device-lease-CJwK7OZr.mjs";
6
- import { d as waitForDevice, s as parseDeviceWait, t as selectFromPool } from "./device-pool-CcBNTvM7.mjs";
7
- import { c as listIosDevices, o as iosPoolCandidates, s as iosPoolNoCandidatesRefusal, u as resolveIosPhysicalDevice } from "./ios-device-CWOM_S44.mjs";
1
+ import { z as validateDeviceSlot } from "./config-6vdGngKa.mjs";
2
+ import { a as findProjectRoot } from "./project-CBFCwnN5.mjs";
3
+ import { r as clockTime } from "./command-output-BuIb_ZOI.mjs";
4
+ import { C as memoizeEmulatorProbe, P as resolvePhysicalDevice, i as androidPoolNoCandidatesRefusal, j as probeEmulatorSerial, k as physicalDeviceModel, r as androidPoolCandidates, y as listAdbDevices } from "./android-BkM4qTaN.mjs";
5
+ import { f as takeLease, l as releaseWorkspaceLeases, n as fileLeaseIo, o as parseLeaseDuration } from "./device-lease-DDJr85OK.mjs";
6
+ import { d as waitForDevice, s as parseDeviceWait, t as selectFromPool } from "./device-pool-DJvbIBGW.mjs";
7
+ import { c as listIosDevices, o as iosPoolCandidates, s as iosPoolNoCandidatesRefusal, u as resolveIosPhysicalDevice } from "./ios-device-DJOi9FR5.mjs";
8
8
  import chalk from "chalk";
9
9
  //#region src/commands/device.ts
10
10
  const DEFAULT_FOR = "5m";