arcway 0.1.28 → 0.1.29

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": "arcway",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "A convention-based framework for building modular monoliths with strict domain boundaries.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- import { discoverRoutes, matchRoute, compilePattern } from './routes.js';
1
+ import { discoverRoutes, matchRoute, compilePattern, sortBySpecificity } from './routes.js';
2
2
  import { discoverMiddleware, getMiddlewareForRoute, buildMiddlewareChain } from './middleware.js';
3
3
  import { sendJson, serializeResponse } from './http-helpers.js';
4
4
  import { ErrorCodes } from '../constants.js';
@@ -360,6 +360,7 @@ class ApiRouter {
360
360
  this._pluginManager?.discoverRoutes?.() ?? [],
361
361
  ]);
362
362
  routes.push(...pluginRoutes);
363
+ sortBySpecificity(routes);
363
364
 
364
365
  applyPrefix(routes, middleware, this._prefix);
365
366