@athenna/http 1.4.8 → 1.5.1

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.8",
3
+ "version": "1.5.1",
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>",
@@ -54,7 +54,7 @@
54
54
  "#tests/*": "./tests/*.js"
55
55
  },
56
56
  "dependencies": {
57
- "@athenna/artisan": "1.3.0",
57
+ "@athenna/artisan": "1.3.3",
58
58
  "@athenna/ioc": "1.2.3",
59
59
  "@athenna/logger": "1.2.8",
60
60
  "@secjs/utils": "1.9.7",
@@ -1,3 +1,6 @@
1
+ import { join } from 'node:path'
2
+ import { Folder, Module } from '@secjs/utils'
3
+
1
4
  export class HttpCommandsLoader {
2
5
  /**
3
6
  * Return all commands from http package.
@@ -11,4 +14,15 @@ export class HttpCommandsLoader {
11
14
  import('#src/Commands/Make/Middleware'),
12
15
  ]
13
16
  }
17
+
18
+ /**
19
+ * Return all custom templates from http package.
20
+ *
21
+ * @return {any[]}
22
+ */
23
+ static loadTemplates() {
24
+ return new Folder(
25
+ join(Module.createDirname(import.meta.url), '..', '..', 'templates'),
26
+ ).loadSync().files
27
+ }
14
28
  }
package/src/index.d.ts CHANGED
@@ -586,6 +586,13 @@ export class HttpCommandsLoader {
586
586
  * @return {any[]}
587
587
  */
588
588
  static loadCommands(): any[]
589
+
590
+ /**
591
+ * Return all custom templates from http package.
592
+ *
593
+ * @return {any[]}
594
+ */
595
+ static loadTemplates(): any[]
589
596
  }
590
597
 
591
598
  export interface NextContract {