stim 1.18.0 → 1.20.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 +21 -4
- package/dist/{activity-BxnkDZDi.mjs → activity-BrGh9EAI.mjs} +3 -3
- package/dist/{agent-device-usage-output-CZ66YA4T.mjs → agent-device-usage-output-DVyv_hWj.mjs} +7 -7
- package/dist/android-0vv-OruW.mjs +6 -0
- package/dist/android-Brx6EKvJ.mjs +1258 -0
- package/dist/{android-DC3ZLuw0.mjs → android-BsYNR81W.mjs} +103 -45
- package/dist/{android-CBwCNicO.mjs → android-CK3fpEyZ.mjs} +2 -2
- package/dist/{android-cas-BBFyr9CA.mjs → android-cas-DCAuXryb.mjs} +9 -5
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api-run.mjs +159 -8
- package/dist/{api-D0VtFhqk.mjs → api-zuX3ynYN.mjs} +9 -7
- package/dist/api.d.mts +104 -4
- package/dist/api.mjs +1 -1
- package/dist/{app-install-D-PUENug.mjs → app-install-0LgaQRT7.mjs} +39 -18
- package/dist/artifact-CnC0mfov.mjs +807 -0
- package/dist/artifact-DClXJNWx.mjs +772 -0
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
- package/dist/{web-DTU0uiWj.mjs → browser-web-CzBmhmgs.mjs} +136 -174
- package/dist/{budget-DIhL2BKx.mjs → budget-BONq9vXY.mjs} +3096 -3244
- package/dist/build-BixRI6sB.mjs +462 -0
- package/dist/build-plan-CP0tckNU.mjs +553 -0
- package/dist/{cache-manifest-BI7ozfmH.mjs → cache-manifest-qA3dT2x2.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/ccache-CjHQ5F8g.mjs +142 -0
- package/dist/{chrome-DJnmnS5q.mjs → chrome-Dp2lMLBe.mjs} +1 -1
- package/dist/{cli-DNJMwADx.mjs → cli-B2R8wH1F.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-DzhapoMB.mjs → client-BLy1Pw2V.mjs} +172 -165
- package/dist/collector-run.d.mts +10 -0
- package/dist/collector-run.mjs +7 -7
- package/dist/{command-output-CBtzyIgF.mjs → command-output-BjPN99ZB.mjs} +2 -2
- package/dist/{config-CgYMahz7.mjs → config-D0LhTY3S.mjs} +13 -13
- package/dist/{created-devices-DKbeWsiK.mjs → created-devices-HU_DAb_Q.mjs} +7 -6
- package/dist/{dependency-state-xKoOypBm.mjs → dependency-state-B2m8eqsS.mjs} +2 -2
- package/dist/{detached-entry-BLfcgc4O.mjs → detached-entry-BXq4fIl-.mjs} +1 -1
- package/dist/{dev-client-CLnIH02x.mjs → dev-client-ClATaJoH.mjs} +2 -2
- package/dist/{device-D7oCHGWi.mjs → device-B7lsC0K1.mjs} +8 -8
- package/dist/device-DVCwAFlX.mjs +727 -0
- package/dist/{device-capacity-EUOOYr8T.mjs → device-capacity-Ca_ke1LE.mjs} +25 -15
- package/dist/device-host-worker.mjs +38 -18
- package/dist/{device-ios-6MewKKnc.mjs → device-ios-CRUqPxKw.mjs} +12 -11
- package/dist/{device-lease-Co-EwifR.mjs → device-lease-DHOBXGgS.mjs} +135 -22
- package/dist/{device-lease-run-w1xhCqIW.mjs → device-lease-run-CvDeHTkG.mjs} +4 -4
- package/dist/{device-pool-F5WvRPtD.mjs → device-pool-L2-5GxMy.mjs} +3 -3
- package/dist/{device-remote-tHbd1fKy.mjs → device-remote-Bmg42063.mjs} +17 -69
- package/dist/doctor-C2MSuMMg.mjs +515 -0
- package/dist/{doctor-B9ckYUoU.mjs → doctor-DPAqhVCK.mjs} +334 -721
- package/dist/doctor-watchman-CB4NnVZm.mjs +260 -0
- package/dist/{simslim-EHBQ2R4G.mjs → eas-build-Dw_ec2Km.mjs} +6 -152
- package/dist/{stim-installations-aR_WsNOA.mjs → eas-session-ledger-DZlC-Fq3.mjs} +57 -4
- package/dist/{error-diagnostics-BRXOqDzG.mjs → error-diagnostics-Du7I_GuY.mjs} +17 -12
- package/dist/errors-DzkMYh8Q.mjs +205 -0
- package/dist/{exec-DWhCZDGm.mjs → exec-B81Qodjn.mjs} +69 -15
- package/dist/{gc-Dh6mXOKC.mjs → gc-PWp34zGb.mjs} +23 -22
- package/dist/{gradle-C6GKnunQ.mjs → gradle-C2OEKCCI.mjs} +50 -125
- package/dist/{guide-tm6igAaa.mjs → guide-Dai9lphv.mjs} +862 -538
- package/dist/{hosted-android-Bv285t_t.mjs → hosted-android-DQ-Agsd8.mjs} +5 -5
- package/dist/{hosted-client-C-rMtppF.mjs → hosted-client-Io01s5By.mjs} +9 -3
- package/dist/{hosted-ios-D5mNmtj4.mjs → hosted-ios-DIxFnYp-.mjs} +3 -3
- package/dist/{hosted-logs-DN8Iz4mJ.mjs → hosted-logs-DP-ABU_M.mjs} +8 -8
- package/dist/{hosted-macos-B-wEjlwG.mjs → hosted-macos-Aziw9T_9.mjs} +7 -6
- package/dist/{hosted-native-DeeOG8xZ.mjs → hosted-native-BdAQi21M.mjs} +23 -16
- package/dist/{idle-shutdown-jjtxAn5C.mjs → idle-shutdown-DdMqoSUB.mjs} +7 -7
- package/dist/ios-BZ9dg2Fr.mjs +9 -0
- package/dist/{ios-B3SbOWdw.mjs → ios-CXLIUxXJ.mjs} +180 -24
- package/dist/ios-CZuv6gRv.mjs +1112 -0
- package/dist/{ios-Bvbf0SGY.mjs → ios-VGvNdsv2.mjs} +1 -1
- package/dist/{ios-device-Bn7jWDB1.mjs → ios-device-B1B14xND.mjs} +1 -1
- package/dist/{ios-device-vOaByMhw.mjs → ios-device-BreZOpM0.mjs} +3 -3
- package/dist/ios-project-B9drt_aY.mjs +197 -0
- package/dist/{ios-state-B2pES6Vs.mjs → ios-state-CjrL2qv-.mjs} +1 -1
- package/dist/js-swap-C8icNYIY.mjs +432 -0
- package/dist/launch-DxH0THLP.mjs +745 -0
- package/dist/launch-YrbqaIFj.mjs +1530 -0
- package/dist/{launch-verify-hskNcWkZ.mjs → launch-verify-BzRdbuO1.mjs} +26 -7
- package/dist/{logs-1Ylc1Ri6.mjs → logs-DHaRNfg7.mjs} +11 -11
- package/dist/macos-C0iljhsN.mjs +2 -0
- package/dist/{macos-DF6C7wUU.mjs → macos-V_3Ui7g4.mjs} +125 -155
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -10
- package/dist/{metro-Dh8T4Ytd.mjs → metro-D_j9sN-B.mjs} +209 -43
- package/dist/{metro-gateway-CEUw9RMH.mjs → metro-gateway-BBJldOdi.mjs} +2 -2
- package/dist/miss-reason-BPAzZS0r.mjs +238 -0
- package/dist/{named-ports-BFIz1Shz.mjs → named-ports-C2lvoPsb.mjs} +12 -5
- package/dist/native-android-lHzaew7r.mjs +226 -0
- package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
- package/dist/{native-runtime-D_603JiC.mjs → native-runtime-BRmWL7ru.mjs} +9 -8
- package/dist/native-xcode-inputs-eutS19jU.mjs +307 -0
- package/dist/native-xcode-ios-DP3cHLwu.mjs +434 -0
- package/dist/{ndjson-LGZAMsqa.mjs → ndjson-GOnbyvso.mjs} +6 -6
- package/dist/offload-worker.d.mts +12 -6
- package/dist/offload-worker.mjs +409 -73
- package/dist/{ownership-D6Se7gg_.mjs → ownership-DXzMMSx6.mjs} +2 -2
- package/dist/{placement-log-BcPhRwR4.mjs → placement-log-reFbjqEr.mjs} +7 -3
- package/dist/plan-BDk2AeY_.mjs +260 -0
- package/dist/plan-placement-D_YYlE6N.mjs +73 -0
- package/dist/{ports-BLTtfBq-.mjs → ports-jzvAJXXL.mjs} +3 -3
- package/dist/{prebuild-juCyreaR.mjs → prebuild-Bw44QxVh.mjs} +4 -4
- package/dist/{preview-D5V07Nrl.mjs → preview-BaBJ72Al.mjs} +51 -34
- package/dist/project-B8_duAzW.mjs +1067 -0
- package/dist/project-plan-BPwbLwQu.mjs +10 -0
- package/dist/{pull-request-u4vp7zmK.mjs → pull-request-vOhLNmIb.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-android-chm1DMlA.mjs +921 -0
- package/dist/react-native-build-oAw6gQeW.mjs +239 -0
- package/dist/react-native-doctor-DYXoh-6I.mjs +78 -0
- package/dist/react-native-ios-SCTK_CT5.mjs +595 -0
- package/dist/{recordings-BAWltsVt.mjs → recordings-Bk-VivUV.mjs} +1 -1
- package/dist/{reload-DvyWzVjJ.mjs → reload-D34GkY78.mjs} +17 -14
- package/dist/remote-BU9UyhCJ.mjs +192 -0
- package/dist/{remote-cache-BGg7aGIZ.mjs → remote-cache-Bsts6f6Y.mjs} +5 -5
- package/dist/result-BDoRk1k3.mjs +186 -0
- package/dist/{run-vhtDgpHO.mjs → run-qvff78hv.mjs} +3 -3
- package/dist/{server-bare-B9E7S1aR.mjs → server-bare-dWjAarki.mjs} +6 -6
- package/dist/server-command-7XIKlWtO.mjs +69 -0
- package/dist/{server-expo-DoBHhuzK.mjs → server-expo-CsYu2aKL.mjs} +107 -82
- package/dist/server-expo-DV43vep4.mjs +2 -0
- package/dist/settings-Bbztm4oV.mjs +1503 -0
- package/dist/{settings-Byp2AQ_E.mjs → settings-CT3E71-i.mjs} +6 -7
- package/dist/{state-lKh8shBp.d.mts → settings-vk3mJGSm.d.mts} +4 -2
- package/dist/settings.schema.json +156 -6
- package/dist/simslim-ChMfe8rg.mjs +149 -0
- package/dist/{slot-launch-C1nqh4mu.mjs → slot-launch-B9hn96wd.mjs} +6 -6
- package/dist/{stage-g_WqWeaE.mjs → stage-BNKKdDNc.mjs} +6 -3
- package/dist/start-CbQCSnXQ.mjs +2 -0
- package/dist/{start-D-IeOyoK.mjs → start-CdvcTaXr.mjs} +113 -77
- package/dist/{state-xnqpx3AD.mjs → state-Boo0IMJq.mjs} +4 -2
- package/dist/{state-BG-aAk4k.mjs → state-DI84A-uu.mjs} +29 -10
- package/dist/{stats-DY6ekz8F.mjs → stats-BIIDrjA8.mjs} +6 -6
- package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
- package/dist/{status-DCjZeE-K.mjs → status-DARMkc9q.mjs} +80 -294
- package/dist/status-watch-DvmI3SmN.mjs +296 -0
- package/dist/{stim-desktop-Behws_fi.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
- package/dist/{stop-DIJtD2GL.mjs → stop-CCZS-C9m.mjs} +2 -2
- package/dist/stop-WQPQHLuy.mjs +72 -0
- package/dist/{stop-BTjs3xbc.mjs → stop-iNemHsJC.mjs} +81 -33
- package/dist/supervisor-run.d.mts +7 -2
- package/dist/supervisor-run.mjs +32 -20
- package/dist/{support-Bwvbrq5-.mjs → support-CnE_SIjt.mjs} +17 -7
- package/dist/{support-BaayeYCf.mjs → support-DCco5fut.mjs} +61 -8
- package/dist/swiftpm-macos-afeNUExW.mjs +119 -0
- package/dist/{native-run-B06FkmZx.mjs → tailnet-CoJUb2tB.mjs} +113 -6
- package/dist/toolchain-BIupIro1.mjs +2 -0
- package/dist/{toolchain-Bnyd_K3A.mjs → toolchain-DqyDXs30.mjs} +225 -315
- package/dist/{trigger-CJMhwXe8.mjs → trigger-C0MWBi8O.mjs} +3 -3
- package/dist/trigger-SHLOWJ4O.mjs +2 -0
- package/dist/{warm-progress-CjB-MP6H.mjs → warm-progress-C3ASD6z5.mjs} +134 -37
- package/dist/{status-Dcr0Qexd.mjs → watchman-CQl51YZu.mjs} +75 -7
- package/dist/web-B3eldHFH.mjs +123 -0
- package/dist/web-BLXpOe6b.mjs +2 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-C59dqG-Z.mjs → workspace-state-CSIFuuDa.mjs} +33 -33
- package/dist/{workspaces-xXItD8Dj.mjs → workspaces-D2xSHBDY.mjs} +1297 -1211
- package/dist/{worktree-BSYlofkq.mjs → worktree-BxDqaTev.mjs} +102 -63
- package/dist/worktree-q7_OZNY0.mjs +2 -0
- package/package.json +8 -6
- package/shim/bundle-response.cjs +2 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +1 -1
- package/shim/native-android.gradle +101 -0
- package/dist/android-BKA16DTf.mjs +0 -4
- package/dist/android-BvwuMUJ9.mjs +0 -3572
- package/dist/guide-status-Bhf9SJXc.mjs +0 -125
- package/dist/ios-CPdkoKaa.mjs +0 -3953
- package/dist/ios-DNpdygiv.mjs +0 -7
- package/dist/macos-Ck7OBMNY.mjs +0 -2
- package/dist/metro-store-BAHFcJm6.mjs +0 -106
- package/dist/plan-placement-CtxkCO54.mjs +0 -1859
- package/dist/project-C3ChRLZy.mjs +0 -212
- package/dist/projects-DD7dBTCj.mjs +0 -92
- package/dist/server-expo-Db9HBUoa.mjs +0 -2
- package/dist/settings-CQyMElEP.mjs +0 -701
- package/dist/start-NTc1Ifqs.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-BJfnU6r5.mjs +0 -2
- package/dist/worktree-CsKYexJM.mjs +0 -753
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { G as resolveIosProjectDir, H as remoteIosSetting, L as publicUrlSetting, Q as settingShapeErrors, V as remoteEasFallbackSetting, a as SETTING_SHAPE_REMEDY, p as cacheProviderSettingError, tt as tunnelModeSetting } from "./settings-Bbztm4oV.mjs";
|
|
2
|
+
import { E as fingerprintDiffRecord, L as untrackedMissLine, M as refingerprintAfterMutation, O as inputsChangedDuringBuild, S as configInputsChanged, T as filesystemBuildCapability, b as buildCacheKey, x as changedDuringBuildLine } from "./device-lease-DHOBXGgS.mjs";
|
|
3
|
+
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BjPN99ZB.mjs";
|
|
4
|
+
import { It as statsProjectKey } from "./budget-BONq9vXY.mjs";
|
|
5
|
+
import { d as optimizationBuildProfile, l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DzkMYh8Q.mjs";
|
|
6
|
+
import { n as fingerprintErrorMissReason, t as explainBuildMiss } from "./miss-reason-BPAzZS0r.mjs";
|
|
7
|
+
import { I as bundlerPin, r as iosToolchain } from "./toolchain-DqyDXs30.mjs";
|
|
8
|
+
import { r as planPayload, t as planCachedBuild } from "./build-plan-CP0tckNU.mjs";
|
|
9
|
+
import { i as planEasDevelopmentBuild, n as easDeviceBuildRemedy } from "./eas-build-Dw_ec2Km.mjs";
|
|
10
|
+
import { i as staleNativeDirRefusal, n as recordPrebuild } from "./prebuild-Bw44QxVh.mjs";
|
|
11
|
+
import { a as deviceModelRefusal, c as iosProjectPathError, f as podAction, h as resolveDeviceType, l as iosProviderRunOptions, m as resolveConfiguration, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-DCco5fut.mjs";
|
|
12
|
+
import { t as IosRecipeRefusal } from "./ios-project-B9drt_aY.mjs";
|
|
13
|
+
import { i as hostedIosSelectors } from "./remote-BU9UyhCJ.mjs";
|
|
14
|
+
import { c as copyAppAside, i as DEFAULT_DEPS, n as iosMetroRuntime, r as iosProcessRuntime, u as writeIpTxt } from "./launch-YrbqaIFj.mjs";
|
|
15
|
+
import { t as planHostedDevice } from "./plan-placement-D_YYlE6N.mjs";
|
|
16
|
+
import { rmSync } from "node:fs";
|
|
17
|
+
import chalk from "chalk";
|
|
18
|
+
//#region src/integrations/react-native-ios-plan.ts
|
|
19
|
+
function note(line) {
|
|
20
|
+
console.error(line);
|
|
21
|
+
}
|
|
22
|
+
function refuse(refusal, lines = []) {
|
|
23
|
+
return {
|
|
24
|
+
refusal,
|
|
25
|
+
lines
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
async function planReactNativeIos(root, opts, d, schemeProblem, { context: settingsContext, settings }) {
|
|
29
|
+
const iosProject = resolveIosProjectDir(settings, root);
|
|
30
|
+
const [shapeError, ...moreShapeErrors] = settingShapeErrors(settings);
|
|
31
|
+
if (shapeError) return refuse({
|
|
32
|
+
code: "STIM_BAD_ARG",
|
|
33
|
+
message: shapeError,
|
|
34
|
+
remedy: SETTING_SHAPE_REMEDY
|
|
35
|
+
}, moreShapeErrors);
|
|
36
|
+
const projectPathError = iosProjectPathError(settings, root, () => d.detectIsExpo(root));
|
|
37
|
+
if (projectPathError) return refuse({
|
|
38
|
+
code: "STIM_BAD_ARG",
|
|
39
|
+
message: projectPathError,
|
|
40
|
+
remedy: SETTING_SHAPE_REMEDY
|
|
41
|
+
});
|
|
42
|
+
let optimizations;
|
|
43
|
+
try {
|
|
44
|
+
optimizations = resolveOptimizations(settings);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
return refuse({
|
|
47
|
+
code: "STIM_BAD_ARG",
|
|
48
|
+
message: error.message,
|
|
49
|
+
remedy: SETTING_SHAPE_REMEDY
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const cacheProviderError = cacheProviderSettingError(settings);
|
|
53
|
+
if (cacheProviderError) note(chalk.yellow(phaseLine("cache", `${cacheProviderError} Using the local cache.`)));
|
|
54
|
+
const slot = opts.slot ?? "default";
|
|
55
|
+
const target = {
|
|
56
|
+
platform: "ios",
|
|
57
|
+
slot,
|
|
58
|
+
root,
|
|
59
|
+
projectKey: statsProjectKey({
|
|
60
|
+
root,
|
|
61
|
+
commonDir: settingsContext.gitCommonDir,
|
|
62
|
+
repoRoot: settingsContext.repoRoot
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
const isExpo = d.detectIsExpo(root);
|
|
66
|
+
const settingsLayersForOrigin = d.settingsLayers(settingsContext);
|
|
67
|
+
const iosRemote = remoteIosSetting(settings);
|
|
68
|
+
const modelRefusal = deviceModelRefusal({
|
|
69
|
+
slot,
|
|
70
|
+
deviceTypeFlag: opts.deviceType,
|
|
71
|
+
runtimeFlag: opts.runtime,
|
|
72
|
+
deviceType: resolveDeviceType(opts.deviceType, settings),
|
|
73
|
+
runtime: resolveRuntime(opts.runtime, settings),
|
|
74
|
+
deviceTypeOrigin: d.settingOriginScope(settingsLayersForOrigin, "ios.deviceType"),
|
|
75
|
+
runtimeOrigin: d.settingOriginScope(settingsLayersForOrigin, "ios.runtime"),
|
|
76
|
+
physical: false,
|
|
77
|
+
remoteBackend: iosRemote?.kind === "backend" ? iosRemote.backend : null,
|
|
78
|
+
hosted: iosRemote?.kind === "machine",
|
|
79
|
+
listRuntimes: d.listIosRuntimes
|
|
80
|
+
});
|
|
81
|
+
if (modelRefusal) return refuse(modelRefusal);
|
|
82
|
+
if (opts.easProfile !== void 0) {
|
|
83
|
+
const eas = await planEasDevelopmentBuild({
|
|
84
|
+
root,
|
|
85
|
+
platform: "ios",
|
|
86
|
+
profile: opts.easProfile,
|
|
87
|
+
note,
|
|
88
|
+
isExpo,
|
|
89
|
+
selectors: [opts.scheme, opts.configuration],
|
|
90
|
+
buildCache: opts.buildCache
|
|
91
|
+
});
|
|
92
|
+
if (!eas.ok) return refuse(eas);
|
|
93
|
+
return planPayload(target, {
|
|
94
|
+
fingerprint: eas.fingerprint,
|
|
95
|
+
cacheKey: eas.cacheKey,
|
|
96
|
+
cacheHit: eas.buildId ? "remote" : false,
|
|
97
|
+
provider: "eas",
|
|
98
|
+
cacheSkipped: false,
|
|
99
|
+
prebuild: null,
|
|
100
|
+
refusal: eas.missing
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (iosRemote?.kind === "backend") return refuse({
|
|
104
|
+
code: "STIM_BAD_ARG",
|
|
105
|
+
message: `ios.remote is ${iosRemote.backend}, whose simulator architecture --plan cannot read without a session.`,
|
|
106
|
+
remedy: "Run `stim ios` to build for the remote device, or unset ios.remote to plan the owned simulator."
|
|
107
|
+
});
|
|
108
|
+
const scheme = resolveSchemeSelection(opts, settings);
|
|
109
|
+
const refusal = schemeProblem(scheme);
|
|
110
|
+
if (refusal) return refuse({
|
|
111
|
+
code: refusal.code,
|
|
112
|
+
message: refusal.message ?? "",
|
|
113
|
+
remedy: refusal.remedy ?? ""
|
|
114
|
+
});
|
|
115
|
+
const configuration = resolveConfiguration(opts.configuration, settings);
|
|
116
|
+
const buildProfile = optimizationBuildProfile("ios", optimizations);
|
|
117
|
+
const cachePolicy = artifactCachePolicy(optimizations, opts.buildCache !== false, isReleaseConfiguration(configuration));
|
|
118
|
+
let fingerprint;
|
|
119
|
+
try {
|
|
120
|
+
fingerprint = await d.fingerprintProject(root, {
|
|
121
|
+
platform: "ios",
|
|
122
|
+
iosProjectPath: iosProject.relative
|
|
123
|
+
});
|
|
124
|
+
} catch (error) {
|
|
125
|
+
note(chalk.dim(`Fingerprinting failed: ${error?.message || error}`));
|
|
126
|
+
}
|
|
127
|
+
if (!fingerprint?.hash) return refuse({
|
|
128
|
+
code: "STIM_NO_FINGERPRINT",
|
|
129
|
+
message: `Could not fingerprint ${root}: @expo/fingerprint produced no hash for it.`,
|
|
130
|
+
remedy: "Check the project native inputs and the @expo/fingerprint error above, then retry."
|
|
131
|
+
});
|
|
132
|
+
const keyArch = (remoteArch) => simulatorBuildArch({
|
|
133
|
+
physical: false,
|
|
134
|
+
remoteArch,
|
|
135
|
+
hostArch: d.hostSimulatorArch(),
|
|
136
|
+
configuration
|
|
137
|
+
});
|
|
138
|
+
let arch = keyArch(null);
|
|
139
|
+
let placement;
|
|
140
|
+
if (iosRemote?.kind === "machine") {
|
|
141
|
+
const planned = await planHostedDevice({
|
|
142
|
+
root,
|
|
143
|
+
slot,
|
|
144
|
+
platform: "ios",
|
|
145
|
+
machine: iosRemote.machine,
|
|
146
|
+
selectors: hostedIosSelectors(resolveDeviceType(opts.deviceType, settings), resolveRuntime(opts.runtime, settings)),
|
|
147
|
+
sameKey: (choice) => keyArch("runtime" in choice ? choice.architecture : null) === arch,
|
|
148
|
+
...remoteEasFallbackSetting(settings) ? { eas: () => d.checkEasFallback({
|
|
149
|
+
root,
|
|
150
|
+
platform: "ios",
|
|
151
|
+
slot,
|
|
152
|
+
release: isReleaseConfiguration(configuration),
|
|
153
|
+
isExpo,
|
|
154
|
+
tunnelMode: tunnelModeSetting(settings),
|
|
155
|
+
publicUrl: publicUrlSetting(settings),
|
|
156
|
+
deviceTypeFlag: opts.deviceType,
|
|
157
|
+
localOnlyFlags: typeof opts.runtime === "string" ? ["--runtime"] : []
|
|
158
|
+
}) } : {}
|
|
159
|
+
});
|
|
160
|
+
if (planned.kind === "unknown") return refuse({
|
|
161
|
+
code: "STIM_BAD_ARG",
|
|
162
|
+
message: `ios.remote is ${iosRemote.machine}, and its simulator architecture is unknown here: ${planned.reason}.`,
|
|
163
|
+
remedy: "Run `stim ios` to build for the remote device, or unset ios.remote to plan the owned simulator."
|
|
164
|
+
});
|
|
165
|
+
placement = planned.placement;
|
|
166
|
+
if (planned.kind === "hosted" && "runtime" in planned.choice) arch = keyArch(planned.choice.architecture);
|
|
167
|
+
}
|
|
168
|
+
const cacheKey = buildCacheKey("ios", fingerprint.hash, {
|
|
169
|
+
scheme,
|
|
170
|
+
...configuration ? { configuration } : {},
|
|
171
|
+
isSimulator: true,
|
|
172
|
+
...arch ? { arch } : {},
|
|
173
|
+
...buildProfile ? { buildProfile } : {}
|
|
174
|
+
});
|
|
175
|
+
const plan = await planCachedBuild({
|
|
176
|
+
...target,
|
|
177
|
+
isExpo,
|
|
178
|
+
fingerprint: fingerprint.hash,
|
|
179
|
+
sources: fingerprint.sources ?? [],
|
|
180
|
+
cacheKey,
|
|
181
|
+
cachePolicy,
|
|
182
|
+
providerConfig: d.resolveCacheProviderConfig(settingsContext),
|
|
183
|
+
expoRemote: cachePolicy.remote && !buildProfile && !scheme ? { runOptions: iosProviderRunOptions(configuration, arch) } : null
|
|
184
|
+
}, {
|
|
185
|
+
loadCacheProvider: d.loadCacheProvider,
|
|
186
|
+
loadProjectProvider: d.loadProjectProvider,
|
|
187
|
+
checkEasAuth: d.checkEasAuth,
|
|
188
|
+
resolveRemote: d.resolveRemote,
|
|
189
|
+
planPrebuild: d.planPrebuild,
|
|
190
|
+
note
|
|
191
|
+
});
|
|
192
|
+
return placement ? {
|
|
193
|
+
...plan,
|
|
194
|
+
placement
|
|
195
|
+
} : plan;
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/integrations/react-native-ios.ts
|
|
199
|
+
const PLATFORM = "ios";
|
|
200
|
+
function reactNativeIosSchemeProblem(root, iosDir, scheme, isExpo, d) {
|
|
201
|
+
if (scheme === void 0) return null;
|
|
202
|
+
if (!scheme.trim()) return {
|
|
203
|
+
code: "STIM_BAD_ARG",
|
|
204
|
+
message: "--scheme must name a non-empty shared Xcode app scheme.",
|
|
205
|
+
remedy: "Pass the exact scheme name shown by xcodebuild -list."
|
|
206
|
+
};
|
|
207
|
+
if (isExpo) return null;
|
|
208
|
+
const project = d.discoverXcodeProject(root, iosDir);
|
|
209
|
+
if (project.error) return project.error;
|
|
210
|
+
return d.resolveScheme(project, { scheme }).error ?? null;
|
|
211
|
+
}
|
|
212
|
+
const runtimeKind = (configuration) => isReleaseConfiguration(configuration) ? "embedded-js" : "metro";
|
|
213
|
+
function reactNativeIosProject(root, settings, dependencies = {}) {
|
|
214
|
+
const d = {
|
|
215
|
+
...DEFAULT_DEPS,
|
|
216
|
+
...dependencies
|
|
217
|
+
};
|
|
218
|
+
const isExpo = d.detectIsExpo(root);
|
|
219
|
+
const iosProject = resolveIosProjectDir(settings, root);
|
|
220
|
+
return {
|
|
221
|
+
plan: (options, resolved) => planReactNativeIos(root, options, {
|
|
222
|
+
...DEFAULT_DEPS,
|
|
223
|
+
...dependencies
|
|
224
|
+
}, (scheme) => reactNativeIosSchemeProblem(root, iosProject.dir, scheme, isExpo, d), resolved),
|
|
225
|
+
isExpo,
|
|
226
|
+
bundleId: () => d.detectBundleId(root, iosProject.dir),
|
|
227
|
+
schemeProblem: (scheme) => reactNativeIosSchemeProblem(root, iosProject.dir, scheme, isExpo, d),
|
|
228
|
+
targets: [
|
|
229
|
+
"simulator",
|
|
230
|
+
"physical",
|
|
231
|
+
"remote",
|
|
232
|
+
"hosted"
|
|
233
|
+
],
|
|
234
|
+
eas: true,
|
|
235
|
+
runtimeKind,
|
|
236
|
+
runtime: ({ configuration, prepareMetro, prepareEmbedded }) => runtimeKind(configuration) === "embedded-js" ? iosProcessRuntime(prepareEmbedded, "embedded-js") : iosMetroRuntime(prepareMetro),
|
|
237
|
+
artifact: (context) => reactNativeIosArtifact(context, isExpo, iosProject, d)
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function fail(failure) {
|
|
241
|
+
throw new IosRecipeRefusal(failure);
|
|
242
|
+
}
|
|
243
|
+
function reactNativeIosArtifact({ root, logFile, configuration, buildScheme, buildProfile, target, device, easProfile, optimizations, cache: cachePolicy, phase, note, logWriter, estimates, step, setPodsMs }, isExpo, iosProject, d) {
|
|
244
|
+
const physical = device !== null;
|
|
245
|
+
const { udid } = target;
|
|
246
|
+
const release = isReleaseConfiguration(configuration);
|
|
247
|
+
const keyOptions = {
|
|
248
|
+
scheme: buildScheme,
|
|
249
|
+
...configuration ? { configuration } : {},
|
|
250
|
+
isSimulator: !physical,
|
|
251
|
+
...target.keyArch ? { arch: target.keyArch } : {},
|
|
252
|
+
...buildProfile ? { buildProfile } : {}
|
|
253
|
+
};
|
|
254
|
+
let fingerprint = "";
|
|
255
|
+
let fingerprintSources = [];
|
|
256
|
+
let storeHash = null;
|
|
257
|
+
let storeSources = [];
|
|
258
|
+
let mutatingSteps = [];
|
|
259
|
+
const identity = () => storeHash ? {
|
|
260
|
+
hash: storeHash,
|
|
261
|
+
key: buildCacheKey(PLATFORM, storeHash, keyOptions)
|
|
262
|
+
} : null;
|
|
263
|
+
const materialize = async (artifactPath, { fresh: isFresh, ownTemporary }) => {
|
|
264
|
+
const lanAddress = device?.lanAddress ?? null;
|
|
265
|
+
const metroPort = device?.metroPort ?? null;
|
|
266
|
+
const prepareDeviceApp = async (path, physicalDevice, { fresh }) => {
|
|
267
|
+
const refuse = (code, reason, remedy) => {
|
|
268
|
+
if (fresh) fail({
|
|
269
|
+
code,
|
|
270
|
+
message: reason,
|
|
271
|
+
remedy,
|
|
272
|
+
build: { appPath: path }
|
|
273
|
+
});
|
|
274
|
+
note(chalk.yellow(phaseLine("cache", `${reason} -- building fresh instead`)));
|
|
275
|
+
note(chalk.dim(phaseLine("", remedy)));
|
|
276
|
+
return null;
|
|
277
|
+
};
|
|
278
|
+
const gateProfile = () => {
|
|
279
|
+
const gate = d.gateProfileForDevice({
|
|
280
|
+
appPath: path,
|
|
281
|
+
udid: physicalDevice.udid,
|
|
282
|
+
configuration
|
|
283
|
+
});
|
|
284
|
+
return gate.ok ? path : refuse(gate.code, gate.reason, gate.remedy);
|
|
285
|
+
};
|
|
286
|
+
if (release) {
|
|
287
|
+
if (!fresh) {
|
|
288
|
+
note(chalk.yellow(phaseLine("cache", `a cached ${configuration} device app carries its builder's JS, and the device JS swap lands with phase 6 of appandflow/stim#178 -- building fresh instead, which bakes in this workspace's JS`)));
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
return gateProfile();
|
|
292
|
+
}
|
|
293
|
+
if (d.devClientScheme(root, path)) return gateProfile();
|
|
294
|
+
let copy;
|
|
295
|
+
try {
|
|
296
|
+
copy = copyAppAside(path);
|
|
297
|
+
} catch (e) {
|
|
298
|
+
return refuse("STIM_INSTALL_FAILED", `Could not copy ${path} aside to write its ip.txt: ${e?.message || e}`, "Free space in the temporary directory and run the command again.");
|
|
299
|
+
}
|
|
300
|
+
ownTemporary(copy.tmpDir);
|
|
301
|
+
writeIpTxt(copy.appPath, lanAddress, metroPort);
|
|
302
|
+
const sealed = d.sealAppForDevice({
|
|
303
|
+
appPath: copy.appPath,
|
|
304
|
+
udid: physicalDevice.udid,
|
|
305
|
+
configuration,
|
|
306
|
+
pinnedName: physicalDevice.signingName ?? null,
|
|
307
|
+
pinnedSha1: physicalDevice.signingSha1 ?? null
|
|
308
|
+
});
|
|
309
|
+
if (!sealed.ok) {
|
|
310
|
+
try {
|
|
311
|
+
rmSync(copy.tmpDir, {
|
|
312
|
+
recursive: true,
|
|
313
|
+
force: true
|
|
314
|
+
});
|
|
315
|
+
} catch {}
|
|
316
|
+
for (const line of sealed.lastLines ?? []) note(chalk.dim(phaseLine("", line)));
|
|
317
|
+
return refuse(sealed.code, sealed.reason, sealed.remedy);
|
|
318
|
+
}
|
|
319
|
+
phase("ip.txt", `${lanAddress}:${metroPort} written into the install copy and re-sealed with "${sealed.identity.name}"${sealed.mode === "preserve-metadata" ? "" : ` (${sealed.mode})`}`);
|
|
320
|
+
return copy.appPath;
|
|
321
|
+
};
|
|
322
|
+
const installableCachedApp = async (cachedPath) => {
|
|
323
|
+
if (device) return prepareDeviceApp(cachedPath, device, { fresh: false });
|
|
324
|
+
if (!release) return cachedPath;
|
|
325
|
+
phase("swap", `regenerating this workspace's JS for the cached ${configuration} app`);
|
|
326
|
+
const swap = await d.swapJsBundle({
|
|
327
|
+
root,
|
|
328
|
+
iosDir: iosProject.dir,
|
|
329
|
+
isExpo,
|
|
330
|
+
cachedAppPath: cachedPath,
|
|
331
|
+
logWriter: logWriter()
|
|
332
|
+
});
|
|
333
|
+
if (swap?.ok && swap.appPath) {
|
|
334
|
+
if (swap.note) note(chalk.yellow(phaseLine("swap", swap.note)));
|
|
335
|
+
if (swap.tmpDir) ownTemporary(swap.tmpDir);
|
|
336
|
+
phase("swap", `${swap.hermes ? "hermes bytecode" : "plain JS"} + assets replaced, re-signed (${formatDuration(swap.durationMs ?? 0)})`);
|
|
337
|
+
return swap.appPath;
|
|
338
|
+
}
|
|
339
|
+
note(chalk.yellow(phaseLine("swap", `failed at ${swap?.step || "unknown step"}: ${swap?.reason || "unknown reason"} -- building fresh instead (a cached ${configuration} app carries its builder's JS; it is never installed after a failed swap)`)));
|
|
340
|
+
for (const line of swap?.lastLines ?? []) note(chalk.dim(phaseLine("", line)));
|
|
341
|
+
return null;
|
|
342
|
+
};
|
|
343
|
+
if (isFresh) return device ? prepareDeviceApp(artifactPath, device, { fresh: true }) : artifactPath;
|
|
344
|
+
return installableCachedApp(artifactPath);
|
|
345
|
+
};
|
|
346
|
+
return {
|
|
347
|
+
async identity() {
|
|
348
|
+
let computedFingerprint;
|
|
349
|
+
let fingerprintError = "no hash";
|
|
350
|
+
try {
|
|
351
|
+
const computed = await d.fingerprintProject(root, {
|
|
352
|
+
platform: PLATFORM,
|
|
353
|
+
iosProjectPath: iosProject.relative
|
|
354
|
+
});
|
|
355
|
+
computedFingerprint = computed?.hash ?? null;
|
|
356
|
+
fingerprintSources = computed?.sources ?? [];
|
|
357
|
+
} catch (error) {
|
|
358
|
+
computedFingerprint = null;
|
|
359
|
+
fingerprintError = String(error?.message || error);
|
|
360
|
+
note(chalk.dim(`Fingerprinting failed: ${fingerprintError}`));
|
|
361
|
+
}
|
|
362
|
+
if (!computedFingerprint) fail({
|
|
363
|
+
code: "STIM_NO_FINGERPRINT",
|
|
364
|
+
message: `Could not fingerprint ${root}: @expo/fingerprint produced no hash for it.`,
|
|
365
|
+
remedy: "Check the project native inputs and the @expo/fingerprint error above, then retry.",
|
|
366
|
+
build: {
|
|
367
|
+
cacheSkipped: !cachePolicy.read,
|
|
368
|
+
missReason: fingerprintErrorMissReason(fingerprintError)
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
fingerprint = storeHash = computedFingerprint;
|
|
372
|
+
storeSources = fingerprintSources;
|
|
373
|
+
return identity();
|
|
374
|
+
},
|
|
375
|
+
cache: () => filesystemBuildCapability({
|
|
376
|
+
resolve: d.resolveBuild,
|
|
377
|
+
store: d.storeBuild,
|
|
378
|
+
sources: storeSources
|
|
379
|
+
}),
|
|
380
|
+
validateExternal(path) {
|
|
381
|
+
if (device) {
|
|
382
|
+
const gate = d.gateProfileForDevice({
|
|
383
|
+
appPath: path,
|
|
384
|
+
udid: device.udid,
|
|
385
|
+
configuration
|
|
386
|
+
});
|
|
387
|
+
if (!gate.ok) fail({
|
|
388
|
+
code: gate.code,
|
|
389
|
+
message: gate.reason,
|
|
390
|
+
remedy: easDeviceBuildRemedy(easProfile)
|
|
391
|
+
});
|
|
392
|
+
if (!d.devClientScheme(root, path)) fail({
|
|
393
|
+
code: "STIM_BAD_ARG",
|
|
394
|
+
message: "The EAS device app has no development-client URL scheme.",
|
|
395
|
+
remedy: "Install expo-dev-client with npx expo install expo-dev-client, then rebuild the EAS profile and retry."
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
materialize,
|
|
400
|
+
async prepare(beforePrepare) {
|
|
401
|
+
mutatingSteps = [];
|
|
402
|
+
const prebuild = d.planPrebuild(root, PLATFORM, {
|
|
403
|
+
isExpo,
|
|
404
|
+
fingerprint,
|
|
405
|
+
sources: fingerprintSources
|
|
406
|
+
});
|
|
407
|
+
if (prebuild === "refuse") fail({ ...staleNativeDirRefusal(PLATFORM) });
|
|
408
|
+
const pods = d.readPodState(root, iosProject.dir);
|
|
409
|
+
if ((prebuild === "generate" || prebuild === "regenerate" || podAction(pods, d.podsAreStale(pods.lockText, pods.manifestText, pods.dir)).install) && cachePolicy.read) beforePrepare();
|
|
410
|
+
if (prebuild === "generate" || prebuild === "regenerate") {
|
|
411
|
+
step("prebuild");
|
|
412
|
+
recordPrebuild(root, PLATFORM, null);
|
|
413
|
+
const result = await d.runPrebuild(root, PLATFORM, logWriter(), { clean: prebuild === "regenerate" });
|
|
414
|
+
if (result?.failed) {
|
|
415
|
+
phase("prebuild", "FAILED");
|
|
416
|
+
fail({
|
|
417
|
+
code: result.code || "STIM_PREBUILD_FAILED",
|
|
418
|
+
message: result.reason || "expo prebuild failed.",
|
|
419
|
+
remedy: result.remedy || `See ${logFile} for the transcript.`,
|
|
420
|
+
lines: (result.lastLines || []).slice(-5)
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
phase("prebuild", `${prebuild === "generate" ? "ios/ absent -> generated" : "ios/ not generated from this fingerprint -> regenerated with --clean"} (${formatDuration(result?.durationMs ?? 0)})`);
|
|
424
|
+
mutatingSteps.push("prebuild");
|
|
425
|
+
}
|
|
426
|
+
if (isExpo && buildScheme !== void 0) {
|
|
427
|
+
const project = d.discoverXcodeProject(root, iosProject.dir);
|
|
428
|
+
if (project.error) fail({ ...project.error });
|
|
429
|
+
const schemeError = d.resolveScheme(project, { scheme: buildScheme }).error;
|
|
430
|
+
if (schemeError) fail({ ...schemeError });
|
|
431
|
+
}
|
|
432
|
+
const podState = d.readPodState(root, iosProject.dir);
|
|
433
|
+
const verdict = d.podsAreStale(podState.lockText, podState.manifestText, podState.dir);
|
|
434
|
+
const action = podAction(podState, verdict);
|
|
435
|
+
if (action.install) {
|
|
436
|
+
step("pods");
|
|
437
|
+
const result = await d.runPodInstall(root, logWriter(), {
|
|
438
|
+
estimateMs: estimates().podsMs,
|
|
439
|
+
directory: iosProject.dir
|
|
440
|
+
});
|
|
441
|
+
const podCommand = result?.command || "pod install";
|
|
442
|
+
for (const line of result?.notes || []) note(chalk.dim(phaseLine("pods", line)));
|
|
443
|
+
if (result?.failed) {
|
|
444
|
+
phase("pods", "FAILED");
|
|
445
|
+
fail({
|
|
446
|
+
code: result.code || "STIM_DEPS_FAILED",
|
|
447
|
+
message: result.reason || "`pod install` failed.",
|
|
448
|
+
remedy: result.remedy || `See ${logFile} for the transcript.`,
|
|
449
|
+
lines: result.diagnosticLines?.length ? result.diagnosticLines : (result.lastLines || []).slice(-5)
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
setPodsMs(result?.durationMs ?? 0);
|
|
453
|
+
phase("pods", `${action.reason} -> installed with \`${podCommand}\` (${formatDuration(result?.durationMs ?? 0)})`);
|
|
454
|
+
mutatingSteps.push(podCommand);
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
async reconcile() {
|
|
458
|
+
const rekeyedBy = [];
|
|
459
|
+
if (mutatingSteps.length) {
|
|
460
|
+
const after = await refingerprintAfterMutation({
|
|
461
|
+
projectRoot: root,
|
|
462
|
+
platform: PLATFORM,
|
|
463
|
+
previousHash: fingerprint,
|
|
464
|
+
iosProjectPath: iosProject.relative,
|
|
465
|
+
fingerprint: d.fingerprintProject
|
|
466
|
+
});
|
|
467
|
+
const prebuildRan = mutatingSteps.includes("prebuild");
|
|
468
|
+
const editedConfig = after ? configInputsChanged(fingerprintSources, after.sources, { prebuildRan }) : [];
|
|
469
|
+
if (after && !editedConfig.length && prebuildRan) recordPrebuild(root, PLATFORM, after.hash);
|
|
470
|
+
if (!after || editedConfig.length) {
|
|
471
|
+
storeHash = null;
|
|
472
|
+
note(chalk.yellow(phaseLine("fingerprint", after ? changedDuringBuildLine(editedConfig) : `unavailable after ${mutatingSteps.join(", ")}; the build will be installed but not cached`)));
|
|
473
|
+
} else if (after.moved) {
|
|
474
|
+
rekeyedBy.push(...mutatingSteps.map((mutation) => mutation === "prebuild" ? mutation : "pod install"));
|
|
475
|
+
storeHash = after.hash;
|
|
476
|
+
storeSources = after.sources;
|
|
477
|
+
note(chalk.dim(phaseLine("fingerprint", `${shortHash(fingerprint)} -> ${shortHash(storeHash)} (after ${mutatingSteps.join(", ")})`)));
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return {
|
|
481
|
+
identity: identity(),
|
|
482
|
+
rekeyedBy,
|
|
483
|
+
mutationLabel: mutatingSteps.join("/")
|
|
484
|
+
};
|
|
485
|
+
},
|
|
486
|
+
async validate() {
|
|
487
|
+
if (!storeHash) return null;
|
|
488
|
+
const after = await refingerprintAfterMutation({
|
|
489
|
+
projectRoot: root,
|
|
490
|
+
platform: PLATFORM,
|
|
491
|
+
previousHash: storeHash,
|
|
492
|
+
iosProjectPath: iosProject.relative,
|
|
493
|
+
fingerprint: d.fingerprintProject
|
|
494
|
+
});
|
|
495
|
+
const changed = after ? inputsChangedDuringBuild({
|
|
496
|
+
platform: PLATFORM,
|
|
497
|
+
lookup: fingerprintSources,
|
|
498
|
+
prebuildRan: mutatingSteps.includes("prebuild"),
|
|
499
|
+
compiled: storeSources,
|
|
500
|
+
current: after.sources
|
|
501
|
+
}) : [];
|
|
502
|
+
if (!after || changed.length) {
|
|
503
|
+
storeHash = null;
|
|
504
|
+
note(chalk.yellow(phaseLine("fingerprint", after ? changedDuringBuildLine(changed) : "unavailable after xcodebuild; the build will be installed but not cached")));
|
|
505
|
+
} else if (after.moved) {
|
|
506
|
+
const before = storeHash;
|
|
507
|
+
storeHash = after.hash;
|
|
508
|
+
storeSources = after.sources;
|
|
509
|
+
note(chalk.dim(phaseLine("fingerprint", `${shortHash(before)} -> ${shortHash(storeHash)} (after xcodebuild)`)));
|
|
510
|
+
}
|
|
511
|
+
return identity();
|
|
512
|
+
},
|
|
513
|
+
compile: () => d.buildIos({
|
|
514
|
+
root,
|
|
515
|
+
iosDir: iosProject.dir,
|
|
516
|
+
scheme: buildScheme,
|
|
517
|
+
udid,
|
|
518
|
+
destination: target.destination,
|
|
519
|
+
arch: target.arch,
|
|
520
|
+
...physical ? { sdk: target.sdk } : {},
|
|
521
|
+
logWriter: logWriter(),
|
|
522
|
+
...configuration ? { configuration } : {},
|
|
523
|
+
estimateMs: estimates().coldBuildMs,
|
|
524
|
+
optimizations
|
|
525
|
+
}),
|
|
526
|
+
explain(rekeyedBy) {
|
|
527
|
+
const current = {
|
|
528
|
+
hash: storeHash ?? fingerprint,
|
|
529
|
+
sources: storeSources
|
|
530
|
+
};
|
|
531
|
+
const explained = explainBuildMiss({
|
|
532
|
+
root,
|
|
533
|
+
platform: PLATFORM,
|
|
534
|
+
current,
|
|
535
|
+
rekeyedBy,
|
|
536
|
+
baselineDeps: { readState: d.readWorkspaceState }
|
|
537
|
+
});
|
|
538
|
+
return {
|
|
539
|
+
reason: explained.reason,
|
|
540
|
+
diff: explained.previousHash && explained.changedNames.length ? fingerprintDiffRecord({
|
|
541
|
+
changed: explained.changedNames,
|
|
542
|
+
previousHash: explained.previousHash,
|
|
543
|
+
hash: current.hash
|
|
544
|
+
}) : null
|
|
545
|
+
};
|
|
546
|
+
},
|
|
547
|
+
untrackedLine: () => untrackedMissLine(d.untrackedNativeFiles({
|
|
548
|
+
projectRoot: root,
|
|
549
|
+
iosProjectPath: iosProject.relative
|
|
550
|
+
})),
|
|
551
|
+
legacyCache: physical || !cachePolicy.remote || buildProfile || buildScheme ? null : {
|
|
552
|
+
load: () => d.loadProjectProvider(root, { isExpo }),
|
|
553
|
+
runOptions: iosProviderRunOptions(configuration, target.keyArch)
|
|
554
|
+
},
|
|
555
|
+
offload: {
|
|
556
|
+
context: () => {
|
|
557
|
+
const runtime = physical || release ? null : target.offloadRuntime();
|
|
558
|
+
return {
|
|
559
|
+
runtime,
|
|
560
|
+
unsupported: target.offloadRefusal ?? (release ? `${configuration} builds build here` : !cachePolicy.write ? "the build cache is off" : !runtime ? udid ? `the runtime of simulator ${udid} is unknown` : "no simulator runtime is available for worker selection" : null)
|
|
561
|
+
};
|
|
562
|
+
},
|
|
563
|
+
target: (runtime) => ({
|
|
564
|
+
platform: "ios",
|
|
565
|
+
local: {
|
|
566
|
+
...iosToolchain(root),
|
|
567
|
+
...target.hostedArchitecture ? { arch: target.hostedArchitecture === "x86_64" ? "x64" : "arm64" } : {}
|
|
568
|
+
},
|
|
569
|
+
runtime,
|
|
570
|
+
cocoapodsPinned: bundlerPin(root) !== null
|
|
571
|
+
}),
|
|
572
|
+
request: (runtime) => ({
|
|
573
|
+
platform: "ios",
|
|
574
|
+
runtime,
|
|
575
|
+
configuration,
|
|
576
|
+
scheme: buildScheme ?? null,
|
|
577
|
+
iosProjectPath: iosProject.relative,
|
|
578
|
+
isExpo,
|
|
579
|
+
optimizations
|
|
580
|
+
}),
|
|
581
|
+
unchanged: async () => {
|
|
582
|
+
const after = await refingerprintAfterMutation({
|
|
583
|
+
projectRoot: root,
|
|
584
|
+
platform: PLATFORM,
|
|
585
|
+
previousHash: storeHash,
|
|
586
|
+
iosProjectPath: iosProject.relative,
|
|
587
|
+
fingerprint: d.fingerprintProject
|
|
588
|
+
});
|
|
589
|
+
return Boolean(after && !after.moved);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
export { reactNativeIosProject };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ht as gitCommonDirOnDisk } from "./settings-Bbztm4oV.mjs";
|
|
2
2
|
import { existsSync, rmSync } from "node:fs";
|
|
3
3
|
import { loadConfig, recordingEnabled, workspaceRecordingsDir } from "@stim-cli/core/state";
|
|
4
4
|
//#region src/workspace/recordings.ts
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as readHostedNative } from "./ios-state-
|
|
12
|
-
import { r as reopenHostedAndroidMetro } from "./hosted-android-
|
|
13
|
-
import {
|
|
14
|
-
import { n as nativeRunCommand } from "./slot-launch-C1nqh4mu.mjs";
|
|
1
|
+
import { B as parseDeviceSlotKey, p as getProject, z as deviceSlotPlatforms } from "./config-D0LhTY3S.mjs";
|
|
2
|
+
import { i as recordWorkspaceUse, r as readWorkspaceState$1 } from "./workspace-state-CSIFuuDa.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-BjPN99ZB.mjs";
|
|
4
|
+
import { F as readWorkspaceLaunches, n as findCommandWorkspace } from "./project-B8_duAzW.mjs";
|
|
5
|
+
import { J as resolveOwnedAvdSerial } from "./android-BsYNR81W.mjs";
|
|
6
|
+
import { u as resolveProjectMetro } from "./metro-D_j9sN-B.mjs";
|
|
7
|
+
import { o as readWebRecord, r as cdpEndpoint, u as webFacts } from "./state-DI84A-uu.mjs";
|
|
8
|
+
import { E as resolveOwnedIosSim } from "./ios-CXLIUxXJ.mjs";
|
|
9
|
+
import { p as ensureMetroReverse, s as androidAppProcess, v as iosAppProcess } from "./app-install-0LgaQRT7.mjs";
|
|
10
|
+
import { u as probeHostedSession } from "./hosted-client-Io01s5By.mjs";
|
|
11
|
+
import { r as readHostedNative } from "./ios-state-CjrL2qv-.mjs";
|
|
12
|
+
import { r as reopenHostedAndroidMetro } from "./hosted-android-DQ-Agsd8.mjs";
|
|
13
|
+
import { n as nativeRunCommand } from "./slot-launch-B9hn96wd.mjs";
|
|
15
14
|
import { n as sendToOwnedPage, t as liveWebRecord } from "./page-Bv9s2KwY.mjs";
|
|
16
15
|
import { hostedAndroidDeviceName, hostedNativeRecords } from "@stim-cli/core/state";
|
|
17
16
|
import chalk from "chalk";
|
|
@@ -363,6 +362,10 @@ async function runReload({ root, platform = null, deps = {} }) {
|
|
|
363
362
|
};
|
|
364
363
|
}
|
|
365
364
|
const target = live.find((candidate) => !candidate.record.release && candidate.record.metroPort === project.metroPort) ?? live[0];
|
|
365
|
+
if (target.record.runtime === "process") return {
|
|
366
|
+
ok: false,
|
|
367
|
+
error: failure("STIM_NO_METRO", `${target.record.appId} runs as a native process without Metro.`, `Run \`${nativeRunCommand(target.platform, target.slot)}\` again to rebuild and relaunch the app.`)
|
|
368
|
+
};
|
|
366
369
|
if (target.record.release) return {
|
|
367
370
|
ok: false,
|
|
368
371
|
error: failure("STIM_RELOAD_RELEASE", `${target.record.appId} was launched with an embedded release bundle.`, `Run \`${nativeRunCommand(target.platform, target.slot)}\` with a Debug configuration or variant before reloading JavaScript.`)
|