v5.0.1
Bug Fixes
- declare a separate declaration file for internally used worker types
v5.0.0
Breaking Changes:
removed
req.cloudflare
object entirely.you should instead use the
req.geo
object for geolocation data andreq.raw
for more full in-depth data about the incoming request.configuration file must be named
.darkflare.ts
now.Deno is now required instead of Node.js.
we’re currently working on an alternative for dependabot.
you can still use eslint for linting, but we’re currently trying to find a better solution.
New Features:
you can now mention environment variables in your config.
import { configure } from 'https://deno.gg/darkflare' export default configure(env => ({ storage: env.storage }))
but remember: they can only be accessed at runtime and are undefined during build time!
Mail
class available nowsend a email to one or more people using mailchannels.
Webhook
class available nowschedule a webhook with a payload and a optional secret for authentication.
UserAgent
class available nowget basic about the user agent of the incoming request, e.g. their browser, device, engine, os, cpu and whether they’re a bot.
modules out now!
darkflare/cli
deno install -n darkflare --allow-all https://deno.gg/darkflare@v5.0.0/cli
darkflare/realm
import { Schema } from 'https://deno.gg/darkflare@v5.0.0/realm'
darkflare/jwt
import { jwtSign, jwtDecode, jwtVerify } from 'https://deno.gg/darkflare@v5.0.0/jwt'
currently a copy of tsndr/cloudflare-worker-jwt.
darkflare/types
an up-to-date copy of cloudflare/workers-types.
{ "compilerOptions": { "types": [ "https://deno.gg/darkflare@v5.0.0/types" ] } }
Other Changes:
@darkflare/eslint-config
is being discontinued for now and might be replaced by our own linter later on.