Comparing version 1.6.5 to 1.6.6
@@ -111,3 +111,3 @@ import { CookieSerializeOptions } from 'cookie-es'; | ||
constructor(req: IncomingMessage, res: ServerResponse); | ||
get path(): string | undefined; | ||
get path(): string; | ||
/** @deprecated Please use `event.node.req` instead. **/ | ||
@@ -337,5 +337,13 @@ get req(): IncomingMessage; | ||
declare const getHeader: typeof getRequestHeader; | ||
declare function getRequestHost(event: H3Event): string; | ||
declare function getRequestProtocol(event: H3Event): "https" | "http"; | ||
declare function getRequestURL(event: H3Event): URL; | ||
declare function getRequestHost(event: H3Event, opts?: { | ||
xForwardedHost?: boolean; | ||
}): string; | ||
declare function getRequestProtocol(event: H3Event, opts?: { | ||
xForwardedProto?: boolean; | ||
}): "https" | "http"; | ||
declare function getRequestPath(event: H3Event): string; | ||
declare function getRequestURL(event: H3Event, opts?: { | ||
xForwardedHost?: boolean; | ||
xForwardedProto?: boolean; | ||
}): URL; | ||
@@ -407,2 +415,2 @@ declare function send(event: H3Event, data?: any, type?: string): Promise<void>; | ||
export { AddRouteShortcuts, App, AppOptions, AppUse, CacheConditions, CreateRouterOptions, DynamicEventHandler, Encoding, EventHandler, EventHandlerResponse, H3CorsOptions, H3Error, H3Event, H3EventContext, H3Headers, H3Response, HTTPMethod, InputLayer, InputStack, Layer, LazyEventHandler, MIMES, Matcher, MultiPartData, NodeEventContext, NodeListener, NodeMiddleware, NodePromisifiedHandler, ProxyOptions, RequestHeaders, Router, RouterMethod, RouterUse, Session, SessionConfig, SessionData, Stack, appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearSession, createApp, createAppEventHandler, createError, createEvent, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestHeader, getRequestHeaders, getRequestHost, getRequestProtocol, getRequestURL, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readMultipartFormData, readRawBody, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendNoContent, sendProxy, sendRedirect, sendStream, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, unsealSession, updateSession, use, useBase, useSession, writeEarlyHints }; | ||
export { AddRouteShortcuts, App, AppOptions, AppUse, CacheConditions, CreateRouterOptions, DynamicEventHandler, Encoding, EventHandler, EventHandlerResponse, H3CorsOptions, H3Error, H3Event, H3EventContext, H3Headers, H3Response, HTTPMethod, InputLayer, InputStack, Layer, LazyEventHandler, MIMES, Matcher, MultiPartData, NodeEventContext, NodeListener, NodeMiddleware, NodePromisifiedHandler, ProxyOptions, RequestHeaders, Router, RouterMethod, RouterUse, Session, SessionConfig, SessionData, Stack, appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearSession, createApp, createAppEventHandler, createError, createEvent, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestHeader, getRequestHeaders, getRequestHost, getRequestPath, getRequestProtocol, getRequestURL, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readMultipartFormData, readRawBody, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendNoContent, sendProxy, sendRedirect, sendStream, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, unsealSession, updateSession, use, useBase, useSession, writeEarlyHints }; |
{ | ||
"name": "h3", | ||
"version": "1.6.5", | ||
"version": "1.6.6", | ||
"description": "Tiny JavaScript Server", | ||
@@ -22,2 +22,12 @@ "repository": "unjs/h3", | ||
], | ||
"scripts": { | ||
"build": "unbuild", | ||
"dev": "vitest", | ||
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test playground", | ||
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test playground -w", | ||
"play": "jiti ./playground/index.ts", | ||
"profile": "0x -o -D .profile -P 'autocannon -c 100 -p 10 -d 40 http://localhost:$PORT' ./playground/server.cjs", | ||
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags", | ||
"test": "pnpm lint && vitest run --coverage" | ||
}, | ||
"dependencies": { | ||
@@ -35,3 +45,3 @@ "cookie-es": "^1.0.0", | ||
"@types/express": "^4.17.17", | ||
"@types/node": "^20.0.0", | ||
"@types/node": "^20.1.4", | ||
"@types/supertest": "^2.0.12", | ||
@@ -42,3 +52,3 @@ "@vitest/coverage-c8": "^0.31.0", | ||
"connect": "^3.7.0", | ||
"eslint": "^8.39.0", | ||
"eslint": "^8.40.0", | ||
"eslint-config-unjs": "^0.1.0", | ||
@@ -49,3 +59,3 @@ "express": "^4.18.2", | ||
"listhen": "^1.0.4", | ||
"node-fetch-native": "^1.1.0", | ||
"node-fetch-native": "^1.1.1", | ||
"prettier": "^2.8.8", | ||
@@ -57,13 +67,3 @@ "supertest": "^6.3.3", | ||
}, | ||
"packageManager": "pnpm@8.4.0", | ||
"scripts": { | ||
"build": "unbuild", | ||
"dev": "vitest", | ||
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test playground", | ||
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test playground -w", | ||
"play": "jiti ./playground/index.ts", | ||
"profile": "0x -o -D .profile -P 'autocannon -c 100 -p 10 -d 40 http://localhost:$PORT' ./playground/server.cjs", | ||
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags", | ||
"test": "pnpm lint && vitest run --coverage" | ||
} | ||
"packageManager": "pnpm@8.5.1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
118276
6
3337