@adonisjs/http-server 7.2.2 → 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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { IncomingMessage, Server, ServerResponse } from 'node:http';
3
2
  export declare const httpServer: {
4
3
  create(handler: (req: IncomingMessage, res: ServerResponse) => any | Promise<any>): Promise<{
@@ -6,7 +6,7 @@ import {
6
6
  Router,
7
7
  Server,
8
8
  defineConfig
9
- } from "../chunk-MUS67JY5.js";
9
+ } from "../chunk-Q2EOMKJE.js";
10
10
 
11
11
  // factories/http_context.ts
12
12
  import { Container } from "@adonisjs/fold";
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Encryption } from '@adonisjs/encryption';
3
2
  import { IncomingMessage, ServerResponse } from 'node:http';
4
3
  import { Request } from '../src/request.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Encryption } from '@adonisjs/encryption';
3
2
  import { IncomingMessage, ServerResponse } from 'node:http';
4
3
  import { Response } from '../src/response.js';
package/build/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  defineConfig,
19
19
  exceptions_exports,
20
20
  parseRange
21
- } from "./chunk-MUS67JY5.js";
21
+ } from "./chunk-Q2EOMKJE.js";
22
22
 
23
23
  // src/exception_handler.ts
24
24
  import is from "@sindresorhus/is";
@@ -1,3 +1,2 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  declare const _default: import("util").DebugLogger;
3
2
  export default _default;
@@ -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['handle'];
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 | undefined) => Exception;
5
- export declare const E_CANNOT_LOOKUP_ROUTE: new (args: [routeIdentifier: string], options?: ErrorOptions | undefined) => Exception;
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 | undefined, options?: (ErrorOptions & {
8
- code?: string | undefined;
9
- status?: number | undefined;
10
- }) | undefined): {
6
+ new (message?: string, options?: ErrorOptions & {
7
+ code?: string;
8
+ status?: number;
9
+ }): {
11
10
  body: any;
12
11
  name: string;
13
- help?: string | undefined;
14
- code?: string | undefined;
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 | undefined;
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 | undefined;
30
- code?: string | undefined;
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 | undefined;
34
+ stack?: string;
36
35
  cause?: unknown;
37
36
  };
38
- help?: string | undefined;
39
- status?: number | undefined;
40
- message?: string | undefined;
41
- captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
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 | undefined, options?: (ErrorOptions & {
47
- code?: string | undefined;
48
- status?: number | undefined;
49
- }) | undefined): {
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 | undefined;
54
- code?: string | undefined;
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 | undefined;
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 | undefined;
70
- code?: string | undefined;
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 | undefined;
74
+ stack?: string;
76
75
  cause?: unknown;
77
76
  };
78
- help?: string | undefined;
79
- status?: number | undefined;
80
- message?: string | undefined;
81
- captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
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
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { AsyncLocalStorage } from 'node:async_hooks';
3
2
  import type { HttpContext } from './main.js';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { IncomingMessage } from 'node:http';
3
2
  import type { Qs } from './qs.js';
4
3
  import type { Response } from './response.js';
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
1
  import Macroable from '@poppinss/macroable';
4
2
  import { UrlWithStringQuery } from 'node:url';
5
3
  import type { Encryption } from '@adonisjs/encryption';
@@ -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: (resolver: import("@adonisjs/fold").ContainerResolver<any>, ctx: import("../http_context/main.js").HttpContext, next: import("@poppinss/middleware/types").NextFn, params?: any) => any;
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';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { Readable } from 'node:stream';
3
2
  /**
4
3
  * Cookie options can that can be set on the response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/http-server",
3
- "version": "7.2.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",
@@ -51,13 +51,13 @@
51
51
  "@adonisjs/logger": "^6.0.3",
52
52
  "@adonisjs/prettier-config": "^1.3.0",
53
53
  "@adonisjs/tsconfig": "^1.3.0",
54
- "@commitlint/cli": "^19.2.2",
54
+ "@commitlint/cli": "^19.3.0",
55
55
  "@commitlint/config-conventional": "^19.2.2",
56
- "@fastify/middie": "^8.3.0",
56
+ "@fastify/middie": "^8.3.1",
57
57
  "@japa/assert": "^3.0.0",
58
58
  "@japa/expect-type": "^2.0.2",
59
59
  "@japa/runner": "^3.1.4",
60
- "@swc/core": "^1.4.16",
60
+ "@swc/core": "^1.5.7",
61
61
  "@types/accepts": "^1.3.7",
62
62
  "@types/content-disposition": "^0.5.8",
63
63
  "@types/cookie": "^0.6.0",
@@ -68,7 +68,7 @@
68
68
  "@types/fs-extra": "^11.0.4",
69
69
  "@types/http-status-codes": "^1.2.0",
70
70
  "@types/mime-types": "^2.1.4",
71
- "@types/node": "^20.12.7",
71
+ "@types/node": "^20.12.12",
72
72
  "@types/on-finished": "^2.3.4",
73
73
  "@types/pem": "^1.14.4",
74
74
  "@types/proxy-addr": "^2.0.3",
@@ -82,7 +82,7 @@
82
82
  "cross-env": "^7.0.3",
83
83
  "del-cli": "^5.1.0",
84
84
  "eslint": "^8.57.0",
85
- "fastify": "^4.26.2",
85
+ "fastify": "^4.27.0",
86
86
  "fs-extra": "^11.2.0",
87
87
  "get-port": "^7.1.0",
88
88
  "github-label-sync": "^2.3.1",
@@ -91,8 +91,8 @@
91
91
  "pem": "^1.14.8",
92
92
  "prettier": "^3.2.5",
93
93
  "reflect-metadata": "^0.2.2",
94
- "release-it": "^17.2.0",
95
- "supertest": "^6.3.4",
94
+ "release-it": "^17.3.0",
95
+ "supertest": "^7.0.0",
96
96
  "ts-node": "^10.9.2",
97
97
  "tsup": "^8.0.2",
98
98
  "typescript": "^5.4.5"
@@ -103,10 +103,10 @@
103
103
  "@poppinss/matchit": "^3.1.2",
104
104
  "@poppinss/middleware": "^3.2.3",
105
105
  "@poppinss/utils": "^6.7.3",
106
- "@sindresorhus/is": "^6.2.0",
106
+ "@sindresorhus/is": "^6.3.1",
107
107
  "accepts": "^1.3.8",
108
108
  "content-disposition": "^0.5.4",
109
- "cookie": "^0.6.0",
109
+ "cookie": "^0.7.2",
110
110
  "destroy": "^1.2.0",
111
111
  "encodeurl": "^2.0.0",
112
112
  "etag": "^1.8.1",