@hattip/compose
Advanced tools
Comparing version 0.0.34 to 0.0.35-canary
@@ -11,3 +11,3 @@ import { AdapterRequestContext, HattipHandler } from '@hattip/core'; | ||
*/ | ||
interface RequestContext extends AdapterRequestContext, RequestContextExtensions { | ||
interface RequestContext<P = unknown> extends AdapterRequestContext<P>, RequestContextExtensions { | ||
/** Parsed request URL */ | ||
@@ -30,9 +30,9 @@ url: URL; | ||
type MaybeAsyncResponse = MaybeRespone | Promise<MaybeRespone>; | ||
type RequestHandler = (context: RequestContext) => MaybeAsyncResponse; | ||
type MaybeRequestHandler = false | null | undefined | RequestHandler; | ||
type RequestHandlerStack = MaybeRequestHandler | RequestHandlerStack[]; | ||
type PartialHandler = (context: RequestContext) => Response | void | Promise<Response | void>; | ||
declare function composePartial(handlers: RequestHandlerStack[], next?: () => Promise<Response>): PartialHandler; | ||
declare function compose(...handlers: RequestHandlerStack[]): HattipHandler; | ||
type RequestHandler<P = unknown> = (context: RequestContext<P>) => MaybeAsyncResponse; | ||
type MaybeRequestHandler<P = unknown> = false | null | undefined | RequestHandler<P>; | ||
type RequestHandlerStack<P = unknown> = MaybeRequestHandler<P> | MaybeRequestHandler<P>[]; | ||
type PartialHandler<P = unknown> = (context: RequestContext<P>) => Response | void | Promise<Response | void>; | ||
declare function composePartial<P = unknown>(handlers: RequestHandlerStack<P>[], next?: () => Promise<Response>): PartialHandler; | ||
declare function compose<P = unknown>(...handlers: RequestHandlerStack<P>[]): HattipHandler<P>; | ||
export { Locals, MaybeAsyncResponse, MaybeRequestHandler, MaybeRespone, PartialHandler, RequestContext, RequestContextExtensions, RequestHandler, RequestHandlerStack, ResponseConvertible, ResponseLike, compose, composePartial }; |
{ | ||
"name": "@hattip/compose", | ||
"version": "0.0.34", | ||
"version": "0.0.35-canary", | ||
"type": "module", | ||
@@ -10,15 +10,21 @@ "description": "Middleware system for HatTip", | ||
"exports": "./dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"dist/*.d.ts" | ||
] | ||
} | ||
}, | ||
"dependencies": { | ||
"@hattip/core": "0.0.34" | ||
"@hattip/core": "0.0.35-canary" | ||
}, | ||
"devDependencies": { | ||
"@cyco130/eslint-config": "^3.0.2", | ||
"eslint": "^8.36.0", | ||
"publint": "^0.1.11", | ||
"tsup": "^6.7.0", | ||
"typescript": "^5.0.2", | ||
"vitest": "^0.29.7", | ||
"@hattip/polyfills": "0.0.34", | ||
"@hattip/adapter-test": "0.0.34" | ||
"@cyco130/eslint-config": "^3.3.0", | ||
"eslint": "^8.45.0", | ||
"publint": "^0.1.16", | ||
"tsup": "^7.1.0", | ||
"typescript": "^5.1.6", | ||
"vitest": "^0.33.0", | ||
"@hattip/adapter-test": "0.0.35-canary", | ||
"@hattip/polyfills": "0.0.35-canary" | ||
}, | ||
@@ -32,4 +38,4 @@ "scripts": { | ||
"test:lint": "eslint . --max-warnings 0 --ignore-pattern dist", | ||
"test:package": "publint" | ||
"test:package": "publint --strict" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8982
+ Added@hattip/core@0.0.35-canary(transitive)
- Removed@hattip/core@0.0.34(transitive)
Updated@hattip/core@0.0.35-canary