stim 1.20.0 → 1.20.2
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 +6 -3
- package/dist/{activity-BrGh9EAI.mjs → activity-BSV745Kz.mjs} +4 -4
- package/dist/{agent-device-usage-output-DVyv_hWj.mjs → agent-device-usage-output-Dzgv6lgR.mjs} +5 -6
- package/dist/{android-Brx6EKvJ.mjs → android-DCKZrNvV.mjs} +37 -38
- package/dist/{android-0vv-OruW.mjs → android-Dlzxshgp.mjs} +5 -5
- package/dist/{android-CK3fpEyZ.mjs → android-HqP1_vB_.mjs} +3 -3
- package/dist/{android-BsYNR81W.mjs → android-Mz_Inn3w.mjs} +12 -12
- package/dist/{android-cas-DCAuXryb.mjs → android-cas-Bl-cLJBk.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{api-zuX3ynYN.mjs → api-qvOzWyfO.mjs} +1 -1
- package/dist/api-run.mjs +19 -21
- package/dist/api.mjs +1 -1
- package/dist/{app-install-0LgaQRT7.mjs → app-install-BIKtMfPq.mjs} +71 -48
- package/dist/{artifact-DClXJNWx.mjs → artifact-D3czlUvT.mjs} +13 -13
- package/dist/{artifact-CnC0mfov.mjs → artifact-HSwkIWEQ.mjs} +12 -12
- package/dist/{browser-web-CzBmhmgs.mjs → browser-web-CA-F1GQo.mjs} +18 -18
- package/dist/{budget-BONq9vXY.mjs → budget-f7516Zk0.mjs} +23 -26
- package/dist/{build-BixRI6sB.mjs → build-DYDbfkk5.mjs} +28 -33
- package/dist/{build-plan-CP0tckNU.mjs → build-plan-B7SZsc2N.mjs} +17 -17
- package/dist/{cache-manifest-qA3dT2x2.mjs → cache-manifest-XH-fvDUj.mjs} +10 -5
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cancellation-C_22VQTH.mjs +24 -0
- package/dist/{ccache-CjHQ5F8g.mjs → ccache-zdKiYQ3E.mjs} +7 -7
- package/dist/{chrome-Dp2lMLBe.mjs → chrome-BnzZMqsR.mjs} +1 -1
- package/dist/{cli-B2R8wH1F.mjs → cli-CLP3diBm.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-BLy1Pw2V.mjs → client-qQAaXSUs.mjs} +21 -29
- package/dist/collector-run.d.mts +7 -6
- package/dist/collector-run.mjs +6 -7
- package/dist/{command-output-BjPN99ZB.mjs → command-output-BTy8hZ0F.mjs} +1 -1
- package/dist/{config-D0LhTY3S.mjs → config-BYDxlMY3.mjs} +43 -5
- package/dist/{created-devices-HU_DAb_Q.mjs → created-devices-Dzd5C2LF.mjs} +2 -2
- package/dist/{dependency-state-B2m8eqsS.mjs → dependency-state-DG0p31-y.mjs} +2 -2
- package/dist/{detached-entry-BXq4fIl-.mjs → detached-entry-B9C_zeQC.mjs} +1 -1
- package/dist/{dev-client-ClATaJoH.mjs → dev-client-DAWVIGBu.mjs} +2 -2
- package/dist/{device-DVCwAFlX.mjs → device-BECOiufl.mjs} +13 -14
- package/dist/{device-B7lsC0K1.mjs → device-DuiPJQSn.mjs} +8 -8
- package/dist/{device-capacity-Ca_ke1LE.mjs → device-capacity-CBUAcRyQ.mjs} +10 -11
- package/dist/device-host-worker.mjs +16 -17
- package/dist/{device-ios-CRUqPxKw.mjs → device-ios-COSi6oS1.mjs} +12 -15
- package/dist/{device-lease-DHOBXGgS.mjs → device-lease-BX1sJQ2E.mjs} +15 -18
- package/dist/{device-lease-run-CvDeHTkG.mjs → device-lease-run-Cw2M4z51.mjs} +4 -4
- package/dist/{device-pool-L2-5GxMy.mjs → device-pool-Bf-pOhSw.mjs} +3 -3
- package/dist/{device-remote-Bmg42063.mjs → device-remote-xRT0Vmo9.mjs} +14 -14
- package/dist/{doctor-C2MSuMMg.mjs → doctor-CB8oZKCk.mjs} +13 -13
- package/dist/{doctor-DPAqhVCK.mjs → doctor-kfMBnUw6.mjs} +78 -69
- package/dist/{doctor-watchman-CB4NnVZm.mjs → doctor-watchman-BRyV2adA.mjs} +9 -10
- package/dist/{eas-build-Dw_ec2Km.mjs → eas-build-JyfqyHfC.mjs} +5 -5
- package/dist/{eas-session-ledger-DZlC-Fq3.mjs → eas-session-ledger-Cm0Gwq2F.mjs} +6 -4
- package/dist/{error-diagnostics-Du7I_GuY.mjs → error-diagnostics-BR677IDM.mjs} +10 -10
- package/dist/{exec-B81Qodjn.mjs → exec-DqKo9GKJ.mjs} +22 -8
- package/dist/{gc-PWp34zGb.mjs → gc-qWOMdnER.mjs} +75 -24
- package/dist/git-DDfFzkMm.mjs +45 -0
- package/dist/{gradle-C2OEKCCI.mjs → gradle-DSrXb6lG.mjs} +6 -6
- package/dist/{guide-Dai9lphv.mjs → guide-G9cAbVAc.mjs} +81 -178
- package/dist/{hosted-android-DQ-Agsd8.mjs → hosted-android-C3MHGld1.mjs} +3 -3
- package/dist/{hosted-client-Io01s5By.mjs → hosted-client-ZEKpS9vw.mjs} +19 -11
- package/dist/{hosted-ios-DIxFnYp-.mjs → hosted-ios-l-o3iM9J.mjs} +1 -1
- package/dist/{hosted-logs-DP-ABU_M.mjs → hosted-logs-EzQM7-3Z.mjs} +7 -7
- package/dist/{hosted-macos-Aziw9T_9.mjs → hosted-macos-BACVAVqE.mjs} +10 -8
- package/dist/{hosted-native-BdAQi21M.mjs → hosted-native-A4s1QPXe.mjs} +13 -11
- package/dist/{idle-shutdown-DdMqoSUB.mjs → idle-shutdown-DtxhPTKe.mjs} +7 -7
- package/dist/{ios-BZ9dg2Fr.mjs → ios-BwVCF7oA.mjs} +8 -8
- package/dist/{ios-CZuv6gRv.mjs → ios-Ce7bc7br.mjs} +29 -29
- package/dist/{ios-CXLIUxXJ.mjs → ios-RkW4pnQf.mjs} +21 -17
- package/dist/{ios-device-B1B14xND.mjs → ios-device-B5veSDDQ.mjs} +1 -1
- package/dist/{ios-device-BreZOpM0.mjs → ios-device-D7pi2Sca.mjs} +14 -14
- package/dist/{ios-VGvNdsv2.mjs → ios-nOLJGVdy.mjs} +1 -1
- package/dist/{ios-project-B9drt_aY.mjs → ios-project-K9hY_Jab.mjs} +8 -8
- package/dist/{ios-state-CjrL2qv-.mjs → ios-state-CBLe1xYw.mjs} +1 -1
- package/dist/{js-swap-C8icNYIY.mjs → js-swap-Bb3nsS07.mjs} +13 -13
- package/dist/{launch-YrbqaIFj.mjs → launch-C3qJ6Agb.mjs} +46 -45
- package/dist/{launch-DxH0THLP.mjs → launch-F4sOqAhB.mjs} +21 -21
- package/dist/{launch-verify-BzRdbuO1.mjs → launch-verify-B6Q8hZP-.mjs} +11 -11
- package/dist/{logs-DHaRNfg7.mjs → logs-BGrEUaEs.mjs} +10 -11
- package/dist/{macos-V_3Ui7g4.mjs → macos-Ch5VJmcS.mjs} +40 -24
- package/dist/macos-D7uDvO-z.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-D_j9sN-B.mjs → metro-DnCEjCxs.mjs} +8 -9
- package/dist/{metro-gateway-BBJldOdi.mjs → metro-gateway-CX9Xlkq2.mjs} +3 -3
- package/dist/{miss-reason-BPAzZS0r.mjs → miss-reason-mKzZ4VvN.mjs} +3 -3
- package/dist/{named-ports-C2lvoPsb.mjs → named-ports-4WopRPg-.mjs} +4 -5
- package/dist/{native-android-lHzaew7r.mjs → native-android-D5qc3-_v.mjs} +10 -10
- package/dist/{native-gradle-inputs-BQnIdAlL.mjs → native-gradle-inputs-BsLRrl7u.mjs} +3 -10
- package/dist/{native-runtime-BRmWL7ru.mjs → native-runtime-k8dTIrbK.mjs} +7 -8
- package/dist/{native-xcode-inputs-eutS19jU.mjs → native-xcode-inputs-CykopJdM.mjs} +7 -9
- package/dist/{native-xcode-ios-DP3cHLwu.mjs → native-xcode-ios-Bbf30Gm0.mjs} +15 -15
- package/dist/offload-worker.mjs +34 -38
- package/dist/{ownership-DXzMMSx6.mjs → ownership-DCtw_2IA.mjs} +3 -3
- package/dist/{page-Bv9s2KwY.mjs → page-DRHy329N.mjs} +1 -1
- package/dist/{placement-log-reFbjqEr.mjs → placement-log-MOfPVgaM.mjs} +1 -1
- package/dist/{plan-BDk2AeY_.mjs → plan-C4TjdPsR.mjs} +10 -10
- package/dist/{plan-placement-D_YYlE6N.mjs → plan-placement-V0TdzYXp.mjs} +3 -3
- package/dist/{ports-jzvAJXXL.mjs → ports-DdSUicVo.mjs} +3 -3
- package/dist/{prebuild-Bw44QxVh.mjs → prebuild-DYbucPXy.mjs} +7 -8
- package/dist/{preview-BaBJ72Al.mjs → preview-78a9kR_-.mjs} +31 -24
- package/dist/{project-B8_duAzW.mjs → project-_phNIJfs.mjs} +110 -47
- package/dist/{pull-request-vOhLNmIb.mjs → pull-request-CQ8sPbZa.mjs} +5 -18
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-chm1DMlA.mjs → react-native-android-CM1XRDwv.mjs} +34 -30
- package/dist/{react-native-build-oAw6gQeW.mjs → react-native-build-CtCccJtb.mjs} +6 -6
- package/dist/{react-native-doctor-DYXoh-6I.mjs → react-native-doctor-CfRnFfjs.mjs} +5 -5
- package/dist/{react-native-ios-SCTK_CT5.mjs → react-native-ios-Dhq_eiYQ.mjs} +14 -14
- package/dist/{recordings-Bk-VivUV.mjs → recordings-D0d5aQt0.mjs} +1 -1
- package/dist/{reload-D34GkY78.mjs → reload-C8JhxjSh.mjs} +17 -17
- package/dist/{remote-BU9UyhCJ.mjs → remote-BiR6aYjy.mjs} +7 -7
- package/dist/{remote-cache-Bsts6f6Y.mjs → remote-cache-OyOyVIS3.mjs} +4 -4
- package/dist/{result-BDoRk1k3.mjs → result-CaJg5Iat.mjs} +8 -8
- package/dist/{run-qvff78hv.mjs → run-BtPgpKks.mjs} +3 -3
- package/dist/{server-bare-dWjAarki.mjs → server-bare-R2m_gsH8.mjs} +3 -3
- package/dist/{server-command-7XIKlWtO.mjs → server-command-CTtCkmcQ.mjs} +5 -5
- package/dist/server-expo-Bigriskl.mjs +2 -0
- package/dist/{server-expo-CsYu2aKL.mjs → server-expo-DsguMGUF.mjs} +5 -10
- package/dist/{settings-Bbztm4oV.mjs → settings-B717odTD.mjs} +74 -115
- package/dist/{settings-CT3E71-i.mjs → settings-BORNaaCO.mjs} +5 -5
- package/dist/settings.schema.json +1 -1
- package/dist/{simslim-ChMfe8rg.mjs → simslim-CCr3rE-A.mjs} +2 -3
- package/dist/{slot-launch-B9hn96wd.mjs → slot-launch-DPt0m9Nd.mjs} +6 -6
- package/dist/{spawn-claims-Kqiifsk2.mjs → spawn-claims-DVS5RkMS.mjs} +1 -1
- package/dist/{stage-BNKKdDNc.mjs → stage-KNTQopqv.mjs} +9 -9
- package/dist/{start-CdvcTaXr.mjs → start-BWqzODpb.mjs} +19 -20
- package/dist/{start-CbQCSnXQ.mjs → start-TXeMmmO2.mjs} +1 -1
- package/dist/{state-Boo0IMJq.mjs → state-CG_OFoaA.mjs} +2 -2
- package/dist/{state-DI84A-uu.mjs → state-D1Icyjlu.mjs} +8 -7
- package/dist/{stats-BIIDrjA8.mjs → stats-BoY5sEPU.mjs} +5 -5
- package/dist/{status-BDGHwkCs.mjs → status-BTA7kKiQ.mjs} +1 -1
- package/dist/{status-DARMkc9q.mjs → status-WgFbkRzj.mjs} +30 -47
- package/dist/{status-watch-DvmI3SmN.mjs → status-watch-C23ILtf9.mjs} +4 -4
- package/dist/{stim-desktop-8GQX2OV8.mjs → stim-desktop-BzBN2Em2.mjs} +1 -1
- package/dist/{stop-iNemHsJC.mjs → stop-BNmBMi1F.mjs} +18 -19
- package/dist/{stop-WQPQHLuy.mjs → stop-DPEhunlw.mjs} +6 -6
- package/dist/{stop-CCZS-C9m.mjs → stop-DR6VoDIk.mjs} +2 -2
- package/dist/supervisor-run.mjs +16 -17
- package/dist/{support-DCco5fut.mjs → support-CwjbFs9H.mjs} +9 -9
- package/dist/{support-CnE_SIjt.mjs → support-DMTqj3Hm.mjs} +6 -6
- package/dist/{swiftpm-macos-afeNUExW.mjs → swiftpm-macos-DRNVJWlb.mjs} +9 -9
- package/dist/{tailnet-CoJUb2tB.mjs → tailnet-Dh-qiYzG.mjs} +5 -5
- package/dist/toolchain-BFkAcstd.mjs +2 -0
- package/dist/{toolchain-DqyDXs30.mjs → toolchain-DxSsNssu.mjs} +10 -10
- package/dist/trigger-9_USgmxz.mjs +2 -0
- package/dist/{trigger-C0MWBi8O.mjs → trigger-CigAYjeL.mjs} +2 -2
- package/dist/{warm-progress-C3ASD6z5.mjs → warm-progress-BuY-Fvfn.mjs} +43 -61
- package/dist/{watchman-CQl51YZu.mjs → watchman-CPQFZLXY.mjs} +6 -6
- package/dist/{web-B3eldHFH.mjs → web-BDBMxDpx.mjs} +9 -9
- package/dist/web-Dq-i3wzJ.mjs +2 -0
- package/dist/web-run.mjs +14 -14
- package/dist/{workspace-state-CSIFuuDa.mjs → workspace-state-DJt_MMvf.mjs} +16 -6
- package/dist/{workspaces-D2xSHBDY.mjs → workspaces-C36s2jb9.mjs} +15 -16
- package/dist/{worktree-BxDqaTev.mjs → worktree-CgvJYJ-Q.mjs} +96 -89
- package/dist/{worktree-q7_OZNY0.mjs → worktree-DpLdCHga.mjs} +1 -1
- package/package.json +6 -7
- package/dist/macos-C0iljhsN.mjs +0 -2
- package/dist/process-identity-Biv3arCO.mjs +0 -40
- package/dist/server-expo-DV43vep4.mjs +0 -2
- package/dist/toolchain-BIupIro1.mjs +0 -2
- package/dist/trigger-SHLOWJ4O.mjs +0 -2
- package/dist/web-BLXpOe6b.mjs +0 -2
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { _ as loadConfig$1, d as getConfigDir } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { r as debugLog, t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { t as git } from "./git-DDfFzkMm.mjs";
|
|
4
|
+
import { D as withDirLock } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { a as markApproved, c as pinnedEndpoint$1, i as lapsedLine, l as realIo, n as findPeer$1, o as parseMachine$1, r as isLapsed, s as pendingReport, t as endpoint, u as requestedLine, x as runCancellationSignal } from "./tailnet-Dh-qiYzG.mjs";
|
|
6
|
+
import { r as throwIfCancelled } from "./cancellation-C_22VQTH.mjs";
|
|
7
|
+
import { n as CCACHE_UNAVAILABLE } from "./ccache-zdKiYQ3E.mjs";
|
|
8
|
+
import { l as toolchainMismatches, m as readRubyVersion, v as COMPILATION_CACHE_UNAVAILABLE } from "./toolchain-DxSsNssu.mjs";
|
|
9
|
+
import { c as gitVisiblePaths, i as nativeGradleTransfer, l as nativeTransferManifest, m as manifestDigest, s as checkNativeTransferMembership, u as sourceManifest } from "./native-gradle-inputs-BsLRrl7u.mjs";
|
|
8
10
|
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, rmSync, writeFileSync, writeSync } from "node:fs";
|
|
9
11
|
import { basename, dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
10
12
|
import { OFFLOAD_MODES, acceptsShape, automaticMachineEnabled, buildMachinesFile, buildMachinesLock, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, isJsonObject, parseMachine, readBuildMachines, readDeviceHostMachines, requireAutomaticMachine, runId, saturation, settingDefinition } from "@stim-cli/core/state";
|
|
@@ -1131,16 +1133,8 @@ function replyError(reply) {
|
|
|
1131
1133
|
}
|
|
1132
1134
|
/** The repository on the remote Mac: one area per git common dir, shared by all its worktrees. */
|
|
1133
1135
|
function repoIdentity(projectRoot) {
|
|
1134
|
-
const
|
|
1135
|
-
const
|
|
1136
|
-
"-C",
|
|
1137
|
-
projectRoot,
|
|
1138
|
-
"rev-parse",
|
|
1139
|
-
"--show-toplevel"
|
|
1140
|
-
]));
|
|
1141
|
-
const common = realpathSync(run("git", [
|
|
1142
|
-
"-C",
|
|
1143
|
-
repoRoot,
|
|
1136
|
+
const repoRoot = realpathSync(git(projectRoot, ["rev-parse", "--show-toplevel"]));
|
|
1137
|
+
const common = realpathSync(git(repoRoot, [
|
|
1144
1138
|
"rev-parse",
|
|
1145
1139
|
"--path-format=absolute",
|
|
1146
1140
|
"--git-common-dir"
|
|
@@ -1422,9 +1416,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1422
1416
|
};
|
|
1423
1417
|
};
|
|
1424
1418
|
const signal = runCancellationSignal();
|
|
1425
|
-
const
|
|
1426
|
-
if (signal?.aborted) throw Object.assign(/* @__PURE__ */ new Error("The offloaded build was cancelled."), { code: "STIM_CANCELLED" });
|
|
1427
|
-
};
|
|
1419
|
+
const checkCancelled = () => throwIfCancelled(signal, "offloaded build");
|
|
1428
1420
|
let settle;
|
|
1429
1421
|
let settled = false;
|
|
1430
1422
|
const outcome = new Promise((resolve) => {
|
|
@@ -1442,7 +1434,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1442
1434
|
};
|
|
1443
1435
|
signal?.addEventListener("abort", cancel, { once: true });
|
|
1444
1436
|
try {
|
|
1445
|
-
|
|
1437
|
+
checkCancelled();
|
|
1446
1438
|
if (!validArtifactIdentity(request, expectedFingerprint)) return fail("The build request has an invalid reusable artifact identity.");
|
|
1447
1439
|
if (native?.provider === "xcode" && native.snapshot.hash !== expectedFingerprint) return fail("The native source snapshot does not match the requested artifact identity.");
|
|
1448
1440
|
let job = null;
|
|
@@ -1506,7 +1498,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1506
1498
|
return fail(reason);
|
|
1507
1499
|
}
|
|
1508
1500
|
const synced = await syncSource(choice.connection, identity, onEnter, nativeTransferInput(native));
|
|
1509
|
-
|
|
1501
|
+
checkCancelled();
|
|
1510
1502
|
if ("failure" in synced) {
|
|
1511
1503
|
if (moveOn(synced.failure)) continue;
|
|
1512
1504
|
return fail(synced.failure);
|
|
@@ -1518,7 +1510,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1518
1510
|
early = [];
|
|
1519
1511
|
choice.connection.onProgress((event) => job === null ? early.push(event) : handle(event));
|
|
1520
1512
|
if (choice.automatic) requireAutomaticMachine("build", choice.machine);
|
|
1521
|
-
|
|
1513
|
+
checkCancelled();
|
|
1522
1514
|
const reply = await choice.connection.request("build.start", {
|
|
1523
1515
|
repo: identity.repo,
|
|
1524
1516
|
project: identity.project,
|
|
@@ -1551,7 +1543,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1551
1543
|
},
|
|
1552
1544
|
stimBuild: choice.target.local.stimBuild
|
|
1553
1545
|
});
|
|
1554
|
-
|
|
1546
|
+
checkCancelled();
|
|
1555
1547
|
if ("result" in reply) {
|
|
1556
1548
|
job = reply.result.job;
|
|
1557
1549
|
break;
|
|
@@ -1569,7 +1561,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1569
1561
|
}), JOB_TIMEOUT_MS);
|
|
1570
1562
|
const result = await outcome;
|
|
1571
1563
|
clearTimeout(timer);
|
|
1572
|
-
|
|
1564
|
+
checkCancelled();
|
|
1573
1565
|
const { connection, machine } = choice;
|
|
1574
1566
|
connection.onProgress(null);
|
|
1575
1567
|
const workerMs = Date.now() - workerStarted;
|
|
@@ -1580,7 +1572,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1580
1572
|
const name = typeof artifact?.name === "string" ? artifact.name : "";
|
|
1581
1573
|
if (!ARTIFACT_NAME[request.platform].test(name) || typeof artifact.sha256 !== "string") return fail(`the machine reported no .${request.platform === "android" ? "apk" : "app"} artifact`);
|
|
1582
1574
|
onEnter("fetch");
|
|
1583
|
-
|
|
1575
|
+
checkCancelled();
|
|
1584
1576
|
const fetchStarted = Date.now();
|
|
1585
1577
|
rmSync(stagingDir, {
|
|
1586
1578
|
recursive: true,
|
|
@@ -1610,7 +1602,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1610
1602
|
const fetched = await connection.request("build.artifact", { job }, 9e5);
|
|
1611
1603
|
connection.onBinary(null);
|
|
1612
1604
|
closeSync(fd);
|
|
1613
|
-
|
|
1605
|
+
checkCancelled();
|
|
1614
1606
|
const fetchFailure = replyError(fetched);
|
|
1615
1607
|
if (fetchFailure || !("result" in fetched)) return fail(`fetch: ${fetchFailure ?? "no reply"}`);
|
|
1616
1608
|
const digest = hash.digest("hex");
|
|
@@ -1623,7 +1615,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1623
1615
|
"-C",
|
|
1624
1616
|
stagingDir
|
|
1625
1617
|
], { timeoutMs: 6e5 });
|
|
1626
|
-
|
|
1618
|
+
checkCancelled();
|
|
1627
1619
|
rmSync(archive, { force: true });
|
|
1628
1620
|
const artifactPath = join(stagingDir, name);
|
|
1629
1621
|
if (stagedArtifactEscapes(stagingDir, artifactPath, request.platform === "macos")) return fail(`fetch: ${machine} returned ${name} as or through a symbolic link or outside the staging directory`);
|
|
@@ -1663,7 +1655,7 @@ async function offloadBuild({ choice, expectedFingerprint, request, stagingDir,
|
|
|
1663
1655
|
};
|
|
1664
1656
|
} catch (error) {
|
|
1665
1657
|
closeOffload(choice);
|
|
1666
|
-
|
|
1658
|
+
checkCancelled();
|
|
1667
1659
|
return fail(error.message.split("\n")[0] ?? String(error));
|
|
1668
1660
|
} finally {
|
|
1669
1661
|
signal?.removeEventListener("abort", cancel);
|
package/dist/collector-run.d.mts
CHANGED
|
@@ -3,7 +3,8 @@ import { ChildProcess, SpawnOptions } from "child_process";
|
|
|
3
3
|
import { ChildProcess as ChildProcess$1 } from "node:child_process";
|
|
4
4
|
//#region src/exec.d.ts
|
|
5
5
|
interface ExecOptions {
|
|
6
|
-
|
|
6
|
+
/** Milliseconds before the child is killed, or 'unbounded' for a call that may legitimately run as long as it needs, such as a native build. */
|
|
7
|
+
timeoutMs: number | "unbounded";
|
|
7
8
|
killSignal?: NodeJS.Signals;
|
|
8
9
|
cwd?: string;
|
|
9
10
|
env?: Record<string, string>;
|
|
@@ -24,12 +25,12 @@ interface ExecOptions {
|
|
|
24
25
|
redact?: readonly string[];
|
|
25
26
|
}
|
|
26
27
|
interface Executor {
|
|
27
|
-
run(cmd: string, opts
|
|
28
|
-
runFile(file: string, args
|
|
28
|
+
run(cmd: string, opts: ExecOptions): string;
|
|
29
|
+
runFile(file: string, args: string[], opts: ExecOptions): string;
|
|
29
30
|
/** `runFile` without blocking the event loop; rejects where `runFile` throws. */
|
|
30
|
-
runFileAsync(file: string, args
|
|
31
|
-
runQuiet(cmd: string, opts
|
|
32
|
-
runFileQuiet(file: string, args
|
|
31
|
+
runFileAsync(file: string, args: string[], opts: ExecOptions): Promise<string>;
|
|
32
|
+
runQuiet(cmd: string, opts: ExecOptions): string | null;
|
|
33
|
+
runFileQuiet(file: string, args: string[], opts: ExecOptions): string | null;
|
|
33
34
|
spawn(cmd: string, args?: readonly string[], opts?: SpawnOptions): ChildProcess;
|
|
34
35
|
/** Absolute path of `name` on PATH, or null. Windows resolves PATH through PATHEXT. */
|
|
35
36
|
findExecutable(name: string): string | null;
|
package/dist/collector-run.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { w as workspaceLogsDir } from "./workspace-state-CSIFuuDa.mjs";
|
|
1
|
+
import { B as deviceSlotKey, K as validateDeviceSlot, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { w as workspaceLogsDir } from "./workspace-state-DJt_MMvf.mjs";
|
|
4
3
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
4
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
6
|
-
import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-
|
|
7
|
-
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-
|
|
8
|
-
import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-
|
|
9
|
-
import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-
|
|
5
|
+
import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-B5veSDDQ.mjs";
|
|
6
|
+
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-DCtw_2IA.mjs";
|
|
7
|
+
import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-HqP1_vB_.mjs";
|
|
8
|
+
import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-nOLJGVdy.mjs";
|
|
10
9
|
import { existsSync } from "node:fs";
|
|
11
10
|
import { isAbsolute, join, resolve } from "node:path";
|
|
12
11
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
2
|
-
import { t as NO_PROJECT_REFUSAL } from "./project-
|
|
2
|
+
import { t as NO_PROJECT_REFUSAL } from "./project-_phNIJfs.mjs";
|
|
3
3
|
import { quotedPath as quotedPath$1 } from "@stim-cli/core";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
//#region src/diagnostics/launch-error-preview.ts
|
|
@@ -1,11 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
|
|
5
5
|
import { allMetroPorts, configCorruptRepair, findEnclosingWorktreeRoot, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isPathPrefix, loadConfig, loadConfig as loadConfig$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1 } from "@stim-cli/core/state";
|
|
6
6
|
import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
7
7
|
import { configDir, ensurePrivateDir } from "@stim-cli/core";
|
|
8
8
|
import { InvalidArgumentError } from "commander";
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
15
|
+
var __exportAll = (all, no_symbols) => {
|
|
16
|
+
let target = {};
|
|
17
|
+
for (var name in all) __defProp(target, name, {
|
|
18
|
+
get: all[name],
|
|
19
|
+
enumerable: true
|
|
20
|
+
});
|
|
21
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
26
|
+
key = keys[i];
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
28
|
+
get: ((k) => from[k]).bind(null, key),
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
35
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
36
|
+
//#endregion
|
|
9
37
|
//#region src/devices/device-slots.ts
|
|
10
38
|
const DEFAULT_DEVICE_SLOT = "default";
|
|
11
39
|
const DEVICE_SLOT_RULE = "A device slot must be 1-64 letters, digits, underscores or hyphens, starting with a letter or digit.";
|
|
@@ -205,10 +233,10 @@ function isOnMountedVolume(path, mountedVolumes, { statFn = statSync } = {}) {
|
|
|
205
233
|
if (volume === null) return false;
|
|
206
234
|
return mounted.has(volume) || uncShareIsReachable(volume, statFn);
|
|
207
235
|
}
|
|
208
|
-
function directorySize(dir, { timeoutMs }
|
|
236
|
+
function directorySize(dir, { timeoutMs }) {
|
|
209
237
|
return measuredDirectorySize(dir, { timeoutMs }) ?? 0;
|
|
210
238
|
}
|
|
211
|
-
function measuredDirectorySize(dir, { timeoutMs }
|
|
239
|
+
function measuredDirectorySize(dir, { timeoutMs }) {
|
|
212
240
|
let out;
|
|
213
241
|
try {
|
|
214
242
|
out = getExecutor().runFile("du", ["-sk", dir], { timeoutMs });
|
|
@@ -225,6 +253,11 @@ function formatBytes(bytes) {
|
|
|
225
253
|
return `${Math.round(bytes / 1024)}K`;
|
|
226
254
|
}
|
|
227
255
|
//#endregion
|
|
256
|
+
//#region src/ownership-claim.ts
|
|
257
|
+
var ownership_claim_exports = /* @__PURE__ */ __exportAll({});
|
|
258
|
+
import * as import__stim_cli_core_ownership_claim from "@stim-cli/core/ownership-claim";
|
|
259
|
+
__reExport(ownership_claim_exports, import__stim_cli_core_ownership_claim);
|
|
260
|
+
//#endregion
|
|
228
261
|
//#region src/devices/avd-claim.ts
|
|
229
262
|
function acquireAvdClaim(avdName) {
|
|
230
263
|
const root = join(configDir(), "avd-locks", `${encodeURIComponent(avdName.toLowerCase())}.lock`);
|
|
@@ -244,6 +277,11 @@ function acquireAvdClaim(avdName) {
|
|
|
244
277
|
});
|
|
245
278
|
}
|
|
246
279
|
//#endregion
|
|
280
|
+
//#region src/process-identity.ts
|
|
281
|
+
var process_identity_exports = /* @__PURE__ */ __exportAll({});
|
|
282
|
+
import * as import__stim_cli_core_process_identity from "@stim-cli/core/process-identity";
|
|
283
|
+
__reExport(process_identity_exports, import__stim_cli_core_process_identity);
|
|
284
|
+
//#endregion
|
|
247
285
|
//#region src/workspace/config.ts
|
|
248
286
|
function getConfigDir() {
|
|
249
287
|
return configDir();
|
|
@@ -521,4 +559,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
|
|
|
521
559
|
return result;
|
|
522
560
|
}
|
|
523
561
|
//#endregion
|
|
524
|
-
export {
|
|
562
|
+
export { acquireAvdClaim as A, deviceSlotKey as B, saveConfig as C, withConfigLock$1 as D, upsertProject as E, listMountedVolumes as F, removeSlotDevice as G, parseDeviceSlotKey as H, measuredDirectorySize as I, __require as J, validateDeviceSlot as K, volumeRootFor as L, directorySize as M, formatBytes as N, writeConfigSetting as O, isOnMountedVolume as P, assignSlotDevice as R, removeProject as S, setSupervisor as T, parseDeviceSlotOption as U, deviceSlotPlatforms as V, projectDeviceSlots as W, loadConfig$1 as _, clearDevice as a, releaseAndroidConsolePort as b, ensureConfig as c, getConfigDir as d, getConfigPath$1 as f, isPathPrefix as g, getRepoSettings as h, clearAndroidBootPending as i, ownership_claim_exports as j, process_identity_exports as k, findEnclosingWorktreeRoot as l, getProjectSettings as m, allMetroPorts as n, clearSupervisor as o, getProject as p, __commonJSMin as q, claimMetroPort as r, configCorruptRepair as s, allConsolePortsAndSerials as t, getConcurrencyLimits as u, recordIosSchemeApprovals as v, setDevice as w, releaseMetroPort as x, refuseRelativeStimPaths as y, deviceSlotFileKey as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as getConfigDir } from "./config-
|
|
2
|
-
import { D as withDirLock$1 } from "./workspace-state-
|
|
1
|
+
import { d as getConfigDir } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { D as withDirLock$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
3
3
|
import { renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1 } from "@stim-cli/core/state";
|
|
5
5
|
import { ensurePrivateDir } from "@stim-cli/core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { Dt as repoRoot } from "./settings-B717odTD.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative } from "node:path";
|
|
5
5
|
//#region src/dependency-state.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as resolvePackageJson, y as isPackageResolvable } from "./project-
|
|
2
|
-
import {
|
|
1
|
+
import { S as resolvePackageJson, y as isPackageResolvable } from "./project-_phNIJfs.mjs";
|
|
2
|
+
import { D as readBundleSchemes, E as pickDevClientScheme } from "./app-install-BIKtMfPq.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,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import { l as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-CRUqPxKw.mjs";
|
|
1
|
+
import { A as acquireAvdClaim, D as withConfigLock, V as deviceSlotPlatforms, W as projectDeviceSlots, _ as loadConfig, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as ownership_claim_exports, t as allConsolePortsAndSerials, w as setDevice } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
5
|
+
import { o as ownedDeviceLabel } from "./project-_phNIJfs.mjs";
|
|
6
|
+
import { A as listAvds, B as ownedAvdSystemImage, E as getAvdNameForSerial, F as ownedAvdDeviceProfile, J as resolveOwnedAvdSerial, L as ownedAvdMatchesConfiguration, O as listAdbDevices, P as nextConsolePort, R as ownedAvdName, W as pickDefaultSystemImage, b as createOwnedAvd, dt as parkedMaxSetting, f as assertOwnedAvdStopped, ft as readParked, g as avdPoolConfiguration, j as listInstalledSystemImages, lt as isLegacyDeletionClaim, n as OWNED_AVD_CONFIG_DEFAULTS, ot as adoptParked, t as DEFAULT_AVD_DEVICE_PROFILE, tt as waitForBoot, v as bootAndroidEmulator, y as configureNewOwnedAvd } from "./android-Mz_Inn3w.mjs";
|
|
7
|
+
import { s as pidExists } from "./metro-DnCEjCxs.mjs";
|
|
8
|
+
import { v as teardownOwnedAvd, x as teardownParkedAvd } from "./workspaces-C36s2jb9.mjs";
|
|
9
|
+
import { F as memoryCulpritAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, d as listAllIosSims } from "./ios-RkW4pnQf.mjs";
|
|
10
|
+
import { t as clearDeviceIdleShutdown } from "./idle-shutdown-DtxhPTKe.mjs";
|
|
11
|
+
import { i as countLiveOwnedDevices, n as DeviceAdmissionRefusal, p as withDeviceBootAdmission } from "./device-capacity-CBUAcRyQ.mjs";
|
|
12
|
+
import { t as reconcileSimSlim } from "./simslim-CCr3rE-A.mjs";
|
|
13
|
+
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-COSi6oS1.mjs";
|
|
15
14
|
import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
|
|
16
15
|
import { captureProcessIdentity } from "@stim-cli/core/process-identity";
|
|
17
16
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-
|
|
3
|
-
import { r as clockTime } from "./command-output-
|
|
4
|
-
import { r as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-
|
|
5
|
-
import { E as getAvdNameForSerial, G as probeEmulatorSerial, N as memoizeEmulatorProbe, O as listAdbDevices, U as physicalDeviceModel, Y as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, s as androidPoolCandidates } from "./android-
|
|
6
|
-
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-
|
|
7
|
-
import { t as selectFromPool } from "./device-pool-
|
|
8
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-
|
|
1
|
+
import { B as deviceSlotKey, U as parseDeviceSlotOption, W as projectDeviceSlots, p as getProject } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-BX1sJQ2E.mjs";
|
|
3
|
+
import { r as clockTime } from "./command-output-BTy8hZ0F.mjs";
|
|
4
|
+
import { r as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-_phNIJfs.mjs";
|
|
5
|
+
import { E as getAvdNameForSerial, G as probeEmulatorSerial, N as memoizeEmulatorProbe, O as listAdbDevices, U as physicalDeviceModel, Y as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, s as androidPoolCandidates } from "./android-Mz_Inn3w.mjs";
|
|
6
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-Cw2M4z51.mjs";
|
|
7
|
+
import { t as selectFromPool } from "./device-pool-Bf-pOhSw.mjs";
|
|
8
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-D7pi2Sca.mjs";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
//#region src/commands/device.ts
|
|
11
11
|
const DEFAULT_FOR = "5m";
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-C2lvoPsb.mjs";
|
|
1
|
+
import { V as deviceSlotPlatforms, W as projectDeviceSlots, _ as loadConfig$1, d as getConfigDir, j as ownership_claim_exports, u as getConcurrencyLimits } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { g as deviceReclaimIdleMinutesSetting } from "./settings-B717odTD.mjs";
|
|
3
|
+
import { w as workspaceLogsDir$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
4
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
5
|
+
import { O as listAdbDevices } from "./android-Mz_Inn3w.mjs";
|
|
6
|
+
import { T as canonicalPath, f as withIdleWorkspace } from "./workspaces-C36s2jb9.mjs";
|
|
7
|
+
import { Nt as recordCapacityRefusal, Pt as recordCapacityWait } from "./budget-f7516Zk0.mjs";
|
|
8
|
+
import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-4WopRPg-.mjs";
|
|
10
9
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
11
|
-
import { d as listAllIosSims, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-
|
|
12
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-
|
|
10
|
+
import { d as listAllIosSims, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-RkW4pnQf.mjs";
|
|
11
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DtxhPTKe.mjs";
|
|
13
12
|
import { realpathSync } from "node:fs";
|
|
14
13
|
import { basename, join } from "node:path";
|
|
15
14
|
import { DEVICE_RECLAIM_REASON, automaticMachineEnabled } from "@stim-cli/core/state";
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { D as withConfigLock$1, _ as loadConfig$1, c as ensureConfig, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
3
|
import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { b as teardownOwnedIosSim, v as teardownOwnedAvd } from "./workspaces-D2xSHBDY.mjs";
|
|
4
|
+
import { c as writeWorkspaceState, p as ensureWorkspaceStorage } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { A as listAvds, B as ownedAvdSystemImage, D as hostSystemImageArch, E as getAvdNameForSerial, J as resolveOwnedAvdSerial, O as listAdbDevices, R as ownedAvdName, W as pickDefaultSystemImage, _ as avdStorageRoots, a as androidDeviceAbi, b as createOwnedAvd, d as androidToolPath, f as assertOwnedAvdStopped, h as avdPathExists, j as listInstalledSystemImages, k as listAvdDeviceProfiles, q as resetAdoptedAvd, t as DEFAULT_AVD_DEVICE_PROFILE, tt as waitForBoot, v as bootAndroidEmulator } from "./android-Mz_Inn3w.mjs";
|
|
6
|
+
import { t as forgetCreatedDevice } from "./created-devices-Dzd5C2LF.mjs";
|
|
7
|
+
import { b as teardownOwnedIosSim, v as teardownOwnedAvd } from "./workspaces-C36s2jb9.mjs";
|
|
9
8
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
10
|
-
import { C as resetIosKeychain, P 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-
|
|
11
|
-
import { i as macosProcess, o as requiredMacosRecord } from "./state-
|
|
12
|
-
import {
|
|
13
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
14
|
-
import { _ as findAapt } from "./support-
|
|
15
|
-
import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-
|
|
16
|
-
import { r as stopMacosAppHeld } from "./stop-
|
|
17
|
-
import { n as parseLogStreamLine } from "./ios-
|
|
9
|
+
import { C as resetIosKeychain, P 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-RkW4pnQf.mjs";
|
|
10
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-CG_OFoaA.mjs";
|
|
11
|
+
import { S as launchIosApp, T as writeDebugHttpHost, b as launchAndroidApp, g as installAndroidApp, s as androidAppProcess, v as installIosApp, w as reverseMetroPorts, x as launchAndroidReleaseApp, y as iosAppProcess } from "./app-install-BIKtMfPq.mjs";
|
|
12
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-CBUAcRyQ.mjs";
|
|
13
|
+
import { _ as findAapt } from "./support-DMTqj3Hm.mjs";
|
|
14
|
+
import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-HqP1_vB_.mjs";
|
|
15
|
+
import { r as stopMacosAppHeld } from "./stop-DPEhunlw.mjs";
|
|
16
|
+
import { n as parseLogStreamLine } from "./ios-nOLJGVdy.mjs";
|
|
18
17
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
19
18
|
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
20
19
|
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint, readMacosRecord, readNdjsonGenerations } from "@stim-cli/core/state";
|
|
@@ -84,7 +83,7 @@ async function installHostedAndroidApp(home, session, attempt, device, metro) {
|
|
|
84
83
|
if (record.mode === "development") return "unverified";
|
|
85
84
|
for (let tries = 0; tries < 10; tries++) {
|
|
86
85
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
87
|
-
if (androidAppProcess(device.serial, record.bundleId, { exec: sdkExecutor })) return true;
|
|
86
|
+
if (androidAppProcess(device.serial, record.bundleId, { exec: sdkExecutor }).state === "running") return true;
|
|
88
87
|
}
|
|
89
88
|
return "unverified";
|
|
90
89
|
}
|
|
@@ -522,7 +521,7 @@ async function installHostedApp(home, session, attempt, device, metroPort) {
|
|
|
522
521
|
if (record.mode === "development") return "unverified";
|
|
523
522
|
for (let tries = 0; tries < 10; tries++) {
|
|
524
523
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
525
|
-
if (iosAppProcess(device.udid, record.bundleId)) return true;
|
|
524
|
+
if (iosAppProcess(device.udid, record.bundleId).state === "running") return true;
|
|
526
525
|
}
|
|
527
526
|
return "unverified";
|
|
528
527
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { A as configuredIosSimulatorViewer, C as resetIosKeychain, E as resolveOwnedIosSim, M as hostMemoryPressureAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, S as renameIosSim, T as resolveIosCreation, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, m as listIosRuntimes, n as bootIosSim, p as listIosDeviceTypes, u as iosSimulatorFailureAdvice, w as resetIosPrivacy, y as parseRuntimeVersion } from "./ios-
|
|
11
|
-
import { a as deviceTypeMismatch, c as runtimeMismatch, n as DeviceAdmissionRefusal, p as withDeviceBootAdmission } from "./device-capacity-
|
|
1
|
+
import { C as saveConfig, D as withConfigLock, V as deviceSlotPlatforms, W as projectDeviceSlots, _ as loadConfig, a as clearDevice, d as getConfigDir, j as ownership_claim_exports, w as setDevice } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { T as iosSimSlimProfileSetting } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { S as workspaceId } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
6
|
+
import { dt as parkedMaxSetting, ft as readParked, mt as selectParked, ot as adoptParked, st as dropParked } from "./android-Mz_Inn3w.mjs";
|
|
7
|
+
import { S as teardownParkedIosSim } from "./workspaces-C36s2jb9.mjs";
|
|
8
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-4WopRPg-.mjs";
|
|
9
|
+
import { t as cancellableSleep } from "./cancellation-C_22VQTH.mjs";
|
|
10
|
+
import { A as configuredIosSimulatorViewer, C as resetIosKeychain, E as resolveOwnedIosSim, M as hostMemoryPressureAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, S as renameIosSim, T as resolveIosCreation, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, m as listIosRuntimes, n as bootIosSim, p as listIosDeviceTypes, u as iosSimulatorFailureAdvice, w as resetIosPrivacy, y as parseRuntimeVersion } from "./ios-RkW4pnQf.mjs";
|
|
11
|
+
import { a as deviceTypeMismatch, c as runtimeMismatch, n as DeviceAdmissionRefusal, p as withDeviceBootAdmission } from "./device-capacity-CBUAcRyQ.mjs";
|
|
12
12
|
import chalk from "chalk";
|
|
13
13
|
//#region src/engine/device-ios.ts
|
|
14
14
|
function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlotWait) {
|
|
@@ -381,7 +381,7 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
|
|
|
381
381
|
}
|
|
382
382
|
const deadline = Math.max(bootDeadline, Date.now() + 2 * pollMs);
|
|
383
383
|
while (Date.now() < deadline) {
|
|
384
|
-
await
|
|
384
|
+
await cancellableSleep(pollMs);
|
|
385
385
|
let state = null;
|
|
386
386
|
try {
|
|
387
387
|
state = listAllIosSims({ timeoutMs: 3e4 }).find((s) => s.udid === udid)?.state ?? null;
|
|
@@ -406,8 +406,5 @@ function bootFailure(udid, error) {
|
|
|
406
406
|
reason: `Could not boot simulator ${udid}: ${error?.message || error}`
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
function sleep(ms) {
|
|
410
|
-
return new Promise((r) => setTimeout(r, ms));
|
|
411
|
-
}
|
|
412
409
|
//#endregion
|
|
413
410
|
export { ensureOwnedIosDevice as i, clearIosAdoptionPending as n, ensureIosBooted as r, IosDeviceMismatchError as t };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import { r as register } from "./cache-manifest-
|
|
5
|
-
import { m as defaultAndroidLayout } from "./settings-
|
|
6
|
-
import { D as withDirLock$1, c as writeWorkspaceState, m as sharedBuildCache, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState } from "./workspace-state-
|
|
7
|
-
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-
|
|
8
|
-
import { n as declareSpawnsOn, o as stopDeclaringSpawnsOn } from "./spawn-claims-
|
|
1
|
+
import { B as deviceSlotKey, H as parseDeviceSlotKey, K as validateDeviceSlot, d as getConfigDir, j as ownership_claim_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { r as gitQuiet, t as git } from "./git-DDfFzkMm.mjs";
|
|
4
|
+
import { r as register } from "./cache-manifest-XH-fvDUj.mjs";
|
|
5
|
+
import { m as defaultAndroidLayout } from "./settings-B717odTD.mjs";
|
|
6
|
+
import { D as withDirLock$1, c as writeWorkspaceState, m as sharedBuildCache, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
7
|
+
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-BTy8hZ0F.mjs";
|
|
8
|
+
import { n as declareSpawnsOn, o as stopDeclaringSpawnsOn } from "./spawn-claims-DVS5RkMS.mjs";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { join } from "node:path";
|
|
11
11
|
import { join as join$1, posix as posix$1, relative as relative$1, sep as sep$1 } from "path";
|
|
12
|
+
import { isJsonObject } from "@stim-cli/core/state";
|
|
12
13
|
import { buildUploadTimeoutMs } from "@stim-cli/cache";
|
|
13
14
|
import { existsSync as existsSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
14
15
|
import { isDeepStrictEqual } from "util";
|
|
@@ -188,9 +189,7 @@ const APP_ROOT_IOS_SKIPPED = /* @__PURE__ */ new Set([
|
|
|
188
189
|
]);
|
|
189
190
|
function gitIgnoredNames(projectRoot, names) {
|
|
190
191
|
if (names.length === 0) return /* @__PURE__ */ new Set();
|
|
191
|
-
const out =
|
|
192
|
-
"-C",
|
|
193
|
-
projectRoot,
|
|
192
|
+
const out = gitQuiet(projectRoot, [
|
|
194
193
|
"check-ignore",
|
|
195
194
|
"--",
|
|
196
195
|
...names
|
|
@@ -316,7 +315,7 @@ function storeBuild(platform, key, buildPath, rootOrOptions = {}) {
|
|
|
316
315
|
if (!buildPath || !existsSync$1(buildPath)) throw new Error(`No build to store at ${buildPath}`);
|
|
317
316
|
registerOnce(root);
|
|
318
317
|
return storeArtifact(entryDir(platform, key, root), buildPath, {
|
|
319
|
-
runFile: getExecutor().runFile,
|
|
318
|
+
runFile: (file, args) => getExecutor().runFile(file, args, { timeoutMs: "unbounded" }),
|
|
320
319
|
overwrite: Boolean(options.overwrite),
|
|
321
320
|
writeMetadata: (staging) => {
|
|
322
321
|
if (Array.isArray(options.sources)) try {
|
|
@@ -550,12 +549,10 @@ function changedDuringBuildLine(changed) {
|
|
|
550
549
|
const more = changed.length > shown.length ? `, and ${changed.length - shown.length} more` : "";
|
|
551
550
|
return `${shown.join(", ")}${more} changed while the build ran, so the artifact may not match its key; the build will be installed but not cached`;
|
|
552
551
|
}
|
|
553
|
-
function untrackedNativeFiles({ projectRoot, iosProjectPath = "ios"
|
|
552
|
+
function untrackedNativeFiles({ projectRoot, iosProjectPath = "ios" }) {
|
|
554
553
|
let out;
|
|
555
554
|
try {
|
|
556
|
-
out =
|
|
557
|
-
"-C",
|
|
558
|
-
projectRoot,
|
|
555
|
+
out = git(projectRoot, [
|
|
559
556
|
"ls-files",
|
|
560
557
|
"--others",
|
|
561
558
|
"--exclude-standard",
|
|
@@ -916,7 +913,7 @@ const fileLeaseIo = {
|
|
|
916
913
|
return withDirLock$1(lockPath, fn, { ensureParent: () => mkdirSync(deviceLocksDir(), { recursive: true }) });
|
|
917
914
|
},
|
|
918
915
|
readHolder(root) {
|
|
919
|
-
return parseWorkspaceLeases(readWorkspaceState(root)?.deviceLeases);
|
|
916
|
+
return parseWorkspaceLeases(readWorkspaceState$1(root)?.deviceLeases);
|
|
920
917
|
},
|
|
921
918
|
writeHolder(root, leases) {
|
|
922
919
|
if (Object.keys(leases).length === 0) clearWorkspaceStateKeys(root, ["deviceLeases"]);
|
|
@@ -937,7 +934,7 @@ function parseLease(raw) {
|
|
|
937
934
|
} catch {
|
|
938
935
|
return null;
|
|
939
936
|
}
|
|
940
|
-
if (!
|
|
937
|
+
if (!isJsonObject(parsed)) return null;
|
|
941
938
|
const entry = parsed;
|
|
942
939
|
if (entry.version !== 1 || !isPlatform(entry.platform)) return null;
|
|
943
940
|
const id = text(entry.id);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as parseLease, c as raiseLease, l as releaseRunLease, n as fileLeaseIo, p as takeLease, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-
|
|
3
|
-
import { a as formatElapsed, r as clockTime } from "./command-output-
|
|
4
|
-
import { a as VERIFY_TIMEOUT_MS, m as APP_READINESS_TIMEOUT_MS } from "./launch-verify-
|
|
1
|
+
import { B as deviceSlotKey } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { a as parseLease, c as raiseLease, l as releaseRunLease, n as fileLeaseIo, p as takeLease, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
|
|
3
|
+
import { a as formatElapsed, r as clockTime } from "./command-output-BTy8hZ0F.mjs";
|
|
4
|
+
import { a as VERIFY_TIMEOUT_MS, m as APP_READINESS_TIMEOUT_MS } from "./launch-verify-B6Q8hZP-.mjs";
|
|
5
5
|
//#region src/engine/device-lease-run.ts
|
|
6
6
|
const LEASE_STEP_FLOOR_MS = 6e4;
|
|
7
7
|
const DEBUG_VERIFY_STEP_MS = VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as parseLease, f as selectPoolDevice, n as fileLeaseIo, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-
|
|
3
|
-
import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-
|
|
1
|
+
import { B as deviceSlotKey } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { a as parseLease, f as selectPoolDevice, n as fileLeaseIo, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
|
|
3
|
+
import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-Cw2M4z51.mjs";
|
|
4
4
|
//#region src/engine/device-pool.ts
|
|
5
5
|
function heldPoolId(root, platform, now, io = fileLeaseIo, slot = "default") {
|
|
6
6
|
const record = io.readHolder(root)[deviceSlotKey(platform, slot)];
|