drash

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.

GPL-3.0 License

Downloads
119
Stars
1.1K
Committers
20

Bot releases are visible (Hide)

drash - v2.0.0

Published by crookse almost 3 years ago

Compatibility

Requires Deno 1.15.3
Uses Deno Standard Modules 0.113.0

Documentation

Usage

  1. Create a deps.ts file.
// deps.ts

export * as Drash from "https://deno.land/x/[email protected]/mod.ts";
  1. Import Drash from your deps.ts file.
import { Drash } from "./deps.ts"

... your
... code
... here

Release Summary

  • Added use of Deno's native HTTP server
  • Added deno-drash-middleware to the repository
    • Middleware is now referred to as services in Drash v2.x
    • Middleware names have changed from SomeName to SomeService (e.g., Paladin is now PaladinService) and are required to extend the Drash.Service class
    • Removed requirement of tsconfig.json for resource-level services
    • Removed use of decorators for resource-level services
  • Added helper methods to the response object
    • response.download()
    • response.file()
    • response.json()
    • response.html()
    • response.send<T>()
    • response.text()
    • response.xml()
  • Added support for Deno Deploy (has not been tested)
  • Changed syntax on importing Drash namespace
  • Changed <ResourceClass>.paths property from static to public
  • Changed HTTP methods in resources to require request and response arguments
  • Changed HTTP methods in resources to return void instead of Drash.Http.Response
  • Changed Server class instantiation configs
  • Changed the term "exception" to "error" (also changes Exception classes to Error classes)
  • Changed request.getPathParam() to request.pathParam()
  • Changed request.getBodyParam() to request.bodyParam<T>()
  • Changed request.getBodyFile() to request.bodyParam<BodyFile[]>()
  • Changed request.getUrlQueryParam() to request.queryParam()
  • Removed code to get all parameters off the request object (possible future implementation)
  • Removed static file serving
    • This can be done using a FilesResource that serves files based on a path param:
      import { Drash } from "./deps.ts";
      
      class FilesResource extends Drash.Resource {
        public paths = ["/public/:filepath"];
      
        public GET(request: Drash.Request, response: Drash.Response): void {
          const filepath = request.pathParam("filepath");
          return response.file(filepath!);
        }
      }
      
  • Removed Http namespace
  • Removed Exceptions namespace
  • Removed CoreLoggers namespace
  • Removed StringService class
  • Removed HttpService class
  • Removed Drash.addLogger()
  • Removed Drash.addMember()
  • Removed configs from server.run() call
  • Removed pretty links
  • Works in progress (to be released in future versions)
    • CORSService (formerly Cors in deno-drash-middleware repository)
    • TengineService (formerly Tengine in deno-drash-middleware repository)
drash - v2.0.0-rc-2

Published by drashbot almost 3 years ago

View the documentation at https://drash-land.vercel.app.

