/cfworker

A collection of packages optimized for Cloudflare Workers and service workers.

Primary LanguageTypeScriptMIT LicenseMIT

cfworker

A collection of packages optimized for Cloudflare Workers and service workers.

packages

  • @cfworker/base64url: readme | npm

    base64 URL encoding for Cloudflare Workers and service workers

  • @cfworker/cosmos: readme | npm

    Azure Cosmos DB client for Cloudflare Workers and service workers

  • @cfworker/csv: readme | npm

    Streaming CSV encoding for Cloudflare Workers and service workers

  • @cfworker/demo: readme | npm

    Web app demo

  • @cfworker/dev: readme | npm

    Run, test and deploy Cloudflare workers

  • @cfworker/json-schema: readme | npm

    A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, and 2019-09.

  • @cfworker/jwt: readme | npm

    Tiny lib for decoding JWTs and verifying signatures, using native crypto APIs

  • @cfworker/sentry: readme | npm

    Minimalist Sentry client for Cloudflare workers and service workers

  • @cfworker/uuid: readme | npm

    Fast UUID generator with no dependencies. Generate V4 compliant UUIDs using crypto.getRandomValues

  • @cfworker/web: readme | npm

    Web framework for Cloudflare Workers and service workers, inspired by Koa and fastify

contributing

Install dependencies using yarn. Yarn will ensure cfworker packages that depend on other cfworker packages are linked properly.

yarn install

Run all tests

yarn test

Run a specific package's tests

yarn workspace @cfworker/base64url test

Watch files for changes and re-run tests

yarn workspace @cfworker/base64url test --watch

Use chrome devtools to debug tests

yarn workspace @cfworker/base64url test --watch --inspect

Refer to each package's README for more specific instructions and examples. Some packages require a .env file (gitignored) containing cloudflare or cosmos db keys for integration testing.