xypriss 9.3.67 → 9.3.69

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/index.d.ts CHANGED
@@ -335,6 +335,38 @@ interface PaginationInfo {
335
335
  /** Total number of pages */
336
336
  pages: number;
337
337
  }
338
+ /**
339
+ * Configuration for internal response manipulation.
340
+ *
341
+ /**
342
+ * Rules for masking or replacing fields in responses.
343
+ *
344
+ * @interface ResponseManipulationRule
345
+ */
346
+ interface ResponseManipulationRule {
347
+ /** Field name (dot notation) or RegExp pattern for matching keys */
348
+ field: string | RegExp;
349
+ /** Mask string (e.g., "****") or replacement value */
350
+ replacement?: any;
351
+ /** Number of characters to preserve (at the beginning) for string masking */
352
+ preserve?: number;
353
+ }
354
+ /**
355
+ * Configuration for internal response manipulation.
356
+ *
357
+ * Allows masking or replacing specific fields in JSON responses
358
+ * before they are sent to the client.
359
+ *
360
+ * @interface ResponseManipulationConfig
361
+ */
362
+ interface ResponseManipulationConfig {
363
+ /** Enable response manipulation */
364
+ enabled?: boolean;
365
+ /** Rules for masking or replacing fields */
366
+ rules?: ResponseManipulationRule[];
367
+ /** Maximum recursion depth for nested objects (default: 10) */
368
+ maxDepth?: number;
369
+ }
338
370
  /**
339
371
  * Enhanced Express request interface with additional utilities.
340
372
  *
@@ -1083,7 +1115,9 @@ interface CSRFConfig {
1083
1115
  * ```
1084
1116
  */
