@dudousxd/nestjs-codegen 0.22.0 → 0.22.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.
@@ -2347,12 +2347,18 @@ function bindDiscoveryContext(project, cwd, tsconfigPath, tsconfig = loadDiscove
2347
2347
  }
2348
2348
  function extractRoutesFrom(project, controllerPaths) {
2349
2349
  const routes = [];
2350
- for (const path of controllerPaths) {
2350
+ for (const path of byPath([...controllerPaths])) {
2351
2351
  const sourceFile = project.getSourceFile(path);
2352
2352
  if (sourceFile) routes.push(...extractFromSourceFile(sourceFile, project));
2353
2353
  }
2354
2354
  return routes;
2355
2355
  }
2356
+ function byPath(items, path = String) {
2357
+ return [...items].sort((a, b) => {
2358
+ const [x, y] = [path(a), path(b)];
2359
+ return x < y ? -1 : x > y ? 1 : 0;
2360
+ });
2361
+ }
2356
2362
  var PersistentDiscovery = class _PersistentDiscovery {
2357
2363
  project;
2358
2364
  cwd;
@@ -5010,7 +5016,7 @@ async function watch(config, onChange, options = {}) {
5010
5016
  }
5011
5017
 
5012
5018
  // src/index.ts
5013
- var VERSION = "0.22.0";
5019
+ var VERSION = "0.22.1";
5014
5020
 
5015
5021
  // src/generate-manifest.ts
5016
5022
  var MANIFEST_FILE = ".codegen-manifest.json";