xypriss 9.0.13 → 9.1.1

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.
Files changed (2137) hide show
  1. package/.agent/workflows/build-xems.md +9 -0
  2. package/.editorconfig +12 -0
  3. package/.env.test +4 -0
  4. package/.github/FUNDING.yml +15 -0
  5. package/.github/dependabot.yml +11 -0
  6. package/.github/workflows/codeql.yml +98 -0
  7. package/.github/workflows/release.yml +91 -0
  8. package/.private/.meta/+xypriss.meta.ts +6 -0
  9. package/.private/ACPES_UTF8_FIXES.md +129 -0
  10. package/.private/PLUGIN_API_TEST_PLAN.md +555 -0
  11. package/.private/README.md +6 -0
  12. package/.private/SESSION_SUMMARY_2025-12-12.md +229 -0
  13. package/.private/XYPRISS_BUG_FIX_REPORT.md +198 -0
  14. package/.private/XYPRISS_BUG_REPORT.md +140 -0
  15. package/.private/XYPRISS_RUST_CORE_BRAINSTORM.md +110 -0
  16. package/.private/acpes_gl_test.ts +38 -0
  17. package/.private/acpes_test_data.txt +6 -0
  18. package/.private/algos/comparison.md +87 -0
  19. package/.private/configs-example.ts +290 -0
  20. package/.private/configs.ts +22 -0
  21. package/.private/console-demo-simple.ts +61 -0
  22. package/.private/console-interception-examples.ts +260 -0
  23. package/.private/const.ts +6 -0
  24. package/.private/cpu.bench.md +53 -0
  25. package/.private/create_test_files.ts +43 -0
  26. package/.private/diagnose-proxy.cjs +176 -0
  27. package/.private/feedb.md +16 -0
  28. package/.private/filesystem-api.md +119 -0
  29. package/.private/fw.ts +10 -0
  30. package/.private/goserver.ts +56 -0
  31. package/.private/important/xm +12 -0
  32. package/.private/index.html +23 -0
  33. package/.private/intensive_test_server.ts +244 -0
  34. package/.private/k.md +2 -0
  35. package/.private/middlewares/testMiddleware.ts +11 -0
  36. package/.private/ms1.ts +12 -0
  37. package/.private/ms1_router2.ts +13 -0
  38. package/.private/ms1router.ts +10 -0
  39. package/.private/mserver.ts +14 -0
  40. package/.private/otherRouterFromFile.ts +11 -0
  41. package/.private/package_manager_brainstorming.md +804 -0
  42. package/.private/payload.json +46 -0
  43. package/.private/plg.json +3 -0
  44. package/.private/plugins/+plg.ts +8 -0
  45. package/.private/plugins/authServer.ts +24 -0
  46. package/.private/plugins/mainServer.ts +28 -0
  47. package/.private/plugins/t.ts +7 -0
  48. package/.private/productionCsp.ts +48 -0
  49. package/.private/repro_memory_error.ts +10 -0
  50. package/.private/repro_memory_error_dist.ts +10 -0
  51. package/.private/repro_sys.ts +10 -0
  52. package/.private/response_control_demo.ts +57 -0
  53. package/.private/rex.ts +22 -0
  54. package/.private/router/auth.route.ts +96 -0
  55. package/.private/router/index.router.ts +20 -0
  56. package/.private/router/index.ts +35 -0
  57. package/.private/router/v1.route.ts +9 -0
  58. package/.private/sandbox/xms/router/index.ts +12 -0
  59. package/.private/sandbox/xms/router/xserver1.route.ts +12 -0
  60. package/.private/sandbox/xms/router/xserver2.route.ts +37 -0
  61. package/.private/sandbox/xms/server.ts +14 -0
  62. package/.private/sandbox/xms/servers/xserver1.ts +8 -0
  63. package/.private/sandbox/xms/servers/xserver2.ts +6 -0
  64. package/.private/security-example.ts +149 -0
  65. package/.private/serializer.ts +13 -0
  66. package/.private/server.ts +200 -0
  67. package/.private/server2.ts +12 -0
  68. package/.private/test-mob.ts +15 -0
  69. package/.private/test-pkce.ts +43 -0
  70. package/.private/test-proxy.cjs +161 -0
  71. package/.private/test-query-endpoint.ts +28 -0
  72. package/.private/test-query-params-fix.cjs +184 -0
  73. package/.private/test-ratelimit.ts +27 -0
  74. package/.private/test-router.ts +40 -0
  75. package/.private/test-server-prod.ts +43 -0
  76. package/.private/test-server.ts +55 -0
  77. package/.private/test-trust-proxy-ranges.cjs +139 -0
  78. package/.private/test.json +53 -0
  79. package/.private/test.pluging.ts +37 -0
  80. package/.private/testPlugin_Logger.ts +20 -0
  81. package/.private/test_lifecycle_hooks.ts +120 -0
  82. package/.private/test_methods_suite.ts +134 -0
  83. package/.private/test_multi_server.ts +62 -0
  84. package/.private/test_plugin_api.ts +150 -0
  85. package/.private/test_upload.ts +103 -0
  86. package/.private/test_upload_comprehensive.ts +185 -0
  87. package/.private/testing-meta-config/.meta/+xypriss.meta.ts +4 -0
  88. package/.private/testing-meta-config/.quickdevignore +1 -0
  89. package/.private/testing-meta-config/README.md +238 -0
  90. package/.private/testing-meta-config/bun.lock +1184 -0
  91. package/.private/testing-meta-config/package-lock.json +4172 -0
  92. package/.private/testing-meta-config/package.json +31 -0
  93. package/.private/testing-meta-config/quickdev.config.json +34 -0
  94. package/.private/testing-meta-config/src/configs/host.conf.ts +83 -0
  95. package/.private/testing-meta-config/src/configs/xypriss.config.ts +45 -0
  96. package/.private/testing-meta-config/src/middleware/index.ts +40 -0
  97. package/.private/testing-meta-config/src/middleware/security.mlw.ts +29 -0
  98. package/.private/testing-meta-config/src/middleware/validation.middleware.ts +53 -0
  99. package/.private/testing-meta-config/src/routes/index.ts +97 -0
  100. package/.private/testing-meta-config/src/schema/user.schema.ts +8 -0
  101. package/.private/testing-meta-config/src/server.ts +67 -0
  102. package/.private/testing-meta-config/tsconfig.json +31 -0
  103. package/.private/testing-meta-config/xypriss.config.json +12 -0
  104. package/.private/type-safe-configs.ts +323 -0
  105. package/.private/upload_router.ts +28 -0
  106. package/.private/upload_serv.ts +48 -0
  107. package/.private/xms.md +1 -0
  108. package/.private/xvault.xems +0 -0
  109. package/.private/xypriss-cors-methods-array-bug.md +297 -0
  110. package/.quickdevignore +3 -0
  111. package/CONTRIBUTING.md +411 -0
  112. package/README.md +2 -1
  113. package/RELEASE_XFPM_G0.1.48.md +30 -0
  114. package/__tests__/COMPRESSION_FIX_SUMMARY.md +268 -0
  115. package/__tests__/COMPRESSION_PLUGIN_COMPLETE.md +224 -0
  116. package/__tests__/COMPRESSION_PLUGIN_IMPLEMENTATION_PLAN.md +253 -0
  117. package/__tests__/README.md +192 -0
  118. package/__tests__/TEST_INVESTIGATION_REPORT.md +247 -0
  119. package/__tests__/XYPRISS_COMPRESSION_SUMMARY.md +279 -0
  120. package/__tests__/acpes.test.html +12 -0
  121. package/__tests__/acpes_gl_test.ts +38 -0
  122. package/__tests__/analytics-engine.test.ts +292 -0
  123. package/__tests__/automatic-json-parsing.js +188 -0
  124. package/__tests__/bun-port-test.ts +186 -0
  125. package/__tests__/bun_cluster_test.ts +603 -0
  126. package/__tests__/bun_cluster_testv2.ts +448 -0
  127. package/__tests__/cache-persistence-fix-test.ts +149 -0
  128. package/__tests__/cache_testing/simplified_cache_test.ts +114 -0
  129. package/__tests__/cache_testing/test_redis_cache.ts +62 -0
  130. package/__tests__/cache_testing/type_safety_test.ts +200 -0
  131. package/__tests__/check_date.ts +10 -0
  132. package/__tests__/cluster_test.cjs +583 -0
  133. package/__tests__/cluster_test.js +38 -0
  134. package/__tests__/comprehensive-port-test.ts +192 -0
  135. package/__tests__/console.test.ts +262 -0
  136. package/__tests__/cors-multiserver-bug.test.ts +243 -0
  137. package/__tests__/cors-test-server.ts +124 -0
  138. package/__tests__/cors-test.html +98 -0
  139. package/__tests__/cors.test.ts +325 -0
  140. package/__tests__/crypto-operations.test.ts +334 -0
  141. package/__tests__/debug-conflict.js +69 -0
  142. package/__tests__/debug-memory.js +94 -0
  143. package/__tests__/debug-port.js +66 -0
  144. package/__tests__/debug-security.ts +54 -0
  145. package/__tests__/debug-server-startup.ts +187 -0
  146. package/__tests__/debug-test.js +73 -0
  147. package/__tests__/debug_logging.ts +104 -0
  148. package/__tests__/example-circular-fix.cjs +133 -0
  149. package/__tests__/express-listen-test.ts +144 -0
  150. package/__tests__/fObject.test.ts +38 -0
  151. package/__tests__/fast-routing-example.ts +166 -0
  152. package/__tests__/final-port-switch-test.ts +192 -0
  153. package/__tests__/fix-imports.cjs +109 -0
  154. package/__tests__/gl.ts +137 -0
  155. package/__tests__/gl_ts.ts +49 -0
  156. package/__tests__/glob.test.ts +11 -0
  157. package/__tests__/integration.test.ts +414 -0
  158. package/__tests__/memory-manager.test.ts +401 -0
  159. package/__tests__/memory-optimized-cluster.ts +359 -0
  160. package/__tests__/memory_friendly_test.ts +444 -0
  161. package/__tests__/middleware-id-tracking.test.ts +344 -0
  162. package/__tests__/middleware-system.test.ts +149 -0
  163. package/__tests__/middleware_test1.ts +61 -0
  164. package/__tests__/mobile-test/test-okhttp.js +71 -0
  165. package/__tests__/multi-server-404-config-test.ts +346 -0
  166. package/__tests__/network-plugin-example.js +203 -0
  167. package/__tests__/network-plugins-comprehensive.test.ts +523 -0
  168. package/__tests__/network-plugins-manual-demo.ts +376 -0
  169. package/__tests__/network-plugins-quick-test.ts +132 -0
  170. package/__tests__/object-collection-tracking.test.ts +337 -0
  171. package/__tests__/optimization-engine.test.ts +394 -0
  172. package/__tests__/plugin-system-test.ts +92 -0
  173. package/__tests__/plugins/+plg.ts +8 -0
  174. package/__tests__/plugins/t.ts +7 -0
  175. package/__tests__/port-availability-test.ts +153 -0
  176. package/__tests__/port-switch-conflict-test.ts +144 -0
  177. package/__tests__/port-switch-debug.ts +116 -0
  178. package/__tests__/rate-limiting.test.ts +221 -0
  179. package/__tests__/rate_lim.ts +44 -0
  180. package/__tests__/redirect.ts +164 -0
  181. package/__tests__/redis_cache_test.ts +25 -0
  182. package/__tests__/repro_rate_limit.ts +24 -0
  183. package/__tests__/router/index.ts +13 -0
  184. package/__tests__/router/test_router.ts +57 -0
  185. package/__tests__/router copy/index.router.ts +20 -0
  186. package/__tests__/router_test.ts +32 -0
  187. package/__tests__/run-all-tests.ts +179 -0
  188. package/__tests__/run-network-tests.sh +261 -0
  189. package/__tests__/run-placeholder-tests.ts +137 -0
  190. package/__tests__/security-example.ts +149 -0
  191. package/__tests__/security.test.ts +305 -0
  192. package/__tests__/server-creation.test.ts +253 -0
  193. package/__tests__/server.test.ts +70 -0
  194. package/__tests__/simple-port-test.ts +180 -0
  195. package/__tests__/simple_router_test.ts +45 -0
  196. package/__tests__/stress-test-network-plugins-fixed.sh +305 -0
  197. package/__tests__/stress-test-network-plugins.sh +328 -0
  198. package/__tests__/stress_test_intelligence.sh +384 -0
  199. package/__tests__/test/bun.lock +846 -0
  200. package/__tests__/test-acpes-utf8-fix.js +105 -0
  201. package/__tests__/test-acpes.js +102 -0
  202. package/__tests__/test-advanced-encryption.js +163 -0
  203. package/__tests__/test-all-network-plugins.mjs +353 -0
  204. package/__tests__/test-auto-port.cjs +109 -0
  205. package/__tests__/test-auto-ts/auto-check-test.ts +18 -0
  206. package/__tests__/test-cache-persistence-fix.ts +195 -0
  207. package/__tests__/test-circular-reference-fix.ts +214 -0
  208. package/__tests__/test-cluster-startup copy.ts +222 -0
  209. package/__tests__/test-cluster-startup.ts +222 -0
  210. package/__tests__/test-console-debug.ts +106 -0
  211. package/__tests__/test-cors.js +36 -0
  212. package/__tests__/test-ffunc.ts +138 -0
  213. package/__tests__/test-import.mjs +63 -0
  214. package/__tests__/test-integrated-network-plugins.mjs +493 -0
  215. package/__tests__/test-interface.ts +40 -0
  216. package/__tests__/test-json-parsing.mjs +87 -0
  217. package/__tests__/test-local-import.cjs +25 -0
  218. package/__tests__/test-local-import.js +28 -0
  219. package/__tests__/test-memory-cli.js +21 -0
  220. package/__tests__/test-modular.js +141 -0
  221. package/__tests__/test-no-conflict.ts +107 -0
  222. package/__tests__/test-port-conflict.js +64 -0
  223. package/__tests__/test-port-error.js +41 -0
  224. package/__tests__/test-port-manager.js +64 -0
  225. package/__tests__/test-power.ts +54 -0
  226. package/__tests__/test-realistic-bug-scenario.ts +101 -0
  227. package/__tests__/test-resilience.ts +53 -0
  228. package/__tests__/test-ultra-fast.ts +121 -0
  229. package/__tests__/test-user-example.mjs +114 -0
  230. package/__tests__/test-xhsc.ts +90 -0
  231. package/__tests__/test_cluster.ts +342 -0
  232. package/__tests__/test_cluster_simple.ts +221 -0
  233. package/__tests__/test_csrf_and_final.ts +187 -0
  234. package/__tests__/test_logging.ts +140 -0
  235. package/__tests__/test_manual_multer.ts +59 -0
  236. package/__tests__/test_manual_multer_client.ts +62 -0
  237. package/__tests__/test_matchit.rs +14 -0
  238. package/__tests__/test_plugins.ts +307 -0
  239. package/__tests__/test_real_cpu_work.ts +317 -0
  240. package/__tests__/test_request_management.ts +161 -0
  241. package/__tests__/test_router_and_middleware.ts +154 -0
  242. package/__tests__/test_upload.ts +62 -0
  243. package/__tests__/test_worker_direct.ts +77 -0
  244. package/__tests__/test_worker_pool.ts +224 -0
  245. package/__tests__/test_xjson.sh +21 -0
  246. package/__tests__/utils/cache.ts +15 -0
  247. package/__tests__/verify-network-plugins.sh +248 -0
  248. package/__tests__/wildcard-cors.test.ts +90 -0
  249. package/cache/.write_test +1 -0
  250. package/docs/ENVIRONMENT_SHIELD.md +68 -0
  251. package/docs/README.md +49 -0
  252. package/docs/XEMS_TUTORIAL.md +205 -0
  253. package/docs/cluster/MULTI_SERVER.md +479 -0
  254. package/docs/cluster/cluster-configuration-guide.md +92 -0
  255. package/docs/cluster/cluster-overview.md +33 -0
  256. package/docs/cluster/cluster-performance-tuning-updated.md +78 -0
  257. package/docs/cluster/multi-server.md +288 -0
  258. package/docs/config/CFG_API.md +61 -0
  259. package/docs/config/CONFIGS_API.md +414 -0
  260. package/docs/config/CONFIGS_QUICK_REFERENCE.md +124 -0
  261. package/docs/config/META_CONFIG.md +65 -0
  262. package/docs/config/NETWORK_CONFIG_GUIDE.md +441 -0
  263. package/docs/config/configuration.md +383 -0
  264. package/docs/core/CONST_API.md +88 -0
  265. package/docs/core/GLOBAL_APIS.md +190 -0
  266. package/docs/core/MEMORY_DETECTION.md +206 -0
  267. package/docs/core/MIDDLEWARE_ARCHITECTURE.md +227 -0
  268. package/docs/core/SERVER_CORE_ARCHITECTURE.md +68 -0
  269. package/docs/core/WORKSPACE_SYSTEM.md +97 -0
  270. package/docs/core/XHSC_CORE.md +90 -0
  271. package/docs/core/api-reference.md +406 -0
  272. package/docs/core/memory-management.md +350 -0
  273. package/docs/features/CONSOLE_INTERCEPTION_GUIDE.md +698 -0
  274. package/docs/features/CONSOLE_INTERCEPT_HOOK.md +516 -0
  275. package/docs/features/FILE_UPLOAD_GUIDE.md +486 -0
  276. package/docs/features/SYSTEM_INTELLIGENCE.md +81 -0
  277. package/docs/features/XJSON_API.md +445 -0
  278. package/docs/features/browser-terminal-control.md +707 -0
  279. package/docs/features/file-upload.md +674 -0
  280. package/docs/features/filesystem-api.md +242 -0
  281. package/docs/features/xfpm.md +157 -0
  282. package/docs/guides/EXAMPLES.md +483 -0
  283. package/docs/guides/FEATURES_OVERVIEW.md +59 -0
  284. package/docs/guides/INSTALLATION.md +114 -0
  285. package/docs/guides/QUICK_START.md +278 -0
  286. package/docs/guides/getting-started.md +472 -0
  287. package/docs/plugins/PLUGIN_API_IMPLEMENTATION.md +151 -0
  288. package/docs/plugins/PLUGIN_CORE_HOOKS.md +212 -0
  289. package/docs/plugins/PLUGIN_DATA_MASKING.md +53 -0
  290. package/docs/plugins/PLUGIN_DEVELOPMENT_GUIDE.md +1158 -0
  291. package/docs/plugins/PLUGIN_ERROR_HANDLING.md +82 -0
  292. package/docs/plugins/PLUGIN_MANAGEMENT_API.md +92 -0
  293. package/docs/plugins/PLUGIN_PERMISSIONS.md +123 -0
  294. package/docs/plugins/PLUGIN_STABILITY.md +66 -0
  295. package/docs/plugins/PLUGIN_SYSTEM_GUIDE.md +714 -0
  296. package/docs/plugins/plugins.md +550 -0
  297. package/docs/routing/HTTP_METHODS_REFERENCE.md +152 -0
  298. package/docs/routing/ROUTING.md +145 -0
  299. package/docs/routing/routing.md +456 -0
  300. package/docs/security/RATE_LIMIT_EXCLUSIONS.md +85 -0
  301. package/docs/security/ROUTE_BASED_SECURITY.md +373 -0
  302. package/docs/security/SECURITY.md +285 -0
  303. package/docs/security/TRUST_PROXY.md +353 -0
  304. package/docs/security/WILDCARD_CORS.md +284 -0
  305. package/docs/security/access-control-middleware.md +366 -0
  306. package/docs/security/advanced-cors-regexp.md +612 -0
  307. package/docs/security/enhanced-csp-configuration.md +520 -0
  308. package/docs/security/request-signature-auth.md +456 -0
  309. package/docs/security/security-features-overview.md +483 -0
  310. package/docs/system/README.md +202 -0
  311. package/docs/system/complete-reference.md +563 -0
  312. package/docs/system/configuration.md +438 -0
  313. package/docs/system/cpu-monitoring.md +462 -0
  314. package/docs/system/directory-management.md +611 -0
  315. package/docs/system/disk-information.md +554 -0
  316. package/docs/system/environment.md +445 -0
  317. package/docs/system/file-io.md +676 -0
  318. package/docs/system/memory-management.md +549 -0
  319. package/docs/system/migration-v5-to-v6.md +507 -0
  320. package/docs/system/network-statistics.md +645 -0
  321. package/docs/system/path-operations.md +506 -0
  322. package/docs/system/process-management.md +483 -0
  323. package/docs/system/search-filter.md +562 -0
  324. package/docs/system/sys-globals.md +119 -0
  325. package/docs/system/watching-streaming.md +99 -0
  326. package/examples/plugin-api-examples.ts +139 -0
  327. package/examples/security-example.ts +121 -0
  328. package/examples/security-showcase.ts +334 -0
  329. package/examples/server/package.json +0 -0
  330. package/examples/server/src/index.ts +5 -0
  331. package/examples/simple-cluster-example.ts +95 -0
  332. package/examples/xjson-example.ts +288 -0
  333. package/index.html +261 -0
  334. package/mods/ACPES/.acpes/2720a0cba:nehonix.a0cba72125.enc +1 -0
  335. package/mods/ACPES/LICENSE +21 -0
  336. package/mods/ACPES/README.md +203 -0
  337. package/mods/ACPES/docs/README.md +62 -0
  338. package/mods/ACPES/docs/advanced-encryption.md +248 -0
  339. package/mods/ACPES/docs/api-reference.md +216 -0
  340. package/mods/ACPES/docs/architecture.md +188 -0
  341. package/mods/ACPES/docs/getting-started.md +182 -0
  342. package/mods/ACPES/docs/platform-support.md +265 -0
  343. package/mods/ACPES/docs/security.md +292 -0
  344. package/mods/ACPES/docs/troubleshooting.md +0 -0
  345. package/mods/ACPES/package-lock.json +76 -0
  346. package/mods/ACPES/package.json +177 -0
  347. package/mods/ACPES/rollup.config.js +244 -0
  348. package/mods/ACPES/src/components/advancedEncryption.ts +354 -0
  349. package/mods/ACPES/src/components/compression.ts +52 -0
  350. package/mods/ACPES/src/components/encryption.ts +147 -0
  351. package/mods/ACPES/src/components/fingerprint.ts +45 -0
  352. package/mods/ACPES/src/components/index.ts +11 -0
  353. package/mods/ACPES/src/components/keyRotation.ts +299 -0
  354. package/mods/ACPES/src/components/security.ts +232 -0
  355. package/mods/ACPES/src/core/index.ts +11 -0
  356. package/mods/ACPES/src/core/platform.ts +112 -0
  357. package/mods/ACPES/src/core/storage.ts +730 -0
  358. package/mods/ACPES/src/index.ts +113 -0
  359. package/mods/ACPES/src/platforms/fallback.ts +80 -0
  360. package/mods/ACPES/src/platforms/index.ts +10 -0
  361. package/mods/ACPES/src/platforms/mobile.ts +101 -0
  362. package/mods/ACPES/src/platforms/node.ts +175 -0
  363. package/mods/ACPES/src/platforms/web.ts +147 -0
  364. package/mods/ACPES/src/types/index.ts +11 -0
  365. package/mods/ACPES/src/types/keyRotation.t.ts +20 -0
  366. package/mods/ACPES/src/types/options.ts +42 -0
  367. package/mods/ACPES/src/types/platform.ts +28 -0
  368. package/mods/ACPES/src/types/security.ts +39 -0
  369. package/mods/ACPES/src/types/storage.ts +23 -0
  370. package/mods/ACPES/src/utils/constants.ts +45 -0
  371. package/mods/ACPES/src/utils/helpers.ts +18 -0
  372. package/mods/ACPES/src/utils/index.ts +36 -0
  373. package/mods/ACPES/src/utils/prompt.ts +89 -0
  374. package/mods/ACPES/src/utils/validation.ts +51 -0
  375. package/mods/ACPES/tsconfig.json +42 -0
  376. package/mods/ACPES/yarn.lock +23 -0
  377. package/mods/memory-manager/Cargo.lock +974 -0
  378. package/mods/memory-manager/Cargo.toml +41 -0
  379. package/mods/memory-manager/NOTE.txt +3 -0
  380. package/mods/memory-manager/src/allocation_tracker.rs +371 -0
  381. package/mods/memory-manager/src/error.rs +294 -0
  382. package/mods/memory-manager/src/ffi.rs +469 -0
  383. package/mods/memory-manager/src/garbage_collector.rs +401 -0
  384. package/mods/memory-manager/src/lib.rs +138 -0
  385. package/mods/memory-manager/src/memory_manager.rs +429 -0
  386. package/mods/memory-manager/src/memory_pool.rs +564 -0
  387. package/mods/memory-manager/src/types.rs +285 -0
  388. package/mods/memory-manager/src/utils.rs +374 -0
  389. package/mods/security/LICENSE +21 -0
  390. package/mods/security/README.md +311 -0
  391. package/mods/security/bun.lock +1490 -0
  392. package/mods/security/docs/PKCE_API_DOCUMENTATION.md +255 -0
  393. package/mods/security/docs/api-reference.md +412 -0
  394. package/mods/security/docs/environment-setup.md +88 -0
  395. package/mods/security/docs/security-guide.md +395 -0
  396. package/mods/security/package-lock.json +7586 -0
  397. package/mods/security/package.json +249 -0
  398. package/mods/security/rollup.config.js +243 -0
  399. package/mods/security/src/algorithms/hash-algorithms.ts +894 -0
  400. package/mods/security/src/algorithms/registry.ts +82 -0
  401. package/mods/security/src/components/attestation.ts +1380 -0
  402. package/mods/security/src/components/cache/FastLRU.ts +402 -0
  403. package/mods/security/src/components/cache/SCC.ts +665 -0
  404. package/mods/security/src/components/cache/UFSIMC.ts +1399 -0
  405. package/mods/security/src/components/cache/cacheSys.ts +775 -0
  406. package/mods/security/src/components/cache/cacheSys.utils.ts +121 -0
  407. package/mods/security/src/components/cache/config/cache.config.ts +40 -0
  408. package/mods/security/src/components/cache/index.ts +1127 -0
  409. package/mods/security/src/components/cache/types/UFSIMC.type.ts +43 -0
  410. package/mods/security/src/components/cache/types/cache.type.ts +162 -0
  411. package/mods/security/src/components/cache/useCache.ts +287 -0
  412. package/mods/security/src/components/canary-tokens.ts +457 -0
  413. package/mods/security/src/components/entropy-augmentation.ts +611 -0
  414. package/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.ts +407 -0
  415. package/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.ts +645 -0
  416. package/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.ts +745 -0
  417. package/mods/security/src/components/fortified-function/const/exec.const.ts +26 -0
  418. package/mods/security/src/components/fortified-function/core/fortified-config.ts +443 -0
  419. package/mods/security/src/components/fortified-function/core/fortified-core.ts.txt +1347 -0
  420. package/mods/security/src/components/fortified-function/core/fortified-function-core.ts +785 -0
  421. package/mods/security/src/components/fortified-function/core/fortified-logger.ts +330 -0
  422. package/mods/security/src/components/fortified-function/core/index.ts +27 -0
  423. package/mods/security/src/components/fortified-function/core/mods/api-manager.ts +254 -0
  424. package/mods/security/src/components/fortified-function/core/mods/cache-manager.ts +148 -0
  425. package/mods/security/src/components/fortified-function/core/mods/execution-context.ts +135 -0
  426. package/mods/security/src/components/fortified-function/core/mods/execution-engine.ts +186 -0
  427. package/mods/security/src/components/fortified-function/core/mods/execution-router.ts +136 -0
  428. package/mods/security/src/components/fortified-function/core/mods/index.ts +20 -0
  429. package/mods/security/src/components/fortified-function/core/mods/memory-manager.ts +184 -0
  430. package/mods/security/src/components/fortified-function/core/mods/security-manager.ts +123 -0
  431. package/mods/security/src/components/fortified-function/core/mods/stats-manager.ts +194 -0
  432. package/mods/security/src/components/fortified-function/core/mods/timing-manager.ts +150 -0
  433. package/mods/security/src/components/fortified-function/engines/analytics-engine.ts +502 -0
  434. package/mods/security/src/components/fortified-function/engines/execution-engine.ts +520 -0
  435. package/mods/security/src/components/fortified-function/engines/index.ts +13 -0
  436. package/mods/security/src/components/fortified-function/engines/optimization-engine.ts +626 -0
  437. package/mods/security/src/components/fortified-function/fortified-function.ts +273 -0
  438. package/mods/security/src/components/fortified-function/index.ts +234 -0
  439. package/mods/security/src/components/fortified-function/performance/index.ts +15 -0
  440. package/mods/security/src/components/fortified-function/performance/performance-monitor.ts +293 -0
  441. package/mods/security/src/components/fortified-function/performance/performance-timer.ts +239 -0
  442. package/mods/security/src/components/fortified-function/security/index.ts +8 -0
  443. package/mods/security/src/components/fortified-function/security/security-handler.ts +283 -0
  444. package/mods/security/src/components/fortified-function/serializer/safe-serializer.ts +454 -0
  445. package/mods/security/src/components/fortified-function/smart-cache.ts +781 -0
  446. package/mods/security/src/components/fortified-function/types/fortified-types.ts +322 -0
  447. package/mods/security/src/components/fortified-function/types/types.ts +412 -0
  448. package/mods/security/src/components/fortified-function/types/ufa.type.ts +9 -0
  449. package/mods/security/src/components/fortified-function/utils/index.ts +13 -0
  450. package/mods/security/src/components/fortified-function/utils/utils.ts +98 -0
  451. package/mods/security/src/components/index.ts +37 -0
  452. package/mods/security/src/components/memory-hard.ts +1300 -0
  453. package/mods/security/src/components/post-quantum.ts +1366 -0
  454. package/mods/security/src/components/runtime-verification.ts +867 -0
  455. package/mods/security/src/components/secure-array/core/secure-array-core.ts +2028 -0
  456. package/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.ts +401 -0
  457. package/mods/security/src/components/secure-array/events/event-manager.ts +372 -0
  458. package/mods/security/src/components/secure-array/index.ts +295 -0
  459. package/mods/security/src/components/secure-array/metadata/metadata-manager.ts +406 -0
  460. package/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.ts +469 -0
  461. package/mods/security/src/components/secure-array/types/index.ts +327 -0
  462. package/mods/security/src/components/secure-array/utils/id-generator.ts +86 -0
  463. package/mods/security/src/components/secure-array/utils/validation.ts +350 -0
  464. package/mods/security/src/components/secure-memory.ts +1155 -0
  465. package/mods/security/src/components/secure-object/README.md +217 -0
  466. package/mods/security/src/components/secure-object/core/secure-object-core.ts +2051 -0
  467. package/mods/security/src/components/secure-object/encryption/crypto-handler.ts +447 -0
  468. package/mods/security/src/components/secure-object/encryption/sensitive-keys.ts +227 -0
  469. package/mods/security/src/components/secure-object/events/event-manager.ts +246 -0
  470. package/mods/security/src/components/secure-object/index.ts +151 -0
  471. package/mods/security/src/components/secure-object/metadata/metadata-manager.ts +217 -0
  472. package/mods/security/src/components/secure-object/serialization/serialization-handler.ts +244 -0
  473. package/mods/security/src/components/secure-object/types/index.ts +124 -0
  474. package/mods/security/src/components/secure-object/utils/id-generator.ts +66 -0
  475. package/mods/security/src/components/secure-object/utils/validation.ts +288 -0
  476. package/mods/security/src/components/secure-serialization.ts +1178 -0
  477. package/mods/security/src/components/secure-string/README.md +275 -0
  478. package/mods/security/src/components/secure-string/advanced/entropy-analyzer.ts +402 -0
  479. package/mods/security/src/components/secure-string/advanced/performance-monitor.ts +527 -0
  480. package/mods/security/src/components/secure-string/advanced/quantum-safe.ts +385 -0
  481. package/mods/security/src/components/secure-string/buffer/buffer-manager.ts +246 -0
  482. package/mods/security/src/components/secure-string/core/secure-string-core.ts +1105 -0
  483. package/mods/security/src/components/secure-string/crypto/crypto-operations.ts +452 -0
  484. package/mods/security/src/components/secure-string/index.ts +274 -0
  485. package/mods/security/src/components/secure-string/operations/comparison-operations.ts +266 -0
  486. package/mods/security/src/components/secure-string/operations/string-operations.ts +333 -0
  487. package/mods/security/src/components/secure-string/types/index.ts +250 -0
  488. package/mods/security/src/components/secure-string/validation/string-validator.ts +401 -0
  489. package/mods/security/src/components/side-channel.ts +299 -0
  490. package/mods/security/src/components/tamper-evident-logging.ts +517 -0
  491. package/mods/security/src/const/DEFAULT_CONSOLE_CONFIG.ts +83 -0
  492. package/mods/security/src/const/buffer.const.ts +11 -0
  493. package/mods/security/src/core/crypt.ts +52 -0
  494. package/mods/security/src/core/crypto.ts +1001 -0
  495. package/mods/security/src/core/hash/hash-advanced.ts +530 -0
  496. package/mods/security/src/core/hash/hash-core.ts +556 -0
  497. package/mods/security/src/core/hash/hash-entropy.ts +359 -0
  498. package/mods/security/src/core/hash/hash-security.ts +538 -0
  499. package/mods/security/src/core/hash/hash-types.ts +107 -0
  500. package/mods/security/src/core/hash/hash-utils.ts +345 -0
  501. package/mods/security/src/core/hash/hash-validator.ts +382 -0
  502. package/mods/security/src/core/hash/index.ts +27 -0
  503. package/mods/security/src/core/hash.ts +34 -0
  504. package/mods/security/src/core/index.ts +6 -0
  505. package/mods/security/src/core/keys/ARCHITECTURE +82 -0
  506. package/mods/security/src/core/keys/algorithms/index.ts +9 -0
  507. package/mods/security/src/core/keys/algorithms/mods/Argon2Algo.ts +192 -0
  508. package/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.ts +374 -0
  509. package/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.ts +401 -0
  510. package/mods/security/src/core/keys/index.ts +90 -0
  511. package/mods/security/src/core/keys/keys-core.ts +279 -0
  512. package/mods/security/src/core/keys/keys-logger.ts +278 -0
  513. package/mods/security/src/core/keys/keys-types.ts +255 -0
  514. package/mods/security/src/core/keys/keys-utils.ts +391 -0
  515. package/mods/security/src/core/keys.ts +135 -0
  516. package/mods/security/src/core/password/ARCHITECTURE +9 -0
  517. package/mods/security/src/core/password/index.ts +329 -0
  518. package/mods/security/src/core/password/password-algorithms.ts +519 -0
  519. package/mods/security/src/core/password/password-core.ts +394 -0
  520. package/mods/security/src/core/password/password-generator.ts +515 -0
  521. package/mods/security/src/core/password/password-migration.ts +324 -0
  522. package/mods/security/src/core/password/password-security.ts +649 -0
  523. package/mods/security/src/core/password/password-types.ts +246 -0
  524. package/mods/security/src/core/password/password-utils.ts +816 -0
  525. package/mods/security/src/core/password/swlist.ts +1117 -0
  526. package/mods/security/src/core/random/ARCHITECTURE +10 -0
  527. package/mods/security/src/core/random/index.ts +37 -0
  528. package/mods/security/src/core/random/random-core.ts +1115 -0
  529. package/mods/security/src/core/random/random-crypto.ts +446 -0
  530. package/mods/security/src/core/random/random-entropy.ts +453 -0
  531. package/mods/security/src/core/random/random-generators.ts +445 -0
  532. package/mods/security/src/core/random/random-security.ts +542 -0
  533. package/mods/security/src/core/random/random-sources.ts +461 -0
  534. package/mods/security/src/core/random/random-tokens.ts +421 -0
  535. package/mods/security/src/core/random/random-types.ts +255 -0
  536. package/mods/security/src/core/random.ts +14 -0
  537. package/mods/security/src/core/validators.ts +251 -0
  538. package/mods/security/src/generators/rsaKeyCalculator.ts +772 -0
  539. package/mods/security/src/helpers/Uint8Array.ts +392 -0
  540. package/mods/security/src/helpers/createEnu.ts +30 -0
  541. package/mods/security/src/helpers/express.middleware.helper.ts +59 -0
  542. package/mods/security/src/index.ts +1719 -0
  543. package/mods/security/src/types/console.ts +83 -0
  544. package/mods/security/src/types/global.ts +129 -0
  545. package/mods/security/src/types/index.ts +6 -0
  546. package/mods/security/src/types/options.ts +270 -0
  547. package/mods/security/src/types/random.ts +77 -0
  548. package/mods/security/src/types/secure-mem.type.ts +141 -0
  549. package/mods/security/src/types/secure-memory.ts +28 -0
  550. package/mods/security/src/types/security.ts +164 -0
  551. package/mods/security/src/types/stats.ts +149 -0
  552. package/mods/security/src/types/string.ts +69 -0
  553. package/mods/security/src/types.ts +582 -0
  554. package/mods/security/src/utils/CryptoAlgorithmUtils.ts +90 -0
  555. package/mods/security/src/utils/browserPolyfills.ts +288 -0
  556. package/mods/security/src/utils/constants.ts +169 -0
  557. package/mods/security/src/utils/crypto.type.ts +12 -0
  558. package/mods/security/src/utils/crypto.utils.ts +479 -0
  559. package/mods/security/src/utils/dataConverter.ts +89 -0
  560. package/mods/security/src/utils/detectInjection.ts +60 -0
  561. package/mods/security/src/utils/enc.test.ts +12 -0
  562. package/mods/security/src/utils/encoding.ts +999 -0
  563. package/mods/security/src/utils/errorHandler.ts +389 -0
  564. package/mods/security/src/utils/index.ts +10 -0
  565. package/mods/security/src/utils/memory/config-manager.ts +375 -0
  566. package/mods/security/src/utils/memory/event-manager.ts +320 -0
  567. package/mods/security/src/utils/memory/index.ts +304 -0
  568. package/mods/security/src/utils/memory/memory-manager.ts +1106 -0
  569. package/mods/security/src/utils/memory/memory-pool.ts +427 -0
  570. package/mods/security/src/utils/memory/reference-tracker.ts +454 -0
  571. package/mods/security/src/utils/memory/types.ts +255 -0
  572. package/mods/security/src/utils/memory-manager-new.ts +286 -0
  573. package/mods/security/src/utils/nodeModules.ts +307 -0
  574. package/mods/security/src/utils/patterns.ts +389 -0
  575. package/mods/security/src/utils/performanceMonitor.ts +412 -0
  576. package/mods/security/src/utils/securityUtils.ts +385 -0
  577. package/mods/security/src/utils/stats.ts +206 -0
  578. package/mods/security/src/utils/testing.ts +264 -0
  579. package/mods/security/tsconfig.json +40 -0
  580. package/package.json +57 -211
  581. package/quickdev.config.json +35 -0
  582. package/rollup.config.js +301 -0
  583. package/scripts/xys.run.js +1 -1
  584. package/secureStorage.xems +4 -0
  585. package/shared/logger/Logger.ts +841 -0
  586. package/shared/logger/index.ts +2 -0
  587. package/shared/logger/v2/Logger.ts..back.txt +812 -0
  588. package/shared/types/index.ts +2 -0
  589. package/shared/types/logger.type.ts +96 -0
  590. package/simulations/.meta/+xypriss.meta.ts +4 -0
  591. package/simulations/goxfpm-test2/.quickdevignore +1 -0
  592. package/simulations/goxfpm-test2/README.md +236 -0
  593. package/simulations/goxfpm-test2/package-lock.json +7108 -0
  594. package/simulations/goxfpm-test2/package.json +27 -0
  595. package/simulations/goxfpm-test2/quickdev.config.json +34 -0
  596. package/simulations/goxfpm-test2/src/configs/host.conf.ts +83 -0
  597. package/simulations/goxfpm-test2/src/configs/xypriss.config.ts +284 -0
  598. package/simulations/goxfpm-test2/src/middleware/index.ts +40 -0
  599. package/simulations/goxfpm-test2/src/middleware/security.mlw.ts +29 -0
  600. package/simulations/goxfpm-test2/src/middleware/validation.middleware.ts +53 -0
  601. package/simulations/goxfpm-test2/src/routes/index.ts +142 -0
  602. package/simulations/goxfpm-test2/src/schema/user.schema.ts +53 -0
  603. package/simulations/goxfpm-test2/src/server.ts +68 -0
  604. package/simulations/goxfpm-test2/tsconfig.json +35 -0
  605. package/simulations/goxfpm-test2/xypriss.config.json +21 -0
  606. package/simulations/lxpm_pkg_simulation/.quickdevignore +1 -0
  607. package/simulations/lxpm_pkg_simulation/README.md +236 -0
  608. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/.quickdevignore +1 -0
  609. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/README.md +236 -0
  610. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/package-lock.json +7108 -0
  611. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/package.json +31 -0
  612. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/quickdev.config.json +34 -0
  613. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/configs/host.conf.ts +83 -0
  614. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/configs/xypriss.config.ts +286 -0
  615. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/index.ts +40 -0
  616. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/security.mlw.ts +29 -0
  617. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/validation.middleware.ts +53 -0
  618. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/routes/index.ts +97 -0
  619. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/schema/user.schema.ts +53 -0
  620. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/server.ts +64 -0
  621. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/tsconfig.json +35 -0
  622. package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/xypriss.config.json +21 -0
  623. package/simulations/lxpm_pkg_simulation/package-lock.json +7108 -0
  624. package/simulations/lxpm_pkg_simulation/package.json +31 -0
  625. package/simulations/lxpm_pkg_simulation/quickdev.config.json +34 -0
  626. package/simulations/lxpm_pkg_simulation/src/configs/host.conf.ts +83 -0
  627. package/simulations/lxpm_pkg_simulation/src/configs/xypriss.config.ts +286 -0
  628. package/simulations/lxpm_pkg_simulation/src/middleware/index.ts +40 -0
  629. package/simulations/lxpm_pkg_simulation/src/middleware/security.mlw.ts +29 -0
  630. package/simulations/lxpm_pkg_simulation/src/middleware/validation.middleware.ts +53 -0
  631. package/simulations/lxpm_pkg_simulation/src/routes/index.ts +97 -0
  632. package/simulations/lxpm_pkg_simulation/src/schema/user.schema.ts +53 -0
  633. package/simulations/lxpm_pkg_simulation/src/server.ts +64 -0
  634. package/simulations/lxpm_pkg_simulation/tsconfig.json +35 -0
  635. package/simulations/lxpm_pkg_simulation/xypriss.config.json +21 -0
  636. package/simulations/pkg/.meta/+xypriss.meta.ts +6 -0
  637. package/simulations/pkg/bun.lock +815 -0
  638. package/simulations/pkg/package-lock.json +4895 -0
  639. package/simulations/pkg/package.json +25 -0
  640. package/simulations/pkg/src/index.ts +15 -0
  641. package/simulations/pkg/src/logger.ts +0 -0
  642. package/simulations/pkg/tsconfig.json +29 -0
  643. package/simulations/pkg/xypriss.config.json +13 -0
  644. package/simulations/server/.meta/+xypriss.meta.ts +6 -0
  645. package/simulations/server/.quickdevignore +1 -0
  646. package/simulations/server/README.md +238 -0
  647. package/simulations/server/bun.lock +1184 -0
  648. package/simulations/server/package-lock.json +4829 -0
  649. package/simulations/server/package.json +25 -0
  650. package/simulations/server/quickdev.config.json +34 -0
  651. package/simulations/server/src/configs/host.conf.ts +83 -0
  652. package/simulations/server/src/configs/xypriss.config.ts +48 -0
  653. package/simulations/server/src/middleware/index.ts +40 -0
  654. package/simulations/server/src/middleware/security.mlw.ts +29 -0
  655. package/simulations/server/src/middleware/validation.middleware.ts +53 -0
  656. package/simulations/server/src/routes/index.ts +97 -0
  657. package/simulations/server/src/schema/user.schema.ts +8 -0
  658. package/simulations/server/src/server.ts +67 -0
  659. package/simulations/server/test_res.js +3 -0
  660. package/simulations/server/tsconfig.json +32 -0
  661. package/simulations/server/xypriss.config.json +22 -0
  662. package/simulations/test-project-goxfpm/.config +37 -0
  663. package/simulations/test-project-goxfpm/.quickdevignore +1 -0
  664. package/simulations/test-project-goxfpm/README.md +236 -0
  665. package/simulations/test-project-goxfpm/package-lock.json +7108 -0
  666. package/simulations/test-project-goxfpm/package.json +9 -0
  667. package/simulations/test-project-goxfpm/quickdev.config.json +34 -0
  668. package/simulations/test-project-goxfpm/src/configs/host.conf.ts +83 -0
  669. package/simulations/test-project-goxfpm/src/configs/xypriss.config.ts +302 -0
  670. package/simulations/test-project-goxfpm/src/middleware/index.ts +40 -0
  671. package/simulations/test-project-goxfpm/src/middleware/security.mlw.ts +29 -0
  672. package/simulations/test-project-goxfpm/src/middleware/validation.middleware.ts +53 -0
  673. package/simulations/test-project-goxfpm/src/routes/index.ts +142 -0
  674. package/simulations/test-project-goxfpm/src/schema/user.schema.ts +53 -0
  675. package/simulations/test-project-goxfpm/src/server.ts +68 -0
  676. package/simulations/test-project-goxfpm/tsconfig.json +35 -0
  677. package/simulations/test-project-goxfpm/xypriss.config.json +12 -0
  678. package/simulations/unpacking-test2/.quickdevignore +1 -0
  679. package/simulations/unpacking-test2/README.md +236 -0
  680. package/simulations/unpacking-test2/package-lock.json +7108 -0
  681. package/simulations/unpacking-test2/package.json +31 -0
  682. package/simulations/unpacking-test2/quickdev.config.json +34 -0
  683. package/simulations/unpacking-test2/src/configs/host.conf.ts +83 -0
  684. package/simulations/unpacking-test2/src/configs/xypriss.config.ts +286 -0
  685. package/simulations/unpacking-test2/src/middleware/index.ts +40 -0
  686. package/simulations/unpacking-test2/src/middleware/security.mlw.ts +29 -0
  687. package/simulations/unpacking-test2/src/middleware/validation.middleware.ts +53 -0
  688. package/simulations/unpacking-test2/src/routes/index.ts +97 -0
  689. package/simulations/unpacking-test2/src/schema/user.schema.ts +53 -0
  690. package/simulations/unpacking-test2/src/server.ts +64 -0
  691. package/simulations/unpacking-test2/tsconfig.json +35 -0
  692. package/simulations/unpacking-test2/xypriss.config.json +21 -0
  693. package/simulations/xems-realworld-testing/README.md +73 -0
  694. package/simulations/xems-realworld-testing/eslint.config.js +23 -0
  695. package/simulations/xems-realworld-testing/index.html +13 -0
  696. package/simulations/xems-realworld-testing/package.json +32 -0
  697. package/simulations/xems-realworld-testing/public/vite.svg +1 -0
  698. package/simulations/xems-realworld-testing/src/App.css +42 -0
  699. package/simulations/xems-realworld-testing/src/App.tsx +56 -0
  700. package/simulations/xems-realworld-testing/src/api.ts +104 -0
  701. package/simulations/xems-realworld-testing/src/components/Dashboard.tsx +219 -0
  702. package/simulations/xems-realworld-testing/src/components/LoginForm.tsx +155 -0
  703. package/simulations/xems-realworld-testing/src/components/RegisterForm.tsx +171 -0
  704. package/simulations/xems-realworld-testing/src/index.css +2 -0
  705. package/simulations/xems-realworld-testing/src/main.tsx +10 -0
  706. package/simulations/xems-realworld-testing/tsconfig.app.json +28 -0
  707. package/simulations/xems-realworld-testing/tsconfig.json +7 -0
  708. package/simulations/xems-realworld-testing/tsconfig.node.json +26 -0
  709. package/simulations/xems-realworld-testing/vite.config.ts +9 -0
  710. package/simulations/xems-server-test/.quickdevignore +1 -0
  711. package/simulations/xems-server-test/README.md +236 -0
  712. package/simulations/xems-server-test/package-lock.json +7108 -0
  713. package/simulations/xems-server-test/package.json +30 -0
  714. package/simulations/xems-server-test/quickdev.config.json +34 -0
  715. package/simulations/xems-server-test/src/configs/host.conf.ts +83 -0
  716. package/simulations/xems-server-test/src/configs/xypriss.config.ts +286 -0
  717. package/simulations/xems-server-test/src/middleware/index.ts +40 -0
  718. package/simulations/xems-server-test/src/middleware/security.mlw.ts +29 -0
  719. package/simulations/xems-server-test/src/middleware/validation.middleware.ts +53 -0
  720. package/simulations/xems-server-test/src/routes/index.ts +97 -0
  721. package/simulations/xems-server-test/src/schema/user.schema.ts +53 -0
  722. package/simulations/xems-server-test/src/server.ts +64 -0
  723. package/simulations/xems-server-test/tsconfig.json +35 -0
  724. package/simulations/xems-server-test/xypriss.config.json +21 -0
  725. package/src/FiUp.ts +102 -0
  726. package/src/cache/CacheFactory.ts +850 -0
  727. package/src/cache/SecureCacheAdapter.ts +1495 -0
  728. package/src/cache/cache-engine.ts +586 -0
  729. package/src/cache/index.ts +28 -0
  730. package/src/cache/type.ts +141 -0
  731. package/src/config.ts +455 -0
  732. package/src/const.ts +730 -0
  733. package/src/encryption/EncryptionService.ts +597 -0
  734. package/src/encryption/index.ts +36 -0
  735. package/src/file-upload.ts +288 -0
  736. package/src/index.ts +183 -0
  737. package/src/middleware/XJsonResponseHandler.ts +210 -0
  738. package/src/middleware/XemsSessionMiddleware.ts +125 -0
  739. package/src/middleware/XyPrissMiddlewareAPI.ts +518 -0
  740. package/src/middleware/built-in/BuiltInMiddleware.ts +567 -0
  741. package/src/middleware/built-in/security/BrowserOnlyProtector.ts +702 -0
  742. package/src/middleware/built-in/security/CommandInjectionDetector.ts +265 -0
  743. package/src/middleware/built-in/security/LDAPInjectionDetector.ts +113 -0
  744. package/src/middleware/built-in/security/MobileOnlyProtector.ts +664 -0
  745. package/src/middleware/built-in/security/PathTraversalDetector.ts +265 -0
  746. package/src/middleware/built-in/security/README.md +208 -0
  747. package/src/middleware/built-in/security/RequestSignatureProtector.ts +626 -0
  748. package/src/middleware/built-in/security/SQLInjectionDetector.ts +434 -0
  749. package/src/middleware/built-in/security/TerminalOnlyProtector.ts +624 -0
  750. package/src/middleware/built-in/security/XXEProtector.ts +212 -0
  751. package/src/middleware/built-in/security/index.ts +26 -0
  752. package/src/middleware/built-in/security/types.ts +175 -0
  753. package/src/middleware/safe-json-middleware.ts +236 -0
  754. package/src/middleware/security-middleware.ts +1541 -0
  755. package/src/plugins/PluginManager.ts +487 -0
  756. package/src/plugins/README.md +25 -0
  757. package/src/plugins/api/PluginAPI.ts +220 -0
  758. package/src/plugins/const/PluginHookIds.ts +76 -0
  759. package/src/plugins/core/PluginManager.ts +977 -0
  760. package/src/plugins/modules/PluginEngine.ts +676 -0
  761. package/src/plugins/modules/PluginRegistry.ts +419 -0
  762. package/src/plugins/modules/PluginRegistry.ts.bak +408 -0
  763. package/src/plugins/modules/builtin/SmartCachePlugin.ts +1082 -0
  764. package/src/plugins/modules/builtin/server-maintenance-plugin.ts +698 -0
  765. package/src/plugins/modules/core/CachePlugin.ts +2523 -0
  766. package/src/plugins/modules/index.ts +48 -0
  767. package/src/plugins/modules/network/builtin/CompressionPlugin.ts +343 -0
  768. package/src/plugins/modules/network/builtin/ConnectionPlugin.ts +941 -0
  769. package/src/plugins/modules/network/builtin/ProxyPlugin.ts +522 -0
  770. package/src/plugins/modules/network/core/NetworkPlugin.ts +323 -0
  771. package/src/plugins/modules/network/core/NetworkPluginFactory.ts +47 -0
  772. package/src/plugins/modules/network/index.ts +28 -0
  773. package/src/plugins/modules/network/types/NetworkTypes.ts +331 -0
  774. package/src/plugins/modules/network/types/cnp.type.ts +17 -0
  775. package/src/plugins/modules/network/utils/NetworkPluginUtils.ts +69 -0
  776. package/src/plugins/modules/types/PluginTypes.ts +277 -0
  777. package/src/plugins/modules/xems/XemsBuiltinPlugin.ts +291 -0
  778. package/src/plugins/modules/xems/XemsPlugin.ts +484 -0
  779. package/src/plugins/modules/xems/index.ts +2 -0
  780. package/src/plugins/plugin-manager.ts +188 -0
  781. package/src/plugins/route-optimization-plugin.ts +559 -0
  782. package/src/plugins/types/PluginTypes.ts +187 -0
  783. package/src/plugins/types/index.ts +84 -0
  784. package/src/quick-start.ts +41 -0
  785. package/src/schemas/plugingSchema.ts +42 -0
  786. package/src/server/FastServer.ts +1196 -0
  787. package/src/server/ServerFactory.ts +105 -0
  788. package/src/server/components/fastapi/CacheManager.ts +292 -0
  789. package/src/server/components/fastapi/FileUploadManager.ts +289 -0
  790. package/src/server/components/fastapi/FileWatcherManager.ts +646 -0
  791. package/src/server/components/fastapi/MonitoringManager.ts +375 -0
  792. package/src/server/components/fastapi/PerformanceManager.ts +382 -0
  793. package/src/server/components/fastapi/RedirectManager.ts +730 -0
  794. package/src/server/components/fastapi/RequestProcessor.ts +404 -0
  795. package/src/server/components/fastapi/RouteManager.ts +250 -0
  796. package/src/server/components/fastapi/WorkerPoolComponent.ts +114 -0
  797. package/src/server/components/fastapi/console/ConsoleInterceptor.ts +1202 -0
  798. package/src/server/components/fastapi/console/encryption/ConsoleEncryption.ts +299 -0
  799. package/src/server/components/fastapi/console/types.ts +318 -0
  800. package/src/server/components/fastapi/smart-routes.ts +485 -0
  801. package/src/server/components/fastapi/templates/redirectHtml.html +863 -0
  802. package/src/server/components/fastapi/templates/redirectTemp.ts +105 -0
  803. package/src/server/components/fastapi/typescript/TypeScriptChecker.ts +502 -0
  804. package/src/server/components/lifecycle/slcm.type.ts +45 -0
  805. package/src/server/components/multi-server/MultiServerApp.ts +667 -0
  806. package/src/server/components/multi-server/MultiServerManager.ts +451 -0
  807. package/src/server/conf/networkConnectionConf.ts +26 -0
  808. package/src/server/conf/proxyConfig.ts +21 -0
  809. package/src/server/conf/rateLimitConfig.ts +57 -0
  810. package/src/server/const/ExecutionPredictor_EP.const.ts +88 -0
  811. package/src/server/const/FileWatcher.config.ts +97 -0
  812. package/src/server/const/default.ts +366 -0
  813. package/src/server/const/http.ts +32 -0
  814. package/src/server/core/HttpServer.ts +574 -0
  815. package/src/server/core/RequestApp.ts +106 -0
  816. package/src/server/core/RequestEnhancer.ts +348 -0
  817. package/src/server/core/ResponseEnhancer.ts +588 -0
  818. package/src/server/core/StartupProcessor.ts +168 -0
  819. package/src/server/core/VirtualServer.ts +32 -0
  820. package/src/server/core/XHSCBridge.ts +779 -0
  821. package/src/server/core/XHSCProtocol.ts +389 -0
  822. package/src/server/core/XyDiagnosticsManager.ts +88 -0
  823. package/src/server/core/XyLifecycleManager.ts +348 -0
  824. package/src/server/core/XyModuleManager.ts +195 -0
  825. package/src/server/core/XyRoutingManager.ts +251 -0
  826. package/src/server/core/XyServerCreator.ts +117 -0
  827. package/src/server/core/XyprissApp.ts +758 -0
  828. package/src/server/core/request/XyRequestManager.ts +288 -0
  829. package/src/server/handlers/NotFoundHandler.ts +99 -0
  830. package/src/server/handlers/templates/notFoundTemplate.ts +662 -0
  831. package/src/server/middleware/MiddlewareManager.ts +296 -0
  832. package/src/server/optimization/ExecutionPredictor.nxs +0 -0
  833. package/src/server/optimization/ExecutionPredictor.ts +274 -0
  834. package/src/server/optimization/PerformanceProfiler.ts +318 -0
  835. package/src/server/optimization/RequestPreCompiler.ts +928 -0
  836. package/src/server/optimization/UltraFastOptimizer.ts +545 -0
  837. package/src/server/optimization/performance-monitor.ts +241 -0
  838. package/src/server/routing/Router.ts +506 -0
  839. package/src/server/routing/index.ts +14 -0
  840. package/src/server/service/Reload/FileWatcher.ts +982 -0
  841. package/src/server/service/Reload/HotReloader.ts +1050 -0
  842. package/src/server/service/Reload/exec/ExecutableBuilder.ts +419 -0
  843. package/src/server/service/Reload/exec/TypeScriptExecutor.ts +439 -0
  844. package/src/server/service/Reload/exec/build-executable.ts +50 -0
  845. package/src/server/service/Reload/types/TSExecutor.type.ts +18 -0
  846. package/src/server/service/Reload/types/fw.types.ts +117 -0
  847. package/src/server/service/Reload/types/hotreloader.ts +29 -0
  848. package/src/server/service/Reload/types/quickdev.type.ts +30 -0
  849. package/src/server/utils/ConfigLoader.ts +437 -0
  850. package/src/server/utils/PortManager.ts +316 -0
  851. package/src/server/utils/WorkerModeHandler.ts +72 -0
  852. package/src/server/utils/es_modules.ts +6 -0
  853. package/src/server/utils/forceClosePort.ts +427 -0
  854. package/src/server/utils/shouldRegisterRouteOnServer.ts +39 -0
  855. package/src/server/utils/trustProxy.ts +1005 -0
  856. package/src/server/utils/wildcardMatcher.ts +281 -0
  857. package/src/sys/FSApi.ts +1271 -0
  858. package/src/sys/PathApi.ts +209 -0
  859. package/src/sys/SysApi.ts +490 -0
  860. package/src/sys/System.ts +36 -0
  861. package/src/sys/XyPrissCache.ts +84 -0
  862. package/src/sys/XyPrissRunner.ts +299 -0
  863. package/src/sys/cmdr.ts +9 -0
  864. package/src/sys/types.ts +250 -0
  865. package/src/sys.ts +473 -0
  866. package/src/types/CpuMon.t.ts +46 -0
  867. package/src/types/ExecutionPredictor.type.ts +26 -0
  868. package/src/types/FiUp.type.ts +90 -0
  869. package/src/types/NotFoundConfig.ts +114 -0
  870. package/src/types/README.md +277 -0
  871. package/src/types/ReqPreCompiler.type.ts +55 -0
  872. package/src/types/UFOptimizer.type.ts +49 -0
  873. package/src/types/XyPrissRouter.types.ts +27 -0
  874. package/src/types/bun_cluster.t.ts +42 -0
  875. package/src/types/cluster.ipc.t.ts +198 -0
  876. package/src/types/components/CacheManager.type.ts +8 -0
  877. package/src/types/components/FWM.type.ts +10 -0
  878. package/src/types/components/MonitoringM.type.ts +13 -0
  879. package/src/types/components/PerfomanceMonitory.type.ts +13 -0
  880. package/src/types/components/PlugingM.type.ts +9 -0
  881. package/src/types/components/ReqProcessor.type.ts +14 -0
  882. package/src/types/components/RouteM.type.ts +12 -0
  883. package/src/types/httpServer.type.ts +154 -0
  884. package/src/types/index.ts +280 -0
  885. package/src/types/middleware-api.types.ts +220 -0
  886. package/src/types/middlewareManager.types.ts +20 -0
  887. package/src/types/mod/cache.ts +491 -0
  888. package/src/types/mod/core.ts +426 -0
  889. package/src/types/mod/monitoring.ts +544 -0
  890. package/src/types/mod/performance.ts +470 -0
  891. package/src/types/mod/routing.ts +454 -0
  892. package/src/types/mod/security.ts +1622 -0
  893. package/src/types/perfomance.ts +58 -0
  894. package/src/types/trustProxy.ts +148 -0
  895. package/src/types/types.ts +2189 -0
  896. package/src/types/xems.type.ts +89 -0
  897. package/src/utils/DotEnvLoader.ts +84 -0
  898. package/src/utils/mergeWithDefaults.ts +223 -0
  899. package/src/xhs/cluster/XHSCWorker.ts +238 -0
  900. package/tools/memory-cli/build.sh +36 -0
  901. package/tools/memory-cli/main.go +401 -0
  902. package/tools/xfpm-go/LICENSE +13 -0
  903. package/tools/xfpm-go/README.md +82 -0
  904. package/tools/xfpm-go/build.sh +91 -0
  905. package/tools/xfpm-go/cmd/xfpm/exec.go +68 -0
  906. package/tools/xfpm-go/cmd/xfpm/init.go +491 -0
  907. package/tools/xfpm-go/cmd/xfpm/list.go +287 -0
  908. package/tools/xfpm-go/cmd/xfpm/main.go +304 -0
  909. package/tools/xfpm-go/cmd/xfpm/run.go +107 -0
  910. package/tools/xfpm-go/cmd/xfpm/uninstall.go +233 -0
  911. package/tools/xfpm-go/cmd/xfpm/update.go +36 -0
  912. package/tools/xfpm-go/dev.sh +1 -0
  913. package/tools/xfpm-go/go.mod +46 -0
  914. package/tools/xfpm-go/go.sum +173 -0
  915. package/tools/xfpm-go/internal/core/cas.go +297 -0
  916. package/tools/xfpm-go/internal/core/config.go +83 -0
  917. package/tools/xfpm-go/internal/core/extractor.go +54 -0
  918. package/tools/xfpm-go/internal/core/installer.go +505 -0
  919. package/tools/xfpm-go/internal/core/project.go +53 -0
  920. package/tools/xfpm-go/internal/core/registry.go +303 -0
  921. package/tools/xfpm-go/internal/core/resolver.go +471 -0
  922. package/tools/xfpm-go/internal/core/script_runner.go +175 -0
  923. package/tools/xfpm-go/internal/utils/lib_version.go +5 -0
  924. package/tools/xfpm-go/internal/utils/logger.go +145 -0
  925. package/tools/xfpm-go/internal/utils/updater.go +131 -0
  926. package/tools/xfpm-go/pkg/npm/README.md +39 -0
  927. package/tools/xfpm-go/pkg/npm/install.js +51 -0
  928. package/tools/xfpm-go/pkg/npm/package.json +29 -0
  929. package/tools/xfpm-go/scripts/bridge.js +130 -0
  930. package/tools/xfpm-go/scripts/install.js +146 -0
  931. package/tools/xfpm-go/scripts/install.ps1 +140 -0
  932. package/tools/xfpm-go/scripts/install.sh +117 -0
  933. package/tools/xfpm-go/test/package/LICENSE +21 -0
  934. package/tools/xfpm-go/test/package/README.md +218 -0
  935. package/tools/xfpm-go/test/package/package.json +115 -0
  936. package/tools/xfpm-go/test.tgz +0 -0
  937. package/tools/xfpm-go/utils/helper_5936.ts +9 -0
  938. package/tools/xfpm-go/version.json +10 -0
  939. package/tools/xfpm-go/xfpm +0 -0
  940. package/tools/xyp/.intentionally-empty-file.o +0 -0
  941. package/tools/xyp/Cargo.lock +2602 -0
  942. package/tools/xyp/Cargo.toml +56 -0
  943. package/tools/xyp/README.md +78 -0
  944. package/tools/xyp/dev +3 -0
  945. package/tools/xyp/index.js +75 -0
  946. package/tools/xyp/install.js +286 -0
  947. package/tools/xyp/package copy.json +64 -0
  948. package/tools/xyp/package.json +65 -0
  949. package/tools/xyp/scripts/build.js +123 -0
  950. package/tools/xyp/scripts/build.sh +85 -0
  951. package/tools/xyp/src/commands/exec.rs +113 -0
  952. package/tools/xyp/src/commands/init.rs +378 -0
  953. package/tools/xyp/src/commands/install.rs +387 -0
  954. package/tools/xyp/src/commands/list.rs +62 -0
  955. package/tools/xyp/src/commands/mod.rs +7 -0
  956. package/tools/xyp/src/commands/run.rs +98 -0
  957. package/tools/xyp/src/commands/start.rs +18 -0
  958. package/tools/xyp/src/commands/uninstall.rs +156 -0
  959. package/tools/xyp/src/core/cas.rs +250 -0
  960. package/tools/xyp/src/core/config.rs +87 -0
  961. package/tools/xyp/src/core/extractor.rs +85 -0
  962. package/tools/xyp/src/core/installer.rs +683 -0
  963. package/tools/xyp/src/core/mod.rs +7 -0
  964. package/tools/xyp/src/core/registry.rs +333 -0
  965. package/tools/xyp/src/core/resolver.rs +830 -0
  966. package/tools/xyp/src/core/script_runner.rs +291 -0
  967. package/tools/xyp/src/main.rs +264 -0
  968. package/tools/xyp/src/utils/mod.rs +1 -0
  969. package/tools/xyp/src/utils/shell.rs +89 -0
  970. package/tools/xyp/xfpm +0 -0
  971. package/tools/xypriss-sys-go/README.md +47 -0
  972. package/tools/xypriss-sys-go/build.sh +139 -0
  973. package/tools/xypriss-sys-go/cmd/xsys/main.go +44 -0
  974. package/tools/xypriss-sys-go/go.mod +35 -0
  975. package/tools/xypriss-sys-go/go.sum +80 -0
  976. package/tools/xypriss-sys-go/internal/cli/archive.go +142 -0
  977. package/tools/xypriss-sys-go/internal/cli/fs.go +462 -0
  978. package/tools/xypriss-sys-go/internal/cli/monitor.go +110 -0
  979. package/tools/xypriss-sys-go/internal/cli/path.go +166 -0
  980. package/tools/xypriss-sys-go/internal/cli/root.go +140 -0
  981. package/tools/xypriss-sys-go/internal/cli/search.go +156 -0
  982. package/tools/xypriss-sys-go/internal/cli/server.go +240 -0
  983. package/tools/xypriss-sys-go/internal/cli/sys.go +321 -0
  984. package/tools/xypriss-sys-go/internal/cluster/intelligence.go +159 -0
  985. package/tools/xypriss-sys-go/internal/cluster/intelligence_unix.go +50 -0
  986. package/tools/xypriss-sys-go/internal/cluster/intelligence_windows.go +39 -0
  987. package/tools/xypriss-sys-go/internal/cluster/manager.go +226 -0
  988. package/tools/xypriss-sys-go/internal/cluster/strategy.go +41 -0
  989. package/tools/xypriss-sys-go/internal/cluster/worker.go +343 -0
  990. package/tools/xypriss-sys-go/internal/cluster/worker_unix.go +45 -0
  991. package/tools/xypriss-sys-go/internal/cluster/worker_windows.go +32 -0
  992. package/tools/xypriss-sys-go/internal/fs/fs.go +783 -0
  993. package/tools/xypriss-sys-go/internal/handlers/archive.go +68 -0
  994. package/tools/xypriss-sys-go/internal/handlers/fs.go +153 -0
  995. package/tools/xypriss-sys-go/internal/handlers/monitor.go +54 -0
  996. package/tools/xypriss-sys-go/internal/handlers/path.go +79 -0
  997. package/tools/xypriss-sys-go/internal/handlers/search.go +60 -0
  998. package/tools/xypriss-sys-go/internal/handlers/sys.go +110 -0
  999. package/tools/xypriss-sys-go/internal/ipc/bridge.go +352 -0
  1000. package/tools/xypriss-sys-go/internal/ipc/circuit_breaker.go +93 -0
  1001. package/tools/xypriss-sys-go/internal/ipc/metrics.go +85 -0
  1002. package/tools/xypriss-sys-go/internal/ipc/types.go +102 -0
  1003. package/tools/xypriss-sys-go/internal/proxy/proxy.go +538 -0
  1004. package/tools/xypriss-sys-go/internal/router/router.go +332 -0
  1005. package/tools/xypriss-sys-go/internal/server/server.go +658 -0
  1006. package/tools/xypriss-sys-go/internal/sys/sys.go +432 -0
  1007. package/tools/xypriss-sys-go/internal/sys/types.go +167 -0
  1008. package/tools/xypriss-sys-go/internal/watcher/watcher.go +104 -0
  1009. package/tsconfig.json +51 -0
  1010. package/vault.xems +1 -0
  1011. package/xfpm +0 -0
  1012. package/xypriss.config.jsonc +22 -0
  1013. package/dist/cjs/index.js +0 -2
  1014. package/dist/cjs/mods/security/src/algorithms/hash-algorithms.js +0 -718
  1015. package/dist/cjs/mods/security/src/algorithms/hash-algorithms.js.map +0 -1
  1016. package/dist/cjs/mods/security/src/algorithms/registry.js +0 -83
  1017. package/dist/cjs/mods/security/src/algorithms/registry.js.map +0 -1
  1018. package/dist/cjs/mods/security/src/components/attestation.js +0 -1065
  1019. package/dist/cjs/mods/security/src/components/attestation.js.map +0 -1
  1020. package/dist/cjs/mods/security/src/components/cache/FastLRU.js +0 -323
  1021. package/dist/cjs/mods/security/src/components/cache/FastLRU.js.map +0 -1
  1022. package/dist/cjs/mods/security/src/components/cache/UFSIMC.js +0 -1133
  1023. package/dist/cjs/mods/security/src/components/cache/UFSIMC.js.map +0 -1
  1024. package/dist/cjs/mods/security/src/components/cache/cacheSys.js +0 -624
  1025. package/dist/cjs/mods/security/src/components/cache/cacheSys.js.map +0 -1
  1026. package/dist/cjs/mods/security/src/components/cache/cacheSys.utils.js +0 -127
  1027. package/dist/cjs/mods/security/src/components/cache/cacheSys.utils.js.map +0 -1
  1028. package/dist/cjs/mods/security/src/components/cache/config/cache.config.js +0 -39
  1029. package/dist/cjs/mods/security/src/components/cache/config/cache.config.js.map +0 -1
  1030. package/dist/cjs/mods/security/src/components/cache/index.js +0 -374
  1031. package/dist/cjs/mods/security/src/components/cache/index.js.map +0 -1
  1032. package/dist/cjs/mods/security/src/components/cache/useCache.js +0 -235
  1033. package/dist/cjs/mods/security/src/components/cache/useCache.js.map +0 -1
  1034. package/dist/cjs/mods/security/src/components/canary-tokens.js +0 -351
  1035. package/dist/cjs/mods/security/src/components/canary-tokens.js.map +0 -1
  1036. package/dist/cjs/mods/security/src/components/entropy-augmentation.js +0 -478
  1037. package/dist/cjs/mods/security/src/components/entropy-augmentation.js.map +0 -1
  1038. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js +0 -338
  1039. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js.map +0 -1
  1040. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js +0 -536
  1041. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js.map +0 -1
  1042. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js +0 -614
  1043. package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js.map +0 -1
  1044. package/dist/cjs/mods/security/src/components/fortified-function/const/exec.const.js +0 -18
  1045. package/dist/cjs/mods/security/src/components/fortified-function/const/exec.const.js.map +0 -1
  1046. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-config.js +0 -356
  1047. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-config.js.map +0 -1
  1048. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-function-core.js +0 -520
  1049. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-function-core.js.map +0 -1
  1050. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-logger.js +0 -246
  1051. package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-logger.js.map +0 -1
  1052. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/api-manager.js +0 -189
  1053. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/api-manager.js.map +0 -1
  1054. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/cache-manager.js +0 -107
  1055. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/cache-manager.js.map +0 -1
  1056. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-context.js +0 -105
  1057. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-context.js.map +0 -1
  1058. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-engine.js +0 -127
  1059. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-engine.js.map +0 -1
  1060. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-router.js +0 -93
  1061. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-router.js.map +0 -1
  1062. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/memory-manager.js +0 -147
  1063. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/memory-manager.js.map +0 -1
  1064. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/security-manager.js +0 -102
  1065. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/security-manager.js.map +0 -1
  1066. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/stats-manager.js +0 -159
  1067. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/stats-manager.js.map +0 -1
  1068. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/timing-manager.js +0 -125
  1069. package/dist/cjs/mods/security/src/components/fortified-function/core/mods/timing-manager.js.map +0 -1
  1070. package/dist/cjs/mods/security/src/components/fortified-function/engines/analytics-engine.js +0 -370
  1071. package/dist/cjs/mods/security/src/components/fortified-function/engines/analytics-engine.js.map +0 -1
  1072. package/dist/cjs/mods/security/src/components/fortified-function/engines/execution-engine.js +0 -402
  1073. package/dist/cjs/mods/security/src/components/fortified-function/engines/execution-engine.js.map +0 -1
  1074. package/dist/cjs/mods/security/src/components/fortified-function/index.js +0 -174
  1075. package/dist/cjs/mods/security/src/components/fortified-function/index.js.map +0 -1
  1076. package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-monitor.js +0 -240
  1077. package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-monitor.js.map +0 -1
  1078. package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-timer.js +0 -188
  1079. package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-timer.js.map +0 -1
  1080. package/dist/cjs/mods/security/src/components/fortified-function/security/security-handler.js +0 -254
  1081. package/dist/cjs/mods/security/src/components/fortified-function/security/security-handler.js.map +0 -1
  1082. package/dist/cjs/mods/security/src/components/fortified-function/serializer/safe-serializer.js +0 -350
  1083. package/dist/cjs/mods/security/src/components/fortified-function/serializer/safe-serializer.js.map +0 -1
  1084. package/dist/cjs/mods/security/src/components/fortified-function/smart-cache.js +0 -693
  1085. package/dist/cjs/mods/security/src/components/fortified-function/smart-cache.js.map +0 -1
  1086. package/dist/cjs/mods/security/src/components/fortified-function/types/types.js +0 -16
  1087. package/dist/cjs/mods/security/src/components/fortified-function/types/types.js.map +0 -1
  1088. package/dist/cjs/mods/security/src/components/fortified-function/utils/utils.js +0 -76
  1089. package/dist/cjs/mods/security/src/components/fortified-function/utils/utils.js.map +0 -1
  1090. package/dist/cjs/mods/security/src/components/memory-hard.js +0 -922
  1091. package/dist/cjs/mods/security/src/components/memory-hard.js.map +0 -1
  1092. package/dist/cjs/mods/security/src/components/post-quantum.js +0 -323
  1093. package/dist/cjs/mods/security/src/components/post-quantum.js.map +0 -1
  1094. package/dist/cjs/mods/security/src/components/runtime-verification.js +0 -645
  1095. package/dist/cjs/mods/security/src/components/runtime-verification.js.map +0 -1
  1096. package/dist/cjs/mods/security/src/components/secure-array/core/secure-array-core.js +0 -1572
  1097. package/dist/cjs/mods/security/src/components/secure-array/core/secure-array-core.js.map +0 -1
  1098. package/dist/cjs/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js +0 -330
  1099. package/dist/cjs/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js.map +0 -1
  1100. package/dist/cjs/mods/security/src/components/secure-array/events/event-manager.js +0 -270
  1101. package/dist/cjs/mods/security/src/components/secure-array/events/event-manager.js.map +0 -1
  1102. package/dist/cjs/mods/security/src/components/secure-array/index.js +0 -66
  1103. package/dist/cjs/mods/security/src/components/secure-array/index.js.map +0 -1
  1104. package/dist/cjs/mods/security/src/components/secure-array/metadata/metadata-manager.js +0 -331
  1105. package/dist/cjs/mods/security/src/components/secure-array/metadata/metadata-manager.js.map +0 -1
  1106. package/dist/cjs/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js +0 -390
  1107. package/dist/cjs/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js.map +0 -1
  1108. package/dist/cjs/mods/security/src/components/secure-array/types/index.js +0 -87
  1109. package/dist/cjs/mods/security/src/components/secure-array/types/index.js.map +0 -1
  1110. package/dist/cjs/mods/security/src/components/secure-array/utils/id-generator.js +0 -80
  1111. package/dist/cjs/mods/security/src/components/secure-array/utils/id-generator.js.map +0 -1
  1112. package/dist/cjs/mods/security/src/components/secure-array/utils/validation.js +0 -275
  1113. package/dist/cjs/mods/security/src/components/secure-array/utils/validation.js.map +0 -1
  1114. package/dist/cjs/mods/security/src/components/secure-memory.js +0 -906
  1115. package/dist/cjs/mods/security/src/components/secure-memory.js.map +0 -1
  1116. package/dist/cjs/mods/security/src/components/secure-object/core/secure-object-core.js +0 -1605
  1117. package/dist/cjs/mods/security/src/components/secure-object/core/secure-object-core.js.map +0 -1
  1118. package/dist/cjs/mods/security/src/components/secure-object/encryption/crypto-handler.js +0 -362
  1119. package/dist/cjs/mods/security/src/components/secure-object/encryption/crypto-handler.js.map +0 -1
  1120. package/dist/cjs/mods/security/src/components/secure-object/encryption/sensitive-keys.js +0 -206
  1121. package/dist/cjs/mods/security/src/components/secure-object/encryption/sensitive-keys.js.map +0 -1
  1122. package/dist/cjs/mods/security/src/components/secure-object/events/event-manager.js +0 -197
  1123. package/dist/cjs/mods/security/src/components/secure-object/events/event-manager.js.map +0 -1
  1124. package/dist/cjs/mods/security/src/components/secure-object/index.js +0 -67
  1125. package/dist/cjs/mods/security/src/components/secure-object/index.js.map +0 -1
  1126. package/dist/cjs/mods/security/src/components/secure-object/metadata/metadata-manager.js +0 -183
  1127. package/dist/cjs/mods/security/src/components/secure-object/metadata/metadata-manager.js.map +0 -1
  1128. package/dist/cjs/mods/security/src/components/secure-object/serialization/serialization-handler.js +0 -197
  1129. package/dist/cjs/mods/security/src/components/secure-object/serialization/serialization-handler.js.map +0 -1
  1130. package/dist/cjs/mods/security/src/components/secure-object/utils/id-generator.js +0 -64
  1131. package/dist/cjs/mods/security/src/components/secure-object/utils/id-generator.js.map +0 -1
  1132. package/dist/cjs/mods/security/src/components/secure-object/utils/validation.js +0 -239
  1133. package/dist/cjs/mods/security/src/components/secure-object/utils/validation.js.map +0 -1
  1134. package/dist/cjs/mods/security/src/components/secure-serialization.js +0 -772
  1135. package/dist/cjs/mods/security/src/components/secure-serialization.js.map +0 -1
  1136. package/dist/cjs/mods/security/src/components/secure-string/advanced/entropy-analyzer.js +0 -308
  1137. package/dist/cjs/mods/security/src/components/secure-string/advanced/entropy-analyzer.js.map +0 -1
  1138. package/dist/cjs/mods/security/src/components/secure-string/advanced/performance-monitor.js +0 -335
  1139. package/dist/cjs/mods/security/src/components/secure-string/advanced/performance-monitor.js.map +0 -1
  1140. package/dist/cjs/mods/security/src/components/secure-string/advanced/quantum-safe.js +0 -245
  1141. package/dist/cjs/mods/security/src/components/secure-string/advanced/quantum-safe.js.map +0 -1
  1142. package/dist/cjs/mods/security/src/components/secure-string/buffer/buffer-manager.js +0 -205
  1143. package/dist/cjs/mods/security/src/components/secure-string/buffer/buffer-manager.js.map +0 -1
  1144. package/dist/cjs/mods/security/src/components/secure-string/core/secure-string-core.js +0 -788
  1145. package/dist/cjs/mods/security/src/components/secure-string/core/secure-string-core.js.map +0 -1
  1146. package/dist/cjs/mods/security/src/components/secure-string/crypto/crypto-operations.js +0 -319
  1147. package/dist/cjs/mods/security/src/components/secure-string/crypto/crypto-operations.js.map +0 -1
  1148. package/dist/cjs/mods/security/src/components/secure-string/operations/comparison-operations.js +0 -221
  1149. package/dist/cjs/mods/security/src/components/secure-string/operations/comparison-operations.js.map +0 -1
  1150. package/dist/cjs/mods/security/src/components/secure-string/operations/string-operations.js +0 -234
  1151. package/dist/cjs/mods/security/src/components/secure-string/operations/string-operations.js.map +0 -1
  1152. package/dist/cjs/mods/security/src/components/secure-string/types/index.js +0 -41
  1153. package/dist/cjs/mods/security/src/components/secure-string/types/index.js.map +0 -1
  1154. package/dist/cjs/mods/security/src/components/secure-string/validation/string-validator.js +0 -334
  1155. package/dist/cjs/mods/security/src/components/secure-string/validation/string-validator.js.map +0 -1
  1156. package/dist/cjs/mods/security/src/components/side-channel.js +0 -146
  1157. package/dist/cjs/mods/security/src/components/side-channel.js.map +0 -1
  1158. package/dist/cjs/mods/security/src/components/tamper-evident-logging.js +0 -391
  1159. package/dist/cjs/mods/security/src/components/tamper-evident-logging.js.map +0 -1
  1160. package/dist/cjs/mods/security/src/const/buffer.const.js +0 -15
  1161. package/dist/cjs/mods/security/src/const/buffer.const.js.map +0 -1
  1162. package/dist/cjs/mods/security/src/core/crypto.js +0 -779
  1163. package/dist/cjs/mods/security/src/core/crypto.js.map +0 -1
  1164. package/dist/cjs/mods/security/src/core/hash/hash-advanced.js +0 -388
  1165. package/dist/cjs/mods/security/src/core/hash/hash-advanced.js.map +0 -1
  1166. package/dist/cjs/mods/security/src/core/hash/hash-core.js +0 -410
  1167. package/dist/cjs/mods/security/src/core/hash/hash-core.js.map +0 -1
  1168. package/dist/cjs/mods/security/src/core/hash/hash-entropy.js +0 -307
  1169. package/dist/cjs/mods/security/src/core/hash/hash-entropy.js.map +0 -1
  1170. package/dist/cjs/mods/security/src/core/hash/hash-security.js +0 -372
  1171. package/dist/cjs/mods/security/src/core/hash/hash-security.js.map +0 -1
  1172. package/dist/cjs/mods/security/src/core/hash/hash-types.js +0 -16
  1173. package/dist/cjs/mods/security/src/core/hash/hash-types.js.map +0 -1
  1174. package/dist/cjs/mods/security/src/core/hash/hash-utils.js +0 -328
  1175. package/dist/cjs/mods/security/src/core/hash/hash-utils.js.map +0 -1
  1176. package/dist/cjs/mods/security/src/core/hash/hash-validator.js +0 -312
  1177. package/dist/cjs/mods/security/src/core/hash/hash-validator.js.map +0 -1
  1178. package/dist/cjs/mods/security/src/core/hash.js +0 -25
  1179. package/dist/cjs/mods/security/src/core/hash.js.map +0 -1
  1180. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js +0 -135
  1181. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js.map +0 -1
  1182. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js +0 -293
  1183. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js.map +0 -1
  1184. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js +0 -317
  1185. package/dist/cjs/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js.map +0 -1
  1186. package/dist/cjs/mods/security/src/core/keys/keys-core.js +0 -201
  1187. package/dist/cjs/mods/security/src/core/keys/keys-core.js.map +0 -1
  1188. package/dist/cjs/mods/security/src/core/keys/keys-logger.js +0 -234
  1189. package/dist/cjs/mods/security/src/core/keys/keys-logger.js.map +0 -1
  1190. package/dist/cjs/mods/security/src/core/keys/keys-types.js +0 -65
  1191. package/dist/cjs/mods/security/src/core/keys/keys-types.js.map +0 -1
  1192. package/dist/cjs/mods/security/src/core/keys/keys-utils.js +0 -322
  1193. package/dist/cjs/mods/security/src/core/keys/keys-utils.js.map +0 -1
  1194. package/dist/cjs/mods/security/src/core/keys.js +0 -136
  1195. package/dist/cjs/mods/security/src/core/keys.js.map +0 -1
  1196. package/dist/cjs/mods/security/src/core/password/index.js +0 -122
  1197. package/dist/cjs/mods/security/src/core/password/index.js.map +0 -1
  1198. package/dist/cjs/mods/security/src/core/password/password-algorithms.js +0 -397
  1199. package/dist/cjs/mods/security/src/core/password/password-algorithms.js.map +0 -1
  1200. package/dist/cjs/mods/security/src/core/password/password-core.js +0 -294
  1201. package/dist/cjs/mods/security/src/core/password/password-core.js.map +0 -1
  1202. package/dist/cjs/mods/security/src/core/password/password-generator.js +0 -365
  1203. package/dist/cjs/mods/security/src/core/password/password-generator.js.map +0 -1
  1204. package/dist/cjs/mods/security/src/core/password/password-migration.js +0 -237
  1205. package/dist/cjs/mods/security/src/core/password/password-migration.js.map +0 -1
  1206. package/dist/cjs/mods/security/src/core/password/password-security.js +0 -534
  1207. package/dist/cjs/mods/security/src/core/password/password-security.js.map +0 -1
  1208. package/dist/cjs/mods/security/src/core/password/password-types.js +0 -39
  1209. package/dist/cjs/mods/security/src/core/password/password-types.js.map +0 -1
  1210. package/dist/cjs/mods/security/src/core/password/password-utils.js +0 -651
  1211. package/dist/cjs/mods/security/src/core/password/password-utils.js.map +0 -1
  1212. package/dist/cjs/mods/security/src/core/password/swlist.js +0 -1122
  1213. package/dist/cjs/mods/security/src/core/password/swlist.js.map +0 -1
  1214. package/dist/cjs/mods/security/src/core/random/random-core.js +0 -962
  1215. package/dist/cjs/mods/security/src/core/random/random-core.js.map +0 -1
  1216. package/dist/cjs/mods/security/src/core/random/random-crypto.js +0 -339
  1217. package/dist/cjs/mods/security/src/core/random/random-crypto.js.map +0 -1
  1218. package/dist/cjs/mods/security/src/core/random/random-entropy.js +0 -387
  1219. package/dist/cjs/mods/security/src/core/random/random-entropy.js.map +0 -1
  1220. package/dist/cjs/mods/security/src/core/random/random-generators.js +0 -344
  1221. package/dist/cjs/mods/security/src/core/random/random-generators.js.map +0 -1
  1222. package/dist/cjs/mods/security/src/core/random/random-sources.js +0 -426
  1223. package/dist/cjs/mods/security/src/core/random/random-sources.js.map +0 -1
  1224. package/dist/cjs/mods/security/src/core/random/random-tokens.js +0 -309
  1225. package/dist/cjs/mods/security/src/core/random/random-tokens.js.map +0 -1
  1226. package/dist/cjs/mods/security/src/core/random/random-types.js +0 -36
  1227. package/dist/cjs/mods/security/src/core/random/random-types.js.map +0 -1
  1228. package/dist/cjs/mods/security/src/core/validators.js +0 -200
  1229. package/dist/cjs/mods/security/src/core/validators.js.map +0 -1
  1230. package/dist/cjs/mods/security/src/helpers/Uint8Array.js +0 -335
  1231. package/dist/cjs/mods/security/src/helpers/Uint8Array.js.map +0 -1
  1232. package/dist/cjs/mods/security/src/helpers/createEnu.js +0 -27
  1233. package/dist/cjs/mods/security/src/helpers/createEnu.js.map +0 -1
  1234. package/dist/cjs/mods/security/src/index.js +0 -406
  1235. package/dist/cjs/mods/security/src/index.js.map +0 -1
  1236. package/dist/cjs/mods/security/src/types/global.js +0 -51
  1237. package/dist/cjs/mods/security/src/types/global.js.map +0 -1
  1238. package/dist/cjs/mods/security/src/types/secure-mem.type.js +0 -106
  1239. package/dist/cjs/mods/security/src/types/secure-mem.type.js.map +0 -1
  1240. package/dist/cjs/mods/security/src/types/secure-memory.js +0 -20
  1241. package/dist/cjs/mods/security/src/types/secure-memory.js.map +0 -1
  1242. package/dist/cjs/mods/security/src/types.js +0 -63
  1243. package/dist/cjs/mods/security/src/types.js.map +0 -1
  1244. package/dist/cjs/mods/security/src/utils/CryptoAlgorithmUtils.js +0 -71
  1245. package/dist/cjs/mods/security/src/utils/CryptoAlgorithmUtils.js.map +0 -1
  1246. package/dist/cjs/mods/security/src/utils/constants.js +0 -111
  1247. package/dist/cjs/mods/security/src/utils/constants.js.map +0 -1
  1248. package/dist/cjs/mods/security/src/utils/crypto.utils.js +0 -386
  1249. package/dist/cjs/mods/security/src/utils/crypto.utils.js.map +0 -1
  1250. package/dist/cjs/mods/security/src/utils/dataConverter.js +0 -74
  1251. package/dist/cjs/mods/security/src/utils/dataConverter.js.map +0 -1
  1252. package/dist/cjs/mods/security/src/utils/encoding.js +0 -290
  1253. package/dist/cjs/mods/security/src/utils/encoding.js.map +0 -1
  1254. package/dist/cjs/mods/security/src/utils/errorHandler.js +0 -140
  1255. package/dist/cjs/mods/security/src/utils/errorHandler.js.map +0 -1
  1256. package/dist/cjs/mods/security/src/utils/memory/config-manager.js +0 -290
  1257. package/dist/cjs/mods/security/src/utils/memory/config-manager.js.map +0 -1
  1258. package/dist/cjs/mods/security/src/utils/memory/event-manager.js +0 -277
  1259. package/dist/cjs/mods/security/src/utils/memory/event-manager.js.map +0 -1
  1260. package/dist/cjs/mods/security/src/utils/memory/index.js +0 -162
  1261. package/dist/cjs/mods/security/src/utils/memory/index.js.map +0 -1
  1262. package/dist/cjs/mods/security/src/utils/memory/memory-manager.js +0 -888
  1263. package/dist/cjs/mods/security/src/utils/memory/memory-manager.js.map +0 -1
  1264. package/dist/cjs/mods/security/src/utils/memory/memory-pool.js +0 -356
  1265. package/dist/cjs/mods/security/src/utils/memory/memory-pool.js.map +0 -1
  1266. package/dist/cjs/mods/security/src/utils/memory/reference-tracker.js +0 -384
  1267. package/dist/cjs/mods/security/src/utils/memory/reference-tracker.js.map +0 -1
  1268. package/dist/cjs/mods/security/src/utils/memory/types.js +0 -56
  1269. package/dist/cjs/mods/security/src/utils/memory/types.js.map +0 -1
  1270. package/dist/cjs/mods/security/src/utils/patterns.js +0 -127
  1271. package/dist/cjs/mods/security/src/utils/patterns.js.map +0 -1
  1272. package/dist/cjs/mods/security/src/utils/performanceMonitor.js +0 -249
  1273. package/dist/cjs/mods/security/src/utils/performanceMonitor.js.map +0 -1
  1274. package/dist/cjs/mods/security/src/utils/stats.js +0 -182
  1275. package/dist/cjs/mods/security/src/utils/stats.js.map +0 -1
  1276. package/dist/cjs/package.json +0 -3
  1277. package/dist/cjs/shared/logger/Logger.js +0 -591
  1278. package/dist/cjs/shared/logger/Logger.js.map +0 -1
  1279. package/dist/cjs/src/FiUp.js +0 -88
  1280. package/dist/cjs/src/FiUp.js.map +0 -1
  1281. package/dist/cjs/src/cache/CacheFactory.js +0 -416
  1282. package/dist/cjs/src/cache/CacheFactory.js.map +0 -1
  1283. package/dist/cjs/src/cache/SecureCacheAdapter.js +0 -1239
  1284. package/dist/cjs/src/cache/SecureCacheAdapter.js.map +0 -1
  1285. package/dist/cjs/src/cluster/bun-cluster-manager.js +0 -1656
  1286. package/dist/cjs/src/cluster/bun-cluster-manager.js.map +0 -1
  1287. package/dist/cjs/src/cluster/cluster-manager.js +0 -1023
  1288. package/dist/cjs/src/cluster/cluster-manager.js.map +0 -1
  1289. package/dist/cjs/src/cluster/memory-manager.js +0 -485
  1290. package/dist/cjs/src/cluster/memory-manager.js.map +0 -1
  1291. package/dist/cjs/src/cluster/modules/AutoScaler.js +0 -532
  1292. package/dist/cjs/src/cluster/modules/AutoScaler.js.map +0 -1
  1293. package/dist/cjs/src/cluster/modules/BunIPCManager.js +0 -603
  1294. package/dist/cjs/src/cluster/modules/BunIPCManager.js.map +0 -1
  1295. package/dist/cjs/src/cluster/modules/ClusterPersistenceManager.js +0 -437
  1296. package/dist/cjs/src/cluster/modules/ClusterPersistenceManager.js.map +0 -1
  1297. package/dist/cjs/src/cluster/modules/CpuMonitor.js +0 -659
  1298. package/dist/cjs/src/cluster/modules/CpuMonitor.js.map +0 -1
  1299. package/dist/cjs/src/cluster/modules/CrossPlatformMemory.js +0 -329
  1300. package/dist/cjs/src/cluster/modules/CrossPlatformMemory.js.map +0 -1
  1301. package/dist/cjs/src/cluster/modules/EventLoopMonitor.js +0 -265
  1302. package/dist/cjs/src/cluster/modules/EventLoopMonitor.js.map +0 -1
  1303. package/dist/cjs/src/cluster/modules/GCStatsTracker.js +0 -200
  1304. package/dist/cjs/src/cluster/modules/GCStatsTracker.js.map +0 -1
  1305. package/dist/cjs/src/cluster/modules/HealthMonitor.js +0 -461
  1306. package/dist/cjs/src/cluster/modules/HealthMonitor.js.map +0 -1
  1307. package/dist/cjs/src/cluster/modules/HeapStatsCollector.js +0 -111
  1308. package/dist/cjs/src/cluster/modules/HeapStatsCollector.js.map +0 -1
  1309. package/dist/cjs/src/cluster/modules/IPCManager.js +0 -781
  1310. package/dist/cjs/src/cluster/modules/IPCManager.js.map +0 -1
  1311. package/dist/cjs/src/cluster/modules/MetricsCollector.js +0 -559
  1312. package/dist/cjs/src/cluster/modules/MetricsCollector.js.map +0 -1
  1313. package/dist/cjs/src/cluster/modules/NetworkTracker.js +0 -162
  1314. package/dist/cjs/src/cluster/modules/NetworkTracker.js.map +0 -1
  1315. package/dist/cjs/src/cluster/modules/ProcessMonitor.js +0 -513
  1316. package/dist/cjs/src/cluster/modules/ProcessMonitor.js.map +0 -1
  1317. package/dist/cjs/src/cluster/modules/ThroughputCalculator.js +0 -186
  1318. package/dist/cjs/src/cluster/modules/ThroughputCalculator.js.map +0 -1
  1319. package/dist/cjs/src/cluster/modules/WorkerManager.js +0 -1186
  1320. package/dist/cjs/src/cluster/modules/WorkerManager.js.map +0 -1
  1321. package/dist/cjs/src/cluster/modules/strategy/LoadBalancer.js +0 -1123
  1322. package/dist/cjs/src/cluster/modules/strategy/LoadBalancer.js.map +0 -1
  1323. package/dist/cjs/src/config.js +0 -366
  1324. package/dist/cjs/src/config.js.map +0 -1
  1325. package/dist/cjs/src/const.js +0 -577
  1326. package/dist/cjs/src/const.js.map +0 -1
  1327. package/dist/cjs/src/encryption/EncryptionService.js +0 -422
  1328. package/dist/cjs/src/encryption/EncryptionService.js.map +0 -1
  1329. package/dist/cjs/src/file-upload.js +0 -259
  1330. package/dist/cjs/src/file-upload.js.map +0 -1
  1331. package/dist/cjs/src/index.js +0 -100
  1332. package/dist/cjs/src/index.js.map +0 -1
  1333. package/dist/cjs/src/middleware/XJsonResponseHandler.js +0 -152
  1334. package/dist/cjs/src/middleware/XJsonResponseHandler.js.map +0 -1
  1335. package/dist/cjs/src/middleware/XemsSessionMiddleware.js +0 -88
  1336. package/dist/cjs/src/middleware/XemsSessionMiddleware.js.map +0 -1
  1337. package/dist/cjs/src/middleware/XyPrissMiddlewareAPI.js +0 -354
  1338. package/dist/cjs/src/middleware/XyPrissMiddlewareAPI.js.map +0 -1
  1339. package/dist/cjs/src/middleware/built-in/BuiltInMiddleware.js +0 -524
  1340. package/dist/cjs/src/middleware/built-in/BuiltInMiddleware.js.map +0 -1
  1341. package/dist/cjs/src/middleware/built-in/security/BrowserOnlyProtector.js +0 -552
  1342. package/dist/cjs/src/middleware/built-in/security/BrowserOnlyProtector.js.map +0 -1
  1343. package/dist/cjs/src/middleware/built-in/security/CommandInjectionDetector.js +0 -215
  1344. package/dist/cjs/src/middleware/built-in/security/CommandInjectionDetector.js.map +0 -1
  1345. package/dist/cjs/src/middleware/built-in/security/LDAPInjectionDetector.js +0 -96
  1346. package/dist/cjs/src/middleware/built-in/security/LDAPInjectionDetector.js.map +0 -1
  1347. package/dist/cjs/src/middleware/built-in/security/MobileOnlyProtector.js +0 -504
  1348. package/dist/cjs/src/middleware/built-in/security/MobileOnlyProtector.js.map +0 -1
  1349. package/dist/cjs/src/middleware/built-in/security/PathTraversalDetector.js +0 -212
  1350. package/dist/cjs/src/middleware/built-in/security/PathTraversalDetector.js.map +0 -1
  1351. package/dist/cjs/src/middleware/built-in/security/RequestSignatureProtector.js +0 -481
  1352. package/dist/cjs/src/middleware/built-in/security/RequestSignatureProtector.js.map +0 -1
  1353. package/dist/cjs/src/middleware/built-in/security/SQLInjectionDetector.js +0 -335
  1354. package/dist/cjs/src/middleware/built-in/security/SQLInjectionDetector.js.map +0 -1
  1355. package/dist/cjs/src/middleware/built-in/security/TerminalOnlyProtector.js +0 -478
  1356. package/dist/cjs/src/middleware/built-in/security/TerminalOnlyProtector.js.map +0 -1
  1357. package/dist/cjs/src/middleware/built-in/security/XXEProtector.js +0 -175
  1358. package/dist/cjs/src/middleware/built-in/security/XXEProtector.js.map +0 -1
  1359. package/dist/cjs/src/middleware/safe-json-middleware.js +0 -159
  1360. package/dist/cjs/src/middleware/safe-json-middleware.js.map +0 -1
  1361. package/dist/cjs/src/middleware/security-middleware.js +0 -1059
  1362. package/dist/cjs/src/middleware/security-middleware.js.map +0 -1
  1363. package/dist/cjs/src/plugins/PluginManager.js +0 -410
  1364. package/dist/cjs/src/plugins/PluginManager.js.map +0 -1
  1365. package/dist/cjs/src/plugins/api/PluginAPI.js +0 -188
  1366. package/dist/cjs/src/plugins/api/PluginAPI.js.map +0 -1
  1367. package/dist/cjs/src/plugins/const/PluginHookIds.js +0 -64
  1368. package/dist/cjs/src/plugins/const/PluginHookIds.js.map +0 -1
  1369. package/dist/cjs/src/plugins/core/PluginManager.js +0 -677
  1370. package/dist/cjs/src/plugins/core/PluginManager.js.map +0 -1
  1371. package/dist/cjs/src/plugins/modules/PluginEngine.js +0 -494
  1372. package/dist/cjs/src/plugins/modules/PluginEngine.js.map +0 -1
  1373. package/dist/cjs/src/plugins/modules/PluginRegistry.js +0 -309
  1374. package/dist/cjs/src/plugins/modules/PluginRegistry.js.map +0 -1
  1375. package/dist/cjs/src/plugins/modules/builtin/JWTAuthPlugin.js +0 -591
  1376. package/dist/cjs/src/plugins/modules/builtin/JWTAuthPlugin.js.map +0 -1
  1377. package/dist/cjs/src/plugins/modules/builtin/ResponseTimePlugin.js +0 -413
  1378. package/dist/cjs/src/plugins/modules/builtin/ResponseTimePlugin.js.map +0 -1
  1379. package/dist/cjs/src/plugins/modules/builtin/SmartCachePlugin.js +0 -843
  1380. package/dist/cjs/src/plugins/modules/builtin/SmartCachePlugin.js.map +0 -1
  1381. package/dist/cjs/src/plugins/modules/builtin/server-maintenance-plugin.js +0 -588
  1382. package/dist/cjs/src/plugins/modules/builtin/server-maintenance-plugin.js.map +0 -1
  1383. package/dist/cjs/src/plugins/modules/core/CachePlugin.js +0 -1977
  1384. package/dist/cjs/src/plugins/modules/core/CachePlugin.js.map +0 -1
  1385. package/dist/cjs/src/plugins/modules/core/PerformancePlugin.js +0 -894
  1386. package/dist/cjs/src/plugins/modules/core/PerformancePlugin.js.map +0 -1
  1387. package/dist/cjs/src/plugins/modules/core/SecurityPlugin.js +0 -799
  1388. package/dist/cjs/src/plugins/modules/core/SecurityPlugin.js.map +0 -1
  1389. package/dist/cjs/src/plugins/modules/index.js +0 -302
  1390. package/dist/cjs/src/plugins/modules/index.js.map +0 -1
  1391. package/dist/cjs/src/plugins/modules/network/builtin/CompressionPlugin.js +0 -302
  1392. package/dist/cjs/src/plugins/modules/network/builtin/CompressionPlugin.js.map +0 -1
  1393. package/dist/cjs/src/plugins/modules/network/builtin/ConnectionPlugin.js +0 -797
  1394. package/dist/cjs/src/plugins/modules/network/builtin/ConnectionPlugin.js.map +0 -1
  1395. package/dist/cjs/src/plugins/modules/network/builtin/ProxyPlugin.js +0 -424
  1396. package/dist/cjs/src/plugins/modules/network/builtin/ProxyPlugin.js.map +0 -1
  1397. package/dist/cjs/src/plugins/modules/network/builtin/RateLimitPlugin.js +0 -605
  1398. package/dist/cjs/src/plugins/modules/network/builtin/RateLimitPlugin.js.map +0 -1
  1399. package/dist/cjs/src/plugins/modules/network/core/NetworkPlugin.js +0 -230
  1400. package/dist/cjs/src/plugins/modules/network/core/NetworkPlugin.js.map +0 -1
  1401. package/dist/cjs/src/plugins/modules/network/core/NetworkPluginFactory.js +0 -40
  1402. package/dist/cjs/src/plugins/modules/network/core/NetworkPluginFactory.js.map +0 -1
  1403. package/dist/cjs/src/plugins/modules/network/types/NetworkTypes.js +0 -24
  1404. package/dist/cjs/src/plugins/modules/network/types/NetworkTypes.js.map +0 -1
  1405. package/dist/cjs/src/plugins/modules/network/utils/NetworkPluginUtils.js +0 -63
  1406. package/dist/cjs/src/plugins/modules/network/utils/NetworkPluginUtils.js.map +0 -1
  1407. package/dist/cjs/src/plugins/modules/types/PluginTypes.js +0 -48
  1408. package/dist/cjs/src/plugins/modules/types/PluginTypes.js.map +0 -1
  1409. package/dist/cjs/src/plugins/modules/xems/XemsBuiltinPlugin.js +0 -216
  1410. package/dist/cjs/src/plugins/modules/xems/XemsBuiltinPlugin.js.map +0 -1
  1411. package/dist/cjs/src/plugins/modules/xems/XemsPlugin.js +0 -354
  1412. package/dist/cjs/src/plugins/modules/xems/XemsPlugin.js.map +0 -1
  1413. package/dist/cjs/src/plugins/plugin-manager.js +0 -151
  1414. package/dist/cjs/src/plugins/plugin-manager.js.map +0 -1
  1415. package/dist/cjs/src/plugins/route-optimization-plugin.js +0 -421
  1416. package/dist/cjs/src/plugins/route-optimization-plugin.js.map +0 -1
  1417. package/dist/cjs/src/plugins/server-maintenance-plugin.js +0 -588
  1418. package/dist/cjs/src/plugins/server-maintenance-plugin.js.map +0 -1
  1419. package/dist/cjs/src/quick-start.js +0 -43
  1420. package/dist/cjs/src/quick-start.js.map +0 -1
  1421. package/dist/cjs/src/schemas/plugingSchema.js +0 -40
  1422. package/dist/cjs/src/schemas/plugingSchema.js.map +0 -1
  1423. package/dist/cjs/src/server/FastServer.js +0 -858
  1424. package/dist/cjs/src/server/FastServer.js.map +0 -1
  1425. package/dist/cjs/src/server/ServerFactory.js +0 -67
  1426. package/dist/cjs/src/server/ServerFactory.js.map +0 -1
  1427. package/dist/cjs/src/server/components/fastapi/CacheManager.js +0 -245
  1428. package/dist/cjs/src/server/components/fastapi/CacheManager.js.map +0 -1
  1429. package/dist/cjs/src/server/components/fastapi/ClusterManagerComponent.js +0 -569
  1430. package/dist/cjs/src/server/components/fastapi/ClusterManagerComponent.js.map +0 -1
  1431. package/dist/cjs/src/server/components/fastapi/FileUploadManager.js +0 -197
  1432. package/dist/cjs/src/server/components/fastapi/FileUploadManager.js.map +0 -1
  1433. package/dist/cjs/src/server/components/fastapi/FileWatcherManager.js +0 -536
  1434. package/dist/cjs/src/server/components/fastapi/FileWatcherManager.js.map +0 -1
  1435. package/dist/cjs/src/server/components/fastapi/MonitoringManager.js +0 -307
  1436. package/dist/cjs/src/server/components/fastapi/MonitoringManager.js.map +0 -1
  1437. package/dist/cjs/src/server/components/fastapi/PerformanceManager.js +0 -297
  1438. package/dist/cjs/src/server/components/fastapi/PerformanceManager.js.map +0 -1
  1439. package/dist/cjs/src/server/components/fastapi/PluginManager.js +0 -395
  1440. package/dist/cjs/src/server/components/fastapi/PluginManager.js.map +0 -1
  1441. package/dist/cjs/src/server/components/fastapi/RedirectManager.js +0 -487
  1442. package/dist/cjs/src/server/components/fastapi/RedirectManager.js.map +0 -1
  1443. package/dist/cjs/src/server/components/fastapi/RequestProcessor.js +0 -213
  1444. package/dist/cjs/src/server/components/fastapi/RequestProcessor.js.map +0 -1
  1445. package/dist/cjs/src/server/components/fastapi/RouteManager.js +0 -190
  1446. package/dist/cjs/src/server/components/fastapi/RouteManager.js.map +0 -1
  1447. package/dist/cjs/src/server/components/fastapi/WorkerPoolComponent.js +0 -82
  1448. package/dist/cjs/src/server/components/fastapi/WorkerPoolComponent.js.map +0 -1
  1449. package/dist/cjs/src/server/components/fastapi/console/ConsoleInterceptor.js +0 -980
  1450. package/dist/cjs/src/server/components/fastapi/console/ConsoleInterceptor.js.map +0 -1
  1451. package/dist/cjs/src/server/components/fastapi/console/encryption/ConsoleEncryption.js +0 -216
  1452. package/dist/cjs/src/server/components/fastapi/console/encryption/ConsoleEncryption.js.map +0 -1
  1453. package/dist/cjs/src/server/components/fastapi/console/types.js +0 -163
  1454. package/dist/cjs/src/server/components/fastapi/console/types.js.map +0 -1
  1455. package/dist/cjs/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js +0 -265
  1456. package/dist/cjs/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js.map +0 -1
  1457. package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/Logger.js +0 -236
  1458. package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/cpu-tasks.js +0 -294
  1459. package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/enhanced-cpu-worker.js +0 -433
  1460. package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/io-worker.js +0 -1617
  1461. package/dist/cjs/src/server/components/fastapi/smart-routes.js +0 -347
  1462. package/dist/cjs/src/server/components/fastapi/smart-routes.js.map +0 -1
  1463. package/dist/cjs/src/server/components/fastapi/templates/redirectTemp.js +0 -101
  1464. package/dist/cjs/src/server/components/fastapi/templates/redirectTemp.js.map +0 -1
  1465. package/dist/cjs/src/server/components/lifecycle/ServerLifecycleManager.js +0 -522
  1466. package/dist/cjs/src/server/components/lifecycle/ServerLifecycleManager.js.map +0 -1
  1467. package/dist/cjs/src/server/components/multi-server/MultiServerApp.js +0 -534
  1468. package/dist/cjs/src/server/components/multi-server/MultiServerApp.js.map +0 -1
  1469. package/dist/cjs/src/server/components/multi-server/MultiServerManager.js +0 -326
  1470. package/dist/cjs/src/server/components/multi-server/MultiServerManager.js.map +0 -1
  1471. package/dist/cjs/src/server/conf/networkConnectionConf.js +0 -25
  1472. package/dist/cjs/src/server/conf/networkConnectionConf.js.map +0 -1
  1473. package/dist/cjs/src/server/conf/proxyConfig.js +0 -23
  1474. package/dist/cjs/src/server/conf/proxyConfig.js.map +0 -1
  1475. package/dist/cjs/src/server/const/Cluster.config.js +0 -215
  1476. package/dist/cjs/src/server/const/Cluster.config.js.map +0 -1
  1477. package/dist/cjs/src/server/const/ExecutionPredictor_EP.const.js +0 -73
  1478. package/dist/cjs/src/server/const/ExecutionPredictor_EP.const.js.map +0 -1
  1479. package/dist/cjs/src/server/const/FileWatcher.config.js +0 -98
  1480. package/dist/cjs/src/server/const/FileWatcher.config.js.map +0 -1
  1481. package/dist/cjs/src/server/const/default.js +0 -393
  1482. package/dist/cjs/src/server/const/default.js.map +0 -1
  1483. package/dist/cjs/src/server/const/http.js +0 -19
  1484. package/dist/cjs/src/server/const/http.js.map +0 -1
  1485. package/dist/cjs/src/server/core/HttpServer.js +0 -396
  1486. package/dist/cjs/src/server/core/HttpServer.js.map +0 -1
  1487. package/dist/cjs/src/server/core/RequestApp.js +0 -95
  1488. package/dist/cjs/src/server/core/RequestApp.js.map +0 -1
  1489. package/dist/cjs/src/server/core/RequestEnhancer.js +0 -288
  1490. package/dist/cjs/src/server/core/RequestEnhancer.js.map +0 -1
  1491. package/dist/cjs/src/server/core/ResponseEnhancer.js +0 -518
  1492. package/dist/cjs/src/server/core/ResponseEnhancer.js.map +0 -1
  1493. package/dist/cjs/src/server/core/StartupProcessor.js +0 -111
  1494. package/dist/cjs/src/server/core/StartupProcessor.js.map +0 -1
  1495. package/dist/cjs/src/server/core/VirtualServer.js +0 -33
  1496. package/dist/cjs/src/server/core/VirtualServer.js.map +0 -1
  1497. package/dist/cjs/src/server/core/XHSCBridge.js +0 -524
  1498. package/dist/cjs/src/server/core/XHSCBridge.js.map +0 -1
  1499. package/dist/cjs/src/server/core/XHSCProtocol.js +0 -314
  1500. package/dist/cjs/src/server/core/XHSCProtocol.js.map +0 -1
  1501. package/dist/cjs/src/server/core/XyDiagnosticsManager.js +0 -78
  1502. package/dist/cjs/src/server/core/XyDiagnosticsManager.js.map +0 -1
  1503. package/dist/cjs/src/server/core/XyLifecycleManager.js +0 -237
  1504. package/dist/cjs/src/server/core/XyLifecycleManager.js.map +0 -1
  1505. package/dist/cjs/src/server/core/XyModuleManager.js +0 -161
  1506. package/dist/cjs/src/server/core/XyModuleManager.js.map +0 -1
  1507. package/dist/cjs/src/server/core/XyRoutingManager.js +0 -187
  1508. package/dist/cjs/src/server/core/XyRoutingManager.js.map +0 -1
  1509. package/dist/cjs/src/server/core/XyServerCreator.js +0 -97
  1510. package/dist/cjs/src/server/core/XyServerCreator.js.map +0 -1
  1511. package/dist/cjs/src/server/core/XyprissApp.js +0 -483
  1512. package/dist/cjs/src/server/core/XyprissApp.js.map +0 -1
  1513. package/dist/cjs/src/server/core/request/XyRequestManager.js +0 -229
  1514. package/dist/cjs/src/server/core/request/XyRequestManager.js.map +0 -1
  1515. package/dist/cjs/src/server/handlers/NotFoundHandler.js +0 -84
  1516. package/dist/cjs/src/server/handlers/NotFoundHandler.js.map +0 -1
  1517. package/dist/cjs/src/server/handlers/templates/notFoundTemplate.js +0 -655
  1518. package/dist/cjs/src/server/handlers/templates/notFoundTemplate.js.map +0 -1
  1519. package/dist/cjs/src/server/middleware/MiddlewareManager.js +0 -197
  1520. package/dist/cjs/src/server/middleware/MiddlewareManager.js.map +0 -1
  1521. package/dist/cjs/src/server/optimization/ExecutionPredictor.js +0 -218
  1522. package/dist/cjs/src/server/optimization/ExecutionPredictor.js.map +0 -1
  1523. package/dist/cjs/src/server/optimization/PerformanceProfiler.js +0 -234
  1524. package/dist/cjs/src/server/optimization/PerformanceProfiler.js.map +0 -1
  1525. package/dist/cjs/src/server/optimization/RequestPreCompiler.js +0 -709
  1526. package/dist/cjs/src/server/optimization/RequestPreCompiler.js.map +0 -1
  1527. package/dist/cjs/src/server/optimization/UltraFastOptimizer.js +0 -427
  1528. package/dist/cjs/src/server/optimization/UltraFastOptimizer.js.map +0 -1
  1529. package/dist/cjs/src/server/optimization/performance-monitor.js +0 -162
  1530. package/dist/cjs/src/server/optimization/performance-monitor.js.map +0 -1
  1531. package/dist/cjs/src/server/routing/Router.js +0 -353
  1532. package/dist/cjs/src/server/routing/Router.js.map +0 -1
  1533. package/dist/cjs/src/server/service/Reload/FileWatcher.js +0 -756
  1534. package/dist/cjs/src/server/service/Reload/FileWatcher.js.map +0 -1
  1535. package/dist/cjs/src/server/service/Reload/HotReloader.js +0 -738
  1536. package/dist/cjs/src/server/service/Reload/HotReloader.js.map +0 -1
  1537. package/dist/cjs/src/server/service/Reload/exec/TypeScriptExecutor.js +0 -342
  1538. package/dist/cjs/src/server/service/Reload/exec/TypeScriptExecutor.js.map +0 -1
  1539. package/dist/cjs/src/server/utils/ConfigLoader.js +0 -362
  1540. package/dist/cjs/src/server/utils/ConfigLoader.js.map +0 -1
  1541. package/dist/cjs/src/server/utils/PortManager.js +0 -237
  1542. package/dist/cjs/src/server/utils/PortManager.js.map +0 -1
  1543. package/dist/cjs/src/server/utils/WorkerModeHandler.js +0 -65
  1544. package/dist/cjs/src/server/utils/WorkerModeHandler.js.map +0 -1
  1545. package/dist/cjs/src/server/utils/forceClosePort.js +0 -332
  1546. package/dist/cjs/src/server/utils/forceClosePort.js.map +0 -1
  1547. package/dist/cjs/src/server/utils/shouldRegisterRouteOnServer.js +0 -34
  1548. package/dist/cjs/src/server/utils/shouldRegisterRouteOnServer.js.map +0 -1
  1549. package/dist/cjs/src/server/utils/trustProxy.js +0 -778
  1550. package/dist/cjs/src/server/utils/trustProxy.js.map +0 -1
  1551. package/dist/cjs/src/sys/FSApi.js +0 -1144
  1552. package/dist/cjs/src/sys/FSApi.js.map +0 -1
  1553. package/dist/cjs/src/sys/FileSystem.js +0 -1302
  1554. package/dist/cjs/src/sys/FileSystem.js.map +0 -1
  1555. package/dist/cjs/src/sys/PathApi.js +0 -202
  1556. package/dist/cjs/src/sys/PathApi.js.map +0 -1
  1557. package/dist/cjs/src/sys/SysApi.js +0 -421
  1558. package/dist/cjs/src/sys/SysApi.js.map +0 -1
  1559. package/dist/cjs/src/sys/System.js +0 -40
  1560. package/dist/cjs/src/sys/System.js.map +0 -1
  1561. package/dist/cjs/src/sys/XyPrissCache.js +0 -70
  1562. package/dist/cjs/src/sys/XyPrissCache.js.map +0 -1
  1563. package/dist/cjs/src/sys/XyPrissRunner.js +0 -248
  1564. package/dist/cjs/src/sys/XyPrissRunner.js.map +0 -1
  1565. package/dist/cjs/src/sys.js +0 -404
  1566. package/dist/cjs/src/sys.js.map +0 -1
  1567. package/dist/cjs/src/types/NotFoundConfig.js +0 -86
  1568. package/dist/cjs/src/types/NotFoundConfig.js.map +0 -1
  1569. package/dist/cjs/src/utils/DotEnvLoader.js +0 -74
  1570. package/dist/cjs/src/utils/DotEnvLoader.js.map +0 -1
  1571. package/dist/cjs/src/utils/mergeWithDefaults.js +0 -176
  1572. package/dist/cjs/src/utils/mergeWithDefaults.js.map +0 -1
  1573. package/dist/cjs/src/xhs/cluster/XHSCWorker.js +0 -202
  1574. package/dist/cjs/src/xhs/cluster/XHSCWorker.js.map +0 -1
  1575. package/dist/esm/index.js +0 -2
  1576. package/dist/esm/mods/security/src/algorithms/hash-algorithms.js +0 -696
  1577. package/dist/esm/mods/security/src/algorithms/hash-algorithms.js.map +0 -1
  1578. package/dist/esm/mods/security/src/algorithms/registry.js +0 -81
  1579. package/dist/esm/mods/security/src/algorithms/registry.js.map +0 -1
  1580. package/dist/esm/mods/security/src/components/attestation.js +0 -1059
  1581. package/dist/esm/mods/security/src/components/attestation.js.map +0 -1
  1582. package/dist/esm/mods/security/src/components/cache/FastLRU.js +0 -320
  1583. package/dist/esm/mods/security/src/components/cache/FastLRU.js.map +0 -1
  1584. package/dist/esm/mods/security/src/components/cache/UFSIMC.js +0 -1111
  1585. package/dist/esm/mods/security/src/components/cache/UFSIMC.js.map +0 -1
  1586. package/dist/esm/mods/security/src/components/cache/cacheSys.js +0 -622
  1587. package/dist/esm/mods/security/src/components/cache/cacheSys.js.map +0 -1
  1588. package/dist/esm/mods/security/src/components/cache/cacheSys.utils.js +0 -102
  1589. package/dist/esm/mods/security/src/components/cache/cacheSys.utils.js.map +0 -1
  1590. package/dist/esm/mods/security/src/components/cache/config/cache.config.js +0 -36
  1591. package/dist/esm/mods/security/src/components/cache/config/cache.config.js.map +0 -1
  1592. package/dist/esm/mods/security/src/components/cache/index.js +0 -367
  1593. package/dist/esm/mods/security/src/components/cache/index.js.map +0 -1
  1594. package/dist/esm/mods/security/src/components/cache/useCache.js +0 -232
  1595. package/dist/esm/mods/security/src/components/cache/useCache.js.map +0 -1
  1596. package/dist/esm/mods/security/src/components/canary-tokens.js +0 -346
  1597. package/dist/esm/mods/security/src/components/canary-tokens.js.map +0 -1
  1598. package/dist/esm/mods/security/src/components/entropy-augmentation.js +0 -476
  1599. package/dist/esm/mods/security/src/components/entropy-augmentation.js.map +0 -1
  1600. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js +0 -336
  1601. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js.map +0 -1
  1602. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js +0 -534
  1603. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js.map +0 -1
  1604. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js +0 -612
  1605. package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js.map +0 -1
  1606. package/dist/esm/mods/security/src/components/fortified-function/const/exec.const.js +0 -11
  1607. package/dist/esm/mods/security/src/components/fortified-function/const/exec.const.js.map +0 -1
  1608. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-config.js +0 -351
  1609. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-config.js.map +0 -1
  1610. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-function-core.js +0 -518
  1611. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-function-core.js.map +0 -1
  1612. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-logger.js +0 -243
  1613. package/dist/esm/mods/security/src/components/fortified-function/core/fortified-logger.js.map +0 -1
  1614. package/dist/esm/mods/security/src/components/fortified-function/core/mods/api-manager.js +0 -187
  1615. package/dist/esm/mods/security/src/components/fortified-function/core/mods/api-manager.js.map +0 -1
  1616. package/dist/esm/mods/security/src/components/fortified-function/core/mods/cache-manager.js +0 -105
  1617. package/dist/esm/mods/security/src/components/fortified-function/core/mods/cache-manager.js.map +0 -1
  1618. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-context.js +0 -103
  1619. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-context.js.map +0 -1
  1620. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-engine.js +0 -125
  1621. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-engine.js.map +0 -1
  1622. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-router.js +0 -91
  1623. package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-router.js.map +0 -1
  1624. package/dist/esm/mods/security/src/components/fortified-function/core/mods/memory-manager.js +0 -145
  1625. package/dist/esm/mods/security/src/components/fortified-function/core/mods/memory-manager.js.map +0 -1
  1626. package/dist/esm/mods/security/src/components/fortified-function/core/mods/security-manager.js +0 -100
  1627. package/dist/esm/mods/security/src/components/fortified-function/core/mods/security-manager.js.map +0 -1
  1628. package/dist/esm/mods/security/src/components/fortified-function/core/mods/stats-manager.js +0 -157
  1629. package/dist/esm/mods/security/src/components/fortified-function/core/mods/stats-manager.js.map +0 -1
  1630. package/dist/esm/mods/security/src/components/fortified-function/core/mods/timing-manager.js +0 -123
  1631. package/dist/esm/mods/security/src/components/fortified-function/core/mods/timing-manager.js.map +0 -1
  1632. package/dist/esm/mods/security/src/components/fortified-function/engines/analytics-engine.js +0 -368
  1633. package/dist/esm/mods/security/src/components/fortified-function/engines/analytics-engine.js.map +0 -1
  1634. package/dist/esm/mods/security/src/components/fortified-function/engines/execution-engine.js +0 -400
  1635. package/dist/esm/mods/security/src/components/fortified-function/engines/execution-engine.js.map +0 -1
  1636. package/dist/esm/mods/security/src/components/fortified-function/index.js +0 -167
  1637. package/dist/esm/mods/security/src/components/fortified-function/index.js.map +0 -1
  1638. package/dist/esm/mods/security/src/components/fortified-function/performance/performance-monitor.js +0 -238
  1639. package/dist/esm/mods/security/src/components/fortified-function/performance/performance-monitor.js.map +0 -1
  1640. package/dist/esm/mods/security/src/components/fortified-function/performance/performance-timer.js +0 -186
  1641. package/dist/esm/mods/security/src/components/fortified-function/performance/performance-timer.js.map +0 -1
  1642. package/dist/esm/mods/security/src/components/fortified-function/security/security-handler.js +0 -252
  1643. package/dist/esm/mods/security/src/components/fortified-function/security/security-handler.js.map +0 -1
  1644. package/dist/esm/mods/security/src/components/fortified-function/serializer/safe-serializer.js +0 -344
  1645. package/dist/esm/mods/security/src/components/fortified-function/serializer/safe-serializer.js.map +0 -1
  1646. package/dist/esm/mods/security/src/components/fortified-function/smart-cache.js +0 -691
  1647. package/dist/esm/mods/security/src/components/fortified-function/smart-cache.js.map +0 -1
  1648. package/dist/esm/mods/security/src/components/fortified-function/types/types.js +0 -14
  1649. package/dist/esm/mods/security/src/components/fortified-function/types/types.js.map +0 -1
  1650. package/dist/esm/mods/security/src/components/fortified-function/utils/utils.js +0 -74
  1651. package/dist/esm/mods/security/src/components/fortified-function/utils/utils.js.map +0 -1
  1652. package/dist/esm/mods/security/src/components/memory-hard.js +0 -919
  1653. package/dist/esm/mods/security/src/components/memory-hard.js.map +0 -1
  1654. package/dist/esm/mods/security/src/components/post-quantum.js +0 -316
  1655. package/dist/esm/mods/security/src/components/post-quantum.js.map +0 -1
  1656. package/dist/esm/mods/security/src/components/runtime-verification.js +0 -643
  1657. package/dist/esm/mods/security/src/components/runtime-verification.js.map +0 -1
  1658. package/dist/esm/mods/security/src/components/secure-array/core/secure-array-core.js +0 -1570
  1659. package/dist/esm/mods/security/src/components/secure-array/core/secure-array-core.js.map +0 -1
  1660. package/dist/esm/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js +0 -328
  1661. package/dist/esm/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js.map +0 -1
  1662. package/dist/esm/mods/security/src/components/secure-array/events/event-manager.js +0 -268
  1663. package/dist/esm/mods/security/src/components/secure-array/events/event-manager.js.map +0 -1
  1664. package/dist/esm/mods/security/src/components/secure-array/index.js +0 -61
  1665. package/dist/esm/mods/security/src/components/secure-array/index.js.map +0 -1
  1666. package/dist/esm/mods/security/src/components/secure-array/metadata/metadata-manager.js +0 -329
  1667. package/dist/esm/mods/security/src/components/secure-array/metadata/metadata-manager.js.map +0 -1
  1668. package/dist/esm/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js +0 -388
  1669. package/dist/esm/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js.map +0 -1
  1670. package/dist/esm/mods/security/src/components/secure-array/types/index.js +0 -84
  1671. package/dist/esm/mods/security/src/components/secure-array/types/index.js.map +0 -1
  1672. package/dist/esm/mods/security/src/components/secure-array/utils/id-generator.js +0 -78
  1673. package/dist/esm/mods/security/src/components/secure-array/utils/id-generator.js.map +0 -1
  1674. package/dist/esm/mods/security/src/components/secure-array/utils/validation.js +0 -273
  1675. package/dist/esm/mods/security/src/components/secure-array/utils/validation.js.map +0 -1
  1676. package/dist/esm/mods/security/src/components/secure-memory.js +0 -884
  1677. package/dist/esm/mods/security/src/components/secure-memory.js.map +0 -1
  1678. package/dist/esm/mods/security/src/components/secure-object/core/secure-object-core.js +0 -1603
  1679. package/dist/esm/mods/security/src/components/secure-object/core/secure-object-core.js.map +0 -1
  1680. package/dist/esm/mods/security/src/components/secure-object/encryption/crypto-handler.js +0 -360
  1681. package/dist/esm/mods/security/src/components/secure-object/encryption/crypto-handler.js.map +0 -1
  1682. package/dist/esm/mods/security/src/components/secure-object/encryption/sensitive-keys.js +0 -203
  1683. package/dist/esm/mods/security/src/components/secure-object/encryption/sensitive-keys.js.map +0 -1
  1684. package/dist/esm/mods/security/src/components/secure-object/events/event-manager.js +0 -195
  1685. package/dist/esm/mods/security/src/components/secure-object/events/event-manager.js.map +0 -1
  1686. package/dist/esm/mods/security/src/components/secure-object/index.js +0 -63
  1687. package/dist/esm/mods/security/src/components/secure-object/index.js.map +0 -1
  1688. package/dist/esm/mods/security/src/components/secure-object/metadata/metadata-manager.js +0 -181
  1689. package/dist/esm/mods/security/src/components/secure-object/metadata/metadata-manager.js.map +0 -1
  1690. package/dist/esm/mods/security/src/components/secure-object/serialization/serialization-handler.js +0 -195
  1691. package/dist/esm/mods/security/src/components/secure-object/serialization/serialization-handler.js.map +0 -1
  1692. package/dist/esm/mods/security/src/components/secure-object/utils/id-generator.js +0 -62
  1693. package/dist/esm/mods/security/src/components/secure-object/utils/id-generator.js.map +0 -1
  1694. package/dist/esm/mods/security/src/components/secure-object/utils/validation.js +0 -237
  1695. package/dist/esm/mods/security/src/components/secure-object/utils/validation.js.map +0 -1
  1696. package/dist/esm/mods/security/src/components/secure-serialization.js +0 -769
  1697. package/dist/esm/mods/security/src/components/secure-serialization.js.map +0 -1
  1698. package/dist/esm/mods/security/src/components/secure-string/advanced/entropy-analyzer.js +0 -306
  1699. package/dist/esm/mods/security/src/components/secure-string/advanced/entropy-analyzer.js.map +0 -1
  1700. package/dist/esm/mods/security/src/components/secure-string/advanced/performance-monitor.js +0 -333
  1701. package/dist/esm/mods/security/src/components/secure-string/advanced/performance-monitor.js.map +0 -1
  1702. package/dist/esm/mods/security/src/components/secure-string/advanced/quantum-safe.js +0 -243
  1703. package/dist/esm/mods/security/src/components/secure-string/advanced/quantum-safe.js.map +0 -1
  1704. package/dist/esm/mods/security/src/components/secure-string/buffer/buffer-manager.js +0 -203
  1705. package/dist/esm/mods/security/src/components/secure-string/buffer/buffer-manager.js.map +0 -1
  1706. package/dist/esm/mods/security/src/components/secure-string/core/secure-string-core.js +0 -786
  1707. package/dist/esm/mods/security/src/components/secure-string/core/secure-string-core.js.map +0 -1
  1708. package/dist/esm/mods/security/src/components/secure-string/crypto/crypto-operations.js +0 -298
  1709. package/dist/esm/mods/security/src/components/secure-string/crypto/crypto-operations.js.map +0 -1
  1710. package/dist/esm/mods/security/src/components/secure-string/operations/comparison-operations.js +0 -219
  1711. package/dist/esm/mods/security/src/components/secure-string/operations/comparison-operations.js.map +0 -1
  1712. package/dist/esm/mods/security/src/components/secure-string/operations/string-operations.js +0 -232
  1713. package/dist/esm/mods/security/src/components/secure-string/operations/string-operations.js.map +0 -1
  1714. package/dist/esm/mods/security/src/components/secure-string/types/index.js +0 -37
  1715. package/dist/esm/mods/security/src/components/secure-string/types/index.js.map +0 -1
  1716. package/dist/esm/mods/security/src/components/secure-string/validation/string-validator.js +0 -332
  1717. package/dist/esm/mods/security/src/components/secure-string/validation/string-validator.js.map +0 -1
  1718. package/dist/esm/mods/security/src/components/side-channel.js +0 -142
  1719. package/dist/esm/mods/security/src/components/side-channel.js.map +0 -1
  1720. package/dist/esm/mods/security/src/components/tamper-evident-logging.js +0 -389
  1721. package/dist/esm/mods/security/src/components/tamper-evident-logging.js.map +0 -1
  1722. package/dist/esm/mods/security/src/const/buffer.const.js +0 -13
  1723. package/dist/esm/mods/security/src/const/buffer.const.js.map +0 -1
  1724. package/dist/esm/mods/security/src/core/crypto.js +0 -777
  1725. package/dist/esm/mods/security/src/core/crypto.js.map +0 -1
  1726. package/dist/esm/mods/security/src/core/hash/hash-advanced.js +0 -367
  1727. package/dist/esm/mods/security/src/core/hash/hash-advanced.js.map +0 -1
  1728. package/dist/esm/mods/security/src/core/hash/hash-core.js +0 -389
  1729. package/dist/esm/mods/security/src/core/hash/hash-core.js.map +0 -1
  1730. package/dist/esm/mods/security/src/core/hash/hash-entropy.js +0 -286
  1731. package/dist/esm/mods/security/src/core/hash/hash-entropy.js.map +0 -1
  1732. package/dist/esm/mods/security/src/core/hash/hash-security.js +0 -351
  1733. package/dist/esm/mods/security/src/core/hash/hash-security.js.map +0 -1
  1734. package/dist/esm/mods/security/src/core/hash/hash-types.js +0 -16
  1735. package/dist/esm/mods/security/src/core/hash/hash-types.js.map +0 -1
  1736. package/dist/esm/mods/security/src/core/hash/hash-utils.js +0 -307
  1737. package/dist/esm/mods/security/src/core/hash/hash-utils.js.map +0 -1
  1738. package/dist/esm/mods/security/src/core/hash/hash-validator.js +0 -310
  1739. package/dist/esm/mods/security/src/core/hash/hash-validator.js.map +0 -1
  1740. package/dist/esm/mods/security/src/core/hash.js +0 -9
  1741. package/dist/esm/mods/security/src/core/hash.js.map +0 -1
  1742. package/dist/esm/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js +0 -133
  1743. package/dist/esm/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js.map +0 -1
  1744. package/dist/esm/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js +0 -272
  1745. package/dist/esm/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js.map +0 -1
  1746. package/dist/esm/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js +0 -296
  1747. package/dist/esm/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js.map +0 -1
  1748. package/dist/esm/mods/security/src/core/keys/keys-core.js +0 -199
  1749. package/dist/esm/mods/security/src/core/keys/keys-core.js.map +0 -1
  1750. package/dist/esm/mods/security/src/core/keys/keys-logger.js +0 -231
  1751. package/dist/esm/mods/security/src/core/keys/keys-logger.js.map +0 -1
  1752. package/dist/esm/mods/security/src/core/keys/keys-types.js +0 -63
  1753. package/dist/esm/mods/security/src/core/keys/keys-types.js.map +0 -1
  1754. package/dist/esm/mods/security/src/core/keys/keys-utils.js +0 -316
  1755. package/dist/esm/mods/security/src/core/keys/keys-utils.js.map +0 -1
  1756. package/dist/esm/mods/security/src/core/keys.js +0 -134
  1757. package/dist/esm/mods/security/src/core/keys.js.map +0 -1
  1758. package/dist/esm/mods/security/src/core/password/index.js +0 -110
  1759. package/dist/esm/mods/security/src/core/password/index.js.map +0 -1
  1760. package/dist/esm/mods/security/src/core/password/password-algorithms.js +0 -395
  1761. package/dist/esm/mods/security/src/core/password/password-algorithms.js.map +0 -1
  1762. package/dist/esm/mods/security/src/core/password/password-core.js +0 -292
  1763. package/dist/esm/mods/security/src/core/password/password-core.js.map +0 -1
  1764. package/dist/esm/mods/security/src/core/password/password-generator.js +0 -363
  1765. package/dist/esm/mods/security/src/core/password/password-generator.js.map +0 -1
  1766. package/dist/esm/mods/security/src/core/password/password-migration.js +0 -235
  1767. package/dist/esm/mods/security/src/core/password/password-migration.js.map +0 -1
  1768. package/dist/esm/mods/security/src/core/password/password-security.js +0 -532
  1769. package/dist/esm/mods/security/src/core/password/password-security.js.map +0 -1
  1770. package/dist/esm/mods/security/src/core/password/password-types.js +0 -34
  1771. package/dist/esm/mods/security/src/core/password/password-types.js.map +0 -1
  1772. package/dist/esm/mods/security/src/core/password/password-utils.js +0 -630
  1773. package/dist/esm/mods/security/src/core/password/password-utils.js.map +0 -1
  1774. package/dist/esm/mods/security/src/core/password/swlist.js +0 -1120
  1775. package/dist/esm/mods/security/src/core/password/swlist.js.map +0 -1
  1776. package/dist/esm/mods/security/src/core/random/random-core.js +0 -960
  1777. package/dist/esm/mods/security/src/core/random/random-core.js.map +0 -1
  1778. package/dist/esm/mods/security/src/core/random/random-crypto.js +0 -337
  1779. package/dist/esm/mods/security/src/core/random/random-crypto.js.map +0 -1
  1780. package/dist/esm/mods/security/src/core/random/random-entropy.js +0 -366
  1781. package/dist/esm/mods/security/src/core/random/random-entropy.js.map +0 -1
  1782. package/dist/esm/mods/security/src/core/random/random-generators.js +0 -323
  1783. package/dist/esm/mods/security/src/core/random/random-generators.js.map +0 -1
  1784. package/dist/esm/mods/security/src/core/random/random-sources.js +0 -405
  1785. package/dist/esm/mods/security/src/core/random/random-sources.js.map +0 -1
  1786. package/dist/esm/mods/security/src/core/random/random-tokens.js +0 -307
  1787. package/dist/esm/mods/security/src/core/random/random-tokens.js.map +0 -1
  1788. package/dist/esm/mods/security/src/core/random/random-types.js +0 -27
  1789. package/dist/esm/mods/security/src/core/random/random-types.js.map +0 -1
  1790. package/dist/esm/mods/security/src/core/validators.js +0 -198
  1791. package/dist/esm/mods/security/src/core/validators.js.map +0 -1
  1792. package/dist/esm/mods/security/src/helpers/Uint8Array.js +0 -333
  1793. package/dist/esm/mods/security/src/helpers/Uint8Array.js.map +0 -1
  1794. package/dist/esm/mods/security/src/helpers/createEnu.js +0 -25
  1795. package/dist/esm/mods/security/src/helpers/createEnu.js.map +0 -1
  1796. package/dist/esm/mods/security/src/index.js +0 -340
  1797. package/dist/esm/mods/security/src/index.js.map +0 -1
  1798. package/dist/esm/mods/security/src/types/global.js +0 -49
  1799. package/dist/esm/mods/security/src/types/global.js.map +0 -1
  1800. package/dist/esm/mods/security/src/types/secure-mem.type.js +0 -102
  1801. package/dist/esm/mods/security/src/types/secure-mem.type.js.map +0 -1
  1802. package/dist/esm/mods/security/src/types/secure-memory.js +0 -20
  1803. package/dist/esm/mods/security/src/types/secure-memory.js.map +0 -1
  1804. package/dist/esm/mods/security/src/types.js +0 -63
  1805. package/dist/esm/mods/security/src/types.js.map +0 -1
  1806. package/dist/esm/mods/security/src/utils/CryptoAlgorithmUtils.js +0 -69
  1807. package/dist/esm/mods/security/src/utils/CryptoAlgorithmUtils.js.map +0 -1
  1808. package/dist/esm/mods/security/src/utils/constants.js +0 -105
  1809. package/dist/esm/mods/security/src/utils/constants.js.map +0 -1
  1810. package/dist/esm/mods/security/src/utils/crypto.utils.js +0 -380
  1811. package/dist/esm/mods/security/src/utils/crypto.utils.js.map +0 -1
  1812. package/dist/esm/mods/security/src/utils/dataConverter.js +0 -72
  1813. package/dist/esm/mods/security/src/utils/dataConverter.js.map +0 -1
  1814. package/dist/esm/mods/security/src/utils/encoding.js +0 -279
  1815. package/dist/esm/mods/security/src/utils/encoding.js.map +0 -1
  1816. package/dist/esm/mods/security/src/utils/errorHandler.js +0 -137
  1817. package/dist/esm/mods/security/src/utils/errorHandler.js.map +0 -1
  1818. package/dist/esm/mods/security/src/utils/memory/config-manager.js +0 -288
  1819. package/dist/esm/mods/security/src/utils/memory/config-manager.js.map +0 -1
  1820. package/dist/esm/mods/security/src/utils/memory/event-manager.js +0 -275
  1821. package/dist/esm/mods/security/src/utils/memory/event-manager.js.map +0 -1
  1822. package/dist/esm/mods/security/src/utils/memory/index.js +0 -141
  1823. package/dist/esm/mods/security/src/utils/memory/index.js.map +0 -1
  1824. package/dist/esm/mods/security/src/utils/memory/memory-manager.js +0 -886
  1825. package/dist/esm/mods/security/src/utils/memory/memory-manager.js.map +0 -1
  1826. package/dist/esm/mods/security/src/utils/memory/memory-pool.js +0 -354
  1827. package/dist/esm/mods/security/src/utils/memory/memory-pool.js.map +0 -1
  1828. package/dist/esm/mods/security/src/utils/memory/reference-tracker.js +0 -382
  1829. package/dist/esm/mods/security/src/utils/memory/reference-tracker.js.map +0 -1
  1830. package/dist/esm/mods/security/src/utils/memory/types.js +0 -56
  1831. package/dist/esm/mods/security/src/utils/memory/types.js.map +0 -1
  1832. package/dist/esm/mods/security/src/utils/patterns.js +0 -124
  1833. package/dist/esm/mods/security/src/utils/patterns.js.map +0 -1
  1834. package/dist/esm/mods/security/src/utils/performanceMonitor.js +0 -246
  1835. package/dist/esm/mods/security/src/utils/performanceMonitor.js.map +0 -1
  1836. package/dist/esm/mods/security/src/utils/stats.js +0 -180
  1837. package/dist/esm/mods/security/src/utils/stats.js.map +0 -1
  1838. package/dist/esm/package.json +0 -3
  1839. package/dist/esm/shared/logger/Logger.js +0 -587
  1840. package/dist/esm/shared/logger/Logger.js.map +0 -1
  1841. package/dist/esm/src/FiUp.js +0 -82
  1842. package/dist/esm/src/FiUp.js.map +0 -1
  1843. package/dist/esm/src/cache/CacheFactory.js +0 -412
  1844. package/dist/esm/src/cache/CacheFactory.js.map +0 -1
  1845. package/dist/esm/src/cache/SecureCacheAdapter.js +0 -1237
  1846. package/dist/esm/src/cache/SecureCacheAdapter.js.map +0 -1
  1847. package/dist/esm/src/cluster/bun-cluster-manager.js +0 -1654
  1848. package/dist/esm/src/cluster/bun-cluster-manager.js.map +0 -1
  1849. package/dist/esm/src/cluster/cluster-manager.js +0 -1002
  1850. package/dist/esm/src/cluster/cluster-manager.js.map +0 -1
  1851. package/dist/esm/src/cluster/memory-manager.js +0 -483
  1852. package/dist/esm/src/cluster/memory-manager.js.map +0 -1
  1853. package/dist/esm/src/cluster/modules/AutoScaler.js +0 -530
  1854. package/dist/esm/src/cluster/modules/AutoScaler.js.map +0 -1
  1855. package/dist/esm/src/cluster/modules/BunIPCManager.js +0 -601
  1856. package/dist/esm/src/cluster/modules/BunIPCManager.js.map +0 -1
  1857. package/dist/esm/src/cluster/modules/ClusterPersistenceManager.js +0 -435
  1858. package/dist/esm/src/cluster/modules/ClusterPersistenceManager.js.map +0 -1
  1859. package/dist/esm/src/cluster/modules/CpuMonitor.js +0 -657
  1860. package/dist/esm/src/cluster/modules/CpuMonitor.js.map +0 -1
  1861. package/dist/esm/src/cluster/modules/CrossPlatformMemory.js +0 -326
  1862. package/dist/esm/src/cluster/modules/CrossPlatformMemory.js.map +0 -1
  1863. package/dist/esm/src/cluster/modules/EventLoopMonitor.js +0 -263
  1864. package/dist/esm/src/cluster/modules/EventLoopMonitor.js.map +0 -1
  1865. package/dist/esm/src/cluster/modules/GCStatsTracker.js +0 -198
  1866. package/dist/esm/src/cluster/modules/GCStatsTracker.js.map +0 -1
  1867. package/dist/esm/src/cluster/modules/HealthMonitor.js +0 -440
  1868. package/dist/esm/src/cluster/modules/HealthMonitor.js.map +0 -1
  1869. package/dist/esm/src/cluster/modules/HeapStatsCollector.js +0 -109
  1870. package/dist/esm/src/cluster/modules/HeapStatsCollector.js.map +0 -1
  1871. package/dist/esm/src/cluster/modules/IPCManager.js +0 -759
  1872. package/dist/esm/src/cluster/modules/IPCManager.js.map +0 -1
  1873. package/dist/esm/src/cluster/modules/MetricsCollector.js +0 -538
  1874. package/dist/esm/src/cluster/modules/MetricsCollector.js.map +0 -1
  1875. package/dist/esm/src/cluster/modules/NetworkTracker.js +0 -160
  1876. package/dist/esm/src/cluster/modules/NetworkTracker.js.map +0 -1
  1877. package/dist/esm/src/cluster/modules/ProcessMonitor.js +0 -511
  1878. package/dist/esm/src/cluster/modules/ProcessMonitor.js.map +0 -1
  1879. package/dist/esm/src/cluster/modules/ThroughputCalculator.js +0 -184
  1880. package/dist/esm/src/cluster/modules/ThroughputCalculator.js.map +0 -1
  1881. package/dist/esm/src/cluster/modules/WorkerManager.js +0 -1165
  1882. package/dist/esm/src/cluster/modules/WorkerManager.js.map +0 -1
  1883. package/dist/esm/src/cluster/modules/strategy/LoadBalancer.js +0 -1102
  1884. package/dist/esm/src/cluster/modules/strategy/LoadBalancer.js.map +0 -1
  1885. package/dist/esm/src/config.js +0 -362
  1886. package/dist/esm/src/config.js.map +0 -1
  1887. package/dist/esm/src/const.js +0 -574
  1888. package/dist/esm/src/const.js.map +0 -1
  1889. package/dist/esm/src/encryption/EncryptionService.js +0 -401
  1890. package/dist/esm/src/encryption/EncryptionService.js.map +0 -1
  1891. package/dist/esm/src/file-upload.js +0 -251
  1892. package/dist/esm/src/file-upload.js.map +0 -1
  1893. package/dist/esm/src/index.js +0 -62
  1894. package/dist/esm/src/index.js.map +0 -1
  1895. package/dist/esm/src/middleware/XJsonResponseHandler.js +0 -150
  1896. package/dist/esm/src/middleware/XJsonResponseHandler.js.map +0 -1
  1897. package/dist/esm/src/middleware/XemsSessionMiddleware.js +0 -86
  1898. package/dist/esm/src/middleware/XemsSessionMiddleware.js.map +0 -1
  1899. package/dist/esm/src/middleware/XyPrissMiddlewareAPI.js +0 -352
  1900. package/dist/esm/src/middleware/XyPrissMiddlewareAPI.js.map +0 -1
  1901. package/dist/esm/src/middleware/built-in/BuiltInMiddleware.js +0 -522
  1902. package/dist/esm/src/middleware/built-in/BuiltInMiddleware.js.map +0 -1
  1903. package/dist/esm/src/middleware/built-in/security/BrowserOnlyProtector.js +0 -550
  1904. package/dist/esm/src/middleware/built-in/security/BrowserOnlyProtector.js.map +0 -1
  1905. package/dist/esm/src/middleware/built-in/security/CommandInjectionDetector.js +0 -213
  1906. package/dist/esm/src/middleware/built-in/security/CommandInjectionDetector.js.map +0 -1
  1907. package/dist/esm/src/middleware/built-in/security/LDAPInjectionDetector.js +0 -94
  1908. package/dist/esm/src/middleware/built-in/security/LDAPInjectionDetector.js.map +0 -1
  1909. package/dist/esm/src/middleware/built-in/security/MobileOnlyProtector.js +0 -502
  1910. package/dist/esm/src/middleware/built-in/security/MobileOnlyProtector.js.map +0 -1
  1911. package/dist/esm/src/middleware/built-in/security/PathTraversalDetector.js +0 -210
  1912. package/dist/esm/src/middleware/built-in/security/PathTraversalDetector.js.map +0 -1
  1913. package/dist/esm/src/middleware/built-in/security/RequestSignatureProtector.js +0 -460
  1914. package/dist/esm/src/middleware/built-in/security/RequestSignatureProtector.js.map +0 -1
  1915. package/dist/esm/src/middleware/built-in/security/SQLInjectionDetector.js +0 -333
  1916. package/dist/esm/src/middleware/built-in/security/SQLInjectionDetector.js.map +0 -1
  1917. package/dist/esm/src/middleware/built-in/security/TerminalOnlyProtector.js +0 -476
  1918. package/dist/esm/src/middleware/built-in/security/TerminalOnlyProtector.js.map +0 -1
  1919. package/dist/esm/src/middleware/built-in/security/XXEProtector.js +0 -173
  1920. package/dist/esm/src/middleware/built-in/security/XXEProtector.js.map +0 -1
  1921. package/dist/esm/src/middleware/safe-json-middleware.js +0 -153
  1922. package/dist/esm/src/middleware/safe-json-middleware.js.map +0 -1
  1923. package/dist/esm/src/middleware/security-middleware.js +0 -1057
  1924. package/dist/esm/src/middleware/security-middleware.js.map +0 -1
  1925. package/dist/esm/src/plugins/PluginManager.js +0 -408
  1926. package/dist/esm/src/plugins/PluginManager.js.map +0 -1
  1927. package/dist/esm/src/plugins/api/PluginAPI.js +0 -184
  1928. package/dist/esm/src/plugins/api/PluginAPI.js.map +0 -1
  1929. package/dist/esm/src/plugins/const/PluginHookIds.js +0 -61
  1930. package/dist/esm/src/plugins/const/PluginHookIds.js.map +0 -1
  1931. package/dist/esm/src/plugins/core/PluginManager.js +0 -675
  1932. package/dist/esm/src/plugins/core/PluginManager.js.map +0 -1
  1933. package/dist/esm/src/plugins/modules/PluginEngine.js +0 -492
  1934. package/dist/esm/src/plugins/modules/PluginEngine.js.map +0 -1
  1935. package/dist/esm/src/plugins/modules/PluginRegistry.js +0 -307
  1936. package/dist/esm/src/plugins/modules/PluginRegistry.js.map +0 -1
  1937. package/dist/esm/src/plugins/modules/builtin/JWTAuthPlugin.js +0 -589
  1938. package/dist/esm/src/plugins/modules/builtin/JWTAuthPlugin.js.map +0 -1
  1939. package/dist/esm/src/plugins/modules/builtin/ResponseTimePlugin.js +0 -411
  1940. package/dist/esm/src/plugins/modules/builtin/ResponseTimePlugin.js.map +0 -1
  1941. package/dist/esm/src/plugins/modules/builtin/SmartCachePlugin.js +0 -841
  1942. package/dist/esm/src/plugins/modules/builtin/SmartCachePlugin.js.map +0 -1
  1943. package/dist/esm/src/plugins/modules/builtin/server-maintenance-plugin.js +0 -566
  1944. package/dist/esm/src/plugins/modules/builtin/server-maintenance-plugin.js.map +0 -1
  1945. package/dist/esm/src/plugins/modules/core/CachePlugin.js +0 -1975
  1946. package/dist/esm/src/plugins/modules/core/CachePlugin.js.map +0 -1
  1947. package/dist/esm/src/plugins/modules/core/PerformancePlugin.js +0 -872
  1948. package/dist/esm/src/plugins/modules/core/PerformancePlugin.js.map +0 -1
  1949. package/dist/esm/src/plugins/modules/core/SecurityPlugin.js +0 -797
  1950. package/dist/esm/src/plugins/modules/core/SecurityPlugin.js.map +0 -1
  1951. package/dist/esm/src/plugins/modules/index.js +0 -273
  1952. package/dist/esm/src/plugins/modules/index.js.map +0 -1
  1953. package/dist/esm/src/plugins/modules/network/builtin/CompressionPlugin.js +0 -281
  1954. package/dist/esm/src/plugins/modules/network/builtin/CompressionPlugin.js.map +0 -1
  1955. package/dist/esm/src/plugins/modules/network/builtin/ConnectionPlugin.js +0 -776
  1956. package/dist/esm/src/plugins/modules/network/builtin/ConnectionPlugin.js.map +0 -1
  1957. package/dist/esm/src/plugins/modules/network/builtin/ProxyPlugin.js +0 -422
  1958. package/dist/esm/src/plugins/modules/network/builtin/ProxyPlugin.js.map +0 -1
  1959. package/dist/esm/src/plugins/modules/network/builtin/RateLimitPlugin.js +0 -584
  1960. package/dist/esm/src/plugins/modules/network/builtin/RateLimitPlugin.js.map +0 -1
  1961. package/dist/esm/src/plugins/modules/network/core/NetworkPlugin.js +0 -228
  1962. package/dist/esm/src/plugins/modules/network/core/NetworkPlugin.js.map +0 -1
  1963. package/dist/esm/src/plugins/modules/network/core/NetworkPluginFactory.js +0 -38
  1964. package/dist/esm/src/plugins/modules/network/core/NetworkPluginFactory.js.map +0 -1
  1965. package/dist/esm/src/plugins/modules/network/types/NetworkTypes.js +0 -24
  1966. package/dist/esm/src/plugins/modules/network/types/NetworkTypes.js.map +0 -1
  1967. package/dist/esm/src/plugins/modules/network/utils/NetworkPluginUtils.js +0 -61
  1968. package/dist/esm/src/plugins/modules/network/utils/NetworkPluginUtils.js.map +0 -1
  1969. package/dist/esm/src/plugins/modules/types/PluginTypes.js +0 -48
  1970. package/dist/esm/src/plugins/modules/types/PluginTypes.js.map +0 -1
  1971. package/dist/esm/src/plugins/modules/xems/XemsBuiltinPlugin.js +0 -214
  1972. package/dist/esm/src/plugins/modules/xems/XemsBuiltinPlugin.js.map +0 -1
  1973. package/dist/esm/src/plugins/modules/xems/XemsPlugin.js +0 -349
  1974. package/dist/esm/src/plugins/modules/xems/XemsPlugin.js.map +0 -1
  1975. package/dist/esm/src/plugins/plugin-manager.js +0 -149
  1976. package/dist/esm/src/plugins/plugin-manager.js.map +0 -1
  1977. package/dist/esm/src/plugins/route-optimization-plugin.js +0 -419
  1978. package/dist/esm/src/plugins/route-optimization-plugin.js.map +0 -1
  1979. package/dist/esm/src/plugins/server-maintenance-plugin.js +0 -566
  1980. package/dist/esm/src/plugins/server-maintenance-plugin.js.map +0 -1
  1981. package/dist/esm/src/quick-start.js +0 -41
  1982. package/dist/esm/src/quick-start.js.map +0 -1
  1983. package/dist/esm/src/schemas/plugingSchema.js +0 -38
  1984. package/dist/esm/src/schemas/plugingSchema.js.map +0 -1
  1985. package/dist/esm/src/server/FastServer.js +0 -856
  1986. package/dist/esm/src/server/FastServer.js.map +0 -1
  1987. package/dist/esm/src/server/ServerFactory.js +0 -62
  1988. package/dist/esm/src/server/ServerFactory.js.map +0 -1
  1989. package/dist/esm/src/server/components/fastapi/CacheManager.js +0 -243
  1990. package/dist/esm/src/server/components/fastapi/CacheManager.js.map +0 -1
  1991. package/dist/esm/src/server/components/fastapi/ClusterManagerComponent.js +0 -567
  1992. package/dist/esm/src/server/components/fastapi/ClusterManagerComponent.js.map +0 -1
  1993. package/dist/esm/src/server/components/fastapi/FileUploadManager.js +0 -176
  1994. package/dist/esm/src/server/components/fastapi/FileUploadManager.js.map +0 -1
  1995. package/dist/esm/src/server/components/fastapi/FileWatcherManager.js +0 -534
  1996. package/dist/esm/src/server/components/fastapi/FileWatcherManager.js.map +0 -1
  1997. package/dist/esm/src/server/components/fastapi/MonitoringManager.js +0 -305
  1998. package/dist/esm/src/server/components/fastapi/MonitoringManager.js.map +0 -1
  1999. package/dist/esm/src/server/components/fastapi/PerformanceManager.js +0 -295
  2000. package/dist/esm/src/server/components/fastapi/PerformanceManager.js.map +0 -1
  2001. package/dist/esm/src/server/components/fastapi/PluginManager.js +0 -393
  2002. package/dist/esm/src/server/components/fastapi/PluginManager.js.map +0 -1
  2003. package/dist/esm/src/server/components/fastapi/RedirectManager.js +0 -485
  2004. package/dist/esm/src/server/components/fastapi/RedirectManager.js.map +0 -1
  2005. package/dist/esm/src/server/components/fastapi/RequestProcessor.js +0 -211
  2006. package/dist/esm/src/server/components/fastapi/RequestProcessor.js.map +0 -1
  2007. package/dist/esm/src/server/components/fastapi/RouteManager.js +0 -188
  2008. package/dist/esm/src/server/components/fastapi/RouteManager.js.map +0 -1
  2009. package/dist/esm/src/server/components/fastapi/WorkerPoolComponent.js +0 -80
  2010. package/dist/esm/src/server/components/fastapi/WorkerPoolComponent.js.map +0 -1
  2011. package/dist/esm/src/server/components/fastapi/console/ConsoleInterceptor.js +0 -978
  2012. package/dist/esm/src/server/components/fastapi/console/ConsoleInterceptor.js.map +0 -1
  2013. package/dist/esm/src/server/components/fastapi/console/encryption/ConsoleEncryption.js +0 -214
  2014. package/dist/esm/src/server/components/fastapi/console/encryption/ConsoleEncryption.js.map +0 -1
  2015. package/dist/esm/src/server/components/fastapi/console/types.js +0 -160
  2016. package/dist/esm/src/server/components/fastapi/console/types.js.map +0 -1
  2017. package/dist/esm/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js +0 -263
  2018. package/dist/esm/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js.map +0 -1
  2019. package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/Logger.js +0 -236
  2020. package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/cpu-tasks.js +0 -294
  2021. package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/enhanced-cpu-worker.js +0 -433
  2022. package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/io-worker.js +0 -1617
  2023. package/dist/esm/src/server/components/fastapi/smart-routes.js +0 -345
  2024. package/dist/esm/src/server/components/fastapi/smart-routes.js.map +0 -1
  2025. package/dist/esm/src/server/components/fastapi/templates/redirectTemp.js +0 -99
  2026. package/dist/esm/src/server/components/fastapi/templates/redirectTemp.js.map +0 -1
  2027. package/dist/esm/src/server/components/lifecycle/ServerLifecycleManager.js +0 -520
  2028. package/dist/esm/src/server/components/lifecycle/ServerLifecycleManager.js.map +0 -1
  2029. package/dist/esm/src/server/components/multi-server/MultiServerApp.js +0 -532
  2030. package/dist/esm/src/server/components/multi-server/MultiServerApp.js.map +0 -1
  2031. package/dist/esm/src/server/components/multi-server/MultiServerManager.js +0 -324
  2032. package/dist/esm/src/server/components/multi-server/MultiServerManager.js.map +0 -1
  2033. package/dist/esm/src/server/conf/networkConnectionConf.js +0 -23
  2034. package/dist/esm/src/server/conf/networkConnectionConf.js.map +0 -1
  2035. package/dist/esm/src/server/conf/proxyConfig.js +0 -21
  2036. package/dist/esm/src/server/conf/proxyConfig.js.map +0 -1
  2037. package/dist/esm/src/server/const/Cluster.config.js +0 -213
  2038. package/dist/esm/src/server/const/Cluster.config.js.map +0 -1
  2039. package/dist/esm/src/server/const/ExecutionPredictor_EP.const.js +0 -62
  2040. package/dist/esm/src/server/const/ExecutionPredictor_EP.const.js.map +0 -1
  2041. package/dist/esm/src/server/const/FileWatcher.config.js +0 -96
  2042. package/dist/esm/src/server/const/FileWatcher.config.js.map +0 -1
  2043. package/dist/esm/src/server/const/default.js +0 -389
  2044. package/dist/esm/src/server/const/default.js.map +0 -1
  2045. package/dist/esm/src/server/const/http.js +0 -17
  2046. package/dist/esm/src/server/const/http.js.map +0 -1
  2047. package/dist/esm/src/server/core/HttpServer.js +0 -394
  2048. package/dist/esm/src/server/core/HttpServer.js.map +0 -1
  2049. package/dist/esm/src/server/core/RequestApp.js +0 -93
  2050. package/dist/esm/src/server/core/RequestApp.js.map +0 -1
  2051. package/dist/esm/src/server/core/RequestEnhancer.js +0 -286
  2052. package/dist/esm/src/server/core/RequestEnhancer.js.map +0 -1
  2053. package/dist/esm/src/server/core/ResponseEnhancer.js +0 -516
  2054. package/dist/esm/src/server/core/ResponseEnhancer.js.map +0 -1
  2055. package/dist/esm/src/server/core/StartupProcessor.js +0 -109
  2056. package/dist/esm/src/server/core/StartupProcessor.js.map +0 -1
  2057. package/dist/esm/src/server/core/VirtualServer.js +0 -31
  2058. package/dist/esm/src/server/core/VirtualServer.js.map +0 -1
  2059. package/dist/esm/src/server/core/XHSCBridge.js +0 -502
  2060. package/dist/esm/src/server/core/XHSCBridge.js.map +0 -1
  2061. package/dist/esm/src/server/core/XHSCProtocol.js +0 -311
  2062. package/dist/esm/src/server/core/XHSCProtocol.js.map +0 -1
  2063. package/dist/esm/src/server/core/XyDiagnosticsManager.js +0 -76
  2064. package/dist/esm/src/server/core/XyDiagnosticsManager.js.map +0 -1
  2065. package/dist/esm/src/server/core/XyLifecycleManager.js +0 -235
  2066. package/dist/esm/src/server/core/XyLifecycleManager.js.map +0 -1
  2067. package/dist/esm/src/server/core/XyModuleManager.js +0 -159
  2068. package/dist/esm/src/server/core/XyModuleManager.js.map +0 -1
  2069. package/dist/esm/src/server/core/XyRoutingManager.js +0 -185
  2070. package/dist/esm/src/server/core/XyRoutingManager.js.map +0 -1
  2071. package/dist/esm/src/server/core/XyServerCreator.js +0 -95
  2072. package/dist/esm/src/server/core/XyServerCreator.js.map +0 -1
  2073. package/dist/esm/src/server/core/XyprissApp.js +0 -481
  2074. package/dist/esm/src/server/core/XyprissApp.js.map +0 -1
  2075. package/dist/esm/src/server/core/request/XyRequestManager.js +0 -227
  2076. package/dist/esm/src/server/core/request/XyRequestManager.js.map +0 -1
  2077. package/dist/esm/src/server/handlers/NotFoundHandler.js +0 -81
  2078. package/dist/esm/src/server/handlers/NotFoundHandler.js.map +0 -1
  2079. package/dist/esm/src/server/handlers/templates/notFoundTemplate.js +0 -653
  2080. package/dist/esm/src/server/handlers/templates/notFoundTemplate.js.map +0 -1
  2081. package/dist/esm/src/server/middleware/MiddlewareManager.js +0 -195
  2082. package/dist/esm/src/server/middleware/MiddlewareManager.js.map +0 -1
  2083. package/dist/esm/src/server/optimization/ExecutionPredictor.js +0 -216
  2084. package/dist/esm/src/server/optimization/ExecutionPredictor.js.map +0 -1
  2085. package/dist/esm/src/server/optimization/PerformanceProfiler.js +0 -232
  2086. package/dist/esm/src/server/optimization/PerformanceProfiler.js.map +0 -1
  2087. package/dist/esm/src/server/optimization/RequestPreCompiler.js +0 -707
  2088. package/dist/esm/src/server/optimization/RequestPreCompiler.js.map +0 -1
  2089. package/dist/esm/src/server/optimization/UltraFastOptimizer.js +0 -424
  2090. package/dist/esm/src/server/optimization/UltraFastOptimizer.js.map +0 -1
  2091. package/dist/esm/src/server/optimization/performance-monitor.js +0 -160
  2092. package/dist/esm/src/server/optimization/performance-monitor.js.map +0 -1
  2093. package/dist/esm/src/server/routing/Router.js +0 -351
  2094. package/dist/esm/src/server/routing/Router.js.map +0 -1
  2095. package/dist/esm/src/server/service/Reload/FileWatcher.js +0 -734
  2096. package/dist/esm/src/server/service/Reload/FileWatcher.js.map +0 -1
  2097. package/dist/esm/src/server/service/Reload/HotReloader.js +0 -735
  2098. package/dist/esm/src/server/service/Reload/HotReloader.js.map +0 -1
  2099. package/dist/esm/src/server/service/Reload/exec/TypeScriptExecutor.js +0 -339
  2100. package/dist/esm/src/server/service/Reload/exec/TypeScriptExecutor.js.map +0 -1
  2101. package/dist/esm/src/server/utils/ConfigLoader.js +0 -339
  2102. package/dist/esm/src/server/utils/ConfigLoader.js.map +0 -1
  2103. package/dist/esm/src/server/utils/PortManager.js +0 -235
  2104. package/dist/esm/src/server/utils/PortManager.js.map +0 -1
  2105. package/dist/esm/src/server/utils/WorkerModeHandler.js +0 -63
  2106. package/dist/esm/src/server/utils/WorkerModeHandler.js.map +0 -1
  2107. package/dist/esm/src/server/utils/forceClosePort.js +0 -330
  2108. package/dist/esm/src/server/utils/forceClosePort.js.map +0 -1
  2109. package/dist/esm/src/server/utils/shouldRegisterRouteOnServer.js +0 -32
  2110. package/dist/esm/src/server/utils/shouldRegisterRouteOnServer.js.map +0 -1
  2111. package/dist/esm/src/server/utils/trustProxy.js +0 -776
  2112. package/dist/esm/src/server/utils/trustProxy.js.map +0 -1
  2113. package/dist/esm/src/sys/FSApi.js +0 -1142
  2114. package/dist/esm/src/sys/FSApi.js.map +0 -1
  2115. package/dist/esm/src/sys/FileSystem.js +0 -1300
  2116. package/dist/esm/src/sys/FileSystem.js.map +0 -1
  2117. package/dist/esm/src/sys/PathApi.js +0 -199
  2118. package/dist/esm/src/sys/PathApi.js.map +0 -1
  2119. package/dist/esm/src/sys/SysApi.js +0 -419
  2120. package/dist/esm/src/sys/SysApi.js.map +0 -1
  2121. package/dist/esm/src/sys/System.js +0 -38
  2122. package/dist/esm/src/sys/System.js.map +0 -1
  2123. package/dist/esm/src/sys/XyPrissCache.js +0 -68
  2124. package/dist/esm/src/sys/XyPrissCache.js.map +0 -1
  2125. package/dist/esm/src/sys/XyPrissRunner.js +0 -244
  2126. package/dist/esm/src/sys/XyPrissRunner.js.map +0 -1
  2127. package/dist/esm/src/sys.js +0 -401
  2128. package/dist/esm/src/sys.js.map +0 -1
  2129. package/dist/esm/src/types/NotFoundConfig.js +0 -84
  2130. package/dist/esm/src/types/NotFoundConfig.js.map +0 -1
  2131. package/dist/esm/src/utils/DotEnvLoader.js +0 -72
  2132. package/dist/esm/src/utils/DotEnvLoader.js.map +0 -1
  2133. package/dist/esm/src/utils/mergeWithDefaults.js +0 -174
  2134. package/dist/esm/src/utils/mergeWithDefaults.js.map +0 -1
  2135. package/dist/esm/src/xhs/cluster/XHSCWorker.js +0 -181
  2136. package/dist/esm/src/xhs/cluster/XHSCWorker.js.map +0 -1
  2137. package/dist/index.d.ts +0 -9398
