Socket
Socket
Sign inDemoInstall

@hapi/hapi

Package Overview
Dependencies
Maintainers
7
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/hapi - npm Package Compare versions

Comparing version 21.3.7 to 21.3.8

6

lib/types/index.d.ts

@@ -21,8 +21,2 @@ // Definitions adapted from DefinitelyTyped, originally created by:

}
type HTTP_METHODS_PARTIAL_LOWERCASE = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options';
type HTTP_METHODS_PARTIAL = Uppercase<HTTP_METHODS_PARTIAL_LOWERCASE> | HTTP_METHODS_PARTIAL_LOWERCASE;
type HTTP_METHODS = 'HEAD' | 'head' | HTTP_METHODS_PARTIAL;
}

8

lib/types/request.d.ts

@@ -12,3 +12,3 @@ import * as http from 'http';

import { Server, ServerAuthSchemeObjectApi } from './server';
import { HTTP_METHODS_PARTIAL, HTTP_METHODS_PARTIAL_LOWERCASE, PeekListener } from './utils';
import { HTTP_METHODS, PeekListener } from './utils';

@@ -196,3 +196,3 @@ /**

/** the route HTTP method. */
method: HTTP_METHODS_PARTIAL;
method: Exclude<Lowercase<HTTP_METHODS>, 'head'> | '*';

@@ -379,3 +379,3 @@ /** the route path. */

*/
readonly method: HTTP_METHODS_PARTIAL_LOWERCASE;
readonly method: Lowercase<HTTP_METHODS>;

@@ -512,3 +512,3 @@ /**

*/
setMethod(method: HTTP_METHODS_PARTIAL): void;
setMethod(method: HTTP_METHODS | Lowercase<HTTP_METHODS>): void;

@@ -515,0 +515,0 @@ /**

@@ -7,3 +7,3 @@

import { ContentDecoders, ContentEncoders, RouteRequestExtType, RouteExtObject, Server } from './server';
import { Lifecycle, Json, HTTP_METHODS_PARTIAL } from './utils';
import { Lifecycle, Json, HTTP_METHODS } from './utils';

@@ -928,2 +928,4 @@ /**

type RouteDefMethods = Exclude<HTTP_METHODS | Lowercase<HTTP_METHODS>, 'HEAD' | 'head'>;
/**

@@ -957,3 +959,3 @@ * A route configuration object or an array of configuration objects where each object contains:

*/
method: HTTP_METHODS_PARTIAL | HTTP_METHODS_PARTIAL[] | string | string[];
method: RouteDefMethods | RouteDefMethods[] | '*';

@@ -960,0 +962,0 @@ /**

@@ -14,15 +14,10 @@ import * as https from 'https';

export type HTTP_METHODS_PARTIAL_LOWERCASE = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options';
/**
* All http parser [supported HTTP methods](https://nodejs.org/api/http.html#httpmethods).
*/
export type HTTP_METHODS = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' |
'M-SEARCH' | 'MERGE' | 'MKACTIVITY' | 'MKCALENDAR' | 'MKCOL' | 'MOVE' | 'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' |
'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' |
'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
export type HTTP_METHODS_PARTIAL =
'GET'
| 'POST'
| 'PUT'
| 'PATCH'
| 'DELETE'
| 'OPTIONS'
| HTTP_METHODS_PARTIAL_LOWERCASE;
export type HTTP_METHODS = 'HEAD' | 'head' | HTTP_METHODS_PARTIAL;
export type PeekListener = (chunk: string, encoding: string) => void;

@@ -29,0 +24,0 @@

@@ -5,3 +5,3 @@ {

"homepage": "https://hapi.dev",
"version": "21.3.7",
"version": "21.3.8",
"repository": "git://github.com/hapijs/hapi",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

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