Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hattip/compose

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hattip/compose - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35-canary

14

dist/index.d.ts

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc