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,9 +1,9 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { n as METRO_COMMAND_PORT } from "./settings-
|
|
3
|
-
import { w as MODE_COMMAND } from "./project-
|
|
4
|
-
import { d as signalProcessTree } from "./metro-
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { n as METRO_COMMAND_PORT } from "./settings-B717odTD.mjs";
|
|
3
|
+
import { w as MODE_COMMAND } from "./project-_phNIJfs.mjs";
|
|
4
|
+
import { d as signalProcessTree } from "./metro-DnCEjCxs.mjs";
|
|
5
5
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
6
|
-
import { f as recordFromLine, m as superviseChildServer } from "./server-expo-
|
|
6
|
+
import { f as recordFromLine, m as superviseChildServer } from "./server-expo-DsguMGUF.mjs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
9
9
|
//#region src/supervisor/server-command.ts
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { K as resolveProjectSettings } from "./settings-
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { K as resolveProjectSettings } from "./settings-B717odTD.mjs";
|
|
3
3
|
import { n as stripAnsi, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { S as resolvePackageJson } from "./project-
|
|
4
|
+
import { S as resolvePackageJson } from "./project-_phNIJfs.mjs";
|
|
5
|
+
import { t as cancellableSleep } from "./cancellation-C_22VQTH.mjs";
|
|
5
6
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
6
7
|
import { a as expoMetroStoreEnv, c as registerMetroStore, f as resolveMetroSharedCache, i as expoMetroConfigPath, n as supervisorError, o as metroStoreConfirmedRoot, s as metroStoreRoot } from "./errors-DzkMYh8Q.mjs";
|
|
7
8
|
import { accessSync, constants, existsSync, readFileSync } from "node:fs";
|
|
8
9
|
import { dirname, join } from "node:path";
|
|
9
10
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
10
11
|
//#region src/supervisor/child-server.ts
|
|
11
|
-
function delay(ms) {
|
|
12
|
-
return new Promise((resolve) => {
|
|
13
|
-
const timer = setTimeout(resolve, ms);
|
|
14
|
-
if (typeof timer.unref === "function") timer.unref();
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
12
|
function superviseChildServer({ mode, child, log, toRecord, signal, alive = null, killTimeoutMs, onRecord = null }) {
|
|
18
13
|
let lastMsg = null;
|
|
19
14
|
let lastAt = 0;
|
|
@@ -76,7 +71,7 @@ function superviseChildServer({ mode, child, log, toRecord, signal, alive = null
|
|
|
76
71
|
const running = () => alive ? alive() : !exited && Boolean(child.pid);
|
|
77
72
|
const gone = async () => {
|
|
78
73
|
const deadline = Date.now() + killTimeoutMs;
|
|
79
|
-
while (running() && Date.now() < deadline) await
|
|
74
|
+
while (running() && Date.now() < deadline) await cancellableSleep(25, { ref: false });
|
|
80
75
|
return !running();
|
|
81
76
|
};
|
|
82
77
|
if (!running() || !signal("SIGTERM")) return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as loadConfig$1, d as getConfigDir, f as getConfigPath$1, h as getRepoSettings, m as getProjectSettings } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { n as isTimeoutError, t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { r as gitQuiet, t as git } from "./git-DDfFzkMm.mjs";
|
|
3
4
|
import { accessSync, chmodSync, constants, lstatSync, mkdirSync, mkdtempSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
4
5
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
6
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "path";
|
|
@@ -101,38 +102,30 @@ function isCarrySkipped(rel) {
|
|
|
101
102
|
function nativePath(path) {
|
|
102
103
|
return sep$1 === "/" ? path : path.replaceAll("/", sep$1);
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
function gitRead(dir, args, { removal }) {
|
|
106
|
+
return removal ? removalCheck(dir, args) : gitQuiet(dir, args);
|
|
107
|
+
}
|
|
108
|
+
function gitCommonDir(cwd, opts = {}) {
|
|
109
|
+
const out = gitRead(cwd, [
|
|
108
110
|
"rev-parse",
|
|
109
111
|
"--path-format=absolute",
|
|
110
112
|
"--git-common-dir"
|
|
111
|
-
]);
|
|
113
|
+
], opts);
|
|
112
114
|
return out ? nativePath(out.trim()) : null;
|
|
113
115
|
}
|
|
114
116
|
function repoRoot(cwd) {
|
|
115
|
-
const out =
|
|
116
|
-
"-C",
|
|
117
|
-
cwd,
|
|
118
|
-
"rev-parse",
|
|
119
|
-
"--show-toplevel"
|
|
120
|
-
]);
|
|
117
|
+
const out = gitQuiet(cwd, ["rev-parse", "--show-toplevel"]);
|
|
121
118
|
return out ? nativePath(out.trim()) : null;
|
|
122
119
|
}
|
|
123
120
|
function locallyKnownUpstream(projectRoot) {
|
|
124
121
|
try {
|
|
125
|
-
const name =
|
|
126
|
-
"-C",
|
|
127
|
-
projectRoot,
|
|
122
|
+
const name = git(projectRoot, [
|
|
128
123
|
"rev-parse",
|
|
129
124
|
"--abbrev-ref",
|
|
130
125
|
"--symbolic-full-name",
|
|
131
126
|
"@{upstream}"
|
|
132
127
|
], { timeoutMs: 5e3 });
|
|
133
|
-
const counts =
|
|
134
|
-
"-C",
|
|
135
|
-
projectRoot,
|
|
128
|
+
const counts = git(projectRoot, [
|
|
136
129
|
"rev-list",
|
|
137
130
|
"--left-right",
|
|
138
131
|
"--count",
|
|
@@ -194,9 +187,7 @@ function canonicalPath(path) {
|
|
|
194
187
|
function nestedWorktreePaths(root) {
|
|
195
188
|
const source = canonicalPath(root);
|
|
196
189
|
const paths = /* @__PURE__ */ new Set();
|
|
197
|
-
const out =
|
|
198
|
-
"-C",
|
|
199
|
-
root,
|
|
190
|
+
const out = gitQuiet(root, [
|
|
200
191
|
"worktree",
|
|
201
192
|
"list",
|
|
202
193
|
"--porcelain"
|
|
@@ -214,12 +205,7 @@ function overlapsNestedWorktree(rel, nestedPaths) {
|
|
|
214
205
|
return nestedPaths.some((nested) => path === nested || path.startsWith(`${nested}/`) || nested.startsWith(`${path}/`));
|
|
215
206
|
}
|
|
216
207
|
function listTrackedPaths(dir) {
|
|
217
|
-
const out =
|
|
218
|
-
"-C",
|
|
219
|
-
dir,
|
|
220
|
-
"ls-files",
|
|
221
|
-
"-z"
|
|
222
|
-
]);
|
|
208
|
+
const out = gitQuiet(dir, ["ls-files", "-z"]);
|
|
223
209
|
if (out === null) return null;
|
|
224
210
|
return out.split("\0").filter(Boolean);
|
|
225
211
|
}
|
|
@@ -242,9 +228,7 @@ function trackedGuard(dir) {
|
|
|
242
228
|
};
|
|
243
229
|
}
|
|
244
230
|
function listGitignoredEntries(root) {
|
|
245
|
-
const
|
|
246
|
-
"-C",
|
|
247
|
-
root,
|
|
231
|
+
const out = git(root, [
|
|
248
232
|
"ls-files",
|
|
249
233
|
"--others",
|
|
250
234
|
"--ignored",
|
|
@@ -252,8 +236,7 @@ function listGitignoredEntries(root) {
|
|
|
252
236
|
"--directory",
|
|
253
237
|
"--no-empty-directory",
|
|
254
238
|
"-z"
|
|
255
|
-
];
|
|
256
|
-
const out = getExecutor().runFile("git", args);
|
|
239
|
+
], { timeoutMs: "unbounded" });
|
|
257
240
|
if (!out) return [];
|
|
258
241
|
return out.split("\0").filter(Boolean).map((e) => e.endsWith("/") ? e.slice(0, -1) : e);
|
|
259
242
|
}
|
|
@@ -315,14 +298,14 @@ function cloneIgnoredEntries({ root, target, patterns }) {
|
|
|
315
298
|
"-Rc",
|
|
316
299
|
from,
|
|
317
300
|
to
|
|
318
|
-
]);
|
|
301
|
+
], { timeoutMs: "unbounded" });
|
|
319
302
|
} catch {
|
|
320
303
|
removeTemporaryEntry(to);
|
|
321
304
|
getExecutor().runFile("cp", [
|
|
322
305
|
"-R",
|
|
323
306
|
from,
|
|
324
307
|
to
|
|
325
|
-
]);
|
|
308
|
+
], { timeoutMs: "unbounded" });
|
|
326
309
|
cloned = false;
|
|
327
310
|
}
|
|
328
311
|
if (lstatSync$1(to).isDirectory()) removeCopiedExclusions(to, rel);
|
|
@@ -470,9 +453,7 @@ const FINGERPRINT_INPUT_FILES = [
|
|
|
470
453
|
"package.json"
|
|
471
454
|
];
|
|
472
455
|
function dirtyFingerprintFiles(root) {
|
|
473
|
-
const out =
|
|
474
|
-
"-C",
|
|
475
|
-
root,
|
|
456
|
+
const out = gitQuiet(root, [
|
|
476
457
|
"status",
|
|
477
458
|
"--porcelain",
|
|
478
459
|
"--",
|
|
@@ -481,26 +462,28 @@ function dirtyFingerprintFiles(root) {
|
|
|
481
462
|
if (out === null || out.trim() === "") return [];
|
|
482
463
|
return out.split("\n").map((line) => normalizePorcelainLine(line.trimEnd())).filter((line) => line !== "").map((line) => line.slice(3).trim()).filter((path) => path !== "");
|
|
483
464
|
}
|
|
465
|
+
const REMOVAL_CHECK_TIMEOUT_MS = 6e4;
|
|
466
|
+
/**
|
|
467
|
+
* A git read that decides whether a worktree is safe to remove. Null when git cannot answer; a timeout throws its
|
|
468
|
+
* `ETIMEDOUT` error, so a slow repository is never read as a clean one.
|
|
469
|
+
*/
|
|
470
|
+
function removalCheck(dir, args) {
|
|
471
|
+
try {
|
|
472
|
+
return git(dir, args, { timeoutMs: REMOVAL_CHECK_TIMEOUT_MS });
|
|
473
|
+
} catch (error) {
|
|
474
|
+
if (isTimeoutError(error)) throw error;
|
|
475
|
+
return null;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
484
478
|
function hasUncommittedWork(dir) {
|
|
485
|
-
const out =
|
|
486
|
-
"--no-optional-locks",
|
|
487
|
-
"-C",
|
|
488
|
-
dir,
|
|
489
|
-
"status",
|
|
490
|
-
"--porcelain"
|
|
491
|
-
]);
|
|
479
|
+
const out = removalCheck(dir, ["status", "--porcelain"]);
|
|
492
480
|
if (out === null) return null;
|
|
493
481
|
return out.trim().length > 0;
|
|
494
482
|
}
|
|
483
|
+
/** The porcelain status lines, or null when git cannot answer; throws when git times out. */
|
|
495
484
|
function dirtyPaths(dir, { limit = 10 } = {}) {
|
|
496
|
-
const out =
|
|
497
|
-
|
|
498
|
-
"-C",
|
|
499
|
-
dir,
|
|
500
|
-
"status",
|
|
501
|
-
"--porcelain"
|
|
502
|
-
]);
|
|
503
|
-
if (out === null) return [];
|
|
485
|
+
const out = removalCheck(dir, ["status", "--porcelain"]);
|
|
486
|
+
if (out === null) return null;
|
|
504
487
|
return out.split("\n").map((l) => normalizePorcelainLine(l.trimEnd())).filter(Boolean).slice(0, limit);
|
|
505
488
|
}
|
|
506
489
|
function normalizePorcelainLine(line) {
|
|
@@ -508,13 +491,11 @@ function normalizePorcelainLine(line) {
|
|
|
508
491
|
return ` ${line}`;
|
|
509
492
|
}
|
|
510
493
|
function restoreFile(dir, file) {
|
|
511
|
-
return
|
|
512
|
-
"-C",
|
|
513
|
-
dir,
|
|
494
|
+
return gitQuiet(dir, [
|
|
514
495
|
"checkout",
|
|
515
496
|
"--",
|
|
516
497
|
file
|
|
517
|
-
]) !== null;
|
|
498
|
+
], { write: true }) !== null;
|
|
518
499
|
}
|
|
519
500
|
function isPodInstallChurn(paths) {
|
|
520
501
|
if (!paths || paths.length === 0) return false;
|
|
@@ -522,10 +503,7 @@ function isPodInstallChurn(paths) {
|
|
|
522
503
|
}
|
|
523
504
|
const SAFE_BRANCH_NAME = /^[A-Za-z0-9@._/-]+$/;
|
|
524
505
|
function unpushedCommits(dir) {
|
|
525
|
-
const
|
|
526
|
-
const branch = exec.runFileQuiet("git", [
|
|
527
|
-
"-C",
|
|
528
|
-
dir,
|
|
506
|
+
const branch = removalCheck(dir, [
|
|
529
507
|
"symbolic-ref",
|
|
530
508
|
"--quiet",
|
|
531
509
|
"--short",
|
|
@@ -537,16 +515,12 @@ function unpushedCommits(dir) {
|
|
|
537
515
|
`--exclude=${own}`,
|
|
538
516
|
"--branches"
|
|
539
517
|
] : ["--remotes"];
|
|
540
|
-
if (!own &&
|
|
541
|
-
"-C",
|
|
542
|
-
dir,
|
|
518
|
+
if (!own && removalCheck(dir, [
|
|
543
519
|
"rev-parse",
|
|
544
520
|
"--abbrev-ref",
|
|
545
521
|
"HEAD"
|
|
546
522
|
]) === "HEAD") protection.push("--branches");
|
|
547
|
-
const out =
|
|
548
|
-
"-C",
|
|
549
|
-
dir,
|
|
523
|
+
const out = removalCheck(dir, [
|
|
550
524
|
"log",
|
|
551
525
|
"--oneline",
|
|
552
526
|
"HEAD",
|
|
@@ -557,63 +531,50 @@ function unpushedCommits(dir) {
|
|
|
557
531
|
return out.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
558
532
|
}
|
|
559
533
|
function hasRemote(dir) {
|
|
560
|
-
const out =
|
|
561
|
-
"-C",
|
|
562
|
-
dir,
|
|
563
|
-
"remote"
|
|
564
|
-
]);
|
|
534
|
+
const out = gitQuiet(dir, ["remote"]);
|
|
565
535
|
return Boolean(out && out.trim().length > 0);
|
|
566
536
|
}
|
|
567
|
-
function branchExists(cwd, branch) {
|
|
568
|
-
const out =
|
|
569
|
-
"-C",
|
|
570
|
-
cwd,
|
|
537
|
+
function branchExists(cwd, branch, opts = {}) {
|
|
538
|
+
const out = gitRead(cwd, [
|
|
571
539
|
"rev-parse",
|
|
572
540
|
"--verify",
|
|
573
541
|
"--quiet",
|
|
574
542
|
`refs/heads/${branch}`
|
|
575
|
-
]);
|
|
543
|
+
], opts);
|
|
576
544
|
return Boolean(out);
|
|
577
545
|
}
|
|
578
|
-
function resolveFullRef(cwd, ref) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
`${ref}^{commit}`
|
|
588
|
-
]);
|
|
589
|
-
return out && out.trim() ? out.trim() : null;
|
|
590
|
-
} catch {
|
|
591
|
-
return null;
|
|
592
|
-
}
|
|
546
|
+
function resolveFullRef(cwd, ref, opts = {}) {
|
|
547
|
+
const out = gitRead(cwd, [
|
|
548
|
+
"rev-parse",
|
|
549
|
+
"--verify",
|
|
550
|
+
"--quiet",
|
|
551
|
+
"--end-of-options",
|
|
552
|
+
`${ref}^{commit}`
|
|
553
|
+
], opts);
|
|
554
|
+
return out && out.trim() ? out.trim() : null;
|
|
593
555
|
}
|
|
594
556
|
function removeWorktree(path, { from, force = false, platform = process.platform }) {
|
|
595
557
|
const args = [
|
|
596
558
|
...platform === "win32" ? ["-c", "core.longpaths=true"] : [],
|
|
597
|
-
"-C",
|
|
598
|
-
from,
|
|
599
559
|
"worktree",
|
|
600
560
|
"remove",
|
|
601
561
|
...force ? ["--force"] : [],
|
|
602
562
|
"--",
|
|
603
563
|
path
|
|
604
564
|
];
|
|
605
|
-
|
|
565
|
+
git(from, args, {
|
|
566
|
+
write: true,
|
|
567
|
+
timeoutMs: "unbounded"
|
|
568
|
+
});
|
|
606
569
|
}
|
|
607
570
|
function deleteBranch(cwd, branch, expectedSha) {
|
|
608
571
|
if (!SAFE_BRANCH_NAME.test(branch) || branch.startsWith("-")) throw new Error(`Refusing branch ${JSON.stringify(branch)}: it is not a safe local branch name.`);
|
|
609
|
-
|
|
610
|
-
"-C",
|
|
611
|
-
cwd,
|
|
572
|
+
git(cwd, [
|
|
612
573
|
"update-ref",
|
|
613
574
|
"-d",
|
|
614
575
|
`refs/heads/${branch}`,
|
|
615
576
|
expectedSha
|
|
616
|
-
]);
|
|
577
|
+
], { write: true });
|
|
617
578
|
}
|
|
618
579
|
function parseWorktrees(out) {
|
|
619
580
|
const entries = [];
|
|
@@ -628,31 +589,28 @@ function parseWorktrees(out) {
|
|
|
628
589
|
if (current.path) entries.push(current);
|
|
629
590
|
return entries;
|
|
630
591
|
}
|
|
592
|
+
/** Null when git cannot list the index, so the answer is unknown; throws when git times out. */
|
|
631
593
|
function hasPopulatedSubmodules(worktree) {
|
|
632
|
-
const modules =
|
|
633
|
-
"-C",
|
|
634
|
-
worktree,
|
|
594
|
+
const modules = removalCheck(worktree, [
|
|
635
595
|
"rev-parse",
|
|
636
596
|
"--git-path",
|
|
637
597
|
"modules"
|
|
638
598
|
]);
|
|
639
599
|
if (modules && existsSync$1(resolve$1(worktree, nativePath(modules)))) return true;
|
|
640
|
-
|
|
641
|
-
"-C",
|
|
642
|
-
worktree,
|
|
600
|
+
const staged = removalCheck(worktree, [
|
|
643
601
|
"ls-files",
|
|
644
602
|
"--stage",
|
|
645
603
|
"-z"
|
|
646
|
-
])
|
|
604
|
+
]);
|
|
605
|
+
if (staged === null) return null;
|
|
606
|
+
return staged.split("\0").some((line) => line.startsWith("160000 ") && existsSync$1(join$1(worktree, line.slice(line.indexOf(" ") + 1), ".git")));
|
|
647
607
|
}
|
|
648
|
-
function listWorktrees(cwd) {
|
|
649
|
-
const out =
|
|
650
|
-
"-C",
|
|
651
|
-
cwd,
|
|
608
|
+
function listWorktrees(cwd, opts = {}) {
|
|
609
|
+
const out = gitRead(cwd, [
|
|
652
610
|
"worktree",
|
|
653
611
|
"list",
|
|
654
612
|
"--porcelain"
|
|
655
|
-
]);
|
|
613
|
+
], opts);
|
|
656
614
|
return out ? parseWorktrees(out) : [];
|
|
657
615
|
}
|
|
658
616
|
function branchOf(head) {
|
|
@@ -730,9 +688,7 @@ function selectSourceCheckout(entries, bareHead) {
|
|
|
730
688
|
return { refusal: `The bare repository at ${bare} points HEAD at ${bareHead}, which is checked out in more than one worktree: ${matches.map((entry) => entry.path).join(", ")}. Remove the extra worktrees, or point HEAD at a branch checked out once, then retry:\n${pointHead}` };
|
|
731
689
|
}
|
|
732
690
|
function bareHeadBranch(bare) {
|
|
733
|
-
const out =
|
|
734
|
-
"-C",
|
|
735
|
-
bare,
|
|
691
|
+
const out = gitQuiet(bare, [
|
|
736
692
|
"symbolic-ref",
|
|
737
693
|
"--quiet",
|
|
738
694
|
"HEAD"
|
|
@@ -1435,6 +1391,9 @@ function maintenanceKeepSetting(settings) {
|
|
|
1435
1391
|
const value = settingValueAt(settings, "maintenance.keep");
|
|
1436
1392
|
return value !== void 0 && value !== false;
|
|
1437
1393
|
}
|
|
1394
|
+
function workspaceHiddenSetting(settings) {
|
|
1395
|
+
return settingValueAt(settings, "workspace.hidden") === true;
|
|
1396
|
+
}
|
|
1438
1397
|
function tunnelModeSetting(settings) {
|
|
1439
1398
|
const block = settings.metro;
|
|
1440
1399
|
if (typeof block !== "object" || block === null) return null;
|
|
@@ -1500,4 +1459,4 @@ function webSettings(settings) {
|
|
|
1500
1459
|
};
|
|
1501
1460
|
}
|
|
1502
1461
|
//#endregion
|
|
1503
|
-
export { settingValueAt as $, metroIdleStopMinutesSetting as A,
|
|
1462
|
+
export { settingValueAt as $, metroIdleStopMinutesSetting as A, restoreFile as At, remoteAndroidSetting as B, iosSigningIdentitySha1Setting as C, locallyKnownUpstream as Ct, mergeSettingsLayers as D, repoRoot as Dt, maintenanceKeepSetting as E, removeWorktree as Et, parseIosRemote as F, makeTemporaryDirectory as Ft, resolveIosProjectDir as G, remoteIosSetting as H, projectSettingsContext as I, removeTemporaryEntry as It, runnableMetroCommand as J, resolveProjectSettings as K, publicUrlSetting as L, temporaryRoot as Lt, metroTunnelSettingError as M, unpushedCommits as Mt, metroWarmupUrlSetting as N, warmWorktreePaths as Nt, metroCommandSetting as O, resolveFullRef as Ot, ngrokUrlSetting as P, filesystemDevice as Pt, settingShapeErrors as Q, readCommittedSettings as R, iosSigningIdentitySettingError as S, listWorktrees as St, iosSimSlimProfileSetting as T, readWorktreeExclude as Tt, resolveAndroidLayout as U, remoteEasFallbackSetting as V, resolveCacheProviderConfig as W, settingOrigin as X, settingFile as Y, settingOriginScope as Z, iosLanHostSetting as _, hasPopulatedSubmodules as _t, SETTING_SHAPE_REMEDY as a, PUBLIC_METRO_ENV as at, iosProjectDirSettingError as b, isPodInstallChurn as bt, androidDataPartitionSizeBytes as c, resolveTailscaleBinary as ct, androidLayoutSetting as d, deleteBranch as dt, settingsLayers as et, androidLayoutSettingError as f, depsOutOfSync as ft, deviceReclaimIdleMinutesSetting as g, gitCommonDirOnDisk as gt, deviceIdleShutdownMinutesSetting as h, gitCommonDir as ht, SETTINGS_WITH_RESOLVE_TIME_FALLBACK as i, workspaceHiddenSetting as it, metroPortSetting as j, sourceCheckoutOf as jt, metroCommandSettingError as k, resolveSourceCheckout as kt, androidDataPartitionSizeGbSetting as l, branchExists as lt, defaultAndroidLayout as m, dirtyPaths as mt, METRO_COMMAND_PORT as n, unknownSettingKeys as nt, androidAvdConfigSetting as o, detectProviders as ot, cacheProviderSettingError as p, dirtyFingerprintFiles as pt, resolveSettings as q, PATH_SETTINGS as r, webSettings as rt, androidAvdConfigSettingError as s, planMetroReach as st, ANDROID_AVD_CONFIG_HELP as t, tunnelModeSetting as tt, androidDataPartitionSizeGbSettingError as u, cloneIgnoredEntries as ut, iosLanHostSettingError as v, hasRemote as vt, iosSigningIdentitySha1SettingError as w, podsOutOfSync as wt, iosSigningIdentitySetting as x, linkedWorktreesOnDisk as xt, iosProjectDirSetting as y, hasUncommittedWork as yt, realpathInside as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as withConfigLock$1, O as writeConfigSetting, _ as loadConfig$1, f as getConfigPath$1, h as getRepoSettings, m as getProjectSettings } from "./config-
|
|
2
|
-
import {
|
|
3
|
-
import { n as findCommandWorkspace, t as NO_PROJECT_REFUSAL } from "./project-
|
|
4
|
-
import { n as settingDefault, r as stimDesktopInstalled } from "./stim-desktop-
|
|
5
|
-
import { n as recordingLayers, t as deleteTurnedOffRecordings } from "./recordings-
|
|
1
|
+
import { D as withConfigLock$1, O as writeConfigSetting, _ as loadConfig$1, f as getConfigPath$1, h as getRepoSettings, m as getProjectSettings } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { Dt as repoRoot, R as readCommittedSettings, ht as gitCommonDir, nt as unknownSettingKeys } from "./settings-B717odTD.mjs";
|
|
3
|
+
import { n as findCommandWorkspace, t as NO_PROJECT_REFUSAL } from "./project-_phNIJfs.mjs";
|
|
4
|
+
import { n as settingDefault, r as stimDesktopInstalled } from "./stim-desktop-BzBN2Em2.mjs";
|
|
5
|
+
import { n as recordingLayers, t as deleteTurnedOffRecordings } from "./recordings-D0d5aQt0.mjs";
|
|
6
6
|
import { existsSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { SETTINGS, SETTING_SCOPES, coerceSettingText, isJsonObject, isSensitiveReference, settingDefinition, settingValueError } from "@stim-cli/core/state";
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
277
|
"scheme": {
|
|
278
|
-
"description": "Shared Xcode scheme to build when the workspace has several",
|
|
278
|
+
"description": "Shared Xcode scheme to build when the workspace has several; the --scheme flag overrides it",
|
|
279
279
|
"type": "string",
|
|
280
280
|
"x-stim": {
|
|
281
281
|
"key": "ios.scheme",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import { d as getConfigDir } from "./config-D0LhTY3S.mjs";
|
|
1
|
+
import { d as getConfigDir, j as ownership_claim_exports, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
4
3
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
4
|
import { join } from "node:path";
|
|
6
5
|
//#region src/engine/simslim.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as fileLeaseIo } from "./device-lease-
|
|
3
|
-
import { r as readWorkspaceState$1 } from "./workspace-state-
|
|
4
|
-
import { E as getAvdNameForSerial, O as listAdbDevices } from "./android-
|
|
5
|
-
import { d as listAllIosSims } from "./ios-
|
|
6
|
-
import {
|
|
1
|
+
import { H as parseDeviceSlotKey, W as projectDeviceSlots, p as getProject } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { n as fileLeaseIo } from "./device-lease-BX1sJQ2E.mjs";
|
|
3
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
4
|
+
import { E as getAvdNameForSerial, O as listAdbDevices } from "./android-Mz_Inn3w.mjs";
|
|
5
|
+
import { d as listAllIosSims } from "./ios-RkW4pnQf.mjs";
|
|
6
|
+
import { p as deviceShellArg } from "./app-install-BIKtMfPq.mjs";
|
|
7
7
|
import { hostedNativeRecords } from "@stim-cli/core/state";
|
|
8
8
|
//#region src/engine/slot-launch.ts
|
|
9
9
|
function launchSlotScope(root, slot = "default") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as ownership_claim_exports, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
2
|
//#region src/engine/spawn-claims.ts
|
|
3
3
|
const declaring = /* @__PURE__ */ new Set();
|
|
4
4
|
const running = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
2
|
import { cpSync, existsSync, lstatSync, mkdirSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
3
3
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
4
|
import { validMacosResourceDestination } from "@stim-cli/core";
|
|
@@ -13,7 +13,7 @@ function validateInfoPlist(root, product, infoPlist) {
|
|
|
13
13
|
"-o",
|
|
14
14
|
"-",
|
|
15
15
|
source
|
|
16
|
-
]));
|
|
16
|
+
], { timeoutMs: 1e4 }));
|
|
17
17
|
if (typeof plist.CFBundleIdentifier !== "string" || plist.CFBundleExecutable !== product) throw new Error("macos.infoPlist must name a CFBundleIdentifier and the selected product as CFBundleExecutable.");
|
|
18
18
|
if (plist.CFBundleURLTypes || plist.SUFeedURL) throw new Error("Use a development Info.plist without shared URL schemes or an update feed.");
|
|
19
19
|
if (plist.LSMinimumSystemVersion !== void 0 && typeof plist.LSMinimumSystemVersion !== "string") throw new Error("macos.infoPlist LSMinimumSystemVersion must be a string. See stim guide macos.");
|
|
@@ -30,7 +30,7 @@ function setBundleName(plistPath, name) {
|
|
|
30
30
|
"-string",
|
|
31
31
|
name,
|
|
32
32
|
plistPath
|
|
33
|
-
]);
|
|
33
|
+
], { timeoutMs: 1e4 });
|
|
34
34
|
}
|
|
35
35
|
function resourceError(key, entry, reason) {
|
|
36
36
|
throw new Error(`${key} entry ${JSON.stringify(entry)}: ${reason}. See stim guide macos.`);
|
|
@@ -105,7 +105,7 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
|
|
|
105
105
|
"-c",
|
|
106
106
|
`Set :CFBundleIdentifier ${bundleId}`,
|
|
107
107
|
join(contents, "Info.plist")
|
|
108
|
-
]);
|
|
108
|
+
], { timeoutMs: 1e4 });
|
|
109
109
|
if (displayName !== void 0) setBundleName(join(contents, "Info.plist"), displayName);
|
|
110
110
|
for (const entry of readdirSync(bin)) if (entry.endsWith(".framework")) {
|
|
111
111
|
const target = join(contents, "Frameworks", entry);
|
|
@@ -119,14 +119,14 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
|
|
|
119
119
|
"--sign",
|
|
120
120
|
"-",
|
|
121
121
|
target
|
|
122
|
-
]);
|
|
122
|
+
], { timeoutMs: "unbounded" });
|
|
123
123
|
} else if (entry.endsWith(".bundle")) cpSync(join(bin, entry), join(contents, "Resources", entry), { recursive: true });
|
|
124
124
|
const frameworkPath = "@executable_path/../Frameworks";
|
|
125
|
-
if (!exec.runFile("otool", ["-l", executable]).includes(frameworkPath)) exec.runFile("install_name_tool", [
|
|
125
|
+
if (!exec.runFile("otool", ["-l", executable], { timeoutMs: 3e4 }).includes(frameworkPath)) exec.runFile("install_name_tool", [
|
|
126
126
|
"-add_rpath",
|
|
127
127
|
frameworkPath,
|
|
128
128
|
executable
|
|
129
|
-
]);
|
|
129
|
+
], { timeoutMs: 3e4 });
|
|
130
130
|
for (const [destination, source] of Object.entries(extras.resources)) {
|
|
131
131
|
const target = join(contents, "Resources", destination);
|
|
132
132
|
mkdirSync(dirname(target), { recursive: true });
|
|
@@ -143,7 +143,7 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
|
|
|
143
143
|
...minimumSystemVersion === void 0 ? [] : ["--minimum-deployment-target", minimumSystemVersion],
|
|
144
144
|
"--output-partial-info-plist",
|
|
145
145
|
"/dev/null"
|
|
146
|
-
]);
|
|
146
|
+
], { timeoutMs: "unbounded" });
|
|
147
147
|
if (!existsSync(join(contents, "Resources", "Assets.car"))) resourceError("macos.assetCatalog", extras.assetCatalog, "actool did not produce Assets.car");
|
|
148
148
|
}
|
|
149
149
|
exec.runFile("codesign", [
|
|
@@ -151,7 +151,7 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
|
|
|
151
151
|
"--sign",
|
|
152
152
|
"-",
|
|
153
153
|
bundle
|
|
154
|
-
]);
|
|
154
|
+
], { timeoutMs: "unbounded" });
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
export { validateInfoPlist as i, setBundleName as n, stageBundle as r, resolveBundleExtras as t };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { E as upsertProject, k as process_identity_exports, p as getProject } 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 { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import { A as metroIdleStopMinutesSetting, B as remoteAndroidSetting, G as resolveIosProjectDir, H as remoteIosSetting, K as resolveProjectSettings, L as publicUrlSetting, M as metroTunnelSettingError, O as metroCommandSetting, P as ngrokUrlSetting, Q as settingShapeErrors, U as resolveAndroidLayout, W as resolveCacheProviderConfig, a as SETTING_SHAPE_REMEDY, at as PUBLIC_METRO_ENV, h as deviceIdleShutdownMinutesSetting, j as metroPortSetting, k as metroCommandSettingError, m as defaultAndroidLayout, nt as unknownSettingKeys, ot as detectProviders, p as cacheProviderSettingError, st as planMetroReach, tt as tunnelModeSetting } from "./settings-B717odTD.mjs";
|
|
5
|
+
import { _ as supervisorLogFile, c as writeWorkspaceState, i as recordWorkspaceUse, n as clearWorkspaceStateKeys, p as ensureWorkspaceStorage, r as readWorkspaceState$1, w as workspaceLogsDir$1, y as workspaceAgentDeviceDir } from "./workspace-state-DJt_MMvf.mjs";
|
|
6
|
+
import { _ as stepTimer, l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
7
|
+
import { C as MODE_BARE, D as clearManagedMetroTunnel, T as MODE_EXPO, _ as detectIsExpo, b as readAppConfigText, j as readMetroTunnel, r as findProjectRoot, s as projectProblem, t as NO_PROJECT_REFUSAL, w as MODE_COMMAND, x as readAppJson } from "./project-_phNIJfs.mjs";
|
|
8
|
+
import { a as workspaceLinks, i as workspaceLinkLine } from "./stim-desktop-BzBN2Em2.mjs";
|
|
9
|
+
import { d as signalProcessTree, g as PortInspectionError, h as PORT_INSPECTION_REMEDY, m as reserveMetroPort, s as pidExists, u as resolveProjectMetro } from "./metro-DnCEjCxs.mjs";
|
|
10
|
+
import { D as stopTunnel, E as startTunnelSequence, O as terminateChild, P as resolveSupervisorTarget, j as withManagedTunnelLock, k as withManagedRemoteWorktreeLock } from "./workspaces-C36s2jb9.mjs";
|
|
11
|
+
import { ct as stopOwnedMetroForReset, t as budgetGate } from "./budget-f7516Zk0.mjs";
|
|
12
|
+
import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-4WopRPg-.mjs";
|
|
13
|
+
import { t as cancellableSleep } from "./cancellation-C_22VQTH.mjs";
|
|
14
14
|
import { i as levelRank } from "./ndjson-GOnbyvso.mjs";
|
|
15
|
-
import { d as readProjectConfig } from "./remote-cache-
|
|
16
|
-
import { n as windowsLauncherArgs } from "./detached-entry-
|
|
15
|
+
import { d as readProjectConfig } from "./remote-cache-OyOyVIS3.mjs";
|
|
16
|
+
import { n as windowsLauncherArgs } from "./detached-entry-B9C_zeQC.mjs";
|
|
17
17
|
import { appendFileSync, mkdirSync, openSync, readFileSync } from "node:fs";
|
|
18
18
|
import { dirname } from "node:path";
|
|
19
19
|
import { join as join$1 } from "path";
|
|
@@ -180,7 +180,6 @@ function readLogTail(file, n = LOG_TAIL_LINES) {
|
|
|
180
180
|
return [];
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
184
183
|
function startCommand(program) {
|
|
185
184
|
registerStart(program);
|
|
186
185
|
}
|
|
@@ -219,7 +218,7 @@ const DEFAULT_START_DEPS = {
|
|
|
219
218
|
alreadyExited: false,
|
|
220
219
|
timeoutMs: 1e3,
|
|
221
220
|
now: Date.now,
|
|
222
|
-
sleep,
|
|
221
|
+
sleep: cancellableSleep,
|
|
223
222
|
isAlive: pidExists
|
|
224
223
|
}),
|
|
225
224
|
withWorktreeLock: withManagedRemoteWorktreeLock,
|
|
@@ -471,7 +470,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
471
470
|
pid: record.pid,
|
|
472
471
|
processToken: record.processToken
|
|
473
472
|
};
|
|
474
|
-
await
|
|
473
|
+
await cancellableSleep(25);
|
|
475
474
|
}
|
|
476
475
|
return null;
|
|
477
476
|
};
|
|
@@ -562,7 +561,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
562
561
|
});
|
|
563
562
|
if (found?.pid === child.pid) return found;
|
|
564
563
|
if (childExit !== null || (child.pid ? !pidExists(child.pid) : true)) return null;
|
|
565
|
-
await
|
|
564
|
+
await cancellableSleep(25);
|
|
566
565
|
}
|
|
567
566
|
return null;
|
|
568
567
|
};
|
|
@@ -1064,7 +1063,7 @@ async function waitForMetro({ root, port, seconds, aborted = () => false, probe
|
|
|
1064
1063
|
while (Date.now() < deadline) {
|
|
1065
1064
|
if ((await probe(port, root)).metro) return true;
|
|
1066
1065
|
if (aborted()) return false;
|
|
1067
|
-
await
|
|
1066
|
+
await cancellableSleep(POLL_MS);
|
|
1068
1067
|
}
|
|
1069
1068
|
const last = await probe(port, root);
|
|
1070
1069
|
return Boolean(last.metro);
|
|
@@ -1074,7 +1073,7 @@ async function waitForExpoTunnel({ root, seconds, aborted = () => false }) {
|
|
|
1074
1073
|
while (Date.now() < deadline) {
|
|
1075
1074
|
if (aborted()) return false;
|
|
1076
1075
|
if (readMetroTunnel(root)?.kind === "expo") return true;
|
|
1077
|
-
await
|
|
1076
|
+
await cancellableSleep(POLL_MS);
|
|
1078
1077
|
}
|
|
1079
1078
|
return !aborted() && readMetroTunnel(root)?.kind === "expo";
|
|
1080
1079
|
}
|