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

@frmds/autodoc

v0.8.3

Published

Processes JSON5 files for Frontier Mods, a collection of mods for the game Cataclysm: Dark Days Ahead

Readme

@frmds/autodoc

autodoc is a .devtools plugin that compiles a Cataclysm: Dark Days Ahead mod written in a higher-level, composable, DRY form down into game-ready JSON.

Install

autodoc is a frontier plugin, so install it globally alongside the frontier CLI:

bun add -g @frmds/autodoc

Installing registers the plugin automatically. You can also register it manually:

frontier plugins add @frmds/autodoc

Usage

In a mod directory containing a frontier.json5:

frontier run autodoc build

autodoc build does the following:

  • reads your source files from the input directory (./src by default)
  • resolves game-native copy-from inheritance across the mod's dependency chain
  • applies built-in runtime derivations (e.g. longest_side from volume)
  • runs the resolved objects through the configured transformers
  • writes game-ready JSON to the output directory (./json by default)

Source files may be JSON or JSON5. Both compile to safe JSON.

Flags

| Flag | Description | Default | | ---------------- | --------------------------------------------------------- | ----------- | | --input <dir> | Override the input directory | ./src | | --output <dir> | Override the output directory | ./json | | --game <dir> | Override the game installation directory | from config | | --parallel <n> | Objects to scan in parallel | 16 | | --clean | Remove the output directory and all caches before running | off |

Configuration

Configure autodoc under the autodoc section of frontier.json5:

autodoc: {
  // maximum concurrent operations to run
	concurrency: 16,
	// transformers to run on build (see below)
	transformers: [
		{ package: "@frmds/transformers", export: "ALL_TRANSFORMERS" },
	],
}
  • transformers: the transformers to load and run, in declaration order. None run unless declared. See below.
  • concurrency: maximum concurrent operations during the scan phase. Defaults to 16. The --parallel flag overrides it for a single run.

Input and output directories are resolved from the frontier-level config and can be overridden per run with --input and --output.

Transformers

autodoc runs only the transformers you declare under autodoc.transformers, in declaration order. It ships with no default stack, so you must specify which transformers to run on each mod.

Each entry references transformers from an installed package or a local module, and runs them in declaration order:

autodoc: {
	transformers: [
		// every transformer in a package, via a named export
		{ package: "@frmds/transformers", export: "ALL_TRANSFORMERS" },

		// the package's `default` export (omit `export` to use it)
		{ package: "@frmds/transformers" },

		// several named exports from one package
		{ package: "@frmds/transformers", export: ["math", "quantities"] },

		// a local module, relative to the mod root
		{ module: "./transformers/my-transformer.ts" },

		// a local module by absolute path
		{ module: "/home/me/shared/transformers/index.ts", export: "default" },
	],
}

Each named export may hold a single transformer or an array of them. Transformers are deduplicated by name, keeping the first declaration.

Incremental builds

autodoc caches build state under the mod's .frontier/ directory. A second run with no source, dependency, or environment changes is near-instant: the freshness check confirms the previous outputs are still valid and exits without rebuilding.

Pass --clean to discard the output directory and all caches before building.

Caveats

autodoc deliberately handles some object types specially. Watch for these in your output:

  • Skipped entirely. talk_topic objects are neither loaded nor output. They allow multiple objects per ID (additive topic files), which neither our system nor the base game's one-object-per-ID model supports.
  • Loaded and output, but not transformed. effect_on_condition and enchantment objects carry properties (such as native math objects) that collide with transformer inputs, so they pass through untransformed.
  • Never output. PARTIAL and FUNCTION objects are internal types that support transformer functionality and are never valid DDA objects. FUNCTION is also skipped by transformation because it holds argument placeholders that aren't valid until invocation.

A native math object surviving in the output is expected for the untransformed types above.