@tinyhttp/send
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -6,1 +6,2 @@ export * from './json.js'; | ||
export * from './sendFile.js'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,4 +0,3 @@ | ||
/// <reference types="node" /> | ||
import { ServerResponse as S } from 'http'; | ||
declare type Res = Pick<S, 'setHeader' | 'end' | 'removeHeader'>; | ||
type Res = Pick<S, 'setHeader' | 'end' | 'removeHeader'>; | ||
/** | ||
@@ -10,1 +9,2 @@ * Respond with stringified JSON object | ||
export {}; | ||
//# sourceMappingURL=json.d.ts.map |
@@ -1,7 +0,6 @@ | ||
/// <reference types="node" /> | ||
import { IncomingMessage as I, ServerResponse as S } from 'http'; | ||
declare type Req = Pick<I, 'method'> & { | ||
type Req = Pick<I, 'method'> & { | ||
fresh?: boolean; | ||
}; | ||
declare type Res = Pick<S, 'setHeader' | 'removeHeader' | 'end' | 'getHeader' | 'statusCode'>; | ||
type Res = Pick<S, 'setHeader' | 'removeHeader' | 'end' | 'getHeader' | 'statusCode'>; | ||
/** | ||
@@ -20,1 +19,2 @@ * Sends the HTTP response. | ||
export {}; | ||
//# sourceMappingURL=send.d.ts.map |
@@ -1,6 +0,3 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { IncomingMessage as I, ServerResponse as S } from 'http'; | ||
export declare type ReadStreamOptions = Partial<{ | ||
export type ReadStreamOptions = Partial<{ | ||
flags: string; | ||
@@ -16,3 +13,3 @@ encoding: BufferEncoding; | ||
}>; | ||
export declare type SendFileOptions = ReadStreamOptions & Partial<{ | ||
export type SendFileOptions = ReadStreamOptions & Partial<{ | ||
root: string; | ||
@@ -25,8 +22,8 @@ headers: Record<string, any>; | ||
}>; | ||
export declare type Caching = Partial<{ | ||
export type Caching = Partial<{ | ||
maxAge: number; | ||
immutable: boolean; | ||
}>; | ||
declare type Req = Pick<I, 'headers'>; | ||
declare type Res = Pick<S, 'setHeader' | 'statusCode' | 'writeHead' | 'getHeader'> & NodeJS.WritableStream; | ||
type Req = Pick<I, 'headers'>; | ||
type Res = Pick<S, 'setHeader' | 'statusCode' | 'writeHead' | 'getHeader'> & NodeJS.WritableStream; | ||
export declare const enableCaching: (res: Res, caching: Caching) => void; | ||
@@ -44,1 +41,2 @@ /** | ||
export {}; | ||
//# sourceMappingURL=sendFile.d.ts.map |
@@ -1,5 +0,4 @@ | ||
/// <reference types="node" /> | ||
import { IncomingMessage as I, ServerResponse as S } from 'http'; | ||
declare type Req = Pick<I, 'method'>; | ||
declare type Res = Pick<S, 'setHeader' | 'removeHeader' | 'end' | 'getHeader' | 'statusCode'>; | ||
type Req = Pick<I, 'method'>; | ||
type Res = Pick<S, 'setHeader' | 'removeHeader' | 'end' | 'getHeader' | 'statusCode'>; | ||
/** | ||
@@ -15,1 +14,2 @@ * Sets the response HTTP status code to statusCode and send its string representation as the response body. | ||
export {}; | ||
//# sourceMappingURL=sendStatus.d.ts.map |
@@ -1,4 +0,3 @@ | ||
/// <reference types="node" /> | ||
import { ServerResponse } from 'http'; | ||
declare type Res = Pick<ServerResponse, 'statusCode'>; | ||
type Res = Pick<ServerResponse, 'statusCode'>; | ||
/** | ||
@@ -11,1 +10,2 @@ * Sets the HTTP status for the response. It is a chainable alias of Node’s `response.statusCode`. | ||
export {}; | ||
//# sourceMappingURL=status.d.ts.map |
@@ -1,4 +0,4 @@ | ||
/// <reference types="node" /> | ||
import { Stats } from 'fs'; | ||
export declare const createETag: (body: Buffer | string | Stats, encoding: BufferEncoding) => string; | ||
export declare function setCharset(type: string, charset: string): any; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@tinyhttp/send", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"type": "module", | ||
@@ -30,11 +30,10 @@ "description": "json, send, sendFile, status and sendStatus methods for tinyhttp", | ||
"dependencies": { | ||
"@tinyhttp/etag": "2.0.6", | ||
"es-content-type": "^0.1.0", | ||
"es-mime-types": "^0.1.4" | ||
"es-mime-types": "^0.1.4", | ||
"@tinyhttp/etag": "2.0.7" | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"postbuild": "tsc --emitDeclarationOnly" | ||
"build": "vite build" | ||
} | ||
} |
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
37365
20
242
+ Added@tinyhttp/etag@2.0.7(transitive)
- Removed@tinyhttp/etag@2.0.6(transitive)
Updated@tinyhttp/etag@2.0.7