Develop, test, and deploy Cloudflare Workers with Deno.
MIT License
Bot releases are hidden (Show)
push-deploy
: deploy worker to Deno Deploypush-lambda
: deploy worker to AWS Lambda + public function urlpush-supabase
: deploy worker to Supabase Edge Functionsexamples
: New multiplat worker example, same code deployed to all four supported platformssupabase
: Management API and eszip helpersdeno
: Update to [email protected]aws
: SES-based emailerd1
: new denoflare d1
subcommandcfapi
: list-ai-models
and run-ai-model
cfapi
: Hyperdrive commands (and bindings)examples
: New keyspace example
deno
: Migrate to non-deprecated assertsdeploy
: Deno Deploy API + KV runtime bindingscfapi
: Get account detailsconfig
: Look for the new CLOUDFLARE_ACCOUNT_ID
/CLOUDFLARE_API_TOKEN
as well as the old varsr2
: Async iter over list-objects-v2
. Handle ContinuationToken
in responsecli
: New denoflare ae-proxy
subcommand (a proxy endpoint to Analytics Engine more compatible with Clickhouse Grafana plugins)serve
: Basic tcp socket support in local isolationconfig
: Add browser binding to support the new Browser Rendering beta.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 1 year ago
serve
: Bare ip address https workaround not needed as of 1.33.4.config
: Env var substitution in config binding and profile property resolution using ${env:VAR_NAME}
cfapi
: list-kv-namespaces
and list-keys
.deno
: Update to latest [email protected].deno
: Event loop workaround in rpc fetch bodies to fix #56.bundle
: Unparsed bundle error output now returned as an error diagnostic.serve
: Implement KV put
, list
, delete
when running locally (thanks to @thebergamo!)push
: Fix file import on Windows (thanks to @FaeyUmbrea!)serve
: KV get type text.serve
: Use profile from script config, if present.types
: Add queue.sendBatch.types
: Add new DO locationHint param.xml
: Expose xml validation.tail
: Support queue & alarm events properly.serve
: Add new --local-isolation
option.config
: .denoflare
config schema: Allow Trailing Commas (thanks to @JustinGrote!)push
: Optional compatibilityFlags option and script-level config property.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod almost 2 years ago
deno
: Update spawn to use new Deno.Command on 1.28+.config
: Add serviceEnvironment
to json schema and validation for configuring service bindings in config.push
: Add support for secret key (CryptoKey) worker env variables (found here).serve
: Add support for crypto key bindings.cfapi
: list-worker-deployments
and get-worker-service-metadata
.xml
: Ability to specify additional named entities when parsing xml.serve
: Start in-memory R2 bucket implementation. Syntax = local:memory:bucketName
.serve
: Improve external fetch support for non-Request init with bodies.r2
: Support new r2 multipart upload worker bindings.serve
: Support these new r2 multipart upload worker bindings in local implementations.cfapi
: create/update/delete-logpush-job
for configuring Workers Trace Events Logpush.push
: New logpush
command-line flag and script config option to enable logpush for the given worker.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod almost 2 years ago
presigned-url
: Example worker now supports custom domains.cli
: r2 presign
supports custom domains and keypairs.push/serve
: Fix regression when there is no script-level profile configured.cfapi
: New list-user-billing-history
subcommand.deno
: Update to [email protected], corresponds to latest Deno v1.27.1.cleanup
: Remove js-based md5, obsolete in Deno std (implemented in wasm crypto lib) and unused in Denoflare.r2
: Bucket binding now supports list startAfter
.types
: Add DurableObjectStorage.sync()
.types
: R2Bucket.delete(multiple keys)
, put options onlyIf
, R2Object.checksums
, and new hashes.push
: Initial Queues support, bindings, config, and types.cfapi
: Queues management apis.types
: Migrate to a copy of IncomingRequestCfProperties
from workers-types with minimal tweaks.types
: D1 bindings and local no-op stub.types
: KVNamespace.get
should support no opts (defaults to text).Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod about 2 years ago
deno
: Fix DedicatedWorkerGlobalScope caches error when running on Deno 1.26+.deno
: Update to latest [email protected]
, corresponding to Deno 1.26.1.push
: Actually use script-level profile in config, if present.types
: Update AE binding to match production.serve
: Update local r2-over-api bucket impl to latest etag requirements.public-read
: Workaround for R2 S3 api no longer returning content-length
in getObject
.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod about 2 years ago
bundle
: Workaround removal of Deno.Diagnostic
in unstable Deno 1.25.watch
: Handle file url entry paths.types
: Add DurableObjectStorage.startAfter
, recently added to production runtime, implement in local DO versions.serve
: DO alarms, in-memory only.serve
: Implement DurableObjectStorage.list
prefix
and other options in local web storage DOs.push
: Command-line option for Analytics Engine bindings.push
: Script module import rewriter should allow '../
to start relative paths.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod about 2 years ago
public-read
: Allow range computation for HEAD requests as well. (See #24)cli
: cfapi get-bucket-usage-summary.analytics
: Update known r2 class a and b operations.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod about 2 years ago
compat
: New spawn helper to paper over breaking result type changes to unstable Deno.spawn
in Deno 1.24. denoflare
should now support running even with --check
on Deno 1.23 and Deno 1.24.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod about 2 years ago
public-read
: Bring back etag quote stripping to fix conditional requests.r2
: Remove xmlns
expectation for Error
responses to follow recent R2 production change.serve
: Fix permissionless webworker build with latest Deno lib decls, remove dep to localStorage
.public-read
: New optional allowCorsOrigins
and allowCorsTypes
environment variable bindings to configure CORS.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 2 years ago
r2
: Keep up with production r2 s3 api changes.serve
: --port
option should override any script config.cli
: New r2 list-multipart-uploads
command now that r2 supports it.mqtt
: Workarounds to support non-standard Cloudflare WebSocket client setup.serve
: Support Response.clone()
for ReadableStream
bodies in isolate mode.d1
: No-op D1Database binding.serve,push
: New --bundle check=all,local,none
option to set the level of type-checking performed when bundling.push
: Improve importWasm
rewrite to handle additional quoting chars.serve,push
: --bundle backend=module
now supports relative file paths.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 2 years ago
cli
: New pubsub
subcommands for interacting with your Cloudflare Pub/Sub broker (cli docs)denoflare-mqtt
: MqttClient
is a lightweight MQTT v5 client for Deno, Node, and the browser, specifically targeting the features implemented in Pub/Sub (more info and browser demo)analytics-engine
: Worker environment runtime bindings and cfapi operationscli
: Auto-lookup account-id if only api-token providedcli
: Use parent dirname for default script name for generic script names like worker, index, modr2
: Support new R2Object.range
production propertyd1
: Worker environment runtime bindings and new d1
subcommands for interacting with Cloudflare D1 databases and backups (cli docs)push
: New --workers-dev
option (and corresponding config property) to enable or disable the workers.dev routesite
: Enable vertical scrolling for the sidebardeps
: Update deno std dependencies to 0.144.0, corresponding to Deno v1.23.0
cli
: denoflare r2 presign
to generate presigned get-object calls now that R2 supports native presigningInstallation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 2 years ago
deps
: Update deno std dependencies to 0.142.0, corresponding to Deno v1.22.2
serve
: New --watch-include
option to trigger module reload on additional non-source files, similar to the same option in push
public-read
/presigned-url
: Handle new R2 error code embeddingr2
: Conditional put support in put-object
and create-multipart-upload
alarms
: Set compat flag and date when uploading, handle strange tail messages received from alarm handlerscfapi
: New list-durable-objects-namespaces
and list-durable-objects
subcommandscfapi
: New commands relating to Pub/Sub
cli
: New custom flag parser to fix regression on std flags, remove dependency on std flags. Specifying multiple options with the same name for multi-valued options should be fixedInstallation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 2 years ago
analytics
: Allow --start
without --end
for both durable-objects and r2analytics
: Fix r2 class b operations costs calculation, and add est 30-day and est 30-day minus free summary rows to r2 outputpublic-read
/presigned-url
: Log incoming request headers.Installation
Follow the installation instructions on our docs page: https://denoflare.dev/cli
Published by johnspurlock-skymethod over 2 years ago
Summary
Deno.emit
denoflare
relied on Deno.emit
bundling in serve
and push
!deno bundle
under the hood (see below for details).denoflare
config file needed for complicated workersdenoflare push
Installation
New in this release (R2-related):
r2
: TypeScript types for the R2Bucket
runtime APIcli
: denoflare r2 <subcommand>
r2
: associated functions in common/r2
r2.ts
exports 21 lightweight r2 s3-compatible API operation functions, and common utils like v4 signing etccommon/xml_parser.ts
deno bundle https://raw.githubusercontent.com/skymethod/denoflare/v0.5.0/common/r2/r2.ts
-> 99k unminified, 48k minified, 13k gzipped (includes fast-xml-parser)put-object
supports streaming uploads for large files listBuckets
headBucket
createBucket
deleteBucket
getBucketEncryption
deleteBucketEncryption
putBucketEncryption
getBucketLocation
listObjects
listObjectsV2
getObject
headObject
putObject
deleteObject
deleteObjects
copyObject
createMultipartUpload
abortMultipartUpload
completeMultipartUpload
uploadPart
uploadPartCopy
serve,push
: new worker binding to an existing r2 bucket
serve
, will proxy local calls to the real bucket over the r2 s3-compatible apilocalIsolation
modes (none
, isolate
)r2-public-read
: New example worker for making a bucket public
denoflare push https://raw.githubusercontent.com/skymethod/denoflare/v0.5.0/examples/r2-public-read-worker/worker.ts \
--name my-bucket-public-read \
--r2-bucket-binding bucket:my-bucket \
--text-binding flags:listDirectories \
--custom-domain my-bucket.my-domain.com \
--account-id $CF_ACCOUNT_ID \
--api-token $CF_API_TOKEN
r2-presigned-url
: New example worker for making a bucket available via presigned GET requests
$USER_ACCESS_KEY:$USER_SECRET_KEY
below) so you don't have to use actual r2 credentials AWS_ACCESS_KEY_ID=$USER_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$USER_SECRET_ACCESS_KEY \
aws s3 presign s3://b/video.mp4 --endpoint-url https://my-bucket.my-domain.com
r2-presigned-url
: (continued)
maxSkewMinutes
, default: 15maxExpiresMinutes
, default: 7 days denoflare push https://raw.githubusercontent.com/skymethod/denoflare/v0.5.0/examples/r2-presigned-url-worker/worker.ts \
--name my-bucket-public-read \
--r2-bucket-binding bucket:my-bucket \
--secret-binding credentials:$USER_ACCESS_KEY_ID:$USER_SECRET_ACCESS_KEY \
--custom-domain my-bucket.my-domain.com \
--account-id $CF_ACCOUNT_ID \
--api-token $CF_API_TOKEN
analytics
: New R2 analytics
denoflare analytics r2
New in this release (non-R2-related):
tail
: Handle new response status property coming back for each request message in all formatters including webtail.cfapi
: better cli docs for the supported subcommands
push
: New Script-level config property customDomains
to define one or more custom domains on which to bind the worker when deploying, including apex domains!push
: Use custom domains specified on the command line, if present.push,serve
: Option to override bindings from the command line.push,serve
: Ability to set --account-id
and --api-token
on the command line
.denoflare
config no longer needed for workers with environment variable bindings!cli
: Unified cli command handling, all subcommands, arguments, and options available via --help
denoflare r2 lb
instead of denoflare r2 list-buckets
deno
: Support the latest Deno version 1.22.0, which removed Deno.emit
, breaking us!
push
and serve
) is now done by spawning deno bundle
under the hood--allow-run
permission or --allow-run=~/.deno/bin/deno
Deno.emit
is still used when running on Deno pre 1.22Deno.emit
is a new userland x/deno_emit module
--bundle backend=module
if you want to try it out within denoflare instead of deno bundle
emit
utility function to bundle
, supporting the three different backends: builtin
(Deno.emit
pre 1.22), process
(deno bundle
), and module
(x/deno_emit
)do alarms
: Updated types with getAlarm
/setAlarm
/deleteAlarm
to try them out in production, no local emulation yetdocs
: Tons of new documentation, including the ability to generate regenerate online docs pages for every cli commandsite
: New tweaks to support the new docs, like <Aside>
and links inside code blocksPublished by johnspurlock-skymethod over 2 years ago
serve
! ๐๐๐New in this release:
cli
: New analytics options to constrain durable object analytics to a specific date range or dump unit totals.push
/serve
: Allow additional files or folders to be watched during --watch
, for example to static content imported with importText
.serve
: Implement ArrayBuffer
response bodies for isolate mode.serve
: Implement KV getWithMetadata
and get for isolate mode, and api-backed implementation.cli
: Put KV key-value with/without metadata.cli
: list-buckets
, create-bucket
, delete-bucket
for r2.serve
: Return Response.url
and redirected
properly for outgoing fetches.serve
: New --cert-pem
and --key-pem
options (and associated localCertPem
and localKeyPem
script config props) to support local https.push
: Basic r2 binding via config (only works in prod, no local simulation yet).cli
: New list-flags
to dump your account-level flags.push
: New start time prefix to push id.tail
: Show unredacted url using logprops, since Cloudflare loves to redact any url with paths including hex strings.serve
: Implement packed request redirect
.serve
: Recompilation failures on local watches should not fail the process like the first compile.Published by johnspurlock-skymethod over 2 years ago
push
: Allow pushes with seemingly non-fatal import json assert diagnostics during emit. (May be a deno bug)push
, serve
: Centralize Deno.emit
calls in one place so we can be explicit about which diagnostic warnings we can safely ignore.Published by johnspurlock-skymethod over 2 years ago
examples
: New image demo worker.serve
: Update to latest deno_graph to fix panics on projects with import json assertions.serve
: Fix re-entrancy bug with local DOs by removing the too-coarse mutex around the entire fetch call.Published by johnspurlock-skymethod almost 3 years ago
serve/push
: Implement text/binary imports withimportText
/importBinary
(similar to the approach for importWasm
).push
: New usageModel
config to use explicit cloudflare usage model (e.g. unbound) on deployment.Published by johnspurlock-skymethod almost 3 years ago
push/serve
: tweak importWasm
to handle modules requiring imports.push/serve
: Allow underscores in module spec.Published by johnspurlock-skymethod almost 3 years ago
serve
: New persistent local durable object storage option that uses Deno's new default localStorage, requiring no additional permissionspush
,serve
: Initial WASM support! Works in module-style workers (via a special importWasm
function) and script-based workers (global variable binding)