@ticatec/common-express-server 0.1.2 → 0.1.4

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.
@@ -16,9 +16,10 @@ export default abstract class CommonRoutes<T extends CommonRouterHelper> {
16
16
  * Constructor for common routes
17
17
  * @param helper Router helper instance
18
18
  * @param checkUser Whether to check user authentication (default: true)
19
+ * @param mergeParams Whether to merge params (default: false)
19
20
  * @protected
20
21
  */
21
- protected constructor(helper: T, checkUser?: boolean);
22
+ protected constructor(helper: T, checkUser?: boolean, mergeParams?: boolean);
22
23
  /**
23
24
  * Binds this router to the Express application
24
25
  * @param app Express application instance
@@ -14,10 +14,11 @@ class CommonRoutes {
14
14
  * Constructor for common routes
15
15
  * @param helper Router helper instance
16
16
  * @param checkUser Whether to check user authentication (default: true)
17
+ * @param mergeParams Whether to merge params (default: false)
17
18
  * @protected
18
19
  */
19
- constructor(helper, checkUser = true) {
20
- this.router = (0, express_1.Router)();
20
+ constructor(helper, checkUser = true, mergeParams = false) {
21
+ this.router = (0, express_1.Router)({ mergeParams });
21
22
  this.helper = helper;
22
23
  this.logger = log4js_1.default.getLogger(this.constructor.name);
23
24
  if (checkUser) {
@@ -1 +1 @@
1
- {"version":3,"file":"CommonRoutes.js","sourceRoot":"src/","sources":["CommonRoutes.ts"],"names":[],"mappings":";;;;;AAAA,qCAAwC;AAExC,oDAAsC;AAEtC;;;GAGG;AACH,MAA8B,YAAY;IAQtC;;;;;OAKG;IACH,YAAsB,MAAS,EAAE,YAAqB,IAAI;QACtD,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,gBAAM,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YAClD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAY,EAAE,IAAY;QACjC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACJ;AAhCD,+BAgCC"}
1
+ {"version":3,"file":"CommonRoutes.js","sourceRoot":"src/","sources":["CommonRoutes.ts"],"names":[],"mappings":";;;;;AAAA,qCAAwC;AAExC,oDAAsC;AAEtC;;;GAGG;AACH,MAA8B,YAAY;IAQtC;;;;;;OAMG;IACH,YAAsB,MAAS,EAAE,YAAqB,IAAI,EAAE,cAAuB,KAAK;QACpF,IAAI,CAAC,MAAM,GAAG,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,gBAAM,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YAClD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAY,EAAE,IAAY;QACjC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACJ;AAjCD,+BAiCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/common-express-server",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A comprehensive TypeScript library providing common classes, controllers, and middleware for building scalable Express.js applications with multi-tenant support.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -60,15 +60,15 @@
60
60
  "registry": "https://registry.npmjs.org/"
61
61
  },
62
62
  "dependencies": {
63
- "@ticatec/bean-validator": "^0.0.6",
64
- "@ticatec/express-exception": "^1.1.3",
65
- "@ticatec/node-common-library": "^2.2.0",
66
- "log4js": "^6.7.0"
67
63
  },
68
64
  "devDependencies": {
69
65
  "@types/express": "^5.0.1",
70
66
  "@types/node": "^22.8.6",
71
- "typescript": "^5.0.0"
67
+ "typescript": "^5.0.0",
68
+ "@ticatec/bean-validator": "^0.1.0",
69
+ "@ticatec/express-exception": "^1.1.3",
70
+ "@ticatec/node-common-library": "^2.2.0",
71
+ "log4js": "^6.7.0"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "express": "^5.1.0"