@adonisjs/core 6.16.0 → 6.17.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.
@@ -64,9 +64,11 @@ export default class EdgeServiceProvider {
64
64
  * explicit handler
65
65
  */
66
66
  BriskRoute.macro('render', function (template, data) {
67
- return this.setHandler(({ view }) => {
67
+ function rendersTemplate({ view }) {
68
68
  return view.render(template, data);
69
- });
69
+ }
70
+ Object.defineProperty(rendersTemplate, 'listArgs', { value: template, writable: false });
71
+ return this.setHandler(rendersTemplate);
70
72
  });
71
73
  edge.use(pluginEdgeDumper(dumper));
72
74
  }
@@ -11,6 +11,7 @@ type SerializedRoute = {
11
11
  handler: {
12
12
  type: 'closure';
13
13
  name: string;
14
+ args?: string;
14
15
  } | {
15
16
  type: 'controller';
16
17
  moduleNameOrPath: string;
@@ -129,6 +129,7 @@ export class RoutesListFormatter {
129
129
  return {
130
130
  type: 'closure',
131
131
  name: handler.name || 'closure',
132
+ args: 'listArgs' in handler ? String(handler.listArgs) : undefined,
132
133
  };
133
134
  }
134
135
  /**
@@ -178,15 +179,22 @@ export class RoutesListFormatter {
178
179
  * Formats controller name for the ansi list and table
179
180
  */
180
181
  #formatControllerName(route) {
181
- return route.handler.type === 'controller' ? ` ${route.handler.moduleNameOrPath}.` : '';
182
+ return route.handler.type === 'controller'
183
+ ? ` ${this.#colors.cyan(route.handler.moduleNameOrPath)}.`
184
+ : '';
182
185
  }
183
186
  /**
184
187
  * Formats action name for the ansi list and table
185
188
  */
186
189
  #formatAction(route) {
187
- return route.handler.type === 'controller'
188
- ? `${this.#colors.cyan(route.handler.method)}`
189
- : ` ${this.#colors.cyan(route.handler.name)}`;
190
+ if (route.handler.type === 'controller') {
191
+ return `${this.#colors.cyan(route.handler.method)}`;
192
+ }
193
+ const functionName = ` ${this.#colors.cyan(route.handler.name)}`;
194
+ if (route.handler.args) {
195
+ return ` ${functionName}${this.#colors.dim(`(${route.handler.args})`)}`;
196
+ }
197
+ return functionName;
190
198
  }
191
199
  /**
192
200
  * Formats route middleware for the ansi list and table
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/core",
3
3
  "description": "Core of AdonisJS",
4
- "version": "6.16.0",
4
+ "version": "6.17.0",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },
@@ -94,8 +94,8 @@
94
94
  "@japa/runner": "^3.1.4",
95
95
  "@japa/snapshot": "^2.0.6",
96
96
  "@release-it/conventional-changelog": "^9.0.3",
97
- "@swc/core": "1.10.0",
98
- "@types/node": "^22.10.1",
97
+ "@swc/core": "1.10.1",
98
+ "@types/node": "^22.10.2",
99
99
  "@types/pretty-hrtime": "^1.0.3",
100
100
  "@types/sinon": "^17.0.3",
101
101
  "@types/supertest": "^6.0.2",
@@ -103,13 +103,13 @@
103
103
  "@vinejs/vine": "^3.0.0",
104
104
  "argon2": "^0.41.1",
105
105
  "bcrypt": "^5.1.1",
106
- "c8": "^10.1.2",
106
+ "c8": "^10.1.3",
107
107
  "copyfiles": "^2.4.1",
108
108
  "cross-env": "^7.0.3",
109
109
  "del-cli": "^6.0.0",
110
110
  "edge.js": "^6.2.0",
111
- "eslint": "^9.16.0",
112
- "execa": "^9.5.1",
111
+ "eslint": "^9.17.0",
112
+ "execa": "^9.5.2",
113
113
  "get-port": "^7.1.0",
114
114
  "github-label-sync": "^2.3.1",
115
115
  "husky": "^9.1.7",
@@ -133,7 +133,7 @@
133
133
  "@adonisjs/fold": "^10.1.3",
134
134
  "@adonisjs/hash": "^9.0.5",
135
135
  "@adonisjs/health": "^2.0.0",
136
- "@adonisjs/http-server": "^7.3.0",
136
+ "@adonisjs/http-server": "^7.4.0",
137
137
  "@adonisjs/logger": "^6.0.5",
138
138
  "@adonisjs/repl": "^4.0.1",
139
139
  "@antfu/install-pkg": "^0.5.0",