70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
1.3 KiB
1.3 KiB
AGENTS.md — Create Cloudflare (C3)
OVERVIEW
Project scaffolding CLI for Cloudflare Workers. Main source entry: src/cli.ts. Bin entry: bin/c3.js (Node.js version gate shim).
STRUCTURE
bin/c3.js— Bin shim that checks Node.js version before requiringdist/cli.jssrc/cli.ts— Main entry. Exportsmain(argv)for programmatic usetemplates/— Scaffolding templates (excluded from linting and most formatting)scripts/build.ts— esbuild-based build →dist/cli.js
BUILD
- esbuild bundles
src/cli.tsas CJS →dist/cli.js package.jsonmainandexports["."]point atdist/cli.js;binpoints atbin/c3.jsbin/c3.jsis a plain CommonJS shim that gates on Node.js version (read frompackage.jsonengines.node) before requiringdist/cli.js
CONVENTIONS
no-console: error— use project's logging utilities- Templates excluded from linting (except
c3.tsfiles within templates) - Templates excluded from formatting (except hello-world templates)
TESTING
- E2E tests run across pnpm/npm (yarn/bun also supported but not in CI), Linux/Windows
- Own vitest setup: mocks
log-updateand@cloudflare/cli-shared-helpers/streams - CI has experimental matrix for framework testing
- Python/UV installed in CI for Python framework E2E tests