@athenna/http 1.4.1 → 1.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenna/http",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
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>",
|
|
@@ -41,7 +41,10 @@
|
|
|
41
41
|
"./providers/ControllerProvider": "./src/Providers/ControllerProvider.js",
|
|
42
42
|
"./providers/HttpRouteProvider": "./src/Providers/HttpRouteProvider.js",
|
|
43
43
|
"./providers/HttpServerProvider": "./src/Providers/HttpServerProvider.js",
|
|
44
|
-
"./providers/MiddlewareProvider": "./src/Providers/MiddlewareProvider.js"
|
|
44
|
+
"./providers/MiddlewareProvider": "./src/Providers/MiddlewareProvider.js",
|
|
45
|
+
"./commands/Route/List": "./src/Commands/Route/List.js",
|
|
46
|
+
"./commands/Make/Controller": "./src/Commands/Make/Controller.js",
|
|
47
|
+
"./commands/Make/Middleware": "./src/Commands/Make/Middleware.js"
|
|
45
48
|
},
|
|
46
49
|
"types": "./src/index.d.ts",
|
|
47
50
|
"imports": {
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { fileURLToPath } from 'node:url'
|
|
11
|
+
import { join, dirname } from 'node:path'
|
|
11
12
|
import { Folder, Path, String } from '@secjs/utils'
|
|
12
13
|
import { Artisan, Command, TemplateHelper } from '@athenna/artisan'
|
|
13
14
|
|
|
15
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
16
|
+
const __dirname = dirname(__filename)
|
|
17
|
+
|
|
14
18
|
export class MakeController extends Command {
|
|
15
19
|
/**
|
|
16
20
|
* The name and signature of the console command.
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { fileURLToPath } from 'node:url'
|
|
11
|
+
import { join, dirname } from 'node:path'
|
|
11
12
|
import { Folder, Path, String } from '@secjs/utils'
|
|
12
13
|
import { Artisan, Command, TemplateHelper } from '@athenna/artisan'
|
|
13
14
|
|
|
15
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
16
|
+
const __dirname = dirname(__filename)
|
|
17
|
+
|
|
14
18
|
export class MakeMiddleware extends Command {
|
|
15
19
|
/**
|
|
16
20
|
* The name and signature of the console command.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class HttpCommandsLoader {
|
|
2
|
+
/**
|
|
3
|
+
* Return all commands from http package.
|
|
4
|
+
*
|
|
5
|
+
* @return {any[]}
|
|
6
|
+
*/
|
|
7
|
+
static loadCommands() {
|
|
8
|
+
return [
|
|
9
|
+
import('#src/Commands/Route/List'),
|
|
10
|
+
import('#src/Commands/Make/Controller'),
|
|
11
|
+
import('#src/Commands/Make/Middleware'),
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -578,6 +578,15 @@ export interface ResponseContract {
|
|
|
578
578
|
getFastifyResponse(): FastifyReply
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
+
export class HttpCommandsLoader {
|
|
582
|
+
/**
|
|
583
|
+
* Return all commands from http package.
|
|
584
|
+
*
|
|
585
|
+
* @return {any[]}
|
|
586
|
+
*/
|
|
587
|
+
static loadCommands(): any[]
|
|
588
|
+
}
|
|
589
|
+
|
|
581
590
|
export interface NextContract {
|
|
582
591
|
(...params: any[]): void
|
|
583
592
|
}
|
package/src/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from './Handlers/HttpExceptionHandler.js'
|
|
|
22
22
|
export * from './Commands/Route/List.js'
|
|
23
23
|
export * from './Commands/Make/Controller.js'
|
|
24
24
|
export * from './Commands/Make/Middleware.js'
|
|
25
|
+
export * from './Helpers/HttpCommandsLoader.js'
|
|
25
26
|
|
|
26
27
|
export class Http {
|
|
27
28
|
/**
|