Skip to main content
Go to Latest
File

v5.1.0

New Features

  • add s3 module

  • parse query parameters

    // https://example.com?animals=dog,cat,hamster&pets&wild=false&amount=10&fur=true
    {
      "animals": ["dog", "cat", "hamster"],
      "pets": true,
      "wild": false,
      "amount": 10,
      "fur": true
    }

v5.0.5

Bug Fixes

  • upgrade version to v5.0.5

v5.0.4

Bug Fixes

  • add missing import for Realm to fetch handler

Other Changes

  • edit import of esm.sh/slash
  • add config to internal __darkflare object

v5.0.3

Bug Fixes

  • fix type issue regarding realm module

v5.0.2

Bug Fixes

  • bump version file

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 and req.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 now

    send a email to one or more people using mailchannels.

  • Webhook class available now

    schedule a webhook with a payload and a optional secret for authentication.

  • UserAgent class available now

    get 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.