@adonisjs/http-server 7.2.3 → 7.2.4
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-UQEGDK7Z.js → chunk-Q2EOMKJE.js} +1 -1
- package/build/factories/http_server.d.ts +0 -1
- package/build/factories/main.js +1 -1
- package/build/factories/request.d.ts +0 -1
- package/build/factories/response.d.ts +0 -1
- package/build/index.js +1 -1
- package/build/src/debug.d.ts +0 -1
- package/build/src/define_middleware.d.ts +1 -1
- package/build/src/exceptions.d.ts +30 -31
- package/build/src/http_context/local_storage.d.ts +0 -1
- package/build/src/redirect.d.ts +0 -1
- package/build/src/request.d.ts +0 -2
- package/build/src/response.d.ts +0 -3
- package/build/src/router/main.d.ts +2 -2
- package/build/src/server/main.d.ts +0 -2
- package/build/src/types/response.d.ts +0 -1
- package/package.json +2 -2
- /package/build/{chunk-UQEGDK7Z.js.map → chunk-Q2EOMKJE.js.map} +0 -0
package/build/factories/main.js
CHANGED
package/build/index.js
CHANGED
package/build/src/debug.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { GetMiddlewareArgs, MiddlewareAsClass, ParsedGlobalMiddleware } fro
|
|
|
8
8
|
export declare function defineNamedMiddleware<NamedMiddleware extends Record<string | number | symbol, LazyImport<MiddlewareAsClass>>>(collection: NamedMiddleware): { [K in keyof NamedMiddleware]: <Args extends GetMiddlewareArgs<UnWrapLazyImport<NamedMiddleware[K]>>>(...args: Args) => {
|
|
9
9
|
name: K;
|
|
10
10
|
args: Args[0];
|
|
11
|
-
handle: ParsedGlobalMiddleware[
|
|
11
|
+
handle: ParsedGlobalMiddleware["handle"];
|
|
12
12
|
}; };
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
import { Exception } from '@poppinss/utils';
|
|
3
2
|
import type { HttpContext } from './http_context/main.js';
|
|
4
|
-
export declare const E_ROUTE_NOT_FOUND: new (args: [method: string, url: string], options?: ErrorOptions
|
|
5
|
-
export declare const E_CANNOT_LOOKUP_ROUTE: new (args: [routeIdentifier: string], options?: ErrorOptions
|
|
3
|
+
export declare const E_ROUTE_NOT_FOUND: new (args: [method: string, url: string], options?: ErrorOptions) => Exception;
|
|
4
|
+
export declare const E_CANNOT_LOOKUP_ROUTE: new (args: [routeIdentifier: string], options?: ErrorOptions) => Exception;
|
|
6
5
|
export declare const E_HTTP_EXCEPTION: {
|
|
7
|
-
new (message?: string
|
|
8
|
-
code?: string
|
|
9
|
-
status?: number
|
|
10
|
-
})
|
|
6
|
+
new (message?: string, options?: ErrorOptions & {
|
|
7
|
+
code?: string;
|
|
8
|
+
status?: number;
|
|
9
|
+
}): {
|
|
11
10
|
body: any;
|
|
12
11
|
name: string;
|
|
13
|
-
help?: string
|
|
14
|
-
code?: string
|
|
12
|
+
help?: string;
|
|
13
|
+
code?: string;
|
|
15
14
|
status: number;
|
|
16
15
|
toString(): string;
|
|
17
16
|
readonly [Symbol.toStringTag]: string;
|
|
18
17
|
message: string;
|
|
19
|
-
stack?: string
|
|
18
|
+
stack?: string;
|
|
20
19
|
cause?: unknown;
|
|
21
20
|
};
|
|
22
21
|
code: string;
|
|
@@ -26,37 +25,37 @@ export declare const E_HTTP_EXCEPTION: {
|
|
|
26
25
|
invoke(body: any, status: number, code?: string): {
|
|
27
26
|
body: any;
|
|
28
27
|
name: string;
|
|
29
|
-
help?: string
|
|
30
|
-
code?: string
|
|
28
|
+
help?: string;
|
|
29
|
+
code?: string;
|
|
31
30
|
status: number;
|
|
32
31
|
toString(): string;
|
|
33
32
|
readonly [Symbol.toStringTag]: string;
|
|
34
33
|
message: string;
|
|
35
|
-
stack?: string
|
|
34
|
+
stack?: string;
|
|
36
35
|
cause?: unknown;
|
|
37
36
|
};
|
|
38
|
-
help?: string
|
|
39
|
-
status?: number
|
|
40
|
-
message?: string
|
|
41
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function
|
|
37
|
+
help?: string;
|
|
38
|
+
status?: number;
|
|
39
|
+
message?: string;
|
|
40
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
42
41
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
43
42
|
stackTraceLimit: number;
|
|
44
43
|
};
|
|
45
44
|
export declare const E_HTTP_REQUEST_ABORTED: {
|
|
46
|
-
new (message?: string
|
|
47
|
-
code?: string
|
|
48
|
-
status?: number
|
|
49
|
-
})
|
|
45
|
+
new (message?: string, options?: ErrorOptions & {
|
|
46
|
+
code?: string;
|
|
47
|
+
status?: number;
|
|
48
|
+
}): {
|
|
50
49
|
handle(error: any, ctx: HttpContext): void;
|
|
51
50
|
body: any;
|
|
52
51
|
name: string;
|
|
53
|
-
help?: string
|
|
54
|
-
code?: string
|
|
52
|
+
help?: string;
|
|
53
|
+
code?: string;
|
|
55
54
|
status: number;
|
|
56
55
|
toString(): string;
|
|
57
56
|
readonly [Symbol.toStringTag]: string;
|
|
58
57
|
message: string;
|
|
59
|
-
stack?: string
|
|
58
|
+
stack?: string;
|
|
60
59
|
cause?: unknown;
|
|
61
60
|
};
|
|
62
61
|
code: string;
|
|
@@ -66,19 +65,19 @@ export declare const E_HTTP_REQUEST_ABORTED: {
|
|
|
66
65
|
invoke(body: any, status: number, code?: string): {
|
|
67
66
|
body: any;
|
|
68
67
|
name: string;
|
|
69
|
-
help?: string
|
|
70
|
-
code?: string
|
|
68
|
+
help?: string;
|
|
69
|
+
code?: string;
|
|
71
70
|
status: number;
|
|
72
71
|
toString(): string;
|
|
73
72
|
readonly [Symbol.toStringTag]: string;
|
|
74
73
|
message: string;
|
|
75
|
-
stack?: string
|
|
74
|
+
stack?: string;
|
|
76
75
|
cause?: unknown;
|
|
77
76
|
};
|
|
78
|
-
help?: string
|
|
79
|
-
status?: number
|
|
80
|
-
message?: string
|
|
81
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function
|
|
77
|
+
help?: string;
|
|
78
|
+
status?: number;
|
|
79
|
+
message?: string;
|
|
80
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
82
81
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
83
82
|
stackTraceLimit: number;
|
|
84
83
|
};
|
package/build/src/redirect.d.ts
CHANGED
package/build/src/request.d.ts
CHANGED
package/build/src/response.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
4
1
|
import Macroable from '@poppinss/macroable';
|
|
5
2
|
import type { Encryption } from '@adonisjs/encryption';
|
|
6
3
|
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
@@ -8,7 +8,7 @@ import { RouteResource } from './resource.js';
|
|
|
8
8
|
import { LookupStore } from './lookup_store/main.js';
|
|
9
9
|
import { RouteMatchers as Matchers } from './matchers.js';
|
|
10
10
|
import type { Constructor, LazyImport } from '../types/base.js';
|
|
11
|
-
import type { MiddlewareAsClass } from '../types/middleware.js';
|
|
11
|
+
import type { MiddlewareAsClass, ParsedGlobalMiddleware } from '../types/middleware.js';
|
|
12
12
|
import type { RouteFn, MatchedRoute, RouteMatcher, RouteMatchers, MakeUrlOptions, MakeSignedUrlOptions, GetControllerHandlers } from '../types/route.js';
|
|
13
13
|
/**
|
|
14
14
|
* Router class exposes a unified API to register new routes, group them or
|
|
@@ -57,7 +57,7 @@ export declare class Router extends LookupStore {
|
|
|
57
57
|
named<NamedMiddleware extends Record<string, LazyImport<MiddlewareAsClass>>>(collection: NamedMiddleware): { [K in keyof NamedMiddleware]: <Args extends import("../types/middleware.js").GetMiddlewareArgs<import("../types/base.js").UnWrapLazyImport<NamedMiddleware[K]>>>(...args: Args) => {
|
|
58
58
|
name: K;
|
|
59
59
|
args: Args[0];
|
|
60
|
-
handle:
|
|
60
|
+
handle: ParsedGlobalMiddleware["handle"];
|
|
61
61
|
}; };
|
|
62
62
|
/**
|
|
63
63
|
* Add route for a given pattern and methods
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
import type { Logger } from '@adonisjs/logger';
|
|
4
2
|
import type { Encryption } from '@adonisjs/encryption';
|
|
5
3
|
import type { Server as HttpsServer } from 'node:https';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/http-server",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4",
|
|
4
4
|
"description": "AdonisJS HTTP server with support packed with Routing and Cookies",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@sindresorhus/is": "^6.3.1",
|
|
107
107
|
"accepts": "^1.3.8",
|
|
108
108
|
"content-disposition": "^0.5.4",
|
|
109
|
-
"cookie": "^0.
|
|
109
|
+
"cookie": "^0.7.2",
|
|
110
110
|
"destroy": "^1.2.0",
|
|
111
111
|
"encodeurl": "^2.0.0",
|
|
112
112
|
"etag": "^1.8.1",
|
|
File without changes
|