stim 1.25.0 → 1.27.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.
- package/README.md +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
- package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
- package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +20 -7
- package/dist/api.mjs +42 -32
- package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
- package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
- package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
- package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
- package/dist/device-host-worker.mjs +19 -21
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
- package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
- package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
- package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
- package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
- package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
- package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +30 -13
- package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +34 -25
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/prebuild-BDpToDgR.mjs +1246 -0
- package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +84 -39
- package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
- package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
- package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
- package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
- package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
- package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
- package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +17 -18
- package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
- package/dist/toolchain-JYAOquPg.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
- package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
- package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +8 -8
- package/dist/ccache-h1FKhZeg.mjs +0 -143
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
- package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
- package/dist/native-run-D5OJsGwA.mjs +0 -276
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/settings-write-n0zwfohx.mjs +0 -360
- package/dist/toolchain-DB1aeqxO.mjs +0 -2
- package/dist/toolchain-VzLJzZ7O.mjs +0 -908
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-DS4UDWvf.mjs +0 -2
- package/dist/xcode-CiIIDnuD.mjs +0 -910
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { It as repoRoot } from "./settings-BDVI8Ivc.mjs";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { dirname, join, relative } from "node:path";
|
|
5
6
|
//#region src/dependency-state.ts
|
|
6
|
-
function
|
|
7
|
+
function installedNpmTreeProblems(projectRoot) {
|
|
7
8
|
try {
|
|
8
9
|
getExecutor().runFile("npm", [
|
|
9
10
|
"ls",
|
|
@@ -14,9 +15,15 @@ function installedNpmTreeIsValid(projectRoot) {
|
|
|
14
15
|
cwd: projectRoot,
|
|
15
16
|
timeoutMs: 3e4
|
|
16
17
|
});
|
|
17
|
-
return
|
|
18
|
-
} catch {
|
|
19
|
-
|
|
18
|
+
return "";
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const stdout = error instanceof Error && "stdout" in error ? error.stdout : "";
|
|
21
|
+
let problems;
|
|
22
|
+
try {
|
|
23
|
+
problems = JSON.parse(String(stdout ?? ""))?.problems;
|
|
24
|
+
} catch {}
|
|
25
|
+
if (!Array.isArray(problems)) return randomUUID();
|
|
26
|
+
return createHash("sha256").update(problems.map(String).toSorted().join("\n")).digest("hex");
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
async function installedNpmTreeIsValidAsync(projectRoot) {
|
|
@@ -88,4 +95,4 @@ function hasInstalledDependencies(projectRoot, markers = [
|
|
|
88
95
|
return markers.some((entry) => existsSync(join(projectRoot, entry)));
|
|
89
96
|
}
|
|
90
97
|
//#endregion
|
|
91
|
-
export {
|
|
98
|
+
export { installedNpmTreeProblems as i, hasInstalledDependencies as n, installedNpmTreeIsValidAsync as r, dependencyState as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-
|
|
2
|
-
import {
|
|
1
|
+
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-DYj-HVx6.mjs";
|
|
2
|
+
import { bn as readBundleSchemes, yn as pickDevClientScheme } from "./ccache-BWTze1Ls.mjs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/commands/dev-client.ts
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { b as operationState, t as getExecutor } from "./exec-
|
|
2
|
-
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-
|
|
1
|
+
import { b as operationState, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-Cn94Jc0g.mjs";
|
|
3
3
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { r as clockTime } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-
|
|
7
|
-
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
12
|
-
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-
|
|
13
|
-
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-
|
|
14
|
-
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-
|
|
15
|
-
import { t as selectFromPool } from "./device-pool-
|
|
16
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-
|
|
17
|
-
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-
|
|
4
|
+
import { r as clockTime } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { $t as makeTemporaryDirectory, X as resolveProjectSettings, Y as resolveIosProjectDir, en as removeTemporaryEntry, it as settingValueAt } from "./settings-BDVI8Ivc.mjs";
|
|
6
|
+
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-DYj-HVx6.mjs";
|
|
7
|
+
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-DriNoAVy.mjs";
|
|
8
|
+
import { En as runProcessOperation } from "./ccache-BWTze1Ls.mjs";
|
|
9
|
+
import { H as resolveScheme, K as xcodebuildArgs } from "./toolchain-CbCG6C5Z.mjs";
|
|
10
|
+
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-Cd-ysFes.mjs";
|
|
11
|
+
import { a as discoverXcodeProject } from "./react-native-build-DaK2IFyP.mjs";
|
|
12
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-DwsGfjUN.mjs";
|
|
13
|
+
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-Be0UeVZU.mjs";
|
|
14
|
+
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-BJzvDPfU.mjs";
|
|
15
|
+
import { t as selectFromPool } from "./device-pool-BnQqvs6o.mjs";
|
|
16
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-C_QkIf1Z.mjs";
|
|
17
|
+
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-B1W8SrxB.mjs";
|
|
18
18
|
import { existsSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
19
19
|
import { homedir } from "node:os";
|
|
20
20
|
import { join } from "node:path";
|
|
@@ -1,20 +1,61 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
8
|
-
import { J as recordCapacityRefusal, Y as recordCapacityWait } from "./budget-HyShrIpL.mjs";
|
|
1
|
+
import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { g as deviceReclaimIdleMinutesSetting } from "./settings-BDVI8Ivc.mjs";
|
|
5
|
+
import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-DriNoAVy.mjs";
|
|
6
|
+
import { _ as withIdleWorkspace, it as recordCapacityWait, rt as recordCapacityRefusal } from "./workspaces-DFbj07jp.mjs";
|
|
9
7
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-BIyfl0Zj.mjs";
|
|
8
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-E26qSpkb.mjs";
|
|
9
|
+
import { i as writeIdleShutdownEvent, n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-Cbvo5KEh.mjs";
|
|
13
10
|
import { realpathSync } from "node:fs";
|
|
14
11
|
import { basename, join } from "node:path";
|
|
15
|
-
import {
|
|
12
|
+
import { workspaceId } from "@stim-cli/core";
|
|
16
13
|
import { DEVICE_RECLAIM_REASON, automaticMachineEnabled } from "@stim-cli/core/state";
|
|
17
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
|
+
//#region src/workspace/display-label.ts
|
|
16
|
+
function baseLabel({ root, label }) {
|
|
17
|
+
return label || basename(root);
|
|
18
|
+
}
|
|
19
|
+
function pathSegments(root) {
|
|
20
|
+
return root.split(/[\\/]+/).filter(Boolean).toReversed();
|
|
21
|
+
}
|
|
22
|
+
function workspaceLabels(workspaces) {
|
|
23
|
+
const labels = /* @__PURE__ */ new Map();
|
|
24
|
+
const groups = /* @__PURE__ */ new Map();
|
|
25
|
+
for (const workspace of workspaces) {
|
|
26
|
+
const base = baseLabel(workspace);
|
|
27
|
+
const group = groups.get(base) ?? [];
|
|
28
|
+
if (!group.some(({ root }) => root === workspace.root)) group.push(workspace);
|
|
29
|
+
groups.set(base, group);
|
|
30
|
+
}
|
|
31
|
+
for (const [base, group] of groups) {
|
|
32
|
+
const [only] = group;
|
|
33
|
+
if (group.length === 1 && only) {
|
|
34
|
+
labels.set(only.root, base);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const segments = group.map(({ root }) => pathSegments(root));
|
|
38
|
+
const longest = Math.max(...segments.map((parts) => parts.length));
|
|
39
|
+
let depth = 0;
|
|
40
|
+
while (depth < longest && segments.every((parts) => parts[depth] === segments[0]?.[depth])) depth++;
|
|
41
|
+
const suffixes = segments.map((parts) => parts[depth]);
|
|
42
|
+
const distinct = new Set(suffixes).size === group.length;
|
|
43
|
+
group.forEach(({ root }, index) => {
|
|
44
|
+
const suffix = distinct ? suffixes[index] : root;
|
|
45
|
+
labels.set(root, suffix ? `${base} (${suffix})` : base);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return labels;
|
|
49
|
+
}
|
|
50
|
+
function workspaceDisplayLabel(root, config) {
|
|
51
|
+
const registered = Object.entries(config?.projects ?? {}).map(([path, project]) => ({
|
|
52
|
+
root: path,
|
|
53
|
+
label: project.label
|
|
54
|
+
}));
|
|
55
|
+
const own = registered.find((entry) => entry.root === root);
|
|
56
|
+
return workspaceLabels([...registered, own ?? { root }]).get(root) ?? basename(root);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
18
59
|
//#region src/devices/queue-reclaim.ts
|
|
19
60
|
async function reclaimIdleDevice(root, idleMs, out, now, skipped) {
|
|
20
61
|
try {
|
|
@@ -28,14 +69,9 @@ async function reclaimIdleDevice(root, idleMs, out, now, skipped) {
|
|
|
28
69
|
}).toSorted((a, b) => b.idleForMs - a.idleForMs).find(({ device }) => !skipped.has(`${device.kind}:${device.id}`));
|
|
29
70
|
if (!candidate) return 0;
|
|
30
71
|
const { device, idleForMs } = candidate;
|
|
31
|
-
const label =
|
|
72
|
+
const label = workspaceDisplayLabel(device.project, loadConfig$1());
|
|
32
73
|
const log = (event) => {
|
|
33
|
-
|
|
34
|
-
writer.write({
|
|
35
|
-
src: "metro",
|
|
36
|
-
...event
|
|
37
|
-
});
|
|
38
|
-
writer.close();
|
|
74
|
+
writeIdleShutdownEvent(device.project, event);
|
|
39
75
|
if (event.level === "warn") out(`${"device".padEnd(11)} ${event.msg}`);
|
|
40
76
|
};
|
|
41
77
|
skipped.add(`${device.kind}:${device.id}`);
|
|
@@ -174,6 +210,31 @@ function listed(source, empty, absent = () => false) {
|
|
|
174
210
|
throw new DeviceCountUnavailable("", { cause: error });
|
|
175
211
|
}
|
|
176
212
|
}
|
|
213
|
+
async function listedAwait(read, empty, absent = () => false) {
|
|
214
|
+
try {
|
|
215
|
+
return await read() ?? empty;
|
|
216
|
+
} catch (error) {
|
|
217
|
+
if (absent(error)) return empty;
|
|
218
|
+
throw new DeviceCountUnavailable("", { cause: error });
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async function readInventoryAsync({ sims = () => process.platform === "darwin" ? listAllIosSimsAsync({ timeoutMs: LISTING_TIMEOUT_MS }) : [], adb = () => listAdbDevicesAsync({ timeoutMs: LISTING_TIMEOUT_MS }), config = loadConfig$1, booting = readBootingDevices }) {
|
|
222
|
+
try {
|
|
223
|
+
const recorded = await listedAwait(() => typeof config === "function" ? config() : config, null);
|
|
224
|
+
return {
|
|
225
|
+
booting: await listedAwait(() => typeof booting === "function" ? booting() : booting, []),
|
|
226
|
+
sims: await listedAwait(() => typeof sims === "function" ? sims() : sims, [], toolAbsent),
|
|
227
|
+
adb: recordsOwnedEmulator(recorded) ? await listedAwait(() => typeof adb === "function" ? adb() : adb, NO_ADB, toolAbsent) : NO_ADB,
|
|
228
|
+
config: recorded
|
|
229
|
+
};
|
|
230
|
+
} catch (error) {
|
|
231
|
+
if (error instanceof DeviceCountUnavailable) {
|
|
232
|
+
if ((0, ownership_claim_exports.isClaimRefusal)(error.cause)) throw error.cause;
|
|
233
|
+
return uncountedRefusal(error.cause);
|
|
234
|
+
}
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
177
238
|
function readInventory({ sims = listSimsForCount, adb = listAdbForCount, config = loadConfig$1, booting = readBootingDevices }) {
|
|
178
239
|
try {
|
|
179
240
|
const recorded = listed(config, null);
|
|
@@ -212,6 +273,15 @@ async function listedAsync(source, empty) {
|
|
|
212
273
|
throw new DeviceCountUnavailable("", { cause: error });
|
|
213
274
|
}
|
|
214
275
|
}
|
|
276
|
+
async function countLiveOwnedDevicesFrom(sources, { exclude = [] } = {}) {
|
|
277
|
+
try {
|
|
278
|
+
const inventory = await readInventoryAsync(sources);
|
|
279
|
+
return "code" in inventory ? { unknown: inventory.message } : inventoryKeys(inventory, exclude).size;
|
|
280
|
+
} catch (error) {
|
|
281
|
+
if ((0, ownership_claim_exports.isClaimRefusal)(error)) return { unknown: error.message };
|
|
282
|
+
throw error;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
215
285
|
async function countLiveOwnedDevicesAsync(operation) {
|
|
216
286
|
try {
|
|
217
287
|
operation.signal.throwIfAborted();
|
|
@@ -317,9 +387,17 @@ function deviceSlotWaitingLine({ count, max, holders, elapsedMs, queue }) {
|
|
|
317
387
|
}
|
|
318
388
|
function deviceHolders(inventory, keys) {
|
|
319
389
|
const names = /* @__PURE__ */ new Map();
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
390
|
+
const projects = Object.entries(inventory.config?.projects ?? {});
|
|
391
|
+
const labels = workspaceLabels(projects.map(([root, project]) => ({
|
|
392
|
+
root,
|
|
393
|
+
label: project.label
|
|
394
|
+
})));
|
|
395
|
+
for (const [root, project] of projects) {
|
|
396
|
+
const label = labels.get(root) ?? basename(root);
|
|
397
|
+
for (const { platforms } of projectDeviceSlots(project)) {
|
|
398
|
+
if (platforms.ios?.deviceUdid) names.set(deviceKey("ios", platforms.ios.deviceUdid), label);
|
|
399
|
+
if (platforms.android?.avdName) names.set(deviceKey("android", platforms.android.avdName), label);
|
|
400
|
+
}
|
|
323
401
|
}
|
|
324
402
|
for (const sim of inventory.sims) {
|
|
325
403
|
const key = deviceKey("ios", sim.udid);
|
|
@@ -401,7 +479,7 @@ async function admissionTransaction(action, lockWaitMs, out, signal) {
|
|
|
401
479
|
}
|
|
402
480
|
}
|
|
403
481
|
/** Boots an owned device under the Stim home's cap, reserving capacity before releasing admission. */
|
|
404
|
-
async function withDeviceBootAdmission(device, boot, { root, max = getConcurrencyLimits().maxDevices, sources = {}, lockWaitMs = ADMISSION_LOCK_WAIT_MS, out = () => {}, waitMs = DEFAULT_DEVICE_SLOT_WAIT_MS, noWait = false, automatic = false, displayName =
|
|
482
|
+
async function withDeviceBootAdmission(device, boot, { root, max = getConcurrencyLimits().maxDevices, sources = {}, lockWaitMs = ADMISSION_LOCK_WAIT_MS, out = () => {}, waitMs = DEFAULT_DEVICE_SLOT_WAIT_MS, noWait = false, automatic = false, displayName = workspaceDisplayLabel(root, loadConfig$1()), reclaimIdleMinutes = deviceReclaimIdleMinutesSetting({}), now = Date.now, signal, sleep = (ms) => setTimeout(ms, void 0, { signal }), waitingFor = () => {}, onWait = () => {} }) {
|
|
405
483
|
const requireMembership = () => {
|
|
406
484
|
if (automatic && !automaticMachineEnabled("device", "local")) throw new DeviceAdmissionRefusal({
|
|
407
485
|
code: "STIM_HOSTING_REFUSED",
|
|
@@ -473,7 +551,7 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
473
551
|
if ((typeof booting === "function" ? booting() : booting).some((entry) => deviceKey(entry.platform, entry.key) === own)) return admit();
|
|
474
552
|
return wait(lastInventory);
|
|
475
553
|
}
|
|
476
|
-
const inventory =
|
|
554
|
+
const inventory = await readInventoryAsync(sources);
|
|
477
555
|
if ("code" in inventory) throw new DeviceAdmissionRefusal(inventory);
|
|
478
556
|
const keys = inventoryKeys(inventory);
|
|
479
557
|
const own = deviceKey(device.platform, device.key);
|
|
@@ -619,4 +697,4 @@ function unknownAndroidDeviceProfileRefusal(requested, profiles) {
|
|
|
619
697
|
};
|
|
620
698
|
}
|
|
621
699
|
//#endregion
|
|
622
|
-
export { countLiveOwnedDevicesAsync as a,
|
|
700
|
+
export { countLiveOwnedDevicesAsync as a, layerNote as c, unknownAndroidDeviceProfileRefusal as d, unknownAndroidSystemImageRefusal as f, withDeviceBootAdmission as h, countLiveOwnedDevices as i, peekDeviceSlots as l, unknownIosRuntimeRefusal as m, DeviceAdmissionRefusal as n, countLiveOwnedDevicesFrom as o, unknownIosDeviceTypeRefusal as p, checkDeviceCapacity as r, deviceTypeMismatch as s, DEFAULT_DEVICE_SLOT_WAIT_MS as t, runtimeMismatch as u };
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { C as resetIosKeychain, I as readHostMemoryPressure, T as resolveIosCreation, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, k as uninstallIosApp, n as bootIosSim, w as resetIosPrivacy } from "./ios-BQzvJlzw.mjs";
|
|
13
|
-
import { r as stopMacosAppHeld } from "./stop-COP6PQqw.mjs";
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-CZxLyetD.mjs";
|
|
5
|
+
import { A as listAdbDevices, Ct as forgetCreatedDeviceAsync, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-DriNoAVy.mjs";
|
|
6
|
+
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-Deb9X3_Y.mjs";
|
|
7
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
8
|
+
import { _n as reverseMetroPorts, dn as installIosApp, fn as iosAppProcess, hn as launchIosApp, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, tn as androidAppProcess, vn as writeDebugHttpHost } from "./ccache-BWTze1Ls.mjs";
|
|
9
|
+
import { ft as teardownOwnedIosSim, ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
|
|
10
|
+
import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-E26qSpkb.mjs";
|
|
11
|
+
import { r as stopMacosAppHeld } from "./stop-CH79S3IZ.mjs";
|
|
14
12
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
15
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
16
|
-
import { _ as findAapt } from "./support-
|
|
17
|
-
import { t as waitForMacosRegistration } from "./registration-
|
|
18
|
-
import { n as parseLogStreamLine } from "./ios-
|
|
13
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-6LP7QsaA.mjs";
|
|
14
|
+
import { _ as findAapt } from "./support-CNg_YsOk.mjs";
|
|
15
|
+
import { t as waitForMacosRegistration } from "./registration-BwCe64PH.mjs";
|
|
16
|
+
import { n as parseLogStreamLine } from "./ios-CsRVik64.mjs";
|
|
19
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
20
18
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
21
19
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
@@ -234,7 +232,7 @@ function collectHostedNativeLogs({ home, platform, since, final, query, parse, t
|
|
|
234
232
|
//#endregion
|
|
235
233
|
//#region src/device-host/android-logs.ts
|
|
236
234
|
/** Captures bounded logcat output from the installed app on this home's exact ledger-owned serial. */
|
|
237
|
-
function collectHostedAndroidLogs(home, session, attempt, since, final = false) {
|
|
235
|
+
async function collectHostedAndroidLogs(home, session, attempt, since, final = false) {
|
|
238
236
|
const deadline = Date.now() + 1e4;
|
|
239
237
|
const device = readHostedDevice(home, "android");
|
|
240
238
|
assertHostedAndroidSerial(home, device);
|
|
@@ -242,9 +240,9 @@ function collectHostedAndroidLogs(home, session, attempt, since, final = false)
|
|
|
242
240
|
if (app.state !== "installed") return false;
|
|
243
241
|
const exec = getExecutor();
|
|
244
242
|
const adb = androidToolPath("adb");
|
|
245
|
-
const clockOffsetMs = androidClockOffset(device.serial, { exec: {
|
|
243
|
+
const clockOffsetMs = await androidClockOffset(device.serial, { exec: {
|
|
246
244
|
...exec,
|
|
247
|
-
|
|
245
|
+
runFileAsync: (file, args, options) => exec.runFileAsync(file === "adb" ? adb : file, args, options)
|
|
248
246
|
} }) ?? 0;
|
|
249
247
|
const previous = readHostedNativeLogsCheckpoint(home, "android");
|
|
250
248
|
let current = null;
|
|
@@ -1228,7 +1226,7 @@ async function main() {
|
|
|
1228
1226
|
if (input.platform === "macos" && !hostedMacosAppSlot(input.appSlot)) throw new Error("Invalid hosted macOS app slot.");
|
|
1229
1227
|
if (input.mode === "logs") {
|
|
1230
1228
|
if (input.platform !== "ios" && input.platform !== "android" || !process.env.STIM_HOME || typeof input.since !== "number" || !Number.isFinite(input.since)) throw new Error("Invalid hosted native log request.");
|
|
1231
|
-
const more = (input.platform === "android" ? collectHostedAndroidLogs : collectHostedIosLogs)(process.env.STIM_HOME, input.session, input.attempt, input.since, input.final === true);
|
|
1229
|
+
const more = await (input.platform === "android" ? collectHostedAndroidLogs : collectHostedIosLogs)(process.env.STIM_HOME, input.session, input.attempt, input.since, input.final === true);
|
|
1232
1230
|
process.stdout.write(`${JSON.stringify({ more })}\n`);
|
|
1233
1231
|
return;
|
|
1234
1232
|
}
|