Skip to content

@loontail/minecraft-kit / InstallRunOptions

Type Alias: InstallRunOptions

ts
type InstallRunOptions = OperationOptions & {
  actionCategories?: ReadonlySet<DownloadAction["category"]>;
  pauseController?: PauseController;
};

Defined in: src/kit/install-aspect.ts:48

Options accepted by install.run (and install.runtime.run).

Type Declaration

NameTypeDescriptionDefined in
actionCategories?ReadonlySet<DownloadAction["category"]>Filter the run to a subset of action categories. Useful for partial reinstalls (e.g. assets-only). When omitted, every action in the plan runs. Dependent post-download steps are filtered too: native extraction is skipped unless LIBRARY is included, Forge processors unless FORGE_LIBRARY is included, and the runtime stage unless RUNTIME_FILE is included. Version-JSON and logging-config writes always run — they are cheap and idempotent, and running them is what leaves a partial run with a coherent tree on disk. Example import { DownloadCategories } from "@loontail/minecraft-kit"; await kit.install.run(plan, { actionCategories: new Set([ DownloadCategories.CLIENT_JAR, DownloadCategories.LIBRARY, DownloadCategories.ASSET_INDEX, DownloadCategories.ASSET, ]), });src/kit/install-aspect.ts:78
pauseController?PauseControllerCooperative pause/resume primitive — see PauseController. The runner checks the pause state at every stage boundary and between download chunks.src/kit/install-aspect.ts:53

Example

ts
import { PauseController, type InstallRunOptions } from "@loontail/minecraft-kit";

const pauseController = new PauseController();
const controller = new AbortController();
const options: InstallRunOptions = {
  pauseController,
  signal: controller.signal,
  onEvent: (e) => console.log(e.type),
};
await kit.install.run(plan, options);

MIT License