stim 1.21.0 → 1.23.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 +60 -7
- package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-ybouwJSR.mjs} +21 -3
- package/dist/{act-DHAw2A2S.mjs → act-DG54PWtJ.mjs} +298 -164
- package/dist/{activity-BzVfHSrY.mjs → activity-B5RtpFda.mjs} +33 -12
- package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-UJ5gC80l.mjs} +7 -7
- package/dist/{android-BLgbNqox.mjs → android-BoUJKbfz.mjs} +66 -52
- package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
- package/dist/{android-CV_GCELZ.mjs → android-CHH4KLOR.mjs} +5 -5
- package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
- package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
- package/dist/api.d.mts +132 -118
- package/dist/api.mjs +239 -42
- package/dist/{artifact-DAuZ-FNU.mjs → artifact-5RteZem7.mjs} +69 -40
- package/dist/{artifact-B8T3S5gi.mjs → artifact-Dwdo7k1E.mjs} +40 -35
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-QQzVjz3O.mjs → browser-web-CeEVlGug.mjs} +187 -59
- package/dist/{budget-Bs6SxxzO.mjs → budget-DnPX3DXj.mjs} +830 -699
- package/dist/{build-CoPzQRNw.mjs → build-CqufZFqy.mjs} +34 -27
- package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
- package/dist/{build-plan-CaFskB7_.mjs → build-plan-C8CIvRyi.mjs} +74 -14
- package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-BJRZ9pG3.mjs → ccache-RcAy92gH.mjs} +6 -6
- package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
- package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
- package/dist/{cli-0DYf8QhQ.mjs → cli-D-J9fWGV.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-UXD70ZbM.mjs → client-yyso1bwi.mjs} +218 -47
- package/dist/collector-run.d.mts +1 -1
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-B1UrjZHL.mjs → command-output-Db8BqzxH.mjs} +1 -1
- package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
- package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
- package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
- package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-UOeESKm6.mjs → dev-client-BnYSDiKa.mjs} +2 -2
- package/dist/{device-DCxH7_By.mjs → device-BvzPUBs3.mjs} +16 -16
- package/dist/{device-ExJq8Ei7.mjs → device-CCkWmkAA.mjs} +71 -14
- package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-CjaSdrhg.mjs} +9 -10
- package/dist/device-host-worker.mjs +25 -32
- package/dist/{device-ios-DRUeKaFV.mjs → device-ios-uOiEETX2.mjs} +39 -16
- package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-BgwPHc6u.mjs} +5 -5
- package/dist/{device-pool-DMRpVX9a.mjs → device-pool-C-ptmZTa.mjs} +3 -3
- package/dist/{doctor-DTvaDOda.mjs → doctor-8sr2tFOL.mjs} +24 -37
- package/dist/{doctor-Dhqebm0q.mjs → doctor-D2SN3Ltx.mjs} +19 -16
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-BLHCYxzi.mjs → doctor-pxxvipYC.mjs} +1 -1
- package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-sy_RNhFt.mjs} +5 -5
- package/dist/{eas-build-BomfRnFT.mjs → eas-build-CyjU5K7E.mjs} +4 -4
- package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-DV3Wytf1.mjs} +27 -18
- package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-BzzsX97d.mjs} +8 -7
- package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-C6sVoeqO.mjs} +10 -10
- package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
- package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
- package/dist/{gc-_-dCXdyL.mjs → gc-CDoogxAI.mjs} +587 -313
- package/dist/gc-DLbzvTP2.mjs +3 -0
- package/dist/{guide-Yqwt2bd6.mjs → guide-BC37GcDG.mjs} +288 -59
- package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-CkclQig_.mjs} +6 -6
- package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-ByuMMO5s.mjs} +4 -4
- package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-DtYHeuYR.mjs} +1 -1
- package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-Br84qWy1.mjs} +5 -5
- package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-DdtYajZt.mjs} +21 -12
- package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-UPI9zdZ4.mjs} +27 -14
- package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
- package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DO7oIRlc.mjs} +7 -7
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-ubFsBzwq.mjs → ios-DZZbNYlY.mjs} +59 -50
- package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-device-CwFMehUS.mjs → ios-device-JC3uWM4K.mjs} +3 -3
- package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
- package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CVyNwjAF.mjs} +5 -5
- package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
- package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-CQ68hG9s.mjs → ios-vbUOqGXu.mjs} +8 -8
- package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Cc1dttps.mjs → js-swap-C3QxUFJR.mjs} +7 -29
- package/dist/{launch-CD1yVc7U.mjs → launch-Bz7JtaC4.mjs} +16 -16
- package/dist/{launch-Zq2mOSDy.mjs → launch-CHY3p-yz.mjs} +40 -39
- package/dist/{logs-CMm05HxN.mjs → logs-CtNeNDuq.mjs} +10 -17
- package/dist/{logs-BS00Anxf.mjs → logs-mxqsWpJs.mjs} +151 -24
- package/dist/{macos-B65--pPd.mjs → macos-inNFbBWc.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/{macos-C-0qJ6zq.mjs → macos-u0BoHKnO.mjs} +143 -46
- package/dist/maintenance-run.mjs +8 -8
- package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
- package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
- package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
- package/dist/{native-android-JACyjTZs.mjs → native-android-CdCSylTn.mjs} +43 -242
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
- package/dist/{native-run-DY_RLx3C.mjs → native-run-BUTu8T7A.mjs} +4 -5
- package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-CRSOZxKY.mjs} +8 -7
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-G6rkkhxu.mjs} +2 -3
- package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-_os2PlCD.mjs} +27 -32
- package/dist/offload-worker.d.mts +65 -2
- package/dist/offload-worker.mjs +305 -73
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
- package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
- package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-BU42oOyT.mjs} +12 -8
- package/dist/{ports-D-MmCTdv.mjs → ports-BSmQKzW7.mjs} +3 -3
- package/dist/{prebuild-uD_ipCxF.mjs → prebuild-BFm63bQ0.mjs} +63 -16
- package/dist/{project-BZNjmW_8.mjs → project-CTLNHCfE.mjs} +16 -16
- package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
- package/dist/pull-requests.d.mts +2 -2
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-CFgUroxW.mjs} +73 -53
- package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-CmJkTljQ.mjs} +8 -8
- package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-LTF-Xt8l.mjs} +7 -7
- package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-ChBF1MkB.mjs} +43 -29
- package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-CmTRFJaX.mjs → reload-DF9hqUUB.mjs} +16 -15
- package/dist/{reload-DzjSl5P_.mjs → reload-RBi1nj6Z.mjs} +1 -1
- package/dist/{remote-ByYkXdGD.mjs → remote-BmvMCcJw.mjs} +18 -15
- package/dist/{result-DNiS-tTP.mjs → result-Cx5CRLvS.mjs} +24 -23
- package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
- package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
- package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
- package/dist/{server-command-CtzloH3v.mjs → server-command-BTiGPEjS.mjs} +5 -5
- package/dist/server-expo-C-Buqvn_.mjs +2 -0
- package/dist/{server-expo-DT_F_uVI.mjs → server-expo-D9lEz4aq.mjs} +7 -5
- package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
- package/dist/{settings-T1gtc3bf.mjs → settings-eKF_vJJs.mjs} +1 -1
- package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-79mQRr9C.mjs} +7 -6
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
- package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-D7M2nE4b.mjs} +6 -6
- package/dist/{stage-BIS0ydsV.mjs → stage-DKNM4ZPd.mjs} +21 -4
- package/dist/{start-RChynRDp.mjs → start-CRfN1kWV.mjs} +1 -1
- package/dist/{start-7lpH7hmN.mjs → start-bjfiScgz.mjs} +622 -393
- package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
- package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
- package/dist/{stats-53T7OTb9.mjs → stats-DioA6cBU.mjs} +5 -5
- package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
- package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
- package/dist/{status-CSi6tlRq.mjs → status-Eqx_20WC.mjs} +1 -1
- package/dist/{status-BL7jVyAB.mjs → status-kzbeWk4x.mjs} +43 -29
- package/dist/{status-watch-GDCfqpTE.mjs → status-watch-BIqqbJ6q.mjs} +48 -16
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
- package/dist/{stop-Bk_1qiV6.mjs → stop-B18d8KDw.mjs} +2 -2
- package/dist/{stop-CPzlM1L-.mjs → stop-B2uLQfoM.mjs} +15 -16
- package/dist/{stop-D7h6jAXQ.mjs → stop-DzLJc7Ei.mjs} +31 -22
- package/dist/supervisor-run.d.mts +3 -3
- package/dist/supervisor-run.mjs +28 -36
- package/dist/{support-Dlu37g6H.mjs → support-BTpZ6RAJ.mjs} +15 -11
- package/dist/{support-67vraa1Q.mjs → support-DTBV56gy.mjs} +8 -8
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-r_WSKlXr.mjs +532 -0
- package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-CWeGJgCc.mjs} +9 -6
- package/dist/toolchain-GVgnf8d1.mjs +2 -0
- package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
- package/dist/web-Cduk0NSE.mjs +2 -0
- package/dist/{web-CJmIj6AI.mjs → web-CwREhjD-.mjs} +11 -10
- package/dist/web-run.mjs +11 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
- package/dist/{workspaces-BccMFmGQ.mjs → workspaces-BxzYlo3P.mjs} +594 -266
- package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-8lqn_lBp.mjs} +850 -551
- package/dist/worktree-BxfVxG_b.mjs +2 -0
- package/dist/{xcode-Zlx3qjEs.mjs → xcode-iQnROM5o.mjs} +5 -5
- package/package.json +7 -7
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/dist/gc-C-WwL0yi.mjs +0 -3
- package/dist/git-C3iTsJaZ.mjs +0 -73
- package/dist/server-expo-C-90EhcG.mjs +0 -2
- package/dist/settings-DkdmlelE.d.mts +0 -15
- package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
- package/dist/toolchain-DhKwp9iI.mjs +0 -2
- package/dist/trigger-Bf3uDcpv.mjs +0 -2
- package/dist/web-DknQETPs.mjs +0 -2
- package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
- package/dist/worktree-CK2MpJW5.mjs +0 -2
package/dist/supervisor-run.mjs
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as process_identity_exports, i as withWorkspaceProcessLock } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { g as workspaceStateFile$1, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { c as withWorkspaceStateLock, d as writeWorkspaceState, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-
|
|
5
|
-
import { X as runnableMetroCommand, q as resolveProjectSettings } from "./settings-
|
|
6
|
-
import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-
|
|
3
|
+
import { G as projectDeviceSlots, T as setSupervisor, U as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { c as withWorkspaceStateLock, d as writeWorkspaceState, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
5
|
+
import { X as runnableMetroCommand, q as resolveProjectSettings } from "./settings-C7O8A6ZI.mjs";
|
|
6
|
+
import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-CTLNHCfE.mjs";
|
|
7
7
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
8
|
-
import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-
|
|
9
|
-
import { A as workspaceBuildInProgress, _ as devServerStopRecord, g as devServerStopLevel, m as describeDevServerStop, x as vanishedSupervisorMessage } from "./budget-
|
|
10
|
-
import { f as withIdleWorkspace } from "./workspaces-
|
|
11
|
-
import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-
|
|
12
|
-
import {
|
|
13
|
-
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-1_1OoVW5.mjs";
|
|
8
|
+
import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-BzzsX97d.mjs";
|
|
9
|
+
import { A as workspaceBuildInProgress, _ as devServerStopRecord, g as devServerStopLevel, m as describeDevServerStop, x as vanishedSupervisorMessage } from "./budget-DnPX3DXj.mjs";
|
|
10
|
+
import { f as withIdleWorkspace } from "./workspaces-BxzYlo3P.mjs";
|
|
11
|
+
import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-B5RtpFda.mjs";
|
|
12
|
+
import { W as ownedAvdSerialResolver } from "./android-C7sVmyI9.mjs";
|
|
14
13
|
import { t as describeError } from "./errors-ccaPc4ox.mjs";
|
|
15
|
-
import { f as probeHostedSession } from "./hosted-client-
|
|
16
|
-
import { t as clearHostedMetro } from "./metro-gateway-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { t as triggerMaintenance } from "./trigger-
|
|
20
|
-
import { existsSync, readFileSync, realpathSync, statSync
|
|
21
|
-
import {
|
|
14
|
+
import { f as probeHostedSession } from "./hosted-client-ByuMMO5s.mjs";
|
|
15
|
+
import { o as watchWorkspaceState, t as clearHostedMetro } from "./metro-gateway-CKZqKqx7.mjs";
|
|
16
|
+
import { t as relaunchWithLogFile } from "./detached-entry-BwNEtIrP.mjs";
|
|
17
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DO7oIRlc.mjs";
|
|
18
|
+
import { t as triggerMaintenance } from "./trigger-Cbyc41d_.mjs";
|
|
19
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
20
|
+
import { dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
22
21
|
import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
|
|
23
22
|
import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroGateways, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
|
|
24
23
|
import { fileURLToPath } from "node:url";
|
|
@@ -69,6 +68,7 @@ function watchHostedMetro(root, metroPort, processToken) {
|
|
|
69
68
|
});
|
|
70
69
|
const reconcile = async () => {
|
|
71
70
|
if (closed) return;
|
|
71
|
+
observer.refresh();
|
|
72
72
|
const state = readState();
|
|
73
73
|
if (state?.supervisor?.processToken !== processToken) return;
|
|
74
74
|
const placements = [...Object.values(hostedIosPlacements(state)), ...Object.values(hostedAndroidPlacements(state)).map((placement) => Object.assign({ platform: "android" }, placement))];
|
|
@@ -147,24 +147,13 @@ function watchHostedMetro(root, metroPort, processToken) {
|
|
|
147
147
|
return reconcile();
|
|
148
148
|
}).catch(() => {});
|
|
149
149
|
};
|
|
150
|
-
const
|
|
151
|
-
let watcher = null;
|
|
152
|
-
try {
|
|
153
|
-
watcher = watch(dirname(stateFile), (_event, name) => {
|
|
154
|
-
if (name === null || name.toString() === basename(stateFile)) tick();
|
|
155
|
-
});
|
|
156
|
-
watcher.on("error", () => {
|
|
157
|
-
watcher?.close();
|
|
158
|
-
watcher = null;
|
|
159
|
-
});
|
|
160
|
-
watcher.unref();
|
|
161
|
-
} catch {}
|
|
150
|
+
const observer = watchWorkspaceState(root, tick);
|
|
162
151
|
const timer = setInterval(tick, 1e4);
|
|
163
152
|
timer.unref();
|
|
164
153
|
tick();
|
|
165
154
|
return async () => {
|
|
166
155
|
closed = true;
|
|
167
|
-
|
|
156
|
+
observer.close();
|
|
168
157
|
clearTimeout(probeTimer);
|
|
169
158
|
clearInterval(timer);
|
|
170
159
|
await running;
|
|
@@ -594,10 +583,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
594
583
|
const shutdown = async (code, event, msg, stop) => {
|
|
595
584
|
if (stopping || !server) return;
|
|
596
585
|
stopping = true;
|
|
597
|
-
|
|
598
|
-
stopWatchingDevices?.();
|
|
599
|
-
clearInterval(maintenanceTimer);
|
|
600
|
-
await closeHostedMetro?.();
|
|
586
|
+
maintenanceTimer.ref();
|
|
601
587
|
await watchRoots.beforeClose();
|
|
602
588
|
try {
|
|
603
589
|
await server.close();
|
|
@@ -608,7 +594,13 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
608
594
|
event: "server_close_failed",
|
|
609
595
|
msg: describeError(err)
|
|
610
596
|
});
|
|
597
|
+
stopping = false;
|
|
598
|
+
return;
|
|
611
599
|
}
|
|
600
|
+
await closeHostedMetro?.();
|
|
601
|
+
stopWatchingIdle?.();
|
|
602
|
+
stopWatchingDevices?.();
|
|
603
|
+
clearInterval(maintenanceTimer);
|
|
612
604
|
await watchRoots.afterClose();
|
|
613
605
|
finish(code, event, stop ? devServerStopLevel(stop) : code === 0 ? "info" : "error", msg, stop);
|
|
614
606
|
};
|
|
@@ -637,7 +629,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
637
629
|
try {
|
|
638
630
|
let start;
|
|
639
631
|
if (command) {
|
|
640
|
-
const startServer = startCommand ?? (await import("./server-command-
|
|
632
|
+
const startServer = startCommand ?? (await import("./server-command-BTiGPEjS.mjs")).startCommandServer;
|
|
641
633
|
start = (opts) => startServer({
|
|
642
634
|
...opts,
|
|
643
635
|
command
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { h as shortUdid, l as phaseLine } from "./command-output-
|
|
3
|
-
import { a as SETTING_SHAPE_REMEDY, b as iosProjectDirSettingError, et as settingShapeErrors, it as unknownSettingKeys, p as cacheProviderSettingError, y as iosProjectDirSetting } from "./settings-
|
|
4
|
-
import { j as parseIosSimulatorApp } from "./ios-
|
|
2
|
+
import { h as shortUdid, l as phaseLine } from "./command-output-Db8BqzxH.mjs";
|
|
3
|
+
import { a as SETTING_SHAPE_REMEDY, b as iosProjectDirSettingError, et as settingShapeErrors, it as unknownSettingKeys, p as cacheProviderSettingError, y as iosProjectDirSetting } from "./settings-C7O8A6ZI.mjs";
|
|
4
|
+
import { j as parseIosSimulatorApp } from "./ios-hcBpnEGk.mjs";
|
|
5
5
|
import { p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
|
|
6
|
-
import { y as describeDiagnostic } from "./xcode-
|
|
7
|
-
import { s as resolveBuildPlacement } from "./selection-
|
|
8
|
-
import { l as parseDeviceWait } from "./device-lease-run-
|
|
9
|
-
import { f as unknownIosDeviceTypeRefusal, p as unknownIosRuntimeRefusal, s as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-
|
|
10
|
-
import { t as IosDeviceMismatchError } from "./device-ios-
|
|
6
|
+
import { y as describeDiagnostic } from "./xcode-iQnROM5o.mjs";
|
|
7
|
+
import { s as resolveBuildPlacement } from "./selection-DSMbWEX2.mjs";
|
|
8
|
+
import { l as parseDeviceWait } from "./device-lease-run-BgwPHc6u.mjs";
|
|
9
|
+
import { f as unknownIosDeviceTypeRefusal, p as unknownIosRuntimeRefusal, s as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CjaSdrhg.mjs";
|
|
10
|
+
import { t as IosDeviceMismatchError } from "./device-ios-uOiEETX2.mjs";
|
|
11
11
|
import { basename, join } from "node:path";
|
|
12
12
|
import chalk from "chalk";
|
|
13
13
|
function buildLogFile(root) {
|
|
@@ -115,7 +115,7 @@ function resolveSimulatorAppFlag(flag, physical, remoteBackend, automatic = fals
|
|
|
115
115
|
} };
|
|
116
116
|
return { simulatorApp };
|
|
117
117
|
}
|
|
118
|
-
function deviceModelRefusal({ slot, deviceTypeFlag, runtimeFlag, deviceType, runtime, deviceTypeOrigin = null, runtimeOrigin = null, physical, remoteBackend, hosted = false, listRuntimes }) {
|
|
118
|
+
async function deviceModelRefusal({ slot, deviceTypeFlag, runtimeFlag, deviceType, runtime, deviceTypeOrigin = null, runtimeOrigin = null, physical, remoteBackend, hosted = false, listRuntimes, signal }) {
|
|
119
119
|
if (slot && slot !== "default" && remoteBackend) return {
|
|
120
120
|
code: "STIM_BAD_ARG",
|
|
121
121
|
message: "Named slots currently support local simulators and physical devices.",
|
|
@@ -145,7 +145,7 @@ function deviceModelRefusal({ slot, deviceTypeFlag, runtimeFlag, deviceType, run
|
|
|
145
145
|
if (!deviceType && !runtime) return null;
|
|
146
146
|
let runtimes;
|
|
147
147
|
try {
|
|
148
|
-
runtimes = listRuntimes();
|
|
148
|
+
runtimes = await listRuntimes({ signal });
|
|
149
149
|
} catch (error) {
|
|
150
150
|
return {
|
|
151
151
|
code: "STIM_NO_DEVICE",
|
|
@@ -195,7 +195,7 @@ function iosProviderRunOptions(configuration, arch) {
|
|
|
195
195
|
};
|
|
196
196
|
return configuration ? { configuration } : null;
|
|
197
197
|
}
|
|
198
|
-
function podAction(podState, verdict) {
|
|
198
|
+
function podAction(podState, verdict, { prebuildRan = false } = {}) {
|
|
199
199
|
if (verdict?.stale) return {
|
|
200
200
|
install: true,
|
|
201
201
|
reason: verdict.reason
|
|
@@ -204,6 +204,10 @@ function podAction(podState, verdict) {
|
|
|
204
204
|
install: true,
|
|
205
205
|
reason: "ios/Podfile exists but no pods are installed"
|
|
206
206
|
};
|
|
207
|
+
if (prebuildRan && podState?.hasPodfile) return {
|
|
208
|
+
install: true,
|
|
209
|
+
reason: "prebuild updated ios/ in place"
|
|
210
|
+
};
|
|
207
211
|
return { install: false };
|
|
208
212
|
}
|
|
209
213
|
function xcodeFailureReport(result, logPath) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { kn as pickDevClientScheme } from "./budget-
|
|
4
|
-
import { C as
|
|
5
|
-
import { d as unknownAndroidSystemImageRefusal, s as layerNote, u as unknownAndroidDeviceProfileRefusal } from "./device-capacity-
|
|
6
|
-
import { t as devClientScheme } from "./dev-client-
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { a as killOnAbort } from "./operation-exec-BW0em61G.mjs";
|
|
3
|
+
import { kn as pickDevClientScheme } from "./budget-DnPX3DXj.mjs";
|
|
4
|
+
import { C as emulatorDiskSpaceRemedy, E as findBuildTool, Q as profileNeedsFoldFeature, R as memoizeEmulatorProbe, T as extractEmulatorFailure, X as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, k as hostSystemImageArch, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as emulatorFailureRemedy } from "./android-C7sVmyI9.mjs";
|
|
5
|
+
import { d as unknownAndroidSystemImageRefusal, s as layerNote, u as unknownAndroidDeviceProfileRefusal } from "./device-capacity-CjaSdrhg.mjs";
|
|
6
|
+
import { t as devClientScheme } from "./dev-client-BnYSDiKa.mjs";
|
|
7
7
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
8
|
import { relative } from "node:path";
|
|
9
9
|
//#region src/commands/android/support.ts
|
|
@@ -74,7 +74,7 @@ function resolveDeviceProfile(flag, settings) {
|
|
|
74
74
|
const raw = android && typeof android === "object" && !Array.isArray(android) ? android["deviceProfile"] : void 0;
|
|
75
75
|
return fromFlag || (typeof raw === "string" && raw.trim() !== "" ? raw.trim() : null);
|
|
76
76
|
}
|
|
77
|
-
function deviceProfileRefusal({ flag, resolved, origin = null, physical, remoteBackend, listProfiles }) {
|
|
77
|
+
async function deviceProfileRefusal({ flag, resolved, origin = null, physical, remoteBackend, listProfiles, signal }) {
|
|
78
78
|
if (typeof flag === "string" && flag.trim() === "") return {
|
|
79
79
|
code: "STIM_BAD_ARG",
|
|
80
80
|
message: "--device-profile was given an empty id.",
|
|
@@ -83,7 +83,7 @@ function deviceProfileRefusal({ flag, resolved, origin = null, physical, remoteB
|
|
|
83
83
|
if (physical || remoteBackend || !resolved) return null;
|
|
84
84
|
let profiles;
|
|
85
85
|
try {
|
|
86
|
-
profiles = listProfiles();
|
|
86
|
+
profiles = await listProfiles({ signal });
|
|
87
87
|
} catch (error) {
|
|
88
88
|
return {
|
|
89
89
|
code: NO_DEVICE,
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
|
|
3
|
+
import { n as buildCacheKey } from "./build-cache-Dv7RN200.mjs";
|
|
4
|
+
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
5
|
+
import { a as sourceManifest, r as nativeFileDigest } from "./native-source-Y0yLhFyQ.mjs";
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
8
|
+
import { isJsonObject } from "@stim-cli/core/state";
|
|
9
|
+
import { lstat, realpath } from "node:fs/promises";
|
|
10
|
+
//#region src/integrations/swiftpm-artifact-inputs.ts
|
|
11
|
+
const SWIFTPM_CACHE_LIMIT = "SwiftPM artifact caching requires macos.artifactInputs with complete: true and a complete declaration of pinned, repeatable inputs producing a relocatable app.";
|
|
12
|
+
async function readSwiftpmArtifactToolchain(context, signal, cwd) {
|
|
13
|
+
const run = (file, args) => getExecutor().runFileAsync(file, args, {
|
|
14
|
+
cwd,
|
|
15
|
+
timeoutMs: 3e4,
|
|
16
|
+
signal,
|
|
17
|
+
declareFor: context
|
|
18
|
+
});
|
|
19
|
+
const swift = await run("swift", ["--version"]);
|
|
20
|
+
const sdkPath = context.env.SDKROOT ?? context.env.SWIFTPM_SDKROOT_macosx;
|
|
21
|
+
return {
|
|
22
|
+
swift,
|
|
23
|
+
sdk: await run("xcrun", [
|
|
24
|
+
"--sdk",
|
|
25
|
+
sdkPath === void 0 ? "macosx" : await realpath(sdkPath),
|
|
26
|
+
"--show-sdk-build-version"
|
|
27
|
+
]),
|
|
28
|
+
xcode: await run("xcodebuild", ["-version"]),
|
|
29
|
+
arch: process.arch
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function repositoryPath(value) {
|
|
33
|
+
return typeof value === "string" && value.length > 0 && !value.includes("\\") && !value.includes(":") && !value.includes("\0") && !value.split("/").some((part) => !part || part === "." || part === ".." || part.toLowerCase() === ".git");
|
|
34
|
+
}
|
|
35
|
+
function swiftpmArtifactInputs(value) {
|
|
36
|
+
if (!isJsonObject(value) || value.complete !== true) throw new Error(SWIFTPM_CACHE_LIMIT);
|
|
37
|
+
const record = value;
|
|
38
|
+
if (Object.keys(record).some((key) => ![
|
|
39
|
+
"complete",
|
|
40
|
+
"ignored",
|
|
41
|
+
"outputs",
|
|
42
|
+
"localFiles",
|
|
43
|
+
"environment"
|
|
44
|
+
].includes(key))) throw new Error(SWIFTPM_CACHE_LIMIT);
|
|
45
|
+
const strings = (name, valid) => {
|
|
46
|
+
const values = record[name] ?? [];
|
|
47
|
+
if (!Array.isArray(values) || !values.every(valid)) throw new Error(SWIFTPM_CACHE_LIMIT);
|
|
48
|
+
return [...new Set(values)].toSorted();
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
complete: true,
|
|
52
|
+
ignored: strings("ignored", repositoryPath),
|
|
53
|
+
outputs: strings("outputs", repositoryPath),
|
|
54
|
+
localFiles: strings("localFiles", (path) => typeof path === "string" && !!path && !path.includes("\0")),
|
|
55
|
+
environment: strings("environment", (name) => typeof name === "string" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name))
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async function regularInput(repository, path, signal) {
|
|
59
|
+
const parts = path.split("/");
|
|
60
|
+
for (let index = 1; index <= parts.length; index++) {
|
|
61
|
+
signal?.throwIfAborted();
|
|
62
|
+
const entry = await lstat(join(repository, ...parts.slice(0, index)));
|
|
63
|
+
if (entry.isSymbolicLink()) throw new Error(`SwiftPM cache input ${path} contains a symbolic link.`);
|
|
64
|
+
if (index === parts.length ? !entry.isFile() : !entry.isDirectory()) throw new Error(`SwiftPM cache input ${path} must be an exact regular file with real directory parents.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const below = (path, directory) => path === directory || path.startsWith(`${directory}/`);
|
|
68
|
+
async function swiftpmArtifactSnapshot(root, value, build, toolchain, env, signal) {
|
|
69
|
+
signal?.throwIfAborted();
|
|
70
|
+
const declaration = swiftpmArtifactInputs(value);
|
|
71
|
+
const repository = await realpath(await gitAsync(root, ["rev-parse", "--show-toplevel"], { signal }));
|
|
72
|
+
const project = relative(repository, await realpath(root)).split(sep).join("/");
|
|
73
|
+
if (project && !repositoryPath(project)) throw new Error("The SwiftPM project leaves its repository.");
|
|
74
|
+
if (Object.values(toolchain).some((version) => !version.trim())) throw new Error("The SwiftPM toolchain identity is unavailable.");
|
|
75
|
+
const files = new Map((await sourceManifest(repository, true, signal)).map((file) => [file.path, file]));
|
|
76
|
+
for (const path of declaration.ignored) {
|
|
77
|
+
await regularInput(repository, path, signal);
|
|
78
|
+
const info = await lstat(join(repository, path));
|
|
79
|
+
files.set(path, {
|
|
80
|
+
path,
|
|
81
|
+
kind: info.mode & 73 ? "exec" : "file",
|
|
82
|
+
...await nativeFileDigest(join(repository, path), signal)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
for (const file of files.values()) {
|
|
86
|
+
if (!repositoryPath(file.path)) throw new Error("SwiftPM cache inputs must be repository-relative.");
|
|
87
|
+
await regularInput(repository, file.path, signal);
|
|
88
|
+
if (declaration.outputs.some((output) => below(file.path, output) || below(output, file.path))) throw new Error(`SwiftPM source ${file.path} overlaps a declared generated output; ignore generated outputs in Git.`);
|
|
89
|
+
}
|
|
90
|
+
const bundled = [
|
|
91
|
+
{
|
|
92
|
+
name: "info-plist",
|
|
93
|
+
path: resolve(root, build.infoPlist)
|
|
94
|
+
},
|
|
95
|
+
...Object.entries(build.resources).map(([destination, source]) => ({
|
|
96
|
+
name: `resource/${destination}`,
|
|
97
|
+
path: resolve(root, source)
|
|
98
|
+
})),
|
|
99
|
+
...build.assetCatalog ? [{
|
|
100
|
+
name: "asset-catalog",
|
|
101
|
+
path: resolve(root, build.assetCatalog)
|
|
102
|
+
}] : []
|
|
103
|
+
];
|
|
104
|
+
for (const input of bundled) if (!repositoryPath(relative(repository, await realpath(input.path)).split(sep).join("/"))) throw new Error("SwiftPM bundle inputs must stay inside the repository.");
|
|
105
|
+
for (const path of declaration.localFiles) {
|
|
106
|
+
const info = await lstat(resolve(root, path)).catch((error) => {
|
|
107
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
108
|
+
throw error;
|
|
109
|
+
});
|
|
110
|
+
if (info && !info.isFile()) throw new Error("macos.artifactInputs.localFiles must name exact regular files.");
|
|
111
|
+
}
|
|
112
|
+
const local = await fingerprintNativeInputs([
|
|
113
|
+
...bundled,
|
|
114
|
+
{
|
|
115
|
+
name: "package-resolved",
|
|
116
|
+
path: join(root, "Package.resolved"),
|
|
117
|
+
optional: true
|
|
118
|
+
},
|
|
119
|
+
...declaration.localFiles.map((path, index) => ({
|
|
120
|
+
name: `local/${index}`,
|
|
121
|
+
path: resolve(root, path),
|
|
122
|
+
optional: true
|
|
123
|
+
}))
|
|
124
|
+
], {
|
|
125
|
+
parameters: Object.fromEntries([.../* @__PURE__ */ new Set([
|
|
126
|
+
...declaration.environment,
|
|
127
|
+
"DEVELOPER_DIR",
|
|
128
|
+
"TOOLCHAINS",
|
|
129
|
+
"SDKROOT",
|
|
130
|
+
"SWIFT_EXEC",
|
|
131
|
+
"MACOSX_DEPLOYMENT_TARGET"
|
|
132
|
+
])].toSorted().map((name) => [name, env[name] ?? null])),
|
|
133
|
+
signal
|
|
134
|
+
});
|
|
135
|
+
const hash = createHash("sha256").update("stim-swiftpm-artifact-v1\0").update(JSON.stringify({
|
|
136
|
+
project,
|
|
137
|
+
source: manifestDigest([...files.values()]),
|
|
138
|
+
local: local.hash,
|
|
139
|
+
declaration,
|
|
140
|
+
build: {
|
|
141
|
+
...build,
|
|
142
|
+
resources: Object.fromEntries(Object.entries(build.resources).toSorted(([a], [b]) => a.localeCompare(b)))
|
|
143
|
+
},
|
|
144
|
+
toolchain
|
|
145
|
+
})).digest("hex");
|
|
146
|
+
signal?.throwIfAborted();
|
|
147
|
+
return {
|
|
148
|
+
hash,
|
|
149
|
+
key: buildCacheKey("macos", hash, { configuration: "debug" })
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { swiftpmArtifactInputs as n, swiftpmArtifactSnapshot as r, readSwiftpmArtifactToolchain as t };
|