Skip to content

Puffball

An immutable release catalog for teams hosting other people's web apps: promote the Release that should go live and serve only bytes that match its digest.

  • @fungi.computer/puffball
  • v0.2.0
  • MIT

Fastest path

  1. Install

    Add it to your project with npm, pnpm, Yarn or Bun.

    TERMINAL
    npm install @fungi.computer/puffball
  2. Create an App and check an unpublished route

    Creates an App in the in-memory catalog, then resolves a route nothing has been promoted to; the catalog refuses to serve it and prints the error it throws.

    home.ts
    import {
    AppReleasePublicWebsiteNotFoundError,
    createAppReleaseCatalog,
    parseAppId,
    parseStableRoute,
    } from "@fungi.computer/puffball";
    import { createDeterministicMemoryAppReleaseStore } from "@fungi.computer/puffball/effect";
    const catalog = createAppReleaseCatalog({
    store: createDeterministicMemoryAppReleaseStore(),
    artifactReader: { read: async () => ({ kind: "missing" }) },
    });
    await catalog.createApp({ appId: parseAppId("app_hello") });
    try {
    await catalog.resolvePublicWebsite(parseStableRoute("/hello"));
    } catch (error) {
    if (!(error instanceof AppReleasePublicWebsiteNotFoundError)) throw error;
    console.log(error.name); // AppReleasePublicWebsiteNotFoundError
    }