1085
1117
  interface RequestSignatureConfig {
1086
- /** The secret value that must match the XP-Request-Sig header */
1118
+ /** Custom header name for the signature (default: "XP-Request-Sig") */
1119
+ headerName?: string;
1120
+ /** The secret value that must match the header */
1087
1121
  secret: string;
1088
1122
  /** Custom error message for blocked requests */
1089
1123
  errorMessage?: string;
@@ -6387,6 +6421,8 @@ interface MultiServerConfig extends Omit<Partial<ServerOptions$1>, "server"> {
6387
6421
  */
6388
6422
  interface ServerOptions$1 {
6389
6423
  notFound?: NotFoundConfig;
6424
+ /** Response manipulation configuration */
6425
+ responseManipulation?: ResponseManipulationConfig;
6390
6426
  /** Plugin configuration */
6391
6427
  plugins?: PluginConfig;
6392
6428
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xypriss",
3
- "version": "9.3.67",
4
- "description": "XyPriss is a lightweight, TypeScript-first, open-source Node.js web framework crafted for developers seeking a familiar Express-like API without Express dependencies. It features built-in security middleware, a robust routing system, and performance optimizations to build scalable, secure web applications effortlessly. Join our community and contribute on GitHub!",
3
+ "version": "9.3.69",
4
+ "description": "XyPriss is a lightweight, TypeScript-first, open-source Node.js web framework crafted for developers seeking a familiar Express-like API without Express dependencies.",
5
5
  "author": {
6
6
  "name": "Nehonix",
7
7
  "url": "https://nehonix.com",
@@ -84,7 +84,7 @@
84
84
  "ws": "^8.19.0",
85
85
  "xss": "^1.0.15",
86
86
  "xypriss-compression-pluging": "^1.0.3",
87
- "xypriss-security": "^2.1.1"
87
+ "xypriss-security": "^2.1.10"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@rollup/plugin-commonjs": "^25.0.8",
@@ -119,7 +119,6 @@
119
119
  "typedoc": "^0.25.13"
120
120
  },
121
121
  "peerDependencies": {
122
- "@types/react": "\u003e=16.8.0",
123
122
  "react": "\u003e=16.8.0"
124
123
  }
125
- }
124
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "xypriss",
3
+ "version": "9.3.68",
4
+ "description": "XyPriss is a lightweight, TypeScript-first, open-source Node.js web framework crafted for developers seeking a familiar Express-like API without Express dependencies.",
5
+ "type": "module",
6
+ "author": {
7
+ "name": "Nehonix",
8
+ "url": "https://nehonix.com",
9
+ "whatsapp": "https://s.nehonix.com/QBo0KpCl"
10
+ },
11
+ "main": "./dist/cjs/src/index.js",
12
+ "module": "./dist/esm/src/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/esm/src/index.js",
17
+ "require": "./dist/cjs/src/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist/",
23
+ "shared/",
24
+ "scripts/",
25
+ "README.md",
26
+ "LICENSE",
27
+ "CONTRIBUTING.md"
28
+ ],
29
+ "scripts": {
30
+ "benchmark": "node benchmarks/index.js",
31
+ "build": "NODE_OPTIONS='--max-old-space-size=4096' npx rollup -c rollup.config.js",
32
+ "build:memory": "NODE_OPTIONS='--max-old-space-size=6144' npx rollup -c rollup.config.js",
33
+ "install-memory-cli": "node scripts/install-memory-cli.js",
34
+ "install-xsys": "node scripts/postinstall-xsys.js",
35
+ "postinstall": "node scripts/postinstall.js",
36
+ "prepublishOnly": "npm run build",
37
+ "test": "jest",
38
+ "test:coverage": "jest --coverage",
39
+ "test:watch": "jest --watch"
40
+ },
41
+ "dependencies": {
42
+ "@noble/ciphers": "^1.3.0",
43
+ "@noble/curves": "^1.9.7",
44
+ "@noble/hashes": "^1.8.0",
45
+ "@noble/secp256k1": "^2.3.0",
46
+ "@types/cookie-parser": "^1.4.10",
47
+ "@types/fast-json-stable-stringify": "^2.1.2",
48
+ "@types/ioredis": "^4.28.10",
49
+ "@types/msgpack-lite": "^0.1.12",
50
+ "@types/node-os-utils": "^1.3.4",
51
+ "@types/pako": "^2.0.4",
52
+ "@types/pidusage": "^2.0.5",
53
+ "@types/redis": "^4.0.11",
54
+ "@types/systeminformation": "^3.54.1",
55
+ "aes-js": "^3.1.2",
56
+ "argon2": "^0.43.1",
57
+ "argon2-browser": "^1.18.0",
58
+ "bcrypt": "^6.0.0",
59
+ "bcryptjs": "^2.4.3",
60
+ "bun": "^1.3.10",
61
+ "check-disk-space": "^3.4.0",
62
+ "compression": "^1.8.1",
63
+ "concurrently": "^8.2.2",
64
+ "cookie-parser": "^1.4.7",
65
+ "cors": "^2.8.6",
66
+ "crypto-js": "^4.2.0",
67
+ "crystals-kyber": "^5.1.0",
68
+ "csrf-csrf": "^4.0.3",
69
+ "elliptic": "^6.6.1",
70
+ "entropy-string": "^4.2.0",
71
+ "express-brute": "^1.0.1",
72
+ "express-mongo-sanitize": "^2.2.0",
73
+ "express-slow-down": "^3.0.1",
74
+ "fast-json-stable-stringify": "^2.1.0",
75
+ "fast-json-stringify": "^6.3.0",
76
+ "helmet": "^8.1.0",
77
+ "hpp": "^0.2.3",
78
+ "http-proxy-middleware": "^3.0.5",
79
+ "ioredis": "^5.10.0",
80
+ "kyber-crystals": "^1.0.7",
81
+ "libsodium-wrappers": "^0.7.16",
82
+ "mime-types": "^2.1.35",
83
+ "morgan": "^1.10.1",
84
+ "msgpack-lite": "^0.1.26",
85
+ "multer": "^2.1.0",
86
+ "nehoid": "^2.1.4",
87
+ "noble": "^1.9.1",
88
+ "node-fetch": "^3.3.2",
89
+ "node-forge": "^1.3.3",
90
+ "node-os-utils": "^1.3.7",
91
+ "pako": "^2.1.0",
92
+ "pbkdf2": "^3.1.5",
93
+ "pidusage": "^4.0.1",
94
+ "pqc-kyber": "^0.7.0",
95
+ "randombytes": "^2.1.0",
96
+ "redis": "^5.11.0",
97
+ "reliant-type": "^2.1.5",
98
+ "scrypt-js": "^3.0.1",
99
+ "secure-random": "^1.1.2",
100
+ "strulink": "^1.1.0",
101
+ "systeminformation": "^5.31.1",
102
+ "tweetnacl": "^1.0.3",
103
+ "ws": "^8.19.0",
104
+ "xss": "^1.0.15",
105
+ "xypriss-compression-pluging": "^1.0.3",
106
+ "xypriss-security": "^2.1.1"
107
+ },
108
+ "devDependencies": {
109
+ "@rollup/plugin-commonjs": "^25.0.8",
110
+ "@rollup/plugin-json": "^6.1.0",
111
+ "@rollup/plugin-node-resolve": "^15.3.1",
112
+ "@rollup/plugin-terser": "^0.4.4",
113
+ "@rollup/plugin-typescript": "^11.1.6",
114
+ "@types/bcrypt": "^5.0.2",
115
+ "@types/compression": "^1.8.1",
116
+ "@types/cors": "^2.8.19",
117
+ "@types/helmet": "^0.0.48",
118
+ "@types/hpp": "^0.2.7",
119
+ "@types/jest": "^29.5.14",
120
+ "@types/libsodium-wrappers": "^0.7.14",
121
+ "@types/morgan": "^1.9.10",
122
+ "@types/multer": "^2.0.0",
123
+ "@types/noble": "^0.0.44",
124
+ "@types/node": "^25.3.3",
125
+ "@types/react": "^18.3.28",
126
+ "@types/ws": "^8.18.1",
127
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
128
+ "@typescript-eslint/parser": "^5.62.0",
129
+ "axios": "^1.13.6",
130
+ "eslint": "^8.57.1",
131
+ "jest": "^29.7.0",
132
+ "rimraf": "^4.4.1",
133
+ "rollup": "^4.59.0",
134
+ "rollup-plugin-dts": "^6.3.0",
135
+ "rollup-plugin-typescript2": "^0.34.1",
136
+ "ts-jest": "^29.4.6",
137
+ "ts-node": "^10.9.2",
138
+ "typedoc": "^0.25.13"
139
+ },
140
+ "peerDependencies": {
141
+ "react": ">=16.8.0"
142
+ }
143
+ }
144
+