Conversation
Register @fastify/static on PENA_WEB_DIR (default apps/web/dist) with an SPA fallback for extension-less GET/HEAD paths, JSON 404s for /api/* and missing files, and API-only mode when the web build is absent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Zero-dependency CLI over the Pena API: server start/stop/status with a detached process and ownership-checked pidfile, asset upload, collection and doc operations, feedback show/wait/watch, and skill install. doc publish uploads referenced local images into a staged copy and resolves ETag preconditions; exit codes 2/3/4 distinguish usage errors, precondition failures, and wait timeouts. The feedback watch test moves here from the server package. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The skill drives pena commands instead of curl and node scripts; the scripts are removed. README documents build, link, server start, and skill install. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… and scanner - server start --foreground fails on a signal death instead of exiting 0 - server start honours PENA_WEB_DIR in its web build precondition - server stop tolerates a pid that exits between check and signal, and gives up after the SIGKILL deadline instead of spinning - feedback wait aborts with exit 1 if the server does not answer within the requested timeout plus a grace period - the image scanner skips indented code blocks, but not indented list content - -h works after the command words - non-EPIPE output errors are reported instead of thrown from the listener - docs: the no-link fallback is pnpm --silent pena so --json stays parseable Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@fastify/staticonPENA_WEB_DIR(defaultapps/web/dist) with an SPA fallback for/,/collections,/collections/:slug,/archive,/docs/:slug; JSON 404 for/api/*and missing files; API-only mode when the web build is absent.penaCLI (apps/cli, no third-party runtime deps):server start|stop|status,asset upload,collection list|create|rename|delete,doc list|show|publish|rename|move|archive|unarchive|versions|restore,feedback show|wait|watch,skill install.doc publishuploads referenced local images into a staged copy and resolves ETag preconditions itself;--etag,--create, and--feedback-matchremain explicit. Exit codes: 0 ok, 1 server/network, 2 usage, 3 precondition failed, 4 wait timeout.server stoponly signals a pid it started and can prove is a Pena server.pena skill installcopies it. Review URLs move from 5173 to 8788.binsopnpm link --globalexposespena;pnpm pena ...works without linking.pnpm devstays the two-process dev mode.Test plan
pnpm build && pnpm typecheck && pnpm teston Node 24: server 114, web 71, cli 55 tests pass--feedback-matchstale (exit 3) vs fresh, skill install, stop leaves no listener/docs/<slug>on the single port renders the app and Mermaid; all requests same-origin; comment submitted in the UI arrives viapena feedback showandpena feedback watchAfter merging
Run
pnpm build && pnpm link --global(needspnpm setuponce) andpena skill install. The oldpnpm devserver on 8788 must be stopped beforepena server start.🤖 Generated with Claude Code