-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: universal-middleware now targets cloudflare-pages and cloudflar…
…e-worker
- Loading branch information
Showing
32 changed files
with
706 additions
and
560 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,66 @@ | |
"types": "./dist/middlewares/universal-h3-middleware-guard.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-h3-middleware-guard.middleware.js", | ||
"default": "./dist/middlewares/universal-h3-middleware-guard.middleware.js" | ||
}, | ||
"./dummy-handler-cloudflare": { | ||
"types": "./dist/handlers/universal-cloudflare-handler-handler.d.ts", | ||
"import": "./dist/handlers/universal-cloudflare-handler-handler.js", | ||
"default": "./dist/handlers/universal-cloudflare-handler-handler.js" | ||
}, | ||
"./middlewares/context-middleware-cloudflare": { | ||
"types": "./dist/middlewares/universal-cloudflare-middleware-context.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-middleware-context.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-middleware-context.middleware.js" | ||
}, | ||
"./middlewares/headers-middleware-cloudflare": { | ||
"types": "./dist/middlewares/universal-cloudflare-middleware-headers.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-middleware-headers.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-middleware-headers.middleware.js" | ||
}, | ||
"./middlewares/guard-middleware-cloudflare": { | ||
"types": "./dist/middlewares/universal-cloudflare-middleware-guard.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-middleware-guard.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-middleware-guard.middleware.js" | ||
}, | ||
"./dummy-handler-cloudflare-worker": { | ||
"types": "./dist/handlers/universal-cloudflare-worker-handler-handler.d.ts", | ||
"import": "./dist/handlers/universal-cloudflare-worker-handler-handler.js", | ||
"default": "./dist/handlers/universal-cloudflare-worker-handler-handler.js" | ||
}, | ||
"./dummy-handler-cloudflare-pages": { | ||
"types": "./dist/handlers/universal-cloudflare-pages-handler-handler.d.ts", | ||
"import": "./dist/handlers/universal-cloudflare-pages-handler-handler.js", | ||
"default": "./dist/handlers/universal-cloudflare-pages-handler-handler.js" | ||
}, | ||
"./middlewares/context-middleware-cloudflare-worker": { | ||
"types": "./dist/middlewares/universal-cloudflare-worker-middleware-context.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-worker-middleware-context.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-worker-middleware-context.middleware.js" | ||
}, | ||
"./middlewares/context-middleware-cloudflare-pages": { | ||
"types": "./dist/middlewares/universal-cloudflare-pages-middleware-context.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-pages-middleware-context.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-pages-middleware-context.middleware.js" | ||
}, | ||
"./middlewares/headers-middleware-cloudflare-worker": { | ||
"types": "./dist/middlewares/universal-cloudflare-worker-middleware-headers.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-worker-middleware-headers.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-worker-middleware-headers.middleware.js" | ||
}, | ||
"./middlewares/headers-middleware-cloudflare-pages": { | ||
"types": "./dist/middlewares/universal-cloudflare-pages-middleware-headers.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-pages-middleware-headers.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-pages-middleware-headers.middleware.js" | ||
}, | ||
"./middlewares/guard-middleware-cloudflare-worker": { | ||
"types": "./dist/middlewares/universal-cloudflare-worker-middleware-guard.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-worker-middleware-guard.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-worker-middleware-guard.middleware.js" | ||
}, | ||
"./middlewares/guard-middleware-cloudflare-pages": { | ||
"types": "./dist/middlewares/universal-cloudflare-pages-middleware-guard.middleware.d.ts", | ||
"import": "./dist/middlewares/universal-cloudflare-pages-middleware-guard.middleware.js", | ||
"default": "./dist/middlewares/universal-cloudflare-pages-middleware-guard.middleware.js" | ||
} | ||
}, | ||
"author": "Joël Charles <[email protected]>", | ||
|
@@ -171,7 +231,8 @@ | |
"@universal-middleware/hono": "^0", | ||
"@universal-middleware/webroute": "^0", | ||
"@universal-middleware/fastify": "^0", | ||
"@universal-middleware/h3": "^0" | ||
"@universal-middleware/h3": "^0", | ||
"@universal-middleware/cloudflare": "^0" | ||
}, | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { middlewares } from "@universal-middleware/tests/utils"; | ||
import { createPageFunction } from "../src/index.js"; | ||
import { createPagesFunction } from "../src/index.js"; | ||
|
||
export const onRequest = [ | ||
createPageFunction(middlewares[0])(), | ||
createPageFunction(middlewares[1])(), | ||
createPageFunction(middlewares[2])(), | ||
createPagesFunction(middlewares[0])(), | ||
createPagesFunction(middlewares[1])(), | ||
createPagesFunction(middlewares[2])(), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { createPageFunction } from "../src/index.js"; | ||
import { createPagesFunction } from "../src/index.js"; | ||
import { handler } from "@universal-middleware/tests/utils"; | ||
|
||
export const onRequest = createPageFunction(handler)(); | ||
export const onRequest = createPagesFunction(handler)(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export { | ||
createHandler, | ||
createPageFunction, | ||
createPagesFunction, | ||
getContext, | ||
type CloudflareHandler, | ||
type CloudflarePagesFunction, | ||
} from "./common.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.