Changelog
Major Changes
- d900bca: Node 24 is now required (
engines.nodeis>=24, up from>=22), to match@rtorcato/js-common6, which cf-common now depends on (^6.1.0, up from^5.0.0). The js-common bump also brings 6.1.0'sHttpErrorfix: the error message now shows a redacted URL (no userinfo, query or fragment), so a?token=…in a request URL no longer ends up in error messages or logs.error.urlstill holds the raw URL.
Patch Changes
- a9d43a6:
createAiGateway'sfetchandjsonno longer follow redirects: requests go out withredirect: 'manual'(overriding anyinit.redirect), so a 3xx from the gateway can't send the gateway token or provider key to another host. A 3xx now throwsAI_GATEWAY_FAILEDlike any other non-2xx status. - c78c655:
presignR2Urlnow rejects an empty bucket and a bucket of.or..with the non-exposed 500R2_PRESIGN_INVALID, instead of signing a//keyor/../keypath.
Minor Changes
- 0fb24e1: Add the
@rtorcato/cf-common/accessmodule withverifyAccessJwt, which checks the Cloudflare Access JWT against the team JWKS (signature, issuer, audience, expiry) and returns the typed identity, andaccessJwt, which reads theCf-Access-Jwt-Assertionheader. A bad token throws a401with codeACCESS_JWT_INVALID. - 99bb1db: Add the
@rtorcato/cf-common/ai-gatewaymodule:createAiGatewaysends provider calls through an AI Gateway endpoint (fetchreturns the response,jsonposts and parses JSON),gatewayUrlbuilds the endpoint URL, andgatewayHeadersturns typed cache, metadata, logging and retry options intocf-aig-*headers. Failures throw a non-exposed502with codeAI_GATEWAY_FAILED; a bad id, provider or path segment throws a non-exposed500AI_GATEWAY_INVALID. - 6467fca: Add the
analyticssubpath:writeDataPoint(dataset, point)writes to an Analytics Engine dataset and maps a rejected point to a non-exposed 500CloudflareErrorwith codeANALYTICS_WRITE_FAILED, andcreateDataset(dataset, schema)names the blob, double and index columns so you write by name and get the SQL API column for each. - 0f9c81e: Add the
@rtorcato/cf-common/browsermodule over the Browser Rendering binding:withBrowserlaunches a browser, runs your callback and always closes it, andscreenshotandpdfrender a URL or HTML string in one call.@cloudflare/puppeteeris an optional peer dependency, needed only if you import this subpath. A failed launch or render throws a non-exposed502(BROWSER_LAUNCH_FAILED/BROWSER_RENDER_FAILED); a non-http(s) URL throws an exposed400BROWSER_INVALID_URL. - 85ea871: Add
@rtorcato/cf-common/do:BaseDurableObjectextends the runtime'sDurableObjectand adds a typedthis.storage, andtypedStoragewraps anyDurableObjectStoragesoget(with an optional fallback),putanddeleteare checked against a key → value schema. - b0264ba: Add the
emailsubpath:sendEmail(binding, message)sends over asend_emailbinding, from fields or a raw-MIMEEmailMessage, and maps a failed send to a non-exposed 502CloudflareErrorwith codeEMAIL_SEND_FAILED. - 79ab9f4: Add the
@rtorcato/cf-common/hyperdrivemodule withwithHyperdrive, which opens a per-request client over a Hyperdrive binding and always closes it. The driver is yours to pass in throughconnectandclose, so no driver is bundled. A failed connect throws a non-exposed502with codeHYPERDRIVE_CONNECT_FAILED. - e28b067: Add the
@rtorcato/cf-common/imagesmodule for Cloudflare Images:createImagesApiuploads a file or URL and reserves direct creator upload URLs,imageUrlandtransformUrlbuild named-variant, flexible-variant and/cdn-cgi/image/URLs from typed options, andsignImageUrlsigns a delivery URL withexpand an HMACsig. API failures throw a non-exposed502with codeIMAGES_API_ERROR; a bad id throws an exposed400IMAGES_INVALID_ID. - 18af2fe: Add the
pipelinessubpath:createPipelineProducer<T>(pipeline)wraps a Pipeline binding sosend(record)andsendBatch(records, { chunkSize? })take typed records (batches go out in order in chunks of 100 by default), and a rejected send becomes a non-exposed 502CloudflareErrorwith codePIPELINE_SEND_FAILED. - c57e688: Add the
@rtorcato/cf-common/apimodule withcreateCloudflareApi, a small client for Cloudflare's v4 REST API. It covers zones, DNS records and cache purge, and its rawrequest/requestPagereach any other endpoint. It adds no dependencies, and any failure throws a non-exposed502with codeCF_API_ERROR. - a8f4181: Add the
@rtorcato/cf-common/rpcmodule withgetService, a typed accessor for Service Bindings to aWorkerEntrypoint, andcallService, which maps a failed RPC call to a non-exposed502with codeRPC_CALL_FAILED. - 4de9fe5: Add the
@rtorcato/cf-common/secretsmodule withgetSecret, typed access to a Secrets Store binding by name: a missing binding is a non-exposed500, and a failed read becomes a non-exposed500with codeSECRET_GET_FAILED. - bed7bc4: Add the
@rtorcato/cf-common/assetsmodule over the Static Assets binding:serveAssetsserves a request with an optional SPA fallback (for page navigations) and 404 page, andfetchAssetfetches the asset at another path with the request's headers. - e5ff16a: Add the
@rtorcato/cf-common/vectorizemodule withcreateVectorStore<M>, a typed store over one Vectorize index. It adds caller-typed metadata,upsertsplit into chunks of 1000 with onemutationIdper chunk, and failures mapped to a non-exposed502with codeVECTORIZE_FAILED. - 6b9a389: Add the
@rtorcato/cf-common/workflowsmodule withcreateWorkflow, a typed client over a Workflow binding:createtakes typed params,statusreturns a typedoutput, and any failure becomes a non-exposed502with codeWORKFLOW_FAILED. - 071a62b: Add the
@rtorcato/cf-common/wsmodule for Hibernatable WebSockets on a Durable Object:acceptWebSocketupgrades withctx.acceptWebSocket(an exposed426WS_UPGRADE_REQUIREDwithout anUpgrade: websocketheader),getAttachment/setAttachmenttype the per-socket state,parseMessagevalidates a JSON message (an exposed400WS_INVALID_MESSAGEon failure), andsendMessage/broadcastsend JSON to one socket or to every socket, optionally by tag.
Minor Changes
- 597d6b9: Add
@rtorcato/cf-common/r2-presign:presignR2Urlsigns presignedGET/PUTURLs for an R2 object over the S3-compatible API with an R2 API token (AWS SigV4 via Web Crypto, no dependency). - dc5f548: Add
@rtorcato/cf-common/queues:createProducerwraps aQueuebinding (typedsend,sendBatchsplit into chunks of 100, failures asQUEUE_SEND_FAILED), anddefineQueuebuilds aqueuehandler that acks or retries each message individually, with an optionalretryDelaybackoff. - 5feadcd: Add the
@rtorcato/cf-common/aimodule withrunAi, a typed wrapper over the Workers AI binding'srun(). The input and output types follow the model name, and a failed call throws a non-exposed502with codeAI_RUN_FAILED.
Patch Changes
- 51791ef: Add the
cache,ratelimitandaimodules to the bundledAGENTS.md(the subpath list and module map left them out).
1.7.0 (2026-10-08)
Features
1.6.0 (2026-10-08)
Features
- add the cf-common agent skill (#156) (413c5ab), closes #106
- docs: adopt the family brand assets (#157) (58e4632), closes #111 repo-tooling#318 #154 #155
1.5.2 (2026-10-01)
Bug Fixes
- add repository, license, and homepage metadata (#144) (eb15d6a)
- deps: rename @rtorcato/js-tooling to @rtorcato/repo-tooling (#121) (4a62ac0)
1.5.1 (2026-07-23)
Bug Fixes
1.5.0 (2026-07-17)
Bug Fixes
Features
1.4.0 (2026-07-08)
Features
1.3.0 (2026-07-07)
Features
1.2.0 (2026-07-06)
Features
1.1.1 (2026-06-29)
Bug Fixes
1.1.0 (2026-06-29)
Features
1.0.0 (2026-06-29)
Features
- ESM subpath build + errors & env foundation modules (#36) (7e10ea1), closes #20 #21 #1 #2 #22 #3 #20 #21 #1
Every entry above is generated by semantic-release and published to GitHub Releases. Anything older than the first GitHub Release is recorded in CHANGELOG.md.