npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xmcl/installer

v6.3.4

Published

The installers of Minecraft/Forge/Fabric/Liteloader/Quilt

Readme

Installer Module

@xmcl/installer builds and executes resumable Minecraft installation workflows.

The API has three layers:

  1. Domain resolvers describe Minecraft files, loader recipes, and diagnostics.
  2. Workflows resolve multi-stage domain work into executable install manifests.
  3. Runtimes execute domain-neutral file, Java, and filesystem tasks.

Install Files

Pure resolvers return InstallFile values that can be combined into a manifest:

import { MinecraftFolder } from '@xmcl/core'
import {
  createDefaultNodeInstallRuntime,
  executeInstallManifest,
  resolveLibraryInstallFiles,
} from '@xmcl/installer'

const minecraft = MinecraftFolder.from('C:/Minecraft')
const files = resolveLibraryInstallFiles(version.libraries, minecraft, options)

await executeInstallManifest({
  schemaVersion: 1,
  tasks: [{ id: 'libraries', type: 'files', files }],
}, createDefaultNodeInstallRuntime())

Common file resolvers include:

  • resolveMinecraftVersionJsonInstallFile
  • resolveMinecraftJarInstallFile
  • resolveLibraryInstallFiles
  • resolveAssetMetadataInstallManifest
  • resolveAssetObjectInstallFiles
  • resolveAssetInstallFiles

Install Workflows

Use an InstallWorkflow when later work depends on metadata or files produced by an earlier stage. A workflow is a stateful object with an asynchronous next() method; it is not an async generator.

import {
  createDefaultNodeInstallRuntime,
  createModernForgeInstallWorkflow,
  executeInstallWorkflow,
} from '@xmcl/installer'

const result = await executeInstallWorkflow(
  createModernForgeInstallWorkflow(options),
  createDefaultNodeInstallRuntime(),
)

Available workflows include:

  • createFabricInstallWorkflow
  • createQuiltInstallWorkflow
  • createLabyModInstallWorkflow
  • createProfileInstallWorkflow
  • createModernForgeInstallWorkflow
  • createJavaRuntimeInstallWorkflow
  • createZuluRuntimeInstallWorkflow

runInstallWorkflow is the lower-level stage runner for applications that execute each generated manifest through their own service boundary.

Manifest Tasks

An InstallManifest contains independent tasks connected by dependsOn:

  • files validates and downloads files, retrying invalid results.
  • java tries command strategies in order and validates their outputs.
  • materialize applies filesystem operations transactionally and validates outputs before commit.

Materialize outputs are postconditions, not cache keys. Materialize operations run whenever their stage is reached so permissions, links, extracted layouts, and removals are restored even when an individual output file already exists.

The ensure-directory operation preserves an existing directory and creates it only when absent. Operations that write files already ensure their own parent directories, so workflows emit ensure-directory only when the directory itself is part of the required layout.

Runtime Adapters

createDefaultNodeInstallRuntime uses @xmcl/file-transfer for downloads. Applications can replace downloading, checksums, or Java execution while retaining the standard filesystem implementation:

import {
  createNodeInstallRuntime,
  executeInstallManifest,
} from '@xmcl/installer'

const runtime = createNodeInstallRuntime({
  signal: controller.signal,
  checksum: (path, algorithm) => checksumWorker(path, algorithm),
  download: (files) => downloader.download(files),
})

await executeInstallManifest(plan, runtime)

The runtime contract is domain-neutral. Mirror selection, proxy handling, concurrency, progress tracking, and process execution remain application concerns.

Domain Recipes

These APIs resolve serializable application-level recipes rather than executable task graphs:

  • resolveVersionInstallManifest
  • resolveVersionRepairManifest
  • resolveJavaInstallManifest

Applications consume a recipe and use the lower-level resolvers and workflows to execute it. Java fallback metadata is resolved only when that fallback is attempted.

Diagnostics

Diagnostics inspect an installation without mutating it:

  • diagnoseInstallation
  • diagnoseServerInstallation
  • diagnoseProfile
  • diagnoseProcessorOutputs
  • diagnoseLibraries
  • diagnoseVersionAssets

Browser Entry Point

The browser entry point exposes serializable recipes, errors, and metadata helpers from the *.browser modules. Node filesystem executors and workflows are available only from the main entry point.