@adonisjs/http-server 6.6.1-0 → 6.6.2-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/index.d.ts +4 -3
- package/build/index.js +4 -3
- package/build/src/http_context/main.d.ts +1 -1
- package/build/src/http_context/main.js +1 -1
- package/build/src/request.d.ts +15 -1
- package/build/src/request.js +6 -3
- package/build/src/response.d.ts +1 -1
- package/build/src/response.js +1 -1
- package/build/src/router/brisk.d.ts +1 -1
- package/build/src/router/brisk.js +1 -1
- package/build/src/router/group.d.ts +1 -1
- package/build/src/router/group.js +1 -1
- package/build/src/router/matchers.d.ts +1 -1
- package/build/src/router/matchers.js +1 -1
- package/build/src/router/resource.d.ts +1 -1
- package/build/src/router/resource.js +1 -1
- package/build/src/router/route.d.ts +1 -1
- package/build/src/router/route.js +1 -1
- package/package.json +4 -4
package/build/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export { Redirect } from './src/redirect.js';
|
|
|
4
4
|
export { Server } from './src/server/main.js';
|
|
5
5
|
export { Router } from './src/router/main.js';
|
|
6
6
|
export { Route } from './src/router/route.js';
|
|
7
|
+
export * as errors from './src/exceptions.js';
|
|
8
|
+
export { BriskRoute } from './src/router/brisk.js';
|
|
7
9
|
export { RouteGroup } from './src/router/group.js';
|
|
8
10
|
export { defineConfig } from './src/define_config.js';
|
|
9
|
-
export {
|
|
10
|
-
export { BriskRoute } from './src/router/brisk.js';
|
|
11
|
+
export { CookieClient } from './src/cookies/client.js';
|
|
11
12
|
export { HttpContext } from './src/http_context/main.js';
|
|
12
|
-
export
|
|
13
|
+
export { RouteResource } from './src/router/resource.js';
|
|
13
14
|
export { HttpExceptionHandler } from './src/exception_handler.js';
|
package/build/index.js
CHANGED
|
@@ -4,10 +4,11 @@ export { Redirect } from './src/redirect.js';
|
|
|
4
4
|
export { Server } from './src/server/main.js';
|
|
5
5
|
export { Router } from './src/router/main.js';
|
|
6
6
|
export { Route } from './src/router/route.js';
|
|
7
|
+
export * as errors from './src/exceptions.js';
|
|
8
|
+
export { BriskRoute } from './src/router/brisk.js';
|
|
7
9
|
export { RouteGroup } from './src/router/group.js';
|
|
8
10
|
export { defineConfig } from './src/define_config.js';
|
|
9
|
-
export {
|
|
10
|
-
export { BriskRoute } from './src/router/brisk.js';
|
|
11
|
+
export { CookieClient } from './src/cookies/client.js';
|
|
11
12
|
export { HttpContext } from './src/http_context/main.js';
|
|
12
|
-
export
|
|
13
|
+
export { RouteResource } from './src/router/resource.js';
|
|
13
14
|
export { HttpExceptionHandler } from './src/exception_handler.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import Macroable from '@poppinss/macroable';
|
|
1
2
|
import type { Logger } from '@adonisjs/logger';
|
|
2
|
-
import { Macroable } from '@poppinss/macroable';
|
|
3
3
|
import { ContainerResolver } from '@adonisjs/fold';
|
|
4
4
|
import type { Request } from '../request.js';
|
|
5
5
|
import type { Response } from '../response.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
import
|
|
2
|
+
import Macroable from '@poppinss/macroable';
|
|
3
3
|
import { RuntimeException } from '@poppinss/utils';
|
|
4
4
|
import { asyncLocalStorage } from './local_storage.js';
|
|
5
5
|
export class HttpContext extends Macroable {
|
package/build/src/request.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import
|
|
3
|
+
import Macroable from '@poppinss/macroable';
|
|
4
4
|
import { UrlWithStringQuery } from 'node:url';
|
|
5
5
|
import type { Encryption } from '@adonisjs/encryption';
|
|
6
6
|
import { ServerResponse, IncomingMessage, IncomingHttpHeaders } from 'node:http';
|
|
@@ -68,6 +68,20 @@ export declare class Request extends Macroable {
|
|
|
68
68
|
}): any;
|
|
69
69
|
plainCookie(key: string, defaultValue?: string, encoded?: boolean): any;
|
|
70
70
|
hasValidSignature(purpose?: string): boolean;
|
|
71
|
+
serialize(): {
|
|
72
|
+
id: string | undefined;
|
|
73
|
+
url: string;
|
|
74
|
+
query: string | null;
|
|
75
|
+
body: Record<string, any>;
|
|
76
|
+
params: Record<string, any>;
|
|
77
|
+
headers: IncomingHttpHeaders;
|
|
78
|
+
method: string;
|
|
79
|
+
protocol: string;
|
|
80
|
+
cookies: Record<string, any>;
|
|
81
|
+
hostname: string | null;
|
|
82
|
+
ip: string;
|
|
83
|
+
subdomains: Record<string, any>;
|
|
84
|
+
};
|
|
71
85
|
toJSON(): {
|
|
72
86
|
id: string | undefined;
|
|
73
87
|
url: string;
|
package/build/src/request.js
CHANGED
|
@@ -5,9 +5,9 @@ import accepts from 'accepts';
|
|
|
5
5
|
import { isIP } from 'node:net';
|
|
6
6
|
import is from '@sindresorhus/is';
|
|
7
7
|
import proxyaddr from 'proxy-addr';
|
|
8
|
-
import lodash from '@poppinss/utils/lodash';
|
|
9
8
|
import { safeEqual } from '@poppinss/utils';
|
|
10
|
-
import
|
|
9
|
+
import Macroable from '@poppinss/macroable';
|
|
10
|
+
import lodash from '@poppinss/utils/lodash';
|
|
11
11
|
import { parse } from 'node:url';
|
|
12
12
|
import { trustProxy } from './helpers.js';
|
|
13
13
|
import { CookieParser } from './cookies/parser.js';
|
|
@@ -301,7 +301,7 @@ export class Request extends Macroable {
|
|
|
301
301
|
? safeEqual(signedUrl, `${this.url()}?${queryString}`)
|
|
302
302
|
: safeEqual(signedUrl, this.url());
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
serialize() {
|
|
305
305
|
return {
|
|
306
306
|
id: this.id(),
|
|
307
307
|
url: this.url(),
|
|
@@ -317,4 +317,7 @@ export class Request extends Macroable {
|
|
|
317
317
|
subdomains: this.ctx?.subdomains || {},
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
+
toJSON() {
|
|
321
|
+
return this.serialize();
|
|
322
|
+
}
|
|
320
323
|
}
|
package/build/src/response.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import
|
|
3
|
+
import Macroable from '@poppinss/macroable';
|
|
4
4
|
import type { Encryption } from '@adonisjs/encryption';
|
|
5
5
|
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
6
6
|
import type { Qs } from './qs.js';
|
package/build/src/response.js
CHANGED
|
@@ -7,7 +7,7 @@ import { extname } from 'node:path';
|
|
|
7
7
|
import onFinished from 'on-finished';
|
|
8
8
|
import { promisify } from 'node:util';
|
|
9
9
|
import json from '@poppinss/utils/json';
|
|
10
|
-
import
|
|
10
|
+
import Macroable from '@poppinss/macroable';
|
|
11
11
|
import { createReadStream, stat } from 'node:fs';
|
|
12
12
|
import { RuntimeException } from '@poppinss/utils';
|
|
13
13
|
import contentDisposition from 'content-disposition';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Macroable from '@poppinss/macroable';
|
|
2
2
|
import type { RouteMatcher } from '../types/route.js';
|
|
3
3
|
import type { MiddlewareFn, ParsedNamedMiddleware } from '../types/middleware.js';
|
|
4
4
|
import { Route } from './route.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import string from '@poppinss/utils/string';
|
|
2
|
-
import
|
|
2
|
+
import Macroable from '@poppinss/macroable';
|
|
3
3
|
import { RuntimeException } from '@poppinss/utils';
|
|
4
4
|
import { Route } from './route.js';
|
|
5
5
|
export class RouteResource extends Macroable {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Macroable from '@poppinss/macroable';
|
|
2
2
|
import type { Application } from '@adonisjs/application';
|
|
3
3
|
import type { Constructor, LazyImport, OneOrMore } from '../types/base.js';
|
|
4
4
|
import type { MiddlewareFn, ParsedNamedMiddleware, ParsedGlobalMiddleware } from '../types/middleware.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import is from '@sindresorhus/is';
|
|
2
|
+
import Macroable from '@poppinss/macroable';
|
|
2
3
|
import Middleware from '@poppinss/middleware';
|
|
3
|
-
import { Macroable } from '@poppinss/macroable';
|
|
4
4
|
import { RuntimeException } from '@poppinss/utils';
|
|
5
5
|
import { moduleCaller, moduleExpression, moduleImporter } from '@adonisjs/fold';
|
|
6
6
|
import { execute } from './executor.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/http-server",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.2-0",
|
|
4
4
|
"description": "AdonisJS HTTP server with support packed with Routing and Cookies",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@japa/run-failed-tests": "^1.1.0",
|
|
55
55
|
"@japa/runner": "^2.2.2",
|
|
56
56
|
"@japa/spec-reporter": "^1.3.2",
|
|
57
|
-
"@swc/core": "^1.3.
|
|
57
|
+
"@swc/core": "^1.3.30",
|
|
58
58
|
"@types/accepts": "^1.3.5",
|
|
59
59
|
"@types/content-disposition": "^0.5.5",
|
|
60
60
|
"@types/cookie": "^0.5.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"c8": "^7.12.0",
|
|
77
77
|
"cross-env": "^7.0.3",
|
|
78
78
|
"del-cli": "^5.0.0",
|
|
79
|
-
"eslint": "^8.
|
|
79
|
+
"eslint": "^8.33.0",
|
|
80
80
|
"eslint-config-prettier": "^8.6.0",
|
|
81
81
|
"eslint-plugin-adonis": "^3.0.3",
|
|
82
82
|
"eslint-plugin-prettier": "^4.2.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"typescript": "^4.9.4"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@poppinss/macroable": "^1.0.0-
|
|
97
|
+
"@poppinss/macroable": "^1.0.0-2",
|
|
98
98
|
"@poppinss/matchit": "^3.1.2",
|
|
99
99
|
"@poppinss/middleware": "^3.1.0",
|
|
100
100
|
"@poppinss/utils": "^6.5.0-0",
|