@stim-cli/core 1.23.0 → 1.24.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/{core-BTsCO1nW.mjs → core-Bzz_SIGQ.mjs} +45 -21
- package/dist/{index-DKq1j8dw.d.mts → index-B8_6CrJ-.d.mts} +15 -3
- package/dist/index.d.mts +21 -5
- package/dist/index.mjs +3 -3
- package/dist/{ownership-claim-DHUs_Dir.mjs → ownership-claim-DG2GMIoo.mjs} +1 -1
- package/dist/ownership-claim.mjs +1 -1
- package/dist/phone-protocol.d.mts +2 -2
- package/dist/{protocol-DuaMg7RJ.d.mts → protocol-CrDIdn30.d.mts} +28 -5
- package/dist/protocol.d.mts +2 -2
- package/dist/protocol.mjs +11 -0
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +88 -38
- package/dist/toolchain.d.mts +22 -7
- package/dist/toolchain.mjs +93 -32
- package/package.json +1 -1
package/dist/state.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ReadStatsResult, $a as readHostedAppMetadata, $c as isPathPrefix, $i as HostedDevicePlatform, $l as parseNdjsonText, $n as StatusIssueCode, $o as recordingEnabled, $r as unreadableHostedIos, $s as openLogDir, $t as AndroidDeviceState, A as readLogsSince, Aa as HostedAppLaunch, Ac as readEasSessionLedger, Ai as buildDiagnostics, Al as tryAcquireBuildSlotClaim, An as GitChipPart, Ao as isLayeredSetting, Ar as readArchives, As as serverSetupDir, At as StatusCacheEntry, B as HOSTED_METRO_REQUESTS_KEY, Ba as parseHostedMacosDevice, Bc as createDebugLog, Bi as readWarmRecord, Bl as agentDeviceUsageFile, Bn as NATIVE_BUILD_STEPS, Bo as RecordedDevice, Br as MaintenanceSize, Bs as workspaceBuildDetailFile, Bt as readDiskUsageFailure, C as HOSTED_LOGS_PAGE_BYTES, Ca as HOSTED_AGENT_DRIVERS, Cc as tailRead, Ci as MAINTENANCE_LOG_NAME, Cl as parseMachineCredential, Cn as DeviceLeaseState, Co as TUNNEL_MODES, Cr as ArchivedWorkspace, Cs as maintenanceChildLogFile, Ct as DeviceViewersRecord, D as hostedNativeLogsDir, Da as HostedAgentGrant, Dc as EasSessionClaim, Di as WORKSPACE_AGENT_KEY, Dl as buildSlotsDir, Dn as EnvironmentDisk, Do as acceptsShape, Dr as readArchive, Ds as maintenanceStateFile, Dt as AgentSessionsCache, E as hostedMacosLogsDir, Ea as HostedAgentDriverName, Ec as CreatedDevices, Ei as WARM_KEY, El as buildSlotPath, En as EndedAgentSession, Eo as WebViewport, Er as linkReplacedArchives, Es as maintenanceRunClaims, Et as stimBuildDigest, F as endpoint, Fa as hostedMacosAppSlot, Fc as readStateFile, Fi as readDevServerStopRequest, Fl as SwiftpmCacheUsage, Fn as MachineOwnerKind, Fo as runId, Fr as MaintenanceCheck, Fs as sharedPods, Ft as listStatusCacheEntries, G as DeviceHostMachineCredential, Ga as HostedAppOffer, Gc as buildWorkerRoot, Gi as DeviceHostLimits, Gl as AgentTarget, Gn as PlannedPhase, Go as footageDrops, Gr as readMaintenanceAttempt, Gs as workspaceLogErrorIndex, Gt as ACTIVITY_RECENCY_BASES, H as HostedMetroRequest, Ha as HOSTED_APP_CHUNK_BYTES, Hc as debugLoggingEnabled, Hi as readWorkspaceState, Hl as readAgentDeviceUsageCache, Hn as PHYSICAL_DEVICE_CONNECTIONS, Ho as RecordingPlatform, Hr as MaintenanceStatus, Hs as workspaceEndedAgentsFile, Ht as readPullRequestCache, I as findPeer, Ia as hostedMacosBundleId, Ic as withStateReadCache, Ii as readDeviceIdleShutdowns, Il as readSwiftpmCacheUsage, In as MachineUsageState, Io as validRunId, Ir as MaintenanceMode, Is as statsFile, It as pullRequestCacheFile, J as CAPACITY_REFUSAL_LIMIT, Ja as hostedAppAttempt, Jc as getConcurrencyLimits, Ji as HostedAndroidDevice, Jl as LEVELS, Jn as STATUS_ISSUE_CODES, Jo as listSegments, Jr as HostedIosStatus, Js as workspaceRecordingsDir, Jt as ActiveBuildState, K as readDeviceHostMachines, Ka as HostedAppRecord, Kc as configCorruptRepair, Ki as HOSTED_PARKED_CANDIDATES, Kl as createAgentActionReader, Kn as RemoteDeviceState, Ko as listRecordedDevices, Kr as readMaintenanceState, Ks as workspaceLogsDir, Kt as AGENT_TOOLS, L as machineEndpoint, La as parseHostedAgentAccess, Lc as readHomeIdentity, Li as readDevicePlacement, Ll as swiftpmCacheUsageFile, Ln as MacosBuildPlanPayload, Lo as RECORDING_CAP_BYTES, Lr as MaintenancePass, Ls as supervisorLogFile, Lt as readAgentSessionsCache, M as TAILNET_MACHINE_PATTERN, Ma as HostedMacosDevice, Mc as isJsonObject, Mi as parseMissReason, Ml as SimRuntimeUsage, Mn as MACHINE_OWNER_KINDS, Mo as settingDefinition, Mr as DiskPressureLevel, Ms as sharedCcache, Mt as diskUsageCacheFile, N as TailnetPeer, Na as HostedMacosPlacement, Nc as readJsonFile, Ni as readBuildHistory, Nl as machineCacheUsageFile, Nn as MEMORY_SOURCES, No as settingValueError, Nr as MaintenanceAction, Ns as sharedCompilationCache, Nt as diskUsageFailureFile, O as parseHostedLogsCursor, Oa as HostedAgentIssuedGrant, Oc as EasSessionLedgerRead, Oi as WarmRecord, Ol as machineCapacity, On as EnvironmentState, Oo as coerceSettingText, Or as readArchiveAsync, Os as pullRequestCacheDir, Ot as ENDED_AGENT_RETENTION_MS, P as cannotHost, Pa as hostedAgentDriverName, Pc as readJsonObject, Pi as readDevServerStop, Pl as readMachineCacheUsage, Pn as MachineOwner, Po as RUN_ID_ENV, Pr as MaintenanceActionKind, Ps as sharedGradle, Pt as endedAgentSessionOf, Q as PLACEMENT_DECISIONS, Qa as readHostedApp, Qc as getRepoSettings, Qi as HostedDevicePhase, Ql as parseNdjsonLine, Qn as StatusIssue, Qo as recordingDeviceName, Qr as parseHostedIosPlacement, Qs as LogDirQuery, Qt as AgentTool, R as parseMachine, Ra as parseHostedAgentGrant, Rc as DEBUG_ENV, Ri as readIdleStop, Rl as AgentDeviceUsage, Rn as MemorySource, Ro as RECORDING_FOOTAGE_MS, Rr as MaintenancePressure, Rs as supervisorPidFile, Rt as readBuildDetail, S as HOSTED_LOGS_FIRST_BYTES, Sa as readHostedSessions, Sc as sortByTs, Si as LAST_BUILD_KEYS, Sl as MachineCredential, Sn as DeviceAppProcess, So as SettingsPayload, Sr as ArchivedUsage, Ss as maintenanceAttemptFile, St as wholePhases, T as HostedLogsPage, Ta as HostedAgentAccess, Tc as CreatedDevicePlatform, Ti as READY_PHASE_MS, Tl as MachineCapacity, Tn as DiskMeasure, To as WEB_VIEWPORTS, Tr as archivedUsage, Ts as maintenanceNdjsonFile, Tt as readViewedDevices, U as hostedMetroGateways, Ua as HostedAppDelivery, Uc as ParkedMax, Ui as workspaceLastUsed, Ul as AgentActionReaderOptions, Un as PhysicalDeviceConnection, Uo as capDrops, Ur as MemoryCulprit, Us as workspaceEndedAgentsLock, Ut as withDerivedFacts, V as HostedMetroGateway, Va as parseHostedMacosPlacement, Vc as debugLogDir, Vi as readWorkspaceAgent, Vl as readAgentDeviceUsage, Vn as NativeBuildStep, Vo as RecordedSegment, Vr as MaintenanceState, Vs as workspaceDerivedData, Vt as readEndedAgentSessions, W as hostedMetroRequests, Wa as HostedAppFile, Wc as allMetroPorts, Wi as DEVICE_HOST_LIMITS, Wl as AgentRecordSelection, Wn as PhysicalDeviceState, Wo as closedSegmentName, Wr as parseMaintenanceState, Ws as workspaceGradleBuild, Wt as withGitChip, X as HISTORY_LIMIT, Xa as parseHostedAppManifest, Xc as getProject, Xi as HostedDeviceOffer, Xl as SOURCES, Xn as StatsPlatform, Xo as openSegmentName, Xr as hostedIosRecords, Xs as workspaceStateLock, Xt as ActivityRecencyBasis, Y as CAPACITY_REFUSAL_MAX_AGE_MS, Ya as hostedAppBlobs, Yc as getParkedMax, Yi as HostedDevice, Yl as NdjsonRecord, Yn as SimulatorState, Yo as listSegmentsAsync, Yr as hostedIosPlacements, Ys as workspaceStateFile, Yt as ActivityDriver, Z as OffloadSummary, Za as parseHostedAppOffer, Zc as getProjectSettings, Zi as HostedDeviceOfferRequest, Zl as levelRank, Zn as StatusCapacity, Zo as recordedBytes, Zr as hostedIosStatus, Zs as LogDir, Zt as AgentSession, _ as isSetupJournalPrunable, _a as parseHostedOfferRequest, _c as queryJsonLogs, _i as DevServerStopRecord, _l as StimConfig, _n as BuildReport, _o as SettingDefinition, _r as macosAppState, _s as easSessionLedgerFile, _t as readStatsReport, a as MachineView, aa as HostedNativeOffer, ac as advanceTail, ai as hostedAndroidStatus, al as AutomaticPoolRole, an as BuildCacheHit, ao as settingsJsonSchema, ar as WarmStep, as as buildMachinesLock, at as StatsCapacityRefusal, b as agentDeviceStateDirs, ba as readHostedDevice, bc as readLogTimeline, bi as IDLE_STOP_KEY, bl as BuildMachineCredential, bn as ChecksState, bo as SettingType, br as readMacosRecord, bs as getConfigPath, bt as trimCapacityWaits, c as SummaryBuild, ca as deviceHostRoot, cc as bundleMarkerPlatform, ci as HostedNativePlacement, cl as validateAutomaticPool, cn as BuildDiagnostic, co as ANDROID_PCH_CHOICES, cr as WorkspacePhase, cs as createdDevicesFile, ct as StatsRecord, d as WorktreeRow, da as hostedWorkerSettleMs, dc as followLogs, di as unreadableHostedNative, dl as DeviceRecord, dn as BuildMissChange, do as OffloadMode, dr as WorktreeGit, ds as deviceHostMachinesFile, dt as decodeStats, ea as HostedDeviceRequest, ec as ERROR_SOURCES, ei as HostedAndroidPlacement, el as loadConfig, en as AndroidRuntimeFacts, eo as rememberHostedAppBlobRename, er as StatusPayload, es as agentSessionsCacheFile, et as RunEstimates, eu as readNdjsonGenerations, f as statusViews, fa as parseHostedAndroidDevice, fc as isExpoErrorContext, fi as BUILD_HISTORY_KEY, fl as DoctorRunRecord, fn as BuildMissReason, fo as REMOTE_DEVICE_BACKENDS, fr as WorktreePullRequest, fs as deviceHostMachinesLock, ft as findProjectRoot, g as isJournalExpired, ga as parseHostedNativeOffer, gc as planLogQuery, gi as DEV_SERVER_STOP_REQUEST_KEY, gl as SettingsObject, gn as BuildPlatform, go as SETTING_SCOPES, gr as MacosProcess, gs as easMachineStateRoot, gt as readStats, h as SetupJournal, ha as parseHostedLocalDeviceCount, hc as parseSince, hi as DEVICE_RECLAIM_REASON, hl as RepoRecord, hn as BuildPlanPayload, ho as SETTING_GROUPS, hr as MacosBuild, hs as diskUsageWalkClaims, ht as readRunEstimates, i as ArchivedSummary, ia as HostedIosDevice, ic as QueryCriteria, ii as hostedAndroidRecords, il as withConfigLockAsync, in as BuildActivity, io as SETTINGS_SCHEMA_URL, ir as WORKSPACE_STAGE_KINDS, is as buildMachinesFile, it as StatsBucket, j as Endpoint, ja as HostedMacosChoice, jc as validEasSessionClaim, ji as lastUseFrom, jl as MachineCacheUsage, jn as LastBuildReport, jo as isSensitiveReference, jr as readArchivesAsync, js as setupJournalFile, jt as agentSessionOf, k as readHostedNativeLogsCheckpoint, ka as HostedAgentLease, kc as readCreatedDevices, ki as WorkspaceState, kl as saturation, kn as GitChip, ko as expectedShape, kr as readArchiveState, ks as serverLocalSocket, kt as PullRequestCacheEntry, l as SummaryHistoryEntry, la as hostedConsolePort, lc as compileGrep, li as hostedNativeRecords, ll as ConcurrencyLimits, ln as BuildHistoryEntry, lo as IOS_SIMULATOR_APPS, lr as WorkspaceStage, ls as createdDevicesLock, lt as StatsReport, m as SetupCapability, ma as parseHostedDevice, mc as markerWindow, mi as DEVICE_IDLE_SHUTDOWN_KEY, ml as ProjectRecord, mn as BuildPlacement, mo as SETTINGS, mr as MacosAppState, ms as diskUsageCacheDir, mt as projectRootDirectories, n as KeyedEntities, na as HostedDeviceSession, nc as LogQueryPlan, ni as hostedAndroidDeviceName, nl as windowsShortDirKey, nn as BUILD_PHASES, no as validHostedAppBlob, nr as WEB_PAGE_STATES, ns as archiveLock, nt as RunSample, o as SUMMARY_ARCHIVES, oa as assertHostedDeviceLedger, oc as attachExpoErrorContext, oi as parseHostedAndroidPlacement, ol as automaticMachineEnabled, on as BuildCause, oo as ANDROID_COMPILER_CACHE_CHOICES, or as WebBrowserState, os as clientIdentityKeyFile, ot as StatsCapacityWait, p as workspaceSummary, pa as parseHostedChoice, pc as logFiles, pi as BUILD_HISTORY_LIMIT, pl as PlatformRecords, pn as BuildPhase, po as RemoteDeviceBackend, pr as MacosAppRecord, ps as deviceViewersDir, pt as offloadSummary, q as BuildMachineTotals, qa as hostedAppArea, qc as findEnclosingWorktreeRoot, qi as HostedAndroidChoice, ql as createAsyncAgentActionReader, qn as RunOutcomeKind, qo as listRecordedDevicesAsync, qr as HostedIosPlacement, qs as workspaceMetadataFile, qt as APP_PROCESS_STATES, r as applyKeyedDelta, ra as HostedIosChoice, rc as NATIVE_CRASH_LOG_PREFIX, ri as hostedAndroidPlacements, rl as withConfigLock, rn as BUILD_RESULTS, ro as SETTINGS_SCHEMA_FILE, rr as WORKSPACE_PHASES, rs as archiveRoot, rt as STATS_VERSION, s as StatusViews, sa as deviceHostArea, sc as buildCriteria, si as unreadableHostedAndroid, sl as requireAutomaticMachine, sn as BuildDetail, so as ANDROID_EMULATOR_APPS, sr as WebPageState, ss as configLockPath, st as StatsPlacement, t as KeyedDelta, ta as HostedDeviceSelectors, tc as LogQueryOptions, ti as HostedAndroidStatus, tl as windowsShortDir, tn as AppPresence, to as validHostedAppArguments, tr as TUTORIAL_VERSION, ts as archiveDir, tt as RunHistory, u as WorkspaceSummary, ua as hostedDeviceId, uc as fileSizes, ui as parseHostedNativePlacement, ul as Config, un as BuildMissCategory, uo as OFFLOAD_MODES, ur as WorktreeFacts, us as deviceHostMachinesClaims, ut as StatsScope, v as parseSetupJournal, va as parseHostedPlatformDevice, vc as queryLogs, vi as DevServerStopRequest, vl as SupervisorRecord, vn as BuildResult, vo as SettingEntry, vr as parseMacosRecord, vs as easSessionLedgerLock, vt as statsProjectKey, w as HostedLogsCursor, wa as HOSTED_MACOS_APP_SLOTS, wc as countErrorEntries, wi as MetroLastStop, wl as readBuildMachines, wn as DevicePlacement, wo as TunnelMode, wr as archiveEnabled, ws as maintenanceDir, wt as ViewedDevice, x as agentDeviceStateDirsAsync, xa as readHostedDeviceLedger, xc as recordMatches, xi as IdleStopRecord, xl as MACHINE_CREDENTIALS_VERSION, xn as DeviceActivity, xo as SettingWriteResult, xr as ArchivedBytes, xs as gitMergeCacheDir, xt as trimSamples, y as readSetupJournal, ya as parseHostedRequest, yc as readLogRecords, yi as DeviceIdleShutdownRecord, yl as clientIdentity, yn as BuildWaitingFor, yo as SettingScope, yr as readHostedMacosApp, ys as emulatorLogFile, yt as trimCapacityRefusals, z as HOSTED_METRO_GATEWAYS_KEY, za as parseHostedMacosChoice, zc as DebugLog, zi as readLastBuilds, zl as AgentDeviceUsageRoots, zn as MetroBundleState, zo as RECORDING_PLATFORMS, zr as MaintenanceRecord, zs as workspaceAgentDeviceDir, zt as readDiskUsage } from "./index-DKq1j8dw.mjs";
|
|
2
|
-
export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, ActiveBuildState, ActivityDriver, ActivityRecencyBasis, AgentActionReaderOptions, AgentDeviceUsage, AgentDeviceUsageRoots, AgentRecordSelection, AgentSession, AgentSessionsCache, AgentTarget, AgentTool, AndroidDeviceState, AndroidRuntimeFacts, AppPresence, ArchivedBytes, ArchivedSummary, ArchivedUsage, ArchivedWorkspace, AutomaticPoolRole, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, BuildActivity, BuildCacheHit, BuildCause, BuildDetail, BuildDiagnostic, BuildHistoryEntry, BuildMachineCredential, BuildMachineTotals, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlacement, BuildPlanPayload, BuildPlatform, BuildReport, BuildResult, BuildWaitingFor, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, ChecksState, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DEBUG_ENV, DEVICE_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, DebugLog, DevServerStopRecord, DevServerStopRequest, DeviceActivity, DeviceAppProcess, DeviceHostLimits, DeviceHostMachineCredential, DeviceIdleShutdownRecord, DeviceLeaseState, DevicePlacement, DeviceRecord, DeviceViewersRecord, DiskMeasure, DiskPressureLevel, DoctorRunRecord, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EndedAgentSession, Endpoint, EnvironmentDisk, EnvironmentState, GitChip, GitChipPart, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HOSTED_PARKED_CANDIDATES, HostedAgentAccess, HostedAgentDriverName, HostedAgentGrant, HostedAgentIssuedGrant, HostedAgentLease, HostedAndroidChoice, HostedAndroidDevice, HostedAndroidPlacement, HostedAndroidStatus, HostedAppDelivery, HostedAppFile, HostedAppLaunch, HostedAppOffer, HostedAppRecord, HostedDevice, HostedDeviceOffer, HostedDeviceOfferRequest, HostedDevicePhase, HostedDevicePlatform, HostedDeviceRequest, HostedDeviceSelectors, HostedDeviceSession, HostedIosChoice, HostedIosDevice, HostedIosPlacement, HostedIosStatus, HostedLogsCursor, HostedLogsPage, HostedMacosChoice, HostedMacosDevice, HostedMacosPlacement, HostedMetroGateway, HostedMetroRequest, HostedNativeOffer, HostedNativePlacement, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, KeyedDelta, KeyedEntities, LAST_BUILD_KEYS, LEVELS, LastBuildReport, LogDir, LogDirQuery, LogQueryOptions, LogQueryPlan, MACHINE_CREDENTIALS_VERSION, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, MachineCacheUsage, MachineCapacity, MachineCredential, MachineOwner, MachineOwnerKind, MachineUsageState, MachineView, MacosAppRecord, MacosAppState, MacosBuild, MacosBuildPlanPayload, MacosProcess, MaintenanceAction, MaintenanceActionKind, MaintenanceCheck, MaintenanceMode, MaintenancePass, MaintenancePressure, MaintenanceRecord, MaintenanceSize, MaintenanceState, MaintenanceStatus, MemoryCulprit, MemorySource, MetroBundleState, MetroLastStop, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, NativeBuildStep, NdjsonRecord, OFFLOAD_MODES, OffloadMode, OffloadSummary, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, ParkedMax, PhysicalDeviceConnection, PhysicalDeviceState, PlannedPhase, PlatformRecords, ProjectRecord, PullRequestCacheEntry, QueryCriteria, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, ReadStatsResult, RecordedDevice, RecordedSegment, RecordingPlatform, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunEstimates, RunHistory, RunOutcomeKind, RunSample, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SUMMARY_ARCHIVES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingWriteResult, SettingsObject, SettingsPayload, SetupCapability, SetupJournal, SimRuntimeUsage, SimulatorState, StatsBucket, StatsCapacityRefusal, StatsCapacityWait, StatsPlacement, StatsPlatform, StatsRecord, StatsReport, StatsScope, StatusCacheEntry, StatusCapacity, StatusIssue, StatusIssueCode, StatusPayload, StatusViews, StimConfig, SummaryBuild, SummaryHistoryEntry, SupervisorRecord, SwiftpmCacheUsage, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, TailnetPeer, TunnelMode, ViewedDevice, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, WarmRecord, WarmStep, WebBrowserState, WebPageState, WebViewport, WorkspacePhase, WorkspaceStage, WorkspaceState, WorkspaceSummary, WorktreeFacts, WorktreeGit, WorktreePullRequest, WorktreeRow, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceStateDirsAsync, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, applyKeyedDelta, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, cannotHost, capDrops, clientIdentity, clientIdentityKeyFile, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createAsyncAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAgentDriverName, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, hostedWorkerSettleMs, isExpoErrorContext, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listRecordedDevicesAsync, listSegments, listSegmentsAsync, listStatusCacheEntries, loadConfig, logFiles, machineCacheUsageFile, machineCapacity, machineEndpoint, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openLogDir, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMachineCredential, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, planLogQuery, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveAsync, readArchiveState, readArchives, readArchivesAsync, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHomeIdentity, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMachineCacheUsage, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, statusViews, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, windowsShortDir, windowsShortDirKey, withConfigLock, withConfigLockAsync, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock, workspaceSummary };
|
|
1
|
+
import { $ as ReadStatsResult, $a as readHostedAppMetadata, $c as getProjectSettings, $i as HostedDevicePlatform, $l as levelRank, $n as StatusIssueCode, $o as recordingEnabled, $r as unreadableHostedIos, $s as LogDirQuery, $t as AndroidDeviceState, A as readLogsSince, Aa as HostedAppLaunch, Ac as EasSessionLedgerRead, Ai as buildDiagnostics, Al as machineCapacity, An as GitChipPart, Ao as isLayeredSetting, Ar as readArchives, As as serverSetupDir, At as StatusCacheEntry, B as HOSTED_METRO_REQUESTS_KEY, Ba as parseHostedMacosDevice, Bc as DEBUG_ENV, Bi as readWarmRecord, Bl as AgentDeviceUsage, Bn as NATIVE_BUILD_STEPS, Bo as RecordedDevice, Br as MaintenanceSize, Bs as workspaceAgentDeviceDir, Bt as readDiskUsageFailure, C as HOSTED_LOGS_PAGE_BYTES, Ca as HOSTED_AGENT_DRIVERS, Cc as recordMatches, Ci as MAINTENANCE_LOG_NAME, Cl as MACHINE_CREDENTIALS_VERSION, Cn as DeviceLeaseState, Co as TUNNEL_MODES, Cr as ArchivedWorkspace, Cs as maintenanceChildLogFile, Ct as DeviceViewersRecord, D as hostedNativeLogsDir, Da as HostedAgentGrant, Dc as CreatedDevicePlatform, Di as WORKSPACE_AGENT_KEY, Dl as MachineCapacity, Dn as EnvironmentDisk, Do as acceptsShape, Dr as readArchive, Ds as maintenanceStateFile, Dt as AgentSessionsCache, E as hostedMacosLogsDir, Ea as HostedAgentDriverName, Ec as countErrorEntries, Ei as WARM_KEY, El as readBuildMachines, En as EndedAgentSession, Eo as WebViewport, Er as linkReplacedArchives, Es as maintenanceRunClaims, Et as stimBuildDigest, F as endpoint, Fa as hostedMacosAppSlot, Fc as readJsonFile, Fi as readDevServerStopRequest, Fl as machineCacheUsageFile, Fn as MachineOwnerKind, Fo as runId, Fr as MaintenanceCheck, Fs as sharedPods, Ft as listStatusCacheEntries, G as DeviceHostMachineCredential, Ga as HostedAppOffer, Gc as ParkedMax, Gi as DeviceHostLimits, Gl as AgentActionReaderOptions, Gn as PlannedPhase, Go as footageDrops, Gr as readMaintenanceAttempt, Gs as workspaceGradleBuild, Gt as ACTIVITY_RECENCY_BASES, H as HostedMetroRequest, Ha as HOSTED_APP_CHUNK_BYTES, Hc as createDebugLog, Hi as readWorkspaceState, Hl as agentDeviceUsageFile, Hn as PHYSICAL_DEVICE_CONNECTIONS, Ho as RecordingPlatform, Hr as MaintenanceStatus, Hs as workspaceDerivedData, Ht as readPullRequestCache, I as findPeer, Ia as hostedMacosBundleId, Ic as readJsonObject, Ii as readDeviceIdleShutdowns, Il as readMachineCacheUsage, In as MachineUsageState, Io as validRunId, Ir as MaintenanceMode, Is as statsFile, It as pullRequestCacheFile, J as CAPACITY_REFUSAL_LIMIT, Ja as hostedAppAttempt, Jc as configCorruptRepair, Ji as HostedAndroidDevice, Jl as createAgentActionReader, Jn as STATUS_ISSUE_CODES, Jo as listSegments, Jr as HostedIosStatus, Js as workspaceMetadataFile, Jt as ActiveBuildState, K as readDeviceHostMachines, Ka as HostedAppRecord, Kc as allMetroPorts, Ki as HOSTED_PARKED_CANDIDATES, Kl as AgentRecordSelection, Kn as RemoteDeviceState, Ko as listRecordedDevices, Kr as readMaintenanceState, Ks as workspaceLogErrorIndex, Kt as AGENT_TOOLS, L as machineEndpoint, La as parseHostedAgentAccess, Lc as readStateFile, Li as readDevicePlacement, Ll as SwiftpmCacheUsage, Ln as MacosBuildPlanPayload, Lo as RECORDING_CAP_BYTES, Lr as MaintenancePass, Ls as supervisorLogFile, Lt as readAgentSessionsCache, M as TAILNET_MACHINE_PATTERN, Ma as HostedMacosDevice, Mc as readEasSessionLedger, Mi as parseMissReason, Ml as tryAcquireBuildSlotClaim, Mn as MACHINE_OWNER_KINDS, Mo as settingDefinition, Mr as DiskPressureLevel, Ms as sharedCcache, Mt as diskUsageCacheFile, N as TailnetPeer, Na as HostedMacosPlacement, Nc as validEasSessionClaim, Ni as readBuildHistory, Nl as MachineCacheUsage, Nn as MEMORY_SOURCES, No as settingValueError, Nr as MaintenanceAction, Ns as sharedCompilationCache, Nt as diskUsageFailureFile, O as parseHostedLogsCursor, Oa as HostedAgentIssuedGrant, Oc as CreatedDevices, Oi as WarmRecord, Ol as buildSlotPath, On as EnvironmentState, Oo as coerceSettingText, Or as readArchiveAsync, Os as pullRequestCacheDir, Ot as ENDED_AGENT_RETENTION_MS, P as cannotHost, Pa as hostedAgentDriverName, Pc as isJsonObject, Pi as readDevServerStop, Pl as SimRuntimeUsage, Pn as MachineOwner, Po as RUN_ID_ENV, Pr as MaintenanceActionKind, Ps as sharedGradle, Pt as endedAgentSessionOf, Q as PLACEMENT_DECISIONS, Qa as readHostedApp, Qc as getProject, Qi as HostedDevicePhase, Ql as SOURCES, Qn as StatusIssue, Qo as recordingDeviceName, Qr as parseHostedIosPlacement, Qs as LogDir, Qt as AgentTool, R as parseMachine, Ra as parseHostedAgentGrant, Rc as withStateReadCache, Ri as readIdleStop, Rl as readSwiftpmCacheUsage, Rn as MemorySource, Ro as RECORDING_FOOTAGE_MS, Rr as MaintenancePressure, Rs as supervisorPidFile, Rt as readBuildDetail, S as HOSTED_LOGS_FIRST_BYTES, Sa as readHostedSessions, Sc as readLogTimeline, Si as LAST_BUILD_KEYS, Sl as BuildMachineCredential, Sn as DeviceAppProcess, So as SettingsPayload, Sr as ArchivedUsage, Ss as maintenanceAttemptFile, St as wholePhases, T as HostedLogsPage, Ta as HostedAgentAccess, Tc as tailRead, Ti as READY_PHASE_MS, Tl as parseMachineCredential, Tn as DiskMeasure, To as WEB_VIEWPORTS, Tr as archivedUsage, Ts as maintenanceNdjsonFile, Tt as readViewedDevices, U as hostedMetroGateways, Ua as HostedAppDelivery, Uc as debugLogDir, Ui as workspaceLastUsed, Ul as readAgentDeviceUsage, Un as PhysicalDeviceConnection, Uo as capDrops, Ur as MemoryCulprit, Us as workspaceEndedAgentsFile, Ut as withDerivedFacts, V as HostedMetroGateway, Va as parseHostedMacosPlacement, Vc as DebugLog, Vi as readWorkspaceAgent, Vl as AgentDeviceUsageRoots, Vn as NativeBuildStep, Vo as RecordedSegment, Vr as MaintenanceState, Vs as workspaceBuildDetailFile, Vt as readEndedAgentSessions, W as hostedMetroRequests, Wa as HostedAppFile, Wc as debugLoggingEnabled, Wi as DEVICE_HOST_LIMITS, Wl as readAgentDeviceUsageCache, Wn as PhysicalDeviceState, Wo as closedSegmentName, Wr as parseMaintenanceState, Ws as workspaceEndedAgentsLock, Wt as withGitChip, X as HISTORY_LIMIT, Xa as parseHostedAppManifest, Xc as getConcurrencyLimits, Xi as HostedDeviceOffer, Xl as LEVELS, Xn as StatsPlatform, Xo as openSegmentName, Xr as hostedIosRecords, Xs as workspaceStateFile, Xt as ActivityRecencyBasis, Y as CAPACITY_REFUSAL_MAX_AGE_MS, Ya as hostedAppBlobs, Yc as findEnclosingWorktreeRoot, Yi as HostedDevice, Yl as createAsyncAgentActionReader, Yn as SimulatorState, Yo as listSegmentsAsync, Yr as hostedIosPlacements, Ys as workspaceRecordingsDir, Yt as ActivityDriver, Z as OffloadSummary, Za as parseHostedAppOffer, Zc as getParkedMax, Zi as HostedDeviceOfferRequest, Zl as NdjsonRecord, Zn as StatusCapacity, Zo as recordedBytes, Zr as hostedIosStatus, Zs as workspaceStateLock, Zt as AgentSession, _ as isSetupJournalPrunable, _a as parseHostedOfferRequest, _c as parseSince, _i as DevServerStopRecord, _l as RepoRecord, _n as BuildReport, _o as SettingDefinition, _r as macosAppState, _s as easSessionLedgerFile, _t as readStatsReport, a as MachineView, aa as HostedNativeOffer, ac as QueryCriteria, ai as hostedAndroidStatus, al as withConfigLock, an as BuildCacheHit, ao as settingsJsonSchema, ar as WarmStep, as as buildMachinesLock, at as StatsCapacityRefusal, b as agentDeviceStateDirs, ba as readHostedDevice, bc as queryLogs, bi as IDLE_STOP_KEY, bl as SupervisorRecord, bn as ChecksState, bo as SettingType, br as readMacosRecord, bs as getConfigPath, bt as trimCapacityWaits, c as SummaryBuild, ca as deviceHostRoot, cc as buildCriteria, ci as HostedNativePlacement, cl as automaticMachineEnabled, cn as BuildDiagnostic, co as ANDROID_PCH_CHOICES, cr as WorkspacePhase, cs as createdDevicesFile, ct as StatsRecord, d as WorktreeRow, da as hostedWorkerSettleMs, dc as fileIdentity, di as unreadableHostedNative, dl as ConcurrencyLimits, dn as BuildMissChange, do as OffloadMode, dr as WorktreeGit, ds as deviceHostMachinesFile, dt as decodeStats, ea as HostedDeviceRequest, ec as openLogDir, ei as HostedAndroidPlacement, el as getRepoSettings, en as AndroidRuntimeFacts, eo as rememberHostedAppBlobRename, er as StatusPayload, es as agentSessionsCacheFile, et as RunEstimates, eu as parseNdjsonLine, f as statusViews, fa as parseHostedAndroidDevice, fc as fileSizes, fi as BUILD_HISTORY_KEY, fl as Config, fn as BuildMissReason, fo as REMOTE_DEVICE_BACKENDS, fr as WorktreePullRequest, fs as deviceHostMachinesLock, ft as findProjectRoot, g as isJournalExpired, ga as parseHostedNativeOffer, gc as markerWindow, gi as DEV_SERVER_STOP_REQUEST_KEY, gl as ProjectRecord, gn as BuildPlatform, go as SETTING_SCOPES, gr as MacosProcess, gs as easMachineStateRoot, gt as readStats, h as SetupJournal, ha as parseHostedLocalDeviceCount, hc as logFiles, hi as DEVICE_RECLAIM_REASON, hl as PlatformRecords, hn as BuildPlanPayload, ho as SETTING_GROUPS, hr as MacosBuild, hs as diskUsageWalkClaims, ht as readRunEstimates, i as ArchivedSummary, ia as HostedIosDevice, ic as NATIVE_CRASH_LOG_PREFIX, ii as hostedAndroidRecords, il as windowsShortDirKey, in as BuildActivity, io as SETTINGS_SCHEMA_URL, ir as WORKSPACE_STAGE_KINDS, is as buildMachinesFile, it as StatsBucket, j as Endpoint, ja as HostedMacosChoice, jc as readCreatedDevices, ji as lastUseFrom, jl as saturation, jn as LastBuildReport, jo as isSensitiveReference, jr as readArchivesAsync, js as setupJournalFile, jt as agentSessionOf, k as readHostedNativeLogsCheckpoint, ka as HostedAgentLease, kc as EasSessionClaim, ki as WorkspaceState, kl as buildSlotsDir, kn as GitChip, ko as expectedShape, kr as readArchiveState, ks as serverLocalSocket, kt as PullRequestCacheEntry, l as SummaryHistoryEntry, la as hostedConsolePort, lc as bundleMarkerPlatform, li as hostedNativeRecords, ll as requireAutomaticMachine, ln as BuildHistoryEntry, lo as IOS_SIMULATOR_APPS, lr as WorkspaceStage, ls as createdDevicesLock, lt as StatsReport, m as SetupCapability, ma as parseHostedDevice, mc as isExpoErrorContext, mi as DEVICE_IDLE_SHUTDOWN_KEY, ml as DoctorRunRecord, mn as BuildPlacement, mo as SETTINGS, mr as MacosAppState, ms as diskUsageCacheDir, mt as projectRootDirectories, n as KeyedEntities, na as HostedDeviceSession, nc as LogQueryOptions, ni as hostedAndroidDeviceName, nl as loadConfig, nn as BUILD_PHASES, no as validHostedAppBlob, nr as WEB_PAGE_STATES, ns as archiveLock, nt as RunSample, nu as readNdjsonGenerations, o as SUMMARY_ARCHIVES, oa as assertHostedDeviceLedger, oc as advanceTail, oi as parseHostedAndroidPlacement, ol as withConfigLockAsync, on as BuildCause, oo as ANDROID_COMPILER_CACHE_CHOICES, or as WebBrowserState, os as clientIdentityKeyFile, ot as StatsCapacityWait, p as workspaceSummary, pa as parseHostedChoice, pc as followLogs, pi as BUILD_HISTORY_LIMIT, pl as DeviceRecord, pn as BuildPhase, po as RemoteDeviceBackend, pr as MacosAppRecord, ps as deviceViewersDir, pt as offloadSummary, q as BuildMachineTotals, qa as hostedAppArea, qc as buildWorkerRoot, qi as HostedAndroidChoice, ql as AgentTarget, qn as RunOutcomeKind, qo as listRecordedDevicesAsync, qr as HostedIosPlacement, qs as workspaceLogsDir, qt as APP_PROCESS_STATES, r as applyKeyedDelta, ra as HostedIosChoice, rc as LogQueryPlan, ri as hostedAndroidPlacements, rl as windowsShortDir, rn as BUILD_RESULTS, ro as SETTINGS_SCHEMA_FILE, rr as WORKSPACE_PHASES, rs as archiveRoot, rt as STATS_VERSION, s as StatusViews, sa as deviceHostArea, sc as attachExpoErrorContext, si as unreadableHostedAndroid, sl as AutomaticPoolRole, sn as BuildDetail, so as ANDROID_EMULATOR_APPS, sr as WebPageState, ss as configLockPath, st as StatsPlacement, t as KeyedDelta, ta as HostedDeviceSelectors, tc as ERROR_SOURCES, ti as HostedAndroidStatus, tl as isPathPrefix, tn as AppPresence, to as validHostedAppArguments, tr as TUTORIAL_VERSION, ts as archiveDir, tt as RunHistory, tu as parseNdjsonText, u as WorkspaceSummary, ua as hostedDeviceId, uc as compileGrep, ui as parseHostedNativePlacement, ul as validateAutomaticPool, un as BuildMissCategory, uo as OFFLOAD_MODES, ur as WorktreeFacts, us as deviceHostMachinesClaims, ut as StatsScope, v as parseSetupJournal, va as parseHostedPlatformDevice, vc as planLogQuery, vi as DevServerStopRequest, vl as SettingsObject, vn as BuildResult, vo as SettingEntry, vr as parseMacosRecord, vs as easSessionLedgerLock, vt as statsProjectKey, w as HostedLogsCursor, wa as HOSTED_MACOS_APP_SLOTS, wc as sortByTs, wi as MetroLastStop, wl as MachineCredential, wn as DevicePlacement, wo as TunnelMode, wr as archiveEnabled, ws as maintenanceDir, wt as ViewedDevice, x as agentDeviceStateDirsAsync, xa as readHostedDeviceLedger, xc as readLogRecords, xi as IdleStopRecord, xl as clientIdentity, xn as DeviceActivity, xo as SettingWriteResult, xr as ArchivedBytes, xs as gitMergeCacheDir, xt as trimSamples, y as readSetupJournal, ya as parseHostedRequest, yc as queryJsonLogs, yi as DeviceIdleShutdownRecord, yl as StimConfig, yn as BuildWaitingFor, yo as SettingScope, yr as readHostedMacosApp, ys as emulatorLogFile, yt as trimCapacityRefusals, z as HOSTED_METRO_GATEWAYS_KEY, za as parseHostedMacosChoice, zc as readHomeIdentity, zi as readLastBuilds, zl as swiftpmCacheUsageFile, zn as MetroBundleState, zo as RECORDING_PLATFORMS, zr as MaintenanceRecord, zs as trashRoot, zt as readDiskUsage } from "./index-B8_6CrJ-.mjs";
|
|
2
|
+
export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, ActiveBuildState, ActivityDriver, ActivityRecencyBasis, AgentActionReaderOptions, AgentDeviceUsage, AgentDeviceUsageRoots, AgentRecordSelection, AgentSession, AgentSessionsCache, AgentTarget, AgentTool, AndroidDeviceState, AndroidRuntimeFacts, AppPresence, ArchivedBytes, ArchivedSummary, ArchivedUsage, ArchivedWorkspace, AutomaticPoolRole, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, BuildActivity, BuildCacheHit, BuildCause, BuildDetail, BuildDiagnostic, BuildHistoryEntry, BuildMachineCredential, BuildMachineTotals, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlacement, BuildPlanPayload, BuildPlatform, BuildReport, BuildResult, BuildWaitingFor, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, ChecksState, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DEBUG_ENV, DEVICE_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, DebugLog, DevServerStopRecord, DevServerStopRequest, DeviceActivity, DeviceAppProcess, DeviceHostLimits, DeviceHostMachineCredential, DeviceIdleShutdownRecord, DeviceLeaseState, DevicePlacement, DeviceRecord, DeviceViewersRecord, DiskMeasure, DiskPressureLevel, DoctorRunRecord, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EndedAgentSession, Endpoint, EnvironmentDisk, EnvironmentState, GitChip, GitChipPart, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HOSTED_PARKED_CANDIDATES, HostedAgentAccess, HostedAgentDriverName, HostedAgentGrant, HostedAgentIssuedGrant, HostedAgentLease, HostedAndroidChoice, HostedAndroidDevice, HostedAndroidPlacement, HostedAndroidStatus, HostedAppDelivery, HostedAppFile, HostedAppLaunch, HostedAppOffer, HostedAppRecord, HostedDevice, HostedDeviceOffer, HostedDeviceOfferRequest, HostedDevicePhase, HostedDevicePlatform, HostedDeviceRequest, HostedDeviceSelectors, HostedDeviceSession, HostedIosChoice, HostedIosDevice, HostedIosPlacement, HostedIosStatus, HostedLogsCursor, HostedLogsPage, HostedMacosChoice, HostedMacosDevice, HostedMacosPlacement, HostedMetroGateway, HostedMetroRequest, HostedNativeOffer, HostedNativePlacement, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, KeyedDelta, KeyedEntities, LAST_BUILD_KEYS, LEVELS, LastBuildReport, LogDir, LogDirQuery, LogQueryOptions, LogQueryPlan, MACHINE_CREDENTIALS_VERSION, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, MachineCacheUsage, MachineCapacity, MachineCredential, MachineOwner, MachineOwnerKind, MachineUsageState, MachineView, MacosAppRecord, MacosAppState, MacosBuild, MacosBuildPlanPayload, MacosProcess, MaintenanceAction, MaintenanceActionKind, MaintenanceCheck, MaintenanceMode, MaintenancePass, MaintenancePressure, MaintenanceRecord, MaintenanceSize, MaintenanceState, MaintenanceStatus, MemoryCulprit, MemorySource, MetroBundleState, MetroLastStop, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, NativeBuildStep, NdjsonRecord, OFFLOAD_MODES, OffloadMode, OffloadSummary, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, ParkedMax, PhysicalDeviceConnection, PhysicalDeviceState, PlannedPhase, PlatformRecords, ProjectRecord, PullRequestCacheEntry, QueryCriteria, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, ReadStatsResult, RecordedDevice, RecordedSegment, RecordingPlatform, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunEstimates, RunHistory, RunOutcomeKind, RunSample, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SUMMARY_ARCHIVES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingWriteResult, SettingsObject, SettingsPayload, SetupCapability, SetupJournal, SimRuntimeUsage, SimulatorState, StatsBucket, StatsCapacityRefusal, StatsCapacityWait, StatsPlacement, StatsPlatform, StatsRecord, StatsReport, StatsScope, StatusCacheEntry, StatusCapacity, StatusIssue, StatusIssueCode, StatusPayload, StatusViews, StimConfig, SummaryBuild, SummaryHistoryEntry, SupervisorRecord, SwiftpmCacheUsage, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, TailnetPeer, TunnelMode, ViewedDevice, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, WarmRecord, WarmStep, WebBrowserState, WebPageState, WebViewport, WorkspacePhase, WorkspaceStage, WorkspaceState, WorkspaceSummary, WorktreeFacts, WorktreeGit, WorktreePullRequest, WorktreeRow, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceStateDirsAsync, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, applyKeyedDelta, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, cannotHost, capDrops, clientIdentity, clientIdentityKeyFile, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createAsyncAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileIdentity, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAgentDriverName, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, hostedWorkerSettleMs, isExpoErrorContext, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listRecordedDevicesAsync, listSegments, listSegmentsAsync, listStatusCacheEntries, loadConfig, logFiles, machineCacheUsageFile, machineCapacity, machineEndpoint, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openLogDir, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMachineCredential, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, planLogQuery, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveAsync, readArchiveState, readArchives, readArchivesAsync, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHomeIdentity, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMachineCacheUsage, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, statusViews, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trashRoot, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, windowsShortDir, windowsShortDirKey, withConfigLock, withConfigLockAsync, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock, workspaceSummary };
|
package/dist/state.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as tryAcquireClaim, _ as releaseClaim, f as isClaimRefusal, g as readClaimSet } from "./ownership-claim-
|
|
1
|
+
import { S as tryAcquireClaim, _ as releaseClaim, f as isClaimRefusal, g as readClaimSet } from "./ownership-claim-DG2GMIoo.mjs";
|
|
2
2
|
import { inspectProcessIdentity } from "./process-identity.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as withDirLockAsync, C as workspaceName, J as readJsonFile, Q as withDirLock, T as workspaceStateDir, U as ambientContext, W as ambientEnv, X as readStateFile, Y as readJsonObject, Z as withStateReadCache, _ as rotatedLogPath, d as ensurePrivateDir, g as rotateLog, q as isJsonObject, t as LOG_ROTATE_BYTES, u as configDir } from "./core-Bzz_SIGQ.mjs";
|
|
4
4
|
import { readOrCreateKeyFile } from "./noise-session.mjs";
|
|
5
5
|
import { validHomeId } from "./workspace-link.mjs";
|
|
6
6
|
import { a as workspaceSummary, i as statusViews, n as applyKeyedDelta, o as withDerivedFacts, r as SUMMARY_ARCHIVES, s as withGitChip, t as KeyedEntities } from "./keyed-delta-BBoOeR2J.mjs";
|
|
@@ -740,6 +740,10 @@ function maintenanceChildLogFile() {
|
|
|
740
740
|
function maintenanceRunClaims() {
|
|
741
741
|
return join(maintenanceDir(), "run.claims");
|
|
742
742
|
}
|
|
743
|
+
/** Dependency trees `worktree remove` moved out of a worktree before git removed it; gc deletes what is left. */
|
|
744
|
+
function trashRoot() {
|
|
745
|
+
return join(configDir(), "trash");
|
|
746
|
+
}
|
|
743
747
|
function archiveRoot() {
|
|
744
748
|
return join(configDir(), "archive");
|
|
745
749
|
}
|
|
@@ -753,9 +757,16 @@ function archiveLock() {
|
|
|
753
757
|
function clientIdentityKeyFile() {
|
|
754
758
|
return join(configDir(), "client-identity.key");
|
|
755
759
|
}
|
|
756
|
-
/**
|
|
760
|
+
/**
|
|
761
|
+
* The local Unix socket. sun_path permits 103 UTF-8 bytes on macOS and 107 on Linux. Longer paths use
|
|
762
|
+
* /tmp/stim-sockets-<uid>/<SHA-256 of the normalized absolute socket path>.sock.
|
|
763
|
+
*/
|
|
757
764
|
function serverLocalSocket() {
|
|
758
|
-
|
|
765
|
+
const path = join(configDir(), "server", "local.sock");
|
|
766
|
+
const uid = process.getuid?.();
|
|
767
|
+
const maximumPathBytes = process.platform === "linux" ? 107 : 103;
|
|
768
|
+
if (uid === void 0 || Buffer.byteLength(path) <= maximumPathBytes) return path;
|
|
769
|
+
return join("/tmp", `stim-sockets-${uid}`, `${createHash("sha256").update(path).digest("hex")}.sock`);
|
|
759
770
|
}
|
|
760
771
|
function serverSetupDir() {
|
|
761
772
|
return join(configDir(), "server", "setup");
|
|
@@ -2170,6 +2181,17 @@ const SETTINGS = [
|
|
|
2170
2181
|
default: false,
|
|
2171
2182
|
description: "When ios.remote or android.remote is auto, this machine is at its concurrency.maxDevices cap and no remote.machines entry takes the run, run the simulator or emulator on a billed EAS Simulator instead of waiting or refusing, when eas-cli can"
|
|
2172
2183
|
},
|
|
2184
|
+
{
|
|
2185
|
+
key: "remote.easMaxDurationMinutes",
|
|
2186
|
+
type: {
|
|
2187
|
+
kind: "number",
|
|
2188
|
+
integer: true,
|
|
2189
|
+
minimum: 1
|
|
2190
|
+
},
|
|
2191
|
+
scopes: MACHINE,
|
|
2192
|
+
default: 30,
|
|
2193
|
+
description: "Maximum minutes of each EAS Simulator session Stim creates, after which EAS stops it and stops billing; stim stop and gc --delete end a session sooner. EAS rejects a value above the account plan's session limit"
|
|
2194
|
+
},
|
|
2173
2195
|
{
|
|
2174
2196
|
key: "remote.build",
|
|
2175
2197
|
type: {
|
|
@@ -2915,7 +2937,7 @@ function bundleMarkerPlatform(record) {
|
|
|
2915
2937
|
return (/^RSC\((.+)\)$/.exec(tag)?.[1] ?? tag).toLowerCase();
|
|
2916
2938
|
}
|
|
2917
2939
|
function isAppDeviceRecord(record) {
|
|
2918
|
-
return record.src === "device" && (record.event === "native_crash" || record.
|
|
2940
|
+
return record.src === "device" && (record.event === "native_crash" || record.platform === "web");
|
|
2919
2941
|
}
|
|
2920
2942
|
function recordMatches(record, criteria = {}) {
|
|
2921
2943
|
if (!record) return false;
|
|
@@ -3262,10 +3284,11 @@ function advanceTail(prev, chunk, size) {
|
|
|
3262
3284
|
records
|
|
3263
3285
|
};
|
|
3264
3286
|
}
|
|
3265
|
-
function followLogs({ dir, onRecord, criteria = {}, intervalMs, offsets = null, errorContext }) {
|
|
3287
|
+
function followLogs({ dir, onRecord, criteria = {}, intervalMs, offsets = null, identities: seededIdentities = null, errorContext }) {
|
|
3266
3288
|
const follower = errorContext ? expoContextFollower(onRecord, errorContext) : null;
|
|
3267
3289
|
const state = /* @__PURE__ */ new Map();
|
|
3268
3290
|
const decoders = /* @__PURE__ */ new Map();
|
|
3291
|
+
const identities = new Map(Object.entries(seededIdentities ?? {}));
|
|
3269
3292
|
let stopped = false;
|
|
3270
3293
|
let contextTimer;
|
|
3271
3294
|
for (const [name, size] of Object.entries(offsets || fileSizes(dir))) {
|
|
@@ -3274,6 +3297,11 @@ function followLogs({ dir, onRecord, criteria = {}, intervalMs, offsets = null,
|
|
|
3274
3297
|
partial: ""
|
|
3275
3298
|
});
|
|
3276
3299
|
decoders.set(name, new StringDecoder("utf8"));
|
|
3300
|
+
if (offsets) continue;
|
|
3301
|
+
try {
|
|
3302
|
+
const identity = fileIdentity(statSync(join(dir, name), { bigint: true }));
|
|
3303
|
+
if (identity !== void 0) identities.set(name, identity);
|
|
3304
|
+
} catch {}
|
|
3277
3305
|
}
|
|
3278
3306
|
function emit(records) {
|
|
3279
3307
|
for (const record of records) {
|
|
@@ -3284,27 +3312,43 @@ function followLogs({ dir, onRecord, criteria = {}, intervalMs, offsets = null,
|
|
|
3284
3312
|
}
|
|
3285
3313
|
}
|
|
3286
3314
|
function drainRotated(name, entry) {
|
|
3287
|
-
|
|
3288
|
-
let size;
|
|
3315
|
+
let fd;
|
|
3289
3316
|
try {
|
|
3290
|
-
|
|
3317
|
+
fd = openSync(rotatedLogPath(join(dir, name)), "r");
|
|
3291
3318
|
} catch {
|
|
3292
3319
|
return;
|
|
3293
3320
|
}
|
|
3294
|
-
|
|
3295
|
-
|
|
3321
|
+
try {
|
|
3322
|
+
const stat = fstatSync(fd, { bigint: true });
|
|
3323
|
+
const known = identities.get(name);
|
|
3324
|
+
if (known !== void 0 && fileIdentity(stat) !== known) return;
|
|
3325
|
+
const size = Number(stat.size);
|
|
3326
|
+
const decoder = decoders.get(name) ?? new StringDecoder("utf8");
|
|
3327
|
+
emit(advanceTail(entry, readChunk(fd, decoder, entry.offset, size) + decoder.end(), size).records);
|
|
3328
|
+
} finally {
|
|
3329
|
+
closeSync(fd);
|
|
3330
|
+
}
|
|
3296
3331
|
}
|
|
3297
3332
|
function pollFile(name) {
|
|
3298
|
-
const
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3333
|
+
const fd = openSync(join(dir, name), "r");
|
|
3334
|
+
try {
|
|
3335
|
+
const stat = fstatSync(fd, { bigint: true });
|
|
3336
|
+
const size = Number(stat.size);
|
|
3337
|
+
const identity = fileIdentity(stat);
|
|
3338
|
+
const known = identities.get(name);
|
|
3339
|
+
const replaced = known !== void 0 && identity !== void 0 && identity !== known;
|
|
3340
|
+
const entry = state.get(name);
|
|
3341
|
+
if (entry && (replaced || size < entry.offset)) drainRotated(name, entry);
|
|
3342
|
+
const { start, prev } = tailRead(replaced ? void 0 : entry, size);
|
|
3343
|
+
if (prev !== entry) decoders.set(name, new StringDecoder("utf8"));
|
|
3344
|
+
if (!decoders.has(name)) decoders.set(name, new StringDecoder("utf8"));
|
|
3345
|
+
if (identity !== void 0) identities.set(name, identity);
|
|
3346
|
+
const next = advanceTail(prev, readChunk(fd, decoders.get(name), start, size), size);
|
|
3347
|
+
state.set(name, next.state);
|
|
3348
|
+
emit(next.records);
|
|
3349
|
+
} finally {
|
|
3350
|
+
closeSync(fd);
|
|
3351
|
+
}
|
|
3308
3352
|
}
|
|
3309
3353
|
function poll() {
|
|
3310
3354
|
if (stopped) return;
|
|
@@ -3409,16 +3453,14 @@ function followLogs({ dir, onRecord, criteria = {}, intervalMs, offsets = null,
|
|
|
3409
3453
|
follower?.flush();
|
|
3410
3454
|
};
|
|
3411
3455
|
}
|
|
3412
|
-
function readChunk(
|
|
3456
|
+
function readChunk(fd, decoder, start, size) {
|
|
3413
3457
|
if (size <= start) return "";
|
|
3414
|
-
const
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
closeSync(fd);
|
|
3421
|
-
}
|
|
3458
|
+
const buf = Buffer.allocUnsafe(size - start);
|
|
3459
|
+
const read = readSync(fd, buf, 0, size - start, start);
|
|
3460
|
+
return decoder.write(buf.subarray(0, read));
|
|
3461
|
+
}
|
|
3462
|
+
function fileIdentity(stat) {
|
|
3463
|
+
return stat.ino === 0n ? void 0 : `${stat.dev}:${stat.ino}`;
|
|
3422
3464
|
}
|
|
3423
3465
|
function tsOf(record) {
|
|
3424
3466
|
return typeof record?.ts === "number" && Number.isFinite(record.ts) ? record.ts : null;
|
|
@@ -3626,6 +3668,7 @@ async function openLogDir(dir, { order = "timeline", signal } = {}) {
|
|
|
3626
3668
|
const ranked = order === "name" ? names : [...names.filter((name) => !name.startsWith(NATIVE_CRASH_LOG_PREFIX)), ...names.filter((name) => name.startsWith(NATIVE_CRASH_LOG_PREFIX))];
|
|
3627
3669
|
const generations = [];
|
|
3628
3670
|
const sizes = {};
|
|
3671
|
+
const identities = {};
|
|
3629
3672
|
const close = async () => {
|
|
3630
3673
|
await Promise.all(generations.map((generation) => generation.handle.close().catch(() => {})));
|
|
3631
3674
|
};
|
|
@@ -3647,7 +3690,11 @@ async function openLogDir(dir, { order = "timeline", signal } = {}) {
|
|
|
3647
3690
|
crash: name.startsWith(NATIVE_CRASH_LOG_PREFIX),
|
|
3648
3691
|
index
|
|
3649
3692
|
});
|
|
3650
|
-
if (generation === 1)
|
|
3693
|
+
if (generation === 1) {
|
|
3694
|
+
sizes[name] = index.size;
|
|
3695
|
+
const identity = fileIdentity(stat);
|
|
3696
|
+
if (identity !== void 0) identities[name] = identity;
|
|
3697
|
+
}
|
|
3651
3698
|
} catch (error) {
|
|
3652
3699
|
await handle.close().catch(() => {});
|
|
3653
3700
|
throw error;
|
|
@@ -3661,6 +3708,7 @@ async function openLogDir(dir, { order = "timeline", signal } = {}) {
|
|
|
3661
3708
|
for (const { index } of generations) if (index.minTs !== null && (firstTs === void 0 || index.minTs < firstTs)) firstTs = index.minTs;
|
|
3662
3709
|
return {
|
|
3663
3710
|
sizes,
|
|
3711
|
+
identities,
|
|
3664
3712
|
firstTs,
|
|
3665
3713
|
launchAttempts: () => generations.filter((generation) => !generation.crash).flatMap(({ index, rank, generation }) => index.launchAttempts.map(({ record, position }) => ({
|
|
3666
3714
|
ts: tsKey(record),
|
|
@@ -4593,16 +4641,18 @@ function readDevicePlacement(state, platform, slot = "default") {
|
|
|
4593
4641
|
function lastBuildReport(platform, value) {
|
|
4594
4642
|
if (!isJsonObject(value)) return null;
|
|
4595
4643
|
const record = value;
|
|
4596
|
-
if (record.platform !== platform
|
|
4644
|
+
if (record.platform !== platform) return null;
|
|
4645
|
+
const status = record.status === "success" ? "ok" : record.status;
|
|
4646
|
+
if (status !== "ok" && status !== "failed") return null;
|
|
4597
4647
|
if (typeof record.startedAt !== "string") return null;
|
|
4598
4648
|
const durationMs = typeof record.durationMs === "number" && record.durationMs >= 0 ? record.durationMs : null;
|
|
4599
4649
|
const finished = new Date(Date.parse(record.startedAt) + (durationMs ?? NaN));
|
|
4600
4650
|
const reason = record.cacheHit === "local" || record.cacheHit === "remote" ? null : parseMissReason(record.missReason);
|
|
4601
|
-
const diagnostics =
|
|
4651
|
+
const diagnostics = status === "failed" ? buildDiagnostics(record.diagnostics) : [];
|
|
4602
4652
|
const placed = devicePlacement(record.devicePlacement);
|
|
4603
4653
|
return {
|
|
4604
4654
|
platform,
|
|
4605
|
-
status
|
|
4655
|
+
status,
|
|
4606
4656
|
cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
|
|
4607
4657
|
cacheSkipped: record.cacheSkipped === true,
|
|
4608
4658
|
durationMs,
|
|
@@ -4640,7 +4690,7 @@ function historyEntry(platform, value) {
|
|
|
4640
4690
|
const report = lastBuildReport(platform, value);
|
|
4641
4691
|
if (!report) return null;
|
|
4642
4692
|
const record = value;
|
|
4643
|
-
const result = BUILD_RESULTS.includes(record.result) ? record.result : report.status === "ok" ? "succeeded" : "failed";
|
|
4693
|
+
const result = record.status === "success" ? "succeeded" : BUILD_RESULTS.includes(record.result) ? record.result : report.status === "ok" ? "succeeded" : "failed";
|
|
4644
4694
|
return {
|
|
4645
4695
|
...report,
|
|
4646
4696
|
result,
|
|
@@ -4916,7 +4966,7 @@ function parseRecord(text) {
|
|
|
4916
4966
|
if (typeof version !== "number" || !Number.isInteger(version)) return null;
|
|
4917
4967
|
return parsed;
|
|
4918
4968
|
}
|
|
4919
|
-
function normalize(record) {
|
|
4969
|
+
function normalize$1(record) {
|
|
4920
4970
|
const projects = {};
|
|
4921
4971
|
const source = record.projects;
|
|
4922
4972
|
if (source && typeof source === "object" && !Array.isArray(source)) for (const [key, scope] of Object.entries(source)) projects[key] = normalizeScope(scope);
|
|
@@ -5104,7 +5154,7 @@ function decodeStats(text) {
|
|
|
5104
5154
|
newerVersion: parsed.version
|
|
5105
5155
|
};
|
|
5106
5156
|
return {
|
|
5107
|
-
record: normalize(parsed),
|
|
5157
|
+
record: normalize$1(parsed),
|
|
5108
5158
|
newerVersion: null
|
|
5109
5159
|
};
|
|
5110
5160
|
}
|
|
@@ -6110,4 +6160,4 @@ function isSetupJournalPrunable(journal, now) {
|
|
|
6110
6160
|
return Date.parse(journal.expiresAt) + 36e5 < now;
|
|
6111
6161
|
}
|
|
6112
6162
|
//#endregion
|
|
6113
|
-
export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, DEBUG_ENV, DEVICE_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HOSTED_PARKED_CANDIDATES, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, KeyedEntities, LAST_BUILD_KEYS, LEVELS, MACHINE_CREDENTIALS_VERSION, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, OFFLOAD_MODES, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SUMMARY_ARCHIVES, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceStateDirsAsync, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, applyKeyedDelta, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, cannotHost, capDrops, clientIdentity, clientIdentityKeyFile, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createAsyncAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAgentDriverName, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, hostedWorkerSettleMs, isExpoErrorContext, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listRecordedDevicesAsync, listSegments, listSegmentsAsync, listStatusCacheEntries, loadConfig, logFiles, machineCacheUsageFile, machineCapacity, machineEndpoint, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openLogDir, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMachineCredential, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, planLogQuery, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveAsync, readArchiveState, readArchives, readArchivesAsync, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHomeIdentity, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMachineCacheUsage, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, statusViews, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, windowsShortDir, windowsShortDirKey, withConfigLock, withConfigLockAsync, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock, workspaceSummary };
|
|
6163
|
+
export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, DEBUG_ENV, DEVICE_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HOSTED_PARKED_CANDIDATES, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, KeyedEntities, LAST_BUILD_KEYS, LEVELS, MACHINE_CREDENTIALS_VERSION, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, OFFLOAD_MODES, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SUMMARY_ARCHIVES, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceStateDirsAsync, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, applyKeyedDelta, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, cannotHost, capDrops, clientIdentity, clientIdentityKeyFile, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createAsyncAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileIdentity, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAgentDriverName, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, hostedWorkerSettleMs, isExpoErrorContext, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listRecordedDevicesAsync, listSegments, listSegmentsAsync, listStatusCacheEntries, loadConfig, logFiles, machineCacheUsageFile, machineCapacity, machineEndpoint, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openLogDir, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMachineCredential, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, planLogQuery, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveAsync, readArchiveState, readArchives, readArchivesAsync, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHomeIdentity, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMachineCacheUsage, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, statusViews, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trashRoot, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, windowsShortDir, windowsShortDirKey, withConfigLock, withConfigLockAsync, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock, workspaceSummary };
|
package/dist/toolchain.d.mts
CHANGED
|
@@ -8,6 +8,8 @@ interface ToolchainProbe {
|
|
|
8
8
|
isFile(path: string): boolean;
|
|
9
9
|
read(path: string): string | null;
|
|
10
10
|
list(path: string): string[];
|
|
11
|
+
/** The target of the symbolic link at `path`, or null when it is not one. */
|
|
12
|
+
link(path: string): string | null;
|
|
11
13
|
}
|
|
12
14
|
declare function defaultToolchainProbe(): ToolchainProbe;
|
|
13
15
|
/**
|
|
@@ -27,6 +29,11 @@ interface Toolchain {
|
|
|
27
29
|
}
|
|
28
30
|
/** Whether Node `version`, such as `22.12.0`, satisfies a pin such as `22`, `v22.12` or `22.12.0`. */
|
|
29
31
|
declare function satisfiesNodePin(version: string, spec: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether Node `version` is an acceptable stand-in for a pin no install matches: the pin's major, and not older than
|
|
34
|
+
* the version the pin names.
|
|
35
|
+
*/
|
|
36
|
+
declare function meetsNodePinMajor(version: string, spec: string): boolean;
|
|
30
37
|
/** The `bin` directory of the Node a version manager makes the default in new shells, and where that came from. */
|
|
31
38
|
declare function defaultNodeBin(env: NodeJS.ProcessEnv, probe: ToolchainProbe): {
|
|
32
39
|
bin: string;
|
|
@@ -44,21 +51,29 @@ declare function discoverToolchain(base: NodeJS.ProcessEnv, probe?: ToolchainPro
|
|
|
44
51
|
runningNode?: boolean;
|
|
45
52
|
platform?: NodeJS.Platform;
|
|
46
53
|
}): Toolchain;
|
|
47
|
-
/**
|
|
48
|
-
|
|
54
|
+
/**
|
|
55
|
+
* The Node version pinned by `.nvmrc`, `.node-version`, `.tool-versions` or `package.json`'s `volta.node` in `root`,
|
|
56
|
+
* or else in the nearest directory above it up to `top`.
|
|
57
|
+
*/
|
|
58
|
+
declare function projectNodePin(root: string, probe?: ToolchainProbe, top?: string): {
|
|
49
59
|
spec: string;
|
|
50
60
|
file: string;
|
|
51
61
|
} | null;
|
|
62
|
+
/** A pin's version spec, with an `lts/...` pin resolved through nvm's aliases, or null when nvm cannot resolve it. */
|
|
63
|
+
declare function resolveNodePinSpec(spec: string, env: NodeJS.ProcessEnv, probe?: ToolchainProbe): string | null;
|
|
52
64
|
/**
|
|
53
|
-
* The `bin` directory of an installed Node
|
|
54
|
-
*
|
|
55
|
-
*
|
|
65
|
+
* The `bin` directory of an installed Node for the pin `projectNodePin` finds, from nvm, fnm, Volta, asdf, mise or a
|
|
66
|
+
* linked Homebrew `node` or `node@NN`, or null when the project pins none or no install fits. `match` is `exact` for an
|
|
67
|
+
* install the pin names. When none is, it is `major` for the newest install of the pinned major that is not older than
|
|
68
|
+
* the pinned version, since Homebrew cannot install a chosen patch release. An `lts/...` pin resolves through
|
|
69
|
+
* `resolveNodePinSpec`.
|
|
56
70
|
*/
|
|
57
|
-
declare function projectNodeBin(root: string, env: NodeJS.ProcessEnv, probe?: ToolchainProbe): {
|
|
71
|
+
declare function projectNodeBin(root: string, env: NodeJS.ProcessEnv, probe?: ToolchainProbe, top?: string): {
|
|
58
72
|
bin: string;
|
|
59
73
|
version: string;
|
|
60
74
|
pin: string;
|
|
61
75
|
spec: string;
|
|
76
|
+
match: "exact" | "major";
|
|
62
77
|
} | null;
|
|
63
78
|
//#endregion
|
|
64
|
-
export { Toolchain, ToolchainEntry, ToolchainProbe, defaultNodeBin, defaultToolchainProbe, discoverToolchain, projectNodeBin, projectNodePin, satisfiesNodePin };
|
|
79
|
+
export { Toolchain, ToolchainEntry, ToolchainProbe, defaultNodeBin, defaultToolchainProbe, discoverToolchain, meetsNodePinMajor, projectNodeBin, projectNodePin, resolveNodePinSpec, satisfiesNodePin };
|
package/dist/toolchain.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
1
|
+
import { readFileSync, readdirSync, readlinkSync, statSync } from "node:fs";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
|
-
import { delimiter, dirname, join } from "node:path";
|
|
3
|
+
import { basename, delimiter, dirname, join } from "node:path";
|
|
4
4
|
//#region toolchain.ts
|
|
5
5
|
const stat = (path) => statSync(path, { throwIfNoEntry: false });
|
|
6
6
|
function defaultToolchainProbe() {
|
|
@@ -22,6 +22,13 @@ function defaultToolchainProbe() {
|
|
|
22
22
|
} catch {
|
|
23
23
|
return [];
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
link: (path) => {
|
|
27
|
+
try {
|
|
28
|
+
return readlinkSync(path);
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
};
|
|
27
34
|
}
|
|
@@ -38,8 +45,9 @@ function jdkRank(name) {
|
|
|
38
45
|
return major === 17 ? 0 : major === 21 ? 1 : 1e4 - major;
|
|
39
46
|
}
|
|
40
47
|
const ANDROID_STUDIOS = ["/Applications/Android Studio.app", "/Applications/Android Studio Preview.app"];
|
|
48
|
+
/** Accepts Homebrew's Cellar names too, such as `22.23.2_1`, whose `_1` is the formula revision. */
|
|
41
49
|
function parseVersion(text) {
|
|
42
|
-
const match = /^v?(\d+)\.(\d+)\.(\d+)
|
|
50
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:_\d+)?$/.exec(text.trim());
|
|
43
51
|
return match ? [
|
|
44
52
|
Number(match[1]),
|
|
45
53
|
Number(match[2]),
|
|
@@ -69,6 +77,24 @@ function newestMatching(names, wanted) {
|
|
|
69
77
|
function satisfiesNodePin(version, spec) {
|
|
70
78
|
return newestMatching([version], spec) !== null;
|
|
71
79
|
}
|
|
80
|
+
/** The lowest version a pin such as `22.22` or `v22.22.0` names, or null for a pin that names only a major or no number. */
|
|
81
|
+
function pinFloor(spec) {
|
|
82
|
+
const match = /^v?(\d+)\.(\d+)(?:\.(\d+))?$/.exec(spec.trim());
|
|
83
|
+
return match ? [
|
|
84
|
+
Number(match[1]),
|
|
85
|
+
Number(match[2]),
|
|
86
|
+
Number(match[3] ?? 0)
|
|
87
|
+
] : null;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Whether Node `version` is an acceptable stand-in for a pin no install matches: the pin's major, and not older than
|
|
91
|
+
* the version the pin names.
|
|
92
|
+
*/
|
|
93
|
+
function meetsNodePinMajor(version, spec) {
|
|
94
|
+
const parsed = parseVersion(version);
|
|
95
|
+
const floor = pinFloor(spec);
|
|
96
|
+
return !!parsed && !!floor && parsed[0] === floor[0] && compareVersions(parsed, floor) >= 0;
|
|
97
|
+
}
|
|
72
98
|
function matchesPrefix(version, spec) {
|
|
73
99
|
if (spec === "" || spec === "node" || spec === "stable") return true;
|
|
74
100
|
const parts = spec.split(".");
|
|
@@ -254,8 +280,17 @@ function javaEntry(env, probe) {
|
|
|
254
280
|
source: "missing"
|
|
255
281
|
};
|
|
256
282
|
}
|
|
257
|
-
/**
|
|
258
|
-
|
|
283
|
+
/**
|
|
284
|
+
* The Node version pinned by `.nvmrc`, `.node-version`, `.tool-versions` or `package.json`'s `volta.node` in `root`,
|
|
285
|
+
* or else in the nearest directory above it up to `top`.
|
|
286
|
+
*/
|
|
287
|
+
function projectNodePin(root, probe = defaultToolchainProbe(), top = root) {
|
|
288
|
+
for (let dir = root;; dir = dirname(dir)) {
|
|
289
|
+
const pin = nodePinIn(dir, probe);
|
|
290
|
+
if (pin || dir === top || dirname(dir) === dir) return pin;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function nodePinIn(root, probe) {
|
|
259
294
|
for (const file of [".nvmrc", ".node-version"]) {
|
|
260
295
|
const line = probe.read(join(root, file))?.split("\n").map((text) => text.trim()).find((text) => text && !text.startsWith("#"));
|
|
261
296
|
if (line) return {
|
|
@@ -275,52 +310,78 @@ function projectNodePin(root, probe = defaultToolchainProbe()) {
|
|
|
275
310
|
file: "package.json"
|
|
276
311
|
} : null;
|
|
277
312
|
}
|
|
313
|
+
/** A pin's version spec, with an `lts/...` pin resolved through nvm's aliases, or null when nvm cannot resolve it. */
|
|
314
|
+
function resolveNodePinSpec(spec, env, probe = defaultToolchainProbe()) {
|
|
315
|
+
if (!spec.startsWith("lts/")) return spec;
|
|
316
|
+
const resolved = nvmAlias(nvmDir(env, probe), spec, probe);
|
|
317
|
+
return resolved.startsWith("lts/") ? null : resolved;
|
|
318
|
+
}
|
|
278
319
|
/**
|
|
279
|
-
* The `bin` directory of an installed Node
|
|
280
|
-
*
|
|
281
|
-
*
|
|
320
|
+
* The `bin` directory of an installed Node for the pin `projectNodePin` finds, from nvm, fnm, Volta, asdf, mise or a
|
|
321
|
+
* linked Homebrew `node` or `node@NN`, or null when the project pins none or no install fits. `match` is `exact` for an
|
|
322
|
+
* install the pin names. When none is, it is `major` for the newest install of the pinned major that is not older than
|
|
323
|
+
* the pinned version, since Homebrew cannot install a chosen patch release. An `lts/...` pin resolves through
|
|
324
|
+
* `resolveNodePinSpec`.
|
|
282
325
|
*/
|
|
283
|
-
function projectNodeBin(root, env, probe = defaultToolchainProbe()) {
|
|
284
|
-
const pin = projectNodePin(root, probe);
|
|
326
|
+
function projectNodeBin(root, env, probe = defaultToolchainProbe(), top = root) {
|
|
327
|
+
const pin = projectNodePin(root, probe, top);
|
|
285
328
|
if (!pin) return null;
|
|
329
|
+
const spec = resolveNodePinSpec(pin.spec, env, probe);
|
|
330
|
+
if (!spec) return null;
|
|
286
331
|
const nvm = nvmDir(env, probe);
|
|
287
|
-
const
|
|
288
|
-
const
|
|
332
|
+
const asdf = join(env.ASDF_DATA_DIR || join(probe.home, ".asdf"), "installs", "nodejs");
|
|
333
|
+
const groups = [
|
|
289
334
|
{
|
|
290
335
|
dir: join(nvm, "versions", "node"),
|
|
291
336
|
bin: (name) => join(nvm, "versions", "node", name, "bin")
|
|
292
337
|
},
|
|
293
|
-
{
|
|
294
|
-
dir: join(
|
|
295
|
-
bin: (name) => join(
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
dir: join(probe.home, "Library", "Application Support", "fnm", "node-versions"),
|
|
299
|
-
bin: (name) => join(probe.home, "Library", "Application Support", "fnm", "node-versions", name, "installation", "bin")
|
|
300
|
-
},
|
|
338
|
+
...[join(probe.home, ".local", "share", "fnm"), join(probe.home, "Library", "Application Support", "fnm")].map((fnm) => ({
|
|
339
|
+
dir: join(fnm, "node-versions"),
|
|
340
|
+
bin: (name) => join(fnm, "node-versions", name, "installation", "bin")
|
|
341
|
+
})),
|
|
301
342
|
{
|
|
302
343
|
dir: join(probe.home, ".volta", "tools", "image", "node"),
|
|
303
344
|
bin: (name) => join(probe.home, ".volta", "tools", "image", "node", name, "bin")
|
|
304
345
|
},
|
|
305
346
|
{
|
|
306
|
-
dir:
|
|
307
|
-
bin: (name) => join(
|
|
347
|
+
dir: asdf,
|
|
348
|
+
bin: (name) => join(asdf, name, "bin")
|
|
308
349
|
},
|
|
309
350
|
{
|
|
310
351
|
dir: join(probe.home, ".local", "share", "mise", "installs", "node"),
|
|
311
352
|
bin: (name) => join(probe.home, ".local", "share", "mise", "installs", "node", name, "bin")
|
|
312
353
|
}
|
|
313
|
-
]
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
354
|
+
].map(({ dir, bin }) => probe.list(dir).map((name) => ({
|
|
355
|
+
name,
|
|
356
|
+
bin: bin(name)
|
|
357
|
+
})));
|
|
358
|
+
groups.push(HOMEBREW_PREFIXES.flatMap((prefix) => probe.list(join(prefix, "opt")).filter((keg) => /^node(@\d+)?$/.test(keg)).map((keg) => ({
|
|
359
|
+
name: basename(probe.link(join(prefix, "opt", keg)) ?? ""),
|
|
360
|
+
bin: join(prefix, "opt", keg, "bin")
|
|
361
|
+
}))));
|
|
362
|
+
const installs = groups.map((group) => group.filter(({ bin }) => probe.isFile(join(bin, "node"))));
|
|
363
|
+
const found = (install, match) => ({
|
|
364
|
+
bin: install.bin,
|
|
365
|
+
version: install.name.replace(/^v/, "").replace(/_\d+$/, ""),
|
|
366
|
+
pin: pin.file,
|
|
367
|
+
spec,
|
|
368
|
+
match
|
|
369
|
+
});
|
|
370
|
+
for (const group of installs) {
|
|
371
|
+
const name = newestMatching(group.map((install) => install.name), spec);
|
|
372
|
+
const install = group.find((candidate) => candidate.name === name);
|
|
373
|
+
if (install) return found(install, "exact");
|
|
374
|
+
}
|
|
375
|
+
let fallback = null;
|
|
376
|
+
for (const install of installs.flat()) {
|
|
377
|
+
const version = parseVersion(install.name);
|
|
378
|
+
if (!version || !meetsNodePinMajor(install.name, spec)) continue;
|
|
379
|
+
if (!fallback || compareVersions(version, fallback.version) > 0) fallback = {
|
|
380
|
+
install,
|
|
381
|
+
version
|
|
321
382
|
};
|
|
322
383
|
}
|
|
323
|
-
return null;
|
|
384
|
+
return fallback ? found(fallback.install, "major") : null;
|
|
324
385
|
}
|
|
325
386
|
//#endregion
|
|
326
|
-
export { defaultNodeBin, defaultToolchainProbe, discoverToolchain, projectNodeBin, projectNodePin, satisfiesNodePin };
|
|
387
|
+
export { defaultNodeBin, defaultToolchainProbe, discoverToolchain, meetsNodePinMajor, projectNodeBin, projectNodePin, resolveNodePinSpec, satisfiesNodePin };
|