@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/index.cjs
CHANGED
|
@@ -2786,7 +2786,7 @@ function bindDiscoveryContext(project, cwd, tsconfigPath, tsconfig = loadDiscove
|
|
|
2786
2786
|
}
|
|
2787
2787
|
function extractRoutesFrom(project, controllerPaths) {
|
|
2788
2788
|
const routes = [];
|
|
2789
|
-
for (const path of controllerPaths) {
|
|
2789
|
+
for (const path of byPath([...controllerPaths])) {
|
|
2790
2790
|
const sourceFile = project.getSourceFile(path);
|
|
2791
2791
|
if (sourceFile) routes.push(...extractFromSourceFile(sourceFile, project));
|
|
2792
2792
|
}
|
|
@@ -2794,11 +2794,17 @@ function extractRoutesFrom(project, controllerPaths) {
|
|
|
2794
2794
|
}
|
|
2795
2795
|
function extractAllRoutes(project) {
|
|
2796
2796
|
const routes = [];
|
|
2797
|
-
for (const sourceFile of project.getSourceFiles()) {
|
|
2797
|
+
for (const sourceFile of byPath(project.getSourceFiles(), (f) => f.getFilePath())) {
|
|
2798
2798
|
routes.push(...extractFromSourceFile(sourceFile, project));
|
|
2799
2799
|
}
|
|
2800
2800
|
return routes;
|
|
2801
2801
|
}
|
|
2802
|
+
function byPath(items, path = String) {
|
|
2803
|
+
return [...items].sort((a, b) => {
|
|
2804
|
+
const [x, y] = [path(a), path(b)];
|
|
2805
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2802
2808
|
var PersistentDiscovery = class _PersistentDiscovery {
|
|
2803
2809
|
project;
|
|
2804
2810
|
cwd;
|
|
@@ -5365,7 +5371,7 @@ function createChainModuleRenderer(opts) {
|
|
|
5365
5371
|
}
|
|
5366
5372
|
|
|
5367
5373
|
// src/index.ts
|
|
5368
|
-
var VERSION = "0.22.
|
|
5374
|
+
var VERSION = "0.22.1";
|
|
5369
5375
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5370
5376
|
0 && (module.exports = {
|
|
5371
5377
|
CodegenError,
|