Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ jobs:
- run: npm run build
- run: npm run typecheck
- run: npm test

# infra/ ships inside the npm package (dist/templates/infra/), so the HCL is a
# released artifact like the JS. fmt/validate need no AWS credentials and make
# no AWS calls (provider download only) — plan/apply stay local-only.
terraform-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v4
- run: terraform -chdir=infra fmt -check -diff
- run: terraform -chdir=infra init -backend=false
- run: terraform -chdir=infra validate
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- `npm run typecheck` — `tsgo --noEmit` (type-check only; tsgo can't emit, so `build` stays on `tsc`).
- `npm test` · `npx vitest run test/x.test.ts` · `npx vitest run -t "name"` — tests (AWS mocked).
- `npm run dev` — run the CLI from source without building.
- CI runs build→typecheck→test with **no AWS creds and no Terraform**; keep it that way.
- CI runs build→typecheck→test plus `terraform fmt -check`/`validate` on `infra/`, with **no AWS creds and no `plan`/`apply`**; keep it that way (`validate` only downloads the provider — it never touches live AWS).

## Architecture
- **Two hosting modes, one code path.** Upload (file/folder → `<code>/` prefix, Content-Type, `_meta/<code>.json` sidecar) is mode-common; only the URL builder, CloudFront invalidation, and provisioning differ. Mode is *derived* in `resolveConfig()` (`src/lib/config.ts`), never stored: `domain`+`distributionId` → `cloudfront` (private S3+OAC+CloudFront, HTTPS, Terraform-provisioned); else `bucket`+`region` → `s3-website` (public bucket, HTTP, CLI `setup`).
Expand Down
Loading