railyard/packages/cli/package.json
caelum0x eb26c4d38a feat(cli): railyard deploy with branch previews, deploy records and rollback (RYP-D4, Y-3)
npx railyard (zero dependencies):
- login: device flow against the console; the org token is saved 0600
  and never printed; no option takes a key or token.
- deploy: detects Next.js (OpenNext build for Workers), Vite, Astro
  (static output) or plain static; anything else stops with one line
  that says what to change (SvelteKit, Remix, Nuxt, server Astro...).
  Uses wrangler's own OAuth login on the user's machine, names the
  Worker <app> on main and <app>-<branch> elsewhere, and records URL,
  commit, branch, framework, duration and status in the console.
- rollback: wrangler rollback to the previous successful version id of
  the same branch, recorded with rollback_of.
- deploys: lists recent deploys.

Console: /api/v1/deploys (POST record, GET list) and /api/v1/deploys/:id
with org-scoped bearer tokens; the first deploy of a new app name creates
the app within the plan's limits; a paused or card-less org is refused
with 402. The Apps screen lists recent deploys.

Tests: the CLI runs against a mocked wrangler and the real console
device-flow and deploy code over local HTTP (login, main deploy, branch
preview, records, rollback, OpenNext path, failure, refusals, no token
in any output); deploy service tests cover org isolation and input
validation; README and CLI strings pass the copy lint. The run on a
real Cloudflare account is owner-run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:54:03 +03:00

12 lines
416 B
JSON

{
"name": "railyard",
"version": "0.1.0",
"description": "Deploy Next.js, Vite, Astro or static sites to your own Cloudflare account from one command, with branch previews and rollback.",
"type": "module",
"bin": { "railyard": "bin/railyard.mjs" },
"files": ["bin", "src", "README.md"],
"engines": { "node": ">=20" },
"scripts": { "test": "node --test test/*.test.mjs" },
"license": "UNLICENSED"
}