stim 1.17.2 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -1
- package/dist/{activity-IRvJY_ru.mjs → activity-BSw0x84R.mjs} +4 -4
- package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-Bjxu_VmX.mjs} +8 -8
- package/dist/{android-B9yaNKwa.mjs → android-BXc6BmEi.mjs} +658 -404
- package/dist/{android-B_YNZy61.mjs → android-BdQC6zs1.mjs} +9 -9
- package/dist/android-BvV1gGdN.mjs +4 -0
- package/dist/{android-DE4v59Mb.mjs → android-DE5g_5gv.mjs} +2 -2
- package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-C87geAg-.mjs} +5 -5
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/api-DIf_s86s.mjs +150 -0
- package/dist/api-run.d.mts +1 -0
- package/dist/api-run.mjs +145 -0
- package/dist/api.d.mts +218 -0
- package/dist/api.mjs +2 -0
- package/dist/{app-install-VPkI5WEg.mjs → app-install-CFI4ptUL.mjs} +33 -13
- package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
- package/dist/{web-Dl0KSRHf.mjs → browser-web-CDhqQxhv.mjs} +138 -176
- package/dist/{budget-DfcgFdQB.mjs → budget-Dz-kyXLv.mjs} +1391 -58
- package/dist/build-facts-B87vo-Im.d.mts +142 -0
- package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-DiwKSyv9.mjs} +3 -3
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{chrome-BrcVWQyD.mjs → chrome-BTUOo8p2.mjs} +1 -1
- package/dist/cli-C9Zvgbdc.mjs +68 -0
- package/dist/cli.mjs +1 -1
- package/dist/{client-SvBdgObD.mjs → client-CuUo8Nvg.mjs} +381 -49
- package/dist/collector-run.d.mts +6 -0
- package/dist/collector-run.mjs +9 -9
- package/dist/{command-output-CDAIFD-8.mjs → command-output-Bt8ygHE7.mjs} +2 -2
- package/dist/{config-D0DbpZtM.mjs → config-DC5jEtd1.mjs} +9 -5
- package/dist/{created-devices-CpvzBL25.mjs → created-devices-D0s26Hx5.mjs} +2 -2
- package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-DKaS1OM9.mjs} +2 -2
- package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-pB_IPfV4.mjs} +1 -1
- package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CDY_zAmD.mjs} +2 -2
- package/dist/{device-C8IOoJPv.mjs → device-BHw0WlHl.mjs} +8 -8
- package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-BoN1jQkO.mjs} +25 -14
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{gradle-dJpre3Yn.mjs → device-ios-B2ruohE-.mjs} +661 -107
- package/dist/{device-lease-DpoS36_u.mjs → device-lease-Cu7PtQpZ.mjs} +9 -9
- package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-D38SnZtt.mjs} +4 -4
- package/dist/{device-pool-3o7s5lo4.mjs → device-pool-CP4rAsHx.mjs} +3 -3
- package/dist/{device-remote-hFSkpfQu.mjs → device-remote-B5GiUifk.mjs} +15 -16
- package/dist/{doctor-CFv1fCrF.mjs → doctor-PRJH94v6.mjs} +61 -34
- package/dist/doctor-watchman-wZhyTdp4.mjs +259 -0
- package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics--v5HGOU0.mjs} +11 -11
- package/dist/{exec-CaErVv7t.mjs → exec-i8GDPwq9.mjs} +93 -6
- package/dist/{gc-DEmkg3Xh.mjs → gc-CyHMcKcn.mjs} +25 -471
- package/dist/{guide-CSmhMTf8.mjs → guide-dRaQJJk9.mjs} +681 -507
- package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bs7fytj7.mjs} +3 -3
- package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C5G4h_OJ.mjs} +2 -2
- package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-Bik035eL.mjs} +1 -1
- package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-CI9Az9a4.mjs} +9 -9
- package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-DABm3ScO.mjs} +5 -5
- package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DbV2aUVw.mjs} +13 -9
- package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-DYiMBn34.mjs} +7 -8
- package/dist/{ios-DSfnPfse.mjs → ios-BWbHFZVz.mjs} +19 -7
- package/dist/{ios-Cr1h5gnO.mjs → ios-DCrkgXEM.mjs} +1 -1
- package/dist/ios-DYUr9LGc.mjs +8 -0
- package/dist/ios-ITYno9rO.mjs +2241 -0
- package/dist/{ios-device-pAN4t54-.mjs → ios-device-CJ_ZOGky.mjs} +3 -3
- package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-CrW8aMb5.mjs} +1 -1
- package/dist/{ios-state-8L3lgum6.mjs → ios-state-By0XuLTQ.mjs} +1 -1
- package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-DCveSE6d.mjs} +5 -5
- package/dist/{logs-BAaS7gS2.mjs → logs-Bao1HOMy.mjs} +13 -13
- package/dist/{macos-BIRQS90f.mjs → macos-ciyBdTY5.mjs} +194 -132
- package/dist/macos-nIOATJmR.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +349 -47
- package/dist/manifest-CX0d1IkZ.mjs +148 -0
- package/dist/{metro-g8NqiJp-.mjs → metro-DI2AjPF_.mjs} +196 -43
- package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-BxpJLIwh.mjs} +4 -4
- package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
- package/dist/{build-plan-BDsSi09V.mjs → miss-reason-CjQCOKqq.mjs} +207 -249
- package/dist/{named-ports-C8m8EQs2.mjs → named-ports-B4iWH4E-.mjs} +70 -8
- package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-BGxsbfny.mjs} +6 -6
- package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
- package/dist/offload-worker.d.mts +3 -45
- package/dist/offload-worker.mjs +11 -11
- package/dist/{ownership-DyRQru0q.mjs → ownership-EB0ySdGK.mjs} +3 -3
- package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
- package/dist/placement-log-Dxe34rJm.mjs +88 -0
- package/dist/plan-placement-BVY59qa8.mjs +290 -0
- package/dist/{ports-4nYqxPWC.mjs → ports-ByPc0_97.mjs} +3 -3
- package/dist/{prebuild-D7RUMkwN.mjs → prebuild-BKJ3wJI1.mjs} +5 -5
- package/dist/preview-BbSottmO.mjs +986 -0
- package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
- package/dist/project-B5eQ1USs.mjs +612 -0
- package/dist/{pull-request-pxnDCQzn.mjs → pull-request-IHNdMnG8.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-ios-BMh2i25I.mjs +2 -0
- package/dist/react-native-ios-CSpIxexZ.mjs +2083 -0
- package/dist/{recordings-BNgsD1Tr.mjs → recordings-Bv8McZN4.mjs} +1 -1
- package/dist/{reload-DcRxj3qG.mjs → reload-rAPdqeRR.mjs} +14 -15
- package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-N3hAEaAL.mjs} +5 -5
- package/dist/{run-CkE9y0nc.mjs → run-lAkle1-c.mjs} +5 -5
- package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-CkIjnegq.mjs} +5 -6
- package/dist/server-expo-DGsdUGX2.mjs +2 -0
- package/dist/{server-expo-CHTyXD0G.mjs → server-expo-n3tUi3Em.mjs} +5 -6
- package/dist/{settings-SR9OmW9h.mjs → settings-2am7TSxp.mjs} +5 -5
- package/dist/{settings-Cfd-0r2d.mjs → settings-CxgngUZk.mjs} +116 -103
- package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
- package/dist/settings.schema.json +198 -9
- package/dist/{simslim-BWNrc3M3.mjs → simslim-D9LkJxIO.mjs} +7 -7
- package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-HV_KtPIw.mjs} +6 -6
- package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
- package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
- package/dist/{stage-CzaiwFsI.mjs → stage-BgaZJVZY.mjs} +14 -3
- package/dist/{start-AlfCPRVU.mjs → start-D8NbxNBb.mjs} +1 -1
- package/dist/{start-DUz3mYdb.mjs → start-DtxthMfI.mjs} +34 -27
- package/dist/{state-PeQiJuIu.mjs → state-D2KtnALG.mjs} +4 -4
- package/dist/{state-DyaNTgfR.mjs → state-Tp4uImDS.mjs} +5 -3
- package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
- package/dist/{stats-Bq4fJOdB.mjs → stats-8EJ5ivFT.mjs} +6 -6
- package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
- package/dist/{status-BA2pehwf.mjs → status-BOyp0CUl.mjs} +31 -34
- package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-C65jk_q2.mjs} +1 -1
- package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-DbmUjsLv.mjs} +1 -1
- package/dist/stop-D0UIpZuh.mjs +72 -0
- package/dist/{stop-zF1y04f2.mjs → stop-DRipAg-e.mjs} +2 -2
- package/dist/{stop-DQIasgKp.mjs → stop-zDlknFoz.mjs} +79 -33
- package/dist/supervisor-run.d.mts +24 -22
- package/dist/supervisor-run.mjs +21 -22
- package/dist/{support-CsJNVfOc.mjs → support-CNqYkV0y.mjs} +7 -7
- package/dist/{support-WvD__tSV.mjs → support-DsNaFg6D.mjs} +5 -5
- package/dist/swiftpm-macos-aJzPAj1t.mjs +119 -0
- package/dist/{toolchain-DNyR3NPq.mjs → toolchain-C3xSoyUl.mjs} +475 -269
- package/dist/{trigger-Bemu8ytw.mjs → trigger-CAhmG-4s.mjs} +6 -6
- package/dist/trigger-CoalsMTV.mjs +2 -0
- package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-pFLB2e6P.mjs} +135 -38
- package/dist/{status-CzS4bPO9.mjs → watchman-BL1IdOtq.mjs} +75 -7
- package/dist/web-DFpFeZu5.mjs +2 -0
- package/dist/web-DbbrPUn0.mjs +127 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-CR9X86xJ.mjs} +3 -3
- package/dist/{ownership-BMLqyBgJ.mjs → workspaces-Djb2gfi9.mjs} +661 -23
- package/dist/{worktree-Be_7NLKy.mjs → worktree-BL4M1rhB.mjs} +252 -50
- package/dist/{worktree-j3IcFAI5.mjs → worktree-DV-A0LNL.mjs} +1 -1
- package/package.json +10 -5
- package/shim/bundle-response.cjs +2 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +1 -1
- package/dist/build-progress-D0WkjCPd.mjs +0 -1036
- package/dist/build-slots-41v_d2x9.mjs +0 -142
- package/dist/cli-CYXb29oE.mjs +0 -51
- package/dist/deps-iKw0eD4P.mjs +0 -438
- package/dist/device-ios-C2Um-XUR.mjs +0 -412
- package/dist/errors-B6W7FkxQ.mjs +0 -15
- package/dist/guide-status-Du-ZQ3FD.mjs +0 -125
- package/dist/idle-BXG__1BA.mjs +0 -176
- package/dist/in-use-CvGOUn-x.mjs +0 -130
- package/dist/ios-BJ4XUSe1.mjs +0 -3867
- package/dist/native-run-D1Q56rAD.mjs +0 -158
- package/dist/preview-B-g9d7kV.mjs +0 -318
- package/dist/process-identity-BmRm1qV0.mjs +0 -12
- package/dist/project-D47Rh0ly.mjs +0 -276
- package/dist/server-expo-CeakhI8P.mjs +0 -2
- package/dist/state-BKa8wNN5.mjs +0 -148
- package/dist/stop-BIiM49EY.mjs +0 -48
- package/dist/stop-cause-rhmGfwvt.mjs +0 -97
- package/dist/trigger-CXts6qt1.mjs +0 -2
- package/dist/watchman-APYjXSQa.mjs +0 -48
- package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
- package/dist/workspaces-Bcib97-6.mjs +0 -306
package/dist/collector-run.d.mts
CHANGED
|
@@ -10,8 +10,14 @@ interface ExecOptions {
|
|
|
10
10
|
omitEnv?: readonly string[];
|
|
11
11
|
/** Text written to the child's stdin; `runFile` only. */
|
|
12
12
|
input?: string;
|
|
13
|
+
/** `runFileAsync` only: called with the child right after it starts; a throw kills the child and rejects the call. */
|
|
14
|
+
onSpawn?: (child: ChildProcess) => void;
|
|
13
15
|
/** `runFile` only: return stdout as written, without trimming surrounding whitespace. */
|
|
14
16
|
untrimmed?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `runFile` and `runFileAsync`: reject nonempty stderr even when the command exits successfully.
|
|
19
|
+
*/
|
|
20
|
+
rejectStderr?: boolean;
|
|
15
21
|
}
|
|
16
22
|
interface Executor {
|
|
17
23
|
run(cmd: string, opts?: ExecOptions): string;
|
package/dist/collector-run.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
|
|
1
|
+
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
3
2
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-
|
|
9
|
-
import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-
|
|
3
|
+
import { R as deviceSlotKey, W as validateDeviceSlot } from "./config-DC5jEtd1.mjs";
|
|
4
|
+
import { x as workspaceLogsDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
5
|
+
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
6
|
+
import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-CrW8aMb5.mjs";
|
|
7
|
+
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-EB0ySdGK.mjs";
|
|
8
|
+
import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-DE5g_5gv.mjs";
|
|
9
|
+
import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-DCrkgXEM.mjs";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { isAbsolute, join, resolve } from "node:path";
|
|
12
|
-
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
13
12
|
import { fileURLToPath } from "node:url";
|
|
13
|
+
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
14
14
|
//#region src/collector/run.ts
|
|
15
15
|
const PLATFORMS = ["ios", "android"];
|
|
16
16
|
function parseArgs(argv) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
2
|
-
import { t as NO_PROJECT_REFUSAL } from "./project-
|
|
3
|
-
import { quotedPath as quotedPath$1 } from "@stim-cli/core";
|
|
2
|
+
import { t as NO_PROJECT_REFUSAL } from "./project-B5eQ1USs.mjs";
|
|
4
3
|
import chalk from "chalk";
|
|
4
|
+
import { quotedPath as quotedPath$1 } from "@stim-cli/core";
|
|
5
5
|
//#region src/diagnostics/launch-error-preview.ts
|
|
6
6
|
function framePriority(frame, root) {
|
|
7
7
|
const normalized = frame.replaceAll("\\", "/");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { existsSync, lstatSync, mkdirSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
5
4
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse as parse$1, sep as sep$1 } from "path";
|
|
6
|
-
import {
|
|
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
|
+
import { existsSync, lstatSync, mkdirSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
7
7
|
import { InvalidArgumentError } from "commander";
|
|
8
|
-
import {
|
|
8
|
+
import { configDir } from "@stim-cli/core";
|
|
9
9
|
//#region src/devices/device-slots.ts
|
|
10
10
|
const DEFAULT_DEVICE_SLOT = "default";
|
|
11
11
|
const DEVICE_SLOT_RULE = "A device slot must be 1-64 letters, digits, underscores or hyphens, starting with a letter or digit.";
|
|
@@ -460,6 +460,10 @@ function writeConfigSetting(target, dottedKey, value) {
|
|
|
460
460
|
if (value === void 0) {
|
|
461
461
|
if (!deleteNested(settings, dottedKey)) return false;
|
|
462
462
|
} else writeNested(settings, dottedKey, value);
|
|
463
|
+
if (target.scope === "machine") {
|
|
464
|
+
if (dottedKey === "remote.buildPoolDisabled" || dottedKey === "remote.machines") validateAutomaticPool("build", cfg);
|
|
465
|
+
if (dottedKey === "remote.devicePoolDisabled" || dottedKey === "remote.machines") validateAutomaticPool("device", cfg);
|
|
466
|
+
}
|
|
463
467
|
saveConfig(cfg);
|
|
464
468
|
return true;
|
|
465
469
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as getConfigDir } from "./config-
|
|
2
|
-
import { w as withDirLock } from "./workspace-state-
|
|
1
|
+
import { d as getConfigDir } from "./config-DC5jEtd1.mjs";
|
|
2
|
+
import { w as withDirLock } from "./workspace-state-CR9X86xJ.mjs";
|
|
3
3
|
import { mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1 } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/devices/created-devices.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
|
+
import { mt as repoRoot } from "./settings-CxgngUZk.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 {
|
|
2
|
-
import { E as readBundleSchemes, T as pickDevClientScheme } from "./app-install-
|
|
1
|
+
import { h as isPackageResolvable, v as resolvePackageJson } from "./project-B5eQ1USs.mjs";
|
|
2
|
+
import { E as readBundleSchemes, T as pickDevClientScheme } from "./app-install-CFI4ptUL.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,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-
|
|
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 { r as clockTime } from "./command-output-Bt8ygHE7.mjs";
|
|
2
|
+
import { H as projectDeviceSlots, R as deviceSlotKey, V as parseDeviceSlotOption, p as getProject } from "./config-DC5jEtd1.mjs";
|
|
3
|
+
import { r as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-B5eQ1USs.mjs";
|
|
4
|
+
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-Cu7PtQpZ.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-BdQC6zs1.mjs";
|
|
6
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-D38SnZtt.mjs";
|
|
7
|
+
import { t as selectFromPool } from "./device-pool-CP4rAsHx.mjs";
|
|
8
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-CJ_ZOGky.mjs";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
//#region src/commands/device.ts
|
|
11
11
|
const DEFAULT_FOR = "5m";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as createNdjsonWriter } from "./ndjson-
|
|
12
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-
|
|
1
|
+
import { n as ownership_claim_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-Bt8ygHE7.mjs";
|
|
3
|
+
import { H as projectDeviceSlots, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits, z as deviceSlotPlatforms } from "./config-DC5jEtd1.mjs";
|
|
4
|
+
import { x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
|
|
5
|
+
import { E as projectDeviceReclaimIdleMinutes } from "./settings-CxgngUZk.mjs";
|
|
6
|
+
import { H as recordCapacityWait, V as recordCapacityRefusal } from "./budget-Dz-kyXLv.mjs";
|
|
7
|
+
import { L as canonicalPath, f as withIdleWorkspace } from "./workspaces-Djb2gfi9.mjs";
|
|
8
|
+
import { O as listAdbDevices } from "./android-BdQC6zs1.mjs";
|
|
9
|
+
import { d as listAllIosSims, l as iosRuntimeMatches, v as parseRuntimeVersion } from "./ios-BWbHFZVz.mjs";
|
|
10
|
+
import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-B4iWH4E-.mjs";
|
|
11
|
+
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
12
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DYiMBn34.mjs";
|
|
13
13
|
import { realpathSync } from "node:fs";
|
|
14
14
|
import { basename, join } from "node:path";
|
|
15
|
+
import { DEVICE_RECLAIM_REASON, automaticMachineEnabled } from "@stim-cli/core/state";
|
|
15
16
|
import { LOG_ROTATE_BYTES, workspaceId } from "@stim-cli/core";
|
|
16
|
-
import { DEVICE_RECLAIM_REASON } from "@stim-cli/core/state";
|
|
17
17
|
import { setTimeout } from "node:timers/promises";
|
|
18
18
|
//#region src/devices/queue-reclaim.ts
|
|
19
19
|
async function reclaimIdleDevice(root, idleMs, out, now, skipped) {
|
|
@@ -373,8 +373,16 @@ async function admissionTransaction(action, lockWaitMs, out, signal) {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
/** Boots an owned device under the Stim home's cap, reserving capacity before releasing admission. */
|
|
376
|
-
async function withDeviceBootAdmission(device, boot, { root, max = getConcurrencyLimits().maxDevices, sources = {}, lockWaitMs = ADMISSION_LOCK_WAIT_MS, out = () => {}, waitMs = DEFAULT_DEVICE_SLOT_WAIT_MS, noWait = false, displayName = basename(root), now = Date.now, signal, sleep = (ms) => setTimeout(ms, void 0, { signal }), waitingFor = () => {}, onWait = () => {} }) {
|
|
376
|
+
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 = basename(root), now = Date.now, signal, sleep = (ms) => setTimeout(ms, void 0, { signal }), waitingFor = () => {}, onWait = () => {} }) {
|
|
377
|
+
const requireMembership = () => {
|
|
378
|
+
if (automatic && !automaticMachineEnabled("device", "local")) throw new DeviceAdmissionRefusal({
|
|
379
|
+
code: "STIM_HOSTING_REFUSED",
|
|
380
|
+
message: "local is disabled in this requester's automatic device pool.",
|
|
381
|
+
remedy: "Enable local in remote.devicePoolDisabled or select a machine explicitly."
|
|
382
|
+
});
|
|
383
|
+
};
|
|
377
384
|
signal?.throwIfAborted();
|
|
385
|
+
requireMembership();
|
|
378
386
|
if (!max || max <= 0) return boot();
|
|
379
387
|
const workspace = workspaceId(root);
|
|
380
388
|
device = {
|
|
@@ -400,6 +408,7 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
400
408
|
for (;;) {
|
|
401
409
|
const result = await admissionTransaction(async () => {
|
|
402
410
|
signal?.throwIfAborted();
|
|
411
|
+
requireMembership();
|
|
403
412
|
const waiters = liveWaiters();
|
|
404
413
|
const first = waiters[0];
|
|
405
414
|
const turn = !first || first.claimId === ticket?.claimId;
|
|
@@ -475,6 +484,7 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
475
484
|
queue: result.queue
|
|
476
485
|
}));
|
|
477
486
|
}
|
|
487
|
+
signal?.throwIfAborted();
|
|
478
488
|
if (result.reclaim && now() - lastReclaim >= 15e3) {
|
|
479
489
|
lastReclaim = now();
|
|
480
490
|
try {
|
|
@@ -508,6 +518,7 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
508
518
|
onWait(ms);
|
|
509
519
|
}
|
|
510
520
|
}
|
|
521
|
+
requireMembership();
|
|
511
522
|
return await boot();
|
|
512
523
|
} finally {
|
|
513
524
|
(0, ownership_claim_exports.releaseClaim)(marker);
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
1
|
+
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
3
|
+
import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
|
|
4
|
+
import { D as withConfigLock$1, _ as loadConfig$1, c as ensureConfig } from "./config-DC5jEtd1.mjs";
|
|
5
|
+
import { c as writeWorkspaceState, u as ensureWorkspaceStorage } from "./workspace-state-CR9X86xJ.mjs";
|
|
6
|
+
import { D as teardownOwnedAvd, k as teardownOwnedIosSim } from "./workspaces-Djb2gfi9.mjs";
|
|
7
|
+
import { t as forgetCreatedDevice } from "./created-devices-D0s26Hx5.mjs";
|
|
8
|
+
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-BdQC6zs1.mjs";
|
|
9
|
+
import { C as resetIosPrivacy, M as readHostMemoryPressure, O as uninstallIosApp, S as resetIosKeychain, a as createOwnedIosSim, d as listAllIosSims, h as listUserApps, n as bootIosSim, w as resolveIosCreation } from "./ios-BWbHFZVz.mjs";
|
|
10
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-Tp4uImDS.mjs";
|
|
11
|
+
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
12
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-BoN1jQkO.mjs";
|
|
13
|
+
import { C as reverseMetroPorts, _ as installIosApp, b as launchAndroidReleaseApp, h as installAndroidApp, s as androidAppProcess, v as iosAppProcess, w as writeDebugHttpHost, x as launchIosApp, y as launchAndroidApp } from "./app-install-CFI4ptUL.mjs";
|
|
14
|
+
import { h as findAapt } from "./support-DsNaFg6D.mjs";
|
|
15
|
+
import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-DE5g_5gv.mjs";
|
|
16
|
+
import { r as stopMacosAppHeld } from "./stop-D0UIpZuh.mjs";
|
|
17
|
+
import { n as parseLogStreamLine } from "./ios-DCrkgXEM.mjs";
|
|
19
18
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
20
19
|
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
21
|
-
import { LOG_ROTATE_BYTES, configDir, withDirLock } from "@stim-cli/core";
|
|
22
20
|
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint, readMacosRecord, readNdjsonGenerations } from "@stim-cli/core/state";
|
|
23
21
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
22
|
+
import { LOG_ROTATE_BYTES, configDir, withDirLock } from "@stim-cli/core";
|
|
23
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
24
24
|
//#region src/device-host/android-app.ts
|
|
25
25
|
async function digest$1(path) {
|
|
26
26
|
const hash = createHash("sha256");
|