@adonisjs/http-server 7.6.1 → 8.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/chunk-ASX56VAK.js +76 -0
- package/build/{chunk-7AGINHO3.js → chunk-VYBTM3NC.js} +1025 -607
- package/build/client.cjs +232 -0
- package/build/client.d.cts +258 -0
- package/build/client.d.ts +258 -0
- package/build/client.js +229 -0
- package/build/factories/http_server.d.ts +1 -1
- package/build/factories/main.d.ts +3 -3
- package/build/factories/main.js +89 -89
- package/build/factories/request.d.ts +1 -1
- package/build/factories/response.d.ts +2 -2
- package/build/factories/url_builder_factory.d.ts +25 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +25 -23
- package/build/src/client/main.d.ts +3 -0
- package/build/src/client/router.d.ts +68 -0
- package/build/src/client/types.d.ts +181 -0
- package/build/src/client/url_builder.d.ts +13 -0
- package/build/src/cookies/client.d.ts +2 -2
- package/build/src/cookies/parser.d.ts +2 -2
- package/build/src/cookies/serializer.d.ts +7 -1
- package/build/src/define_middleware.d.ts +3 -2
- package/build/src/{exceptions.d.ts → errors.d.ts} +13 -1
- package/build/src/exception_handler.d.ts +2 -2
- package/build/src/helpers.d.ts +51 -15
- package/build/src/helpers.js +18 -0
- package/build/src/http_context/main.d.ts +3 -3
- package/build/src/qs.d.ts +3 -3
- package/build/src/redirect.d.ts +3 -2
- package/build/src/request.d.ts +10 -9
- package/build/src/response.d.ts +1 -1
- package/build/src/router/brisk.d.ts +4 -3
- package/build/src/router/executor.d.ts +2 -2
- package/build/src/router/factories/use_return_value.d.ts +6 -1
- package/build/src/router/group.d.ts +4 -4
- package/build/src/router/{lookup_store → legacy}/url_builder.d.ts +20 -4
- package/build/src/router/main.d.ts +52 -12
- package/build/src/router/resource.d.ts +4 -3
- package/build/src/router/route.d.ts +3 -2
- package/build/src/router/signed_url_builder.d.ts +14 -0
- package/build/src/router/store.d.ts +3 -2
- package/build/src/server/factories/middleware_handler.d.ts +3 -3
- package/build/src/server/factories/{final_handler.d.ts → route_finder.d.ts} +2 -2
- package/build/src/server/main.d.ts +7 -3
- package/build/src/tracing_channels.d.ts +23 -0
- package/build/src/types/main.d.ts +7 -7
- package/build/src/types/main.js +0 -1
- package/build/src/types/middleware.d.ts +34 -1
- package/build/src/types/request.d.ts +4 -0
- package/build/src/types/response.d.ts +1 -1
- package/build/src/types/route.d.ts +50 -51
- package/build/src/types/server.d.ts +1 -1
- package/build/src/types/tracing_channels.d.ts +6 -0
- package/build/src/utils.d.ts +28 -0
- package/package.json +60 -48
- package/build/chunk-7AGINHO3.js.map +0 -1
- package/build/factories/main.js.map +0 -1
- package/build/index.js.map +0 -1
- package/build/src/router/lookup_store/main.d.ts +0 -48
- package/build/src/router/lookup_store/route_finder.d.ts +0 -25
- package/build/src/router/parser.d.ts +0 -5
- package/build/src/types/base.d.ts +0 -19
- package/build/src/types/main.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Logger } from '@adonisjs/logger';
|
|
2
|
+
import type { LazyImport } from '@poppinss/utils/types';
|
|
2
3
|
import type { Encryption } from '@adonisjs/encryption';
|
|
3
4
|
import type { Server as HttpsServer } from 'node:https';
|
|
4
5
|
import type { Application } from '@adonisjs/application';
|
|
5
6
|
import type { EmitterLike } from '@adonisjs/events/types';
|
|
6
|
-
import { ContainerResolver } from '@adonisjs/fold';
|
|
7
|
+
import { type ContainerResolver } from '@adonisjs/fold';
|
|
7
8
|
import type { ServerResponse, IncomingMessage, Server as HttpServer } from 'node:http';
|
|
8
|
-
import type {
|
|
9
|
-
import type { MiddlewareAsClass } from '../types/middleware.js';
|
|
9
|
+
import type { MiddlewareAsClass, ParsedGlobalMiddleware } from '../types/middleware.js';
|
|
10
10
|
import type { ServerConfig, HttpServerEvents, ErrorHandlerAsAClass, TestingMiddlewarePipeline } from '../types/server.js';
|
|
11
11
|
import { Request } from '../request.js';
|
|
12
12
|
import { Response } from '../response.js';
|
|
@@ -75,6 +75,10 @@ export declare class Server {
|
|
|
75
75
|
* Creates an instance of the [[HttpContext]] class
|
|
76
76
|
*/
|
|
77
77
|
createHttpContext(request: Request, response: Response, resolver: ContainerResolver<any>): HttpContext;
|
|
78
|
+
/**
|
|
79
|
+
* Returns a list of server middleware stack
|
|
80
|
+
*/
|
|
81
|
+
getMiddlewareList(): ParsedGlobalMiddleware[];
|
|
78
82
|
/**
|
|
79
83
|
* Handle request
|
|
80
84
|
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import diagnostics_channel from 'node:diagnostics_channel';
|
|
2
|
+
import type { MiddlewareTracingData } from './types/tracing_channels.js';
|
|
3
|
+
/**
|
|
4
|
+
* Traces every HTTP request handled by the {@link Server} class.
|
|
5
|
+
*/
|
|
6
|
+
export declare const httpRequest: diagnostics_channel.TracingChannel<"adonisjs:http.request", import("./http_context/main.ts").HttpContext>;
|
|
7
|
+
/**
|
|
8
|
+
* Traces middleware executed during the HTTP request
|
|
9
|
+
*/
|
|
10
|
+
export declare const httpMiddleware: diagnostics_channel.TracingChannel<"adonisjs:http.middleware", MiddlewareTracingData>;
|
|
11
|
+
/**
|
|
12
|
+
* Traces the exception handler that converts errors into HTTP responses
|
|
13
|
+
*/
|
|
14
|
+
export declare const httpExceptionHandler: diagnostics_channel.TracingChannel<"adonisjs:http.exception.handler", object>;
|
|
15
|
+
/**
|
|
16
|
+
* Traces route handler executed during the HTTP request
|
|
17
|
+
*/
|
|
18
|
+
export declare const httpRouteHandler: diagnostics_channel.TracingChannel<"adonisjs:http.route.handler", import("./types/route.ts").RouteJSON>;
|
|
19
|
+
/**
|
|
20
|
+
* Traces non-stream and non-file download responses written by the AdonisJS
|
|
21
|
+
* response class
|
|
22
|
+
*/
|
|
23
|
+
export declare const httpResponseSerializer: diagnostics_channel.TracingChannel<"adonisjs:http.response.serializer", object>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './request.
|
|
5
|
-
export * from './response.
|
|
6
|
-
export * from '
|
|
7
|
-
export * from './
|
|
1
|
+
export * from './qs.ts';
|
|
2
|
+
export * from './route.ts';
|
|
3
|
+
export * from './server.ts';
|
|
4
|
+
export * from './request.ts';
|
|
5
|
+
export * from './response.ts';
|
|
6
|
+
export * from '../client/types.ts';
|
|
7
|
+
export * from './middleware.ts';
|
package/build/src/types/main.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=main.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ContainerResolver } from '@adonisjs/fold';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NextFn } from '@poppinss/middleware/types';
|
|
3
|
+
import type { Constructor, LazyImport } from '@poppinss/utils/types';
|
|
3
4
|
import type { HttpContext } from '../http_context/main.js';
|
|
4
5
|
/**
|
|
5
6
|
* Middleware represented as a class
|
|
@@ -24,6 +25,7 @@ export type MiddlewareFn = (ctx: HttpContext, next: NextFn) => any;
|
|
|
24
25
|
*/
|
|
25
26
|
export type ParsedGlobalMiddleware = {
|
|
26
27
|
name?: string;
|
|
28
|
+
reference: LazyImport<MiddlewareAsClass> | MiddlewareAsClass;
|
|
27
29
|
handle: (resolver: ContainerResolver<any>, ...args: [ctx: HttpContext, next: NextFn, params?: any]) => any;
|
|
28
30
|
};
|
|
29
31
|
/**
|
|
@@ -31,7 +33,38 @@ export type ParsedGlobalMiddleware = {
|
|
|
31
33
|
*/
|
|
32
34
|
export type ParsedNamedMiddleware = {
|
|
33
35
|
name: string;
|
|
36
|
+
reference: LazyImport<MiddlewareAsClass> | MiddlewareAsClass;
|
|
34
37
|
handle: ParsedGlobalMiddleware['handle'];
|
|
35
38
|
args: any;
|
|
36
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Info node representing a middleware handler
|
|
42
|
+
*/
|
|
43
|
+
export type MiddlewareHandlerInfo = {
|
|
44
|
+
type: 'closure';
|
|
45
|
+
name: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'named';
|
|
48
|
+
name: string;
|
|
49
|
+
args: any | undefined;
|
|
50
|
+
method: string;
|
|
51
|
+
moduleNameOrPath: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'global';
|
|
54
|
+
name?: string | undefined;
|
|
55
|
+
method: string;
|
|
56
|
+
moduleNameOrPath: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Info node representing route handler
|
|
60
|
+
*/
|
|
61
|
+
export type RouteHandlerInfo = {
|
|
62
|
+
type: 'closure';
|
|
63
|
+
name: string;
|
|
64
|
+
args?: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'controller';
|
|
67
|
+
method: string;
|
|
68
|
+
moduleNameOrPath: string;
|
|
69
|
+
};
|
|
37
70
|
export {};
|
|
@@ -17,6 +17,10 @@ export type RequestConfig = {
|
|
|
17
17
|
* Defaults to false
|
|
18
18
|
*/
|
|
19
19
|
generateRequestId: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A custom method to generate a unique request id. Defaults to uuid v4.
|
|
22
|
+
*/
|
|
23
|
+
createRequestId(): string;
|
|
20
24
|
/**
|
|
21
25
|
* Method spoofing allows changing the request method using the query string.
|
|
22
26
|
* For example: Making a POST request on URL /users/1?_method=PATCH will
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type Middleware from '@poppinss/middleware';
|
|
2
2
|
import type { ContainerResolver } from '@adonisjs/fold';
|
|
3
|
-
import type { Constructor, LazyImport } from '
|
|
3
|
+
import type { Constructor, LazyImport } from '@poppinss/utils/types';
|
|
4
|
+
import type { ServerErrorHandler } from './server.js';
|
|
4
5
|
import type { HttpContext } from '../http_context/main.js';
|
|
6
|
+
import { type RouteMatcher, type MatchItRouteToken } from '../client/types.ts';
|
|
5
7
|
import type { MiddlewareFn, ParsedGlobalMiddleware } from './middleware.js';
|
|
6
|
-
import { ServerErrorHandler } from './server.js';
|
|
7
8
|
/**
|
|
8
9
|
* Returns a union of methods from a controller that accepts
|
|
9
10
|
* the context as the first argument.
|
|
@@ -11,15 +12,6 @@ import { ServerErrorHandler } from './server.js';
|
|
|
11
12
|
export type GetControllerHandlers<Controller extends Constructor<any>> = {
|
|
12
13
|
[K in keyof InstanceType<Controller>]: InstanceType<Controller>[K] extends (ctx: HttpContext, ...args: any[]) => any ? K : never;
|
|
13
14
|
}[keyof InstanceType<Controller>];
|
|
14
|
-
/**
|
|
15
|
-
* Route token stored by matchit library
|
|
16
|
-
*/
|
|
17
|
-
export type MatchItRouteToken = RouteMatcher & {
|
|
18
|
-
old: string;
|
|
19
|
-
type: 0 | 1 | 2 | 3;
|
|
20
|
-
val: string;
|
|
21
|
-
end: string;
|
|
22
|
-
};
|
|
23
15
|
/**
|
|
24
16
|
* Route handler defined as a function
|
|
25
17
|
*/
|
|
@@ -38,36 +30,6 @@ export type StoreRouteMiddleware = MiddlewareFn | ({
|
|
|
38
30
|
name?: string;
|
|
39
31
|
args?: any[];
|
|
40
32
|
} & ParsedGlobalMiddleware);
|
|
41
|
-
/**
|
|
42
|
-
* Route node persisted within the routes store
|
|
43
|
-
*/
|
|
44
|
-
export type StoreRouteNode = {
|
|
45
|
-
/**
|
|
46
|
-
* The execute function to execute the route middleware
|
|
47
|
-
* and the handler
|
|
48
|
-
*/
|
|
49
|
-
execute: (route: StoreRouteNode, resolver: ContainerResolver<any>, ctx: HttpContext, errorResponder: ServerErrorHandler['handle']) => any;
|
|
50
|
-
/**
|
|
51
|
-
* A unique name for the route
|
|
52
|
-
*/
|
|
53
|
-
name?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Route URI pattern
|
|
56
|
-
*/
|
|
57
|
-
pattern: string;
|
|
58
|
-
/**
|
|
59
|
-
* Route handler
|
|
60
|
-
*/
|
|
61
|
-
handler: StoreRouteHandler;
|
|
62
|
-
/**
|
|
63
|
-
* Route middleware
|
|
64
|
-
*/
|
|
65
|
-
middleware: Middleware<StoreRouteMiddleware>;
|
|
66
|
-
/**
|
|
67
|
-
* Additional metadata associated with the route
|
|
68
|
-
*/
|
|
69
|
-
meta: Record<string, any>;
|
|
70
|
-
};
|
|
71
33
|
/**
|
|
72
34
|
* An object of routes for a given HTTP method
|
|
73
35
|
*/
|
|
@@ -77,7 +39,7 @@ export type StoreMethodNode = {
|
|
|
77
39
|
[pattern: string]: string;
|
|
78
40
|
};
|
|
79
41
|
routes: {
|
|
80
|
-
[pattern: string]:
|
|
42
|
+
[pattern: string]: RouteJSON;
|
|
81
43
|
};
|
|
82
44
|
};
|
|
83
45
|
/**
|
|
@@ -100,7 +62,7 @@ export type StoreRoutesTree = {
|
|
|
100
62
|
* Shape of the matched route for a pattern, method and domain.
|
|
101
63
|
*/
|
|
102
64
|
export type MatchedRoute = {
|
|
103
|
-
route:
|
|
65
|
+
route: RouteJSON;
|
|
104
66
|
/**
|
|
105
67
|
* A unique key for the looked up route
|
|
106
68
|
*/
|
|
@@ -114,13 +76,6 @@ export type MatchedRoute = {
|
|
|
114
76
|
*/
|
|
115
77
|
subdomains: Record<string, any>;
|
|
116
78
|
};
|
|
117
|
-
/**
|
|
118
|
-
* Shape of a route param matcher
|
|
119
|
-
*/
|
|
120
|
-
export type RouteMatcher = {
|
|
121
|
-
match?: RegExp;
|
|
122
|
-
cast?: (value: string) => any;
|
|
123
|
-
};
|
|
124
79
|
/**
|
|
125
80
|
* A collection of route matchers
|
|
126
81
|
*/
|
|
@@ -130,7 +85,36 @@ export type RouteMatchers = {
|
|
|
130
85
|
/**
|
|
131
86
|
* Representation of a route as JSON
|
|
132
87
|
*/
|
|
133
|
-
export type RouteJSON =
|
|
88
|
+
export type RouteJSON = {
|
|
89
|
+
/**
|
|
90
|
+
* The execute function to execute the route middleware
|
|
91
|
+
* and the handler
|
|
92
|
+
*/
|
|
93
|
+
execute: (route: RouteJSON, resolver: ContainerResolver<any>, ctx: HttpContext, errorResponder: ServerErrorHandler['handle']) => any;
|
|
94
|
+
/**
|
|
95
|
+
* A unique name for the route
|
|
96
|
+
*/
|
|
97
|
+
name?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Route URI pattern
|
|
100
|
+
*/
|
|
101
|
+
pattern: string;
|
|
102
|
+
/**
|
|
103
|
+
* Route handler
|
|
104
|
+
*/
|
|
105
|
+
handler: StoreRouteHandler;
|
|
106
|
+
/**
|
|
107
|
+
* Route middleware
|
|
108
|
+
*/
|
|
109
|
+
middleware: Middleware<StoreRouteMiddleware>;
|
|
110
|
+
/**
|
|
111
|
+
* Additional metadata associated with the route
|
|
112
|
+
*/
|
|
113
|
+
meta: Record<string, any>;
|
|
114
|
+
/**
|
|
115
|
+
* Tokens to be used to construct the route URL
|
|
116
|
+
*/
|
|
117
|
+
tokens: MatchItRouteToken[];
|
|
134
118
|
/**
|
|
135
119
|
* HTTP methods, the route responds to.
|
|
136
120
|
*/
|
|
@@ -150,6 +134,7 @@ export type RouteJSON = StoreRouteNode & {
|
|
|
150
134
|
export type ResourceActionNames = 'create' | 'index' | 'store' | 'show' | 'edit' | 'update' | 'destroy';
|
|
151
135
|
/**
|
|
152
136
|
* Options accepted by makeUrl method
|
|
137
|
+
* @deprecated
|
|
153
138
|
*/
|
|
154
139
|
export type MakeUrlOptions = {
|
|
155
140
|
qs?: Record<string, any>;
|
|
@@ -159,8 +144,22 @@ export type MakeUrlOptions = {
|
|
|
159
144
|
};
|
|
160
145
|
/**
|
|
161
146
|
* Options accepted by makeSignedUrl method
|
|
147
|
+
* @deprecated
|
|
162
148
|
*/
|
|
163
149
|
export type MakeSignedUrlOptions = MakeUrlOptions & {
|
|
164
150
|
expiresIn?: string | number;
|
|
165
151
|
purpose?: string;
|
|
166
152
|
};
|
|
153
|
+
/**
|
|
154
|
+
* To be generated by the router and used by the URL builder
|
|
155
|
+
* and the LookupStore
|
|
156
|
+
*/
|
|
157
|
+
export interface RoutesList {
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Helper to get routes for a given method from the RoutesList. The
|
|
161
|
+
* RoutesList is extended in the userland code.
|
|
162
|
+
*/
|
|
163
|
+
export type GetRoutesForMethod<Method> = {
|
|
164
|
+
[K in keyof RoutesList]: Method extends K ? RoutesList[Method] : never;
|
|
165
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Constructor } from '@poppinss/utils/types';
|
|
1
2
|
import type { ErrorHandler, FinalHandler } from '@poppinss/middleware/types';
|
|
2
|
-
import type { Constructor } from './base.js';
|
|
3
3
|
import type { QSParserConfig } from './qs.js';
|
|
4
4
|
import type { RequestConfig } from './request.js';
|
|
5
5
|
import type { ResponseConfig } from './response.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RouteJSON } from './route.js';
|
|
2
|
+
import type { HttpContext } from '../http_context/main.js';
|
|
3
|
+
import type { MiddlewareFn, ParsedGlobalMiddleware, ParsedNamedMiddleware } from './middleware.js';
|
|
4
|
+
export type HTTPRequestTracingData = HttpContext;
|
|
5
|
+
export type MiddlewareTracingData = ParsedGlobalMiddleware | ParsedNamedMiddleware | MiddlewareFn;
|
|
6
|
+
export type RouteHandlerTracingData = RouteJSON;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Route } from './router/route.js';
|
|
2
|
+
import { RouteGroup } from './router/group.js';
|
|
3
|
+
import { BriskRoute } from './router/brisk.js';
|
|
4
|
+
import type { RouteJSON } from './types/route.js';
|
|
5
|
+
import { RouteResource } from './router/resource.js';
|
|
6
|
+
/**
|
|
7
|
+
* Makes input string consistent by having only the starting
|
|
8
|
+
* slash
|
|
9
|
+
*/
|
|
10
|
+
export declare function dropSlash(input: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Returns a flat list of routes from the route groups and resources
|
|
13
|
+
*/
|
|
14
|
+
export declare function toRoutesJSON(routes: (RouteGroup | Route | RouteResource | BriskRoute)[]): RouteJSON[];
|
|
15
|
+
/**
|
|
16
|
+
* Helper to know if the remote address should
|
|
17
|
+
* be trusted.
|
|
18
|
+
*/
|
|
19
|
+
export declare function trustProxy(remoteAddress: string, proxyFn: (addr: string, distance: number) => boolean): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Parses a range expression to an object filled with the range
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseRange<T>(range: string, value: T): Record<number, T>;
|
|
24
|
+
export declare function safeDecodeURI(path: string, useSemicolonDelimiter: boolean): {
|
|
25
|
+
pathname: string;
|
|
26
|
+
query: string;
|
|
27
|
+
shouldDecodeParam: boolean;
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/http-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-next.0",
|
|
4
4
|
"description": "AdonisJS HTTP server with support packed with Routing and Cookies",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./build/index.js",
|
|
14
|
+
"./helpers": "./build/src/helpers.js",
|
|
14
15
|
"./types": "./build/src/types/main.js",
|
|
16
|
+
"./client": {
|
|
17
|
+
"import": "./build/client.js",
|
|
18
|
+
"require": "./build/client.cjs"
|
|
19
|
+
},
|
|
15
20
|
"./factories": "./build/factories/main.js"
|
|
16
21
|
},
|
|
17
22
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
23
|
+
"node": ">=24.0.0"
|
|
19
24
|
},
|
|
20
25
|
"scripts": {
|
|
21
26
|
"pretest": "npm run lint",
|
|
@@ -23,7 +28,8 @@
|
|
|
23
28
|
"typecheck": "tsc --noEmit",
|
|
24
29
|
"precompile": "npm run lint",
|
|
25
30
|
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
|
|
26
|
-
"
|
|
31
|
+
"compile:client": "tsup-node --config=bin/build_client.ts",
|
|
32
|
+
"build": "npm run compile && npm run compile:client",
|
|
27
33
|
"prebenchmark": "npm run build",
|
|
28
34
|
"benchmark": "node benchmarks/index.js",
|
|
29
35
|
"release": "release-it",
|
|
@@ -31,8 +37,7 @@
|
|
|
31
37
|
"format": "prettier --write .",
|
|
32
38
|
"prepublishOnly": "npm run build",
|
|
33
39
|
"lint": "eslint",
|
|
34
|
-
"quick:test": "node --import
|
|
35
|
-
"citgm": "cross-env FORCE_COLOR=0 node --loader=ts-node/esm bin/test.ts"
|
|
40
|
+
"quick:test": "node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts"
|
|
36
41
|
},
|
|
37
42
|
"keywords": [
|
|
38
43
|
"http",
|
|
@@ -41,62 +46,62 @@
|
|
|
41
46
|
"author": "virk,adonisjs",
|
|
42
47
|
"license": "MIT",
|
|
43
48
|
"devDependencies": {
|
|
44
|
-
"@adonisjs/application": "^
|
|
45
|
-
"@adonisjs/
|
|
46
|
-
"@adonisjs/
|
|
47
|
-
"@adonisjs/
|
|
48
|
-
"@adonisjs/
|
|
49
|
-
"@adonisjs/
|
|
50
|
-
"@adonisjs/
|
|
51
|
-
"@adonisjs/
|
|
52
|
-
"@adonisjs/tsconfig": "^1.4.0",
|
|
49
|
+
"@adonisjs/application": "^9.0.0-next.2",
|
|
50
|
+
"@adonisjs/encryption": "^7.0.0-next.0",
|
|
51
|
+
"@adonisjs/eslint-config": "^3.0.0-next.0",
|
|
52
|
+
"@adonisjs/events": "^10.1.0-next.1",
|
|
53
|
+
"@adonisjs/fold": "^11.0.0-next.0",
|
|
54
|
+
"@adonisjs/logger": "^7.0.0-next.1",
|
|
55
|
+
"@adonisjs/prettier-config": "^1.4.5",
|
|
56
|
+
"@adonisjs/tsconfig": "^2.0.0-next.0",
|
|
53
57
|
"@fastify/middie": "^9.0.3",
|
|
54
|
-
"@japa/assert": "^4.
|
|
58
|
+
"@japa/assert": "^4.1.1",
|
|
55
59
|
"@japa/expect-type": "^2.0.3",
|
|
56
|
-
"@japa/
|
|
60
|
+
"@japa/file-system": "^2.3.2",
|
|
61
|
+
"@japa/runner": "^4.3.0",
|
|
62
|
+
"@japa/snapshot": "^2.0.9",
|
|
63
|
+
"@poppinss/ts-exec": "^1.4.0",
|
|
57
64
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
58
|
-
"@swc/core": "1.10.7",
|
|
59
65
|
"@types/accepts": "^1.3.7",
|
|
60
|
-
"@types/content-disposition": "^0.5.
|
|
66
|
+
"@types/content-disposition": "^0.5.9",
|
|
61
67
|
"@types/destroy": "^1.0.3",
|
|
62
|
-
"@types/encodeurl": "^1.0.
|
|
63
|
-
"@types/etag": "^1.8.
|
|
64
|
-
"@types/fresh": "^0.5.
|
|
68
|
+
"@types/encodeurl": "^1.0.3",
|
|
69
|
+
"@types/etag": "^1.8.4",
|
|
70
|
+
"@types/fresh": "^0.5.3",
|
|
65
71
|
"@types/fs-extra": "^11.0.4",
|
|
66
|
-
"@types/mime-types": "^
|
|
67
|
-
"@types/node": "^
|
|
68
|
-
"@types/on-finished": "^2.3.
|
|
72
|
+
"@types/mime-types": "^3.0.1",
|
|
73
|
+
"@types/node": "^24.1.0",
|
|
74
|
+
"@types/on-finished": "^2.3.5",
|
|
69
75
|
"@types/pem": "^1.14.4",
|
|
70
76
|
"@types/proxy-addr": "^2.0.3",
|
|
71
|
-
"@types/qs": "^6.
|
|
77
|
+
"@types/qs": "^6.14.0",
|
|
72
78
|
"@types/supertest": "^6.0.3",
|
|
73
79
|
"@types/type-is": "^1.6.7",
|
|
74
80
|
"@types/vary": "^1.1.3",
|
|
75
81
|
"@vinejs/vine": "^3.0.1",
|
|
76
82
|
"autocannon": "^8.0.0",
|
|
77
83
|
"c8": "^10.1.3",
|
|
78
|
-
"cross-env": "^
|
|
79
|
-
"eslint": "^9.
|
|
80
|
-
"fastify": "^5.
|
|
84
|
+
"cross-env": "^10.0.0",
|
|
85
|
+
"eslint": "^9.32.0",
|
|
86
|
+
"fastify": "^5.4.0",
|
|
81
87
|
"fs-extra": "^11.3.0",
|
|
82
88
|
"get-port": "^7.1.0",
|
|
83
89
|
"http-status-codes": "^2.3.0",
|
|
84
90
|
"pem": "^1.14.8",
|
|
85
|
-
"prettier": "^3.
|
|
91
|
+
"prettier": "^3.6.2",
|
|
86
92
|
"reflect-metadata": "^0.2.2",
|
|
87
|
-
"release-it": "^19.0.
|
|
88
|
-
"supertest": "^7.1.
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
93
|
+
"release-it": "^19.0.4",
|
|
94
|
+
"supertest": "^7.1.4",
|
|
95
|
+
"tsup": "^8.5.0",
|
|
96
|
+
"typescript": "^5.8.3",
|
|
97
|
+
"youch": "^4.1.0-beta.11"
|
|
92
98
|
},
|
|
93
99
|
"dependencies": {
|
|
94
|
-
"@
|
|
95
|
-
"@poppinss/
|
|
96
|
-
"@poppinss/
|
|
97
|
-
"@poppinss/
|
|
98
|
-
"@
|
|
99
|
-
"@sindresorhus/is": "^7.0.1",
|
|
100
|
+
"@poppinss/macroable": "^1.0.5",
|
|
101
|
+
"@poppinss/matchit": "^3.2.0",
|
|
102
|
+
"@poppinss/middleware": "^3.2.6",
|
|
103
|
+
"@poppinss/utils": "^7.0.0-next.3",
|
|
104
|
+
"@sindresorhus/is": "^7.0.2",
|
|
100
105
|
"accepts": "^1.3.8",
|
|
101
106
|
"content-disposition": "^0.5.4",
|
|
102
107
|
"cookie": "^1.0.2",
|
|
@@ -110,15 +115,20 @@
|
|
|
110
115
|
"qs": "^6.14.0",
|
|
111
116
|
"tmp-cache": "^1.1.0",
|
|
112
117
|
"type-is": "^2.0.1",
|
|
113
|
-
"vary": "^1.1.2"
|
|
114
|
-
"youch": "^3.3.4"
|
|
118
|
+
"vary": "^1.1.2"
|
|
115
119
|
},
|
|
116
120
|
"peerDependencies": {
|
|
117
|
-
"@adonisjs/application": "^
|
|
118
|
-
"@adonisjs/encryption": "^
|
|
119
|
-
"@adonisjs/events": "^
|
|
120
|
-
"@adonisjs/fold": "^
|
|
121
|
-
"@adonisjs/logger": "^
|
|
121
|
+
"@adonisjs/application": "^9.0.0-next.2",
|
|
122
|
+
"@adonisjs/encryption": "^7.0.0-next.0",
|
|
123
|
+
"@adonisjs/events": "^10.1.0-next.1",
|
|
124
|
+
"@adonisjs/fold": "^11.0.0-next.0",
|
|
125
|
+
"@adonisjs/logger": "^7.0.0-next.1",
|
|
126
|
+
"youch": "^4.1.0-beta.11"
|
|
127
|
+
},
|
|
128
|
+
"peerDependenciesMeta": {
|
|
129
|
+
"youch": {
|
|
130
|
+
"optional": true
|
|
131
|
+
}
|
|
122
132
|
},
|
|
123
133
|
"repository": {
|
|
124
134
|
"type": "git",
|
|
@@ -163,6 +173,7 @@
|
|
|
163
173
|
],
|
|
164
174
|
"exclude": [
|
|
165
175
|
"tests/**",
|
|
176
|
+
"bin/**",
|
|
166
177
|
"factories/**",
|
|
167
178
|
".yalc/**"
|
|
168
179
|
]
|
|
@@ -171,6 +182,7 @@
|
|
|
171
182
|
"tsup": {
|
|
172
183
|
"entry": [
|
|
173
184
|
"./index.ts",
|
|
185
|
+
"./src/helpers.ts",
|
|
174
186
|
"./src/types/main.ts",
|
|
175
187
|
"./factories/main.ts"
|
|
176
188
|
],
|
|
@@ -178,7 +190,7 @@
|
|
|
178
190
|
"clean": true,
|
|
179
191
|
"format": "esm",
|
|
180
192
|
"dts": false,
|
|
181
|
-
"sourcemap":
|
|
193
|
+
"sourcemap": false,
|
|
182
194
|
"target": "esnext"
|
|
183
195
|
}
|
|
184
196
|
}
|