diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04497d8..0d7adaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,13 @@ on: push: branches: [main, master, dev] pull_request: - branches: [main, master, dev] jobs: test: runs-on: ubuntu-latest strategy: matrix: - node-version: [18, 20, 22, 24] + node-version: [22, 24] steps: - uses: actions/checkout@v4 @@ -28,12 +27,7 @@ jobs: - name: Run linter run: npm run lint - - name: Run tests - if: matrix.node-version == 18 - run: npm test - - name: Run tests with coverage - if: matrix.node-version != 18 run: npm run test:coverage - name: CLI smoke test @@ -47,7 +41,7 @@ jobs: - name: Upload coverage uses: codecov/codecov-action@v4 - if: matrix.node-version == 20 + if: matrix.node-version == 22 with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false diff --git a/.gitignore b/.gitignore index aa6f0f0..6629f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ jspm_packages # Optional REPL history .node_repl_history + +# Netlify +.netlify +web/capstring.js diff --git a/AGENTS.md b/AGENTS.md index 008728a..59a0e27 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,6 +58,12 @@ CATEGORIES; // frozen { case, code, fun, encoding, art } - `cli.js` - CLI logic as `main(argv, io)`; `bin/capstring.js` is the executable shim. - `index.d.ts` - hand-written types. `test/types.test.js` fails if the `Style` union drifts from `STYLES`. +## Website and API + +- `web/` - static site, imports `./capstring.js` (copied from `index.js` at Netlify build time) +- `netlify/functions/api.js` - HTTP API at `https://capstring.netlify.app/api` (transform, all, chain, batch, badge, lorem, spell) +- `npm run dev` runs both locally on http://localhost:8888 + ## Testing ```bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 58704a4..69eecf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- **Website**: [capstring.netlify.app](https://capstring.netlify.app) - live preview of every style, click to copy, shareable URLs +- **HTTP API**: `/api/:style/:text`, `/api/all`, `/api/chain`, `/api/styles`, `POST /api/batch`, plus `/api/badge` (SVG), `/api/lorem`, and `/api/spell` ported from cAPIta, as a single Netlify Function (replaces the archived cAPIta project) +- Website chain builder: press `+` on any row to compose a chain, shareable via `?chain=upper+reverse` - **8 new styles** (37 total): `smallcaps`, `bubble`, `wide`, `strike`, `clap`, `morse`, `binary`, `piglatin` - **CLI**: `npx capstring