stim 1.19.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -3
- package/dist/{activity-BSw0x84R.mjs → activity-BaMpUQ4-.mjs} +3 -3
- package/dist/{agent-device-usage-output-Bjxu_VmX.mjs → agent-device-usage-output-VPaOgGaF.mjs} +7 -7
- package/dist/android-CLbBJ2ve.mjs +1258 -0
- package/dist/{android-DE5g_5gv.mjs → android-CZh6ElG5.mjs} +2 -2
- package/dist/{android-BdQC6zs1.mjs → android-DE8-JfGW.mjs} +105 -47
- package/dist/{android-cas-C87geAg-.mjs → android-cas-BFpS84v2.mjs} +9 -5
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/android-eXfIjKJr.mjs +6 -0
- package/dist/api-run.mjs +159 -8
- package/dist/{api-DIf_s86s.mjs → api-zuX3ynYN.mjs} +5 -1
- package/dist/api.d.mts +98 -4
- package/dist/api.mjs +1 -1
- package/dist/{app-install-CFI4ptUL.mjs → app-install-Cg9YJy3x.mjs} +9 -8
- package/dist/artifact-Ctb2jpw6.mjs +807 -0
- package/dist/artifact-DXk_Fle_.mjs +772 -0
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
- package/dist/{browser-web-CDhqQxhv.mjs → browser-web-xQWC2RWl.mjs} +19 -19
- package/dist/{budget-Dz-kyXLv.mjs → budget-RFbwFpG5.mjs} +3101 -3062
- package/dist/build-COBA1tBc.mjs +462 -0
- package/dist/{build-facts-B87vo-Im.d.mts → build-facts-DcLv2HSd.d.mts} +1 -32
- package/dist/build-plan-CRjAA6Qi.mjs +553 -0
- package/dist/{cache-manifest-DiwKSyv9.mjs → cache-manifest-qA3dT2x2.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{manifest-CX0d1IkZ.mjs → ccache-CtbqWxIC.mjs} +13 -19
- package/dist/{chrome-BTUOo8p2.mjs → chrome-Dp2lMLBe.mjs} +1 -1
- package/dist/{cli-C9Zvgbdc.mjs → cli-sGqlPu1n.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-CuUo8Nvg.mjs → client-zqjFd79D.mjs} +89 -307
- package/dist/collector-run.d.mts +4 -0
- package/dist/collector-run.mjs +7 -7
- package/dist/{command-output-Bt8ygHE7.mjs → command-output-CPDq_90S.mjs} +2 -2
- package/dist/{config-DC5jEtd1.mjs → config-D0LhTY3S.mjs} +8 -12
- package/dist/{created-devices-D0s26Hx5.mjs → created-devices-CXBMtoj5.mjs} +7 -6
- package/dist/{dependency-state-DKaS1OM9.mjs → dependency-state-B2m8eqsS.mjs} +2 -2
- package/dist/{detached-entry-pB_IPfV4.mjs → detached-entry-BXq4fIl-.mjs} +1 -1
- package/dist/{dev-client-CDY_zAmD.mjs → dev-client-BqYjMIaC.mjs} +2 -2
- package/dist/{device-BHw0WlHl.mjs → device-BgNj-qVj.mjs} +8 -8
- package/dist/device-D4DqjSZZ.mjs +727 -0
- package/dist/{device-capacity-BoN1jQkO.mjs → device-capacity-DrwHwR97.mjs} +13 -14
- package/dist/device-host-worker.mjs +38 -18
- package/dist/device-ios-DE8KJd3b.mjs +413 -0
- package/dist/{device-lease-Cu7PtQpZ.mjs → device-lease-C309csaB.mjs} +138 -24
- package/dist/{device-lease-run-D38SnZtt.mjs → device-lease-run-Baelt3nc.mjs} +4 -4
- package/dist/{device-pool-CP4rAsHx.mjs → device-pool-DtK9S6AD.mjs} +3 -3
- package/dist/{device-remote-B5GiUifk.mjs → device-remote-DjsNw8DD.mjs} +17 -68
- package/dist/doctor-DiP9HsIP.mjs +515 -0
- package/dist/{doctor-PRJH94v6.mjs → doctor-Dunu3Nv1.mjs} +333 -744
- package/dist/{doctor-watchman-wZhyTdp4.mjs → doctor-watchman-XJzT8tK-.mjs} +15 -13
- package/dist/{simslim-D9LkJxIO.mjs → eas-build-0gadvrca.mjs} +6 -152
- package/dist/{stim-installations-DbmUjsLv.mjs → eas-session-ledger-DJDeL4Uq.mjs} +57 -4
- package/dist/{error-diagnostics--v5HGOU0.mjs → error-diagnostics-BhQtoLrZ.mjs} +17 -12
- package/dist/errors-DzkMYh8Q.mjs +205 -0
- package/dist/{exec-i8GDPwq9.mjs → exec-B81Qodjn.mjs} +40 -10
- package/dist/{gc-CyHMcKcn.mjs → gc-D5cz5G0k.mjs} +22 -21
- package/dist/{device-ios-B2ruohE-.mjs → gradle-CZZo1TSA.mjs} +21 -650
- package/dist/{guide-dRaQJJk9.mjs → guide-DakjcoUt.mjs} +503 -251
- package/dist/{hosted-android-Bs7fytj7.mjs → hosted-android-C-D8Dj0_.mjs} +5 -5
- package/dist/{hosted-client-C5G4h_OJ.mjs → hosted-client--hNFgixu.mjs} +9 -3
- package/dist/{hosted-ios-Bik035eL.mjs → hosted-ios-Chx9XQyI.mjs} +3 -3
- package/dist/{hosted-logs-CI9Az9a4.mjs → hosted-logs-Bkz0Hxzh.mjs} +8 -8
- package/dist/{hosted-macos-DABm3ScO.mjs → hosted-macos-ckTjN-0V.mjs} +7 -6
- package/dist/{hosted-native-DbV2aUVw.mjs → hosted-native-3KXZ5-qn.mjs} +17 -14
- package/dist/{idle-shutdown-DYiMBn34.mjs → idle-shutdown-DhAUyf5s.mjs} +7 -7
- package/dist/{ios-DYUr9LGc.mjs → ios-BDBN-xpf.mjs} +8 -7
- package/dist/ios-CQ8bHQXB.mjs +1112 -0
- package/dist/{ios-DCrkgXEM.mjs → ios-VGvNdsv2.mjs} +1 -1
- package/dist/{ios-device-CrW8aMb5.mjs → ios-device-B1B14xND.mjs} +1 -1
- package/dist/{ios-device-CJ_ZOGky.mjs → ios-device-BWHKGaJq.mjs} +3 -3
- package/dist/{ios-BWbHFZVz.mjs → ios-o896T9PE.mjs} +195 -35
- package/dist/ios-project-BeOXKPt2.mjs +197 -0
- package/dist/{ios-state-By0XuLTQ.mjs → ios-state-BsXMwo5y.mjs} +1 -1
- package/dist/js-swap-Z_mSuRrx.mjs +432 -0
- package/dist/{react-native-ios-CSpIxexZ.mjs → launch-BootbMk4.mjs} +59 -612
- package/dist/launch-V1zqiOYn.mjs +745 -0
- package/dist/{launch-verify-DCveSE6d.mjs → launch-verify-Dl78EVgR.mjs} +26 -7
- package/dist/{logs-Bao1HOMy.mjs → logs-Bh4eqCCc.mjs} +11 -11
- package/dist/{macos-ciyBdTY5.mjs → macos-D7irBW3A.mjs} +42 -50
- package/dist/macos-kivF8qKz.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -10
- package/dist/{metro-DI2AjPF_.mjs → metro-_ZIE3Axg.mjs} +18 -5
- package/dist/{metro-gateway-BxpJLIwh.mjs → metro-gateway-BzlQZQmU.mjs} +2 -2
- package/dist/miss-reason-SuTptY-I.mjs +238 -0
- package/dist/{named-ports-B4iWH4E-.mjs → named-ports-O1TIl7tx.mjs} +3 -3
- package/dist/native-android-D94RlJ-X.mjs +226 -0
- package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
- package/dist/{native-runtime-BGxsbfny.mjs → native-runtime-D024BAvm.mjs} +9 -8
- package/dist/native-xcode-inputs-UElfGs59.mjs +306 -0
- package/dist/native-xcode-ios-CjS-nDVY.mjs +434 -0
- package/dist/{ndjson-LGZAMsqa.mjs → ndjson-GOnbyvso.mjs} +6 -6
- package/dist/offload-worker.d.mts +41 -7
- package/dist/offload-worker.mjs +409 -74
- package/dist/{ownership-EB0ySdGK.mjs → ownership-BrjepDiv.mjs} +2 -2
- package/dist/{placement-log-Dxe34rJm.mjs → placement-log-BItXET1x.mjs} +1 -1
- package/dist/plan-Jwu_vr-F.mjs +260 -0
- package/dist/plan-placement-B466UYMU.mjs +73 -0
- package/dist/{ports-ByPc0_97.mjs → ports-BFRL6JTj.mjs} +3 -3
- package/dist/{prebuild-BKJ3wJI1.mjs → prebuild-DB_zLOLc.mjs} +4 -4
- package/dist/{preview-BbSottmO.mjs → preview-BRLFRhTz.mjs} +50 -32
- package/dist/project-DX8fXyw_.mjs +1131 -0
- package/dist/project-plan-BPwbLwQu.mjs +10 -0
- package/dist/{pull-request-IHNdMnG8.mjs → pull-request-vOhLNmIb.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-android-CuXM3QS8.mjs +921 -0
- package/dist/react-native-build-JUF31S8U.mjs +239 -0
- package/dist/react-native-doctor-BQHqiXaQ.mjs +78 -0
- package/dist/react-native-ios-DtVO4qf2.mjs +595 -0
- package/dist/{recordings-Bv8McZN4.mjs → recordings-Bk-VivUV.mjs} +1 -1
- package/dist/{reload-rAPdqeRR.mjs → reload-D9V7D8gP.mjs} +17 -13
- package/dist/remote-CZiTijxG.mjs +192 -0
- package/dist/{remote-cache-N3hAEaAL.mjs → remote-cache-fxcl5C-L.mjs} +5 -5
- package/dist/result-BrfgXtdO.mjs +186 -0
- package/dist/{run-lAkle1-c.mjs → run-ClC8UVB5.mjs} +3 -3
- package/dist/{server-bare-CkIjnegq.mjs → server-bare-dWjAarki.mjs} +5 -5
- package/dist/server-command-DnJYLnr4.mjs +69 -0
- package/dist/{server-expo-n3tUi3Em.mjs → server-expo-CUuzP9Mp.mjs} +107 -82
- package/dist/server-expo-Dvkd7JcF.mjs +2 -0
- package/dist/{settings-CxgngUZk.mjs → settings-Bbztm4oV.mjs} +179 -129
- package/dist/{settings-2am7TSxp.mjs → settings-BuKMOANA.mjs} +6 -6
- package/dist/{state-lKh8shBp.d.mts → settings-vk3mJGSm.d.mts} +4 -2
- package/dist/settings.schema.json +84 -0
- package/dist/simslim-ChMfe8rg.mjs +149 -0
- package/dist/{slot-launch-HV_KtPIw.mjs → slot-launch-CeCRr6MK.mjs} +6 -6
- package/dist/{stage-BgaZJVZY.mjs → stage-BNKKdDNc.mjs} +6 -3
- package/dist/{start-DtxthMfI.mjs → start-CRkG-mZ7.mjs} +97 -68
- package/dist/start-mh6bS27z.mjs +2 -0
- package/dist/{state-Tp4uImDS.mjs → state-BUpAmt2r.mjs} +1 -1
- package/dist/{state-D2KtnALG.mjs → state-lqxdOH_g.mjs} +32 -12
- package/dist/{stats-8EJ5ivFT.mjs → stats-CaB1MxMi.mjs} +5 -5
- package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
- package/dist/{status-BOyp0CUl.mjs → status-C7vzkInu.mjs} +81 -293
- package/dist/status-watch-ZaVqRdtW.mjs +296 -0
- package/dist/{stim-desktop-C65jk_q2.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
- package/dist/{stop-zDlknFoz.mjs → stop-BO80KJoT.mjs} +21 -20
- package/dist/{stop-DRipAg-e.mjs → stop-BU7JaFCg.mjs} +2 -2
- package/dist/{stop-D0UIpZuh.mjs → stop-Cftw_sXJ.mjs} +5 -5
- package/dist/supervisor-run.d.mts +7 -2
- package/dist/supervisor-run.mjs +32 -20
- package/dist/{support-DsNaFg6D.mjs → support-Ca6PZbpr.mjs} +17 -7
- package/dist/{support-CNqYkV0y.mjs → support-Co0wk8Cv.mjs} +61 -8
- package/dist/{swiftpm-macos-aJzPAj1t.mjs → swiftpm-macos-siFSkmCO.mjs} +5 -5
- package/dist/tailnet-D7-tE_ug.mjs +265 -0
- package/dist/toolchain-B12psPA2.mjs +2 -0
- package/dist/{toolchain-C3xSoyUl.mjs → toolchain-SqehyPLw.mjs} +206 -53
- package/dist/{trigger-CAhmG-4s.mjs → trigger-C0MWBi8O.mjs} +2 -2
- package/dist/trigger-SHLOWJ4O.mjs +2 -0
- package/dist/{warm-progress-pFLB2e6P.mjs → warm-progress-5FAXkXIg.mjs} +6 -6
- package/dist/{watchman-BL1IdOtq.mjs → watchman-CqmaGcIb.mjs} +6 -6
- package/dist/{web-DbbrPUn0.mjs → web-BTjzE8mc.mjs} +9 -13
- package/dist/web-CHN5gh34.mjs +2 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-CR9X86xJ.mjs → workspace-state-CvgTFe-h.mjs} +36 -36
- package/dist/{workspaces-Djb2gfi9.mjs → workspaces-C4kqIOlx.mjs} +1260 -1258
- package/dist/worktree-Cgnm6vZt.mjs +2 -0
- package/dist/{worktree-BL4M1rhB.mjs → worktree-DtRsh6go.mjs} +86 -50
- package/package.json +6 -5
- package/shim/native-android.gradle +101 -0
- package/dist/android-BXc6BmEi.mjs +0 -3732
- package/dist/android-BvV1gGdN.mjs +0 -4
- package/dist/ios-ITYno9rO.mjs +0 -2241
- package/dist/macos-nIOATJmR.mjs +0 -2
- package/dist/metro-store-BAHFcJm6.mjs +0 -106
- package/dist/miss-reason-CjQCOKqq.mjs +0 -1743
- package/dist/plan-placement-BVY59qa8.mjs +0 -290
- package/dist/project-B5eQ1USs.mjs +0 -612
- package/dist/react-native-ios-BMh2i25I.mjs +0 -2
- package/dist/server-expo-DGsdUGX2.mjs +0 -2
- package/dist/start-D8NbxNBb.mjs +0 -2
- package/dist/trigger-CoalsMTV.mjs +0 -2
- package/dist/web-DFpFeZu5.mjs +0 -2
- package/dist/worktree-DV-A0LNL.mjs +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as requestHostedMetro } from "./metro-gateway-
|
|
3
|
-
import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-
|
|
1
|
+
import { o as call, s as connectHost } from "./hosted-client--hNFgixu.mjs";
|
|
2
|
+
import { i as requestHostedMetro } from "./metro-gateway-BzlQZQmU.mjs";
|
|
3
|
+
import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-3KXZ5-qn.mjs";
|
|
4
4
|
//#region src/device-host/hosted-android.ts
|
|
5
|
-
async function prepareHostedAndroid(machine, selectors, recorded) {
|
|
6
|
-
return await prepareHostedNative(machine, selectors, recorded, "android");
|
|
5
|
+
async function prepareHostedAndroid(machine, selectors, recorded, mode) {
|
|
6
|
+
return await prepareHostedNative(machine, selectors, recorded, "android", false, mode);
|
|
7
7
|
}
|
|
8
8
|
async function placeHostedAndroid(target, options) {
|
|
9
9
|
return await placeHostedNative(target, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as pinnedEndpoint$1 } from "./tailnet-D7-tE_ug.mjs";
|
|
2
|
+
import { t as BuildConnection, x as configuredMachines } from "./client-zqjFd79D.mjs";
|
|
2
3
|
import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
|
|
3
4
|
import { join } from "node:path";
|
|
4
5
|
import { HOSTED_APP_CHUNK_BYTES, hostedMacosAppSlot, isJsonObject, readDeviceHostMachines } from "@stim-cli/core/state";
|
|
@@ -7,6 +8,7 @@ import { createHash } from "node:crypto";
|
|
|
7
8
|
const CONNECT_TIMEOUT_MS = 1e4;
|
|
8
9
|
/** Covers 90s stop + 15s final logs + three 10s worker group-settle bounds, with 45s for polling and transport. */
|
|
9
10
|
const SESSION_TIMEOUT_MS = 18e4;
|
|
11
|
+
const PREPARE_TIMEOUT_MS = 355e3;
|
|
10
12
|
const INSTALL_TIMEOUT_MS = 3e5;
|
|
11
13
|
const sleep = (ms) => new Promise((done) => setTimeout(done, ms));
|
|
12
14
|
const sha256 = (content) => createHash("sha256").update(content).digest("hex");
|
|
@@ -37,7 +39,7 @@ function hostingCredential(machine) {
|
|
|
37
39
|
/** Connects only to the pinned node of an approved remote Mac, and only when it grants `device-host`. */
|
|
38
40
|
async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = false) {
|
|
39
41
|
const credential = hostingCredential(machine);
|
|
40
|
-
const target = pinnedEndpoint$1(credential);
|
|
42
|
+
const target = await pinnedEndpoint$1(credential);
|
|
41
43
|
if (typeof target === "string") throw Object.assign(/* @__PURE__ */ new Error(`Stim does not connect to ${machine}: ${target}.`), { code: "STIM_HOSTING_REFUSED" });
|
|
42
44
|
const opened = await BuildConnection.open(target, credential.deviceToken, timeoutMs, "device-host").catch((error) => {
|
|
43
45
|
throw Object.assign(new Error(`${machine} is unreachable. Check stim-server and its tailnet serve route on ${machine}.`, { cause: error }), { code: strict ? "STIM_HOSTING_REFUSED" : "closed" });
|
|
@@ -52,6 +54,10 @@ async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = fal
|
|
|
52
54
|
connection: opened
|
|
53
55
|
};
|
|
54
56
|
}
|
|
57
|
+
function requireHostedAppMode(host, platform, mode) {
|
|
58
|
+
if (mode !== "process") return;
|
|
59
|
+
if (!host.connection.supports(platform === "ios" ? "hosted-ios-process" : "hosted-android-process")) throw credentialRefusal(`${host.machine} does not support hosted ${platform} process apps.`, `Update stim-server on ${host.machine} to a version supporting hosted ${platform} process apps, then retry.`);
|
|
60
|
+
}
|
|
55
61
|
const gatewaySecrets = /* @__PURE__ */ new WeakMap();
|
|
56
62
|
function redactHostText(host, message) {
|
|
57
63
|
for (const secret of [host.credential.deviceToken, gatewaySecrets.get(host)]) if (secret) message = message.replaceAll(secret, "[redacted]");
|
|
@@ -193,4 +199,4 @@ async function upload(host, ids, missing, content) {
|
|
|
193
199
|
}
|
|
194
200
|
}
|
|
195
201
|
//#endregion
|
|
196
|
-
export {
|
|
202
|
+
export { bundleManifest as a, heldNoLonger as c, requireHostedAppMode as d, settle as f, upload as g, unknownSession as h, attach as i, hostedSession as l, sleep as m, PREPARE_TIMEOUT_MS as n, call as o, sha256 as p, SESSION_TIMEOUT_MS as r, connectHost as s, INSTALL_TIMEOUT_MS as t, probeHostedSession as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-
|
|
1
|
+
import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-3KXZ5-qn.mjs";
|
|
2
2
|
//#region src/device-host/hosted-ios.ts
|
|
3
|
-
async function prepareHostedIos(machine, selectors, recorded) {
|
|
4
|
-
return await prepareHostedNative(machine, selectors, recorded, "ios");
|
|
3
|
+
async function prepareHostedIos(machine, selectors, recorded, mode) {
|
|
4
|
+
return await prepareHostedNative(machine, selectors, recorded, "ios", false, mode);
|
|
5
5
|
}
|
|
6
6
|
async function placeHostedIos(target, options) {
|
|
7
7
|
return await placeHostedNative(target, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as createNdjsonWriter } from "./ndjson-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
2
|
+
import { L as deviceSlotFileKey, W as validateDeviceSlot } from "./config-D0LhTY3S.mjs";
|
|
3
|
+
import { w as workspaceLogsDir$1, x as workspaceDir } from "./workspace-state-CvgTFe-h.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-CPDq_90S.mjs";
|
|
5
|
+
import { o as parseMachine$1 } from "./tailnet-D7-tE_ug.mjs";
|
|
6
|
+
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
7
|
+
import { n as macosDir } from "./state-BUpAmt2r.mjs";
|
|
8
|
+
import { o as call } from "./hosted-client--hNFgixu.mjs";
|
|
9
9
|
import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { isJsonObject, parseHostedAgentGrant, parseHostedLogsCursor } from "@stim-cli/core/state";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as phaseLine } from "./command-output-
|
|
2
|
-
import { n as macosDir } from "./state-
|
|
3
|
-
import { a as
|
|
4
|
-
import { i as agentAccess, r as closeAgentConnection, t as pullHostedMacosLogs } from "./hosted-logs-
|
|
1
|
+
import { l as phaseLine } from "./command-output-CPDq_90S.mjs";
|
|
2
|
+
import { n as macosDir } from "./state-BUpAmt2r.mjs";
|
|
3
|
+
import { a as bundleManifest, c as heldNoLonger, f as settle, g as upload, h as unknownSession, i as attach, l as hostedSession, m as sleep, n as PREPARE_TIMEOUT_MS, o as call, p as sha256, r as SESSION_TIMEOUT_MS, s as connectHost, t as INSTALL_TIMEOUT_MS } from "./hosted-client--hNFgixu.mjs";
|
|
4
|
+
import { i as agentAccess, r as closeAgentConnection, t as pullHostedMacosLogs } from "./hosted-logs-Bkz0Hxzh.mjs";
|
|
5
5
|
import { rmSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { hostedMacosBundleId, parseHostedMacosDevice, validHostedAppArguments } from "@stim-cli/core/state";
|
|
@@ -18,7 +18,8 @@ async function placeHostedMacos(host, { root, bundle, bundleId, handoff, argumen
|
|
|
18
18
|
let session = null;
|
|
19
19
|
if (recorded) {
|
|
20
20
|
try {
|
|
21
|
-
session = await settle(host, await attach(host, recorded.session), ["preparing"
|
|
21
|
+
session = await settle(host, await attach(host, recorded.session), ["preparing"], PREPARE_TIMEOUT_MS);
|
|
22
|
+
session = await settle(host, session, ["stopping"], SESSION_TIMEOUT_MS);
|
|
22
23
|
} catch (error) {
|
|
23
24
|
if (!heldNoLonger(error)) throw error;
|
|
24
25
|
}
|
|
@@ -49,7 +50,7 @@ async function placeHostedMacos(host, { root, bundle, bundleId, handoff, argumen
|
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
reserved(placement);
|
|
52
|
-
session = await settle(host, session, ["preparing"],
|
|
53
|
+
session = await settle(host, session, ["preparing"], PREPARE_TIMEOUT_MS);
|
|
53
54
|
if (session.state === "unknown") throw unknownSession(host, session);
|
|
54
55
|
if (session.state !== "ready") throw new Error(`The hosted session ${session.id} on ${host.machine} is ${session.state}.`);
|
|
55
56
|
const device = parseHostedMacosDevice(session.device);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as readWorkspaceState$1,
|
|
2
|
-
import { a as
|
|
3
|
-
import { i as agentAccess, n as pullHostedNativeLogs, r as closeAgentConnection } from "./hosted-logs-
|
|
4
|
-
import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-
|
|
5
|
-
import { s as writeHostedNative } from "./ios-state-
|
|
1
|
+
import { r as readWorkspaceState$1, x as workspaceDir } from "./workspace-state-CvgTFe-h.mjs";
|
|
2
|
+
import { a as bundleManifest, c as heldNoLonger, d as requireHostedAppMode, f as settle, g as upload, h as unknownSession, i as attach, l as hostedSession, m as sleep, n as PREPARE_TIMEOUT_MS, o as call, p as sha256, r as SESSION_TIMEOUT_MS, s as connectHost, t as INSTALL_TIMEOUT_MS } from "./hosted-client--hNFgixu.mjs";
|
|
3
|
+
import { i as agentAccess, n as pullHostedNativeLogs, r as closeAgentConnection } from "./hosted-logs-Bkz0Hxzh.mjs";
|
|
4
|
+
import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-BzlQZQmU.mjs";
|
|
5
|
+
import { s as writeHostedNative } from "./ios-state-BsXMwo5y.mjs";
|
|
6
6
|
import { readFileSync, rmSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { hostedNativeRecords, isJsonObject, parseHostedAndroidDevice, parseHostedChoice, parseHostedDevice, parseHostedNativeOffer, parseHostedNativePlacement, requireAutomaticMachine, unreadableHostedNative } from "@stim-cli/core/state";
|
|
@@ -16,14 +16,16 @@ function hostingRefusal(machine, error) {
|
|
|
16
16
|
}
|
|
17
17
|
const androidAgentRemoteConfig = (root, slot) => join(workspaceDir(root), "hosted-android", slot, "agent-device-remote.json");
|
|
18
18
|
const iosAgentRemoteConfig = (root, slot) => join(workspaceDir(root), "hosted-ios", slot, "agent-device-remote.json");
|
|
19
|
-
async function prepareHostedNative(machine, selectors, recorded, platform = "ios", resumeOnly = false) {
|
|
19
|
+
async function prepareHostedNative(machine, selectors, recorded, platform = "ios", resumeOnly = false, mode) {
|
|
20
20
|
let host;
|
|
21
21
|
try {
|
|
22
22
|
host = await connectHost(machine, void 0, true);
|
|
23
|
+
requireHostedAppMode(host, platform, mode);
|
|
23
24
|
if (recorded) {
|
|
24
25
|
let session = null;
|
|
25
26
|
try {
|
|
26
|
-
session = await settle(host, await attach(host, recorded.session, void 0, platform), ["preparing"
|
|
27
|
+
session = await settle(host, await attach(host, recorded.session, void 0, platform), ["preparing"], PREPARE_TIMEOUT_MS, platform);
|
|
28
|
+
session = await settle(host, session, ["stopping"], SESSION_TIMEOUT_MS, platform);
|
|
27
29
|
} catch (error) {
|
|
28
30
|
if (!heldNoLonger(error)) throw error;
|
|
29
31
|
}
|
|
@@ -75,13 +77,14 @@ async function reserveHostedNative(host, target, params, platform) {
|
|
|
75
77
|
throw Object.assign(/* @__PURE__ */ new Error(`${error instanceof Error ? error.message : String(error)} Retry stim ${platform} --remote auto; the build already targets ${host.machine}'s architecture.`), { remedy: `Retry stim ${platform} --remote auto.` });
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId, selectors, release, devClientScheme, reserved, note, enterPhase = () => {}, metro = requestHostedMetro, metroPort, platform = "ios" }) {
|
|
80
|
+
async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId, selectors, release, mode = release ? "release" : "development", devClientScheme, reserved, note, enterPhase = () => {}, metro = requestHostedMetro, metroPort, platform = "ios" }) {
|
|
79
81
|
let host = target.host;
|
|
80
82
|
try {
|
|
81
|
-
if (
|
|
83
|
+
if (mode === "development" && metro === requestHostedMetro) requireHostedMetro(root);
|
|
82
84
|
enterPhase("device");
|
|
83
85
|
host = await connectHost(host.machine, void 0, true);
|
|
84
86
|
target.host = host;
|
|
87
|
+
requireHostedAppMode(host, platform, mode);
|
|
85
88
|
let session = (target.session ? await attach(host, target.session.id, void 0, platform) : null) ?? await reserveHostedNative(host, target, {
|
|
86
89
|
platform,
|
|
87
90
|
workspace: root,
|
|
@@ -106,7 +109,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
|
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
reserved(placement);
|
|
109
|
-
session = await settle(host, session, ["preparing"],
|
|
112
|
+
session = await settle(host, session, ["preparing"], PREPARE_TIMEOUT_MS, platform);
|
|
110
113
|
if (session.state !== "ready") throw unknownSession(host, session);
|
|
111
114
|
const device = platform === "ios" ? parseHostedDevice(session.device) : parseHostedAndroidDevice(session.device);
|
|
112
115
|
if (!device || device.architecture !== target.choice.architecture || "avdName" in device && "systemImage" in target.choice && (device.systemImage !== target.choice.systemImage || device.deviceProfile !== target.choice.deviceProfile)) throw new Error(platform === "ios" ? "The reserved simulator does not match the offered architecture." : "The reserved emulator does not match the offered architecture or selectors.");
|
|
@@ -115,7 +118,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
|
|
|
115
118
|
device
|
|
116
119
|
};
|
|
117
120
|
reserved(placement);
|
|
118
|
-
if (
|
|
121
|
+
if (mode === "development") {
|
|
119
122
|
const gateway = await metro(root, session.id, host.credential);
|
|
120
123
|
await call(host, "device-host.metro.open", {
|
|
121
124
|
session: session.id,
|
|
@@ -148,8 +151,8 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
|
|
|
148
151
|
const offer = {
|
|
149
152
|
...ids,
|
|
150
153
|
bundleId,
|
|
151
|
-
mode
|
|
152
|
-
|
|
154
|
+
mode,
|
|
155
|
+
...mode === "development" && devClientScheme ? { devClientScheme } : {},
|
|
153
156
|
manifest: {
|
|
154
157
|
sha256: sha256(manifest),
|
|
155
158
|
size: manifest.length
|
|
@@ -201,7 +204,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
|
|
|
201
204
|
};
|
|
202
205
|
return {
|
|
203
206
|
placement,
|
|
204
|
-
launched:
|
|
207
|
+
launched: mode !== "development" && delivery.launched === true ? true : "unverified"
|
|
205
208
|
};
|
|
206
209
|
} catch (error) {
|
|
207
210
|
throw hostingRefusal(host.machine, error);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { m as workspaceDeviceLastUseAt } from "./activity-
|
|
7
|
-
import { d as listAllIosSims } from "./ios-
|
|
1
|
+
import { R as deviceSlotKey, _ as loadConfig$1 } from "./config-D0LhTY3S.mjs";
|
|
2
|
+
import { a as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-CvgTFe-h.mjs";
|
|
3
|
+
import { o as formatLongDuration } from "./command-output-CPDq_90S.mjs";
|
|
4
|
+
import { T as canonicalPath, b as teardownOwnedIosSim, v as teardownOwnedAvd } from "./workspaces-C4kqIOlx.mjs";
|
|
5
|
+
import { f as collectOwnedDeviceActivity, g as workspaceBuildInProgress } from "./budget-RFbwFpG5.mjs";
|
|
6
|
+
import { m as workspaceDeviceLastUseAt } from "./activity-BaMpUQ4-.mjs";
|
|
7
|
+
import { d as listAllIosSims } from "./ios-o896T9PE.mjs";
|
|
8
8
|
import { DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, readDeviceIdleShutdowns } from "@stim-cli/core/state";
|
|
9
9
|
//#region src/devices/idle-shutdown.ts
|
|
10
10
|
const SIM_LIST_TIMEOUT_MS = 1e4;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
2
|
-
import { D as schemesFromInfoPlist, T as pickDevClientScheme } from "./app-install-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-
|
|
1
|
+
import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-CPDq_90S.mjs";
|
|
2
|
+
import { D as schemesFromInfoPlist, T as pickDevClientScheme } from "./app-install-Cg9YJy3x.mjs";
|
|
3
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-D024BAvm.mjs";
|
|
4
|
+
import { t as devClientScheme } from "./dev-client-BqYjMIaC.mjs";
|
|
5
|
+
import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-Co0wk8Cv.mjs";
|
|
6
|
+
import { a as lastBuildRecord, i as iosFacts, n as cacheDescription, s as writeLastBuild } from "./ios-project-BeOXKPt2.mjs";
|
|
7
|
+
import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-CQ8bHQXB.mjs";
|
|
8
|
+
import { a as collectorEntry, o as replaceCollector } from "./launch-BootbMk4.mjs";
|
|
8
9
|
export { appNameFromPath, buildLogFile, cacheDescription, collectorEntry, iosCommand as default, devClientScheme, deviceLabel, ensureWorkspaceStorageSafely, formatDuration, iosConfigurationSetting, iosFacts, isReleaseConfiguration, lastBuildRecord, phaseLine, pickDevClientScheme, podAction, registerIos, replaceCollector, resolveConfiguration, resolveDeviceType, resolveRuntime, runIosOperation, schemesFromInfoPlist, shortHash, shortUdid, writeLastBuild };
|