Notes from the maintainers

  • Before we officially release v2.0.0, we will point https://drash.land to https://drash-land.vercel.app. There may be some downtime during that time, but we hope to have a smooth transition.
  • We may have a few more edits to do on the documentation pages, so don't take the Drash v2.x documentation pages as the official v2.x documentation.
  • We are releasing release candidates so that we can test things end-to-end a few more times before an official release. We're using these releases as intermediary steps to ensure that the official release will go as we plan.
  • The official v2.0.0 release is set for October 25, 2021 (Hey, that's tomorrow!)
drash - v2.0.0-rc-1

Published by drashbot almost 3 years ago

View the documentation at https://drash-land.vercel.app.

Notes from the maintainers

  • This pre-release is tagged as v2.0.1-rc-1, but that's false. It's supposed to be v2.0.0-rc-1. I (Eric) made a mistake while releasing this candidate and didn't see that the tag I published was v2.0.1-rc-1. We use a release drafter GitHub action and it auto-generates the tag for us based on merges; and I didn't double check the tag. Sorry for any confusion this causes.
  • Before we officially release v2.0.0, we will point https://drash.land to https://drash-land.vercel.app. There may be some downtime during that time, but we hope to have a smooth transition.
  • We may have a few more edits to do on the documentation pages, so don't take the Drash v2.x documentation pages as the official v2.x documentation.
  • We are releasing a release candidate so that we can test things end-to-end one more time before an official release. We're using this release as an intermediary step to ensure that the official release will go as we plan.
  • The official v2.0.0 release is set for October 25, 2021 (Hey, that's tomorrow!)
drash - v2.0.0-beta-1

Published by crookse almost 3 years ago

Beta-1 version of v2. Documentation is still being written and when finished, will follow an official v2 release. Not production ready as there is no migration guide available yet

drash - v2.0.0-beta

Published by ebebbington about 3 years ago

Beta version of v2.

Documentation is still being written and when finished, will follow an official v2 release. Not production ready as there is no migration guide available yet

drash - v1.5.1

Published by drashbot about 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Support Deno v1.12.2 and Deno Standard Modules v0.103.0
drash - v1.5.0

Published by drashbot over 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore(http/server): Use moogle for index service (#498)
  • feat: support send binary body (#492)
drash - v1.4.4

Published by drashbot over 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

drash - v1.4.3

Published by drashbot over 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Support latest Deno version
  • chore: Notify middleware repo on new drash releases (#485)
drash - v1.4.2

Published by drashbot over 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Support latest Deno version
drash - v1.4.1

Published by drashbot over 3 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Update dependencies and bump version numbers across repo (#471)
  • fix: Drash.version and create_app dependency file using an incorrect Drash version
drash - v1.4.0

Published by drashbot almost 4 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • remove: Drash.Compilers.TemplateEngine (#464)
  • chore: Improve readability of code (#446)
drash - v1.3.1

Published by drashbot almost 4 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Update dependencies and bump version numbers across repo (#460)
  • chore: Refactor create app tests again (#456)
  • chore: Remove bloat (#455)
  • fix: Fix publishing to nest.land (#440)
drash - v1.3.0

Published by drashbot almost 4 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • deprecate: Drash.Compilers.TemplateEngine (#424)
  • feat: Add -with-react flag to create app (#377)
  • feat: Throw an error if response is not correctly returned from resource (#412)
  • feat: Add getAllUrlQueryParams method (#396)
  • feat: Add getAll methods for header, body and path params (#404)
  • feat: after_resource middleware hook (#428)
  • feat: compile time middleware (#421)
  • feat: virtual paths (#406)
  • fix: optional args regex not matching non-alphanumeric characters (#420)
  • fix: Content length was 2 when content type is JSON and body is empty (#401)
  • fix: create app script not building apps correctly (#436)
  • chore: fix http create app tests (#416)
  • chore: Fix http create app tests for forks (#410)
  • chore: Update dependencies (#425)
  • chore: Include usage of react with create app section (#422)
  • chore: Add pre release workflow (#380)
  • chore: Automate tweets and reddit on release (#415)
  • chore: make resource lookup faster (#393)
  • chore: Send request to website on release to update versions (#392)
drash - v1.2.5

Published by drashbot about 4 years ago

Compatibility

  • Requires Deno v1.2/0 or higher (or 1.4.0. or higher if using --unstable)
  • Uses Deno [email protected]

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • fix: Don't return null if body param is false; Support body params being data types other than a string (#386)
  • chore: Update dependencies (#381)
  • chore: fix publish CI (#374)
drash - v1.2.4

Published by ebebbington about 4 years ago

Compatibility

  • Requires Deno v1.2.0 or higher (or 1.4.0 if using --unstable)
  • Uses Deno [email protected]

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: bump versions and update dependencies (#372)
  • fix: Correct imports/exports to adjust to using --unstable (#371)
drash - v1.2.3

Published by ebebbington about 4 years ago

Compatibility

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • chore: Improve types for codebase, being more descriptive and remove any; PR #359
  • chore: Update std to 0.65.0
  • fix: default response content type not being respected in browser requests; #361
drash - v1.2.2

Published by crookse about 4 years ago

Compatibility

  • Requires Deno v1.2.0. or higher
  • Uses Deno [email protected]
  • Due to the changes that occurred in the deno.land/x registry today, branch imports are no longer supported, so please do not import using v1.x as it will not work

Importing

  • Import this latest release by using the following in your project(s):
    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • fix: compatibility issues with deno std when importing deno std modules using a "v" prefix
drash - v1.2.1

Published by crookse about 4 years ago

Compatibility

  • Requires Deno v1.2.x or higher
  • Uses Deno Standard Modules v0.62.0

Upgrading

  • If you are importing the v1.x branch, then you can upgrade from the command line using the following:

    deno run --reload https://deno.land/x/[email protected]/mod.ts
    
  • If you're importing specific versions of Drash, then make sure you upgrade accordingly in your project(s):

    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • fix: create_app script not working; issue #350; PR #351
  • tests: add more unit tests around MIME type handling and pretty links; PR #346
  • ci: use GITHUB_HEAD_REF or master depending on where the create_app script is running; PR #355
drash - v1.2.0

Published by ebebbington about 4 years ago

Compatibility

  • Requires Deno v1.2.x or higher
  • Uses Deno Standard Modules v0.62.0

Upgrading

  • If you are importing the v1.x branch, then you can upgrade from the command line using the following:

    deno run --reload https://deno.land/x/[email protected]/mod.ts
    
  • If you're importing specific versions of Drash, then make sure you upgrade accordingly in your project(s):

    import { Drash } from "https://deno.land/x/[email protected]/mod.ts";
    

Updates

  • feat: add support for optional path parameters; PR #337; Docs here
  • fix: create_app script to build from local cache and properly build in windows; PR #342 (b48c60d148df65a340f00937ae0d8931ef36bf5c, 51dd4821fbc81a5e3bb029e48720a8b305d751b0, 33345c4c47d3d2710f32fec122889b931575b478)
  • chore: clean up filesystem (#342)
Package Rankings
Top 1.1% on Deno.land
Top 24.17% on Npmjs.org
Badges
Extracted from project README
Drash Land Discord