stim 1.11.0 → 1.12.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/dist/{activity-BtG4Va9l.mjs → activity-CCZJs__P.mjs} +4 -3
- package/dist/{android-C4zG2Tuc.mjs → android-75Sk2rIR.mjs} +25 -8
- package/dist/{android-C1q4l523.mjs → android-B7X-8H7h.mjs} +75 -32
- package/dist/{android-BA2i_KAV.mjs → android-BQiKJYK0.mjs} +1 -1
- package/dist/{android-cas-DfJkwCXW.mjs → android-cas-DzLPXiEn.mjs} +7 -7
- package/dist/{app-install-DHut6JnV.mjs → app-install-CsZi0SAT.mjs} +1 -1
- package/dist/{workspaces-COD2xCz-.mjs → budget-DbzW5VTD.mjs} +641 -32
- package/dist/{build-plan-CeAYgKAx.mjs → build-plan-CqntbR7b.mjs} +120 -35
- package/dist/{build-progress-CDwogz6R.mjs → build-progress-h60GPV27.mjs} +3 -3
- package/dist/{cache-manifest-Pubfp8wV.mjs → cache-manifest-DWPF4RKJ.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cli.mjs +16 -16
- package/dist/collector-run.mjs +4 -4
- package/dist/{command-output-D5z2_bcF.mjs → command-output-BWCj5Vh-.mjs} +1 -1
- package/dist/{config-BEq0Qw_a.mjs → config-0jCcMM0E.mjs} +10 -1
- package/dist/{dependency-state-r9UesA9a.mjs → dependency-state-DNN0yfx6.mjs} +1 -1
- package/dist/{deps-OF7CD5Dx.mjs → deps-CO-_7UOm.mjs} +2 -2
- package/dist/{device-BwH2iI3O.mjs → device-9r9xRYDa.mjs} +7 -7
- package/dist/{device-lease-D83nqeMX.mjs → device-lease-B9LAXIUH.mjs} +5 -5
- package/dist/{device-pool-DHj7cdPy.mjs → device-pool-BoezJd-c.mjs} +4 -4
- package/dist/{device-remote-BQZSnnmE.mjs → device-remote-C0_o-tJH.mjs} +254 -579
- package/dist/{doctor-D8QdMRMf.mjs → doctor-LfDlbR-N.mjs} +19 -18
- package/dist/{error-diagnostics-UYFSQwRy.mjs → error-diagnostics-CCxjn31V.mjs} +7 -7
- package/dist/{gc-COZteyiq.mjs → gc-C4nQFcTX.mjs} +203 -39
- package/dist/{guide-NDvTmMi-.mjs → guide-BPBlh9ML.mjs} +189 -38
- package/dist/{guide-status-CWvti2Lg.mjs → guide-status-i9ogHt4v.mjs} +2 -2
- package/dist/{idle-NETbeNiQ.mjs → idle-S3tFZ53_.mjs} +7 -7
- package/dist/{in-use-DVhlSoyn.mjs → in-use-D9XYEgFD.mjs} +7 -7
- package/dist/{ios-CQLKpNfr.mjs → ios-CDzWL1mj.mjs} +30 -29
- package/dist/{ios-DArbmwer.mjs → ios-CZWOHTTc.mjs} +23 -19
- package/dist/{ios-device-CwDZo0X4.mjs → ios-device-D9cLxVr5.mjs} +1 -1
- package/dist/{launch-verify-CuPDGXdr.mjs → launch-verify-B2oR_kFN.mjs} +2 -2
- package/dist/{logs-B44a1UeU.mjs → logs-SzuYudOj.mjs} +6 -6
- package/dist/{merge-state-DDxS-XIZ.mjs → merge-state-ytFQCeh4.mjs} +38 -8
- package/dist/{metro-BWLOJ_Wr.mjs → metro-Dzo30hvJ.mjs} +1 -1
- package/dist/{named-ports-Dc7neAlc.mjs → named-ports-Dn1o61D9.mjs} +3 -3
- package/dist/{ownership-BiojdtAp.mjs → ownership-B8d4kXBx.mjs} +49 -16
- package/dist/{ownership-D2xbLVoz.mjs → ownership-Dqnrjrio.mjs} +2 -2
- package/dist/{ports-DwBaRFJs.mjs → ports-Dp_QTwTC.mjs} +3 -3
- package/dist/{project-BXZzOABt.mjs → project-B8rbutVC.mjs} +4 -72
- package/dist/{reload-By9Dwsrt.mjs → reload-nocmx8KB.mjs} +9 -9
- package/dist/remote-cache-BRsRZru5.mjs +526 -0
- package/dist/{server-bare-D_RK1RCj.mjs → server-bare-Gn3ssSdK.mjs} +1 -1
- package/dist/{server-expo-o6H5gcBc.mjs → server-expo-CeT1nIIk.mjs} +2 -2
- package/dist/server-expo-eWi9Coof.mjs +2 -0
- package/dist/{settings-B5oFZEri.mjs → settings-BlyDn2Oz.mjs} +2 -2
- package/dist/{settings-C0ugALSC.mjs → settings-bE-Gu3Ti.mjs} +23 -11
- package/dist/settings.schema.json +22 -2
- package/dist/{simslim-CIR3IYJO.mjs → simslim-COtEEP7x.mjs} +6 -5
- package/dist/{slot-launch-rggO1Esw.mjs → slot-launch-DIACGEfH.mjs} +4 -4
- package/dist/{spawn-claims-BJwXTMPt.mjs → spawn-claims-PT8aQpCa.mjs} +1 -1
- package/dist/{start-i8zc9VmS.mjs → start-BFstVBlx.mjs} +1 -1
- package/dist/{start-BSsf2tUs.mjs → start-BboE1HIS.mjs} +108 -17
- package/dist/{state-WGdIbi_d.mjs → state-DcDgzfu3.mjs} +15 -3
- package/dist/{stats-BAgJaLA4.mjs → stats-D8rUTPHd.mjs} +1 -1
- package/dist/{stats-DBYJ5bxL.mjs → stats-DiCtmluY.mjs} +4 -4
- package/dist/{status-Q-WDEGCB.mjs → status-BUASYyy_.mjs} +73 -28
- package/dist/{status-CitcBRsC.mjs → status-DI9Tjo7T.mjs} +41 -29
- package/dist/stim-desktop-D0xhpZt8.mjs +29 -0
- package/dist/{stop-rst5mL14.mjs → stop-BI7QY76M.mjs} +2 -2
- package/dist/{stop-DIhrvu0B.mjs → stop-Bn6v-GvS.mjs} +23 -16
- package/dist/supervisor-run.mjs +11 -11
- package/dist/{workspace-process-lock-Cx74RSDZ.mjs → workspace-process-lock-BvvJTfo_.mjs} +2 -2
- package/dist/{worktree-DhxDTK44.mjs → worktree-B5sTRskL.mjs} +1 -1
- package/dist/{worktree-KOjMX3zA.mjs → worktree-ChDL5fO1.mjs} +17 -16
- package/dist/{worktree-BlizKDpZ.mjs → worktree-DeBQSVtR.mjs} +3 -1
- package/dist/{xcode-B5SPD--o.mjs → xcode-BzplpQzc.mjs} +7 -7
- package/package.json +5 -5
- package/dist/budget-De3P2rq_.mjs +0 -620
- package/dist/native-run-D7yB_AsB.mjs +0 -143
- package/dist/server-expo-B-CCUJZj.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as process_identity_exports } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
|
-
import { j as workspaceLogsDir, m as readWorkspaceState } from "./metro-
|
|
4
|
-
import { i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-
|
|
3
|
+
import { j as workspaceLogsDir, m as readWorkspaceState } from "./metro-Dzo30hvJ.mjs";
|
|
4
|
+
import { i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-B9LAXIUH.mjs";
|
|
5
5
|
import { closeSync, fstatSync, openSync, readFileSync, readSync, readdirSync } from "node:fs";
|
|
6
6
|
import { basename, join, resolve } from "node:path";
|
|
7
7
|
import { homedir } from "node:os";
|
|
@@ -67,6 +67,7 @@ function parseAgentDeviceRecord(kind, path, raw) {
|
|
|
67
67
|
kind,
|
|
68
68
|
deviceId,
|
|
69
69
|
session: kind === "claim" && typeof entry?.session === "string" && entry.session ? entry.session : null,
|
|
70
|
+
workspace: kind === "claim" && typeof entry?.workspace === "string" && entry.workspace ? entry.workspace : null,
|
|
70
71
|
deviceName: kind === "claim" && typeof device?.name === "string" ? device.name : null,
|
|
71
72
|
readable: Boolean(entry && deviceId),
|
|
72
73
|
owner: entry ? field(entry, "ownerPid", "ownerStartTime") : null,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as loadConfig$1, d as getConfigDir } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
|
-
import { P as withDirLock, c as signalProcessTree, i as pidExists } from "./metro-
|
|
4
|
-
import {
|
|
3
|
+
import { P as withDirLock, c as signalProcessTree, i as pidExists } from "./metro-Dzo30hvJ.mjs";
|
|
4
|
+
import { n as stimDesktopInstalled, t as settingDefault } from "./stim-desktop-D0xhpZt8.mjs";
|
|
5
|
+
import { c as androidDataPartitionSizeBytes } from "./settings-BlyDn2Oz.mjs";
|
|
5
6
|
import { mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
6
7
|
import { existsSync as existsSync$1, lstatSync as lstatSync$1, mkdirSync as mkdirSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
7
8
|
import { dirname, isAbsolute, join, resolve } from "path";
|
|
8
9
|
import { ANDROID_EMULATOR_APPS, createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1, settingDefinition } from "@stim-cli/core/state";
|
|
9
10
|
import { homedir, tmpdir } from "os";
|
|
10
11
|
//#region src/devices/android-emulator-viewer.ts
|
|
11
|
-
function configuredAndroidEmulatorApp() {
|
|
12
|
-
const value = loadConfig$1()?.androidEmulatorApp;
|
|
13
|
-
if (value === void 0) return "emulator";
|
|
12
|
+
function configuredAndroidEmulatorApp(platform = process.platform) {
|
|
13
|
+
const value = loadConfig$1()?.androidEmulatorApp ?? settingDefault(settingDefinition("androidEmulatorApp"), () => stimDesktopInstalled(platform)).value;
|
|
14
14
|
if (ANDROID_EMULATOR_APPS.includes(value)) return value;
|
|
15
15
|
const error = /* @__PURE__ */ new Error("Invalid androidEmulatorApp in machine config. Use \"emulator\" or \"stim-desktop\".");
|
|
16
16
|
Object.assign(error, { code: "STIM_BAD_ARG" });
|
|
@@ -205,6 +205,18 @@ function pickDefaultSystemImage(images, { systemImage, hostArch } = {}) {
|
|
|
205
205
|
if (matching.length === 0) return null;
|
|
206
206
|
return matching.toSorted((a, b) => pageSizeRank(a) - pageSizeRank(b) || b.api - a.api || (b.tag === "google_apis" ? 1 : 0) - (a.tag === "google_apis" ? 1 : 0))[0] ?? null;
|
|
207
207
|
}
|
|
208
|
+
const FOLD_FEATURE_PROFILES = /* @__PURE__ */ new Set(["pixel_fold", "resizable"]);
|
|
209
|
+
function profileNeedsFoldFeature(profile) {
|
|
210
|
+
return typeof profile === "string" && FOLD_FEATURE_PROFILES.has(profile);
|
|
211
|
+
}
|
|
212
|
+
function systemImageSupportsFold(pkg, home = androidHome()) {
|
|
213
|
+
try {
|
|
214
|
+
const ini = readFileSync$1(join(home, ...pkg.split(";"), "advancedFeatures.ini"), "utf8");
|
|
215
|
+
return /^\s*SupportPixelFold\s*=\s*on\s*$/im.test(ini);
|
|
216
|
+
} catch {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
208
220
|
async function createOwnedAvd(label, { systemImage, deviceProfile = DEFAULT_AVD_DEVICE_PROFILE, spawn = (...args) => getExecutor().spawn(...args) } = {}) {
|
|
209
221
|
const pick = pickDefaultSystemImage(listInstalledSystemImages(), { systemImage });
|
|
210
222
|
if (!pick) {
|
|
@@ -672,6 +684,11 @@ function configureNewOwnedAvd(avdName, { dataPartitionSizeGb, avdConfig = {} },
|
|
|
672
684
|
for (const [key, value] of Object.entries(expected)) if (!verified.split(/\r?\n/).includes(`${key}=${value}`)) throw new Error(`Could not verify ${key} in ${configPath}.`);
|
|
673
685
|
return configPath;
|
|
674
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Values every AVD Stim creates gets unless `android.avdConfig` or `android.avdConfigFile` sets the key. The
|
|
689
|
+
* emulator drops gRPC `sendKey` events on an AVD without a hardware keyboard.
|
|
690
|
+
*/
|
|
691
|
+
const OWNED_AVD_CONFIG_DEFAULTS = Object.freeze({ "hw.keyboard": "yes" });
|
|
675
692
|
function avdPoolConfiguration(dataPartitionSizeGb, avdConfig, deviceProfile = DEFAULT_AVD_DEVICE_PROFILE) {
|
|
676
693
|
return JSON.stringify(Object.entries({
|
|
677
694
|
...avdConfig,
|
|
@@ -793,7 +810,7 @@ function suppressEmulatorCrashConsent({ platform = process.platform, version = e
|
|
|
793
810
|
}
|
|
794
811
|
function bootAndroidEmulator(avdName, consolePort, { logFile, platform = process.platform } = {}) {
|
|
795
812
|
const exec = getExecutor();
|
|
796
|
-
const app = configuredAndroidEmulatorApp();
|
|
813
|
+
const app = configuredAndroidEmulatorApp(platform);
|
|
797
814
|
const child = exec.spawn(androidToolPath("emulator"), [
|
|
798
815
|
"-avd",
|
|
799
816
|
avdName,
|
|
@@ -1042,4 +1059,4 @@ function ownedAvdSerialResolver({ timeoutMs } = {}) {
|
|
|
1042
1059
|
};
|
|
1043
1060
|
}
|
|
1044
1061
|
//#endregion
|
|
1045
|
-
export {
|
|
1062
|
+
export { forgetCreatedDevice as $, listOrphanedAvdDirectories as A, pickDefaultSystemImage as B, getAvdNameForSerial as C, listAvdDeviceProfiles as D, listAdbDevices as E, ownedAvdMatchesConfiguration as F, resolvePhysicalDevice as G, profileNeedsFoldFeature as H, ownedAvdName as I, systemImageSupportsFold as J, shutdownAndroidEmulator as K, ownedAvdSerialResolver as L, nextConsolePort as M, ownedAvdDeviceProfile as N, listAvds as O, ownedAvdDirectory as P, isStimOwnedSim as Q, ownedAvdSystemImage as R, findBuildTool as S, isStimOwnedAvdName as T, resetAdoptedAvd as U, probeEmulatorSerial as V, resolveOwnedAvdSerial as W, waitForBoot as X, waitForAndroidEmulatorShutdown as Y, wipeAvdUserData as Z, createOwnedAvd as _, androidHome as a, emulatorFailureRemedy as b, androidSystemImageAbi as c, assertOwnedAvdStopped as d, recordCreatedDevice as et, avdPathExists as f, configureNewOwnedAvd as g, bootAndroidEmulator as h, androidDeviceAbi as i, memoizeEmulatorProbe as j, listInstalledSystemImages as k, androidToolCwd as l, avdStorageRoots as m, OWNED_AVD_CONFIG_DEFAULTS as n, androidPoolCandidates as o, avdPoolConfiguration as p, sleepSync as q, androidBuildToolName as r, androidPoolNoCandidatesRefusal as s, DEFAULT_AVD_DEVICE_PROFILE as t, configuredAndroidEmulatorApp as tt, androidToolPath as u, deleteAvd as v, hostSystemImageArch as w, extractEmulatorFailure as x, emulatorDiskSpaceRemedy as y, physicalDeviceModel as z };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as ownership_claim_exports, B as deviceSlotPlatforms, C as setDevice, E as withConfigLock$1, G as validateDeviceSlot, H as parseDeviceSlotOption, R as deviceSlotFileKey, S as saveConfig, T as upsertProject, _ as loadConfig$1, p as getProject, u as getConcurrencyLimits, z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
3
|
import { r as createNdjsonWriter } from "./ndjson-CDY9IkVC.mjs";
|
|
4
|
-
import { O as workspaceDir, b as emulatorLogFile, c as signalProcessTree, h as recordWorkspaceUse, i as pidExists, j as workspaceLogsDir, m as readWorkspaceState$1, s as resolveProjectMetro, y as writeWorkspaceState } from "./metro-
|
|
5
|
-
import { D as makeTemporaryDirectory, O as removeTemporaryEntry, s as gitCommonDir, y as repoRoot } from "./worktree-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { O as workspaceDir, b as emulatorLogFile, c as signalProcessTree, h as recordWorkspaceUse, i as pidExists, j as workspaceLogsDir, m as readWorkspaceState$1, s as resolveProjectMetro, y as writeWorkspaceState } from "./metro-Dzo30hvJ.mjs";
|
|
5
|
+
import { D as makeTemporaryDirectory, O as removeTemporaryEntry, s as gitCommonDir, y as repoRoot } from "./worktree-DeBQSVtR.mjs";
|
|
6
|
+
import { i as findProjectRoot, n as appProjectProblem, r as detectIsExpo, s as projectShortcut, t as NO_PROJECT_REFUSAL } from "./project-B8rbutVC.mjs";
|
|
7
|
+
import { m as writeWorkspaceLaunch, n as MODE_EXPO, t as MODE_BARE } from "./state-DcDgzfu3.mjs";
|
|
8
8
|
import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
9
|
-
import { _ as stepTimer, c as launchErrorReport, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine, m as shortHash, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-
|
|
10
|
-
import { A as resolveBuild, C as filesystemBuildCapability, D as providerDownloadPath, E as prepareProviderDownloadDir, F as untrackedNativeFiles, I as assetDiffReason, L as captureAssetManifest, M as storedAssetManifest, O as providerUploadOutcome, P as untrackedMissLine, R as compareAssetManifests, T as fingerprintProject, _ as waitForBuild, b as buildCacheKey, g as releaseBuildLock, j as storeBuild, k as refingerprintAfterMutation, m as acquireBuildLock, v as waitForSharedBuild, w as fingerprintDiffRecord, z as readAssetManifest } from "./device-lease-
|
|
11
|
-
import {
|
|
12
|
-
import { A as resolveCacheProviderConfig, E as publicUrlSetting, H as compilerCacheFallbackMessage, I as tunnelModeSetting, L as unknownSettingKeys, M as settingFile, O as remoteAndroidSetting, P as settingShapeErrors, S as metroWarmupUrlSetting, U as optimizationBuildProfile, V as artifactCachePolicy, W as resolveOptimizations, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, j as resolveSettings, r as REMOTE_DEVICE_BACKENDS, s as androidAvdConfigSettingError, u as androidDataPartitionSizeGbSettingError, z as detectProviders } from "./settings-
|
|
13
|
-
import { y as parkedMaxSetting } from "./ownership-
|
|
14
|
-
import { c as startBuildProgress, n as NO_BUILD_PROGRESS } from "./build-progress-
|
|
15
|
-
import { a as acquireBuildSlot, s as releaseBuildSlot } from "./in-use-
|
|
16
|
-
import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-
|
|
17
|
-
import { t as cleanLine } from "./server-expo-
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { t as
|
|
26
|
-
import {
|
|
27
|
-
import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-
|
|
28
|
-
import { a as buildAndroid, c as CCACHE_NOT_RUN, f as resolveCcache, l as CCACHE_UNAVAILABLE, n as resolveAndroidCas, o as productFlavorRefusal, p as formatDiagnostic, r as resolveAndroidCompilerCache, s as readProductFlavors, u as ccacheActivityLine } from "./android-cas-
|
|
29
|
-
import { d as startBuildHeartbeat, f as tailLines, n as HEARTBEAT_INTERVAL_MS } from "./xcode-
|
|
30
|
-
import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-
|
|
31
|
-
import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-
|
|
9
|
+
import { _ as stepTimer, c as launchErrorReport, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine, m as shortHash, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-BWCj5Vh-.mjs";
|
|
10
|
+
import { A as resolveBuild, C as filesystemBuildCapability, D as providerDownloadPath, E as prepareProviderDownloadDir, F as untrackedNativeFiles, I as assetDiffReason, L as captureAssetManifest, M as storedAssetManifest, O as providerUploadOutcome, P as untrackedMissLine, R as compareAssetManifests, T as fingerprintProject, _ as waitForBuild, b as buildCacheKey, g as releaseBuildLock, j as storeBuild, k as refingerprintAfterMutation, m as acquireBuildLock, v as waitForSharedBuild, w as fingerprintDiffRecord, z as readAssetManifest } from "./device-lease-B9LAXIUH.mjs";
|
|
11
|
+
import { B as pickDefaultSystemImage, D as listAvdDeviceProfiles, E as listAdbDevices, G as resolvePhysicalDevice, H as profileNeedsFoldFeature, J as systemImageSupportsFold, N as ownedAvdDeviceProfile, O as listAvds, P as ownedAvdDirectory, R as ownedAvdSystemImage, S as findBuildTool, U as resetAdoptedAvd, V as probeEmulatorSerial, W as resolveOwnedAvdSerial, X as waitForBoot, a as androidHome, b as emulatorFailureRemedy, c as androidSystemImageAbi, i as androidDeviceAbi, j as memoizeEmulatorProbe, k as listInstalledSystemImages, l as androidToolCwd, o as androidPoolCandidates, r as androidBuildToolName, s as androidPoolNoCandidatesRefusal, t as DEFAULT_AVD_DEVICE_PROFILE, tt as configuredAndroidEmulatorApp, w as hostSystemImageArch, x as extractEmulatorFailure, y as emulatorDiskSpaceRemedy, z as physicalDeviceModel } from "./android-75Sk2rIR.mjs";
|
|
12
|
+
import { A as resolveCacheProviderConfig, E as publicUrlSetting, H as compilerCacheFallbackMessage, I as tunnelModeSetting, L as unknownSettingKeys, M as settingFile, O as remoteAndroidSetting, P as settingShapeErrors, S as metroWarmupUrlSetting, U as optimizationBuildProfile, V as artifactCachePolicy, W as resolveOptimizations, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, j as resolveSettings, r as REMOTE_DEVICE_BACKENDS, s as androidAvdConfigSettingError, u as androidDataPartitionSizeGbSettingError, z as detectProviders } from "./settings-BlyDn2Oz.mjs";
|
|
13
|
+
import { y as parkedMaxSetting } from "./ownership-B8d4kXBx.mjs";
|
|
14
|
+
import { c as startBuildProgress, n as NO_BUILD_PROGRESS } from "./build-progress-h60GPV27.mjs";
|
|
15
|
+
import { a as acquireBuildSlot, s as releaseBuildSlot } from "./in-use-D9XYEgFD.mjs";
|
|
16
|
+
import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-Dqnrjrio.mjs";
|
|
17
|
+
import { t as cleanLine } from "./server-expo-CeT1nIIk.mjs";
|
|
18
|
+
import { a as easAuthNote, c as loadProjectProvider, f as resolveEasCliBin, i as checkEasAuth, m as uploadRemote, n as UPLOAD_TIMEOUT_MS, o as exitAfterFlush, p as resolveRemote, r as cacheLevel, s as isEasAuthFailureText, t as RESOLVE_TIMEOUT_MS } from "./remote-cache-BRsRZru5.mjs";
|
|
19
|
+
import { F as ownedSessionName, S as withNativeBuildRun, a as ensureMetroReachable, c as remoteAndroidDeps, m as cancelledFailure, n as binOnPath, o as ensureRemoteBootOwned, u as resolveRemoteContext, x as runCancellation } from "./device-remote-C0_o-tJH.mjs";
|
|
20
|
+
import { _ as launchAndroidReleaseApp, d as deviceShellArg, f as installAndroidApp, g as launchAndroidApp, o as androidAppProcess, p as installConflictKind, r as DEFAULT_METRO_PORT, s as androidDevClientUrl, t as ADB_INSTALL_TIMEOUT_MS } from "./app-install-CsZi0SAT.mjs";
|
|
21
|
+
import { a as VERIFY_TIMEOUT_MS, d as verifyLaunch, i as RELEASE_VERIFY_WAIT_MS, l as unverifiedLaunchLines, n as LAUNCH_FATAL, r as LAUNCH_UNVERIFIED, t as LAUNCH_BUNDLING, u as verifyAndroidReleaseLaunch } from "./launch-verify-B2oR_kFN.mjs";
|
|
22
|
+
import { f as isEasBuildFailure, m as resolveEasDevelopmentBuild, o as unknownAndroidDeviceProfileRefusal, p as planEasDevelopmentBuild, r as checkDeviceCapacity, s as unknownAndroidSystemImageRefusal } from "./simslim-COtEEP7x.mjs";
|
|
23
|
+
import { f as spawnEntry, m as detectAppIds, p as detectAndroidPackage, s as startDevServer } from "./start-BboE1HIS.mjs";
|
|
24
|
+
import { a as lostLine, c as releaseLeaseOnSignal, i as leaseExpiryText, l as runLease, n as DEBUG_VERIFY_STEP_MS, o as lostRefusal, r as acquireRunLease, s as parseDeviceWait, t as selectFromPool, u as waitFlagConflict } from "./device-pool-BoezJd-c.mjs";
|
|
25
|
+
import { C as ensureDevServer, E as launchOutcomeRecord, O as warmMetro, T as isPhysicalDeviceRequest, _ as staleNativeDirRefusal, a as refusePlan, b as AvdBootError, c as skippedMissReason, f as detectEntryFile, g as runPrebuild, h as recordPrebuild, i as printPlan, l as devClientScheme, m as planPrebuild, n as planFlagRefusal, o as explainBuildMiss, r as planPayload, s as fingerprintErrorMissReason, t as planCachedBuild, u as pickDevClientScheme, v as ensureBooted, w as ensureWorkspaceStorageSafely, x as AvdRecoveryError, y as ensureOwnedDevice } from "./build-plan-CqntbR7b.mjs";
|
|
26
|
+
import { t as budgetGate } from "./budget-DbzW5VTD.mjs";
|
|
27
|
+
import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-D8rUTPHd.mjs";
|
|
28
|
+
import { a as buildAndroid, c as CCACHE_NOT_RUN, f as resolveCcache, l as CCACHE_UNAVAILABLE, n as resolveAndroidCas, o as productFlavorRefusal, p as formatDiagnostic, r as resolveAndroidCompilerCache, s as readProductFlavors, u as ccacheActivityLine } from "./android-cas-DzLPXiEn.mjs";
|
|
29
|
+
import { d as startBuildHeartbeat, f as tailLines, n as HEARTBEAT_INTERVAL_MS } from "./xcode-BzplpQzc.mjs";
|
|
30
|
+
import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-DIACGEfH.mjs";
|
|
31
|
+
import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-CCxjn31V.mjs";
|
|
32
32
|
import { constants, copyFileSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync } from "node:fs";
|
|
33
33
|
import { InvalidArgumentError } from "commander";
|
|
34
34
|
import { LAST_BUILD_KEYS } from "@stim-cli/core/state";
|
|
@@ -467,6 +467,21 @@ function deviceProfileRefusal({ flag, resolved, physical, remoteBackend, listPro
|
|
|
467
467
|
remedy: refusal.remedy
|
|
468
468
|
} : null;
|
|
469
469
|
}
|
|
470
|
+
function foldableImageRefusal({ profile, image, avdName, images, supportsFold }) {
|
|
471
|
+
if (!profileNeedsFoldFeature(profile) || !image || supportsFold(image)) return null;
|
|
472
|
+
const compatible = pickDefaultSystemImage(images().filter((candidate) => supportsFold(candidate.pkg)))?.pkg;
|
|
473
|
+
const message = `${avdName ? `This workspace's emulator ${avdName} uses device profile ${profile} on ${image}` : `Device profile ${profile} with system image ${image}`}, which the emulator refuses to boot: ${profile} needs a system image with foldable support (SupportPixelFold in its advancedFeatures.ini).`;
|
|
474
|
+
if (!compatible) return {
|
|
475
|
+
code: "STIM_BAD_ARG",
|
|
476
|
+
message,
|
|
477
|
+
remedy: `Install an image with foldable support, e.g. \`sdkmanager "system-images;android-36;google_apis;${hostSystemImageArch()}"\`, then pass it with \`--system-image\`, or pick another \`--device-profile\`.`
|
|
478
|
+
};
|
|
479
|
+
return {
|
|
480
|
+
code: "STIM_BAD_ARG",
|
|
481
|
+
message,
|
|
482
|
+
remedy: avdName ? `Pass \`--system-image "${compatible}"\`: it replaces ${avdName} if that emulator never finished a boot. Otherwise add \`--slot <name>\` to create the foldable beside it.` : `Pass \`--system-image "${compatible}"\` (or set android.systemImage to it), or pick another \`--device-profile\`.`
|
|
483
|
+
};
|
|
484
|
+
}
|
|
470
485
|
function isReleaseVariant(variant) {
|
|
471
486
|
return typeof variant === "string" && /release$/i.test(variant.trim());
|
|
472
487
|
}
|
|
@@ -1868,6 +1883,16 @@ function diagnoseBootFailure(booted, logFile, runCommand, physical) {
|
|
|
1868
1883
|
}
|
|
1869
1884
|
//#endregion
|
|
1870
1885
|
//#region src/commands/android/plan.ts
|
|
1886
|
+
function slotOwnedAvd(projectPath, slot) {
|
|
1887
|
+
const android = deviceSlotPlatforms(getProject(projectPath), slot)?.android;
|
|
1888
|
+
if (!android?.owned || !android.avdName || android.setupIncomplete) return null;
|
|
1889
|
+
const systemImage = ownedAvdSystemImage(android.avdName);
|
|
1890
|
+
return systemImage ? {
|
|
1891
|
+
avdName: android.avdName,
|
|
1892
|
+
systemImage,
|
|
1893
|
+
deviceProfile: ownedAvdDeviceProfile(android.avdName)
|
|
1894
|
+
} : null;
|
|
1895
|
+
}
|
|
1871
1896
|
function fail(code, message, remedy, { lines = [] } = {}) {
|
|
1872
1897
|
return {
|
|
1873
1898
|
ok: false,
|
|
@@ -1901,7 +1926,7 @@ function androidCompilerCache({ root, optimizations, settingsContext }) {
|
|
|
1901
1926
|
})}`
|
|
1902
1927
|
};
|
|
1903
1928
|
}
|
|
1904
|
-
function resolveAndroidRunPlan({ settings, settingsContext, slot, easProfile, variant: variantFlag, systemImage: systemImageFlag, deviceProfile: deviceProfileFlag, device: deviceFlag, wait: waitFlag, waitConflict, remote: commandRemoteBackend, buildCache: requestedBuildCache }, { warn, resolveCompilerCache = androidCompilerCache, resolveCacheProvider = resolveCacheProviderConfig, validateAvdConfig = androidAvdConfigSettingError, readFlavors = readProductFlavors, detectExpo = detectIsExpo, listSystemImages = listInstalledSystemImages, listDeviceProfiles = listAvdDeviceProfiles, parkedLimit = parkedMaxSetting }) {
|
|
1929
|
+
function resolveAndroidRunPlan({ settings, settingsContext, slot, easProfile, variant: variantFlag, systemImage: systemImageFlag, deviceProfile: deviceProfileFlag, device: deviceFlag, wait: waitFlag, waitConflict, remote: commandRemoteBackend, buildCache: requestedBuildCache }, { warn, resolveCompilerCache = androidCompilerCache, resolveCacheProvider = resolveCacheProviderConfig, validateAvdConfig = androidAvdConfigSettingError, readFlavors = readProductFlavors, detectExpo = detectIsExpo, listSystemImages = listInstalledSystemImages, listDeviceProfiles = listAvdDeviceProfiles, parkedLimit = parkedMaxSetting, supportsFold = systemImageSupportsFold, ownedAvd = slotOwnedAvd }) {
|
|
1905
1930
|
const root = settingsContext.projectPath;
|
|
1906
1931
|
const [shapeError, ...moreShapeErrors] = [parkedLimit("android").error, ...settingShapeErrors(settings)].filter((error) => Boolean(error));
|
|
1907
1932
|
if (shapeError) return fail("STIM_BAD_ARG", shapeError, SETTING_SHAPE_REMEDY, { lines: moreShapeErrors });
|
|
@@ -1967,6 +1992,21 @@ function resolveAndroidRunPlan({ settings, settingsContext, slot, easProfile, va
|
|
|
1967
1992
|
listProfiles: listDeviceProfiles
|
|
1968
1993
|
});
|
|
1969
1994
|
if (profileRefusal) return fail(profileRefusal.code, profileRefusal.message, profileRefusal.remedy);
|
|
1995
|
+
if (!physical && !remoteBackend) {
|
|
1996
|
+
const flagImage = typeof systemImageFlag === "string" && systemImageFlag.trim() ? systemImageFlag.trim() : null;
|
|
1997
|
+
const existing = ownedAvd(root, slot);
|
|
1998
|
+
const profile = deviceProfile ?? existing?.deviceProfile ?? DEFAULT_AVD_DEVICE_PROFILE;
|
|
1999
|
+
const image = () => flagImage ?? existing?.systemImage ?? systemImage ?? pickDefaultSystemImage(listSystemImages())?.pkg ?? null;
|
|
2000
|
+
const checked = profileNeedsFoldFeature(profile) ? image() : null;
|
|
2001
|
+
const foldRefusal = checked !== null && foldableImageRefusal({
|
|
2002
|
+
profile,
|
|
2003
|
+
image: checked,
|
|
2004
|
+
avdName: existing && existing.systemImage === checked && existing.deviceProfile === profile ? existing.avdName : null,
|
|
2005
|
+
images: listSystemImages,
|
|
2006
|
+
supportsFold
|
|
2007
|
+
});
|
|
2008
|
+
if (foldRefusal) return fail(foldRefusal.code, foldRefusal.message, foldRefusal.remedy);
|
|
2009
|
+
}
|
|
1970
2010
|
const target = physical ? {
|
|
1971
2011
|
kind: "physical",
|
|
1972
2012
|
serial: typeof deviceFlag === "string" ? deviceFlag : null,
|
|
@@ -2567,10 +2607,11 @@ async function runAndroid(options = {}) {
|
|
|
2567
2607
|
buildCache: requestedBuildCache
|
|
2568
2608
|
});
|
|
2569
2609
|
if (isEasBuildFailure(easBuild)) return fail(easBuild.code, easBuild.message, easBuild.remedy);
|
|
2570
|
-
|
|
2610
|
+
const appIds = detectAppIds(root);
|
|
2611
|
+
let androidPackage = appIds.androidPackage;
|
|
2571
2612
|
record.bundleId = androidPackage;
|
|
2572
2613
|
const registerProject = () => upsertProject(root, {
|
|
2573
|
-
bundleId:
|
|
2614
|
+
bundleId: appIds.bundleId ?? void 0,
|
|
2574
2615
|
androidPackage: androidPackage ?? void 0,
|
|
2575
2616
|
isExpo
|
|
2576
2617
|
});
|
|
@@ -2686,6 +2727,7 @@ async function runAndroid(options = {}) {
|
|
|
2686
2727
|
settings,
|
|
2687
2728
|
flags: {
|
|
2688
2729
|
systemImage: target.systemImage,
|
|
2730
|
+
systemImageFlag: systemImageFlag?.trim() || null,
|
|
2689
2731
|
deviceProfile: target.deviceProfile
|
|
2690
2732
|
},
|
|
2691
2733
|
note: out,
|
|
@@ -2721,7 +2763,8 @@ async function runAndroid(options = {}) {
|
|
|
2721
2763
|
abandonCreatedSession: remoteDevice.abandonCreatedSession,
|
|
2722
2764
|
webPreviewUrl: remoteDevice.webPreviewUrl,
|
|
2723
2765
|
writeState,
|
|
2724
|
-
register: registerProject
|
|
2766
|
+
register: registerProject,
|
|
2767
|
+
notice: (line) => out(chalk.dim(phaseLine("lock", line)))
|
|
2725
2768
|
}) : boot()).then((result) => {
|
|
2726
2769
|
bootDuration = bootTimer();
|
|
2727
2770
|
return result;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as getConfigDir } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
|
-
import { r as register } from "./cache-manifest-
|
|
4
|
-
import { C as sharedCcache, P as withDirLock, j as workspaceLogsDir, x as ensureWorkspaceStorage } from "./metro-
|
|
5
|
-
import { a as spawnDeclared } from "./spawn-claims-
|
|
3
|
+
import { r as register } from "./cache-manifest-DWPF4RKJ.mjs";
|
|
4
|
+
import { C as sharedCcache, P as withDirLock, j as workspaceLogsDir, x as ensureWorkspaceStorage } from "./metro-Dzo30hvJ.mjs";
|
|
5
|
+
import { a as spawnDeclared } from "./spawn-claims-PT8aQpCa.mjs";
|
|
6
6
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
7
|
-
import { l as phaseLine } from "./command-output-
|
|
8
|
-
import {
|
|
9
|
-
import { d as startBuildHeartbeat, n as HEARTBEAT_INTERVAL_MS } from "./xcode-
|
|
7
|
+
import { l as phaseLine } from "./command-output-BWCj5Vh-.mjs";
|
|
8
|
+
import { a as androidHome } from "./android-75Sk2rIR.mjs";
|
|
9
|
+
import { d as startBuildHeartbeat, n as HEARTBEAT_INTERVAL_MS } from "./xcode-BzplpQzc.mjs";
|
|
10
10
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
|
|
11
11
|
import { isJsonObject, readJsonFile } from "@stim-cli/core/state";
|
|
12
12
|
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
2
|
-
import { T as uninstallIosApp, c as iosSimulatorFailureAdvice, p as listUserApps } from "./ios-
|
|
2
|
+
import { T as uninstallIosApp, c as iosSimulatorFailureAdvice, p as listUserApps } from "./ios-CZWOHTTc.mjs";
|
|
3
3
|
import { closeSync, lstatSync, openSync, readSync, readdirSync } from "node:fs";
|
|
4
4
|
import { isAbsolute, join } from "node:path";
|
|
5
5
|
import { createHash } from "node:crypto";
|