@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.
- package/CHANGELOG.md +24 -0
- package/dist/cli/main.cjs +9 -3
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +9 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +8 -2
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js +8 -2
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/dist/nest/index.cjs
CHANGED
|
@@ -2370,12 +2370,18 @@ function bindDiscoveryContext(project, cwd, tsconfigPath, tsconfig = loadDiscove
|
|
|
2370
2370
|
}
|
|
2371
2371
|
function extractRoutesFrom(project, controllerPaths) {
|
|
2372
2372
|
const routes = [];
|
|
2373
|
-
for (const path of controllerPaths) {
|
|
2373
|
+
for (const path of byPath([...controllerPaths])) {
|
|
2374
2374
|
const sourceFile = project.getSourceFile(path);
|
|
2375
2375
|
if (sourceFile) routes.push(...extractFromSourceFile(sourceFile, project));
|
|
2376
2376
|
}
|
|
2377
2377
|
return routes;
|
|
2378
2378
|
}
|
|
2379
|
+
function byPath(items, path = String) {
|
|
2380
|
+
return [...items].sort((a, b) => {
|
|
2381
|
+
const [x, y] = [path(a), path(b)];
|
|
2382
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2379
2385
|
var PersistentDiscovery = class _PersistentDiscovery {
|
|
2380
2386
|
project;
|
|
2381
2387
|
cwd;
|
|
@@ -5033,7 +5039,7 @@ async function watch(config, onChange, options = {}) {
|
|
|
5033
5039
|
}
|
|
5034
5040
|
|
|
5035
5041
|
// src/index.ts
|
|
5036
|
-
var VERSION = "0.22.
|
|
5042
|
+
var VERSION = "0.22.1";
|
|
5037
5043
|
|
|
5038
5044
|
// src/generate-manifest.ts
|
|
5039
5045
|
var MANIFEST_FILE = ".codegen-manifest.json";
|