@athenna/http 4.13.0 → 4.15.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/package.json +12 -12
- package/src/commands/MakeControllerCommand.js +5 -1
- package/src/commands/MakeInterceptorCommand.js +5 -1
- package/src/commands/MakeMiddlewareCommand.js +5 -1
- package/src/commands/MakeTerminatorCommand.js +5 -1
- package/src/testing/plugins/index.d.ts +2 -2
- package/src/testing/plugins/index.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenna/http",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"description": "The Athenna Http server. Built on top of fastify.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "João Lenon <lenon@athenna.io>",
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"#tests": "./tests/index.js"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@athenna/artisan": "^4.
|
|
76
|
-
"@athenna/common": "^4.
|
|
77
|
-
"@athenna/config": "^4.
|
|
78
|
-
"@athenna/ioc": "^4.
|
|
79
|
-
"@athenna/logger": "^4.
|
|
80
|
-
"@athenna/test": "^4.
|
|
81
|
-
"@athenna/tsconfig": "^4.
|
|
82
|
-
"@athenna/view": "^4.
|
|
83
|
-
"@fastify/cors": "^8.4.
|
|
75
|
+
"@athenna/artisan": "^4.21.0",
|
|
76
|
+
"@athenna/common": "^4.24.0",
|
|
77
|
+
"@athenna/config": "^4.10.0",
|
|
78
|
+
"@athenna/ioc": "^4.11.0",
|
|
79
|
+
"@athenna/logger": "^4.12.0",
|
|
80
|
+
"@athenna/test": "^4.16.0",
|
|
81
|
+
"@athenna/tsconfig": "^4.12.0",
|
|
82
|
+
"@athenna/view": "^4.9.0",
|
|
83
|
+
"@fastify/cors": "^8.4.2",
|
|
84
84
|
"@fastify/helmet": "^11.1.1",
|
|
85
85
|
"@fastify/rate-limit": "^8.1.1",
|
|
86
|
-
"@fastify/swagger": "^8.
|
|
87
|
-
"@fastify/swagger-ui": "^1.10.
|
|
86
|
+
"@fastify/swagger": "^8.12.1",
|
|
87
|
+
"@fastify/swagger-ui": "^1.10.2",
|
|
88
88
|
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
|
89
89
|
"@typescript-eslint/parser": "^6.7.4",
|
|
90
90
|
"commitizen": "^4.2.6",
|
|
@@ -12,6 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
15
18
|
import { Path } from '@athenna/common';
|
|
16
19
|
import { sep, resolve, isAbsolute } from 'node:path';
|
|
17
20
|
import { BaseCommand, Argument } from '@athenna/artisan';
|
|
@@ -64,5 +67,6 @@ export class MakeControllerCommand extends BaseCommand {
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Argument({
|
|
66
69
|
description: 'The controller name.'
|
|
67
|
-
})
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
68
72
|
], MakeControllerCommand.prototype, "name", void 0);
|
|
@@ -12,6 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
15
18
|
import { Path } from '@athenna/common';
|
|
16
19
|
import { sep, resolve, isAbsolute } from 'node:path';
|
|
17
20
|
import { BaseCommand, Argument } from '@athenna/artisan';
|
|
@@ -64,5 +67,6 @@ export class MakeInterceptorCommand extends BaseCommand {
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Argument({
|
|
66
69
|
description: 'The interceptor name.'
|
|
67
|
-
})
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
68
72
|
], MakeInterceptorCommand.prototype, "name", void 0);
|
|
@@ -12,6 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
15
18
|
import { Path } from '@athenna/common';
|
|
16
19
|
import { sep, resolve, isAbsolute } from 'node:path';
|
|
17
20
|
import { BaseCommand, Argument } from '@athenna/artisan';
|
|
@@ -64,5 +67,6 @@ export class MakeMiddlewareCommand extends BaseCommand {
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Argument({
|
|
66
69
|
description: 'The middleware name.'
|
|
67
|
-
})
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
68
72
|
], MakeMiddlewareCommand.prototype, "name", void 0);
|
|
@@ -12,6 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
15
18
|
import { Path } from '@athenna/common';
|
|
16
19
|
import { sep, resolve, isAbsolute } from 'node:path';
|
|
17
20
|
import { BaseCommand, Argument } from '@athenna/artisan';
|
|
@@ -64,5 +67,6 @@ export class MakeTerminatorCommand extends BaseCommand {
|
|
|
64
67
|
__decorate([
|
|
65
68
|
Argument({
|
|
66
69
|
description: 'The terminator name.'
|
|
67
|
-
})
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
68
72
|
], MakeTerminatorCommand.prototype, "name", void 0);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
import { TestRequest } from '#src/testing/plugins/request/TestRequest';
|
|
10
|
-
declare module '@japa/runner' {
|
|
10
|
+
declare module '@japa/runner/core' {
|
|
11
11
|
interface TestContext {
|
|
12
12
|
request: TestRequest;
|
|
13
13
|
}
|
|
@@ -17,4 +17,4 @@ export * from '#src/testing/plugins/request/TestResponse';
|
|
|
17
17
|
/**
|
|
18
18
|
* Request plugin registers the request macro to the test context.
|
|
19
19
|
*/
|
|
20
|
-
export declare function request(): (
|
|
20
|
+
export declare function request(): () => void;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* For the full copyright and license information, please view the LICENSE
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
|
+
import { TestContext } from '@japa/runner/core';
|
|
9
10
|
import { TestRequest } from '#src/testing/plugins/request/TestRequest';
|
|
10
11
|
export * from '#src/testing/plugins/request/TestRequest';
|
|
11
12
|
export * from '#src/testing/plugins/request/TestResponse';
|
|
@@ -13,7 +14,7 @@ export * from '#src/testing/plugins/request/TestResponse';
|
|
|
13
14
|
* Request plugin registers the request macro to the test context.
|
|
14
15
|
*/
|
|
15
16
|
export function request() {
|
|
16
|
-
return function (
|
|
17
|
-
|
|
17
|
+
return function () {
|
|
18
|
+
TestContext.macro('request', new TestRequest());
|
|
18
19
|
};
|
|
19
20
|
}
|