@stim-cli/core 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/state.d.mts +27 -2
- package/dist/state.mjs +24 -3
- package/package.json +1 -1
package/dist/state.d.mts
CHANGED
|
@@ -25,6 +25,7 @@ interface AndroidDeviceRecord {
|
|
|
25
25
|
deviceName?: string | null;
|
|
26
26
|
owned?: boolean;
|
|
27
27
|
setupIncomplete?: boolean;
|
|
28
|
+
bootPending?: boolean;
|
|
28
29
|
[key: string]: unknown;
|
|
29
30
|
}
|
|
30
31
|
type DeviceRecord = IosDeviceRecord | AndroidDeviceRecord;
|
|
@@ -296,6 +297,7 @@ type SettingType = {
|
|
|
296
297
|
* `.stim.json` instead of the app's. A `sensitive` value is never printed and is
|
|
297
298
|
* written to `.stim.json` only as an `env:` or `file:` reference. `scopedHomeValue`
|
|
298
299
|
* replaces every layer and the default while STIM_HOME is set and `env` is not.
|
|
300
|
+
* `desktopDefault` replaces `default` on macOS while Stim Desktop is installed.
|
|
299
301
|
*/
|
|
300
302
|
interface SettingDefinition {
|
|
301
303
|
key: string;
|
|
@@ -307,6 +309,7 @@ interface SettingDefinition {
|
|
|
307
309
|
sensitive?: boolean;
|
|
308
310
|
committedAt?: "repository";
|
|
309
311
|
scopedHomeValue?: number;
|
|
312
|
+
desktopDefault?: string;
|
|
310
313
|
}
|
|
311
314
|
interface SettingEntry {
|
|
312
315
|
key: string;
|
|
@@ -318,6 +321,7 @@ interface SettingEntry {
|
|
|
318
321
|
value: string;
|
|
319
322
|
};
|
|
320
323
|
sensitive?: true;
|
|
324
|
+
defaultReason?: string;
|
|
321
325
|
}
|
|
322
326
|
/** The payload `stim settings --json` prints. */
|
|
323
327
|
interface SettingsPayload {
|
|
@@ -430,9 +434,11 @@ interface BuildMissChange {
|
|
|
430
434
|
/**
|
|
431
435
|
* Why a run compiled instead of installing a cached app. `changes` holds at most 20 entries,
|
|
432
436
|
* ordered by importance; `changeCount` is the full number of changed fingerprint sources.
|
|
437
|
+
* Only a plan reports `prebuild-pending`: the run would prebuild before compiling, so the changes
|
|
438
|
+
* compare the fingerprint before that prebuild.
|
|
433
439
|
*/
|
|
434
440
|
interface BuildMissReason {
|
|
435
|
-
kind: "changed" | "no-baseline" | "same-sources" | "cache-skipped" | "fingerprint-error";
|
|
441
|
+
kind: "changed" | "no-baseline" | "same-sources" | "cache-skipped" | "fingerprint-error" | "prebuild-pending";
|
|
436
442
|
summary: string;
|
|
437
443
|
changes: BuildMissChange[];
|
|
438
444
|
changeCount: number;
|
|
@@ -457,6 +463,8 @@ interface BuildPlanPayload {
|
|
|
457
463
|
outcome: RunOutcomeKind | null;
|
|
458
464
|
expectedMs: number | null;
|
|
459
465
|
basis: number;
|
|
466
|
+
/** On a predicted miss with cache reads on, why the cache has no app; `baseline` omits `cacheKey`. */
|
|
467
|
+
missReason?: BuildMissReason;
|
|
460
468
|
refusal?: {
|
|
461
469
|
code: string;
|
|
462
470
|
message: string;
|
|
@@ -510,6 +518,21 @@ interface RemoteDeviceState {
|
|
|
510
518
|
startedAt: string | null;
|
|
511
519
|
webPreviewUrl: string | null;
|
|
512
520
|
}
|
|
521
|
+
/** Every code a status issue can carry. */
|
|
522
|
+
declare const STATUS_ISSUE_CODES: readonly ["port-not-ours", "sim-missing", "sim-without-metro", "avd-serial-changed", "avd-missing", "avd-not-detected", "avd-unchecked", "supervisor-unverified"];
|
|
523
|
+
type StatusIssueCode = (typeof STATUS_ISSUE_CODES)[number];
|
|
524
|
+
/**
|
|
525
|
+
* One thing in a workspace that needs the user. `remedy` is a command to run from `workspace`; `slot` is absent
|
|
526
|
+
* for the default device slot. `warnings` carries the same issues as text.
|
|
527
|
+
*/
|
|
528
|
+
interface StatusIssue {
|
|
529
|
+
code: StatusIssueCode;
|
|
530
|
+
severity: "error" | "warning";
|
|
531
|
+
message: string;
|
|
532
|
+
remedy: string;
|
|
533
|
+
workspace: string;
|
|
534
|
+
slot?: string;
|
|
535
|
+
}
|
|
513
536
|
interface EnvironmentState {
|
|
514
537
|
slots?: {
|
|
515
538
|
slot: string;
|
|
@@ -520,6 +543,7 @@ interface EnvironmentState {
|
|
|
520
543
|
live: boolean;
|
|
521
544
|
memoryMb: number;
|
|
522
545
|
warnings: string[];
|
|
546
|
+
issues: StatusIssue[];
|
|
523
547
|
ios?: {
|
|
524
548
|
name: string | null;
|
|
525
549
|
udid: string;
|
|
@@ -533,6 +557,7 @@ interface EnvironmentState {
|
|
|
533
557
|
physical: boolean;
|
|
534
558
|
serial?: string | null;
|
|
535
559
|
state?: AndroidRuntimeFacts["state"];
|
|
560
|
+
deviceProfile?: string | null;
|
|
536
561
|
activity?: DeviceActivity;
|
|
537
562
|
} | null;
|
|
538
563
|
metro?: {
|
|
@@ -586,4 +611,4 @@ interface StatusPayload {
|
|
|
586
611
|
simctlAvailable: boolean;
|
|
587
612
|
}
|
|
588
613
|
//#endregion
|
|
589
|
-
export { ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, ActiveBuildState, ActivityDriver, AndroidRuntimeFacts, BUILD_PHASES, BuildCacheHit, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlanPayload, BuildReport, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DeviceActivity, DeviceLeaseState, DeviceRecord, DoctorRunRecord, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EnvironmentState, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, LAST_BUILD_KEYS, LEVELS, LastBuildReport, NdjsonRecord, PlatformRecords, ProjectRecord, QueryCriteria, REMOTE_DEVICE_BACKENDS, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunOutcomeKind, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingsObject, SettingsPayload, StatsPlatform, StatusCapacity, StatusPayload, StimConfig, SupervisorRecord, TUNNEL_MODES, TunnelMode, WorkspaceState, WorktreeFacts, WorktreeGit, acceptsShape, advanceTail, allMetroPorts, attachExpoErrorContext, buildCriteria, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, createdDevicesFile, createdDevicesLock, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, expectedShape, fileSizes, findEnclosingWorktreeRoot, findProjectByMetroPort, followLogs, getConcurrencyLimits, getConfigPath, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, lastUseFrom, levelRank, loadConfig, logFiles, markerWindow, parseNdjsonLine, parseNdjsonText, parseSince, queryLogs, readCreatedDevices, readEasSessionLedger, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readNdjsonGenerations, readWorkspaceState, recordMatches, settingDefinition, settingValueError, settingsJsonSchema, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, supervisorLogFile, supervisorPidFile, tailRead, validEasSessionClaim, withConfigLock, workspaceDerivedData, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceStateFile, workspaceStateLock };
|
|
614
|
+
export { ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, ActiveBuildState, ActivityDriver, AndroidRuntimeFacts, BUILD_PHASES, BuildCacheHit, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlanPayload, BuildReport, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DeviceActivity, DeviceLeaseState, DeviceRecord, DoctorRunRecord, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EnvironmentState, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, LAST_BUILD_KEYS, LEVELS, LastBuildReport, NdjsonRecord, PlatformRecords, ProjectRecord, QueryCriteria, REMOTE_DEVICE_BACKENDS, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunOutcomeKind, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATUS_ISSUE_CODES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingsObject, SettingsPayload, StatsPlatform, StatusCapacity, StatusIssue, StatusIssueCode, StatusPayload, StimConfig, SupervisorRecord, TUNNEL_MODES, TunnelMode, WorkspaceState, WorktreeFacts, WorktreeGit, acceptsShape, advanceTail, allMetroPorts, attachExpoErrorContext, buildCriteria, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, createdDevicesFile, createdDevicesLock, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, expectedShape, fileSizes, findEnclosingWorktreeRoot, findProjectByMetroPort, followLogs, getConcurrencyLimits, getConfigPath, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, lastUseFrom, levelRank, loadConfig, logFiles, markerWindow, parseNdjsonLine, parseNdjsonText, parseSince, queryLogs, readCreatedDevices, readEasSessionLedger, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readNdjsonGenerations, readWorkspaceState, recordMatches, settingDefinition, settingValueError, settingsJsonSchema, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, supervisorLogFile, supervisorPidFile, tailRead, validEasSessionClaim, withConfigLock, workspaceDerivedData, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceStateFile, workspaceStateLock };
|
package/dist/state.mjs
CHANGED
|
@@ -957,7 +957,8 @@ const SETTINGS = [
|
|
|
957
957
|
},
|
|
958
958
|
scopes: MACHINE,
|
|
959
959
|
default: "xcode",
|
|
960
|
-
|
|
960
|
+
desktopDefault: "stim-desktop",
|
|
961
|
+
description: "App that displays an owned iOS simulator; stim-desktop by default when Stim Desktop is installed"
|
|
961
962
|
},
|
|
962
963
|
{
|
|
963
964
|
key: "androidEmulatorApp",
|
|
@@ -967,7 +968,8 @@ const SETTINGS = [
|
|
|
967
968
|
},
|
|
968
969
|
scopes: MACHINE,
|
|
969
970
|
default: "emulator",
|
|
970
|
-
|
|
971
|
+
desktopDefault: "stim-desktop",
|
|
972
|
+
description: "App that displays an owned Android emulator Stim boots on macOS; stim-desktop by default when Stim Desktop is installed"
|
|
971
973
|
},
|
|
972
974
|
{
|
|
973
975
|
key: "concurrency.maxBuilds",
|
|
@@ -1019,6 +1021,14 @@ const SETTINGS = [
|
|
|
1019
1021
|
scopedHomeValue: 0,
|
|
1020
1022
|
description: "Live workspaces before idle ones are reclaimed; unset or 0 means no limit"
|
|
1021
1023
|
},
|
|
1024
|
+
{
|
|
1025
|
+
key: "gc.worktreeGraceMinutes",
|
|
1026
|
+
type: CAPACITY,
|
|
1027
|
+
scopes: MACHINE,
|
|
1028
|
+
default: 120,
|
|
1029
|
+
env: "STIM_GC_WORKTREE_GRACE_MINUTES",
|
|
1030
|
+
description: "Minutes after a linked worktree last changed, or its branch merged, before gc removes it; 0 removes it at once"
|
|
1031
|
+
},
|
|
1022
1032
|
{
|
|
1023
1033
|
key: "pool.iosParkedMax",
|
|
1024
1034
|
type: PARKED_MAX,
|
|
@@ -1249,6 +1259,17 @@ const BUILD_PHASES = [
|
|
|
1249
1259
|
"install",
|
|
1250
1260
|
"launch"
|
|
1251
1261
|
];
|
|
1262
|
+
/** Every code a status issue can carry. */
|
|
1263
|
+
const STATUS_ISSUE_CODES = [
|
|
1264
|
+
"port-not-ours",
|
|
1265
|
+
"sim-missing",
|
|
1266
|
+
"sim-without-metro",
|
|
1267
|
+
"avd-serial-changed",
|
|
1268
|
+
"avd-missing",
|
|
1269
|
+
"avd-not-detected",
|
|
1270
|
+
"avd-unchecked",
|
|
1271
|
+
"supervisor-unverified"
|
|
1272
|
+
];
|
|
1252
1273
|
//#endregion
|
|
1253
1274
|
//#region state/workspace-state.ts
|
|
1254
1275
|
const IDLE_STOP_KEY = "devServerStop";
|
|
@@ -1370,4 +1391,4 @@ function workspaceLastUsed(root) {
|
|
|
1370
1391
|
return lastUseFrom(readWorkspaceState(root), mtimes);
|
|
1371
1392
|
}
|
|
1372
1393
|
//#endregion
|
|
1373
|
-
export { ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, BUILD_PHASES, ERROR_SOURCES, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, LAST_BUILD_KEYS, LEVELS, REMOTE_DEVICE_BACKENDS, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, TUNNEL_MODES, acceptsShape, advanceTail, allMetroPorts, attachExpoErrorContext, buildCriteria, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, createdDevicesFile, createdDevicesLock, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, expectedShape, fileSizes, findEnclosingWorktreeRoot, findProjectByMetroPort, followLogs, getConcurrencyLimits, getConfigPath, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, lastUseFrom, levelRank, loadConfig, logFiles, markerWindow, parseNdjsonLine, parseNdjsonText, parseSince, queryLogs, readCreatedDevices, readEasSessionLedger, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readNdjsonGenerations, readWorkspaceState, recordMatches, settingDefinition, settingValueError, settingsJsonSchema, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, supervisorLogFile, supervisorPidFile, tailRead, validEasSessionClaim, withConfigLock, workspaceDerivedData, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceStateFile, workspaceStateLock };
|
|
1394
|
+
export { ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, BUILD_PHASES, ERROR_SOURCES, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, LAST_BUILD_KEYS, LEVELS, REMOTE_DEVICE_BACKENDS, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATUS_ISSUE_CODES, TUNNEL_MODES, acceptsShape, advanceTail, allMetroPorts, attachExpoErrorContext, buildCriteria, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, createdDevicesFile, createdDevicesLock, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, expectedShape, fileSizes, findEnclosingWorktreeRoot, findProjectByMetroPort, followLogs, getConcurrencyLimits, getConfigPath, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, lastUseFrom, levelRank, loadConfig, logFiles, markerWindow, parseNdjsonLine, parseNdjsonText, parseSince, queryLogs, readCreatedDevices, readEasSessionLedger, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readNdjsonGenerations, readWorkspaceState, recordMatches, settingDefinition, settingValueError, settingsJsonSchema, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, supervisorLogFile, supervisorPidFile, tailRead, validEasSessionClaim, withConfigLock, workspaceDerivedData, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceStateFile, workspaceStateLock };
|