stim 1.18.0 → 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 +1 -1
- package/dist/{activity-BxnkDZDi.mjs → activity-BSw0x84R.mjs} +3 -3
- package/dist/{agent-device-usage-output-CZ66YA4T.mjs → agent-device-usage-output-Bjxu_VmX.mjs} +5 -5
- package/dist/{android-BvwuMUJ9.mjs → android-BXc6BmEi.mjs} +507 -347
- package/dist/{android-DC3ZLuw0.mjs → android-BdQC6zs1.mjs} +6 -6
- package/dist/{android-BKA16DTf.mjs → android-BvV1gGdN.mjs} +3 -3
- package/dist/{android-CBwCNicO.mjs → android-DE5g_5gv.mjs} +2 -2
- package/dist/{android-cas-BBFyr9CA.mjs → android-cas-C87geAg-.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{api-D0VtFhqk.mjs → api-DIf_s86s.mjs} +5 -7
- package/dist/api-run.mjs +8 -8
- package/dist/api.d.mts +8 -2
- package/dist/api.mjs +1 -1
- package/dist/{app-install-D-PUENug.mjs → app-install-CFI4ptUL.mjs} +33 -13
- package/dist/{web-DTU0uiWj.mjs → browser-web-CDhqQxhv.mjs} +134 -172
- package/dist/{budget-DIhL2BKx.mjs → budget-Dz-kyXLv.mjs} +15 -202
- package/dist/{build-facts-DcLv2HSd.d.mts → build-facts-B87vo-Im.d.mts} +32 -1
- package/dist/{cache-manifest-BI7ozfmH.mjs → cache-manifest-DiwKSyv9.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{chrome-DJnmnS5q.mjs → chrome-BTUOo8p2.mjs} +1 -1
- package/dist/{cli-DNJMwADx.mjs → cli-C9Zvgbdc.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-DzhapoMB.mjs → client-CuUo8Nvg.mjs} +248 -23
- package/dist/collector-run.d.mts +6 -0
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-CBtzyIgF.mjs → command-output-Bt8ygHE7.mjs} +1 -1
- package/dist/{config-CgYMahz7.mjs → config-DC5jEtd1.mjs} +6 -2
- package/dist/{created-devices-DKbeWsiK.mjs → created-devices-D0s26Hx5.mjs} +2 -2
- package/dist/{dependency-state-xKoOypBm.mjs → dependency-state-DKaS1OM9.mjs} +2 -2
- package/dist/{detached-entry-BLfcgc4O.mjs → detached-entry-pB_IPfV4.mjs} +1 -1
- package/dist/{dev-client-CLnIH02x.mjs → dev-client-CDY_zAmD.mjs} +2 -2
- package/dist/{device-D7oCHGWi.mjs → device-BHw0WlHl.mjs} +8 -8
- package/dist/{device-capacity-EUOOYr8T.mjs → device-capacity-BoN1jQkO.mjs} +23 -12
- package/dist/device-host-worker.mjs +14 -14
- package/dist/{gradle-C6GKnunQ.mjs → device-ios-B2ruohE-.mjs} +659 -105
- package/dist/{device-lease-Co-EwifR.mjs → device-lease-Cu7PtQpZ.mjs} +5 -5
- package/dist/{device-lease-run-w1xhCqIW.mjs → device-lease-run-D38SnZtt.mjs} +4 -4
- package/dist/{device-pool-F5WvRPtD.mjs → device-pool-CP4rAsHx.mjs} +3 -3
- package/dist/{device-remote-tHbd1fKy.mjs → device-remote-B5GiUifk.mjs} +15 -16
- package/dist/{doctor-B9ckYUoU.mjs → doctor-PRJH94v6.mjs} +53 -29
- package/dist/doctor-watchman-wZhyTdp4.mjs +259 -0
- package/dist/{error-diagnostics-BRXOqDzG.mjs → error-diagnostics--v5HGOU0.mjs} +10 -10
- package/dist/{exec-DWhCZDGm.mjs → exec-i8GDPwq9.mjs} +32 -8
- package/dist/{gc-Dh6mXOKC.mjs → gc-CyHMcKcn.mjs} +19 -19
- package/dist/{guide-tm6igAaa.mjs → guide-dRaQJJk9.mjs} +409 -472
- package/dist/{hosted-android-Bv285t_t.mjs → hosted-android-Bs7fytj7.mjs} +3 -3
- package/dist/{hosted-client-C-rMtppF.mjs → hosted-client-C5G4h_OJ.mjs} +1 -1
- package/dist/{hosted-ios-D5mNmtj4.mjs → hosted-ios-Bik035eL.mjs} +1 -1
- package/dist/{hosted-logs-DN8Iz4mJ.mjs → hosted-logs-CI9Az9a4.mjs} +7 -7
- package/dist/{hosted-macos-B-wEjlwG.mjs → hosted-macos-DABm3ScO.mjs} +4 -4
- package/dist/{hosted-native-DeeOG8xZ.mjs → hosted-native-DbV2aUVw.mjs} +12 -8
- package/dist/{idle-shutdown-jjtxAn5C.mjs → idle-shutdown-DYiMBn34.mjs} +7 -7
- package/dist/{ios-B3SbOWdw.mjs → ios-BWbHFZVz.mjs} +5 -5
- package/dist/{ios-Bvbf0SGY.mjs → ios-DCrkgXEM.mjs} +1 -1
- package/dist/{ios-DNpdygiv.mjs → ios-DYUr9LGc.mjs} +7 -6
- package/dist/ios-ITYno9rO.mjs +2241 -0
- package/dist/{ios-device-vOaByMhw.mjs → ios-device-CJ_ZOGky.mjs} +3 -3
- package/dist/{ios-device-Bn7jWDB1.mjs → ios-device-CrW8aMb5.mjs} +1 -1
- package/dist/{ios-state-B2pES6Vs.mjs → ios-state-By0XuLTQ.mjs} +1 -1
- package/dist/{launch-verify-hskNcWkZ.mjs → launch-verify-DCveSE6d.mjs} +4 -4
- package/dist/{logs-1Ylc1Ri6.mjs → logs-Bao1HOMy.mjs} +10 -10
- package/dist/{macos-DF6C7wUU.mjs → macos-ciyBdTY5.mjs} +108 -130
- package/dist/macos-nIOATJmR.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/manifest-CX0d1IkZ.mjs +148 -0
- package/dist/{metro-Dh8T4Ytd.mjs → metro-DI2AjPF_.mjs} +194 -41
- package/dist/{metro-gateway-CEUw9RMH.mjs → metro-gateway-BxpJLIwh.mjs} +2 -2
- package/dist/{plan-placement-CtxkCO54.mjs → miss-reason-CjQCOKqq.mjs} +180 -296
- package/dist/{named-ports-BFIz1Shz.mjs → named-ports-B4iWH4E-.mjs} +12 -5
- package/dist/{native-runtime-D_603JiC.mjs → native-runtime-BGxsbfny.mjs} +6 -6
- package/dist/offload-worker.d.mts +1 -29
- package/dist/offload-worker.mjs +9 -8
- package/dist/{ownership-D6Se7gg_.mjs → ownership-EB0ySdGK.mjs} +2 -2
- package/dist/{placement-log-BcPhRwR4.mjs → placement-log-Dxe34rJm.mjs} +7 -3
- package/dist/plan-placement-BVY59qa8.mjs +290 -0
- package/dist/{ports-BLTtfBq-.mjs → ports-ByPc0_97.mjs} +3 -3
- package/dist/{prebuild-juCyreaR.mjs → prebuild-BKJ3wJI1.mjs} +4 -4
- package/dist/{preview-D5V07Nrl.mjs → preview-BbSottmO.mjs} +16 -17
- package/dist/project-B5eQ1USs.mjs +612 -0
- package/dist/{pull-request-u4vp7zmK.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-BAWltsVt.mjs → recordings-Bv8McZN4.mjs} +1 -1
- package/dist/{reload-DvyWzVjJ.mjs → reload-rAPdqeRR.mjs} +13 -14
- package/dist/{remote-cache-BGg7aGIZ.mjs → remote-cache-N3hAEaAL.mjs} +4 -4
- package/dist/{run-vhtDgpHO.mjs → run-lAkle1-c.mjs} +2 -2
- package/dist/{server-bare-B9E7S1aR.mjs → server-bare-CkIjnegq.mjs} +3 -3
- package/dist/server-expo-DGsdUGX2.mjs +2 -0
- package/dist/{server-expo-DoBHhuzK.mjs → server-expo-n3tUi3Em.mjs} +3 -3
- package/dist/{settings-Byp2AQ_E.mjs → settings-2am7TSxp.mjs} +5 -6
- package/dist/{settings-CQyMElEP.mjs → settings-CxgngUZk.mjs} +767 -15
- package/dist/settings.schema.json +72 -6
- package/dist/{simslim-EHBQ2R4G.mjs → simslim-D9LkJxIO.mjs} +5 -5
- package/dist/{slot-launch-C1nqh4mu.mjs → slot-launch-HV_KtPIw.mjs} +6 -6
- package/dist/{stage-g_WqWeaE.mjs → stage-BgaZJVZY.mjs} +1 -1
- package/dist/{start-NTc1Ifqs.mjs → start-D8NbxNBb.mjs} +1 -1
- package/dist/{start-D-IeOyoK.mjs → start-DtxthMfI.mjs} +29 -22
- package/dist/{state-BG-aAk4k.mjs → state-D2KtnALG.mjs} +2 -2
- package/dist/{state-xnqpx3AD.mjs → state-Tp4uImDS.mjs} +4 -2
- package/dist/{stats-DY6ekz8F.mjs → stats-8EJ5ivFT.mjs} +6 -6
- package/dist/{status-DCjZeE-K.mjs → status-BOyp0CUl.mjs} +25 -27
- package/dist/{stim-desktop-Behws_fi.mjs → stim-desktop-C65jk_q2.mjs} +1 -1
- package/dist/{stim-installations-aR_WsNOA.mjs → stim-installations-DbmUjsLv.mjs} +1 -1
- package/dist/stop-D0UIpZuh.mjs +72 -0
- package/dist/{stop-DIJtD2GL.mjs → stop-DRipAg-e.mjs} +2 -2
- package/dist/{stop-BTjs3xbc.mjs → stop-zDlknFoz.mjs} +78 -31
- package/dist/supervisor-run.mjs +14 -14
- package/dist/{support-BaayeYCf.mjs → support-CNqYkV0y.mjs} +7 -7
- package/dist/{support-Bwvbrq5-.mjs → support-DsNaFg6D.mjs} +5 -5
- package/dist/swiftpm-macos-aJzPAj1t.mjs +119 -0
- package/dist/{toolchain-Bnyd_K3A.mjs → toolchain-C3xSoyUl.mjs} +27 -270
- package/dist/{trigger-CJMhwXe8.mjs → trigger-CAhmG-4s.mjs} +3 -3
- package/dist/trigger-CoalsMTV.mjs +2 -0
- package/dist/{warm-progress-CjB-MP6H.mjs → warm-progress-pFLB2e6P.mjs} +133 -36
- package/dist/{status-Dcr0Qexd.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 +7 -7
- package/dist/{workspace-state-C59dqG-Z.mjs → workspace-state-CR9X86xJ.mjs} +1 -1
- package/dist/{workspaces-xXItD8Dj.mjs → workspaces-Djb2gfi9.mjs} +102 -18
- package/dist/{worktree-BSYlofkq.mjs → worktree-BL4M1rhB.mjs} +45 -42
- package/dist/{worktree-BJfnU6r5.mjs → worktree-DV-A0LNL.mjs} +1 -1
- package/package.json +5 -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/device-ios-6MewKKnc.mjs +0 -412
- package/dist/guide-status-Bhf9SJXc.mjs +0 -125
- package/dist/ios-CPdkoKaa.mjs +0 -3953
- package/dist/macos-Ck7OBMNY.mjs +0 -2
- package/dist/native-run-B06FkmZx.mjs +0 -158
- package/dist/project-C3ChRLZy.mjs +0 -212
- package/dist/projects-DD7dBTCj.mjs +0 -92
- package/dist/server-expo-Db9HBUoa.mjs +0 -2
- package/dist/stop-BGhKMOuH.mjs +0 -48
- package/dist/trigger-DWAq9hkw.mjs +0 -2
- package/dist/web-B6_bFDn7.mjs +0 -2
- package/dist/worktree-CsKYexJM.mjs +0 -753
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { o as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
2
|
+
import { n as debugLog } from "./exec-i8GDPwq9.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-Bt8ygHE7.mjs";
|
|
4
|
+
import { B as parseDeviceSlotKey, D as withConfigLock$1, E as upsertProject, H as projectDeviceSlots, V as parseDeviceSlotOption, W as validateDeviceSlot, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-DC5jEtd1.mjs";
|
|
5
|
+
import { a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
6
|
+
import { C as clearRemoteSession, E as readMetroTunnel, O as readRemoteSession, S as clearManagedMetroTunnel, T as clearWorkspaceSupervisor, n as findCommandWorkspace, w as clearWorkspaceLaunches } from "./project-B5eQ1USs.mjs";
|
|
7
|
+
import { d as signalProcessTree, r as killMetroTree, s as pidExists, u as resolveProjectMetro } from "./metro-DI2AjPF_.mjs";
|
|
8
|
+
import { b as withdrawDevServerStopRequest, g as logVanishedSupervisor, v as requestDevServerStop } from "./budget-Dz-kyXLv.mjs";
|
|
9
|
+
import { D as teardownOwnedAvd, O as teardownOwnedBrowser, g as stopTunnel, k as teardownOwnedIosSim, m as resolveSupervisorTarget } from "./workspaces-Djb2gfi9.mjs";
|
|
10
|
+
import { n as fileLeaseIo, u as releaseWorkspaceLeases } from "./device-lease-Cu7PtQpZ.mjs";
|
|
11
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-B4iWH4E-.mjs";
|
|
12
|
+
import { t as macosAppPresent } from "./state-Tp4uImDS.mjs";
|
|
13
|
+
import { _ as nativeRunHolder, d as NATIVE_RUN_LOCK, f as NATIVE_RUN_WAIT_MS, g as describeNativeRunHolder, h as decideStopAction, m as clearNativeRunCancel, v as nativeRunWaitNotice, y as requestNativeRunCancel } from "./client-CuUo8Nvg.mjs";
|
|
14
|
+
import { i as stopHostedAndroid } from "./hosted-android-Bs7fytj7.mjs";
|
|
15
|
+
import { f as resolveEasCliBin } from "./remote-cache-N3hAEaAL.mjs";
|
|
16
|
+
import { i as endRecordedSession } from "./device-remote-B5GiUifk.mjs";
|
|
17
|
+
import { n as verifyCollectorOwnership } from "./ownership-EB0ySdGK.mjs";
|
|
18
|
+
import { r as stopHostedIos } from "./hosted-ios-Bik035eL.mjs";
|
|
19
|
+
import { n as stopMacosApp } from "./stop-D0UIpZuh.mjs";
|
|
18
20
|
import { hostedAndroidDeviceName, hostedAndroidRecords, hostedIosRecords, hostedNativeRecords, isJsonObject, parseHostedNativePlacement } from "@stim-cli/core/state";
|
|
19
21
|
import chalk from "chalk";
|
|
20
22
|
//#region src/commands/stop.ts
|
|
@@ -249,10 +251,9 @@ async function stopWorkspaceHostedNative(root, slot, report, failed) {
|
|
|
249
251
|
};
|
|
250
252
|
}
|
|
251
253
|
async function stopWorkspaceMacos(root, failed, enabled) {
|
|
252
|
-
if (enabled === false ||
|
|
254
|
+
if (enabled === false || !macosAppPresent(root)) return void 0;
|
|
253
255
|
try {
|
|
254
|
-
await stopMacosApp(root);
|
|
255
|
-
return { status: "stopped" };
|
|
256
|
+
return await stopMacosApp(root) ? { status: "stopped" } : void 0;
|
|
256
257
|
} catch (error) {
|
|
257
258
|
const reason = error instanceof Error ? error.message : String(error);
|
|
258
259
|
failed(reason);
|
|
@@ -292,6 +293,7 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
292
293
|
let ok = true;
|
|
293
294
|
let stillHolding = null;
|
|
294
295
|
let keepPort = null;
|
|
296
|
+
debugLog.log("stop.phase.start", { phase: "supervisor" });
|
|
295
297
|
const target = resolveSupervisorTarget({
|
|
296
298
|
state: sup,
|
|
297
299
|
record: proj?.supervisor ?? null,
|
|
@@ -329,6 +331,11 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
329
331
|
stillHolding = outcomes.supervisor.reason;
|
|
330
332
|
}
|
|
331
333
|
}
|
|
334
|
+
debugLog.log("stop.phase.end", {
|
|
335
|
+
phase: "supervisor",
|
|
336
|
+
status: outcomes.supervisor.status
|
|
337
|
+
});
|
|
338
|
+
debugLog.log("stop.phase.start", { phase: "collectors" });
|
|
332
339
|
outcomes.collectors = await reapCollectors(root, collectorRecords, {
|
|
333
340
|
isAlive,
|
|
334
341
|
signal: signalCollector,
|
|
@@ -344,10 +351,22 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
344
351
|
} else if (outcomes.collectors.entries.some((entry) => entry.status === "failed")) {
|
|
345
352
|
ok = false;
|
|
346
353
|
stillHolding ??= "a collector could not be stopped";
|
|
347
|
-
} else if (outcomes.collectors.entries.length
|
|
348
|
-
|
|
349
|
-
|
|
354
|
+
} else if (outcomes.collectors.entries.length) {
|
|
355
|
+
debugLog.log("stop.phase.start", { phase: "clear-collectors" });
|
|
356
|
+
const cleared = clearCollectors(root, collectorRecords);
|
|
357
|
+
debugLog.log("stop.phase.end", {
|
|
358
|
+
phase: "clear-collectors",
|
|
359
|
+
cleared
|
|
360
|
+
});
|
|
361
|
+
if (cleared === false) {
|
|
362
|
+
ok = false;
|
|
363
|
+
stillHolding ??= "a replacement collector appeared during cleanup";
|
|
364
|
+
}
|
|
350
365
|
}
|
|
366
|
+
debugLog.log("stop.phase.end", {
|
|
367
|
+
phase: "collectors",
|
|
368
|
+
status: outcomes.collectors.status
|
|
369
|
+
});
|
|
351
370
|
if (outcomes.supervisor.status === "stopped" || outcomes.supervisor.status === "timeout" || outcomes.supervisor.status === "unverified" || outcomes.supervisor.status === "failed") outcomes.metro = {
|
|
352
371
|
status: "skipped",
|
|
353
372
|
reason: "the supervisor owns the dev server on this port"
|
|
@@ -731,11 +750,25 @@ function shutDownDevices(project, workspace, { teardownIos, teardownAvd, report
|
|
|
731
750
|
reason: "Stim does not own this device"
|
|
732
751
|
};
|
|
733
752
|
report(chalk.dim(phaseLine("device", `${iosUdid} is not Stim-owned, leaving it running`)));
|
|
734
|
-
} else
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
753
|
+
} else {
|
|
754
|
+
debugLog.log("stop.device.start", {
|
|
755
|
+
platform: "ios",
|
|
756
|
+
slot,
|
|
757
|
+
deviceId: iosUdid
|
|
758
|
+
});
|
|
759
|
+
const result = teardownIos(iosUdid, {
|
|
760
|
+
del: false,
|
|
761
|
+
label: iosName,
|
|
762
|
+
workspace
|
|
763
|
+
});
|
|
764
|
+
debugLog.log("stop.device.end", {
|
|
765
|
+
platform: "ios",
|
|
766
|
+
slot,
|
|
767
|
+
deviceId: iosUdid,
|
|
768
|
+
status: result.status
|
|
769
|
+
});
|
|
770
|
+
device[iosKey] = reportDevice(iosUdid, result, report, "ios");
|
|
771
|
+
}
|
|
739
772
|
}
|
|
740
773
|
const android = platforms.android;
|
|
741
774
|
if (android?.avdName) {
|
|
@@ -747,10 +780,24 @@ function shutDownDevices(project, workspace, { teardownIos, teardownAvd, report
|
|
|
747
780
|
reason: "Stim does not own this device"
|
|
748
781
|
};
|
|
749
782
|
report(chalk.dim(phaseLine("device", `${android.avdName} is not Stim-owned, leaving it running`)));
|
|
750
|
-
} else
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
783
|
+
} else {
|
|
784
|
+
debugLog.log("stop.device.start", {
|
|
785
|
+
platform: "android",
|
|
786
|
+
slot,
|
|
787
|
+
deviceId: android.avdName
|
|
788
|
+
});
|
|
789
|
+
const result = teardownAvd(android.avdName, {
|
|
790
|
+
del: false,
|
|
791
|
+
workspace
|
|
792
|
+
});
|
|
793
|
+
debugLog.log("stop.device.end", {
|
|
794
|
+
platform: "android",
|
|
795
|
+
slot,
|
|
796
|
+
deviceId: android.avdName,
|
|
797
|
+
status: result.status
|
|
798
|
+
});
|
|
799
|
+
device[androidKey] = reportDevice(android.avdName, result, report, "android");
|
|
800
|
+
}
|
|
754
801
|
}
|
|
755
802
|
}
|
|
756
803
|
return device;
|
package/dist/supervisor-run.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
-
import { B as parseDeviceSlotKey, H as projectDeviceSlots, T as setSupervisor, o as clearSupervisor, p as getProject } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { f as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { B as parseDeviceSlotKey, H as projectDeviceSlots, T as setSupervisor, o as clearSupervisor, p as getProject } from "./config-DC5jEtd1.mjs";
|
|
3
|
+
import { C as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
|
|
4
|
+
import { D as readPidFile, T as clearWorkspaceSupervisor, b as MODE_EXPO, j as writePidFile, p as detectIsExpo, u as nativeProjectIntegration, x as clearExpoMetroTunnel, y as MODE_BARE } from "./project-B5eQ1USs.mjs";
|
|
5
|
+
import { n as parseTriggerCount, o as runWatchman, r as parseWatchRoots, t as parseSubscriberNames } from "./watchman-BL1IdOtq.mjs";
|
|
6
|
+
import { E as workspaceBuildInProgress, f as describeDevServerStop, h as devServerStopRecord, m as devServerStopLevel, y as vanishedSupervisorMessage } from "./budget-Dz-kyXLv.mjs";
|
|
7
|
+
import { f as withIdleWorkspace } from "./workspaces-Djb2gfi9.mjs";
|
|
8
|
+
import { m as workspaceDeviceLastUseAt, r as createActivityReader } from "./activity-BSw0x84R.mjs";
|
|
9
|
+
import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-Cu7PtQpZ.mjs";
|
|
10
|
+
import { z as ownedAvdSerialResolver } from "./android-BdQC6zs1.mjs";
|
|
11
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-B4iWH4E-.mjs";
|
|
11
12
|
import { s as describeError } from "./metro-store-BAHFcJm6.mjs";
|
|
12
13
|
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
13
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-
|
|
14
|
-
import { l as probeHostedSession } from "./hosted-client-
|
|
15
|
-
import { t as clearHostedMetro } from "./metro-gateway-
|
|
16
|
-
import { t as relaunchWithLogFile } from "./detached-entry-
|
|
17
|
-
import { n as nativeProjectIntegration } from "./projects-DD7dBTCj.mjs";
|
|
14
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DYiMBn34.mjs";
|
|
15
|
+
import { l as probeHostedSession } from "./hosted-client-C5G4h_OJ.mjs";
|
|
16
|
+
import { t as clearHostedMetro } from "./metro-gateway-BxpJLIwh.mjs";
|
|
17
|
+
import { t as relaunchWithLogFile } from "./detached-entry-pB_IPfV4.mjs";
|
|
18
18
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
19
19
|
import { dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
20
20
|
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";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as shortUdid, l as phaseLine } from "./command-output-
|
|
2
|
-
import { x as workspaceLogsDir } from "./workspace-state-
|
|
3
|
-
import { A as parseIosSimulatorApp } from "./ios-
|
|
4
|
-
import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { h as shortUdid, l as phaseLine } from "./command-output-Bt8ygHE7.mjs";
|
|
2
|
+
import { x as workspaceLogsDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
3
|
+
import { A as parseIosSimulatorApp } from "./ios-BWbHFZVz.mjs";
|
|
4
|
+
import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-BoN1jQkO.mjs";
|
|
5
|
+
import { k as describeDiagnostic } from "./toolchain-C3xSoyUl.mjs";
|
|
6
|
+
import { t as IosDeviceMismatchError } from "./device-ios-B2ruohE-.mjs";
|
|
7
|
+
import { l as parseDeviceWait } from "./device-lease-run-D38SnZtt.mjs";
|
|
8
8
|
import { basename, join } from "node:path";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
function buildLogFile(root) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-
|
|
3
|
-
import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-
|
|
4
|
-
import { T as pickDevClientScheme } from "./app-install-
|
|
5
|
-
import { t as devClientScheme } from "./dev-client-
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
|
+
import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-BdQC6zs1.mjs";
|
|
3
|
+
import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-BoN1jQkO.mjs";
|
|
4
|
+
import { T as pickDevClientScheme } from "./app-install-CFI4ptUL.mjs";
|
|
5
|
+
import { t as devClientScheme } from "./dev-client-CDY_zAmD.mjs";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
7
7
|
import { relative } from "node:path";
|
|
8
8
|
//#region src/commands/android/support.ts
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
|
+
import { mt as repoRoot } from "./settings-CxgngUZk.mjs";
|
|
3
|
+
import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
|
|
4
|
+
import { i as macosToolchain } from "./toolchain-C3xSoyUl.mjs";
|
|
5
|
+
import { i as validateInfoPlist, n as setBundleName, r as stageBundle, t as resolveBundleExtras } from "./stage-BgaZJVZY.mjs";
|
|
6
|
+
import { t as logLines } from "./run-lAkle1-c.mjs";
|
|
7
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
8
|
+
import { join, relative, resolve } from "node:path";
|
|
9
|
+
//#region src/integrations/swiftpm-macos.ts
|
|
10
|
+
function swiftpmMacosProject(root) {
|
|
11
|
+
return { prepare(settings) {
|
|
12
|
+
const macos = settings.macos;
|
|
13
|
+
if (!macos?.product || !macos.infoPlist) throw Object.assign(/* @__PURE__ */ new Error("Set macos.product and macos.infoPlist explicitly in .stim.json. See stim guide macos."), { code: "STIM_BAD_ARG" });
|
|
14
|
+
const { product, infoPlist } = macos;
|
|
15
|
+
const { bundleId } = validateInfoPlist(root, product, infoPlist);
|
|
16
|
+
const repository = realpathSync(repoRoot(root) ?? root);
|
|
17
|
+
const extras = resolveBundleExtras(root, repository, macos.resources, macos.assetCatalog);
|
|
18
|
+
return {
|
|
19
|
+
product,
|
|
20
|
+
arguments: macos.arguments ?? [],
|
|
21
|
+
bundleId,
|
|
22
|
+
async compile({ scratch, writer, note }) {
|
|
23
|
+
await tool(root, [
|
|
24
|
+
"build",
|
|
25
|
+
"-c",
|
|
26
|
+
"debug",
|
|
27
|
+
"--product",
|
|
28
|
+
product,
|
|
29
|
+
"--scratch-path",
|
|
30
|
+
scratch,
|
|
31
|
+
"--jobs",
|
|
32
|
+
"2"
|
|
33
|
+
], writer, note);
|
|
34
|
+
return tool(root, [
|
|
35
|
+
"build",
|
|
36
|
+
"-c",
|
|
37
|
+
"debug",
|
|
38
|
+
"--scratch-path",
|
|
39
|
+
scratch,
|
|
40
|
+
"--show-bin-path"
|
|
41
|
+
], writer, () => {}, true);
|
|
42
|
+
},
|
|
43
|
+
stage: (bin, bundle, id, displayName) => stageBundle(root, product, infoPlist, bin, bundle, id, extras, displayName),
|
|
44
|
+
validateFetched(bundle, id, displayName) {
|
|
45
|
+
const executable = join(bundle, "Contents", "MacOS", product);
|
|
46
|
+
const plist = JSON.parse(getExecutor().runFile("plutil", [
|
|
47
|
+
"-convert",
|
|
48
|
+
"json",
|
|
49
|
+
"-o",
|
|
50
|
+
"-",
|
|
51
|
+
join(bundle, "Contents", "Info.plist")
|
|
52
|
+
]));
|
|
53
|
+
if (plist.CFBundleIdentifier !== id || plist.CFBundleExecutable !== product || !existsSync(executable)) throw new Error("The fetched macOS bundle does not match the requested identity and executable.");
|
|
54
|
+
for (const destination of [...Object.keys(extras.resources), ...extras.assetCatalog ? ["Assets.car"] : []]) if (!existsSync(join(bundle, "Contents", "Resources", destination))) throw new Error(`The fetched macOS bundle lacks declared resource ${destination}.`);
|
|
55
|
+
if (displayName !== void 0) {
|
|
56
|
+
setBundleName(join(bundle, "Contents", "Info.plist"), displayName);
|
|
57
|
+
getExecutor().runFile("codesign", [
|
|
58
|
+
"--force",
|
|
59
|
+
"--sign",
|
|
60
|
+
"-",
|
|
61
|
+
bundle
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
getExecutor().runFile("codesign", [
|
|
65
|
+
"--verify",
|
|
66
|
+
"--strict",
|
|
67
|
+
bundle
|
|
68
|
+
]);
|
|
69
|
+
},
|
|
70
|
+
offload: {
|
|
71
|
+
target: () => ({
|
|
72
|
+
platform: "macos",
|
|
73
|
+
local: macosToolchain()
|
|
74
|
+
}),
|
|
75
|
+
request: (id) => ({
|
|
76
|
+
platform: "macos",
|
|
77
|
+
product,
|
|
78
|
+
infoPlist: relative(root, resolve(root, infoPlist)),
|
|
79
|
+
bundleId: id,
|
|
80
|
+
resources: Object.fromEntries(Object.entries(extras.resources).map(([destination, source]) => [destination, relative(repository, source)])),
|
|
81
|
+
assetCatalog: extras.assetCatalog ? relative(repository, extras.assetCatalog) : null
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
} };
|
|
86
|
+
}
|
|
87
|
+
async function tool(root, args, writer, note, capture = false) {
|
|
88
|
+
const child = spawnDeclared(() => getExecutor().spawn("swift", args, {
|
|
89
|
+
cwd: root,
|
|
90
|
+
detached: true,
|
|
91
|
+
stdio: [
|
|
92
|
+
"ignore",
|
|
93
|
+
"pipe",
|
|
94
|
+
"pipe"
|
|
95
|
+
]
|
|
96
|
+
}));
|
|
97
|
+
let stdout = "";
|
|
98
|
+
child.stdout?.on("data", (chunk) => {
|
|
99
|
+
if (capture) stdout += chunk.toString("utf8");
|
|
100
|
+
});
|
|
101
|
+
const write = (msg) => {
|
|
102
|
+
writer.write({
|
|
103
|
+
src: "build",
|
|
104
|
+
platform: "macos",
|
|
105
|
+
level: "debug",
|
|
106
|
+
msg
|
|
107
|
+
});
|
|
108
|
+
note(msg);
|
|
109
|
+
};
|
|
110
|
+
if (child.stdout) logLines(child.stdout, write);
|
|
111
|
+
if (child.stderr) logLines(child.stderr, write);
|
|
112
|
+
await new Promise((done, reject) => {
|
|
113
|
+
child.once("error", reject);
|
|
114
|
+
child.once("close", (code) => code === 0 ? done() : reject(/* @__PURE__ */ new Error(`swift ${args[0]} failed (${code}). See stim logs --source build.`)));
|
|
115
|
+
});
|
|
116
|
+
return stdout.trim();
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { swiftpmMacosProject };
|