- scripts/e2e.sh (+ scripts/e2e/*.ts): the two-node end-to-end test, now self-contained and cleaning up after itself; `make e2e`, part of `make check` - Dockerfile/.dockerignore: static Go build in a non-root alpine image, data in /data, defaults to region u1j; `make docker` - flake.nix, nix/: package (buildGoModule), dev shell, NixOS module services.allmende (hardened systemd unit that waits for `allmende-admin init`), and a NixOS VM test run by `nix flake check` - README: running a node with Docker and NixOS Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
479 B
TypeScript
11 lines
479 B
TypeScript
// Prints the draft the UI's Renew button would PUT for a listing, read from stdin (the listing JSON).
|
|
import { readFileSync } from "node:fs";
|
|
import { draftFromListing } from "../../web/src/draft.ts";
|
|
import type { Listing } from "../../web/src/verify.ts";
|
|
|
|
const l = JSON.parse(readFileSync(0, "utf8")) as Listing;
|
|
const title = process.argv[2];
|
|
const d = draftFromListing(l, Number(process.argv[3] ?? 30));
|
|
if (title) d.title = title;
|
|
process.stdout.write(JSON.stringify(d));
|