Skip to content

@loontail/minecraft-kit / ProgressEvent

Type Alias: ProgressEvent

ts
type ProgressEvent = ProgressEventContext & 
  | {
  phase: InstallPhase;
  previous: InstallPhase | null;
  type: "install:phase-changed";
}
  | {
  expectedSize: number;
  file: FileRef;
  type: "download:started";
}
  | {
  bytesDownloaded: number;
  file: FileRef;
  totalBytes: number;
  type: "download:progress";
}
  | {
  file: FileRef;
  type: "download:skipped";
}
  | {
  bytes: number;
  durationMs: number;
  file: FileRef;
  type: "download:completed";
}
  | {
  error: Error;
  file: FileRef;
  type: "download:failed";
  willRetry: boolean;
}
  | {
  algorithm: "sha1" | "sha256";
  file: FileRef;
  hash: string;
  type: "integrity:verified";
}
  | {
  actual: string;
  algorithm: "sha1" | "sha256";
  expected: string;
  file: FileRef;
  type: "integrity:mismatch";
}
  | {
  archive: string;
  fileCount: number;
  target: string;
  type: "archive:extracted";
}
  | {
  processor: ProcessorRef;
  total: number;
  type: "forge:processor-started";
}
  | {
  durationMs: number;
  exitCode: number;
  processor: ProcessorRef;
  type: "forge:processor-completed";
}
  | {
  path: string;
  processor: ProcessorRef;
  type: "forge:processor-output-verified";
}
  | {
  file: VerificationFileResult;
  type: "verify:file-checked";
}
  | {
  args: readonly string[];
  command: string;
  cwd: string;
  type: "launch:starting";
}
  | {
  pid: number;
  type: "launch:started";
}
  | {
  line: string;
  type: "launch:stdout";
}
  | {
  line: string;
  type: "launch:stderr";
}
  | {
  code: number | null;
  signal: NodeJS.Signals | null;
  type: "launch:exited";
}
  | {
  reason: string;
  type: "launch:aborted";
};

Defined in: src/types/events.ts:67

Discriminated union of all runtime progress events. Pass an onEvent callback to install.run, update.run, verify.run, repair.run, or launch.run to receive these.

MIT License