@golemio/core 1.19.4 → 1.20.0-rc.1696538175
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/dist/helpers/routing/AbstractRouter.d.ts +3 -6
- package/dist/helpers/routing/AbstractRouter.js +4 -2
- package/dist/helpers/routing/AbstractRouter.js.map +1 -1
- package/dist/helpers/routing/interfaces/IAbstractRouter.d.ts +5 -0
- package/dist/helpers/routing/interfaces/IAbstractRouter.js +3 -0
- package/dist/helpers/routing/interfaces/IAbstractRouter.js.map +1 -0
- package/dist/helpers/routing/interfaces/IRouterOptions.d.ts +3 -0
- package/dist/helpers/routing/interfaces/IRouterOptions.js +3 -0
- package/dist/helpers/routing/interfaces/IRouterOptions.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { IRouterExpireParameters } from "../../output-gateway/routes/interfaces/IRouterExpireParameters";
|
|
2
2
|
import { Router } from "express";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getPath: () => string;
|
|
6
|
-
}
|
|
3
|
+
import { IAbstractRouter } from "./interfaces/IAbstractRouter";
|
|
4
|
+
import { IRouterOptions } from "./interfaces/IRouterOptions";
|
|
7
5
|
export declare abstract class AbstractRouter implements IAbstractRouter {
|
|
8
6
|
protected readonly version: string;
|
|
9
7
|
protected readonly path: string;
|
|
10
8
|
protected router: Router;
|
|
11
|
-
protected constructor(version: string, path: string);
|
|
9
|
+
protected constructor(version: string, path: string, options?: IRouterOptions);
|
|
12
10
|
getRouter(): Router;
|
|
13
11
|
getPath(): string;
|
|
14
12
|
protected abstract initRoutes(expire?: IRouterExpireParameters | number | string): void;
|
|
15
13
|
}
|
|
16
|
-
export {};
|
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbstractRouter = void 0;
|
|
4
4
|
const express_1 = require("express");
|
|
5
5
|
class AbstractRouter {
|
|
6
|
-
constructor(version, path) {
|
|
6
|
+
constructor(version, path, options) {
|
|
7
7
|
this.version = version;
|
|
8
8
|
this.path = path;
|
|
9
|
-
this.router = (0, express_1.Router)(
|
|
9
|
+
this.router = (0, express_1.Router)({
|
|
10
|
+
mergeParams: typeof options?.shouldMergeParams === "boolean" ? options.shouldMergeParams : undefined,
|
|
11
|
+
});
|
|
10
12
|
}
|
|
11
13
|
getRouter() {
|
|
12
14
|
return this.router;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractRouter.js","sourceRoot":"","sources":["../../../src/helpers/routing/AbstractRouter.ts"],"names":[],"mappings":";;;AACA,qCAAiC;
|
|
1
|
+
{"version":3,"file":"AbstractRouter.js","sourceRoot":"","sources":["../../../src/helpers/routing/AbstractRouter.ts"],"names":[],"mappings":";;;AACA,qCAAiC;AAIjC,MAAsB,cAAc;IAKhC,YAAsB,OAAe,EAAE,IAAY,EAAE,OAAwB;QACzE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,EAAC;YACjB,WAAW,EAAE,OAAO,OAAO,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;SACvG,CAAC,CAAC;IACP,CAAC;IAEM,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3C,CAAC;CAGJ;AAtBD,wCAsBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAbstractRouter.js","sourceRoot":"","sources":["../../../../src/helpers/routing/interfaces/IAbstractRouter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRouterOptions.js","sourceRoot":"","sources":["../../../../src/helpers/routing/interfaces/IRouterOptions.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0-rc.1696538175",
|
|
4
4
|
"description": "Golemio Core Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
"dottie": "2.0.4",
|
|
136
136
|
"braces": "3.0.3"
|
|
137
137
|
}
|
|
138
|
-
}
|
|
138
|
+
}
|