@adonisjs/http-server 8.0.0-next.11 → 8.0.0-next.12
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.
|
@@ -3725,8 +3725,10 @@ var Router = class {
|
|
|
3725
3725
|
domains.forEach(
|
|
3726
3726
|
(domain) => this.routes[domain].forEach((route) => trackRoute.bind(this)(route, domain))
|
|
3727
3727
|
);
|
|
3728
|
-
return
|
|
3729
|
-
|
|
3728
|
+
return {
|
|
3729
|
+
imports: [],
|
|
3730
|
+
types: ["type ParamValue = string | number | bigint | boolean"],
|
|
3731
|
+
routes: Object.keys(routesList).reduce((result, method) => {
|
|
3730
3732
|
result.push(`${" ".repeat(indentation)}${method}: {`);
|
|
3731
3733
|
Object.keys(routesList[method]).forEach((identifier) => {
|
|
3732
3734
|
const key = `'${identifier}'`;
|
|
@@ -3740,9 +3742,8 @@ var Router = class {
|
|
|
3740
3742
|
});
|
|
3741
3743
|
result.push(`${" ".repeat(indentation)}}`);
|
|
3742
3744
|
return result;
|
|
3743
|
-
},
|
|
3744
|
-
|
|
3745
|
-
).join("\n");
|
|
3745
|
+
}, []).join("\n")
|
|
3746
|
+
};
|
|
3746
3747
|
}
|
|
3747
3748
|
/**
|
|
3748
3749
|
* Find route for a given URL, method and optionally domain
|
package/build/factories/main.js
CHANGED
package/build/index.js
CHANGED
|
@@ -249,7 +249,11 @@ export declare class Router {
|
|
|
249
249
|
* @param indentation - Indentation level for generated types
|
|
250
250
|
* @returns Generated TypeScript types as string
|
|
251
251
|
*/
|
|
252
|
-
generateTypes(indentation?: number):
|
|
252
|
+
generateTypes(indentation?: number): {
|
|
253
|
+
imports: never[];
|
|
254
|
+
types: string[];
|
|
255
|
+
routes: string;
|
|
256
|
+
};
|
|
253
257
|
/**
|
|
254
258
|
* Find route for a given URL, method and optionally domain
|
|
255
259
|
* @param uri - The URI to match
|