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

18h

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

18h - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

4

dist/@types/http-method.d.ts

@@ -14,4 +14,4 @@ import { Context, Middleware } from "koa";

};
export declare type HTTPMethodRules<ResponseBody = {}, RequestBody extends ObjectShape | null = null, QueryParams = Record<string, string | undefined>> = {
handler(context: ExtendedContext<RequestBody, QueryParams>): Promise<RequestHandlerResult<ResponseBody>>;
export declare type HTTPMethodRules<ResponseBody = object, RequestBody extends ObjectShape | null = null, QueryParams = Record<string, string | undefined>> = {
handler(context?: ExtendedContext<RequestBody, QueryParams>): Promise<RequestHandlerResult<ResponseBody>>;
middleware?: {

@@ -18,0 +18,0 @@ pre?: Middleware[];

export interface RequestHandlerResult<ResponseBody> {
headers?: Record<string, string | number | boolean>;
code?: number;
body?: ResponseBody;
body: ResponseBody;
}

@@ -23,3 +23,3 @@ import { Context, Middleware } from "koa";

export type HTTPMethodRules<
ResponseBody = {},
ResponseBody = object,
RequestBody extends ObjectShape | null = null,

@@ -29,3 +29,3 @@ QueryParams = Record<string, string | undefined>

handler(
context: ExtendedContext<RequestBody, QueryParams>
context?: ExtendedContext<RequestBody, QueryParams>
): Promise<RequestHandlerResult<ResponseBody>>;

@@ -32,0 +32,0 @@ middleware?: {

export interface RequestHandlerResult<ResponseBody> {
headers?: Record<string, string | number | boolean>;
code?: number;
body?: ResponseBody;
body: ResponseBody;
}

@@ -8,3 +8,2 @@ import Koa, { Next } from "koa";

import { ExtendedContext } from "@/@types/http-method";
import { RouteController } from "@/@types/route-controller";

@@ -11,0 +10,0 @@ type ParsedController = ReturnType<typeof handleRoute>;

{
"name": "18h",
"description": "A Next.js style dynamic API router for Koa-based APIs.",
"version": "2.0.6",
"version": "2.0.7",
"repository": {

@@ -6,0 +6,0 @@ "url": "https://github.com/ridafkih/18h"

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