@tuyau/core 0.3.2 → 0.4.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.
@@ -275,9 +275,15 @@ var ApiTypesGenerator = class {
275
275
  for (const route of routes) {
276
276
  if (typeof route.handler === "function") continue;
277
277
  const routeHandler = await parseBindingReference(route.handler.reference);
278
- const file = sourcesFiles.find(
279
- (sf) => sf.getFilePath().endsWith(`${routeHandler.moduleNameOrPath.replace("#", "")}.ts`)
280
- );
278
+ const file = sourcesFiles.find((sf) => {
279
+ const filePath = sf.getFilePath();
280
+ if (routeHandler.moduleNameOrPath.startsWith("./")) {
281
+ return filePath.endsWith(
282
+ routeHandler.moduleNameOrPath.replace("./", "").replace(".js", ".ts")
283
+ );
284
+ }
285
+ return filePath.endsWith(`${routeHandler.moduleNameOrPath.replace("#", "")}.ts`);
286
+ });
281
287
  if (!file) {
282
288
  this.#logger.warning(`Unable to find the controller file for ${route.pattern}`);
283
289
  continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tuyau/core",
3
3
  "type": "module",
4
- "version": "0.3.2",
4
+ "version": "0.4.0",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "@poppinss/cliui": "^6.4.2",
33
33
  "@poppinss/matchit": "^3.1.2",
34
34
  "@types/node": "^22.13.0",
35
- "@tuyau/client": "0.2.5"
35
+ "@tuyau/client": "0.2.7"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public",