fiberx-backend-toolkit 0.0.46 → 0.0.47

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.
@@ -93,8 +93,8 @@ class CookieManagerMiddleWare {
93
93
  async middleWare(req, res, next) {
94
94
  // Attach helpers
95
95
  req.getCookie = (name) => this.get(req, name);
96
- req.setCookie = (name, value, options = {}) => this.set(res, name, value, options);
97
- req.clearCookie = (name) => this.clear(res, name);
96
+ res.setCookie = (name, value, options = {}) => this.set(res, name, value, options);
97
+ res.clearCookieByName = (name) => this.clear(res, name);
98
98
  const request_id = this.handleRequestId(req, res);
99
99
  const device_id = this.handleDeviceId(req, res);
100
100
  req.request_id = request_id;
@@ -5,13 +5,13 @@ declare module "express-serve-static-core" {
5
5
  successResponse: (code?: number, msg?: string, data?: any) => Response;
6
6
  infoResponse: (code?: number, msg?: string, data?: any) => Response;
7
7
  handle404Error: () => Response;
8
- }
9
- interface Request {
10
- getCookie: (name: string) => string | undefined;
11
8
  setCookie: (name: string, value: string, options?: {
12
9
  max_age?: number;
13
10
  }) => void;
14
- clearCookie: (name: string) => void;
11
+ clearCookieByName: (name: string) => void;
12
+ }
13
+ interface Request {
14
+ getCookie: (name: string) => string | undefined;
15
15
  request_id?: string;
16
16
  device_id?: string;
17
17
  clientIp?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiberx-backend-toolkit",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",