[Init] Initial commit - NetMesh terminal manager
Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
This commit is contained in:
67
domain/systemManager/pollEquals.ts
Normal file
67
domain/systemManager/pollEquals.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import type {
|
||||
DockerContainerInfo,
|
||||
DockerImageInfo,
|
||||
ListeningPortInfo,
|
||||
SystemdUnitInfo,
|
||||
SystemProcessInfo,
|
||||
TmuxSessionInfo,
|
||||
} from './types';
|
||||
|
||||
export function systemProcessInfoEqual(a: SystemProcessInfo, b: SystemProcessInfo): boolean {
|
||||
return a.pid === b.pid
|
||||
&& a.ppid === b.ppid
|
||||
&& a.user === b.user
|
||||
&& a.stat === b.stat
|
||||
&& a.cpuPercent === b.cpuPercent
|
||||
&& a.memPercent === b.memPercent
|
||||
&& a.rssKb === b.rssKb
|
||||
&& a.vszKb === b.vszKb
|
||||
&& a.elapsed === b.elapsed
|
||||
&& a.command === b.command;
|
||||
}
|
||||
|
||||
export function tmuxSessionInfoEqual(a: TmuxSessionInfo, b: TmuxSessionInfo): boolean {
|
||||
return a.name === b.name
|
||||
&& a.windows === b.windows
|
||||
&& a.attached === b.attached
|
||||
&& a.created === b.created
|
||||
&& a.activity === b.activity
|
||||
&& a.group === b.group;
|
||||
}
|
||||
|
||||
export function dockerContainerInfoEqual(a: DockerContainerInfo, b: DockerContainerInfo): boolean {
|
||||
return a.id === b.id
|
||||
&& a.name === b.name
|
||||
&& a.image === b.image
|
||||
&& a.status === b.status
|
||||
&& a.state === b.state
|
||||
&& a.ports === b.ports
|
||||
&& a.createdAt === b.createdAt;
|
||||
}
|
||||
|
||||
export function dockerImageInfoEqual(a: DockerImageInfo, b: DockerImageInfo): boolean {
|
||||
return a.id === b.id
|
||||
&& a.repository === b.repository
|
||||
&& a.tag === b.tag
|
||||
&& a.name === b.name
|
||||
&& a.size === b.size
|
||||
&& a.createdAt === b.createdAt;
|
||||
}
|
||||
|
||||
export function listeningPortInfoEqual(a: ListeningPortInfo, b: ListeningPortInfo): boolean {
|
||||
return a.id === b.id
|
||||
&& a.protocol === b.protocol
|
||||
&& a.address === b.address
|
||||
&& a.port === b.port
|
||||
&& a.pid === b.pid
|
||||
&& a.processName === b.processName;
|
||||
}
|
||||
|
||||
export function systemdUnitInfoEqual(a: SystemdUnitInfo, b: SystemdUnitInfo): boolean {
|
||||
return a.name === b.name
|
||||
&& a.loadState === b.loadState
|
||||
&& a.activeState === b.activeState
|
||||
&& a.subState === b.subState
|
||||
&& a.description === b.description
|
||||
&& a.scope === b.scope;
|
||||
}
|
||||
Reference in New Issue
Block a user