Skip to content

Commit

Permalink
Merge 9990b24 into 5e65846
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtlt committed Sep 14, 2020
2 parents 5e65846 + 9990b24 commit b717cdf
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 23 deletions.
8 changes: 5 additions & 3 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
export {
serve,
serveTLS,
HTTPSOptions,
HTTPOptions,
Server,
ServerRequest,
} from "https://deno.land/std@0.68.0/http/server.ts";
export type {
HTTPSOptions,
HTTPOptions,
Response,
} from "https://deno.land/std@0.68.0/http/server.ts";
export {
Expand All @@ -13,9 +15,9 @@ export {
} from "https://deno.land/std@0.68.0/http/http_status.ts";
export {
setCookie,
Cookie,
deleteCookie,
} from "https://deno.land/std@0.68.0/http/cookie.ts";
export type { Cookie } from "https://deno.land/std@0.68.0/http/cookie.ts";
export {
extname,
fromFileUrl,
Expand Down
13 changes: 13 additions & 0 deletions lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@
"https://deno.land/std@0.68.0/path/separator.ts": "9dd15d46ff84a16e13554f56af7fee1f85f8d0f379efbbe60ac066a60561f036",
"https://deno.land/std@0.68.0/path/win32.ts": "9e200471f24fb560d22e74b238133cb75ebb57bead933de1cc5aefed4cda3346",
"https://deno.land/std@0.68.0/textproto/mod.ts": "ebd84342f62216af1850279d32581c51d0958e36d477c6c26c961987e6240356",
"https://deno.land/std@0.69.0/_util/assert.ts": "e1f76e77c5ccb5a8e0dbbbe6cce3a56d2556c8cb5a9a8802fc9565af72462149",
"https://deno.land/std@0.69.0/path/_constants.ts": "aba480c4a2c098b6374fdd5951fea13ecc8aaaf8b8aa4dae1871baa50243d676",
"https://deno.land/std@0.69.0/path/_interface.ts": "5876f91d35fd42624893a4aaddaee352144e1f46e719f1dde6511bab7c3c1029",
"https://deno.land/std@0.69.0/path/_util.ts": "f0fa012d40ae9b6acbef03908e534eb11e694de6470fb4d78ea4f38829e735ab",
"https://deno.land/std@0.69.0/path/common.ts": "e4ec66a7416d56f60331b66e27a8a4f08c7b1cf48e350271cb69754a01cf5c04",
"https://deno.land/std@0.69.0/path/glob.ts": "43cc45e8649a35a199c4106dfdf66206f46dfd8e2e626a746512c1a1376fde99",
"https://deno.land/std@0.69.0/path/mod.ts": "6de8885c2534757097818e302becd1cefcbc4c28ac022cc279e612ee04e8cfd1",
"https://deno.land/std@0.69.0/path/posix.ts": "40c387415fca91b3482214cf74880c415cda90b337bebd2c9d4b62d2097bc146",
"https://deno.land/std@0.69.0/path/separator.ts": "9dd15d46ff84a16e13554f56af7fee1f85f8d0f379efbbe60ac066a60561f036",
"https://deno.land/std@0.69.0/path/win32.ts": "9e200471f24fb560d22e74b238133cb75ebb57bead933de1cc5aefed4cda3346",
"https://deno.land/x/accepts@1.0.0/deps.ts": "230c8e4888c7b745a2b6c33cedc53c25f77fadb089c0dddba978418909497aea",
"https://deno.land/x/accepts@1.0.0/mod.ts": "928576bb8b922e900fc629f80050a13248cd3bae0ee05d70e0dc69243e71fe15",
"https://deno.land/x/content_type/mod.ts": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
Expand Down Expand Up @@ -131,6 +141,9 @@
"https://deno.land/x/media_types@v2.4.6/db.ts": "56a9deab286b6283e1df021d74ee3319353f27f7827716b6443427fff2fc6e24",
"https://deno.land/x/media_types@v2.4.6/deps.ts": "6a046ca7e381f95def906fa2188bb56e053251d919a53d25b93964b8ac5fec25",
"https://deno.land/x/media_types@v2.4.6/mod.ts": "94141d7c415fcdad350fec9d36d77c18334efe25766db6f37d34709c896881ed",
"https://deno.land/x/media_types@v2.4.7/db.ts": "56a9deab286b6283e1df021d74ee3319353f27f7827716b6443427fff2fc6e24",
"https://deno.land/x/media_types@v2.4.7/deps.ts": "5eb8e569a0c1439f85f4a9888f8f3327b426c8b8f7ba55fdc1124d98d0e17390",
"https://deno.land/x/media_types@v2.4.7/mod.ts": "94141d7c415fcdad350fec9d36d77c18334efe25766db6f37d34709c896881ed",
"https://deno.land/x/negotiator/mod.ts": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"https://deno.land/x/negotiator@1.0.0/mod.ts": "d8b28a0a7b2d75c944cebef8f87a58eeb344974d432fe0dea85e2d98e03daf24",
"https://deno.land/x/negotiator@1.0.0/src/charset.ts": "ee56810906ed4fb5ee52abd4dfd8b57485685939c6b63fb2b5d289b971465f67",
Expand Down
2 changes: 1 addition & 1 deletion src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { finalHandler } from "./utils/finalHandler.ts";
import { compileETag } from "./utils/compileETag.ts";
import { merge } from "./utils/merge.ts";
import { View } from "./view.ts";
import {
import type {
Request,
Response,
NextFunction,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/getCharset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { charset } from "../../../deps.ts";
import { Request } from "../../types.ts";
import type { Request } from "../../types.ts";

/**
* Get the charset of a request.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { createError, hasBody } from "../../../deps.ts";
import { read } from "./read.ts";
import { getCharset } from "./getCharset.ts";
import { typeChecker } from "./typeChecker.ts";
import { Request, Response, NextFunction } from "../../types.ts";
import type { Request, Response, NextFunction } from "../../types.ts";

/**
* RegExp to match the first non-space in a string.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

import { read } from "./read.ts";
import { Request, Response, NextFunction } from "../../types.ts";
import type { Request, Response, NextFunction } from "../../types.ts";
import { hasBody } from "../../../deps.ts";
import { typeChecker } from "./typeChecker.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
*/

import { Request, Response, NextFunction } from "../../types.ts";
import type { Request, Response, NextFunction } from "../../types.ts";
import { createError } from "../../../deps.ts";

const decoder = new TextDecoder();
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import { read } from "./read.ts";
import { getCharset } from "./getCharset.ts";
import { Request, Response, NextFunction } from "../../types.ts";
import type { Request, Response, NextFunction } from "../../types.ts";
import { hasBody } from "../../../deps.ts";
import { typeChecker } from "./typeChecker.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/typeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
*/

import { Request } from "../../types.ts";
import type { Request } from "../../types.ts";
import { typeofrequest } from "../../../deps.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bodyParser/urlencoded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import { createError } from "../../../deps.ts";
import { read } from "./read.ts";
import { getCharset } from "./getCharset.ts";
import { Request, Response, NextFunction } from "../../types.ts";
import type { Request, Response, NextFunction } from "../../types.ts";
import { hasBody } from "../../../deps.ts";
import { typeChecker } from "./typeChecker.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/middleware/init.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
Request,
Response,
NextFunction,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/query.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parseUrl } from "../utils/parseUrl.ts";
import { fromMap } from "../utils/fromMap.ts";
import { Request, Response, NextFunction, ParsedURL } from "../types.ts";
import type { Request, Response, NextFunction, ParsedURL } from "../types.ts";

// TODO: back-compat support for Express signature. Namely an
// `options` parameter allowing for custom query parsers.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/serveStatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
encodeUrl,
} from "../../deps.ts";
import { originalUrl as original, parseUrl } from "../utils/parseUrl.ts";
import {
import type {
Response,
Request,
NextFunction,
Expand Down
2 changes: 1 addition & 1 deletion src/opine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { request } from "./request.ts";
import { Response as ServerResponse } from "./response.ts";
import { mergeDescriptors } from "./utils/mergeDescriptors.ts";
import { EventEmitter, getEvent } from "../deps.ts";
import {
import type {
Opine,
Request,
Response,
Expand Down
2 changes: 1 addition & 1 deletion src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ServerRequest, Accepts, typeofrequest, isIP } from "../deps.ts";
import { defineGetter } from "./utils/defineGetter.ts";
import { fresh } from "./utils/fresh.ts";
import { parseUrl } from "./utils/parseUrl.ts";
import { Request, Response } from "../src/types.ts";
import type { Request, Response } from "../src/types.ts";

/**
* Request prototype.
Expand Down
2 changes: 1 addition & 1 deletion src/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
encodeUrl,
fromFileUrl,
} from "../deps.ts";
import {
import type {
Response as DenoResponse,
ResponseBody,
Request,
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Layer } from "./layer.ts";
import { merge } from "../utils/merge.ts";
import { parseUrl } from "../utils/parseUrl.ts";
import { methods } from "../methods.ts";
import {
import type {
Response,
Request,
NextFunction,
Expand Down
2 changes: 1 addition & 1 deletion src/router/layer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { pathToRegexp } from "../utils/pathToRegex.ts";
import { Request, Response, NextFunction } from "../types.ts";
import type { Request, Response, NextFunction } from "../types.ts";

export const Layer: any = function Layer(
this: any,
Expand Down
2 changes: 1 addition & 1 deletion src/router/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Layer } from "./layer.ts";
import { methods } from "../methods.ts";
import { Request, Response, NextFunction } from "../types.ts";
import type { Request, Response, NextFunction } from "../types.ts";

/**
* Initialize `Route` with the given `path`.
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// TODO: consider integrating these types into the app files themselves
// rather than having a separate file.

import {
import type {
ServerRequest as DenoServerRequest,
Response as DenoServerResponse,
Server,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/finalHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import { parseUrl } from "./parseUrl.ts";
import { STATUS_TEXT, Status, escapeHtml } from "../../deps.ts";
import { Request, Response, NextFunction, ParsedURL } from "../types.ts";
import type { Request, Response, NextFunction, ParsedURL } from "../types.ts";

const DOUBLE_SPACE_REGEXP = /\x20{2}/g;
const NEWLINE_REGEXP = /\n/g;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/parseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
*/

import { Request, ParsedURL } from "../types.ts";
import type { Request, ParsedURL } from "../types.ts";

/**
* Parse the `req` url with memoization.
Expand Down

0 comments on commit b717cdf

Please sign in to comment.