c2-http 1.0.128 → 1.0.129
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/dist/model/Controller.js +16 -14
- package/package.json +1 -1
package/dist/model/Controller.js
CHANGED
|
@@ -43,20 +43,22 @@ class Controller {
|
|
|
43
43
|
if (middlewares) {
|
|
44
44
|
middlewaresAux = [...middlewaresAux, ...middlewares];
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
if (this.uri.includes("/settings")) {
|
|
47
|
+
// Imprime a sequência de execução dos middlewares
|
|
48
|
+
const fullPath = `${this.uri}${uri}`;
|
|
49
|
+
console.log(`\n[Controller] Rota registrada: ${method.toUpperCase()} ${fullPath}`);
|
|
50
|
+
if (middlewaresAux.length > 0) {
|
|
51
|
+
const sequenciaMsg = " Sequência de execução dos middlewares:";
|
|
52
|
+
console.log(sequenciaMsg);
|
|
53
|
+
middlewaresAux.forEach((middleware, index) => {
|
|
54
|
+
const middlewareName = middleware.name || "Anonymous Middleware";
|
|
55
|
+
console.log(` ${index + 1}. ${middlewareName}`);
|
|
56
|
+
});
|
|
57
|
+
console.log(` ${middlewaresAux.length + 1}. Handler (${handlerFn.name || "Anonymous Handler"})`);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
console.log(` Handler: ${handlerFn.name || "Anonymous Handler"} (sem middlewares)`);
|
|
61
|
+
}
|
|
60
62
|
}
|
|
61
63
|
// Registra rota normalmente
|
|
62
64
|
this.router[method](uri, ...middlewaresAux, handlerFn);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c2-http",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.129",
|
|
4
4
|
"description": "Biblioteca Typescript para API NodeJS",
|
|
5
5
|
"repository": "https://cabralsilva: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@github.com/cabralsilva/c2-http.git",
|
|
6
6
|
"author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",
|