@adonisjs/http-server 6.8.2-1 → 6.8.2-10

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.
Files changed (103) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +3 -6
  3. package/build/factories/http_context.d.ts +10 -0
  4. package/build/factories/http_context.js +27 -0
  5. package/build/factories/http_server.d.ts +8 -0
  6. package/build/factories/http_server.js +26 -0
  7. package/build/factories/main.js +8 -0
  8. package/build/factories/qs_parser_factory.d.ts +10 -0
  9. package/build/factories/qs_parser_factory.js +18 -0
  10. package/build/factories/request.d.ts +10 -0
  11. package/build/factories/request.js +31 -0
  12. package/build/factories/response.d.ts +10 -0
  13. package/build/factories/response.js +34 -0
  14. package/build/factories/router.d.ts +10 -0
  15. package/build/factories/router.js +25 -0
  16. package/build/factories/server_factory.d.ts +10 -0
  17. package/build/factories/server_factory.js +34 -0
  18. package/build/index.js +8 -0
  19. package/build/src/cookies/client.d.ts +25 -0
  20. package/build/src/cookies/client.js +42 -0
  21. package/build/src/cookies/drivers/encrypted.d.ts +12 -0
  22. package/build/src/cookies/drivers/encrypted.js +20 -0
  23. package/build/src/cookies/drivers/plain.d.ts +12 -0
  24. package/build/src/cookies/drivers/plain.js +20 -0
  25. package/build/src/cookies/drivers/signed.d.ts +12 -0
  26. package/build/src/cookies/drivers/signed.js +20 -0
  27. package/build/src/cookies/parser.d.ts +28 -0
  28. package/build/src/cookies/parser.js +98 -0
  29. package/build/src/cookies/serializer.d.ts +22 -0
  30. package/build/src/cookies/serializer.js +40 -0
  31. package/build/src/debug.js +8 -0
  32. package/build/src/define_config.d.ts +3 -0
  33. package/build/src/define_config.js +11 -0
  34. package/build/src/define_middleware.d.ts +5 -0
  35. package/build/src/define_middleware.js +18 -0
  36. package/build/src/exception_handler.d.ts +93 -6
  37. package/build/src/exception_handler.js +203 -44
  38. package/build/src/exceptions.d.ts +6 -0
  39. package/build/src/exceptions.js +11 -0
  40. package/build/src/helpers.d.ts +14 -0
  41. package/build/src/helpers.js +43 -0
  42. package/build/src/http_context/local_storage.d.ts +3 -0
  43. package/build/src/http_context/local_storage.js +25 -0
  44. package/build/src/http_context/main.d.ts +36 -0
  45. package/build/src/http_context/main.js +54 -0
  46. package/build/src/qs.d.ts +4 -0
  47. package/build/src/qs.js +12 -0
  48. package/build/src/redirect.d.ts +24 -0
  49. package/build/src/redirect.js +60 -0
  50. package/build/src/request.d.ts +466 -0
  51. package/build/src/request.js +542 -0
  52. package/build/src/response.d.ts +425 -1
  53. package/build/src/response.js +611 -11
  54. package/build/src/router/brisk.d.ts +22 -0
  55. package/build/src/router/brisk.js +44 -2
  56. package/build/src/router/executor.d.ts +6 -1
  57. package/build/src/router/executor.js +14 -1
  58. package/build/src/router/factories/use_return_value.d.ts +4 -0
  59. package/build/src/router/factories/use_return_value.js +16 -3
  60. package/build/src/router/group.d.ts +47 -0
  61. package/build/src/router/group.js +88 -0
  62. package/build/src/router/lookup_store/main.d.ts +32 -0
  63. package/build/src/router/lookup_store/main.js +49 -0
  64. package/build/src/router/lookup_store/route_finder.d.ts +13 -0
  65. package/build/src/router/lookup_store/route_finder.js +21 -0
  66. package/build/src/router/lookup_store/url_builder.d.ts +36 -0
  67. package/build/src/router/lookup_store/url_builder.js +99 -2
  68. package/build/src/router/main.d.ts +92 -4
  69. package/build/src/router/main.js +146 -0
  70. package/build/src/router/matchers.d.ts +13 -0
  71. package/build/src/router/matchers.js +21 -0
  72. package/build/src/router/parser.d.ts +5 -0
  73. package/build/src/router/parser.js +17 -0
  74. package/build/src/router/resource.d.ts +30 -1
  75. package/build/src/router/resource.js +93 -1
  76. package/build/src/router/route.d.ts +65 -0
  77. package/build/src/router/route.js +151 -2
  78. package/build/src/router/store.d.ts +54 -0
  79. package/build/src/router/store.js +110 -2
  80. package/build/src/server/factories/final_handler.d.ts +7 -1
  81. package/build/src/server/factories/final_handler.js +15 -2
  82. package/build/src/server/factories/middleware_handler.d.ts +3 -0
  83. package/build/src/server/factories/middleware_handler.js +11 -0
  84. package/build/src/server/factories/write_response.d.ts +4 -0
  85. package/build/src/server/factories/write_response.js +12 -0
  86. package/build/src/server/main.d.ts +48 -0
  87. package/build/src/server/main.js +142 -5
  88. package/build/src/types/base.d.ts +12 -0
  89. package/build/src/types/base.js +8 -0
  90. package/build/src/types/main.js +8 -0
  91. package/build/src/types/middleware.d.ts +18 -0
  92. package/build/src/types/middleware.js +8 -0
  93. package/build/src/types/qs.d.ts +53 -0
  94. package/build/src/types/qs.js +8 -0
  95. package/build/src/types/request.d.ts +32 -0
  96. package/build/src/types/request.js +8 -0
  97. package/build/src/types/response.d.ts +27 -0
  98. package/build/src/types/response.js +8 -0
  99. package/build/src/types/route.d.ts +89 -1
  100. package/build/src/types/route.js +8 -0
  101. package/build/src/types/server.d.ts +36 -1
  102. package/build/src/types/server.js +8 -0
  103. package/package.json +52 -74
