Skip to main content

Build And Release

The current package is @plato/pc-printer.

Scripts

Build Locally

Create Release Zip

The bundle script:
  1. Increments src/version.ts.
  2. Builds the driver into dist.
  3. Prepares the configured Windows Redis binary.
  4. Builds output/plato-printer.exe.
  5. Copies config.json.
  6. Copies Caddy assets.
  7. Copies certificates.
  8. Copies redis-binaries/<redis.version>.
  9. Creates plato-printer.zip.

Release Contents

Versioning

src/version.ts contains:
The build version is returned by GET /health and printed in the startup banner. Do not edit this file manually; scripts/increment-version.js updates it during pnpm bundle.

Caddy Preparation

Caddy is pinned to 2.6.4. To download Caddy into assets/caddy before bundling:
If assets/caddy/caddy.exe exists, runtime setup can copy it instead of downloading Caddy on the customer machine.

Redis Binary Preparation

scripts/prepare-redis-binaries.js reads config.json and downloads the configured Windows Redis release if missing. The expected path is:

Stress Test

The stress test starts mock TCP printers and sends many /print requests.
Useful options:
The test passes when all target queues drain.

Release Checklist

  1. Confirm config.json is correct for the release.
  2. Confirm Caddy assets exist if HTTPS should work offline.
  3. Run pnpm --filter @plato/pc-printer clean.
  4. Run pnpm --filter @plato/pc-printer bundle.
  5. Run the executable from output/.
  6. Check GET /health.
  7. Run a real test print.
  8. Verify plato-printer.zip contains the expected files.