From c6526bda1ff41be2a5b6a8947d0f74bd1065d563 Mon Sep 17 00:00:00 2001
From: cmorten
Date: Sun, 28 Jan 2024 19:18:07 +0000
Subject: [PATCH] chore: upgrade deps
---
.github/CHANGELOG.md | 3 ++
.github/workflows/publish-docs.yml | 8 ++--
.github/workflows/publish-egg.yml | 2 +-
.github/workflows/test.yml | 4 +-
Makefile | 4 +-
README.md | 13 +++---
deps.ts | 24 +++++-----
docs/index.html | 13 +++---
docs/interfaces/_types_.proxyoptions.html | 4 +-
docs/modules/_proxy_.html | 6 +--
docs/modules/_requestoptions_.html | 12 ++---
docs/modules/_steps_buildproxyreqinit_.html | 6 +--
docs/modules/_steps_buildproxyurl_.html | 6 +--
.../_steps_copyproxyresheaderstouserres_.html | 6 +--
docs/modules/_steps_filtersrcreq_.html | 8 ++--
docs/modules/_steps_handleproxyerrors_.html | 12 ++---
docs/modules/_steps_sendsrcres_.html | 8 ++--
egg.json | 44 +++++++++----------
examples/basic/README.md | 2 +-
examples/basic/index.ts | 2 +-
test/deps.ts | 8 ++--
version.ts | 4 +-
22 files changed, 104 insertions(+), 95 deletions(-)
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index 217156f..62c5cfb 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -1,5 +1,8 @@
# ChangeLog
+For the latest changes, please refer to the
+[releases page](https://github.com/cmorten/oak-http-proxy/releases).
+
## [2.1.0] - 29-08-2022
- feat: support Deno `1.25.0` and std `0.153.0`
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
index 4512a42..f28792e 100644
--- a/.github/workflows/publish-docs.yml
+++ b/.github/workflows/publish-docs.yml
@@ -10,20 +10,20 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Use Node.js 12
+ - name: Use Node.js 20
uses: actions/setup-node@v1
with:
- node-version: 12
+ node-version: 20
- name: Install deps
run: make deps
- name: Use Deno
uses: denolib/setup-deno@v2
with:
- deno-version: 1.25.0
+ deno-version: 1.40.2
- run: make typedoc
- run: make ci
- name: Publish Updated Type Docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: publish typedocs
- push_options: --force
\ No newline at end of file
+ push_options: --force
diff --git a/.github/workflows/publish-egg.yml b/.github/workflows/publish-egg.yml
index 8899e36..60baf6a 100644
--- a/.github/workflows/publish-egg.yml
+++ b/.github/workflows/publish-egg.yml
@@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: denolib/setup-deno@v2
with:
- deno-version: 1.25.0
+ deno-version: 1.40.2
- run: deno install -A -f --unstable -n eggs https://x.nest.land/eggs@0.3.10/eggs.ts
- run: |
export PATH="/home/runner/.deno/bin:$PATH"
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index aece2f5..0fe4031 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
- deno-version: [1.25.0]
+ deno-version: [1.40.2]
runs-on: ${{ matrix.os }}
@@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
- deno-version: [1.25.0]
+ deno-version: [1.40.2]
runs-on: ${{ matrix.os }}
diff --git a/Makefile b/Makefile
index 67ef776..2f7a67e 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ ci:
@make test
deps:
- @npm install -g typescript typedoc@0.19.2
+ @npm install -g typescript@4 typedoc@0.19.2
doc:
@deno doc ./mod.ts
@@ -23,7 +23,7 @@ fmt-check:
@deno fmt --check ${FILES_TO_FORMAT}
lint:
- @deno lint --unstable ${FILES_TO_FORMAT}
+ @deno lint ${FILES_TO_FORMAT}
precommit:
@make typedoc
diff --git a/README.md b/README.md
index da5652c..e2f2441 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Proxy middleware for Deno Oak HTTP servers.
```ts
-import { proxy } from "https://deno.land/x/oak_http_proxy@2.1.0/mod.ts";
+import { proxy } from "https://deno.land/x/oak_http_proxy@2.2.0/mod.ts";
import { Application } from "https://deno.land/x/oak@v10.1.0/mod.ts";
const app = new Application();
@@ -32,13 +32,13 @@ Before importing, [download and install Deno](https://deno.land/#installation).
You can then import oak-http-proxy straight into your project:
```ts
-import { proxy } from "https://deno.land/x/oak_http_proxy@2.1.0/mod.ts";
+import { proxy } from "https://deno.land/x/oak_http_proxy@2.2.0/mod.ts";
```
oak-http-proxy is also available on [nest.land](https://nest.land/package/oak-http-proxy), a package registry for Deno on the Blockchain.
```ts
-import { proxy } from "https://x.nest.land/oak-http-proxy@2.1.0/mod.ts";
+import { proxy } from "https://x.nest.land/oak-http-proxy@2.2.0/mod.ts";
```
## Docs
@@ -59,7 +59,10 @@ router.get("/string", proxy("http://google.com"));
router.get("/url", proxy(new URL("http://google.com")));
-router.get("/function", proxy((ctx) => new URL("http://google.com")));
+router.get(
+ "/function",
+ proxy((ctx) => new URL("http://google.com"))
+);
```
Note: Unmatched path segments of the incoming request url _are not_ transferred to the outbound proxy URL. For dynamic proxy urls use the function form.
@@ -241,7 +244,7 @@ app.use(
return;
}
default: {
- ctx.throw(err)
+ ctx.throw(err);
}
}
},
diff --git a/deps.ts b/deps.ts
index f941b9a..f7134fc 100644
--- a/deps.ts
+++ b/deps.ts
@@ -1,15 +1,15 @@
-export { STATUS_TEXT } from "https://deno.land/std@0.153.0/http/http_status.ts";
-export { createState } from "https://deno.land/x/opineHttpProxy@3.0.2/src/createState.ts";
+export { STATUS_TEXT } from "https://deno.land/std@0.213.0/http/status.ts";
+export { createState } from "https://deno.land/x/opineHttpProxy@3.1.0/src/createState.ts";
export type {
ProxyState,
ProxyUrlFunction,
-} from "https://deno.land/x/opineHttpProxy@3.0.2/src/createState.ts";
-export type { ProxyOptions } from "https://deno.land/x/opineHttpProxy@3.0.2/src/resolveOptions.ts";
-export { isUnset } from "https://deno.land/x/opineHttpProxy@3.0.2/src/isUnset.ts";
-export { decorateProxyReqUrl } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/decorateProxyReqUrl.ts";
-export { decorateProxyReqInit } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/decorateProxyReqInit.ts";
-export { prepareProxyReq } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/prepareProxyReq.ts";
-export { sendProxyReq } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/sendProxyReq.ts";
-export { filterProxyRes } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/filterProxyRes.ts";
-export { decorateSrcResHeaders } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/decorateSrcResHeaders.ts";
-export { decorateSrcRes } from "https://deno.land/x/opineHttpProxy@3.0.2/src/steps/decorateSrcRes.ts";
+} from "https://deno.land/x/opineHttpProxy@3.1.0/src/createState.ts";
+export type { ProxyOptions } from "https://deno.land/x/opineHttpProxy@3.1.0/src/resolveOptions.ts";
+export { isUnset } from "https://deno.land/x/opineHttpProxy@3.1.0/src/isUnset.ts";
+export { decorateProxyReqUrl } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/decorateProxyReqUrl.ts";
+export { decorateProxyReqInit } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/decorateProxyReqInit.ts";
+export { prepareProxyReq } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/prepareProxyReq.ts";
+export { sendProxyReq } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/sendProxyReq.ts";
+export { filterProxyRes } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/filterProxyRes.ts";
+export { decorateSrcResHeaders } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/decorateSrcResHeaders.ts";
+export { decorateSrcRes } from "https://deno.land/x/opineHttpProxy@3.1.0/src/steps/decorateSrcRes.ts";
diff --git a/docs/index.html b/docs/index.html
index 0bed3b3..83c3f55 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -74,7 +74,7 @@ oak-http-proxy
- import { proxy } from "https://deno.land/x/oak_http_proxy@2.1.0/mod.ts";
+ import { proxy } from "https://deno.land/x/oak_http_proxy@2.2.0/mod.ts";
import { Application } from "https://deno.land/x/oak@v10.1.0/mod.ts";
const app = new Application();
@@ -89,10 +89,10 @@ Installation
This is a Deno module available to import direct from this repo and via the Deno Registry.
Before importing, download and install Deno.
You can then import oak-http-proxy straight into your project:
- import { proxy } from "https://deno.land/x/oak_http_proxy@2.1.0/mod.ts";
+ import { proxy } from "https://deno.land/x/oak_http_proxy@2.2.0/mod.ts";
oak-http-proxy is also available on nest.land, a package registry for Deno on the Blockchain.
- import { proxy } from "https://x.nest.land/oak-http-proxy@2.1.0/mod.ts";
+ import { proxy } from "https://x.nest.land/oak-http-proxy@2.2.0/mod.ts";
Docs
@@ -114,7 +114,10 @@ URL
router.get("/url", proxy(new URL("http://google.com")));
-router.get("/function", proxy((ctx) => new URL("http://google.com")));
+router.get(
+ "/function",
+ proxy((ctx) => new URL("http://google.com"))
+);
Note: Unmatched path segments of the incoming request url are not transferred to the outbound proxy URL. For dynamic proxy urls use the function form.
@@ -268,7 +271,7 @@ proxyErrorHandler
return;
}
default: {
- ctx.throw(err)
+ ctx.throw(err);
}
}
},
diff --git a/docs/interfaces/_types_.proxyoptions.html b/docs/interfaces/_types_.proxyoptions.html
index 29b77fd..71f226f 100644
--- a/docs/interfaces/_types_.proxyoptions.html
+++ b/docs/interfaces/_types_.proxyoptions.html
@@ -71,7 +71,7 @@ Interface ProxyOptions
Hierarchy
-
- BaseProxyOptions
+ any
-
ProxyOptions
@@ -101,7 +101,7 @@
Optional reqBodyLimi
reqBodyLimit: number
Functions
proxy
-- proxy(url: string | URL | ProxyUrlFunction, options?: ProxyOptions): proxy
+ - proxy(url: string | URL | ProxyUrlFunction, options?: ProxyOptions): handleProxy
Default value options: --
-
@@ -173,7 +173,7 @@ -
-
-
diff --git a/docs/modules/_steps_buildproxyurl_.html b/docs/modules/_steps_buildproxyurl_.html
index 1f68cf8..a95bb11 100644
--- a/docs/modules/_steps_buildproxyurl_.html
+++ b/docs/modules/_steps_buildproxyurl_.html
@@ -83,13 +83,13 @@ -
--
-
Returns proxy
+Returns handleProxy
Oak proxy middleware
diff --git a/docs/modules/_requestoptions_.html b/docs/modules/_requestoptions_.html index 75965b7..b7d20c6 100644 --- a/docs/modules/_requestoptions_.html +++ b/docs/modules/_requestoptions_.html @@ -92,7 +92,7 @@createRequestInit
Parameters
@@ -118,7 +118,7 @@extendHeaders
Parameters
@@ -141,13 +141,13 @@Returns Headers-
-
parseUrl
-- parse
Url(state: ProxyState, ctx: any): parseUrl
+ - parse
Url(state: ProxyState, ctx: any): any
Parameters
@@ -159,7 +159,7 @@state: ProxyState
ctx: any
Returns parseUrl
+Returns any
reqHeaders
Parameters
diff --git a/docs/modules/_steps_buildproxyreqinit_.html b/docs/modules/_steps_buildproxyreqinit_.html index 58a9563..d050043 100644 --- a/docs/modules/_steps_buildproxyreqinit_.html +++ b/docs/modules/_steps_buildproxyreqinit_.html @@ -83,13 +83,13 @@Functions
buildProxyReqInit
-- build
ProxyReqInit(state: ProxyState): buildProxyReqInit
+ - build
ProxyReqInit(state: ProxyState): any
Parameters
@@ -98,7 +98,7 @@Parameters
state: ProxyState
Returns buildProxyReqInit
+Returns any
Functions
buildProxyUrl
-- build
ProxyUrl(ctx: any): buildProxyUrl
+ - build
ProxyUrl(ctx: any): (Anonymous function)
Parameters
@@ -98,7 +98,7 @@Parameters
ctx: any
Returns buildProxyUrl
+Returns (Anonymous function)
diff --git a/docs/modules/_steps_copyproxyresheaderstouserres_.html b/docs/modules/_steps_copyproxyresheaderstouserres_.html index 5360be4..8755d0b 100644 --- a/docs/modules/_steps_copyproxyresheaderstouserres_.html +++ b/docs/modules/_steps_copyproxyresheaderstouserres_.html @@ -83,13 +83,13 @@Functions
copyProxyResHeadersToUserRes
-- copy
ProxyResHeadersToUserRes(state: ProxyState): copyProxyResHeadersToUserRes
+ - copy
ProxyResHeadersToUserRes(state: ProxyState): any
Parameters
@@ -98,7 +98,7 @@Parameters
state: ProxyState
Returns copyProxyResHeadersToUserRes
+Returns any
diff --git a/docs/modules/_steps_filtersrcreq_.html b/docs/modules/_steps_filtersrcreq_.html index 8bd8873..0c52075 100644 --- a/docs/modules/_steps_filtersrcreq_.html +++ b/docs/modules/_steps_filtersrcreq_.html @@ -90,7 +90,7 @@Const defaultFilter
Returns boolean
@@ -101,13 +101,13 @@Returns boolean-
-
filterSrcReq
-- filter
SrcReq(state: ProxyState): filterSrcReq
+ - filter
SrcReq(state: ProxyState): any
Parameters
@@ -116,7 +116,7 @@Parameters
state: ProxyState
Returns filterSrcReq
+Returns any
Functions
connectionResetHandler
-- connection
ResetHandler(ctx: any): connectionResetHandler
+ - connection
ResetHandler(ctx: any): void
Parameters
@@ -99,7 +99,7 @@Parameters
ctx: any
Returns connectionResetHandler
+Returns void
@@ -107,13 +107,13 @@Returns-
-
handleProxyErrors
-- handle
ProxyErrors(err: any, ctx: any): handleProxyErrors
+ - handle
ProxyErrors(err: any, ctx: any): void
Parameters
@@ -125,7 +125,7 @@err: any
ctx: any
Returns handleProxyErrors
+Returns void
diff --git a/docs/modules/_steps_sendsrcres_.html b/docs/modules/_steps_sendsrcres_.html index 88e70ac..5708d46 100644 --- a/docs/modules/_steps_sendsrcres_.html +++ b/docs/modules/_steps_sendsrcres_.html @@ -90,7 +90,7 @@Const isNullBodySt
-
diff --git a/egg.json b/egg.json
index 541a715..35b3a1a 100644
--- a/egg.json
+++ b/egg.json
@@ -1,24 +1,24 @@
{
- "name": "oak-http-proxy",
- "description": "Proxy middleware for Deno Oak HTTP servers.",
- "version": "2.1.0",
- "repository": "https://github.com/cmorten/oak-http-proxy",
- "stable": true,
- "files": [
- "./mod.ts",
- "./deps.ts",
- "./version.ts",
- "./src/**/*",
- "./README.md",
- "./LICENSE.md",
- "./.github/CHANGELOG.md"
- ],
- "checkFormat": false,
- "checkTests": false,
- "checkInstallation": false,
- "check": false,
- "entry": "./mod.ts",
- "homepage": "https://github.com/cmorten/oak-http-proxy",
- "ignore": [],
- "unlisted": false
+ "name": "oak-http-proxy",
+ "description": "Proxy middleware for Deno Oak HTTP servers.",
+ "version": "2.2.0",
+ "repository": "https://github.com/cmorten/oak-http-proxy",
+ "stable": true,
+ "files": [
+ "./mod.ts",
+ "./deps.ts",
+ "./version.ts",
+ "./src/**/*",
+ "./README.md",
+ "./LICENSE.md",
+ "./.github/CHANGELOG.md"
+ ],
+ "checkFormat": false,
+ "checkTests": false,
+ "checkInstallation": false,
+ "check": false,
+ "entry": "./mod.ts",
+ "homepage": "https://github.com/cmorten/oak-http-proxy",
+ "ignore": [],
+ "unlisted": false
}
diff --git a/examples/basic/README.md b/examples/basic/README.md
index 979e584..5f32395 100644
--- a/examples/basic/README.md
+++ b/examples/basic/README.md
@@ -13,7 +13,7 @@ deno run --allow-net --allow-read ./examples/proxy/index.ts
if have the repo cloned locally _OR_
```bash
-deno run --allow-net --allow-read https://deno.land/x/oak_http_proxy@2.1.0/examples/basic/index.ts
+deno run --allow-net --allow-read https://deno.land/x/oak_http_proxy@2.2.0/examples/basic/index.ts
```
if you don't!
diff --git a/examples/basic/index.ts b/examples/basic/index.ts
index 92cb042..1c5943f 100644
--- a/examples/basic/index.ts
+++ b/examples/basic/index.ts
@@ -5,7 +5,7 @@
*
* if have the repo cloned locally OR
*
- * deno run --allow-net https://deno.land/x/oak_http_proxy@2.1.0/examples/basic/index.ts
+ * deno run --allow-net https://deno.land/x/oak_http_proxy@2.2.0/examples/basic/index.ts
*
* if you don't!
*
diff --git a/test/deps.ts b/test/deps.ts
index e909d74..4f19156 100644
--- a/test/deps.ts
+++ b/test/deps.ts
@@ -1,4 +1,4 @@
-export * as Oak from "https://deno.land/x/oak@v11.1.0/mod.ts";
-export * as Opine from "https://deno.land/x/opine@2.3.3/mod.ts";
-export { expect } from "https://deno.land/x/expect@v0.2.10/mod.ts";
-export { superoak } from "https://deno.land/x/superoak@4.7.0/mod.ts";
+export * as Oak from "https://deno.land/x/oak@v12.6.2/mod.ts";
+export * as Opine from "https://deno.land/x/opine@2.3.4/mod.ts";
+export { expect } from "https://deno.land/x/expect@v0.4.0/mod.ts";
+export { superoak } from "https://deno.land/x/superoak@4.8.0/mod.ts";
diff --git a/version.ts b/version.ts
index a046a9b..ef19dd9 100644
--- a/version.ts
+++ b/version.ts
@@ -1,9 +1,9 @@
/**
* Version of oak-http-proxy.
*/
-export const VERSION = "2.1.0";
+export const VERSION = "2.2.0";
/**
* Supported versions of Deno.
*/
-export const DENO_SUPPORTED_VERSIONS: string[] = ["1.25.0"];
+export const DENO_SUPPORTED_VERSIONS: string[] = ["1.40.2"];
Parameters
@@ -107,13 +107,13 @@Returns boolean-
-
sendSrcRes
-- send
SrcRes(state: ProxyState): sendSrcRes
+ - send
SrcRes(state: ProxyState): any
Parameters
@@ -122,7 +122,7 @@Parameters
state: ProxyState
Returns sendSrcRes
+Returns any