@@ -1,15 +1,68 @@
1
1
  export type QSParserConfig = {
2
2
  parse: {
3
+ /**
4
+ * Nesting depth till the parameters should be parsed.
5
+ *
6
+ * Defaults to 5
7
+ */
3
8
  depth: number;
9
+ /**
10
+ * Number of parameters to parse.
11
+ *
12
+ * Defaults to 1000
13
+ */
4
14
  parameterLimit: number;
15
+ /**
16
+ * Allow sparse elements in an array.
17
+ *
18
+ * Defaults to false
19
+ */
5
20
  allowSparse: boolean;
21
+ /**
22
+ * The max limimit for the array indices. After the given limit
23
+ * the array indices will be converted to an object, where the
24
+ * index is the key.
25
+ *
26
+ * Defaults to 20
27
+ */
6
28
  arrayLimit: number;
29
+ /**
30
+ * Join comma seperated query string values to an array
31
+ *
32
+ * Defaults to false
33
+ */
7
34
  comma: boolean;
8
35
  };
9
36
  stringify: {
37
+ /**
38
+ * URI encode the stringified query string
39
+ *
40
+ * Defaults to true
41
+ */
10
42
  encode: boolean;
43
+ /**
44
+ * URI encode but only the values and not the keys
45
+ *
46
+ * Defaults to false
47
+ */
11
48
  encodeValuesOnly: boolean;
49
+ /**
50
+ * Define the format in which arrays should be serialized.
51
+ *
52
+ * - indices: a[0]=b&a[1]=c
53
+ * - brackets: a[]=b&a[]=c
54
+ * - repeat: a=b&a=c
55
+ * - comma: a=b,c
56
+ *
57
+ * Defaults to "indices"
58
+ */
12
59
  arrayFormat: 'indices' | 'brackets' | 'repeat' | 'comma';
60
+ /**
61
+ * Whether or not to skip null values when serializing. When set to
62
+ * false, the null values will be treated as an empty string.
63
+ *
64
+ * Defaults to: false
65
+ */
13
66
  skipNulls: boolean;
14
67
  };
15
68
  };
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/http-server
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export {};
@@ -1,7 +1,39 @@
1
+ /**
2
+ * Shape of the request config
3
+ */
1
4
  export type RequestConfig = {
5
+ /**
6
+ * URL segments to ignore when extracting subdomains from a URL.
7
+ * Defaults to 2
8
+ */
2
9
  subdomainOffset: number;
10
+ /**
11
+ * Enabling the flag will generated a unique request id from every
12
+ * HTTP request.
13
+ *
14
+ * The request id can be accessed using the "request.id()" method. Also,
15
+ * the value of `x-request-id` header is used as the id (if it exists).
16
+ *
17
+ * Defaults to false
18
+ */
3
19
  generateRequestId: boolean;
20
+ /**
21
+ * Method spoofing allows changing the request method using the query string.
22
+ * For example: Making a POST request on URL /users/1?_method=PATCH will
23
+ * be handled by the patch route.
24
+ *
25
+ * Defaults to false
26
+ */
4
27
  allowMethodSpoofing: boolean;
28
+ /**
29
+ * A custom implementation to get the request ip address
30
+ */
5
31
  getIp?: (request: any) => string;
32
+ /**
33
+ * A callback function to trust proxy ip addresses. You must use
34
+ * the `proxy-addr` package to compute this value.
35
+ *
36
+ * Defaults to: "proxyAddr.compile('loopback')"
37
+ */
6
38
  trustProxy: (address: string, distance: number) => boolean;
7
39
  };
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/http-server
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export {};
@@ -1,5 +1,8 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
+ /**
4
+ * Cookie options can that can be set on the response
5
+ */
3
6
  export type CookieOptions = {
4
7
  domain: string;
5
8
  expires: Date | (() => Date);
@@ -9,10 +12,34 @@ export type CookieOptions = {
9
12
  sameSite: boolean | 'lax' | 'none' | 'strict';
10
13
  secure: boolean;
11
14
  };
15
+ /**
16
+ * Types from which response header can be casted to a
17
+ * string
18
+ */
12
19
  export type CastableHeader = string | number | boolean | string[] | number[] | boolean[];
20
+ /**
21
+ * Config accepted by response the class
22
+ */
13
23
  export type ResponseConfig = {
24
+ /**
25
+ * Whether or not to generate etags for responses. Etags can be
26
+ * enabled/disabled when sending response as well.
27
+ *
28
+ * Defaults to false
29
+ */
14
30
  etag: boolean;
31
+ /**
32
+ * The callback name for the JSONP response.
33
+ *
34
+ * Defaults to 'callback'
35
+ */
15
36
  jsonpCallbackName: string;
37
+ /**
38
+ * Options to set cookies
39
+ */
16
40
  cookie: Partial<CookieOptions>;
17
41
  };
42
+ /**
43
+ * Stream that can be piped to the "response.stream" method
44
+ */
18
45
  export type ResponseStream = NodeJS.ReadStream | NodeJS.ReadWriteStream | NodeJS.ReadableStream;
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/http-server
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export {};
@@ -3,32 +3,74 @@ import type { ContainerResolver } from '@adonisjs/fold';
3
3
  import type { Constructor, LazyImport } from './base.js';
4
4
  import type { HttpContext } from '../http_context/main.js';
5
5
  import type { MiddlewareFn, ParsedGlobalMiddleware } from './middleware.js';
6
+ import { ServerErrorHandler } from './server.js';
7
+ /**
8
+ * Returns a union of methods from a controller that accepts
9
+ * the context as the first argument.
10
+ */
6
11
  export type GetControllerHandlers<Controller extends Constructor<any>> = {
7
12
  [K in keyof InstanceType<Controller>]: InstanceType<Controller>[K] extends (ctx: HttpContext, ...args: any[]) => any ? K : never;
8
13
  }[keyof InstanceType<Controller>];
14
+ /**
15
+ * Route token stored by matchit library
16
+ */
9
17
  export type MatchItRouteToken = RouteMatcher & {
10
18
  old: string;
11
19
  type: 0 | 1 | 2 | 3;
12
20
  val: string;
13
21
  end: string;
14
22
  };
23
+ /**
24
+ * Route handler defined as a function
25
+ */
15
26
  export type RouteFn = (ctx: HttpContext) => any;
27
+ /**
28
+ * Route handler persisted with the route store
29
+ */
16
30
  export type StoreRouteHandler = RouteFn | {
17
31
  reference: string | [LazyImport<Constructor<any>> | Constructor<any>, any?];
18
32
  handle: (resolver: ContainerResolver<any>, ...args: [ctx: HttpContext, ...injections: any[]]) => any;
19
33
  };
34
+ /**
35
+ * The middleware persisted with the route store
36
+ */
20
37
  export type StoreRouteMiddleware = MiddlewareFn | ({
21
38
  name?: string;
22
39
  args?: any[];
23
40
  } & ParsedGlobalMiddleware);
41
+ /**
42
+ * Route node persisted within the routes store
43
+ */
24
44
  export type StoreRouteNode = {
25
- execute: (route: StoreRouteNode, resolver: ContainerResolver<any>, ctx: HttpContext) => any;
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
+ */
26
53
  name?: string;
54
+ /**
55
+ * Route URI pattern
56
+ */
27
57
  pattern: string;
58
+ /**
59
+ * Route handler
60
+ */
28
61
  handler: StoreRouteHandler;
62
+ /**
63
+ * Route middleware
64
+ */
29
65
  middleware: Middleware<StoreRouteMiddleware>;
66
+ /**
67
+ * Additional metadata associated with the route
68
+ */
30
69
  meta: Record<string, any>;
31
70
  };
71
+ /**
72
+ * An object of routes for a given HTTP method
73
+ */
32
74
  export type StoreMethodNode = {
33
75
  tokens: MatchItRouteToken[][];
34
76
  routeKeys: {
@@ -38,40 +80,86 @@ export type StoreMethodNode = {
38
80
  [pattern: string]: StoreRouteNode;
39
81
  };
40
82
  };
83
+ /**
84
+ * Each domain node container an object of methods. Each method
85
+ * object has nested routes.
86
+ */
41
87
  export type StoreDomainNode = {
42
88
  [method: string]: StoreMethodNode;
43
89
  };
90
+ /**
91
+ * Routes tree stored within the routes store
92
+ */
44
93
  export type StoreRoutesTree = {
45
94
  tokens: MatchItRouteToken[][];
46
95
  domains: {
47
96
  [domain: string]: StoreDomainNode;
48
97
  };
49
98
  };
99
+ /**
100
+ * Shape of the matched route for a pattern, method and domain.
101
+ */
50
102
  export type MatchedRoute = {
51
103
  route: StoreRouteNode;
104
+ /**
105
+ * A unique key for the looked up route
106
+ */
52
107
  routeKey: string;
108
+ /**
109
+ * Route params
110
+ */
53
111
  params: Record<string, any>;
112
+ /**
113
+ * Route subdomains (if part of a subdomain)
114
+ */
54
115
  subdomains: Record<string, any>;
55
116
  };
117
+ /**
118
+ * Shape of a route param matcher
119
+ */
56
120
  export type RouteMatcher = {
57
121
  match?: RegExp;
58
122
  cast?: (value: string) => any;
59
123
  };
124
+ /**
125
+ * A collection of route matchers
126
+ */
60
127
  export type RouteMatchers = {
61
128
  [param: string]: RouteMatcher;
62
129
  };
130
+ /**
131
+ * Representation of a route as JSON
132
+ */
63
133
  export type RouteJSON = StoreRouteNode & {
134
+ /**
135
+ * HTTP methods, the route responds to.
136
+ */
64
137
  methods: string[];
138
+ /**
139
+ * The domain for which the route is registered.
140
+ */
65
141
  domain: string;
142
+ /**
143
+ * Matchers for route params.
144
+ */
66
145
  matchers: RouteMatchers;
67
146
  };
147
+ /**
148
+ * Resource action names
149
+ */
68
150
  export type ResourceActionNames = 'create' | 'index' | 'store' | 'show' | 'edit' | 'update' | 'destroy';
151
+ /**
152
+ * Options accepted by makeUrl method
153
+ */
69
154
  export type MakeUrlOptions = {
70
155
  qs?: Record<string, any>;
71
156
  domain?: string;
72
157
  prefixUrl?: string;
73
158
  disableRouteLookup?: boolean;
74
159
  };
160
+ /**
161
+ * Options accepted by makeSignedUrl method
162
+ */
75
163
  export type MakeSignedUrlOptions = MakeUrlOptions & {
76
164
  expiresIn?: string | number;
77
165
  purpose?: string;
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/http-server
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export {};
@@ -4,6 +4,10 @@ import type { QSParserConfig } from './qs.js';
4
4
  import type { RequestConfig } from './request.js';
5
5
  import type { ResponseConfig } from './response.js';
6
6
  import type { HttpContext } from '../http_context/main.js';
7
+ /**
8
+ * Normalized HTTP error used by the exception
9
+ * handler.
10
+ */
7
11
  export type HttpError = {
8
12
  message: string;
9
13
  status: number;
@@ -15,23 +19,54 @@ export type HttpError = {
15
19
  handle?: (...args: any[]) => any;
16
20
  report?: (...args: any[]) => any;
17
21
  };
22
+ /**
23
+ * The pipeline for executing middleware during tests
24
+ */
18
25
  export interface TestingMiddlewarePipeline {
19
26
  finalHandler(handler: FinalHandler): this;
20
27
  errorHandler(handler: ErrorHandler): this;
21
28
  run(ctx: HttpContext): Promise<any>;
22
29
  }
23
- export type StatusPageRange = `${number}..${number}`;
30
+ /**
31
+ * The expression to define a status page range
32
+ */
33
+ export type StatusPageRange = `${number}..${number}` | `${number}` | number;
34
+ /**
35
+ * The callback function to render status page for a given
36
+ * error.
37
+ */
24
38
  export type StatusPageRenderer = (error: HttpError, ctx: HttpContext) => any | Promise<any>;
39
+ /**
40
+ * Data type for the "http:request_finished" event
41
+ */
25
42
  export type HttpRequestFinishedPayload = {
26
43
  ctx: HttpContext;
27
44
  duration: [number, number];
28
45
  };
46
+ /**
47
+ * Error handler to handle HTTP errors
48
+ */
29
49
  export type ServerErrorHandler = {
30
50
  report: (error: any, ctx: HttpContext) => any;
31
51
  handle: (error: any, ctx: HttpContext) => any;
32
52
  };
53
+ /**
54
+ * Error handler represented as a class
55
+ */
33
56
  export type ErrorHandlerAsAClass = Constructor<ServerErrorHandler>;
57
+ /**
58
+ * Config accepted by the HTTP server
59
+ */
34
60
  export type ServerConfig = RequestConfig & ResponseConfig & {
61
+ /**
62
+ * Whether or not to create an async local storage store for
63
+ * the HTTP context.
64
+ *
65
+ * Defaults to false
66
+ */
35
67
  useAsyncLocalStorage: boolean;
68
+ /**
69
+ * Config for query string parser
70
+ */
36
71
  qs: QSParserConfig;
37
72
  };
@@ -1 +1,9 @@
1
+ /*
2
+ * @adonisjs/http-server
3
+ *
4
+ * (c) AdonisJS
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
1
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/http-server",
3
- "version": "6.8.2-1",
3
+ "version": "6.8.2-10",
4
4
  "description": "AdonisJS HTTP server with support packed with Routing and Cookies",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -15,10 +15,14 @@
15
15
  "./types": "./build/src/types/main.js",
16
16
  "./factories": "./build/factories/main.js"
17
17
  },
18
+ "engines": {
19
+ "node": ">=18.16.0"
20
+ },
18
21
  "scripts": {
19
22
  "pretest": "npm run lint",
20
- "test": "cross-env NODE_DEBUG=adonisjs:http c8 npm run vscode:test",
23
+ "test": "cross-env NODE_DEBUG=adonisjs:http c8 npm run quick:test",
21
24
  "clean": "del-cli build",
25
+ "typecheck": "tsc --noEmit",
22
26
  "compile": "npm run lint && npm run clean && tsc",
23
27
  "build": "npm run compile",
24
28
  "prebenchmark": "npm run build",
@@ -30,7 +34,7 @@
30
34
  "lint": "eslint . --ext=.ts",
31
35
  "sync-labels": "github-label-sync --labels .github/labels.json adonisjs/http-server",
32
36
  "test:watch": "node --watch --loader=ts-node/esm --experimental-import-meta-resolve bin/test.ts",
33
- "vscode:test": "node --loader=ts-node/esm --experimental-import-meta-resolve bin/test.ts"
37
+ "quick:test": "node --loader=ts-node/esm --experimental-import-meta-resolve bin/test.ts"
34
38
  },
35
39
  "keywords": [
36
40
  "http",
@@ -39,20 +43,22 @@
39
43
  "author": "virk,adonisjs",
40
44
  "license": "MIT",
41
45
  "devDependencies": {
42
- "@adonisjs/application": "^7.1.2-0",
43
- "@adonisjs/encryption": "^5.1.2-0",
44
- "@adonisjs/events": "^8.4.9-0",
45
- "@adonisjs/fold": "^9.9.3-0",
46
- "@adonisjs/logger": "^5.4.2-0",
47
- "@commitlint/cli": "^17.4.4",
48
- "@commitlint/config-conventional": "^17.4.4",
49
- "@fastify/middie": "^8.1.0",
50
- "@japa/assert": "^1.4.1",
51
- "@japa/expect-type": "^1.0.3",
52
- "@japa/run-failed-tests": "^1.1.1",
53
- "@japa/runner": "^2.5.1",
54
- "@japa/spec-reporter": "^1.3.3",
55
- "@swc/core": "^1.3.39",
46
+ "@adonisjs/application": "^7.1.2-8",
47
+ "@adonisjs/encryption": "^5.1.2-2",
48
+ "@adonisjs/eslint-config": "^1.1.8",
49
+ "@adonisjs/events": "^8.4.9-3",
50
+ "@adonisjs/fold": "^9.9.3-6",
51
+ "@adonisjs/logger": "^5.4.2-3",
52
+ "@adonisjs/prettier-config": "^1.1.8",
53
+ "@adonisjs/tsconfig": "^1.1.8",
54
+ "@commitlint/cli": "^17.6.7",
55
+ "@commitlint/config-conventional": "^17.6.7",
56
+ "@fastify/middie": "^8.3.0",
57
+ "@japa/api-client": "^2.0.0-0",
58
+ "@japa/assert": "^2.0.0-1",
59
+ "@japa/expect-type": "^2.0.0-0",
60
+ "@japa/runner": "^3.0.0-5",
61
+ "@swc/core": "^1.3.70",
56
62
  "@types/accepts": "^1.3.5",
57
63
  "@types/content-disposition": "^0.5.5",
58
64
  "@types/cookie": "^0.5.1",
@@ -63,42 +69,41 @@
63
69
  "@types/fs-extra": "^11.0.1",
64
70
  "@types/http-status-codes": "^1.2.0",
65
71
  "@types/mime-types": "^2.1.1",
66
- "@types/node": "^18.15.0",
72
+ "@types/node": "^20.4.3",
67
73
  "@types/on-finished": "^2.3.1",
68
- "@types/pem": "^1.9.6",
74
+ "@types/pem": "^1.14.0",
69
75
  "@types/proxy-addr": "^2.0.0",
70
76
  "@types/qs": "^6.9.7",
71
77
  "@types/supertest": "^2.0.12",
72
78
  "@types/type-is": "^1.6.3",
73
79
  "@types/vary": "^1.1.0",
74
- "autocannon": "^7.10.0",
75
- "c8": "^7.13.0",
80
+ "@vinejs/vine": "^1.5.2",
81
+ "autocannon": "^7.11.0",
82
+ "c8": "^8.0.0",
76
83
  "cross-env": "^7.0.3",
77
84
  "del-cli": "^5.0.0",
78
- "eslint": "^8.36.0",
79
- "eslint-config-prettier": "^8.7.0",
80
- "eslint-plugin-adonis": "^3.0.3",
81
- "eslint-plugin-prettier": "^4.2.1",
82
- "fastify": "^4.14.1",
83
- "fs-extra": "^11.1.0",
85
+ "eslint": "^8.45.0",
86
+ "fastify": "^4.20.0",
87
+ "fs-extra": "^11.1.1",
88
+ "get-port": "^7.0.0",
84
89
  "github-label-sync": "^2.3.1",
85
90
  "http-status-codes": "^2.2.0",
86
91
  "husky": "^8.0.3",
87
- "np": "^7.6.3",
88
- "pem": "^1.14.6",
89
- "prettier": "^2.8.4",
92
+ "np": "^8.0.4",
93
+ "pem": "^1.14.8",
94
+ "prettier": "^3.0.0",
90
95
  "reflect-metadata": "^0.1.13",
91
96
  "supertest": "^6.3.3",
92
97
  "ts-node": "^10.9.1",
93
- "typescript": "^4.9.5"
98
+ "typescript": "^5.1.6"
94
99
  },
95
100
  "dependencies": {
96
- "@paralleldrive/cuid2": "^2.2.0",
97
- "@poppinss/macroable": "^1.0.0-2",
101
+ "@paralleldrive/cuid2": "^2.2.1",
102
+ "@poppinss/macroable": "^1.0.0-7",
98
103
  "@poppinss/matchit": "^3.1.2",
99
- "@poppinss/middleware": "^3.1.1",
100
- "@poppinss/utils": "^6.5.0-0",
101
- "@sindresorhus/is": "^5.3.0",
104
+ "@poppinss/middleware": "^3.1.3",
105
+ "@poppinss/utils": "^6.5.0-3",
106
+ "@sindresorhus/is": "^5.5.2",
102
107
  "accepts": "^1.3.8",
103
108
  "content-disposition": "^0.5.4",
104
109
  "cookie": "^0.5.0",
@@ -109,18 +114,18 @@
109
114
  "mime-types": "^2.1.35",
110
115
  "on-finished": "^2.4.1",
111
116
  "proxy-addr": "^2.0.7",
112
- "qs": "^6.11.1",
117
+ "qs": "^6.11.2",
113
118
  "tmp-cache": "^1.1.0",
114
119
  "type-is": "^1.6.18",
115
120
  "vary": "^1.1.2",
116
121
  "youch": "^3.2.3"
117
122
  },
118
123
  "peerDependencies": {
119
- "@adonisjs/application": "^7.1.2-0",
120
- "@adonisjs/encryption": "^5.1.2-0",
121
- "@adonisjs/events": "^8.4.9-0",
122
- "@adonisjs/fold": "^9.9.3-0",
123
- "@adonisjs/logger": "^5.4.2-0"
124
+ "@adonisjs/application": "^7.1.2-3",
125
+ "@adonisjs/encryption": "^5.1.2-1",
126
+ "@adonisjs/events": "^8.4.9-2",
127
+ "@adonisjs/fold": "^9.9.3-4",
128
+ "@adonisjs/logger": "^5.4.2-1"
124
129
  },
125
130
  "repository": {
126
131
  "type": "git",
@@ -130,37 +135,6 @@
130
135
  "url": "https://github.com/adonisjs/http-server/issues"
131
136
  },
132
137
  "homepage": "https://github.com/adonisjs/http-server#readme",
133
- "eslintConfig": {
134
- "extends": [
135
- "plugin:adonis/typescriptPackage",
136
- "prettier"
137
- ],
138
- "plugins": [
139
- "prettier"
140
- ],
141
- "rules": {
142
- "prettier/prettier": [
143
- "error",
144
- {
145
- "endOfLine": "auto"
146
- }
147
- ]
148
- }
149
- },
150
- "eslintIgnore": [
151
- "build",
152
- "backup"
153
- ],
154
- "prettier": {
155
- "trailingComma": "es5",
156
- "semi": false,
157
- "singleQuote": true,
158
- "useTabs": false,
159
- "quoteProps": "consistent",
160
- "bracketSpacing": true,
161
- "arrowParens": "always",
162
- "printWidth": 100
163
- },
164
138
  "commitlint": {
165
139
  "extends": [
166
140
  "@commitlint/config-conventional"
@@ -186,5 +160,9 @@
186
160
  "factories/**",
187
161
  ".yalc/**"
188
162
  ]
189
- }
163
+ },
164
+ "eslintConfig": {
165
+ "extends": "@adonisjs/eslint-config/package"
166
+ },
167
+ "prettier": "@adonisjs/prettier-config"
190
168
  }