@@ -0,0 +1,2051 @@
1
+ /***************************************************************************
2
+ * XyPrissSecurity - Secure Array Types
3
+ *
4
+ * This file contains type definitions for the SecureArray modular architecture
5
+ *
6
+ * @author Nehonix
7
+ *
8
+ * @license MIT
9
+ *
10
+ * Copyright (c) 2025 Nehonix. All rights reserved.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ ***************************************************************************** */
30
+
31
+ /**
32
+ * @license MIT
33
+ * @see https://lab.nehonix.com
34
+ * @description SecureObject Core Module
35
+ *
36
+ * Main SecureObject class
37
+ */
38
+
39
+ import { HashAlgorithm, HashOutputFormat } from "../../../types/string";
40
+ import { SecureBuffer } from "../../secure-memory";
41
+ import {
42
+ memoryManager,
43
+ MemoryEventType,
44
+ PoolStrategy,
45
+ MemoryUtils,
46
+ } from "../../../utils/memory";
47
+ import {
48
+ SecureValue,
49
+ SerializationOptions,
50
+ ValueMetadata,
51
+ SecureObjectEvent,
52
+ EventListener,
53
+ SecureObjectOptions,
54
+ } from "../types";
55
+ import { SensitiveKeysManager } from "../encryption/sensitive-keys";
56
+ import { CryptoHandler } from "../encryption/crypto-handler";
57
+ import { MetadataManager } from "../metadata/metadata-manager";
58
+ import { EventManager } from "../events/event-manager";
59
+ import { SerializationHandler } from "../serialization/serialization-handler";
60
+ import { IdGenerator } from "../utils/id-generator";
61
+ import { ValidationUtils } from "../utils/validation";
62
+ import SecureString from "../../secure-string";
63
+
64
+ /**
65
+ * A secure object that can store sensitive data
66
+ * T represents the initial type, but the object can be extended with additional keys
67
+ */
68
+ export class SecureObject<
69
+ T extends Record<string, SecureValue> = Record<string, SecureValue>
70
+ > {
71
+ // Core data storage
72
+ private data: Map<string, any> = new Map();
73
+ private secureBuffers: Map<string, SecureBuffer> = new Map();
74
+
75
+ // Modular components
76
+ private sensitiveKeysManager: SensitiveKeysManager;
77
+ private cryptoHandler: CryptoHandler;
78
+ private metadataManager: MetadataManager;
79
+ private eventManager: EventManager;
80
+ private serializationHandler: SerializationHandler;
81
+
82
+ // State management
83
+ private _isDestroyed: boolean = false;
84
+ private _isReadOnly: boolean = false;
85
+ private readonly _id: string;
86
+
87
+ // Enhanced memory management
88
+ private _memoryTracking: boolean = false;
89
+ private _autoCleanup: boolean = false;
90
+ private _createdAt: number = Date.now();
91
+ private _lastAccessed: number = Date.now();
92
+ private secureBufferPool?: any;
93
+
94
+ /**
95
+ * Creates a new secure object
96
+ */
97
+ constructor(initialData?: Partial<T>, options?: SecureObjectOptions) {
98
+ this._id = IdGenerator.generate();
99
+ this._isReadOnly = false; // Start as writable
100
+
101
+ // Initialize modular components
102
+ this.sensitiveKeysManager = new SensitiveKeysManager();
103
+ this.cryptoHandler = new CryptoHandler(this._id);
104
+ this.metadataManager = new MetadataManager();
105
+ this.eventManager = new EventManager();
106
+ this.serializationHandler = new SerializationHandler(
107
+ this.cryptoHandler,
108
+ this.metadataManager
109
+ );
110
+
111
+ // Set encryption key if provided
112
+ if (options?.encryptionKey) {
113
+ this.cryptoHandler.setEncryptionKey(options.encryptionKey);
114
+ }
115
+
116
+ // Configure memory management with enhanced features
117
+ this._memoryTracking = options?.enableMemoryTracking ?? true; // Enable by default
118
+ this._autoCleanup = options?.autoCleanup ?? true; // Enable by default
119
+
120
+ // Set memory limits if provided
121
+ if (options?.maxMemory) {
122
+ memoryManager.setLimits(
123
+ options.maxMemory,
124
+ options.gcThreshold || 0.8
125
+ );
126
+ }
127
+
128
+ // Register with advanced memory manager if tracking is enabled
129
+ if (this._memoryTracking) {
130
+ memoryManager.registerObject(this, this._id);
131
+
132
+ // Listen to memory events for proactive management
133
+ memoryManager.on(MemoryEventType.MEMORY_PRESSURE, (event) => {
134
+ if (event.data?.pressure > 0.8) {
135
+ this.handleMemoryPressure();
136
+ }
137
+ });
138
+
139
+ memoryManager.on(MemoryEventType.LEAK_DETECTED, (event) => {
140
+ if (event.data?.leaks?.includes(this._id)) {
141
+ console.warn(
142
+ `Potential memory leak detected in SecureObject ${this._id}`
143
+ );
144
+ }
145
+ });
146
+ }
147
+
148
+ // Create memory pool for secure buffers if not exists
149
+ this.initializeSecureBufferPool();
150
+
151
+ // Set initial data
152
+ if (initialData) {
153
+ this.setAll(initialData);
154
+ }
155
+
156
+ // Set read-only status after initial data is set
157
+ this._isReadOnly = options?.readOnly ?? false;
158
+ }
159
+
160
+ /**
161
+ * Creates a SecureObject from another SecureObject (deep copy)
162
+ */
163
+ public static from<T extends Record<string, SecureValue>>(
164
+ other: SecureObject<T>
165
+ ): SecureObject<T> {
166
+ other.ensureNotDestroyed();
167
+ const copy = new SecureObject<T>();
168
+
169
+ for (const key of other.keys()) {
170
+ const value = other.get(key);
171
+ copy.set(String(key), value);
172
+ }
173
+
174
+ return copy;
175
+ }
176
+
177
+ /**
178
+ * Creates a read-only SecureObject
179
+ */
180
+ public static readOnly<T extends Record<string, SecureValue>>(
181
+ data: Partial<T>
182
+ ): SecureObject<T> {
183
+ return new SecureObject(data, { readOnly: true });
184
+ }
185
+
186
+ /**
187
+ * Creates a read-only SecureObject (public usage)
188
+ */
189
+
190
+ /** Permanently enable read-only mode (cannot be disabled). */
191
+ public enableReadOnly(): this {
192
+ this.ensureNotDestroyed();
193
+ this._isReadOnly = true;
194
+ return this;
195
+ }
196
+
197
+ // ===== PROPERTY ACCESSORS =====
198
+
199
+ /**
200
+ * Gets the unique ID of this SecureObject
201
+ */
202
+ public get id(): string {
203
+ return this._id;
204
+ }
205
+
206
+ /**
207
+ * Checks if the SecureObject is read-only
208
+ */
209
+ public get isReadOnly(): boolean {
210
+ return this._isReadOnly;
211
+ }
212
+
213
+ /**
214
+ * Checks if the SecureObject has been destroyed
215
+ */
216
+ public get isDestroyed(): boolean {
217
+ return this._isDestroyed;
218
+ }
219
+
220
+ /**
221
+ * Gets the number of stored values
222
+ */
223
+ public get size(): number {
224
+ this.ensureNotDestroyed();
225
+ return this.data.size;
226
+ }
227
+
228
+ /**
229
+ * Checks if the object is empty
230
+ */
231
+ public get isEmpty(): boolean {
232
+ this.ensureNotDestroyed();
233
+ return this.data.size === 0;
234
+ }
235
+
236
+ // ===== VALIDATION METHODS =====
237
+
238
+ /**
239
+ * Ensures the SecureObject hasn't been destroyed
240
+ */
241
+ private ensureNotDestroyed(): void {
242
+ if (this._isDestroyed) {
243
+ throw new Error(
244
+ "SecureObject has been destroyed and cannot be used"
245
+ );
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Ensures the SecureObject is not read-only for write operations
251
+ */
252
+ private ensureNotReadOnly(): void {
253
+ if (this._isReadOnly) {
254
+ throw new Error("SecureObject is read-only");
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Updates the last accessed timestamp for memory management
260
+ */
261
+ private updateLastAccessed(): void {
262
+ this._lastAccessed = Date.now();
263
+ }
264
+
265
+ // ===== MEMORY MANAGEMENT =====
266
+
267
+ /**
268
+ * Initialize secure buffer pool for efficient memory reuse
269
+ */
270
+ private initializeSecureBufferPool(): void {
271
+ if (!this.secureBufferPool) {
272
+ try {
273
+ this.secureBufferPool =
274
+ memoryManager.getPool("secure-buffer-pool") ||
275
+ memoryManager.createPool({
276
+ name: "secure-buffer-pool",
277
+ factory: () => new Uint8Array(1024), // 1KB buffers
278
+ reset: (buffer) => {
279
+ // Secure wipe before reuse
280
+ this.secureWipe(buffer);
281
+ },
282
+ capacity: 50,
283
+ strategy: PoolStrategy.LRU,
284
+ validator: (buffer) => buffer instanceof Uint8Array,
285
+ });
286
+ } catch (error) {
287
+ // Pool might already exist, try to get it
288
+ this.secureBufferPool =
289
+ memoryManager.getPool("secure-buffer-pool");
290
+ }
291
+ }
292
+ }
293
+
294
+ /**
295
+ * Handle memory pressure situations
296
+ */
297
+ private handleMemoryPressure(): void {
298
+ if (this._autoCleanup) {
299
+ // Clean up unused secure buffers
300
+ this.forceGarbageCollection();
301
+
302
+ // Emit event for external handlers
303
+ this.eventManager.emit("gc", undefined, {
304
+ timestamp: Date.now(),
305
+ objectId: this._id,
306
+ action: "memory_pressure_cleanup",
307
+ });
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Secure wipe of buffer memory
313
+ */
314
+ private secureWipe(buffer: Uint8Array): void {
315
+ if (!buffer || buffer.length === 0) return;
316
+
317
+ // Multiple-pass secure wipe
318
+ const passes = [0x00, 0xff, 0xaa, 0x55, 0x00];
319
+
320
+ for (const pattern of passes) {
321
+ buffer.fill(pattern);
322
+ }
323
+
324
+ // Final random pass if crypto is available
325
+ if (typeof crypto !== "undefined" && crypto.getRandomValues) {
326
+ crypto.getRandomValues(buffer);
327
+ }
328
+
329
+ buffer.fill(0x00); // Final zero pass
330
+ }
331
+
332
+ /**
333
+ * Gets enhanced memory usage statistics for this SecureObject
334
+ */
335
+ public getMemoryUsage(): {
336
+ allocatedMemory: number;
337
+ bufferCount: number;
338
+ dataSize: number;
339
+ createdAt: number;
340
+ lastAccessed: number;
341
+ age: number;
342
+ formattedMemory: string;
343
+ poolStats?: any;
344
+ } {
345
+ this.ensureNotDestroyed();
346
+
347
+ let allocatedMemory = 0;
348
+ for (const buffer of this.secureBuffers.values()) {
349
+ allocatedMemory += buffer.length();
350
+ }
351
+
352
+ const now = Date.now();
353
+ const usage = {
354
+ allocatedMemory,
355
+ bufferCount: this.secureBuffers.size,
356
+ dataSize: this.data.size,
357
+ createdAt: this._createdAt,
358
+ lastAccessed: this._lastAccessed,
359
+ age: now - this._createdAt,
360
+ formattedMemory: MemoryUtils.formatBytes(allocatedMemory),
361
+ poolStats: this.secureBufferPool?.getStats(),
362
+ };
363
+
364
+ return usage;
365
+ }
366
+
367
+ /**
368
+ * Forces enhanced garbage collection for this SecureObject
369
+ */
370
+ public forceGarbageCollection(): void {
371
+ this.ensureNotDestroyed();
372
+
373
+ if (this._memoryTracking) {
374
+ const beforeUsage = this.getMemoryUsage();
375
+
376
+ // Clean up unused secure buffers with secure wipe
377
+ for (const [key, buffer] of this.secureBuffers.entries()) {
378
+ if (!this.data.has(key)) {
379
+ // Secure wipe before destroying (get buffer data safely)
380
+ try {
381
+ const bufferData = buffer.getBuffer(); // Use correct method
382
+ if (bufferData instanceof Uint8Array) {
383
+ this.secureWipe(bufferData);
384
+ }
385
+ } catch (error) {
386
+ // Buffer might already be destroyed, continue
387
+ }
388
+ buffer.destroy();
389
+ this.secureBuffers.delete(key);
390
+ }
391
+ }
392
+
393
+ // Return unused buffers to pool
394
+ if (this.secureBufferPool) {
395
+ // Pool cleanup is handled automatically by the advanced memory manager
396
+ }
397
+
398
+ // Trigger global GC with enhanced features
399
+ const gcResult = memoryManager.forceGC();
400
+
401
+ const afterUsage = this.getMemoryUsage();
402
+ const freedMemory =
403
+ beforeUsage.allocatedMemory - afterUsage.allocatedMemory;
404
+
405
+ this.eventManager.emit("gc", undefined, {
406
+ timestamp: Date.now(),
407
+ bufferCount: this.secureBuffers.size,
408
+ freedMemory,
409
+ gcDuration: gcResult.duration,
410
+ gcSuccess: gcResult.success,
411
+ beforeUsage: beforeUsage.formattedMemory,
412
+ afterUsage: afterUsage.formattedMemory,
413
+ });
414
+ }
415
+ }
416
+
417
+ /**
418
+ * Enables memory tracking for this SecureObject
419
+ */
420
+ public enableMemoryTracking(): this {
421
+ this.ensureNotDestroyed();
422
+
423
+ if (!this._memoryTracking) {
424
+ this._memoryTracking = true;
425
+ memoryManager.registerObject(this, this._id);
426
+ }
427
+
428
+ return this;
429
+ }
430
+
431
+ /**
432
+ * Disables memory tracking for this SecureObject
433
+ */
434
+ public disableMemoryTracking(): this {
435
+ this.ensureNotDestroyed();
436
+
437
+ if (this._memoryTracking) {
438
+ this._memoryTracking = false;
439
+ memoryManager.removeReference(this._id);
440
+ }
441
+
442
+ return this;
443
+ }
444
+
445
+ // ===== SENSITIVE KEYS MANAGEMENT =====
446
+
447
+ /**
448
+ * Adds keys to the sensitive keys list
449
+ */
450
+ public addSensitiveKeys(...keys: string[]): this {
451
+ this.ensureNotDestroyed();
452
+ ValidationUtils.validateKeys(keys);
453
+ this.sensitiveKeysManager.add(...keys);
454
+ return this;
455
+ }
456
+
457
+ /**
458
+ * Removes keys from the sensitive keys list
459
+ */
460
+ public removeSensitiveKeys(...keys: string[]): this {
461
+ this.ensureNotDestroyed();
462
+ ValidationUtils.validateKeys(keys);
463
+ this.sensitiveKeysManager.remove(...keys);
464
+ return this;
465
+ }
466
+
467
+ /**
468
+ * Sets the complete list of sensitive keys (replaces existing list)
469
+ */
470
+ public setSensitiveKeys(keys: string[]): this {
471
+ this.ensureNotDestroyed();
472
+ ValidationUtils.validateKeys(keys);
473
+ this.sensitiveKeysManager.set(keys);
474
+ return this;
475
+ }
476
+
477
+ /**
478
+ * Gets the current list of sensitive keys
479
+ */
480
+ public getSensitiveKeys(): string[] {
481
+ this.ensureNotDestroyed();
482
+ return this.sensitiveKeysManager.getAll();
483
+ }
484
+
485
+ /**
486
+ * Checks if a key is marked as sensitive
487
+ */
488
+ public isSensitiveKey(key: string): boolean {
489
+ ValidationUtils.validateKey(key);
490
+ return this.sensitiveKeysManager.isSensitive(key);
491
+ }
492
+
493
+ /**
494
+ * Clears all sensitive keys
495
+ */
496
+ public clearSensitiveKeys(): this {
497
+ this.ensureNotDestroyed();
498
+ this.sensitiveKeysManager.clear();
499
+ return this;
500
+ }
501
+
502
+ /**
503
+ * Resets sensitive keys to default values
504
+ */
505
+ public resetToDefaultSensitiveKeys(): this {
506
+ this.ensureNotDestroyed();
507
+ this.sensitiveKeysManager.resetToDefault();
508
+ return this;
509
+ }
510
+
511
+ /**
512
+ * Gets the default sensitive keys that are automatically initialized
513
+ */
514
+ public static get getDefaultSensitiveKeys(): string[] {
515
+ return SensitiveKeysManager.getDefaultKeys();
516
+ }
517
+
518
+ /**
519
+ * Adds custom regex patterns for sensitive key detection
520
+ * @param patterns - Regex patterns or strings to match sensitive keys
521
+ */
522
+ public addSensitivePatterns(...patterns: (RegExp | string)[]): this {
523
+ this.ensureNotDestroyed();
524
+ this.sensitiveKeysManager.addCustomPatterns(...patterns);
525
+ return this;
526
+ }
527
+
528
+ /**
529
+ * Removes custom sensitive patterns
530
+ */
531
+ public removeSensitivePatterns(...patterns: (RegExp | string)[]): this {
532
+ this.ensureNotDestroyed();
533
+ this.sensitiveKeysManager.removeCustomPatterns(...patterns);
534
+ return this;
535
+ }
536
+
537
+ /**
538
+ * Clears all custom sensitive patterns
539
+ */
540
+ public clearSensitivePatterns(): this {
541
+ this.ensureNotDestroyed();
542
+ this.sensitiveKeysManager.clearCustomPatterns();
543
+ return this;
544
+ }
545
+
546
+ /**
547
+ * Gets all custom sensitive patterns
548
+ */
549
+ public getSensitivePatterns(): RegExp[] {
550
+ this.ensureNotDestroyed();
551
+ return this.sensitiveKeysManager.getCustomPatterns();
552
+ }
553
+
554
+ // ===== ENCRYPTION MANAGEMENT =====
555
+
556
+ /**
557
+ * Sets the encryption key for sensitive data encryption
558
+ */
559
+ public setEncryptionKey(key: string | null = null): this {
560
+ this.ensureNotDestroyed();
561
+ ValidationUtils.validateEncryptionKey(key);
562
+ this.cryptoHandler.setEncryptionKey(key);
563
+ return this;
564
+ }
565
+
566
+ /**
567
+ * Gets the current encryption key
568
+ */
569
+ public get getEncryptionKey(): string | null {
570
+ return this.cryptoHandler.getEncryptionKey();
571
+ }
572
+
573
+ /**
574
+ * Decrypts a value using the encryption key
575
+ */
576
+ public decryptValue(encryptedValue: string): any {
577
+ this.ensureNotDestroyed();
578
+ return this.cryptoHandler.decryptValue(encryptedValue);
579
+ }
580
+
581
+ /**
582
+ * Decrypts all encrypted values in an object
583
+ */
584
+ public decryptObject(obj: any): any {
585
+ this.ensureNotDestroyed();
586
+ return this.cryptoHandler.decryptObject(obj);
587
+ }
588
+
589
+ /**
590
+ * Encrypts all values in the object using AES-256-CTR-HMAC encryption
591
+ * with proper memory management and atomic operations
592
+ */
593
+ public encryptAll(): this {
594
+ this.ensureNotDestroyed();
595
+ this.ensureNotReadOnly();
596
+
597
+ // Check if encryption key is set
598
+ const encryptionStatus = this.cryptoHandler.getEncryptionStatus();
599
+ if (!encryptionStatus.hasEncryptionKey) {
600
+ throw new Error(
601
+ "Encryption key must be set before calling encryptAll()"
602
+ );
603
+ }
604
+
605
+ // Prepare temporary map for atomic operation
606
+ const encryptedEntries = new Map<string, any>();
607
+ const originalMetadata = new Map<string, any>();
608
+ const keysToProcess: string[] = [];
609
+
610
+ try {
611
+ // First pass: encrypt all values into temporary storage
612
+ for (const [key, value] of this.data.entries()) {
613
+ if (value !== undefined) {
614
+ // Skip already encrypted values to avoid double encryption
615
+ if (
616
+ typeof value === "string" &&
617
+ this.cryptoHandler.isEncrypted(value)
618
+ ) {
619
+ continue;
620
+ }
621
+
622
+ // Store original metadata for rollback
623
+ if (this.metadataManager.has(key)) {
624
+ originalMetadata.set(
625
+ key,
626
+ this.metadataManager.get(key)
627
+ );
628
+ }
629
+
630
+ // Get the actual value to encrypt
631
+ let valueToEncrypt = value;
632
+
633
+ // If it's a SecureBuffer, convert it back to its original form
634
+ if (value instanceof SecureBuffer) {
635
+ const metadata = this.metadataManager.get(key);
636
+ if (metadata?.type === "string") {
637
+ valueToEncrypt = new TextDecoder().decode(
638
+ value.getBuffer()
639
+ );
640
+ } else if (metadata?.type === "Uint8Array") {
641
+ valueToEncrypt = new Uint8Array(value.getBuffer());
642
+ } else {
643
+ valueToEncrypt = new TextDecoder().decode(
644
+ value.getBuffer()
645
+ );
646
+ }
647
+ }
648
+
649
+ // Encrypt the value
650
+ const encryptedValue =
651
+ this.cryptoHandler.encryptValue(valueToEncrypt);
652
+ encryptedEntries.set(key, encryptedValue);
653
+ keysToProcess.push(key);
654
+ }
655
+ }
656
+
657
+ // Second pass: atomically commit all changes
658
+ for (const key of keysToProcess) {
659
+ const encryptedValue = encryptedEntries.get(key);
660
+ const originalValue = this.data.get(key);
661
+
662
+ // Clean up any existing SecureBuffer for this key
663
+ this.cleanupKey(key);
664
+
665
+ // Store encrypted value
666
+ this.data.set(key, encryptedValue);
667
+
668
+ // Update metadata with correct type information
669
+ // Store original type in the type field using special format
670
+ const originalType = typeof originalValue;
671
+ this.metadataManager.update(
672
+ key,
673
+ `encrypted:${originalType}`,
674
+ true
675
+ );
676
+ }
677
+ } catch (error: any) {
678
+ // Rollback: restore original state on any failure
679
+ for (const key of keysToProcess) {
680
+ if (originalMetadata.has(key)) {
681
+ // Restore original metadata
682
+ const original = originalMetadata.get(key);
683
+ this.metadataManager.update(
684
+ key,
685
+ original.type,
686
+ original.isSecure
687
+ );
688
+ }
689
+ }
690
+
691
+ throw new Error(`Encryption failed: ${error.message}`);
692
+ }
693
+
694
+ this.updateLastAccessed();
695
+ this.eventManager.emit(
696
+ "set",
697
+ "encrypt_all",
698
+ `${keysToProcess.length}_values_encrypted`
699
+ );
700
+
701
+ return this;
702
+ }
703
+
704
+ /**
705
+ * Gets the raw encrypted data without decryption (for verification)
706
+ */
707
+ public getRawEncryptedData(): Map<string, any> {
708
+ this.ensureNotDestroyed();
709
+ return new Map(this.data);
710
+ }
711
+
712
+ /**
713
+ * Gets a specific key's raw encrypted form (for verification)
714
+ */
715
+ public getRawEncryptedValue(key: string): any {
716
+ this.ensureNotDestroyed();
717
+ const stringKey = ValidationUtils.sanitizeKey(key);
718
+ return this.data.get(stringKey);
719
+ }
720
+
721
+ /**
722
+ * Gets encryption status from the crypto handler
723
+ */
724
+ public getEncryptionStatus() {
725
+ return this.cryptoHandler.getEncryptionStatus();
726
+ }
727
+
728
+ // ===== EVENT MANAGEMENT =====
729
+
730
+ /**
731
+ * Adds an event listener
732
+ */
733
+ public addEventListener(
734
+ event: SecureObjectEvent,
735
+ listener: EventListener
736
+ ): void {
737
+ ValidationUtils.validateEventType(event);
738
+ ValidationUtils.validateEventListener(listener);
739
+ this.eventManager.addEventListener(event, listener);
740
+ }
741
+
742
+ /**
743
+ * Removes an event listener
744
+ */
745
+ public removeEventListener(
746
+ event: SecureObjectEvent,
747
+ listener: EventListener
748
+ ): void {
749
+ ValidationUtils.validateEventType(event);
750
+ ValidationUtils.validateEventListener(listener);
751
+ this.eventManager.removeEventListener(event, listener);
752
+ }
753
+
754
+ /**
755
+ * Creates a one-time event listener
756
+ */
757
+ public once(event: SecureObjectEvent, listener: EventListener): void {
758
+ ValidationUtils.validateEventType(event);
759
+ ValidationUtils.validateEventListener(listener);
760
+ this.eventManager.once(event, listener);
761
+ }
762
+
763
+ /**
764
+ * Waits for a specific event to be emitted
765
+ */
766
+ public waitFor(
767
+ event: SecureObjectEvent,
768
+ timeout?: number
769
+ ): Promise<{ key?: string; value?: any }> {
770
+ ValidationUtils.validateEventType(event);
771
+ if (timeout !== undefined) {
772
+ ValidationUtils.validateTimeout(timeout);
773
+ }
774
+ return this.eventManager.waitFor(event, timeout);
775
+ }
776
+
777
+ // ===== CORE DATA OPERATIONS =====
778
+
779
+ /**
780
+ * Sets a value - allows both existing keys and new dynamic keys
781
+ */
782
+ public set<K extends string>(key: K, value: SecureValue): this {
783
+ this.ensureNotDestroyed();
784
+ this.ensureNotReadOnly();
785
+ this.updateLastAccessed();
786
+
787
+ const stringKey = ValidationUtils.sanitizeKey(key);
788
+ ValidationUtils.isValidSecureValue(value);
789
+
790
+ // Clean up any existing secure buffer for this key
791
+ this.cleanupKey(stringKey);
792
+
793
+ // Handle different types of values
794
+ if (
795
+ value &&
796
+ typeof value === "object" &&
797
+ value.constructor.name === "Uint8Array"
798
+ ) {
799
+ // Store Uint8Array in a secure buffer
800
+ const secureBuffer = SecureBuffer.from(value as Uint8Array);
801
+ this.secureBuffers.set(stringKey, secureBuffer);
802
+ this.data.set(stringKey, secureBuffer);
803
+ this.metadataManager.update(stringKey, "Uint8Array", true);
804
+ } else if (typeof value === "string") {
805
+ // Store strings in secure buffers
806
+ const secureBuffer = SecureBuffer.from(value);
807
+ this.secureBuffers.set(stringKey, secureBuffer);
808
+ this.data.set(stringKey, secureBuffer);
809
+ this.metadataManager.update(stringKey, "string", true);
810
+ } else if (ValidationUtils.isSecureString(value)) {
811
+ // Store SecureString reference
812
+ this.data.set(stringKey, value);
813
+ this.metadataManager.update(stringKey, "SecureString", true);
814
+ } else if (ValidationUtils.isSecureObject(value)) {
815
+ // Store SecureObject reference
816
+ this.data.set(stringKey, value);
817
+ this.metadataManager.update(stringKey, "SecureObject", true);
818
+ } else {
819
+ // Store other values directly (numbers, booleans, null, undefined)
820
+ this.data.set(stringKey, value);
821
+ this.metadataManager.update(stringKey, typeof value, false);
822
+ }
823
+
824
+ this.eventManager.emit("set", stringKey, value);
825
+ return this;
826
+ }
827
+
828
+ /**
829
+ * Sets multiple values at once
830
+ */
831
+ public setAll(values: Partial<T>): this {
832
+ this.ensureNotDestroyed();
833
+ this.ensureNotReadOnly();
834
+
835
+ for (const key in values) {
836
+ if (Object.prototype.hasOwnProperty.call(values, key)) {
837
+ this.set(String(key), values[key] as SecureValue);
838
+ }
839
+ }
840
+ return this;
841
+ }
842
+
843
+ /**
844
+ * Gets a value with automatic decryption
845
+ */
846
+ public get<K extends keyof T>(key: K): T[K] {
847
+ this.ensureNotDestroyed();
848
+ this.updateLastAccessed();
849
+
850
+ const stringKey = ValidationUtils.sanitizeKey(key);
851
+ const value = this.data.get(stringKey);
852
+
853
+ // Update access metadata
854
+ if (this.metadataManager.has(stringKey)) {
855
+ const metadata = this.metadataManager.get(stringKey)!;
856
+ this.metadataManager.update(
857
+ stringKey,
858
+ metadata.type,
859
+ metadata.isSecure
860
+ );
861
+ }
862
+
863
+ // Check if value is encrypted (starts with [ENCRYPTED:)
864
+ if (
865
+ typeof value === "string" &&
866
+ this.cryptoHandler.isEncrypted(value)
867
+ ) {
868
+ try {
869
+ // Decrypt the value automatically
870
+ const decryptedValue = this.cryptoHandler.decryptValue(value);
871
+ this.eventManager.emit("get", stringKey, decryptedValue);
872
+ return decryptedValue as T[K];
873
+ } catch (error) {
874
+ console.error(
875
+ `Failed to decrypt value for key ${stringKey}:`,
876
+ error
877
+ );
878
+ // Return the encrypted value if decryption fails
879
+ this.eventManager.emit("get", stringKey, value);
880
+ return value as T[K];
881
+ }
882
+ }
883
+
884
+ if (value instanceof SecureBuffer) {
885
+ // Convert SecureBuffer back to original type based on metadata
886
+ const buffer = value.getBuffer();
887
+ const metadata = this.metadataManager.get(stringKey);
888
+
889
+ if (
890
+ metadata?.type === "Uint8Array" ||
891
+ metadata?.type === "encrypted:Uint8Array"
892
+ ) {
893
+ // Return as Uint8Array for binary data
894
+ const result = new Uint8Array(buffer) as unknown as T[K];
895
+ this.eventManager.emit("get", stringKey, result);
896
+ return result;
897
+ } else {
898
+ // Return as string for text data
899
+ const result = new TextDecoder().decode(
900
+ buffer
901
+ ) as unknown as T[K];
902
+ this.eventManager.emit("get", stringKey, result);
903
+ return result;
904
+ }
905
+ }
906
+
907
+ this.eventManager.emit("get", stringKey, value);
908
+ return value as T[K];
909
+ }
910
+
911
+ /**
912
+ * Gets a value safely, returning undefined if key doesn't exist
913
+ */
914
+ public getSafe<K extends keyof T>(key: K): T[K] | undefined {
915
+ try {
916
+ return this.has(key) ? this.get(key) : undefined;
917
+ } catch {
918
+ return undefined;
919
+ }
920
+ }
921
+
922
+ /**
923
+ * Gets a value with a default fallback
924
+ */
925
+ public getWithDefault<K extends keyof T>(key: K, defaultValue: T[K]): T[K] {
926
+ return this.has(key) ? this.get(key) : defaultValue;
927
+ }
928
+
929
+ /**
930
+ * Checks if a key exists
931
+ */
932
+ public has<K extends keyof T>(key: K): boolean {
933
+ this.ensureNotDestroyed();
934
+ const stringKey = ValidationUtils.sanitizeKey(key);
935
+ return this.data.has(stringKey);
936
+ }
937
+
938
+ /**
939
+ * Deletes a key - allows both existing keys and dynamic keys
940
+ */
941
+ public delete<K extends string>(key: K): boolean {
942
+ this.ensureNotDestroyed();
943
+ this.ensureNotReadOnly();
944
+
945
+ const stringKey = ValidationUtils.sanitizeKey(key);
946
+
947
+ if (!this.data.has(stringKey)) {
948
+ return false;
949
+ }
950
+
951
+ // Clean up any secure buffer
952
+ this.cleanupKey(stringKey);
953
+
954
+ const deleted = this.data.delete(stringKey);
955
+ this.metadataManager.delete(stringKey);
956
+
957
+ this.eventManager.emit("delete", stringKey);
958
+ return deleted;
959
+ }
960
+
961
+ /**
962
+ * Cleans up resources associated with a key
963
+ */
964
+ private cleanupKey(key: string): void {
965
+ if (this.secureBuffers.has(key)) {
966
+ this.secureBuffers.get(key)?.destroy();
967
+ this.secureBuffers.delete(key);
968
+ }
969
+ // Note: We don't destroy SecureString or SecureObject instances
970
+ // as they might be used elsewhere
971
+ }
972
+
973
+ /**
974
+ * Clears all data
975
+ */
976
+ public clear(): void {
977
+ this.ensureNotDestroyed();
978
+ this.ensureNotReadOnly();
979
+
980
+ // Destroy all secure buffers
981
+ for (const buffer of this.secureBuffers.values()) {
982
+ buffer.destroy();
983
+ }
984
+
985
+ this.secureBuffers.clear();
986
+ this.data.clear();
987
+ this.metadataManager.clear();
988
+
989
+ this.eventManager.emit("clear");
990
+ }
991
+
992
+ // ===== ITERATION AND COLLECTION METHODS =====
993
+
994
+ /**
995
+ * Gets all keys
996
+ */
997
+ public keys(): Array<keyof T> {
998
+ this.ensureNotDestroyed();
999
+ return Array.from(this.data.keys()) as Array<keyof T>;
1000
+ }
1001
+
1002
+ /**
1003
+ * Gets all values
1004
+ */
1005
+ public values(): Array<T[keyof T]> {
1006
+ this.ensureNotDestroyed();
1007
+ return this.keys().map((key) => this.get(key));
1008
+ }
1009
+
1010
+ /**
1011
+ * Gets all entries as [key, value] pairs
1012
+ */
1013
+ public entries(): Array<[keyof T, T[keyof T]]> {
1014
+ this.ensureNotDestroyed();
1015
+ return this.keys().map(
1016
+ (key) => [key, this.get(key)] as [keyof T, T[keyof T]]
1017
+ );
1018
+ }
1019
+
1020
+ /**
1021
+ * Iterates over each key-value pair
1022
+ */
1023
+ public forEach(
1024
+ callback: (value: T[keyof T], key: keyof T, obj: this) => void
1025
+ ): void {
1026
+ this.ensureNotDestroyed();
1027
+ ValidationUtils.validateCallback(callback, "forEach callback");
1028
+
1029
+ for (const key of this.keys()) {
1030
+ callback(this.get(key), key, this);
1031
+ }
1032
+ }
1033
+
1034
+ /**
1035
+ * Maps over values and returns a new array
1036
+ */
1037
+ public map<U>(
1038
+ callback: (value: T[keyof T], key: keyof T, obj: this) => U
1039
+ ): U[] {
1040
+ this.ensureNotDestroyed();
1041
+ ValidationUtils.validateMapper(callback);
1042
+
1043
+ return this.keys().map((key) => callback(this.get(key), key, this));
1044
+ }
1045
+
1046
+ /**
1047
+ * Filters entries based on a predicate function (like Array.filter)
1048
+ * Returns a new SecureObject with only the entries that match the condition
1049
+ */
1050
+ public filter(
1051
+ predicate: (value: T[keyof T], key: keyof T, obj: this) => boolean
1052
+ ): SecureObject<Partial<T>> {
1053
+ this.ensureNotDestroyed();
1054
+ ValidationUtils.validatePredicate(predicate);
1055
+
1056
+ const filtered = new SecureObject<Partial<T>>();
1057
+
1058
+ for (const key of this.keys()) {
1059
+ const value = this.get(key);
1060
+ if (predicate(value, key, this)) {
1061
+ filtered.set(String(key), value);
1062
+ }
1063
+ }
1064
+
1065
+ // Emit event with filter details
1066
+ this.eventManager.emit("filtered", undefined, {
1067
+ operation: "filter",
1068
+ resultSize: filtered.size,
1069
+ originalSize: this.size,
1070
+ });
1071
+
1072
+ return filtered;
1073
+ }
1074
+
1075
+ /**
1076
+ * Filters entries by specific key names (type-safe for known keys)
1077
+ * Returns a new SecureObject with only the specified keys
1078
+ *
1079
+ * @example
1080
+ * const user = createSecureObject({ name: "John", password: "secret", age: 30 });
1081
+ * const credentials = user.filterByKeys("name", "password");
1082
+ */
1083
+ public filterByKeys<K extends keyof T>(
1084
+ ...keys: K[]
1085
+ ): SecureObject<Pick<T, K>> {
1086
+ this.ensureNotDestroyed();
1087
+
1088
+ const filtered = new SecureObject<Pick<T, K>>();
1089
+
1090
+ for (const key of keys) {
1091
+ if (this.has(key)) {
1092
+ const stringKey = String(key);
1093
+ (filtered as any).set(stringKey, this.get(key));
1094
+ }
1095
+ }
1096
+
1097
+ // Copy sensitive keys that are included in the filter
1098
+ const relevantSensitiveKeys = this.getSensitiveKeys().filter((k) =>
1099
+ keys.includes(k as K)
1100
+ );
1101
+ if (relevantSensitiveKeys.length > 0) {
1102
+ filtered.setSensitiveKeys(relevantSensitiveKeys);
1103
+ }
1104
+
1105
+ this.eventManager.emit("filtered", undefined, {
1106
+ operation: "filterByKeys",
1107
+ keys: keys.map((k) => String(k)),
1108
+ resultSize: filtered.size,
1109
+ });
1110
+
1111
+ return filtered;
1112
+ }
1113
+
1114
+ /**
1115
+ * Filters entries by value type using a type guard function
1116
+ * Returns a new SecureObject with only values of the specified type
1117
+ *
1118
+ * @example
1119
+ * const data = createSecureObject({ name: "John", age: 30, active: true });
1120
+ * const strings = data.filterByType((v): v is string => typeof v === "string");
1121
+ */
1122
+ public filterByType<U>(
1123
+ typeGuard: (value: any) => value is U
1124
+ ): SecureObject<Record<string, U>> {
1125
+ this.ensureNotDestroyed();
1126
+
1127
+ const filtered = new SecureObject<Record<string, U>>();
1128
+
1129
+ for (const key of this.keys()) {
1130
+ const value = this.get(key);
1131
+ if (typeGuard(value)) {
1132
+ const stringKey = String(key);
1133
+ (filtered as any).set(stringKey, value as U);
1134
+ }
1135
+ }
1136
+
1137
+ this.eventManager.emit("filtered", undefined, {
1138
+ operation: "filterByType",
1139
+ resultSize: filtered.size,
1140
+ });
1141
+
1142
+ return filtered;
1143
+ }
1144
+
1145
+ /**
1146
+ * Filters entries to only include sensitive keys
1147
+ * Returns a new SecureObject with only sensitive data
1148
+ *
1149
+ * @example
1150
+ * const user = createSecureObject({ name: "John", password: "secret", age: 30 });
1151
+ * user.addSensitiveKeys("password");
1152
+ * const sensitiveData = user.filterSensitive(); // Only contains password
1153
+ */
1154
+ public filterSensitive(): SecureObject<Partial<T>> {
1155
+ this.ensureNotDestroyed();
1156
+
1157
+ const filtered = new SecureObject<Partial<T>>();
1158
+ const sensitiveKeys = this.getSensitiveKeys();
1159
+
1160
+ for (const key of this.keys()) {
1161
+ const stringKey = String(key);
1162
+ if (sensitiveKeys.includes(stringKey)) {
1163
+ (filtered as any).set(stringKey, this.get(key));
1164
+ }
1165
+ }
1166
+
1167
+ // Copy all sensitive keys to the filtered object
1168
+ filtered.setSensitiveKeys([...sensitiveKeys]);
1169
+
1170
+ this.eventManager.emit("filtered", undefined, {
1171
+ operation: "filterSensitive",
1172
+ resultSize: filtered.size,
1173
+ });
1174
+
1175
+ return filtered;
1176
+ }
1177
+
1178
+ /**
1179
+ * Filters entries to exclude sensitive keys
1180
+ * Returns a new SecureObject with only non-sensitive data
1181
+ *
1182
+ * @example
1183
+ * const user = createSecureObject({ name: "John", password: "secret", age: 30 });
1184
+ * user.addSensitiveKeys("password");
1185
+ * const publicData = user.filterNonSensitive(); // Contains name and age
1186
+ */
1187
+ public filterNonSensitive(options?: {
1188
+ strictMode?: boolean;
1189
+ }): SecureObject<Partial<T>> {
1190
+ this.ensureNotDestroyed();
1191
+ // Default to non-strict mode (false) - only exact matches
1192
+ const strictMode = options?.strictMode === true;
1193
+
1194
+ const filtered = new SecureObject<Partial<T>>();
1195
+
1196
+ for (const key of this.keys()) {
1197
+ const stringKey = String(key);
1198
+ // Use the enhanced sensitive key detection with strictMode
1199
+ if (!this.sensitiveKeysManager.isSensitive(stringKey, strictMode)) {
1200
+ const value = this.get(key);
1201
+
1202
+ // If the value is a nested object, process it with the same strictMode
1203
+ if (
1204
+ value &&
1205
+ typeof value === "object" &&
1206
+ value !== null &&
1207
+ !Array.isArray(value)
1208
+ ) {
1209
+ // Process nested object with the same strict mode
1210
+ const processedValue = this.processNestedObjectForFiltering(
1211
+ value,
1212
+ strictMode
1213
+ );
1214
+ (filtered as any).set(stringKey, processedValue);
1215
+ } else {
1216
+ (filtered as any).set(stringKey, value);
1217
+ }
1218
+ }
1219
+ }
1220
+
1221
+ this.eventManager.emit("filtered", undefined, {
1222
+ operation: "filterNonSensitive",
1223
+ resultSize: filtered.size,
1224
+ });
1225
+
1226
+ return filtered;
1227
+ }
1228
+
1229
+ /**
1230
+ * Processes nested objects for filtering with the same strict mode
1231
+ */
1232
+ private processNestedObjectForFiltering(
1233
+ obj: any,
1234
+ strictMode: boolean
1235
+ ): any {
1236
+ if (Array.isArray(obj)) {
1237
+ // Handle arrays
1238
+ return obj.map((item) =>
1239
+ typeof item === "object" && item !== null
1240
+ ? this.processNestedObjectForFiltering(item, strictMode)
1241
+ : item
1242
+ );
1243
+ } else if (typeof obj === "object" && obj !== null) {
1244
+ // Handle objects
1245
+ const result: any = {};
1246
+ for (const [key, value] of Object.entries(obj)) {
1247
+ if (!this.sensitiveKeysManager.isSensitive(key, strictMode)) {
1248
+ if (typeof value === "object" && value !== null) {
1249
+ // Recursively process nested objects/arrays
1250
+ result[key] = this.processNestedObjectForFiltering(
1251
+ value,
1252
+ strictMode
1253
+ );
1254
+ } else {
1255
+ result[key] = value;
1256
+ }
1257
+ }
1258
+ // If key is sensitive, skip it (don't add to result)
1259
+ }
1260
+ return result;
1261
+ }
1262
+ return obj;
1263
+ }
1264
+
1265
+ // ===== METADATA OPERATIONS =====
1266
+
1267
+ /**
1268
+ * Gets metadata for a specific key
1269
+ */
1270
+ public getMetadata<K extends keyof T>(key: K): ValueMetadata | undefined {
1271
+ this.ensureNotDestroyed();
1272
+ const stringKey = ValidationUtils.sanitizeKey(key);
1273
+ return this.metadataManager.get(stringKey);
1274
+ }
1275
+
1276
+ /**
1277
+ * Gets metadata for all keys
1278
+ */
1279
+ public getAllMetadata(): Map<string, ValueMetadata> {
1280
+ this.ensureNotDestroyed();
1281
+ return this.metadataManager.getAll();
1282
+ }
1283
+
1284
+ // ===== SERIALIZATION METHODS =====
1285
+
1286
+ /**
1287
+ * Converts to a regular object with security-focused serialization
1288
+ *
1289
+ * BEHAVIOR: This is the security-focused method that handles sensitive key filtering.
1290
+ * Use this method when you need controlled access to data with security considerations.
1291
+ * For simple object conversion without filtering, use toObject().
1292
+ *
1293
+ * @example
1294
+ * const user = fObject({
1295
+ id: "1",
1296
+ email: "test@test.com",
1297
+ password: "test123",
1298
+ isVerified: true,
1299
+ userName: "test",
1300
+ firstName: "test",
1301
+ lastName: "test",
1302
+ bio: "test",
1303
+ });
1304
+
1305
+ const getAllResult = user.getAll();
1306
+ console.log("getAllResult.email:", getAllResult.email);
1307
+ console.log("getAllResult.password:", getAllResult.password);
1308
+ console.log("Has password?", "password" in getAllResult);
1309
+
1310
+ // Purpose: Security-conscious data access
1311
+ // Behavior: Filters out sensitive keys by default
1312
+ // Result: password: undefined (filtered for security)
1313
+ // With encryptSensitive: true: ✔ password: "[ENCRYPTED:...]" (encrypted but included)
1314
+ */
1315
+ public getAll(
1316
+ options: SerializationOptions = {}
1317
+ ): T & { _metadata?: Record<string, ValueMetadata> } {
1318
+ this.ensureNotDestroyed();
1319
+ ValidationUtils.validateSerializationOptions(options);
1320
+ const sensitiveKeys = new Set(this.sensitiveKeysManager.getAll());
1321
+
1322
+ return this.serializationHandler.toObject<T>(
1323
+ this.data,
1324
+ sensitiveKeys,
1325
+ options
1326
+ );
1327
+ }
1328
+
1329
+ /**
1330
+ * Gets the full object as a regular JavaScript object
1331
+ *
1332
+ * BEHAVIOR: Returns ALL data including sensitive keys (like standard JS object conversion).
1333
+ * This method does NOT filter sensitive keys by default - use getAll() for security-focused serialization.
1334
+ *
1335
+ * @example
1336
+ * const user = fObject({
1337
+ id: "1",
1338
+ email: "test@test.com",
1339
+ password: "test123",
1340
+ isVerified: true,
1341
+ userName: "test",
1342
+ firstName: "test",
1343
+ lastName: "test",
1344
+ bio: "test",
1345
+ });
1346
+
1347
+ const toObjectResult = user.toObject();
1348
+ console.log("toObjectResult.email:", toObjectResult.email);
1349
+ console.log("toObjectResult.password:", toObjectResult.password);
1350
+ console.log("Has password?", "password" in toObjectResult);
1351
+
1352
+ // Purpose: Standard JavaScript object conversion
1353
+ // Behavior: Returns ALL data including sensitive keys (like password)
1354
+ // Result: ✔ password: "test123" (included)
1355
+
1356
+ Sensitive keys can be handled using .add/removeSensitiveKeys()
1357
+ */
1358
+ public toObject(
1359
+ options?: SerializationOptions
1360
+ ): T & { _metadata?: Record<string, ValueMetadata> } {
1361
+ // toObject() should return ALL data by default (no filtering)
1362
+ // Pass an empty Set to indicate no keys should be filtered
1363
+ const noFiltering = new Set<string>();
1364
+ return this.serializationHandler.toObject<T>(
1365
+ this.data,
1366
+ noFiltering,
1367
+ options
1368
+ );
1369
+ }
1370
+
1371
+ /**
1372
+ * Converts to JSON string
1373
+ */
1374
+ public toJSON(
1375
+ options: SerializationOptions & {
1376
+ strictSensitiveKeys?: boolean;
1377
+ } = {}
1378
+ ): string {
1379
+ this.ensureNotDestroyed();
1380
+ ValidationUtils.validateSerializationOptions(options);
1381
+
1382
+ // Use non-strict mode by default (only exact matches)
1383
+ const strictMode = options.strictSensitiveKeys === true;
1384
+ const isSensitiveKey = (key: string) =>
1385
+ this.sensitiveKeysManager.isSensitive(key, strictMode);
1386
+ return this.serializationHandler.toJSON<T>(
1387
+ this.data,
1388
+ isSensitiveKey,
1389
+ options
1390
+ );
1391
+ }
1392
+
1393
+ // ===== UTILITY METHODS =====
1394
+
1395
+ /**
1396
+ * Creates a hash of the entire object content
1397
+ */
1398
+ public async hash(
1399
+ algorithm: HashAlgorithm = "SHA-256",
1400
+ format: HashOutputFormat = "hex"
1401
+ ): Promise<string | Uint8Array> {
1402
+ this.ensureNotDestroyed();
1403
+
1404
+ const serialized =
1405
+ this.serializationHandler.createHashableRepresentation(
1406
+ this.entries()
1407
+ );
1408
+ const secureString = new SecureString(serialized);
1409
+
1410
+ try {
1411
+ return await secureString.hash(algorithm, format);
1412
+ } finally {
1413
+ secureString.destroy();
1414
+ }
1415
+ }
1416
+
1417
+ /**
1418
+ * Executes a function with the object data and optionally clears it afterward
1419
+ */
1420
+ public use<U>(fn: (obj: this) => U, autoClear: boolean = false): U {
1421
+ this.ensureNotDestroyed();
1422
+ ValidationUtils.validateCallback(fn, "use function");
1423
+
1424
+ try {
1425
+ return fn(this);
1426
+ } finally {
1427
+ if (autoClear) {
1428
+ this.destroy();
1429
+ }
1430
+ }
1431
+ }
1432
+
1433
+ /**
1434
+ * Creates a shallow copy of the SecureObject
1435
+ */
1436
+ public clone(): SecureObject<T> {
1437
+ this.ensureNotDestroyed();
1438
+ return SecureObject.from(this);
1439
+ }
1440
+
1441
+ /**
1442
+ * Merges another object into this one
1443
+ */
1444
+ public merge(
1445
+ other: Partial<T> | SecureObject<Partial<T>>,
1446
+ overwrite: boolean = true
1447
+ ): this {
1448
+ this.ensureNotDestroyed();
1449
+ this.ensureNotReadOnly();
1450
+
1451
+ if (other instanceof SecureObject) {
1452
+ for (const key of other.keys()) {
1453
+ const stringKey = String(key);
1454
+ if (overwrite || !this.has(key as keyof T)) {
1455
+ this.set(stringKey, other.get(key));
1456
+ }
1457
+ }
1458
+ } else {
1459
+ for (const key in other) {
1460
+ if (Object.prototype.hasOwnProperty.call(other, key)) {
1461
+ if (overwrite || !this.has(key as keyof T)) {
1462
+ this.set(String(key), other[key] as SecureValue);
1463
+ }
1464
+ }
1465
+ }
1466
+ }
1467
+
1468
+ return this;
1469
+ }
1470
+
1471
+ // ===== AMAZING NEW FEATURES =====
1472
+
1473
+ /**
1474
+ * Transform values with a mapper function (like Array.map but returns SecureObject)
1475
+ * Returns a new SecureObject with transformed values
1476
+ */
1477
+ public transform<U>(
1478
+ mapper: (value: T[keyof T], key: keyof T, obj: this) => U
1479
+ ): SecureObject<Record<string, U>> {
1480
+ this.ensureNotDestroyed();
1481
+ ValidationUtils.validateMapper(mapper);
1482
+
1483
+ const transformed = new SecureObject<Record<string, U>>();
1484
+
1485
+ for (const key of this.keys()) {
1486
+ const value = this.get(key);
1487
+ const newValue = mapper(value, key, this);
1488
+ const stringKey = String(key);
1489
+ (transformed as any).set(stringKey, newValue);
1490
+ }
1491
+
1492
+ this.eventManager.emit("filtered", undefined, {
1493
+ operation: "transform",
1494
+ resultSize: transformed.size,
1495
+ });
1496
+
1497
+ return transformed;
1498
+ }
1499
+
1500
+ /**
1501
+ * Group entries by a classifier function
1502
+ * Returns a Map where keys are group identifiers and values are SecureObjects
1503
+ */
1504
+ public groupBy<K extends string | number>(
1505
+ classifier: (value: T[keyof T], key: keyof T) => K
1506
+ ): Map<K, SecureObject<Partial<T>>> {
1507
+ this.ensureNotDestroyed();
1508
+ ValidationUtils.validateCallback(classifier, "Classifier function");
1509
+
1510
+ const groups = new Map<K, SecureObject<Partial<T>>>();
1511
+
1512
+ for (const key of this.keys()) {
1513
+ const value = this.get(key);
1514
+ const groupKey = classifier(value, key);
1515
+
1516
+ if (!groups.has(groupKey)) {
1517
+ groups.set(groupKey, new SecureObject<Partial<T>>());
1518
+ }
1519
+
1520
+ const group = groups.get(groupKey)!;
1521
+ const stringKey = String(key);
1522
+ (group as any).set(stringKey, value);
1523
+ }
1524
+
1525
+ this.eventManager.emit("filtered", undefined, {
1526
+ operation: "groupBy",
1527
+ resultSize: groups.size,
1528
+ });
1529
+
1530
+ return groups;
1531
+ }
1532
+
1533
+ /**
1534
+ * Partition entries into two groups based on a predicate
1535
+ * Returns [matching, notMatching] SecureObjects
1536
+ */
1537
+ public partition(
1538
+ predicate: (value: T[keyof T], key: keyof T) => boolean
1539
+ ): [SecureObject<Partial<T>>, SecureObject<Partial<T>>] {
1540
+ this.ensureNotDestroyed();
1541
+ ValidationUtils.validatePredicate(predicate);
1542
+
1543
+ const matching = new SecureObject<Partial<T>>();
1544
+ const notMatching = new SecureObject<Partial<T>>();
1545
+
1546
+ for (const key of this.keys()) {
1547
+ const value = this.get(key);
1548
+ const stringKey = String(key);
1549
+
1550
+ if (predicate(value, key)) {
1551
+ (matching as any).set(stringKey, value);
1552
+ } else {
1553
+ (notMatching as any).set(stringKey, value);
1554
+ }
1555
+ }
1556
+
1557
+ this.eventManager.emit("filtered", undefined, {
1558
+ operation: "partition",
1559
+ resultSize: matching.size + notMatching.size,
1560
+ });
1561
+
1562
+ return [matching, notMatching];
1563
+ }
1564
+
1565
+ /**
1566
+ * Pick specific keys (like Lodash pick but type-safe)
1567
+ * Returns a new SecureObject with only the specified keys
1568
+ */
1569
+ public pick<K extends keyof T>(...keys: K[]): SecureObject<Pick<T, K>> {
1570
+ return this.filterByKeys(...keys);
1571
+ }
1572
+
1573
+ /**
1574
+ * Omit specific keys (opposite of pick)
1575
+ * Returns a new SecureObject without the specified keys
1576
+ */
1577
+ public omit<K extends keyof T>(...keys: K[]): SecureObject<Omit<T, K>> {
1578
+ this.ensureNotDestroyed();
1579
+
1580
+ const omitted = new SecureObject<Omit<T, K>>();
1581
+ const keysToOmit = new Set(keys.map((k) => String(k)));
1582
+
1583
+ for (const key of this.keys()) {
1584
+ const stringKey = String(key);
1585
+ if (!keysToOmit.has(stringKey)) {
1586
+ (omitted as any).set(stringKey, this.get(key));
1587
+ }
1588
+ }
1589
+
1590
+ this.eventManager.emit("filtered", undefined, {
1591
+ operation: "omit",
1592
+ keys: keys.map((k) => String(k)),
1593
+ resultSize: omitted.size,
1594
+ });
1595
+
1596
+ return omitted;
1597
+ }
1598
+
1599
+ /**
1600
+ * Flatten nested objects (one level deep)
1601
+ * Converts { user: { name: "John" } } to { "user.name": "John" }
1602
+ */
1603
+ public flatten(separator: string = "."): SecureObject<Record<string, any>> {
1604
+ this.ensureNotDestroyed();
1605
+
1606
+ const flattened = new SecureObject<Record<string, any>>();
1607
+
1608
+ for (const key of this.keys()) {
1609
+ const value = this.get(key);
1610
+ const stringKey = String(key);
1611
+
1612
+ if (
1613
+ value &&
1614
+ typeof value === "object" &&
1615
+ !Array.isArray(value) &&
1616
+ !((value as any) instanceof Date)
1617
+ ) {
1618
+ // Flatten nested object
1619
+ for (const [nestedKey, nestedValue] of Object.entries(value)) {
1620
+ const flatKey = `${stringKey}${separator}${nestedKey}`;
1621
+ (flattened as any).set(flatKey, nestedValue);
1622
+ }
1623
+ } else {
1624
+ (flattened as any).set(stringKey, value);
1625
+ }
1626
+ }
1627
+
1628
+ this.eventManager.emit("filtered", undefined, {
1629
+ operation: "flatten",
1630
+ resultSize: flattened.size,
1631
+ });
1632
+
1633
+ return flattened;
1634
+ }
1635
+
1636
+ /**
1637
+ * Compact - removes null, undefined, and empty values
1638
+ * Returns a new SecureObject with only truthy values
1639
+ */
1640
+ public compact(): SecureObject<Partial<T>> {
1641
+ return this.filter((value) => {
1642
+ if (value === null || value === undefined) return false;
1643
+ if (typeof value === "string" && value.trim() === "") return false;
1644
+ if (Array.isArray(value) && value.length === 0) return false;
1645
+ if (typeof value === "object" && Object.keys(value).length === 0)
1646
+ return false;
1647
+ return true;
1648
+ });
1649
+ }
1650
+
1651
+ /**
1652
+ * Invert - swap keys and values
1653
+ * Returns a new SecureObject with keys and values swapped
1654
+ */
1655
+ public invert(): SecureObject<Record<string, string>> {
1656
+ this.ensureNotDestroyed();
1657
+
1658
+ const inverted = new SecureObject<Record<string, string>>();
1659
+
1660
+ for (const key of this.keys()) {
1661
+ const value = this.get(key);
1662
+ const stringValue = String(value);
1663
+ const stringKey = String(key);
1664
+ (inverted as any).set(stringValue, stringKey);
1665
+ }
1666
+
1667
+ this.eventManager.emit("filtered", undefined, {
1668
+ operation: "invert",
1669
+ resultSize: inverted.size,
1670
+ });
1671
+
1672
+ return inverted;
1673
+ }
1674
+
1675
+ /**
1676
+ * Defaults - merge with default values (only for missing keys)
1677
+ * Returns a new SecureObject with defaults applied
1678
+ */
1679
+ public defaults(defaultValues: Partial<T>): SecureObject<T> {
1680
+ this.ensureNotDestroyed();
1681
+
1682
+ const result = new SecureObject<T>();
1683
+
1684
+ // First, copy all existing values
1685
+ for (const key of this.keys()) {
1686
+ const stringKey = String(key);
1687
+ (result as any).set(stringKey, this.get(key));
1688
+ }
1689
+
1690
+ // Then, add defaults for missing keys
1691
+ for (const [key, value] of Object.entries(defaultValues)) {
1692
+ if (!this.has(key as keyof T)) {
1693
+ (result as any).set(key, value);
1694
+ }
1695
+ }
1696
+
1697
+ this.eventManager.emit("filtered", undefined, {
1698
+ operation: "defaults",
1699
+ resultSize: result.size,
1700
+ });
1701
+
1702
+ return result;
1703
+ }
1704
+
1705
+ /**
1706
+ * Tap - execute a function with the object and return the object (for chaining)
1707
+ * Useful for debugging or side effects in method chains
1708
+ */
1709
+ public tap(fn: (obj: this) => void): this {
1710
+ this.ensureNotDestroyed();
1711
+ ValidationUtils.validateCallback(fn, "Tap function");
1712
+
1713
+ fn(this);
1714
+ return this;
1715
+ }
1716
+
1717
+ /**
1718
+ * Pipe - transform the object through a series of functions
1719
+ * Each function receives the result of the previous function
1720
+ */
1721
+ public pipe<U>(fn: (obj: this) => U): U;
1722
+ public pipe<U, V>(fn1: (obj: this) => U, fn2: (obj: U) => V): V;
1723
+ public pipe<U, V, W>(
1724
+ fn1: (obj: this) => U,
1725
+ fn2: (obj: U) => V,
1726
+ fn3: (obj: V) => W
1727
+ ): W;
1728
+ public pipe(...fns: Array<(obj: any) => any>): any {
1729
+ this.ensureNotDestroyed();
1730
+
1731
+ return fns.reduce((result, fn) => {
1732
+ ValidationUtils.validateCallback(fn, "Pipe function");
1733
+ return fn(result);
1734
+ }, this as any);
1735
+ }
1736
+
1737
+ /**
1738
+ * Sample - get random entries from the object
1739
+ * Returns a new SecureObject with randomly selected entries
1740
+ */
1741
+ public sample(count: number = 1): SecureObject<Partial<T>> {
1742
+ this.ensureNotDestroyed();
1743
+
1744
+ if (count <= 0) {
1745
+ return new SecureObject<Partial<T>>();
1746
+ }
1747
+
1748
+ const allKeys = this.keys();
1749
+ const sampleSize = Math.min(count, allKeys.length);
1750
+ const sampledKeys: (keyof T)[] = [];
1751
+
1752
+ // Simple random sampling without replacement
1753
+ const availableKeys = [...allKeys];
1754
+ for (let i = 0; i < sampleSize; i++) {
1755
+ const randomIndex = Math.floor(
1756
+ Math.random() * availableKeys.length
1757
+ );
1758
+ sampledKeys.push(
1759
+ availableKeys.splice(randomIndex, 1)[0] as keyof T
1760
+ );
1761
+ }
1762
+
1763
+ const sampled = new SecureObject<Partial<T>>();
1764
+ for (const key of sampledKeys) {
1765
+ const stringKey = String(key);
1766
+ (sampled as any).set(stringKey, this.get(key));
1767
+ }
1768
+
1769
+ this.eventManager.emit("filtered", undefined, {
1770
+ operation: "sample",
1771
+ resultSize: sampled.size,
1772
+ });
1773
+
1774
+ return sampled;
1775
+ }
1776
+
1777
+ /**
1778
+ * Shuffle - return a new SecureObject with keys in random order
1779
+ * Returns a new SecureObject with the same data but shuffled key order
1780
+ */
1781
+ public shuffle(): SecureObject<T> {
1782
+ this.ensureNotDestroyed();
1783
+
1784
+ const allKeys = this.keys();
1785
+ const shuffledKeys = [...allKeys];
1786
+
1787
+ // Fisher-Yates shuffle
1788
+ for (let i = shuffledKeys.length - 1; i > 0; i--) {
1789
+ const j = Math.floor(Math.random() * (i + 1));
1790
+ [shuffledKeys[i], shuffledKeys[j]] = [
1791
+ shuffledKeys[j],
1792
+ shuffledKeys[i],
1793
+ ];
1794
+ }
1795
+
1796
+ const shuffled = new SecureObject<T>();
1797
+ for (const key of shuffledKeys) {
1798
+ const stringKey = String(key);
1799
+ (shuffled as any).set(stringKey, this.get(key));
1800
+ }
1801
+
1802
+ this.eventManager.emit("filtered", undefined, {
1803
+ operation: "shuffle",
1804
+ resultSize: shuffled.size,
1805
+ });
1806
+
1807
+ return shuffled;
1808
+ }
1809
+
1810
+ /**
1811
+ * Chunk - split object into chunks of specified size
1812
+ * Returns an array of SecureObjects, each containing up to 'size' entries
1813
+ */
1814
+ public chunk(size: number): SecureObject<Partial<T>>[] {
1815
+ this.ensureNotDestroyed();
1816
+
1817
+ if (size <= 0) {
1818
+ throw new Error("Chunk size must be greater than 0");
1819
+ }
1820
+
1821
+ const allKeys = this.keys();
1822
+ const chunks: SecureObject<Partial<T>>[] = [];
1823
+
1824
+ for (let i = 0; i < allKeys.length; i += size) {
1825
+ const chunk = new SecureObject<Partial<T>>();
1826
+ const chunkKeys = allKeys.slice(i, i + size);
1827
+
1828
+ for (const key of chunkKeys) {
1829
+ const stringKey = String(key);
1830
+ (chunk as any).set(stringKey, this.get(key));
1831
+ }
1832
+
1833
+ chunks.push(chunk);
1834
+ }
1835
+
1836
+ this.eventManager.emit("filtered", undefined, {
1837
+ operation: "chunk",
1838
+ resultSize: chunks.length,
1839
+ });
1840
+
1841
+ return chunks;
1842
+ }
1843
+
1844
+ // ===== SERIALIZATION AND EXPORT =====
1845
+
1846
+ /**
1847
+ * Serializes the SecureObject to a secure format
1848
+ */
1849
+ public serialize(options: SerializationOptions = {}): string {
1850
+ this.ensureNotDestroyed();
1851
+
1852
+ try {
1853
+ const {
1854
+ includeMetadata = true,
1855
+ encryptSensitive = false,
1856
+ format = "json",
1857
+ } = options;
1858
+
1859
+ // Create serialization package
1860
+ const package_ = {
1861
+ version: "2.0.0",
1862
+ format: "XyPrissSecurity-SecureObject",
1863
+ timestamp: Date.now(),
1864
+ objectId: this._id,
1865
+ data: this.serializationHandler.toObject(
1866
+ this.data,
1867
+ (key: string) =>
1868
+ this.sensitiveKeysManager.isSensitive(key, true), // Use strict mode
1869
+ options
1870
+ ),
1871
+ metadata: includeMetadata
1872
+ ? this.getSerializationMetadata()
1873
+ : null,
1874
+ size: this.size,
1875
+ isReadOnly: this._isReadOnly,
1876
+ encryptionEnabled:
1877
+ this.cryptoHandler.getEncryptionStatus().hasEncryptionKey,
1878
+ };
1879
+
1880
+ // Return as JSON string or binary based on format
1881
+ if (format === "binary") {
1882
+ const jsonString = JSON.stringify(package_);
1883
+ const binaryData = new TextEncoder().encode(jsonString);
1884
+ return Array.from(binaryData)
1885
+ .map((b) => b.toString(16).padStart(2, "0"))
1886
+ .join("");
1887
+ } else {
1888
+ return JSON.stringify(package_, null, 2);
1889
+ }
1890
+ } catch (error) {
1891
+ console.error("Serialization failed:", error);
1892
+ throw new Error(
1893
+ `Serialization failed: ${(error as Error).message}`
1894
+ );
1895
+ }
1896
+ }
1897
+
1898
+ /**
1899
+ * Exports the SecureObject data in various formats
1900
+ */
1901
+ public exportData(
1902
+ format: "json" | "csv" | "xml" | "yaml" = "json"
1903
+ ): string {
1904
+ this.ensureNotDestroyed();
1905
+
1906
+ try {
1907
+ const data = this.toObject();
1908
+
1909
+ switch (format) {
1910
+ case "json":
1911
+ return JSON.stringify(data, null, 2);
1912
+
1913
+ case "csv":
1914
+ return this.exportToCSV(data);
1915
+
1916
+ case "xml":
1917
+ return this.exportToXML(data);
1918
+
1919
+ case "yaml":
1920
+ return this.exportToYAML(data);
1921
+
1922
+ default:
1923
+ throw new Error(`Unsupported export format: ${format}`);
1924
+ }
1925
+ } catch (error) {
1926
+ console.error("Export failed:", error);
1927
+ throw new Error(`Export failed: ${(error as Error).message}`);
1928
+ }
1929
+ }
1930
+
1931
+ /**
1932
+ * Gets serialization metadata
1933
+ */
1934
+ private getSerializationMetadata() {
1935
+ const stats = this.metadataManager.getStats();
1936
+ const memoryUsage = this.getMemoryUsage();
1937
+ return {
1938
+ totalEntries: stats.totalEntries,
1939
+ secureEntries: stats.secureEntries,
1940
+ memoryUsage: memoryUsage.allocatedMemory,
1941
+ lastModified: stats.newestEntry?.getTime() || this._createdAt,
1942
+ createdAt: this._createdAt,
1943
+ accessCount: stats.totalAccesses,
1944
+ averageAccesses: stats.averageAccesses,
1945
+ oldestEntry: stats.oldestEntry?.getTime() || null,
1946
+ newestEntry: stats.newestEntry?.getTime() || null,
1947
+ };
1948
+ }
1949
+
1950
+ /**
1951
+ * Exports to CSV format
1952
+ */
1953
+ private exportToCSV(data: any): string {
1954
+ const entries = Object.entries(data);
1955
+ if (entries.length === 0) return "Key,Value,Type\n";
1956
+
1957
+ let csv = "Key,Value,Type\n";
1958
+ for (const [key, value] of entries) {
1959
+ const type = typeof value;
1960
+ const valueStr =
1961
+ type === "object" ? JSON.stringify(value) : String(value);
1962
+ const escapedValue = `"${valueStr.replace(/"/g, '""')}"`;
1963
+ csv += `"${key}",${escapedValue},${type}\n`;
1964
+ }
1965
+ return csv;
1966
+ }
1967
+
1968
+ /**
1969
+ * Exports to XML format
1970
+ */
1971
+ private exportToXML(data: any): string {
1972
+ let xml = '<?xml version="1.0" encoding="UTF-8"?>\n<SecureObject>\n';
1973
+
1974
+ for (const [key, value] of Object.entries(data)) {
1975
+ const type = typeof value;
1976
+ const valueStr =
1977
+ type === "object" ? JSON.stringify(value) : String(value);
1978
+ xml += ` <entry key="${this.escapeXML(
1979
+ key
1980
+ )}" type="${type}">${this.escapeXML(valueStr)}</entry>\n`;
1981
+ }
1982
+
1983
+ xml += "</SecureObject>";
1984
+ return xml;
1985
+ }
1986
+
1987
+ /**
1988
+ * Exports to YAML format
1989
+ */
1990
+ private exportToYAML(data: any): string {
1991
+ let yaml = "# SecureObject Export\n";
1992
+ yaml += `# Generated: ${new Date().toISOString()}\n\n`;
1993
+
1994
+ for (const [key, value] of Object.entries(data)) {
1995
+ const type = typeof value;
1996
+ if (type === "object") {
1997
+ yaml += `${key}:\n`;
1998
+ yaml += ` value: ${JSON.stringify(value)}\n`;
1999
+ yaml += ` type: ${type}\n\n`;
2000
+ } else {
2001
+ yaml += `${key}: ${JSON.stringify(value)}\n`;
2002
+ }
2003
+ }
2004
+
2005
+ return yaml;
2006
+ }
2007
+
2008
+ /**
2009
+ * Escapes XML special characters
2010
+ */
2011
+ private escapeXML(str: string): string {
2012
+ return str
2013
+ .replace(/&/g, "&amp;")
2014
+ .replace(/</g, "&lt;")
2015
+ .replace(/>/g, "&gt;")
2016
+ .replace(/"/g, "&quot;")
2017
+ .replace(/'/g, "&#39;");
2018
+ }
2019
+
2020
+ /**
2021
+ * Destroys the SecureObject and clears all data
2022
+ */
2023
+ public destroy(): void {
2024
+ if (!this._isDestroyed) {
2025
+ // Clean up memory tracking
2026
+ if (this._memoryTracking) {
2027
+ memoryManager.removeReference(this._id);
2028
+ }
2029
+
2030
+ this.clear();
2031
+ this.eventManager.clear();
2032
+ this._isDestroyed = true;
2033
+ this.eventManager.emit("destroy");
2034
+ }
2035
+ }
2036
+
2037
+ /**
2038
+ * Custom inspection for debugging (masks sensitive data)
2039
+ */
2040
+ public [Symbol.for("nodejs.util.inspect.custom")](): string {
2041
+ if (this._isDestroyed) {
2042
+ return "SecureObject [DESTROYED]";
2043
+ }
2044
+
2045
+ const stats = this.metadataManager.getStats();
2046
+ return `SecureObject [${this.size} items, ${
2047
+ stats.secureEntries
2048
+ } secure] ${this._isReadOnly ? "[READ-ONLY]" : ""}`;
2049
+ }
2050
+ }
2051
+