From 63de6456dc173a51f4545007647c22db0238134c Mon Sep 17 00:00:00 2001 From: Jon Friesen Date: Fri, 5 Jan 2024 12:21:45 -0700 Subject: [PATCH] migrate from router to endpoint (#2) --- README.md | 4 ++-- package-lock.json | 36 ++++++++++++++++++------------------ package.json | 4 ++-- src/index.ts | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index f01925b..2fa13c9 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ A Qpoint adapter for rewriting the response html using the HtmlRewriter rules Note: This adapter is useless without registered HtmlRewriter rules. Usually this adapter is added after other adapters that register rules. ```ts -import Router from "@qpoint/router"; +import Endpoint from "@qpoint/endpoint"; import rewriteHtml from "@qpoint/rewrite-html"; -export default new Router() +export default new Endpoint() .use(rewriteHtml()) ``` diff --git a/package-lock.json b/package-lock.json index a417e2e..6a88c7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "@qpoint/rewrite-html", - "version": "0.2.0", + "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@qpoint/rewrite-html", - "version": "0.2.0", + "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "@qpoint/router": "^0.2.0" + "@qpoint/endpoint": "^0.0.1" }, "devDependencies": { "@cloudflare/workers-types": "^3.5.1", "@types/node": "^17.0.25", - "typescript": "^4.6.3" + "typescript": "^4.9.5" } }, "node_modules/@cloudflare/workers-types": { @@ -23,10 +23,10 @@ "integrity": "sha512-gaBUSaKS65mN3iKZEgichbXYEmAa/pXkc5Gbt+1BptYphdGkj09ggdsiE4w8g0F/uI1g36QaTKrzVnBAWMipvQ==", "dev": true }, - "node_modules/@qpoint/router": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@qpoint/router/-/router-0.2.0.tgz", - "integrity": "sha512-1uKTeTTHTcJ/QI/dYF1z0WvMpU9McWEl+b1hLhy3BcFsbEDQIoE1Yzpol8kC98t8N5+gdzWRZVzLUPCbDjPR2g==", + "node_modules/@qpoint/endpoint": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@qpoint/endpoint/-/endpoint-0.0.1.tgz", + "integrity": "sha512-JMBqvVeFwNt1o/pzw5Lgy37KQSiFDP5aAkpAd9+zmA2T8G/RNQ5X8bANq0TibojfqUXjgg1HtBLhTrDvktvjoQ==", "dependencies": { "koa-compose": "^4.1.0" } @@ -43,9 +43,9 @@ "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" }, "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -63,10 +63,10 @@ "integrity": "sha512-gaBUSaKS65mN3iKZEgichbXYEmAa/pXkc5Gbt+1BptYphdGkj09ggdsiE4w8g0F/uI1g36QaTKrzVnBAWMipvQ==", "dev": true }, - "@qpoint/router": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@qpoint/router/-/router-0.2.0.tgz", - "integrity": "sha512-1uKTeTTHTcJ/QI/dYF1z0WvMpU9McWEl+b1hLhy3BcFsbEDQIoE1Yzpol8kC98t8N5+gdzWRZVzLUPCbDjPR2g==", + "@qpoint/endpoint": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@qpoint/endpoint/-/endpoint-0.0.1.tgz", + "integrity": "sha512-JMBqvVeFwNt1o/pzw5Lgy37KQSiFDP5aAkpAd9+zmA2T8G/RNQ5X8bANq0TibojfqUXjgg1HtBLhTrDvktvjoQ==", "requires": { "koa-compose": "^4.1.0" } @@ -83,9 +83,9 @@ "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" }, "typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true } } diff --git a/package.json b/package.json index 2498300..179bcde 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,11 @@ "release": "npm publish --access=public" }, "dependencies": { - "@qpoint/router": "^0.2.0" + "@qpoint/endpoint": "^0.0.1" }, "devDependencies": { "@cloudflare/workers-types": "^3.5.1", "@types/node": "^17.0.25", - "typescript": "^4.6.3" + "typescript": "^4.9.5" } } diff --git a/src/index.ts b/src/index.ts index 89425df..5273f82 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { Context } from '@qpoint/router' +import { Context } from '@qpoint/endpoint' export interface RewriteHtmlConfig { // nothing for now @@ -21,4 +21,4 @@ export default function rewriteHtml(config: RewriteHtmlConfig = {}) { // continue along return next() } -} \ No newline at end of file +}