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.
- package/.agent/workflows/build-xems.md +9 -0
- package/.editorconfig +12 -0
- package/.env.test +4 -0
- package/.github/FUNDING.yml +15 -0
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/codeql.yml +98 -0
- package/.github/workflows/release.yml +91 -0
- package/.private/.meta/+xypriss.meta.ts +6 -0
- package/.private/ACPES_UTF8_FIXES.md +129 -0
- package/.private/PLUGIN_API_TEST_PLAN.md +555 -0
- package/.private/README.md +6 -0
- package/.private/SESSION_SUMMARY_2025-12-12.md +229 -0
- package/.private/XYPRISS_BUG_FIX_REPORT.md +198 -0
- package/.private/XYPRISS_BUG_REPORT.md +140 -0
- package/.private/XYPRISS_RUST_CORE_BRAINSTORM.md +110 -0
- package/.private/acpes_gl_test.ts +38 -0
- package/.private/acpes_test_data.txt +6 -0
- package/.private/algos/comparison.md +87 -0
- package/.private/configs-example.ts +290 -0
- package/.private/configs.ts +22 -0
- package/.private/console-demo-simple.ts +61 -0
- package/.private/console-interception-examples.ts +260 -0
- package/.private/const.ts +6 -0
- package/.private/cpu.bench.md +53 -0
- package/.private/create_test_files.ts +43 -0
- package/.private/diagnose-proxy.cjs +176 -0
- package/.private/feedb.md +16 -0
- package/.private/filesystem-api.md +119 -0
- package/.private/fw.ts +10 -0
- package/.private/goserver.ts +56 -0
- package/.private/important/xm +12 -0
- package/.private/index.html +23 -0
- package/.private/intensive_test_server.ts +244 -0
- package/.private/k.md +2 -0
- package/.private/middlewares/testMiddleware.ts +11 -0
- package/.private/ms1.ts +12 -0
- package/.private/ms1_router2.ts +13 -0
- package/.private/ms1router.ts +10 -0
- package/.private/mserver.ts +14 -0
- package/.private/otherRouterFromFile.ts +11 -0
- package/.private/package_manager_brainstorming.md +804 -0
- package/.private/payload.json +46 -0
- package/.private/plg.json +3 -0
- package/.private/plugins/+plg.ts +8 -0
- package/.private/plugins/authServer.ts +24 -0
- package/.private/plugins/mainServer.ts +28 -0
- package/.private/plugins/t.ts +7 -0
- package/.private/productionCsp.ts +48 -0
- package/.private/repro_memory_error.ts +10 -0
- package/.private/repro_memory_error_dist.ts +10 -0
- package/.private/repro_sys.ts +10 -0
- package/.private/response_control_demo.ts +57 -0
- package/.private/rex.ts +22 -0
- package/.private/router/auth.route.ts +96 -0
- package/.private/router/index.router.ts +20 -0
- package/.private/router/index.ts +35 -0
- package/.private/router/v1.route.ts +9 -0
- package/.private/sandbox/xms/router/index.ts +12 -0
- package/.private/sandbox/xms/router/xserver1.route.ts +12 -0
- package/.private/sandbox/xms/router/xserver2.route.ts +37 -0
- package/.private/sandbox/xms/server.ts +14 -0
- package/.private/sandbox/xms/servers/xserver1.ts +8 -0
- package/.private/sandbox/xms/servers/xserver2.ts +6 -0
- package/.private/security-example.ts +149 -0
- package/.private/serializer.ts +13 -0
- package/.private/server.ts +200 -0
- package/.private/server2.ts +12 -0
- package/.private/test-mob.ts +15 -0
- package/.private/test-pkce.ts +43 -0
- package/.private/test-proxy.cjs +161 -0
- package/.private/test-query-endpoint.ts +28 -0
- package/.private/test-query-params-fix.cjs +184 -0
- package/.private/test-ratelimit.ts +27 -0
- package/.private/test-router.ts +40 -0
- package/.private/test-server-prod.ts +43 -0
- package/.private/test-server.ts +55 -0
- package/.private/test-trust-proxy-ranges.cjs +139 -0
- package/.private/test.json +53 -0
- package/.private/test.pluging.ts +37 -0
- package/.private/testPlugin_Logger.ts +20 -0
- package/.private/test_lifecycle_hooks.ts +120 -0
- package/.private/test_methods_suite.ts +134 -0
- package/.private/test_multi_server.ts +62 -0
- package/.private/test_plugin_api.ts +150 -0
- package/.private/test_upload.ts +103 -0
- package/.private/test_upload_comprehensive.ts +185 -0
- package/.private/testing-meta-config/.meta/+xypriss.meta.ts +4 -0
- package/.private/testing-meta-config/.quickdevignore +1 -0
- package/.private/testing-meta-config/README.md +238 -0
- package/.private/testing-meta-config/bun.lock +1184 -0
- package/.private/testing-meta-config/package-lock.json +4172 -0
- package/.private/testing-meta-config/package.json +31 -0
- package/.private/testing-meta-config/quickdev.config.json +34 -0
- package/.private/testing-meta-config/src/configs/host.conf.ts +83 -0
- package/.private/testing-meta-config/src/configs/xypriss.config.ts +45 -0
- package/.private/testing-meta-config/src/middleware/index.ts +40 -0
- package/.private/testing-meta-config/src/middleware/security.mlw.ts +29 -0
- package/.private/testing-meta-config/src/middleware/validation.middleware.ts +53 -0
- package/.private/testing-meta-config/src/routes/index.ts +97 -0
- package/.private/testing-meta-config/src/schema/user.schema.ts +8 -0
- package/.private/testing-meta-config/src/server.ts +67 -0
- package/.private/testing-meta-config/tsconfig.json +31 -0
- package/.private/testing-meta-config/xypriss.config.json +12 -0
- package/.private/type-safe-configs.ts +323 -0
- package/.private/upload_router.ts +28 -0
- package/.private/upload_serv.ts +48 -0
- package/.private/xms.md +1 -0
- package/.private/xvault.xems +0 -0
- package/.private/xypriss-cors-methods-array-bug.md +297 -0
- package/.quickdevignore +3 -0
- package/CONTRIBUTING.md +411 -0
- package/README.md +2 -1
- package/RELEASE_XFPM_G0.1.48.md +30 -0
- package/__tests__/COMPRESSION_FIX_SUMMARY.md +268 -0
- package/__tests__/COMPRESSION_PLUGIN_COMPLETE.md +224 -0
- package/__tests__/COMPRESSION_PLUGIN_IMPLEMENTATION_PLAN.md +253 -0
- package/__tests__/README.md +192 -0
- package/__tests__/TEST_INVESTIGATION_REPORT.md +247 -0
- package/__tests__/XYPRISS_COMPRESSION_SUMMARY.md +279 -0
- package/__tests__/acpes.test.html +12 -0
- package/__tests__/acpes_gl_test.ts +38 -0
- package/__tests__/analytics-engine.test.ts +292 -0
- package/__tests__/automatic-json-parsing.js +188 -0
- package/__tests__/bun-port-test.ts +186 -0
- package/__tests__/bun_cluster_test.ts +603 -0
- package/__tests__/bun_cluster_testv2.ts +448 -0
- package/__tests__/cache-persistence-fix-test.ts +149 -0
- package/__tests__/cache_testing/simplified_cache_test.ts +114 -0
- package/__tests__/cache_testing/test_redis_cache.ts +62 -0
- package/__tests__/cache_testing/type_safety_test.ts +200 -0
- package/__tests__/check_date.ts +10 -0
- package/__tests__/cluster_test.cjs +583 -0
- package/__tests__/cluster_test.js +38 -0
- package/__tests__/comprehensive-port-test.ts +192 -0
- package/__tests__/console.test.ts +262 -0
- package/__tests__/cors-multiserver-bug.test.ts +243 -0
- package/__tests__/cors-test-server.ts +124 -0
- package/__tests__/cors-test.html +98 -0
- package/__tests__/cors.test.ts +325 -0
- package/__tests__/crypto-operations.test.ts +334 -0
- package/__tests__/debug-conflict.js +69 -0
- package/__tests__/debug-memory.js +94 -0
- package/__tests__/debug-port.js +66 -0
- package/__tests__/debug-security.ts +54 -0
- package/__tests__/debug-server-startup.ts +187 -0
- package/__tests__/debug-test.js +73 -0
- package/__tests__/debug_logging.ts +104 -0
- package/__tests__/example-circular-fix.cjs +133 -0
- package/__tests__/express-listen-test.ts +144 -0
- package/__tests__/fObject.test.ts +38 -0
- package/__tests__/fast-routing-example.ts +166 -0
- package/__tests__/final-port-switch-test.ts +192 -0
- package/__tests__/fix-imports.cjs +109 -0
- package/__tests__/gl.ts +137 -0
- package/__tests__/gl_ts.ts +49 -0
- package/__tests__/glob.test.ts +11 -0
- package/__tests__/integration.test.ts +414 -0
- package/__tests__/memory-manager.test.ts +401 -0
- package/__tests__/memory-optimized-cluster.ts +359 -0
- package/__tests__/memory_friendly_test.ts +444 -0
- package/__tests__/middleware-id-tracking.test.ts +344 -0
- package/__tests__/middleware-system.test.ts +149 -0
- package/__tests__/middleware_test1.ts +61 -0
- package/__tests__/mobile-test/test-okhttp.js +71 -0
- package/__tests__/multi-server-404-config-test.ts +346 -0
- package/__tests__/network-plugin-example.js +203 -0
- package/__tests__/network-plugins-comprehensive.test.ts +523 -0
- package/__tests__/network-plugins-manual-demo.ts +376 -0
- package/__tests__/network-plugins-quick-test.ts +132 -0
- package/__tests__/object-collection-tracking.test.ts +337 -0
- package/__tests__/optimization-engine.test.ts +394 -0
- package/__tests__/plugin-system-test.ts +92 -0
- package/__tests__/plugins/+plg.ts +8 -0
- package/__tests__/plugins/t.ts +7 -0
- package/__tests__/port-availability-test.ts +153 -0
- package/__tests__/port-switch-conflict-test.ts +144 -0
- package/__tests__/port-switch-debug.ts +116 -0
- package/__tests__/rate-limiting.test.ts +221 -0
- package/__tests__/rate_lim.ts +44 -0
- package/__tests__/redirect.ts +164 -0
- package/__tests__/redis_cache_test.ts +25 -0
- package/__tests__/repro_rate_limit.ts +24 -0
- package/__tests__/router/index.ts +13 -0
- package/__tests__/router/test_router.ts +57 -0
- package/__tests__/router copy/index.router.ts +20 -0
- package/__tests__/router_test.ts +32 -0
- package/__tests__/run-all-tests.ts +179 -0
- package/__tests__/run-network-tests.sh +261 -0
- package/__tests__/run-placeholder-tests.ts +137 -0
- package/__tests__/security-example.ts +149 -0
- package/__tests__/security.test.ts +305 -0
- package/__tests__/server-creation.test.ts +253 -0
- package/__tests__/server.test.ts +70 -0
- package/__tests__/simple-port-test.ts +180 -0
- package/__tests__/simple_router_test.ts +45 -0
- package/__tests__/stress-test-network-plugins-fixed.sh +305 -0
- package/__tests__/stress-test-network-plugins.sh +328 -0
- package/__tests__/stress_test_intelligence.sh +384 -0
- package/__tests__/test/bun.lock +846 -0
- package/__tests__/test-acpes-utf8-fix.js +105 -0
- package/__tests__/test-acpes.js +102 -0
- package/__tests__/test-advanced-encryption.js +163 -0
- package/__tests__/test-all-network-plugins.mjs +353 -0
- package/__tests__/test-auto-port.cjs +109 -0
- package/__tests__/test-auto-ts/auto-check-test.ts +18 -0
- package/__tests__/test-cache-persistence-fix.ts +195 -0
- package/__tests__/test-circular-reference-fix.ts +214 -0
- package/__tests__/test-cluster-startup copy.ts +222 -0
- package/__tests__/test-cluster-startup.ts +222 -0
- package/__tests__/test-console-debug.ts +106 -0
- package/__tests__/test-cors.js +36 -0
- package/__tests__/test-ffunc.ts +138 -0
- package/__tests__/test-import.mjs +63 -0
- package/__tests__/test-integrated-network-plugins.mjs +493 -0
- package/__tests__/test-interface.ts +40 -0
- package/__tests__/test-json-parsing.mjs +87 -0
- package/__tests__/test-local-import.cjs +25 -0
- package/__tests__/test-local-import.js +28 -0
- package/__tests__/test-memory-cli.js +21 -0
- package/__tests__/test-modular.js +141 -0
- package/__tests__/test-no-conflict.ts +107 -0
- package/__tests__/test-port-conflict.js +64 -0
- package/__tests__/test-port-error.js +41 -0
- package/__tests__/test-port-manager.js +64 -0
- package/__tests__/test-power.ts +54 -0
- package/__tests__/test-realistic-bug-scenario.ts +101 -0
- package/__tests__/test-resilience.ts +53 -0
- package/__tests__/test-ultra-fast.ts +121 -0
- package/__tests__/test-user-example.mjs +114 -0
- package/__tests__/test-xhsc.ts +90 -0
- package/__tests__/test_cluster.ts +342 -0
- package/__tests__/test_cluster_simple.ts +221 -0
- package/__tests__/test_csrf_and_final.ts +187 -0
- package/__tests__/test_logging.ts +140 -0
- package/__tests__/test_manual_multer.ts +59 -0
- package/__tests__/test_manual_multer_client.ts +62 -0
- package/__tests__/test_matchit.rs +14 -0
- package/__tests__/test_plugins.ts +307 -0
- package/__tests__/test_real_cpu_work.ts +317 -0
- package/__tests__/test_request_management.ts +161 -0
- package/__tests__/test_router_and_middleware.ts +154 -0
- package/__tests__/test_upload.ts +62 -0
- package/__tests__/test_worker_direct.ts +77 -0
- package/__tests__/test_worker_pool.ts +224 -0
- package/__tests__/test_xjson.sh +21 -0
- package/__tests__/utils/cache.ts +15 -0
- package/__tests__/verify-network-plugins.sh +248 -0
- package/__tests__/wildcard-cors.test.ts +90 -0
- package/cache/.write_test +1 -0
- package/docs/ENVIRONMENT_SHIELD.md +68 -0
- package/docs/README.md +49 -0
- package/docs/XEMS_TUTORIAL.md +205 -0
- package/docs/cluster/MULTI_SERVER.md +479 -0
- package/docs/cluster/cluster-configuration-guide.md +92 -0
- package/docs/cluster/cluster-overview.md +33 -0
- package/docs/cluster/cluster-performance-tuning-updated.md +78 -0
- package/docs/cluster/multi-server.md +288 -0
- package/docs/config/CFG_API.md +61 -0
- package/docs/config/CONFIGS_API.md +414 -0
- package/docs/config/CONFIGS_QUICK_REFERENCE.md +124 -0
- package/docs/config/META_CONFIG.md +65 -0
- package/docs/config/NETWORK_CONFIG_GUIDE.md +441 -0
- package/docs/config/configuration.md +383 -0
- package/docs/core/CONST_API.md +88 -0
- package/docs/core/GLOBAL_APIS.md +190 -0
- package/docs/core/MEMORY_DETECTION.md +206 -0
- package/docs/core/MIDDLEWARE_ARCHITECTURE.md +227 -0
- package/docs/core/SERVER_CORE_ARCHITECTURE.md +68 -0
- package/docs/core/WORKSPACE_SYSTEM.md +97 -0
- package/docs/core/XHSC_CORE.md +90 -0
- package/docs/core/api-reference.md +406 -0
- package/docs/core/memory-management.md +350 -0
- package/docs/features/CONSOLE_INTERCEPTION_GUIDE.md +698 -0
- package/docs/features/CONSOLE_INTERCEPT_HOOK.md +516 -0
- package/docs/features/FILE_UPLOAD_GUIDE.md +486 -0
- package/docs/features/SYSTEM_INTELLIGENCE.md +81 -0
- package/docs/features/XJSON_API.md +445 -0
- package/docs/features/browser-terminal-control.md +707 -0
- package/docs/features/file-upload.md +674 -0
- package/docs/features/filesystem-api.md +242 -0
- package/docs/features/xfpm.md +157 -0
- package/docs/guides/EXAMPLES.md +483 -0
- package/docs/guides/FEATURES_OVERVIEW.md +59 -0
- package/docs/guides/INSTALLATION.md +114 -0
- package/docs/guides/QUICK_START.md +278 -0
- package/docs/guides/getting-started.md +472 -0
- package/docs/plugins/PLUGIN_API_IMPLEMENTATION.md +151 -0
- package/docs/plugins/PLUGIN_CORE_HOOKS.md +212 -0
- package/docs/plugins/PLUGIN_DATA_MASKING.md +53 -0
- package/docs/plugins/PLUGIN_DEVELOPMENT_GUIDE.md +1158 -0
- package/docs/plugins/PLUGIN_ERROR_HANDLING.md +82 -0
- package/docs/plugins/PLUGIN_MANAGEMENT_API.md +92 -0
- package/docs/plugins/PLUGIN_PERMISSIONS.md +123 -0
- package/docs/plugins/PLUGIN_STABILITY.md +66 -0
- package/docs/plugins/PLUGIN_SYSTEM_GUIDE.md +714 -0
- package/docs/plugins/plugins.md +550 -0
- package/docs/routing/HTTP_METHODS_REFERENCE.md +152 -0
- package/docs/routing/ROUTING.md +145 -0
- package/docs/routing/routing.md +456 -0
- package/docs/security/RATE_LIMIT_EXCLUSIONS.md +85 -0
- package/docs/security/ROUTE_BASED_SECURITY.md +373 -0
- package/docs/security/SECURITY.md +285 -0
- package/docs/security/TRUST_PROXY.md +353 -0
- package/docs/security/WILDCARD_CORS.md +284 -0
- package/docs/security/access-control-middleware.md +366 -0
- package/docs/security/advanced-cors-regexp.md +612 -0
- package/docs/security/enhanced-csp-configuration.md +520 -0
- package/docs/security/request-signature-auth.md +456 -0
- package/docs/security/security-features-overview.md +483 -0
- package/docs/system/README.md +202 -0
- package/docs/system/complete-reference.md +563 -0
- package/docs/system/configuration.md +438 -0
- package/docs/system/cpu-monitoring.md +462 -0
- package/docs/system/directory-management.md +611 -0
- package/docs/system/disk-information.md +554 -0
- package/docs/system/environment.md +445 -0
- package/docs/system/file-io.md +676 -0
- package/docs/system/memory-management.md +549 -0
- package/docs/system/migration-v5-to-v6.md +507 -0
- package/docs/system/network-statistics.md +645 -0
- package/docs/system/path-operations.md +506 -0
- package/docs/system/process-management.md +483 -0
- package/docs/system/search-filter.md +562 -0
- package/docs/system/sys-globals.md +119 -0
- package/docs/system/watching-streaming.md +99 -0
- package/examples/plugin-api-examples.ts +139 -0
- package/examples/security-example.ts +121 -0
- package/examples/security-showcase.ts +334 -0
- package/examples/server/package.json +0 -0
- package/examples/server/src/index.ts +5 -0
- package/examples/simple-cluster-example.ts +95 -0
- package/examples/xjson-example.ts +288 -0
- package/index.html +261 -0
- package/mods/ACPES/.acpes/2720a0cba:nehonix.a0cba72125.enc +1 -0
- package/mods/ACPES/LICENSE +21 -0
- package/mods/ACPES/README.md +203 -0
- package/mods/ACPES/docs/README.md +62 -0
- package/mods/ACPES/docs/advanced-encryption.md +248 -0
- package/mods/ACPES/docs/api-reference.md +216 -0
- package/mods/ACPES/docs/architecture.md +188 -0
- package/mods/ACPES/docs/getting-started.md +182 -0
- package/mods/ACPES/docs/platform-support.md +265 -0
- package/mods/ACPES/docs/security.md +292 -0
- package/mods/ACPES/docs/troubleshooting.md +0 -0
- package/mods/ACPES/package-lock.json +76 -0
- package/mods/ACPES/package.json +177 -0
- package/mods/ACPES/rollup.config.js +244 -0
- package/mods/ACPES/src/components/advancedEncryption.ts +354 -0
- package/mods/ACPES/src/components/compression.ts +52 -0
- package/mods/ACPES/src/components/encryption.ts +147 -0
- package/mods/ACPES/src/components/fingerprint.ts +45 -0
- package/mods/ACPES/src/components/index.ts +11 -0
- package/mods/ACPES/src/components/keyRotation.ts +299 -0
- package/mods/ACPES/src/components/security.ts +232 -0
- package/mods/ACPES/src/core/index.ts +11 -0
- package/mods/ACPES/src/core/platform.ts +112 -0
- package/mods/ACPES/src/core/storage.ts +730 -0
- package/mods/ACPES/src/index.ts +113 -0
- package/mods/ACPES/src/platforms/fallback.ts +80 -0
- package/mods/ACPES/src/platforms/index.ts +10 -0
- package/mods/ACPES/src/platforms/mobile.ts +101 -0
- package/mods/ACPES/src/platforms/node.ts +175 -0
- package/mods/ACPES/src/platforms/web.ts +147 -0
- package/mods/ACPES/src/types/index.ts +11 -0
- package/mods/ACPES/src/types/keyRotation.t.ts +20 -0
- package/mods/ACPES/src/types/options.ts +42 -0
- package/mods/ACPES/src/types/platform.ts +28 -0
- package/mods/ACPES/src/types/security.ts +39 -0
- package/mods/ACPES/src/types/storage.ts +23 -0
- package/mods/ACPES/src/utils/constants.ts +45 -0
- package/mods/ACPES/src/utils/helpers.ts +18 -0
- package/mods/ACPES/src/utils/index.ts +36 -0
- package/mods/ACPES/src/utils/prompt.ts +89 -0
- package/mods/ACPES/src/utils/validation.ts +51 -0
- package/mods/ACPES/tsconfig.json +42 -0
- package/mods/ACPES/yarn.lock +23 -0
- package/mods/memory-manager/Cargo.lock +974 -0
- package/mods/memory-manager/Cargo.toml +41 -0
- package/mods/memory-manager/NOTE.txt +3 -0
- package/mods/memory-manager/src/allocation_tracker.rs +371 -0
- package/mods/memory-manager/src/error.rs +294 -0
- package/mods/memory-manager/src/ffi.rs +469 -0
- package/mods/memory-manager/src/garbage_collector.rs +401 -0
- package/mods/memory-manager/src/lib.rs +138 -0
- package/mods/memory-manager/src/memory_manager.rs +429 -0
- package/mods/memory-manager/src/memory_pool.rs +564 -0
- package/mods/memory-manager/src/types.rs +285 -0
- package/mods/memory-manager/src/utils.rs +374 -0
- package/mods/security/LICENSE +21 -0
- package/mods/security/README.md +311 -0
- package/mods/security/bun.lock +1490 -0
- package/mods/security/docs/PKCE_API_DOCUMENTATION.md +255 -0
- package/mods/security/docs/api-reference.md +412 -0
- package/mods/security/docs/environment-setup.md +88 -0
- package/mods/security/docs/security-guide.md +395 -0
- package/mods/security/package-lock.json +7586 -0
- package/mods/security/package.json +249 -0
- package/mods/security/rollup.config.js +243 -0
- package/mods/security/src/algorithms/hash-algorithms.ts +894 -0
- package/mods/security/src/algorithms/registry.ts +82 -0
- package/mods/security/src/components/attestation.ts +1380 -0
- package/mods/security/src/components/cache/FastLRU.ts +402 -0
- package/mods/security/src/components/cache/SCC.ts +665 -0
- package/mods/security/src/components/cache/UFSIMC.ts +1399 -0
- package/mods/security/src/components/cache/cacheSys.ts +775 -0
- package/mods/security/src/components/cache/cacheSys.utils.ts +121 -0
- package/mods/security/src/components/cache/config/cache.config.ts +40 -0
- package/mods/security/src/components/cache/index.ts +1127 -0
- package/mods/security/src/components/cache/types/UFSIMC.type.ts +43 -0
- package/mods/security/src/components/cache/types/cache.type.ts +162 -0
- package/mods/security/src/components/cache/useCache.ts +287 -0
- package/mods/security/src/components/canary-tokens.ts +457 -0
- package/mods/security/src/components/entropy-augmentation.ts +611 -0
- package/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.ts +407 -0
- package/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.ts +645 -0
- package/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.ts +745 -0
- package/mods/security/src/components/fortified-function/const/exec.const.ts +26 -0
- package/mods/security/src/components/fortified-function/core/fortified-config.ts +443 -0
- package/mods/security/src/components/fortified-function/core/fortified-core.ts.txt +1347 -0
- package/mods/security/src/components/fortified-function/core/fortified-function-core.ts +785 -0
- package/mods/security/src/components/fortified-function/core/fortified-logger.ts +330 -0
- package/mods/security/src/components/fortified-function/core/index.ts +27 -0
- package/mods/security/src/components/fortified-function/core/mods/api-manager.ts +254 -0
- package/mods/security/src/components/fortified-function/core/mods/cache-manager.ts +148 -0
- package/mods/security/src/components/fortified-function/core/mods/execution-context.ts +135 -0
- package/mods/security/src/components/fortified-function/core/mods/execution-engine.ts +186 -0
- package/mods/security/src/components/fortified-function/core/mods/execution-router.ts +136 -0
- package/mods/security/src/components/fortified-function/core/mods/index.ts +20 -0
- package/mods/security/src/components/fortified-function/core/mods/memory-manager.ts +184 -0
- package/mods/security/src/components/fortified-function/core/mods/security-manager.ts +123 -0
- package/mods/security/src/components/fortified-function/core/mods/stats-manager.ts +194 -0
- package/mods/security/src/components/fortified-function/core/mods/timing-manager.ts +150 -0
- package/mods/security/src/components/fortified-function/engines/analytics-engine.ts +502 -0
- package/mods/security/src/components/fortified-function/engines/execution-engine.ts +520 -0
- package/mods/security/src/components/fortified-function/engines/index.ts +13 -0
- package/mods/security/src/components/fortified-function/engines/optimization-engine.ts +626 -0
- package/mods/security/src/components/fortified-function/fortified-function.ts +273 -0
- package/mods/security/src/components/fortified-function/index.ts +234 -0
- package/mods/security/src/components/fortified-function/performance/index.ts +15 -0
- package/mods/security/src/components/fortified-function/performance/performance-monitor.ts +293 -0
- package/mods/security/src/components/fortified-function/performance/performance-timer.ts +239 -0
- package/mods/security/src/components/fortified-function/security/index.ts +8 -0
- package/mods/security/src/components/fortified-function/security/security-handler.ts +283 -0
- package/mods/security/src/components/fortified-function/serializer/safe-serializer.ts +454 -0
- package/mods/security/src/components/fortified-function/smart-cache.ts +781 -0
- package/mods/security/src/components/fortified-function/types/fortified-types.ts +322 -0
- package/mods/security/src/components/fortified-function/types/types.ts +412 -0
- package/mods/security/src/components/fortified-function/types/ufa.type.ts +9 -0
- package/mods/security/src/components/fortified-function/utils/index.ts +13 -0
- package/mods/security/src/components/fortified-function/utils/utils.ts +98 -0
- package/mods/security/src/components/index.ts +37 -0
- package/mods/security/src/components/memory-hard.ts +1300 -0
- package/mods/security/src/components/post-quantum.ts +1366 -0
- package/mods/security/src/components/runtime-verification.ts +867 -0
- package/mods/security/src/components/secure-array/core/secure-array-core.ts +2028 -0
- package/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.ts +401 -0
- package/mods/security/src/components/secure-array/events/event-manager.ts +372 -0
- package/mods/security/src/components/secure-array/index.ts +295 -0
- package/mods/security/src/components/secure-array/metadata/metadata-manager.ts +406 -0
- package/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.ts +469 -0
- package/mods/security/src/components/secure-array/types/index.ts +327 -0
- package/mods/security/src/components/secure-array/utils/id-generator.ts +86 -0
- package/mods/security/src/components/secure-array/utils/validation.ts +350 -0
- package/mods/security/src/components/secure-memory.ts +1155 -0
- package/mods/security/src/components/secure-object/README.md +217 -0
- package/mods/security/src/components/secure-object/core/secure-object-core.ts +2051 -0
- package/mods/security/src/components/secure-object/encryption/crypto-handler.ts +447 -0
- package/mods/security/src/components/secure-object/encryption/sensitive-keys.ts +227 -0
- package/mods/security/src/components/secure-object/events/event-manager.ts +246 -0
- package/mods/security/src/components/secure-object/index.ts +151 -0
- package/mods/security/src/components/secure-object/metadata/metadata-manager.ts +217 -0
- package/mods/security/src/components/secure-object/serialization/serialization-handler.ts +244 -0
- package/mods/security/src/components/secure-object/types/index.ts +124 -0
- package/mods/security/src/components/secure-object/utils/id-generator.ts +66 -0
- package/mods/security/src/components/secure-object/utils/validation.ts +288 -0
- package/mods/security/src/components/secure-serialization.ts +1178 -0
- package/mods/security/src/components/secure-string/README.md +275 -0
- package/mods/security/src/components/secure-string/advanced/entropy-analyzer.ts +402 -0
- package/mods/security/src/components/secure-string/advanced/performance-monitor.ts +527 -0
- package/mods/security/src/components/secure-string/advanced/quantum-safe.ts +385 -0
- package/mods/security/src/components/secure-string/buffer/buffer-manager.ts +246 -0
- package/mods/security/src/components/secure-string/core/secure-string-core.ts +1105 -0
- package/mods/security/src/components/secure-string/crypto/crypto-operations.ts +452 -0
- package/mods/security/src/components/secure-string/index.ts +274 -0
- package/mods/security/src/components/secure-string/operations/comparison-operations.ts +266 -0
- package/mods/security/src/components/secure-string/operations/string-operations.ts +333 -0
- package/mods/security/src/components/secure-string/types/index.ts +250 -0
- package/mods/security/src/components/secure-string/validation/string-validator.ts +401 -0
- package/mods/security/src/components/side-channel.ts +299 -0
- package/mods/security/src/components/tamper-evident-logging.ts +517 -0
- package/mods/security/src/const/DEFAULT_CONSOLE_CONFIG.ts +83 -0
- package/mods/security/src/const/buffer.const.ts +11 -0
- package/mods/security/src/core/crypt.ts +52 -0
- package/mods/security/src/core/crypto.ts +1001 -0
- package/mods/security/src/core/hash/hash-advanced.ts +530 -0
- package/mods/security/src/core/hash/hash-core.ts +556 -0
- package/mods/security/src/core/hash/hash-entropy.ts +359 -0
- package/mods/security/src/core/hash/hash-security.ts +538 -0
- package/mods/security/src/core/hash/hash-types.ts +107 -0
- package/mods/security/src/core/hash/hash-utils.ts +345 -0
- package/mods/security/src/core/hash/hash-validator.ts +382 -0
- package/mods/security/src/core/hash/index.ts +27 -0
- package/mods/security/src/core/hash.ts +34 -0
- package/mods/security/src/core/index.ts +6 -0
- package/mods/security/src/core/keys/ARCHITECTURE +82 -0
- package/mods/security/src/core/keys/algorithms/index.ts +9 -0
- package/mods/security/src/core/keys/algorithms/mods/Argon2Algo.ts +192 -0
- package/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.ts +374 -0
- package/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.ts +401 -0
- package/mods/security/src/core/keys/index.ts +90 -0
- package/mods/security/src/core/keys/keys-core.ts +279 -0
- package/mods/security/src/core/keys/keys-logger.ts +278 -0
- package/mods/security/src/core/keys/keys-types.ts +255 -0
- package/mods/security/src/core/keys/keys-utils.ts +391 -0
- package/mods/security/src/core/keys.ts +135 -0
- package/mods/security/src/core/password/ARCHITECTURE +9 -0
- package/mods/security/src/core/password/index.ts +329 -0
- package/mods/security/src/core/password/password-algorithms.ts +519 -0
- package/mods/security/src/core/password/password-core.ts +394 -0
- package/mods/security/src/core/password/password-generator.ts +515 -0
- package/mods/security/src/core/password/password-migration.ts +324 -0
- package/mods/security/src/core/password/password-security.ts +649 -0
- package/mods/security/src/core/password/password-types.ts +246 -0
- package/mods/security/src/core/password/password-utils.ts +816 -0
- package/mods/security/src/core/password/swlist.ts +1117 -0
- package/mods/security/src/core/random/ARCHITECTURE +10 -0
- package/mods/security/src/core/random/index.ts +37 -0
- package/mods/security/src/core/random/random-core.ts +1115 -0
- package/mods/security/src/core/random/random-crypto.ts +446 -0
- package/mods/security/src/core/random/random-entropy.ts +453 -0
- package/mods/security/src/core/random/random-generators.ts +445 -0
- package/mods/security/src/core/random/random-security.ts +542 -0
- package/mods/security/src/core/random/random-sources.ts +461 -0
- package/mods/security/src/core/random/random-tokens.ts +421 -0
- package/mods/security/src/core/random/random-types.ts +255 -0
- package/mods/security/src/core/random.ts +14 -0
- package/mods/security/src/core/validators.ts +251 -0
- package/mods/security/src/generators/rsaKeyCalculator.ts +772 -0
- package/mods/security/src/helpers/Uint8Array.ts +392 -0
- package/mods/security/src/helpers/createEnu.ts +30 -0
- package/mods/security/src/helpers/express.middleware.helper.ts +59 -0
- package/mods/security/src/index.ts +1719 -0
- package/mods/security/src/types/console.ts +83 -0
- package/mods/security/src/types/global.ts +129 -0
- package/mods/security/src/types/index.ts +6 -0
- package/mods/security/src/types/options.ts +270 -0
- package/mods/security/src/types/random.ts +77 -0
- package/mods/security/src/types/secure-mem.type.ts +141 -0
- package/mods/security/src/types/secure-memory.ts +28 -0
- package/mods/security/src/types/security.ts +164 -0
- package/mods/security/src/types/stats.ts +149 -0
- package/mods/security/src/types/string.ts +69 -0
- package/mods/security/src/types.ts +582 -0
- package/mods/security/src/utils/CryptoAlgorithmUtils.ts +90 -0
- package/mods/security/src/utils/browserPolyfills.ts +288 -0
- package/mods/security/src/utils/constants.ts +169 -0
- package/mods/security/src/utils/crypto.type.ts +12 -0
- package/mods/security/src/utils/crypto.utils.ts +479 -0
- package/mods/security/src/utils/dataConverter.ts +89 -0
- package/mods/security/src/utils/detectInjection.ts +60 -0
- package/mods/security/src/utils/enc.test.ts +12 -0
- package/mods/security/src/utils/encoding.ts +999 -0
- package/mods/security/src/utils/errorHandler.ts +389 -0
- package/mods/security/src/utils/index.ts +10 -0
- package/mods/security/src/utils/memory/config-manager.ts +375 -0
- package/mods/security/src/utils/memory/event-manager.ts +320 -0
- package/mods/security/src/utils/memory/index.ts +304 -0
- package/mods/security/src/utils/memory/memory-manager.ts +1106 -0
- package/mods/security/src/utils/memory/memory-pool.ts +427 -0
- package/mods/security/src/utils/memory/reference-tracker.ts +454 -0
- package/mods/security/src/utils/memory/types.ts +255 -0
- package/mods/security/src/utils/memory-manager-new.ts +286 -0
- package/mods/security/src/utils/nodeModules.ts +307 -0
- package/mods/security/src/utils/patterns.ts +389 -0
- package/mods/security/src/utils/performanceMonitor.ts +412 -0
- package/mods/security/src/utils/securityUtils.ts +385 -0
- package/mods/security/src/utils/stats.ts +206 -0
- package/mods/security/src/utils/testing.ts +264 -0
- package/mods/security/tsconfig.json +40 -0
- package/package.json +57 -211
- package/quickdev.config.json +35 -0
- package/rollup.config.js +301 -0
- package/scripts/xys.run.js +1 -1
- package/secureStorage.xems +4 -0
- package/shared/logger/Logger.ts +841 -0
- package/shared/logger/index.ts +2 -0
- package/shared/logger/v2/Logger.ts..back.txt +812 -0
- package/shared/types/index.ts +2 -0
- package/shared/types/logger.type.ts +96 -0
- package/simulations/.meta/+xypriss.meta.ts +4 -0
- package/simulations/goxfpm-test2/.quickdevignore +1 -0
- package/simulations/goxfpm-test2/README.md +236 -0
- package/simulations/goxfpm-test2/package-lock.json +7108 -0
- package/simulations/goxfpm-test2/package.json +27 -0
- package/simulations/goxfpm-test2/quickdev.config.json +34 -0
- package/simulations/goxfpm-test2/src/configs/host.conf.ts +83 -0
- package/simulations/goxfpm-test2/src/configs/xypriss.config.ts +284 -0
- package/simulations/goxfpm-test2/src/middleware/index.ts +40 -0
- package/simulations/goxfpm-test2/src/middleware/security.mlw.ts +29 -0
- package/simulations/goxfpm-test2/src/middleware/validation.middleware.ts +53 -0
- package/simulations/goxfpm-test2/src/routes/index.ts +142 -0
- package/simulations/goxfpm-test2/src/schema/user.schema.ts +53 -0
- package/simulations/goxfpm-test2/src/server.ts +68 -0
- package/simulations/goxfpm-test2/tsconfig.json +35 -0
- package/simulations/goxfpm-test2/xypriss.config.json +21 -0
- package/simulations/lxpm_pkg_simulation/.quickdevignore +1 -0
- package/simulations/lxpm_pkg_simulation/README.md +236 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/.quickdevignore +1 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/README.md +236 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/package-lock.json +7108 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/package.json +31 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/quickdev.config.json +34 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/configs/host.conf.ts +83 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/configs/xypriss.config.ts +286 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/index.ts +40 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/security.mlw.ts +29 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/middleware/validation.middleware.ts +53 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/routes/index.ts +97 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/schema/user.schema.ts +53 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/src/server.ts +64 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/tsconfig.json +35 -0
- package/simulations/lxpm_pkg_simulation/lxpm_pkg_simulation/xypriss.config.json +21 -0
- package/simulations/lxpm_pkg_simulation/package-lock.json +7108 -0
- package/simulations/lxpm_pkg_simulation/package.json +31 -0
- package/simulations/lxpm_pkg_simulation/quickdev.config.json +34 -0
- package/simulations/lxpm_pkg_simulation/src/configs/host.conf.ts +83 -0
- package/simulations/lxpm_pkg_simulation/src/configs/xypriss.config.ts +286 -0
- package/simulations/lxpm_pkg_simulation/src/middleware/index.ts +40 -0
- package/simulations/lxpm_pkg_simulation/src/middleware/security.mlw.ts +29 -0
- package/simulations/lxpm_pkg_simulation/src/middleware/validation.middleware.ts +53 -0
- package/simulations/lxpm_pkg_simulation/src/routes/index.ts +97 -0
- package/simulations/lxpm_pkg_simulation/src/schema/user.schema.ts +53 -0
- package/simulations/lxpm_pkg_simulation/src/server.ts +64 -0
- package/simulations/lxpm_pkg_simulation/tsconfig.json +35 -0
- package/simulations/lxpm_pkg_simulation/xypriss.config.json +21 -0
- package/simulations/pkg/.meta/+xypriss.meta.ts +6 -0
- package/simulations/pkg/bun.lock +815 -0
- package/simulations/pkg/package-lock.json +4895 -0
- package/simulations/pkg/package.json +25 -0
- package/simulations/pkg/src/index.ts +15 -0
- package/simulations/pkg/src/logger.ts +0 -0
- package/simulations/pkg/tsconfig.json +29 -0
- package/simulations/pkg/xypriss.config.json +13 -0
- package/simulations/server/.meta/+xypriss.meta.ts +6 -0
- package/simulations/server/.quickdevignore +1 -0
- package/simulations/server/README.md +238 -0
- package/simulations/server/bun.lock +1184 -0
- package/simulations/server/package-lock.json +4829 -0
- package/simulations/server/package.json +25 -0
- package/simulations/server/quickdev.config.json +34 -0
- package/simulations/server/src/configs/host.conf.ts +83 -0
- package/simulations/server/src/configs/xypriss.config.ts +48 -0
- package/simulations/server/src/middleware/index.ts +40 -0
- package/simulations/server/src/middleware/security.mlw.ts +29 -0
- package/simulations/server/src/middleware/validation.middleware.ts +53 -0
- package/simulations/server/src/routes/index.ts +97 -0
- package/simulations/server/src/schema/user.schema.ts +8 -0
- package/simulations/server/src/server.ts +67 -0
- package/simulations/server/test_res.js +3 -0
- package/simulations/server/tsconfig.json +32 -0
- package/simulations/server/xypriss.config.json +22 -0
- package/simulations/test-project-goxfpm/.config +37 -0
- package/simulations/test-project-goxfpm/.quickdevignore +1 -0
- package/simulations/test-project-goxfpm/README.md +236 -0
- package/simulations/test-project-goxfpm/package-lock.json +7108 -0
- package/simulations/test-project-goxfpm/package.json +9 -0
- package/simulations/test-project-goxfpm/quickdev.config.json +34 -0
- package/simulations/test-project-goxfpm/src/configs/host.conf.ts +83 -0
- package/simulations/test-project-goxfpm/src/configs/xypriss.config.ts +302 -0
- package/simulations/test-project-goxfpm/src/middleware/index.ts +40 -0
- package/simulations/test-project-goxfpm/src/middleware/security.mlw.ts +29 -0
- package/simulations/test-project-goxfpm/src/middleware/validation.middleware.ts +53 -0
- package/simulations/test-project-goxfpm/src/routes/index.ts +142 -0
- package/simulations/test-project-goxfpm/src/schema/user.schema.ts +53 -0
- package/simulations/test-project-goxfpm/src/server.ts +68 -0
- package/simulations/test-project-goxfpm/tsconfig.json +35 -0
- package/simulations/test-project-goxfpm/xypriss.config.json +12 -0
- package/simulations/unpacking-test2/.quickdevignore +1 -0
- package/simulations/unpacking-test2/README.md +236 -0
- package/simulations/unpacking-test2/package-lock.json +7108 -0
- package/simulations/unpacking-test2/package.json +31 -0
- package/simulations/unpacking-test2/quickdev.config.json +34 -0
- package/simulations/unpacking-test2/src/configs/host.conf.ts +83 -0
- package/simulations/unpacking-test2/src/configs/xypriss.config.ts +286 -0
- package/simulations/unpacking-test2/src/middleware/index.ts +40 -0
- package/simulations/unpacking-test2/src/middleware/security.mlw.ts +29 -0
- package/simulations/unpacking-test2/src/middleware/validation.middleware.ts +53 -0
- package/simulations/unpacking-test2/src/routes/index.ts +97 -0
- package/simulations/unpacking-test2/src/schema/user.schema.ts +53 -0
- package/simulations/unpacking-test2/src/server.ts +64 -0
- package/simulations/unpacking-test2/tsconfig.json +35 -0
- package/simulations/unpacking-test2/xypriss.config.json +21 -0
- package/simulations/xems-realworld-testing/README.md +73 -0
- package/simulations/xems-realworld-testing/eslint.config.js +23 -0
- package/simulations/xems-realworld-testing/index.html +13 -0
- package/simulations/xems-realworld-testing/package.json +32 -0
- package/simulations/xems-realworld-testing/public/vite.svg +1 -0
- package/simulations/xems-realworld-testing/src/App.css +42 -0
- package/simulations/xems-realworld-testing/src/App.tsx +56 -0
- package/simulations/xems-realworld-testing/src/api.ts +104 -0
- package/simulations/xems-realworld-testing/src/components/Dashboard.tsx +219 -0
- package/simulations/xems-realworld-testing/src/components/LoginForm.tsx +155 -0
- package/simulations/xems-realworld-testing/src/components/RegisterForm.tsx +171 -0
- package/simulations/xems-realworld-testing/src/index.css +2 -0
- package/simulations/xems-realworld-testing/src/main.tsx +10 -0
- package/simulations/xems-realworld-testing/tsconfig.app.json +28 -0
- package/simulations/xems-realworld-testing/tsconfig.json +7 -0
- package/simulations/xems-realworld-testing/tsconfig.node.json +26 -0
- package/simulations/xems-realworld-testing/vite.config.ts +9 -0
- package/simulations/xems-server-test/.quickdevignore +1 -0
- package/simulations/xems-server-test/README.md +236 -0
- package/simulations/xems-server-test/package-lock.json +7108 -0
- package/simulations/xems-server-test/package.json +30 -0
- package/simulations/xems-server-test/quickdev.config.json +34 -0
- package/simulations/xems-server-test/src/configs/host.conf.ts +83 -0
- package/simulations/xems-server-test/src/configs/xypriss.config.ts +286 -0
- package/simulations/xems-server-test/src/middleware/index.ts +40 -0
- package/simulations/xems-server-test/src/middleware/security.mlw.ts +29 -0
- package/simulations/xems-server-test/src/middleware/validation.middleware.ts +53 -0
- package/simulations/xems-server-test/src/routes/index.ts +97 -0
- package/simulations/xems-server-test/src/schema/user.schema.ts +53 -0
- package/simulations/xems-server-test/src/server.ts +64 -0
- package/simulations/xems-server-test/tsconfig.json +35 -0
- package/simulations/xems-server-test/xypriss.config.json +21 -0
- package/src/FiUp.ts +102 -0
- package/src/cache/CacheFactory.ts +850 -0
- package/src/cache/SecureCacheAdapter.ts +1495 -0
- package/src/cache/cache-engine.ts +586 -0
- package/src/cache/index.ts +28 -0
- package/src/cache/type.ts +141 -0
- package/src/config.ts +455 -0
- package/src/const.ts +730 -0
- package/src/encryption/EncryptionService.ts +597 -0
- package/src/encryption/index.ts +36 -0
- package/src/file-upload.ts +288 -0
- package/src/index.ts +183 -0
- package/src/middleware/XJsonResponseHandler.ts +210 -0
- package/src/middleware/XemsSessionMiddleware.ts +125 -0
- package/src/middleware/XyPrissMiddlewareAPI.ts +518 -0
- package/src/middleware/built-in/BuiltInMiddleware.ts +567 -0
- package/src/middleware/built-in/security/BrowserOnlyProtector.ts +702 -0
- package/src/middleware/built-in/security/CommandInjectionDetector.ts +265 -0
- package/src/middleware/built-in/security/LDAPInjectionDetector.ts +113 -0
- package/src/middleware/built-in/security/MobileOnlyProtector.ts +664 -0
- package/src/middleware/built-in/security/PathTraversalDetector.ts +265 -0
- package/src/middleware/built-in/security/README.md +208 -0
- package/src/middleware/built-in/security/RequestSignatureProtector.ts +626 -0
- package/src/middleware/built-in/security/SQLInjectionDetector.ts +434 -0
- package/src/middleware/built-in/security/TerminalOnlyProtector.ts +624 -0
- package/src/middleware/built-in/security/XXEProtector.ts +212 -0
- package/src/middleware/built-in/security/index.ts +26 -0
- package/src/middleware/built-in/security/types.ts +175 -0
- package/src/middleware/safe-json-middleware.ts +236 -0
- package/src/middleware/security-middleware.ts +1541 -0
- package/src/plugins/PluginManager.ts +487 -0
- package/src/plugins/README.md +25 -0
- package/src/plugins/api/PluginAPI.ts +220 -0
- package/src/plugins/const/PluginHookIds.ts +76 -0
- package/src/plugins/core/PluginManager.ts +977 -0
- package/src/plugins/modules/PluginEngine.ts +676 -0
- package/src/plugins/modules/PluginRegistry.ts +419 -0
- package/src/plugins/modules/PluginRegistry.ts.bak +408 -0
- package/src/plugins/modules/builtin/SmartCachePlugin.ts +1082 -0
- package/src/plugins/modules/builtin/server-maintenance-plugin.ts +698 -0
- package/src/plugins/modules/core/CachePlugin.ts +2523 -0
- package/src/plugins/modules/index.ts +48 -0
- package/src/plugins/modules/network/builtin/CompressionPlugin.ts +343 -0
- package/src/plugins/modules/network/builtin/ConnectionPlugin.ts +941 -0
- package/src/plugins/modules/network/builtin/ProxyPlugin.ts +522 -0
- package/src/plugins/modules/network/core/NetworkPlugin.ts +323 -0
- package/src/plugins/modules/network/core/NetworkPluginFactory.ts +47 -0
- package/src/plugins/modules/network/index.ts +28 -0
- package/src/plugins/modules/network/types/NetworkTypes.ts +331 -0
- package/src/plugins/modules/network/types/cnp.type.ts +17 -0
- package/src/plugins/modules/network/utils/NetworkPluginUtils.ts +69 -0
- package/src/plugins/modules/types/PluginTypes.ts +277 -0
- package/src/plugins/modules/xems/XemsBuiltinPlugin.ts +291 -0
- package/src/plugins/modules/xems/XemsPlugin.ts +484 -0
- package/src/plugins/modules/xems/index.ts +2 -0
- package/src/plugins/plugin-manager.ts +188 -0
- package/src/plugins/route-optimization-plugin.ts +559 -0
- package/src/plugins/types/PluginTypes.ts +187 -0
- package/src/plugins/types/index.ts +84 -0
- package/src/quick-start.ts +41 -0
- package/src/schemas/plugingSchema.ts +42 -0
- package/src/server/FastServer.ts +1196 -0
- package/src/server/ServerFactory.ts +105 -0
- package/src/server/components/fastapi/CacheManager.ts +292 -0
- package/src/server/components/fastapi/FileUploadManager.ts +289 -0
- package/src/server/components/fastapi/FileWatcherManager.ts +646 -0
- package/src/server/components/fastapi/MonitoringManager.ts +375 -0
- package/src/server/components/fastapi/PerformanceManager.ts +382 -0
- package/src/server/components/fastapi/RedirectManager.ts +730 -0
- package/src/server/components/fastapi/RequestProcessor.ts +404 -0
- package/src/server/components/fastapi/RouteManager.ts +250 -0
- package/src/server/components/fastapi/WorkerPoolComponent.ts +114 -0
- package/src/server/components/fastapi/console/ConsoleInterceptor.ts +1202 -0
- package/src/server/components/fastapi/console/encryption/ConsoleEncryption.ts +299 -0
- package/src/server/components/fastapi/console/types.ts +318 -0
- package/src/server/components/fastapi/smart-routes.ts +485 -0
- package/src/server/components/fastapi/templates/redirectHtml.html +863 -0
- package/src/server/components/fastapi/templates/redirectTemp.ts +105 -0
- package/src/server/components/fastapi/typescript/TypeScriptChecker.ts +502 -0
- package/src/server/components/lifecycle/slcm.type.ts +45 -0
- package/src/server/components/multi-server/MultiServerApp.ts +667 -0
- package/src/server/components/multi-server/MultiServerManager.ts +451 -0
- package/src/server/conf/networkConnectionConf.ts +26 -0
- package/src/server/conf/proxyConfig.ts +21 -0
- package/src/server/conf/rateLimitConfig.ts +57 -0
- package/src/server/const/ExecutionPredictor_EP.const.ts +88 -0
- package/src/server/const/FileWatcher.config.ts +97 -0
- package/src/server/const/default.ts +366 -0
- package/src/server/const/http.ts +32 -0
- package/src/server/core/HttpServer.ts +574 -0
- package/src/server/core/RequestApp.ts +106 -0
- package/src/server/core/RequestEnhancer.ts +348 -0
- package/src/server/core/ResponseEnhancer.ts +588 -0
- package/src/server/core/StartupProcessor.ts +168 -0
- package/src/server/core/VirtualServer.ts +32 -0
- package/src/server/core/XHSCBridge.ts +779 -0
- package/src/server/core/XHSCProtocol.ts +389 -0
- package/src/server/core/XyDiagnosticsManager.ts +88 -0
- package/src/server/core/XyLifecycleManager.ts +348 -0
- package/src/server/core/XyModuleManager.ts +195 -0
- package/src/server/core/XyRoutingManager.ts +251 -0
- package/src/server/core/XyServerCreator.ts +117 -0
- package/src/server/core/XyprissApp.ts +758 -0
- package/src/server/core/request/XyRequestManager.ts +288 -0
- package/src/server/handlers/NotFoundHandler.ts +99 -0
- package/src/server/handlers/templates/notFoundTemplate.ts +662 -0
- package/src/server/middleware/MiddlewareManager.ts +296 -0
- package/src/server/optimization/ExecutionPredictor.nxs +0 -0
- package/src/server/optimization/ExecutionPredictor.ts +274 -0
- package/src/server/optimization/PerformanceProfiler.ts +318 -0
- package/src/server/optimization/RequestPreCompiler.ts +928 -0
- package/src/server/optimization/UltraFastOptimizer.ts +545 -0
- package/src/server/optimization/performance-monitor.ts +241 -0
- package/src/server/routing/Router.ts +506 -0
- package/src/server/routing/index.ts +14 -0
- package/src/server/service/Reload/FileWatcher.ts +982 -0
- package/src/server/service/Reload/HotReloader.ts +1050 -0
- package/src/server/service/Reload/exec/ExecutableBuilder.ts +419 -0
- package/src/server/service/Reload/exec/TypeScriptExecutor.ts +439 -0
- package/src/server/service/Reload/exec/build-executable.ts +50 -0
- package/src/server/service/Reload/types/TSExecutor.type.ts +18 -0
- package/src/server/service/Reload/types/fw.types.ts +117 -0
- package/src/server/service/Reload/types/hotreloader.ts +29 -0
- package/src/server/service/Reload/types/quickdev.type.ts +30 -0
- package/src/server/utils/ConfigLoader.ts +437 -0
- package/src/server/utils/PortManager.ts +316 -0
- package/src/server/utils/WorkerModeHandler.ts +72 -0
- package/src/server/utils/es_modules.ts +6 -0
- package/src/server/utils/forceClosePort.ts +427 -0
- package/src/server/utils/shouldRegisterRouteOnServer.ts +39 -0
- package/src/server/utils/trustProxy.ts +1005 -0
- package/src/server/utils/wildcardMatcher.ts +281 -0
- package/src/sys/FSApi.ts +1271 -0
- package/src/sys/PathApi.ts +209 -0
- package/src/sys/SysApi.ts +490 -0
- package/src/sys/System.ts +36 -0
- package/src/sys/XyPrissCache.ts +84 -0
- package/src/sys/XyPrissRunner.ts +299 -0
- package/src/sys/cmdr.ts +9 -0
- package/src/sys/types.ts +250 -0
- package/src/sys.ts +473 -0
- package/src/types/CpuMon.t.ts +46 -0
- package/src/types/ExecutionPredictor.type.ts +26 -0
- package/src/types/FiUp.type.ts +90 -0
- package/src/types/NotFoundConfig.ts +114 -0
- package/src/types/README.md +277 -0
- package/src/types/ReqPreCompiler.type.ts +55 -0
- package/src/types/UFOptimizer.type.ts +49 -0
- package/src/types/XyPrissRouter.types.ts +27 -0
- package/src/types/bun_cluster.t.ts +42 -0
- package/src/types/cluster.ipc.t.ts +198 -0
- package/src/types/components/CacheManager.type.ts +8 -0
- package/src/types/components/FWM.type.ts +10 -0
- package/src/types/components/MonitoringM.type.ts +13 -0
- package/src/types/components/PerfomanceMonitory.type.ts +13 -0
- package/src/types/components/PlugingM.type.ts +9 -0
- package/src/types/components/ReqProcessor.type.ts +14 -0
- package/src/types/components/RouteM.type.ts +12 -0
- package/src/types/httpServer.type.ts +154 -0
- package/src/types/index.ts +280 -0
- package/src/types/middleware-api.types.ts +220 -0
- package/src/types/middlewareManager.types.ts +20 -0
- package/src/types/mod/cache.ts +491 -0
- package/src/types/mod/core.ts +426 -0
- package/src/types/mod/monitoring.ts +544 -0
- package/src/types/mod/performance.ts +470 -0
- package/src/types/mod/routing.ts +454 -0
- package/src/types/mod/security.ts +1622 -0
- package/src/types/perfomance.ts +58 -0
- package/src/types/trustProxy.ts +148 -0
- package/src/types/types.ts +2189 -0
- package/src/types/xems.type.ts +89 -0
- package/src/utils/DotEnvLoader.ts +84 -0
- package/src/utils/mergeWithDefaults.ts +223 -0
- package/src/xhs/cluster/XHSCWorker.ts +238 -0
- package/tools/memory-cli/build.sh +36 -0
- package/tools/memory-cli/main.go +401 -0
- package/tools/xfpm-go/LICENSE +13 -0
- package/tools/xfpm-go/README.md +82 -0
- package/tools/xfpm-go/build.sh +91 -0
- package/tools/xfpm-go/cmd/xfpm/exec.go +68 -0
- package/tools/xfpm-go/cmd/xfpm/init.go +491 -0
- package/tools/xfpm-go/cmd/xfpm/list.go +287 -0
- package/tools/xfpm-go/cmd/xfpm/main.go +304 -0
- package/tools/xfpm-go/cmd/xfpm/run.go +107 -0
- package/tools/xfpm-go/cmd/xfpm/uninstall.go +233 -0
- package/tools/xfpm-go/cmd/xfpm/update.go +36 -0
- package/tools/xfpm-go/dev.sh +1 -0
- package/tools/xfpm-go/go.mod +46 -0
- package/tools/xfpm-go/go.sum +173 -0
- package/tools/xfpm-go/internal/core/cas.go +297 -0
- package/tools/xfpm-go/internal/core/config.go +83 -0
- package/tools/xfpm-go/internal/core/extractor.go +54 -0
- package/tools/xfpm-go/internal/core/installer.go +505 -0
- package/tools/xfpm-go/internal/core/project.go +53 -0
- package/tools/xfpm-go/internal/core/registry.go +303 -0
- package/tools/xfpm-go/internal/core/resolver.go +471 -0
- package/tools/xfpm-go/internal/core/script_runner.go +175 -0
- package/tools/xfpm-go/internal/utils/lib_version.go +5 -0
- package/tools/xfpm-go/internal/utils/logger.go +145 -0
- package/tools/xfpm-go/internal/utils/updater.go +131 -0
- package/tools/xfpm-go/pkg/npm/README.md +39 -0
- package/tools/xfpm-go/pkg/npm/install.js +51 -0
- package/tools/xfpm-go/pkg/npm/package.json +29 -0
- package/tools/xfpm-go/scripts/bridge.js +130 -0
- package/tools/xfpm-go/scripts/install.js +146 -0
- package/tools/xfpm-go/scripts/install.ps1 +140 -0
- package/tools/xfpm-go/scripts/install.sh +117 -0
- package/tools/xfpm-go/test/package/LICENSE +21 -0
- package/tools/xfpm-go/test/package/README.md +218 -0
- package/tools/xfpm-go/test/package/package.json +115 -0
- package/tools/xfpm-go/test.tgz +0 -0
- package/tools/xfpm-go/utils/helper_5936.ts +9 -0
- package/tools/xfpm-go/version.json +10 -0
- package/tools/xfpm-go/xfpm +0 -0
- package/tools/xyp/.intentionally-empty-file.o +0 -0
- package/tools/xyp/Cargo.lock +2602 -0
- package/tools/xyp/Cargo.toml +56 -0
- package/tools/xyp/README.md +78 -0
- package/tools/xyp/dev +3 -0
- package/tools/xyp/index.js +75 -0
- package/tools/xyp/install.js +286 -0
- package/tools/xyp/package copy.json +64 -0
- package/tools/xyp/package.json +65 -0
- package/tools/xyp/scripts/build.js +123 -0
- package/tools/xyp/scripts/build.sh +85 -0
- package/tools/xyp/src/commands/exec.rs +113 -0
- package/tools/xyp/src/commands/init.rs +378 -0
- package/tools/xyp/src/commands/install.rs +387 -0
- package/tools/xyp/src/commands/list.rs +62 -0
- package/tools/xyp/src/commands/mod.rs +7 -0
- package/tools/xyp/src/commands/run.rs +98 -0
- package/tools/xyp/src/commands/start.rs +18 -0
- package/tools/xyp/src/commands/uninstall.rs +156 -0
- package/tools/xyp/src/core/cas.rs +250 -0
- package/tools/xyp/src/core/config.rs +87 -0
- package/tools/xyp/src/core/extractor.rs +85 -0
- package/tools/xyp/src/core/installer.rs +683 -0
- package/tools/xyp/src/core/mod.rs +7 -0
- package/tools/xyp/src/core/registry.rs +333 -0
- package/tools/xyp/src/core/resolver.rs +830 -0
- package/tools/xyp/src/core/script_runner.rs +291 -0
- package/tools/xyp/src/main.rs +264 -0
- package/tools/xyp/src/utils/mod.rs +1 -0
- package/tools/xyp/src/utils/shell.rs +89 -0
- package/tools/xyp/xfpm +0 -0
- package/tools/xypriss-sys-go/README.md +47 -0
- package/tools/xypriss-sys-go/build.sh +139 -0
- package/tools/xypriss-sys-go/cmd/xsys/main.go +44 -0
- package/tools/xypriss-sys-go/go.mod +35 -0
- package/tools/xypriss-sys-go/go.sum +80 -0
- package/tools/xypriss-sys-go/internal/cli/archive.go +142 -0
- package/tools/xypriss-sys-go/internal/cli/fs.go +462 -0
- package/tools/xypriss-sys-go/internal/cli/monitor.go +110 -0
- package/tools/xypriss-sys-go/internal/cli/path.go +166 -0
- package/tools/xypriss-sys-go/internal/cli/root.go +140 -0
- package/tools/xypriss-sys-go/internal/cli/search.go +156 -0
- package/tools/xypriss-sys-go/internal/cli/server.go +240 -0
- package/tools/xypriss-sys-go/internal/cli/sys.go +321 -0
- package/tools/xypriss-sys-go/internal/cluster/intelligence.go +159 -0
- package/tools/xypriss-sys-go/internal/cluster/intelligence_unix.go +50 -0
- package/tools/xypriss-sys-go/internal/cluster/intelligence_windows.go +39 -0
- package/tools/xypriss-sys-go/internal/cluster/manager.go +226 -0
- package/tools/xypriss-sys-go/internal/cluster/strategy.go +41 -0
- package/tools/xypriss-sys-go/internal/cluster/worker.go +343 -0
- package/tools/xypriss-sys-go/internal/cluster/worker_unix.go +45 -0
- package/tools/xypriss-sys-go/internal/cluster/worker_windows.go +32 -0
- package/tools/xypriss-sys-go/internal/fs/fs.go +783 -0
- package/tools/xypriss-sys-go/internal/handlers/archive.go +68 -0
- package/tools/xypriss-sys-go/internal/handlers/fs.go +153 -0
- package/tools/xypriss-sys-go/internal/handlers/monitor.go +54 -0
- package/tools/xypriss-sys-go/internal/handlers/path.go +79 -0
- package/tools/xypriss-sys-go/internal/handlers/search.go +60 -0
- package/tools/xypriss-sys-go/internal/handlers/sys.go +110 -0
- package/tools/xypriss-sys-go/internal/ipc/bridge.go +352 -0
- package/tools/xypriss-sys-go/internal/ipc/circuit_breaker.go +93 -0
- package/tools/xypriss-sys-go/internal/ipc/metrics.go +85 -0
- package/tools/xypriss-sys-go/internal/ipc/types.go +102 -0
- package/tools/xypriss-sys-go/internal/proxy/proxy.go +538 -0
- package/tools/xypriss-sys-go/internal/router/router.go +332 -0
- package/tools/xypriss-sys-go/internal/server/server.go +658 -0
- package/tools/xypriss-sys-go/internal/sys/sys.go +432 -0
- package/tools/xypriss-sys-go/internal/sys/types.go +167 -0
- package/tools/xypriss-sys-go/internal/watcher/watcher.go +104 -0
- package/tsconfig.json +51 -0
- package/vault.xems +1 -0
- package/xfpm +0 -0
- package/xypriss.config.jsonc +22 -0
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/mods/security/src/algorithms/hash-algorithms.js +0 -718
- package/dist/cjs/mods/security/src/algorithms/hash-algorithms.js.map +0 -1
- package/dist/cjs/mods/security/src/algorithms/registry.js +0 -83
- package/dist/cjs/mods/security/src/algorithms/registry.js.map +0 -1
- package/dist/cjs/mods/security/src/components/attestation.js +0 -1065
- package/dist/cjs/mods/security/src/components/attestation.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/FastLRU.js +0 -323
- package/dist/cjs/mods/security/src/components/cache/FastLRU.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/UFSIMC.js +0 -1133
- package/dist/cjs/mods/security/src/components/cache/UFSIMC.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/cacheSys.js +0 -624
- package/dist/cjs/mods/security/src/components/cache/cacheSys.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/cacheSys.utils.js +0 -127
- package/dist/cjs/mods/security/src/components/cache/cacheSys.utils.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/config/cache.config.js +0 -39
- package/dist/cjs/mods/security/src/components/cache/config/cache.config.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/index.js +0 -374
- package/dist/cjs/mods/security/src/components/cache/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/cache/useCache.js +0 -235
- package/dist/cjs/mods/security/src/components/cache/useCache.js.map +0 -1
- package/dist/cjs/mods/security/src/components/canary-tokens.js +0 -351
- package/dist/cjs/mods/security/src/components/canary-tokens.js.map +0 -1
- package/dist/cjs/mods/security/src/components/entropy-augmentation.js +0 -478
- package/dist/cjs/mods/security/src/components/entropy-augmentation.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js +0 -338
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js +0 -536
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js +0 -614
- package/dist/cjs/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/const/exec.const.js +0 -18
- package/dist/cjs/mods/security/src/components/fortified-function/const/exec.const.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-config.js +0 -356
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-config.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-function-core.js +0 -520
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-function-core.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-logger.js +0 -246
- package/dist/cjs/mods/security/src/components/fortified-function/core/fortified-logger.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/api-manager.js +0 -189
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/api-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/cache-manager.js +0 -107
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/cache-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-context.js +0 -105
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-context.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-engine.js +0 -127
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-engine.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-router.js +0 -93
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/execution-router.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/memory-manager.js +0 -147
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/memory-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/security-manager.js +0 -102
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/security-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/stats-manager.js +0 -159
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/stats-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/timing-manager.js +0 -125
- package/dist/cjs/mods/security/src/components/fortified-function/core/mods/timing-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/engines/analytics-engine.js +0 -370
- package/dist/cjs/mods/security/src/components/fortified-function/engines/analytics-engine.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/engines/execution-engine.js +0 -402
- package/dist/cjs/mods/security/src/components/fortified-function/engines/execution-engine.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/index.js +0 -174
- package/dist/cjs/mods/security/src/components/fortified-function/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-monitor.js +0 -240
- package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-monitor.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-timer.js +0 -188
- package/dist/cjs/mods/security/src/components/fortified-function/performance/performance-timer.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/security/security-handler.js +0 -254
- package/dist/cjs/mods/security/src/components/fortified-function/security/security-handler.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/serializer/safe-serializer.js +0 -350
- package/dist/cjs/mods/security/src/components/fortified-function/serializer/safe-serializer.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/smart-cache.js +0 -693
- package/dist/cjs/mods/security/src/components/fortified-function/smart-cache.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/types/types.js +0 -16
- package/dist/cjs/mods/security/src/components/fortified-function/types/types.js.map +0 -1
- package/dist/cjs/mods/security/src/components/fortified-function/utils/utils.js +0 -76
- package/dist/cjs/mods/security/src/components/fortified-function/utils/utils.js.map +0 -1
- package/dist/cjs/mods/security/src/components/memory-hard.js +0 -922
- package/dist/cjs/mods/security/src/components/memory-hard.js.map +0 -1
- package/dist/cjs/mods/security/src/components/post-quantum.js +0 -323
- package/dist/cjs/mods/security/src/components/post-quantum.js.map +0 -1
- package/dist/cjs/mods/security/src/components/runtime-verification.js +0 -645
- package/dist/cjs/mods/security/src/components/runtime-verification.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/core/secure-array-core.js +0 -1572
- package/dist/cjs/mods/security/src/components/secure-array/core/secure-array-core.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js +0 -330
- package/dist/cjs/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/events/event-manager.js +0 -270
- package/dist/cjs/mods/security/src/components/secure-array/events/event-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/index.js +0 -66
- package/dist/cjs/mods/security/src/components/secure-array/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/metadata/metadata-manager.js +0 -331
- package/dist/cjs/mods/security/src/components/secure-array/metadata/metadata-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js +0 -390
- package/dist/cjs/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/types/index.js +0 -87
- package/dist/cjs/mods/security/src/components/secure-array/types/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/utils/id-generator.js +0 -80
- package/dist/cjs/mods/security/src/components/secure-array/utils/id-generator.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-array/utils/validation.js +0 -275
- package/dist/cjs/mods/security/src/components/secure-array/utils/validation.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-memory.js +0 -906
- package/dist/cjs/mods/security/src/components/secure-memory.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/core/secure-object-core.js +0 -1605
- package/dist/cjs/mods/security/src/components/secure-object/core/secure-object-core.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/encryption/crypto-handler.js +0 -362
- package/dist/cjs/mods/security/src/components/secure-object/encryption/crypto-handler.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/encryption/sensitive-keys.js +0 -206
- package/dist/cjs/mods/security/src/components/secure-object/encryption/sensitive-keys.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/events/event-manager.js +0 -197
- package/dist/cjs/mods/security/src/components/secure-object/events/event-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/index.js +0 -67
- package/dist/cjs/mods/security/src/components/secure-object/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/metadata/metadata-manager.js +0 -183
- package/dist/cjs/mods/security/src/components/secure-object/metadata/metadata-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/serialization/serialization-handler.js +0 -197
- package/dist/cjs/mods/security/src/components/secure-object/serialization/serialization-handler.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/utils/id-generator.js +0 -64
- package/dist/cjs/mods/security/src/components/secure-object/utils/id-generator.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-object/utils/validation.js +0 -239
- package/dist/cjs/mods/security/src/components/secure-object/utils/validation.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-serialization.js +0 -772
- package/dist/cjs/mods/security/src/components/secure-serialization.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/advanced/entropy-analyzer.js +0 -308
- package/dist/cjs/mods/security/src/components/secure-string/advanced/entropy-analyzer.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/advanced/performance-monitor.js +0 -335
- package/dist/cjs/mods/security/src/components/secure-string/advanced/performance-monitor.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/advanced/quantum-safe.js +0 -245
- package/dist/cjs/mods/security/src/components/secure-string/advanced/quantum-safe.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/buffer/buffer-manager.js +0 -205
- package/dist/cjs/mods/security/src/components/secure-string/buffer/buffer-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/core/secure-string-core.js +0 -788
- package/dist/cjs/mods/security/src/components/secure-string/core/secure-string-core.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/crypto/crypto-operations.js +0 -319
- package/dist/cjs/mods/security/src/components/secure-string/crypto/crypto-operations.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/operations/comparison-operations.js +0 -221
- package/dist/cjs/mods/security/src/components/secure-string/operations/comparison-operations.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/operations/string-operations.js +0 -234
- package/dist/cjs/mods/security/src/components/secure-string/operations/string-operations.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/types/index.js +0 -41
- package/dist/cjs/mods/security/src/components/secure-string/types/index.js.map +0 -1
- package/dist/cjs/mods/security/src/components/secure-string/validation/string-validator.js +0 -334
- package/dist/cjs/mods/security/src/components/secure-string/validation/string-validator.js.map +0 -1
- package/dist/cjs/mods/security/src/components/side-channel.js +0 -146
- package/dist/cjs/mods/security/src/components/side-channel.js.map +0 -1
- package/dist/cjs/mods/security/src/components/tamper-evident-logging.js +0 -391
- package/dist/cjs/mods/security/src/components/tamper-evident-logging.js.map +0 -1
- package/dist/cjs/mods/security/src/const/buffer.const.js +0 -15
- package/dist/cjs/mods/security/src/const/buffer.const.js.map +0 -1
- package/dist/cjs/mods/security/src/core/crypto.js +0 -779
- package/dist/cjs/mods/security/src/core/crypto.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-advanced.js +0 -388
- package/dist/cjs/mods/security/src/core/hash/hash-advanced.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-core.js +0 -410
- package/dist/cjs/mods/security/src/core/hash/hash-core.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-entropy.js +0 -307
- package/dist/cjs/mods/security/src/core/hash/hash-entropy.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-security.js +0 -372
- package/dist/cjs/mods/security/src/core/hash/hash-security.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-types.js +0 -16
- package/dist/cjs/mods/security/src/core/hash/hash-types.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-utils.js +0 -328
- package/dist/cjs/mods/security/src/core/hash/hash-utils.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash/hash-validator.js +0 -312
- package/dist/cjs/mods/security/src/core/hash/hash-validator.js.map +0 -1
- package/dist/cjs/mods/security/src/core/hash.js +0 -25
- package/dist/cjs/mods/security/src/core/hash.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js +0 -135
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js +0 -293
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js +0 -317
- package/dist/cjs/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/keys-core.js +0 -201
- package/dist/cjs/mods/security/src/core/keys/keys-core.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/keys-logger.js +0 -234
- package/dist/cjs/mods/security/src/core/keys/keys-logger.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/keys-types.js +0 -65
- package/dist/cjs/mods/security/src/core/keys/keys-types.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys/keys-utils.js +0 -322
- package/dist/cjs/mods/security/src/core/keys/keys-utils.js.map +0 -1
- package/dist/cjs/mods/security/src/core/keys.js +0 -136
- package/dist/cjs/mods/security/src/core/keys.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/index.js +0 -122
- package/dist/cjs/mods/security/src/core/password/index.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-algorithms.js +0 -397
- package/dist/cjs/mods/security/src/core/password/password-algorithms.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-core.js +0 -294
- package/dist/cjs/mods/security/src/core/password/password-core.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-generator.js +0 -365
- package/dist/cjs/mods/security/src/core/password/password-generator.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-migration.js +0 -237
- package/dist/cjs/mods/security/src/core/password/password-migration.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-security.js +0 -534
- package/dist/cjs/mods/security/src/core/password/password-security.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-types.js +0 -39
- package/dist/cjs/mods/security/src/core/password/password-types.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/password-utils.js +0 -651
- package/dist/cjs/mods/security/src/core/password/password-utils.js.map +0 -1
- package/dist/cjs/mods/security/src/core/password/swlist.js +0 -1122
- package/dist/cjs/mods/security/src/core/password/swlist.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-core.js +0 -962
- package/dist/cjs/mods/security/src/core/random/random-core.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-crypto.js +0 -339
- package/dist/cjs/mods/security/src/core/random/random-crypto.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-entropy.js +0 -387
- package/dist/cjs/mods/security/src/core/random/random-entropy.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-generators.js +0 -344
- package/dist/cjs/mods/security/src/core/random/random-generators.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-sources.js +0 -426
- package/dist/cjs/mods/security/src/core/random/random-sources.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-tokens.js +0 -309
- package/dist/cjs/mods/security/src/core/random/random-tokens.js.map +0 -1
- package/dist/cjs/mods/security/src/core/random/random-types.js +0 -36
- package/dist/cjs/mods/security/src/core/random/random-types.js.map +0 -1
- package/dist/cjs/mods/security/src/core/validators.js +0 -200
- package/dist/cjs/mods/security/src/core/validators.js.map +0 -1
- package/dist/cjs/mods/security/src/helpers/Uint8Array.js +0 -335
- package/dist/cjs/mods/security/src/helpers/Uint8Array.js.map +0 -1
- package/dist/cjs/mods/security/src/helpers/createEnu.js +0 -27
- package/dist/cjs/mods/security/src/helpers/createEnu.js.map +0 -1
- package/dist/cjs/mods/security/src/index.js +0 -406
- package/dist/cjs/mods/security/src/index.js.map +0 -1
- package/dist/cjs/mods/security/src/types/global.js +0 -51
- package/dist/cjs/mods/security/src/types/global.js.map +0 -1
- package/dist/cjs/mods/security/src/types/secure-mem.type.js +0 -106
- package/dist/cjs/mods/security/src/types/secure-mem.type.js.map +0 -1
- package/dist/cjs/mods/security/src/types/secure-memory.js +0 -20
- package/dist/cjs/mods/security/src/types/secure-memory.js.map +0 -1
- package/dist/cjs/mods/security/src/types.js +0 -63
- package/dist/cjs/mods/security/src/types.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/CryptoAlgorithmUtils.js +0 -71
- package/dist/cjs/mods/security/src/utils/CryptoAlgorithmUtils.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/constants.js +0 -111
- package/dist/cjs/mods/security/src/utils/constants.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/crypto.utils.js +0 -386
- package/dist/cjs/mods/security/src/utils/crypto.utils.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/dataConverter.js +0 -74
- package/dist/cjs/mods/security/src/utils/dataConverter.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/encoding.js +0 -290
- package/dist/cjs/mods/security/src/utils/encoding.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/errorHandler.js +0 -140
- package/dist/cjs/mods/security/src/utils/errorHandler.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/config-manager.js +0 -290
- package/dist/cjs/mods/security/src/utils/memory/config-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/event-manager.js +0 -277
- package/dist/cjs/mods/security/src/utils/memory/event-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/index.js +0 -162
- package/dist/cjs/mods/security/src/utils/memory/index.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/memory-manager.js +0 -888
- package/dist/cjs/mods/security/src/utils/memory/memory-manager.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/memory-pool.js +0 -356
- package/dist/cjs/mods/security/src/utils/memory/memory-pool.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/reference-tracker.js +0 -384
- package/dist/cjs/mods/security/src/utils/memory/reference-tracker.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/memory/types.js +0 -56
- package/dist/cjs/mods/security/src/utils/memory/types.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/patterns.js +0 -127
- package/dist/cjs/mods/security/src/utils/patterns.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/performanceMonitor.js +0 -249
- package/dist/cjs/mods/security/src/utils/performanceMonitor.js.map +0 -1
- package/dist/cjs/mods/security/src/utils/stats.js +0 -182
- package/dist/cjs/mods/security/src/utils/stats.js.map +0 -1
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/shared/logger/Logger.js +0 -591
- package/dist/cjs/shared/logger/Logger.js.map +0 -1
- package/dist/cjs/src/FiUp.js +0 -88
- package/dist/cjs/src/FiUp.js.map +0 -1
- package/dist/cjs/src/cache/CacheFactory.js +0 -416
- package/dist/cjs/src/cache/CacheFactory.js.map +0 -1
- package/dist/cjs/src/cache/SecureCacheAdapter.js +0 -1239
- package/dist/cjs/src/cache/SecureCacheAdapter.js.map +0 -1
- package/dist/cjs/src/cluster/bun-cluster-manager.js +0 -1656
- package/dist/cjs/src/cluster/bun-cluster-manager.js.map +0 -1
- package/dist/cjs/src/cluster/cluster-manager.js +0 -1023
- package/dist/cjs/src/cluster/cluster-manager.js.map +0 -1
- package/dist/cjs/src/cluster/memory-manager.js +0 -485
- package/dist/cjs/src/cluster/memory-manager.js.map +0 -1
- package/dist/cjs/src/cluster/modules/AutoScaler.js +0 -532
- package/dist/cjs/src/cluster/modules/AutoScaler.js.map +0 -1
- package/dist/cjs/src/cluster/modules/BunIPCManager.js +0 -603
- package/dist/cjs/src/cluster/modules/BunIPCManager.js.map +0 -1
- package/dist/cjs/src/cluster/modules/ClusterPersistenceManager.js +0 -437
- package/dist/cjs/src/cluster/modules/ClusterPersistenceManager.js.map +0 -1
- package/dist/cjs/src/cluster/modules/CpuMonitor.js +0 -659
- package/dist/cjs/src/cluster/modules/CpuMonitor.js.map +0 -1
- package/dist/cjs/src/cluster/modules/CrossPlatformMemory.js +0 -329
- package/dist/cjs/src/cluster/modules/CrossPlatformMemory.js.map +0 -1
- package/dist/cjs/src/cluster/modules/EventLoopMonitor.js +0 -265
- package/dist/cjs/src/cluster/modules/EventLoopMonitor.js.map +0 -1
- package/dist/cjs/src/cluster/modules/GCStatsTracker.js +0 -200
- package/dist/cjs/src/cluster/modules/GCStatsTracker.js.map +0 -1
- package/dist/cjs/src/cluster/modules/HealthMonitor.js +0 -461
- package/dist/cjs/src/cluster/modules/HealthMonitor.js.map +0 -1
- package/dist/cjs/src/cluster/modules/HeapStatsCollector.js +0 -111
- package/dist/cjs/src/cluster/modules/HeapStatsCollector.js.map +0 -1
- package/dist/cjs/src/cluster/modules/IPCManager.js +0 -781
- package/dist/cjs/src/cluster/modules/IPCManager.js.map +0 -1
- package/dist/cjs/src/cluster/modules/MetricsCollector.js +0 -559
- package/dist/cjs/src/cluster/modules/MetricsCollector.js.map +0 -1
- package/dist/cjs/src/cluster/modules/NetworkTracker.js +0 -162
- package/dist/cjs/src/cluster/modules/NetworkTracker.js.map +0 -1
- package/dist/cjs/src/cluster/modules/ProcessMonitor.js +0 -513
- package/dist/cjs/src/cluster/modules/ProcessMonitor.js.map +0 -1
- package/dist/cjs/src/cluster/modules/ThroughputCalculator.js +0 -186
- package/dist/cjs/src/cluster/modules/ThroughputCalculator.js.map +0 -1
- package/dist/cjs/src/cluster/modules/WorkerManager.js +0 -1186
- package/dist/cjs/src/cluster/modules/WorkerManager.js.map +0 -1
- package/dist/cjs/src/cluster/modules/strategy/LoadBalancer.js +0 -1123
- package/dist/cjs/src/cluster/modules/strategy/LoadBalancer.js.map +0 -1
- package/dist/cjs/src/config.js +0 -366
- package/dist/cjs/src/config.js.map +0 -1
- package/dist/cjs/src/const.js +0 -577
- package/dist/cjs/src/const.js.map +0 -1
- package/dist/cjs/src/encryption/EncryptionService.js +0 -422
- package/dist/cjs/src/encryption/EncryptionService.js.map +0 -1
- package/dist/cjs/src/file-upload.js +0 -259
- package/dist/cjs/src/file-upload.js.map +0 -1
- package/dist/cjs/src/index.js +0 -100
- package/dist/cjs/src/index.js.map +0 -1
- package/dist/cjs/src/middleware/XJsonResponseHandler.js +0 -152
- package/dist/cjs/src/middleware/XJsonResponseHandler.js.map +0 -1
- package/dist/cjs/src/middleware/XemsSessionMiddleware.js +0 -88
- package/dist/cjs/src/middleware/XemsSessionMiddleware.js.map +0 -1
- package/dist/cjs/src/middleware/XyPrissMiddlewareAPI.js +0 -354
- package/dist/cjs/src/middleware/XyPrissMiddlewareAPI.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/BuiltInMiddleware.js +0 -524
- package/dist/cjs/src/middleware/built-in/BuiltInMiddleware.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/BrowserOnlyProtector.js +0 -552
- package/dist/cjs/src/middleware/built-in/security/BrowserOnlyProtector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/CommandInjectionDetector.js +0 -215
- package/dist/cjs/src/middleware/built-in/security/CommandInjectionDetector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/LDAPInjectionDetector.js +0 -96
- package/dist/cjs/src/middleware/built-in/security/LDAPInjectionDetector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/MobileOnlyProtector.js +0 -504
- package/dist/cjs/src/middleware/built-in/security/MobileOnlyProtector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/PathTraversalDetector.js +0 -212
- package/dist/cjs/src/middleware/built-in/security/PathTraversalDetector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/RequestSignatureProtector.js +0 -481
- package/dist/cjs/src/middleware/built-in/security/RequestSignatureProtector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/SQLInjectionDetector.js +0 -335
- package/dist/cjs/src/middleware/built-in/security/SQLInjectionDetector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/TerminalOnlyProtector.js +0 -478
- package/dist/cjs/src/middleware/built-in/security/TerminalOnlyProtector.js.map +0 -1
- package/dist/cjs/src/middleware/built-in/security/XXEProtector.js +0 -175
- package/dist/cjs/src/middleware/built-in/security/XXEProtector.js.map +0 -1
- package/dist/cjs/src/middleware/safe-json-middleware.js +0 -159
- package/dist/cjs/src/middleware/safe-json-middleware.js.map +0 -1
- package/dist/cjs/src/middleware/security-middleware.js +0 -1059
- package/dist/cjs/src/middleware/security-middleware.js.map +0 -1
- package/dist/cjs/src/plugins/PluginManager.js +0 -410
- package/dist/cjs/src/plugins/PluginManager.js.map +0 -1
- package/dist/cjs/src/plugins/api/PluginAPI.js +0 -188
- package/dist/cjs/src/plugins/api/PluginAPI.js.map +0 -1
- package/dist/cjs/src/plugins/const/PluginHookIds.js +0 -64
- package/dist/cjs/src/plugins/const/PluginHookIds.js.map +0 -1
- package/dist/cjs/src/plugins/core/PluginManager.js +0 -677
- package/dist/cjs/src/plugins/core/PluginManager.js.map +0 -1
- package/dist/cjs/src/plugins/modules/PluginEngine.js +0 -494
- package/dist/cjs/src/plugins/modules/PluginEngine.js.map +0 -1
- package/dist/cjs/src/plugins/modules/PluginRegistry.js +0 -309
- package/dist/cjs/src/plugins/modules/PluginRegistry.js.map +0 -1
- package/dist/cjs/src/plugins/modules/builtin/JWTAuthPlugin.js +0 -591
- package/dist/cjs/src/plugins/modules/builtin/JWTAuthPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/builtin/ResponseTimePlugin.js +0 -413
- package/dist/cjs/src/plugins/modules/builtin/ResponseTimePlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/builtin/SmartCachePlugin.js +0 -843
- package/dist/cjs/src/plugins/modules/builtin/SmartCachePlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/builtin/server-maintenance-plugin.js +0 -588
- package/dist/cjs/src/plugins/modules/builtin/server-maintenance-plugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/core/CachePlugin.js +0 -1977
- package/dist/cjs/src/plugins/modules/core/CachePlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/core/PerformancePlugin.js +0 -894
- package/dist/cjs/src/plugins/modules/core/PerformancePlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/core/SecurityPlugin.js +0 -799
- package/dist/cjs/src/plugins/modules/core/SecurityPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/index.js +0 -302
- package/dist/cjs/src/plugins/modules/index.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/builtin/CompressionPlugin.js +0 -302
- package/dist/cjs/src/plugins/modules/network/builtin/CompressionPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/builtin/ConnectionPlugin.js +0 -797
- package/dist/cjs/src/plugins/modules/network/builtin/ConnectionPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/builtin/ProxyPlugin.js +0 -424
- package/dist/cjs/src/plugins/modules/network/builtin/ProxyPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/builtin/RateLimitPlugin.js +0 -605
- package/dist/cjs/src/plugins/modules/network/builtin/RateLimitPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/core/NetworkPlugin.js +0 -230
- package/dist/cjs/src/plugins/modules/network/core/NetworkPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/core/NetworkPluginFactory.js +0 -40
- package/dist/cjs/src/plugins/modules/network/core/NetworkPluginFactory.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/types/NetworkTypes.js +0 -24
- package/dist/cjs/src/plugins/modules/network/types/NetworkTypes.js.map +0 -1
- package/dist/cjs/src/plugins/modules/network/utils/NetworkPluginUtils.js +0 -63
- package/dist/cjs/src/plugins/modules/network/utils/NetworkPluginUtils.js.map +0 -1
- package/dist/cjs/src/plugins/modules/types/PluginTypes.js +0 -48
- package/dist/cjs/src/plugins/modules/types/PluginTypes.js.map +0 -1
- package/dist/cjs/src/plugins/modules/xems/XemsBuiltinPlugin.js +0 -216
- package/dist/cjs/src/plugins/modules/xems/XemsBuiltinPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/modules/xems/XemsPlugin.js +0 -354
- package/dist/cjs/src/plugins/modules/xems/XemsPlugin.js.map +0 -1
- package/dist/cjs/src/plugins/plugin-manager.js +0 -151
- package/dist/cjs/src/plugins/plugin-manager.js.map +0 -1
- package/dist/cjs/src/plugins/route-optimization-plugin.js +0 -421
- package/dist/cjs/src/plugins/route-optimization-plugin.js.map +0 -1
- package/dist/cjs/src/plugins/server-maintenance-plugin.js +0 -588
- package/dist/cjs/src/plugins/server-maintenance-plugin.js.map +0 -1
- package/dist/cjs/src/quick-start.js +0 -43
- package/dist/cjs/src/quick-start.js.map +0 -1
- package/dist/cjs/src/schemas/plugingSchema.js +0 -40
- package/dist/cjs/src/schemas/plugingSchema.js.map +0 -1
- package/dist/cjs/src/server/FastServer.js +0 -858
- package/dist/cjs/src/server/FastServer.js.map +0 -1
- package/dist/cjs/src/server/ServerFactory.js +0 -67
- package/dist/cjs/src/server/ServerFactory.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/CacheManager.js +0 -245
- package/dist/cjs/src/server/components/fastapi/CacheManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/ClusterManagerComponent.js +0 -569
- package/dist/cjs/src/server/components/fastapi/ClusterManagerComponent.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/FileUploadManager.js +0 -197
- package/dist/cjs/src/server/components/fastapi/FileUploadManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/FileWatcherManager.js +0 -536
- package/dist/cjs/src/server/components/fastapi/FileWatcherManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/MonitoringManager.js +0 -307
- package/dist/cjs/src/server/components/fastapi/MonitoringManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/PerformanceManager.js +0 -297
- package/dist/cjs/src/server/components/fastapi/PerformanceManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/PluginManager.js +0 -395
- package/dist/cjs/src/server/components/fastapi/PluginManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/RedirectManager.js +0 -487
- package/dist/cjs/src/server/components/fastapi/RedirectManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/RequestProcessor.js +0 -213
- package/dist/cjs/src/server/components/fastapi/RequestProcessor.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/RouteManager.js +0 -190
- package/dist/cjs/src/server/components/fastapi/RouteManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/WorkerPoolComponent.js +0 -82
- package/dist/cjs/src/server/components/fastapi/WorkerPoolComponent.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/console/ConsoleInterceptor.js +0 -980
- package/dist/cjs/src/server/components/fastapi/console/ConsoleInterceptor.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/console/encryption/ConsoleEncryption.js +0 -216
- package/dist/cjs/src/server/components/fastapi/console/encryption/ConsoleEncryption.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/console/types.js +0 -163
- package/dist/cjs/src/server/components/fastapi/console/types.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js +0 -265
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/Logger.js +0 -236
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/cpu-tasks.js +0 -294
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/enhanced-cpu-worker.js +0 -433
- package/dist/cjs/src/server/components/fastapi/modules/UFRP/workers/io-worker.js +0 -1617
- package/dist/cjs/src/server/components/fastapi/smart-routes.js +0 -347
- package/dist/cjs/src/server/components/fastapi/smart-routes.js.map +0 -1
- package/dist/cjs/src/server/components/fastapi/templates/redirectTemp.js +0 -101
- package/dist/cjs/src/server/components/fastapi/templates/redirectTemp.js.map +0 -1
- package/dist/cjs/src/server/components/lifecycle/ServerLifecycleManager.js +0 -522
- package/dist/cjs/src/server/components/lifecycle/ServerLifecycleManager.js.map +0 -1
- package/dist/cjs/src/server/components/multi-server/MultiServerApp.js +0 -534
- package/dist/cjs/src/server/components/multi-server/MultiServerApp.js.map +0 -1
- package/dist/cjs/src/server/components/multi-server/MultiServerManager.js +0 -326
- package/dist/cjs/src/server/components/multi-server/MultiServerManager.js.map +0 -1
- package/dist/cjs/src/server/conf/networkConnectionConf.js +0 -25
- package/dist/cjs/src/server/conf/networkConnectionConf.js.map +0 -1
- package/dist/cjs/src/server/conf/proxyConfig.js +0 -23
- package/dist/cjs/src/server/conf/proxyConfig.js.map +0 -1
- package/dist/cjs/src/server/const/Cluster.config.js +0 -215
- package/dist/cjs/src/server/const/Cluster.config.js.map +0 -1
- package/dist/cjs/src/server/const/ExecutionPredictor_EP.const.js +0 -73
- package/dist/cjs/src/server/const/ExecutionPredictor_EP.const.js.map +0 -1
- package/dist/cjs/src/server/const/FileWatcher.config.js +0 -98
- package/dist/cjs/src/server/const/FileWatcher.config.js.map +0 -1
- package/dist/cjs/src/server/const/default.js +0 -393
- package/dist/cjs/src/server/const/default.js.map +0 -1
- package/dist/cjs/src/server/const/http.js +0 -19
- package/dist/cjs/src/server/const/http.js.map +0 -1
- package/dist/cjs/src/server/core/HttpServer.js +0 -396
- package/dist/cjs/src/server/core/HttpServer.js.map +0 -1
- package/dist/cjs/src/server/core/RequestApp.js +0 -95
- package/dist/cjs/src/server/core/RequestApp.js.map +0 -1
- package/dist/cjs/src/server/core/RequestEnhancer.js +0 -288
- package/dist/cjs/src/server/core/RequestEnhancer.js.map +0 -1
- package/dist/cjs/src/server/core/ResponseEnhancer.js +0 -518
- package/dist/cjs/src/server/core/ResponseEnhancer.js.map +0 -1
- package/dist/cjs/src/server/core/StartupProcessor.js +0 -111
- package/dist/cjs/src/server/core/StartupProcessor.js.map +0 -1
- package/dist/cjs/src/server/core/VirtualServer.js +0 -33
- package/dist/cjs/src/server/core/VirtualServer.js.map +0 -1
- package/dist/cjs/src/server/core/XHSCBridge.js +0 -524
- package/dist/cjs/src/server/core/XHSCBridge.js.map +0 -1
- package/dist/cjs/src/server/core/XHSCProtocol.js +0 -314
- package/dist/cjs/src/server/core/XHSCProtocol.js.map +0 -1
- package/dist/cjs/src/server/core/XyDiagnosticsManager.js +0 -78
- package/dist/cjs/src/server/core/XyDiagnosticsManager.js.map +0 -1
- package/dist/cjs/src/server/core/XyLifecycleManager.js +0 -237
- package/dist/cjs/src/server/core/XyLifecycleManager.js.map +0 -1
- package/dist/cjs/src/server/core/XyModuleManager.js +0 -161
- package/dist/cjs/src/server/core/XyModuleManager.js.map +0 -1
- package/dist/cjs/src/server/core/XyRoutingManager.js +0 -187
- package/dist/cjs/src/server/core/XyRoutingManager.js.map +0 -1
- package/dist/cjs/src/server/core/XyServerCreator.js +0 -97
- package/dist/cjs/src/server/core/XyServerCreator.js.map +0 -1
- package/dist/cjs/src/server/core/XyprissApp.js +0 -483
- package/dist/cjs/src/server/core/XyprissApp.js.map +0 -1
- package/dist/cjs/src/server/core/request/XyRequestManager.js +0 -229
- package/dist/cjs/src/server/core/request/XyRequestManager.js.map +0 -1
- package/dist/cjs/src/server/handlers/NotFoundHandler.js +0 -84
- package/dist/cjs/src/server/handlers/NotFoundHandler.js.map +0 -1
- package/dist/cjs/src/server/handlers/templates/notFoundTemplate.js +0 -655
- package/dist/cjs/src/server/handlers/templates/notFoundTemplate.js.map +0 -1
- package/dist/cjs/src/server/middleware/MiddlewareManager.js +0 -197
- package/dist/cjs/src/server/middleware/MiddlewareManager.js.map +0 -1
- package/dist/cjs/src/server/optimization/ExecutionPredictor.js +0 -218
- package/dist/cjs/src/server/optimization/ExecutionPredictor.js.map +0 -1
- package/dist/cjs/src/server/optimization/PerformanceProfiler.js +0 -234
- package/dist/cjs/src/server/optimization/PerformanceProfiler.js.map +0 -1
- package/dist/cjs/src/server/optimization/RequestPreCompiler.js +0 -709
- package/dist/cjs/src/server/optimization/RequestPreCompiler.js.map +0 -1
- package/dist/cjs/src/server/optimization/UltraFastOptimizer.js +0 -427
- package/dist/cjs/src/server/optimization/UltraFastOptimizer.js.map +0 -1
- package/dist/cjs/src/server/optimization/performance-monitor.js +0 -162
- package/dist/cjs/src/server/optimization/performance-monitor.js.map +0 -1
- package/dist/cjs/src/server/routing/Router.js +0 -353
- package/dist/cjs/src/server/routing/Router.js.map +0 -1
- package/dist/cjs/src/server/service/Reload/FileWatcher.js +0 -756
- package/dist/cjs/src/server/service/Reload/FileWatcher.js.map +0 -1
- package/dist/cjs/src/server/service/Reload/HotReloader.js +0 -738
- package/dist/cjs/src/server/service/Reload/HotReloader.js.map +0 -1
- package/dist/cjs/src/server/service/Reload/exec/TypeScriptExecutor.js +0 -342
- package/dist/cjs/src/server/service/Reload/exec/TypeScriptExecutor.js.map +0 -1
- package/dist/cjs/src/server/utils/ConfigLoader.js +0 -362
- package/dist/cjs/src/server/utils/ConfigLoader.js.map +0 -1
- package/dist/cjs/src/server/utils/PortManager.js +0 -237
- package/dist/cjs/src/server/utils/PortManager.js.map +0 -1
- package/dist/cjs/src/server/utils/WorkerModeHandler.js +0 -65
- package/dist/cjs/src/server/utils/WorkerModeHandler.js.map +0 -1
- package/dist/cjs/src/server/utils/forceClosePort.js +0 -332
- package/dist/cjs/src/server/utils/forceClosePort.js.map +0 -1
- package/dist/cjs/src/server/utils/shouldRegisterRouteOnServer.js +0 -34
- package/dist/cjs/src/server/utils/shouldRegisterRouteOnServer.js.map +0 -1
- package/dist/cjs/src/server/utils/trustProxy.js +0 -778
- package/dist/cjs/src/server/utils/trustProxy.js.map +0 -1
- package/dist/cjs/src/sys/FSApi.js +0 -1144
- package/dist/cjs/src/sys/FSApi.js.map +0 -1
- package/dist/cjs/src/sys/FileSystem.js +0 -1302
- package/dist/cjs/src/sys/FileSystem.js.map +0 -1
- package/dist/cjs/src/sys/PathApi.js +0 -202
- package/dist/cjs/src/sys/PathApi.js.map +0 -1
- package/dist/cjs/src/sys/SysApi.js +0 -421
- package/dist/cjs/src/sys/SysApi.js.map +0 -1
- package/dist/cjs/src/sys/System.js +0 -40
- package/dist/cjs/src/sys/System.js.map +0 -1
- package/dist/cjs/src/sys/XyPrissCache.js +0 -70
- package/dist/cjs/src/sys/XyPrissCache.js.map +0 -1
- package/dist/cjs/src/sys/XyPrissRunner.js +0 -248
- package/dist/cjs/src/sys/XyPrissRunner.js.map +0 -1
- package/dist/cjs/src/sys.js +0 -404
- package/dist/cjs/src/sys.js.map +0 -1
- package/dist/cjs/src/types/NotFoundConfig.js +0 -86
- package/dist/cjs/src/types/NotFoundConfig.js.map +0 -1
- package/dist/cjs/src/utils/DotEnvLoader.js +0 -74
- package/dist/cjs/src/utils/DotEnvLoader.js.map +0 -1
- package/dist/cjs/src/utils/mergeWithDefaults.js +0 -176
- package/dist/cjs/src/utils/mergeWithDefaults.js.map +0 -1
- package/dist/cjs/src/xhs/cluster/XHSCWorker.js +0 -202
- package/dist/cjs/src/xhs/cluster/XHSCWorker.js.map +0 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/mods/security/src/algorithms/hash-algorithms.js +0 -696
- package/dist/esm/mods/security/src/algorithms/hash-algorithms.js.map +0 -1
- package/dist/esm/mods/security/src/algorithms/registry.js +0 -81
- package/dist/esm/mods/security/src/algorithms/registry.js.map +0 -1
- package/dist/esm/mods/security/src/components/attestation.js +0 -1059
- package/dist/esm/mods/security/src/components/attestation.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/FastLRU.js +0 -320
- package/dist/esm/mods/security/src/components/cache/FastLRU.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/UFSIMC.js +0 -1111
- package/dist/esm/mods/security/src/components/cache/UFSIMC.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/cacheSys.js +0 -622
- package/dist/esm/mods/security/src/components/cache/cacheSys.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/cacheSys.utils.js +0 -102
- package/dist/esm/mods/security/src/components/cache/cacheSys.utils.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/config/cache.config.js +0 -36
- package/dist/esm/mods/security/src/components/cache/config/cache.config.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/index.js +0 -367
- package/dist/esm/mods/security/src/components/cache/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/cache/useCache.js +0 -232
- package/dist/esm/mods/security/src/components/cache/useCache.js.map +0 -1
- package/dist/esm/mods/security/src/components/canary-tokens.js +0 -346
- package/dist/esm/mods/security/src/components/canary-tokens.js.map +0 -1
- package/dist/esm/mods/security/src/components/entropy-augmentation.js +0 -476
- package/dist/esm/mods/security/src/components/entropy-augmentation.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js +0 -336
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-allocator.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js +0 -534
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-cache.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js +0 -612
- package/dist/esm/mods/security/src/components/fortified-function/UFA/ultra-fast-engine.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/const/exec.const.js +0 -11
- package/dist/esm/mods/security/src/components/fortified-function/const/exec.const.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-config.js +0 -351
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-config.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-function-core.js +0 -518
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-function-core.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-logger.js +0 -243
- package/dist/esm/mods/security/src/components/fortified-function/core/fortified-logger.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/api-manager.js +0 -187
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/api-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/cache-manager.js +0 -105
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/cache-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-context.js +0 -103
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-context.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-engine.js +0 -125
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-engine.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-router.js +0 -91
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/execution-router.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/memory-manager.js +0 -145
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/memory-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/security-manager.js +0 -100
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/security-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/stats-manager.js +0 -157
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/stats-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/timing-manager.js +0 -123
- package/dist/esm/mods/security/src/components/fortified-function/core/mods/timing-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/engines/analytics-engine.js +0 -368
- package/dist/esm/mods/security/src/components/fortified-function/engines/analytics-engine.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/engines/execution-engine.js +0 -400
- package/dist/esm/mods/security/src/components/fortified-function/engines/execution-engine.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/index.js +0 -167
- package/dist/esm/mods/security/src/components/fortified-function/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/performance/performance-monitor.js +0 -238
- package/dist/esm/mods/security/src/components/fortified-function/performance/performance-monitor.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/performance/performance-timer.js +0 -186
- package/dist/esm/mods/security/src/components/fortified-function/performance/performance-timer.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/security/security-handler.js +0 -252
- package/dist/esm/mods/security/src/components/fortified-function/security/security-handler.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/serializer/safe-serializer.js +0 -344
- package/dist/esm/mods/security/src/components/fortified-function/serializer/safe-serializer.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/smart-cache.js +0 -691
- package/dist/esm/mods/security/src/components/fortified-function/smart-cache.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/types/types.js +0 -14
- package/dist/esm/mods/security/src/components/fortified-function/types/types.js.map +0 -1
- package/dist/esm/mods/security/src/components/fortified-function/utils/utils.js +0 -74
- package/dist/esm/mods/security/src/components/fortified-function/utils/utils.js.map +0 -1
- package/dist/esm/mods/security/src/components/memory-hard.js +0 -919
- package/dist/esm/mods/security/src/components/memory-hard.js.map +0 -1
- package/dist/esm/mods/security/src/components/post-quantum.js +0 -316
- package/dist/esm/mods/security/src/components/post-quantum.js.map +0 -1
- package/dist/esm/mods/security/src/components/runtime-verification.js +0 -643
- package/dist/esm/mods/security/src/components/runtime-verification.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/core/secure-array-core.js +0 -1570
- package/dist/esm/mods/security/src/components/secure-array/core/secure-array-core.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js +0 -328
- package/dist/esm/mods/security/src/components/secure-array/crypto/ArrayCryptoHandler.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/events/event-manager.js +0 -268
- package/dist/esm/mods/security/src/components/secure-array/events/event-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/index.js +0 -61
- package/dist/esm/mods/security/src/components/secure-array/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/metadata/metadata-manager.js +0 -329
- package/dist/esm/mods/security/src/components/secure-array/metadata/metadata-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js +0 -388
- package/dist/esm/mods/security/src/components/secure-array/serialization/ArraySerializationHandler.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/types/index.js +0 -84
- package/dist/esm/mods/security/src/components/secure-array/types/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/utils/id-generator.js +0 -78
- package/dist/esm/mods/security/src/components/secure-array/utils/id-generator.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-array/utils/validation.js +0 -273
- package/dist/esm/mods/security/src/components/secure-array/utils/validation.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-memory.js +0 -884
- package/dist/esm/mods/security/src/components/secure-memory.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/core/secure-object-core.js +0 -1603
- package/dist/esm/mods/security/src/components/secure-object/core/secure-object-core.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/encryption/crypto-handler.js +0 -360
- package/dist/esm/mods/security/src/components/secure-object/encryption/crypto-handler.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/encryption/sensitive-keys.js +0 -203
- package/dist/esm/mods/security/src/components/secure-object/encryption/sensitive-keys.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/events/event-manager.js +0 -195
- package/dist/esm/mods/security/src/components/secure-object/events/event-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/index.js +0 -63
- package/dist/esm/mods/security/src/components/secure-object/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/metadata/metadata-manager.js +0 -181
- package/dist/esm/mods/security/src/components/secure-object/metadata/metadata-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/serialization/serialization-handler.js +0 -195
- package/dist/esm/mods/security/src/components/secure-object/serialization/serialization-handler.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/utils/id-generator.js +0 -62
- package/dist/esm/mods/security/src/components/secure-object/utils/id-generator.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-object/utils/validation.js +0 -237
- package/dist/esm/mods/security/src/components/secure-object/utils/validation.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-serialization.js +0 -769
- package/dist/esm/mods/security/src/components/secure-serialization.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/advanced/entropy-analyzer.js +0 -306
- package/dist/esm/mods/security/src/components/secure-string/advanced/entropy-analyzer.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/advanced/performance-monitor.js +0 -333
- package/dist/esm/mods/security/src/components/secure-string/advanced/performance-monitor.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/advanced/quantum-safe.js +0 -243
- package/dist/esm/mods/security/src/components/secure-string/advanced/quantum-safe.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/buffer/buffer-manager.js +0 -203
- package/dist/esm/mods/security/src/components/secure-string/buffer/buffer-manager.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/core/secure-string-core.js +0 -786
- package/dist/esm/mods/security/src/components/secure-string/core/secure-string-core.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/crypto/crypto-operations.js +0 -298
- package/dist/esm/mods/security/src/components/secure-string/crypto/crypto-operations.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/operations/comparison-operations.js +0 -219
- package/dist/esm/mods/security/src/components/secure-string/operations/comparison-operations.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/operations/string-operations.js +0 -232
- package/dist/esm/mods/security/src/components/secure-string/operations/string-operations.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/types/index.js +0 -37
- package/dist/esm/mods/security/src/components/secure-string/types/index.js.map +0 -1
- package/dist/esm/mods/security/src/components/secure-string/validation/string-validator.js +0 -332
- package/dist/esm/mods/security/src/components/secure-string/validation/string-validator.js.map +0 -1
- package/dist/esm/mods/security/src/components/side-channel.js +0 -142
- package/dist/esm/mods/security/src/components/side-channel.js.map +0 -1
- package/dist/esm/mods/security/src/components/tamper-evident-logging.js +0 -389
- package/dist/esm/mods/security/src/components/tamper-evident-logging.js.map +0 -1
- package/dist/esm/mods/security/src/const/buffer.const.js +0 -13
- package/dist/esm/mods/security/src/const/buffer.const.js.map +0 -1
- package/dist/esm/mods/security/src/core/crypto.js +0 -777
- package/dist/esm/mods/security/src/core/crypto.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-advanced.js +0 -367
- package/dist/esm/mods/security/src/core/hash/hash-advanced.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-core.js +0 -389
- package/dist/esm/mods/security/src/core/hash/hash-core.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-entropy.js +0 -286
- package/dist/esm/mods/security/src/core/hash/hash-entropy.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-security.js +0 -351
- package/dist/esm/mods/security/src/core/hash/hash-security.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-types.js +0 -16
- package/dist/esm/mods/security/src/core/hash/hash-types.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-utils.js +0 -307
- package/dist/esm/mods/security/src/core/hash/hash-utils.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash/hash-validator.js +0 -310
- package/dist/esm/mods/security/src/core/hash/hash-validator.js.map +0 -1
- package/dist/esm/mods/security/src/core/hash.js +0 -9
- package/dist/esm/mods/security/src/core/hash.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js +0 -133
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/Argon2Algo.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js +0 -272
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/PBKDF2Algo.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js +0 -296
- package/dist/esm/mods/security/src/core/keys/algorithms/mods/ScryptAlgo.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/keys-core.js +0 -199
- package/dist/esm/mods/security/src/core/keys/keys-core.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/keys-logger.js +0 -231
- package/dist/esm/mods/security/src/core/keys/keys-logger.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/keys-types.js +0 -63
- package/dist/esm/mods/security/src/core/keys/keys-types.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys/keys-utils.js +0 -316
- package/dist/esm/mods/security/src/core/keys/keys-utils.js.map +0 -1
- package/dist/esm/mods/security/src/core/keys.js +0 -134
- package/dist/esm/mods/security/src/core/keys.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/index.js +0 -110
- package/dist/esm/mods/security/src/core/password/index.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-algorithms.js +0 -395
- package/dist/esm/mods/security/src/core/password/password-algorithms.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-core.js +0 -292
- package/dist/esm/mods/security/src/core/password/password-core.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-generator.js +0 -363
- package/dist/esm/mods/security/src/core/password/password-generator.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-migration.js +0 -235
- package/dist/esm/mods/security/src/core/password/password-migration.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-security.js +0 -532
- package/dist/esm/mods/security/src/core/password/password-security.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-types.js +0 -34
- package/dist/esm/mods/security/src/core/password/password-types.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/password-utils.js +0 -630
- package/dist/esm/mods/security/src/core/password/password-utils.js.map +0 -1
- package/dist/esm/mods/security/src/core/password/swlist.js +0 -1120
- package/dist/esm/mods/security/src/core/password/swlist.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-core.js +0 -960
- package/dist/esm/mods/security/src/core/random/random-core.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-crypto.js +0 -337
- package/dist/esm/mods/security/src/core/random/random-crypto.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-entropy.js +0 -366
- package/dist/esm/mods/security/src/core/random/random-entropy.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-generators.js +0 -323
- package/dist/esm/mods/security/src/core/random/random-generators.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-sources.js +0 -405
- package/dist/esm/mods/security/src/core/random/random-sources.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-tokens.js +0 -307
- package/dist/esm/mods/security/src/core/random/random-tokens.js.map +0 -1
- package/dist/esm/mods/security/src/core/random/random-types.js +0 -27
- package/dist/esm/mods/security/src/core/random/random-types.js.map +0 -1
- package/dist/esm/mods/security/src/core/validators.js +0 -198
- package/dist/esm/mods/security/src/core/validators.js.map +0 -1
- package/dist/esm/mods/security/src/helpers/Uint8Array.js +0 -333
- package/dist/esm/mods/security/src/helpers/Uint8Array.js.map +0 -1
- package/dist/esm/mods/security/src/helpers/createEnu.js +0 -25
- package/dist/esm/mods/security/src/helpers/createEnu.js.map +0 -1
- package/dist/esm/mods/security/src/index.js +0 -340
- package/dist/esm/mods/security/src/index.js.map +0 -1
- package/dist/esm/mods/security/src/types/global.js +0 -49
- package/dist/esm/mods/security/src/types/global.js.map +0 -1
- package/dist/esm/mods/security/src/types/secure-mem.type.js +0 -102
- package/dist/esm/mods/security/src/types/secure-mem.type.js.map +0 -1
- package/dist/esm/mods/security/src/types/secure-memory.js +0 -20
- package/dist/esm/mods/security/src/types/secure-memory.js.map +0 -1
- package/dist/esm/mods/security/src/types.js +0 -63
- package/dist/esm/mods/security/src/types.js.map +0 -1
- package/dist/esm/mods/security/src/utils/CryptoAlgorithmUtils.js +0 -69
- package/dist/esm/mods/security/src/utils/CryptoAlgorithmUtils.js.map +0 -1
- package/dist/esm/mods/security/src/utils/constants.js +0 -105
- package/dist/esm/mods/security/src/utils/constants.js.map +0 -1
- package/dist/esm/mods/security/src/utils/crypto.utils.js +0 -380
- package/dist/esm/mods/security/src/utils/crypto.utils.js.map +0 -1
- package/dist/esm/mods/security/src/utils/dataConverter.js +0 -72
- package/dist/esm/mods/security/src/utils/dataConverter.js.map +0 -1
- package/dist/esm/mods/security/src/utils/encoding.js +0 -279
- package/dist/esm/mods/security/src/utils/encoding.js.map +0 -1
- package/dist/esm/mods/security/src/utils/errorHandler.js +0 -137
- package/dist/esm/mods/security/src/utils/errorHandler.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/config-manager.js +0 -288
- package/dist/esm/mods/security/src/utils/memory/config-manager.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/event-manager.js +0 -275
- package/dist/esm/mods/security/src/utils/memory/event-manager.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/index.js +0 -141
- package/dist/esm/mods/security/src/utils/memory/index.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/memory-manager.js +0 -886
- package/dist/esm/mods/security/src/utils/memory/memory-manager.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/memory-pool.js +0 -354
- package/dist/esm/mods/security/src/utils/memory/memory-pool.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/reference-tracker.js +0 -382
- package/dist/esm/mods/security/src/utils/memory/reference-tracker.js.map +0 -1
- package/dist/esm/mods/security/src/utils/memory/types.js +0 -56
- package/dist/esm/mods/security/src/utils/memory/types.js.map +0 -1
- package/dist/esm/mods/security/src/utils/patterns.js +0 -124
- package/dist/esm/mods/security/src/utils/patterns.js.map +0 -1
- package/dist/esm/mods/security/src/utils/performanceMonitor.js +0 -246
- package/dist/esm/mods/security/src/utils/performanceMonitor.js.map +0 -1
- package/dist/esm/mods/security/src/utils/stats.js +0 -180
- package/dist/esm/mods/security/src/utils/stats.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/dist/esm/shared/logger/Logger.js +0 -587
- package/dist/esm/shared/logger/Logger.js.map +0 -1
- package/dist/esm/src/FiUp.js +0 -82
- package/dist/esm/src/FiUp.js.map +0 -1
- package/dist/esm/src/cache/CacheFactory.js +0 -412
- package/dist/esm/src/cache/CacheFactory.js.map +0 -1
- package/dist/esm/src/cache/SecureCacheAdapter.js +0 -1237
- package/dist/esm/src/cache/SecureCacheAdapter.js.map +0 -1
- package/dist/esm/src/cluster/bun-cluster-manager.js +0 -1654
- package/dist/esm/src/cluster/bun-cluster-manager.js.map +0 -1
- package/dist/esm/src/cluster/cluster-manager.js +0 -1002
- package/dist/esm/src/cluster/cluster-manager.js.map +0 -1
- package/dist/esm/src/cluster/memory-manager.js +0 -483
- package/dist/esm/src/cluster/memory-manager.js.map +0 -1
- package/dist/esm/src/cluster/modules/AutoScaler.js +0 -530
- package/dist/esm/src/cluster/modules/AutoScaler.js.map +0 -1
- package/dist/esm/src/cluster/modules/BunIPCManager.js +0 -601
- package/dist/esm/src/cluster/modules/BunIPCManager.js.map +0 -1
- package/dist/esm/src/cluster/modules/ClusterPersistenceManager.js +0 -435
- package/dist/esm/src/cluster/modules/ClusterPersistenceManager.js.map +0 -1
- package/dist/esm/src/cluster/modules/CpuMonitor.js +0 -657
- package/dist/esm/src/cluster/modules/CpuMonitor.js.map +0 -1
- package/dist/esm/src/cluster/modules/CrossPlatformMemory.js +0 -326
- package/dist/esm/src/cluster/modules/CrossPlatformMemory.js.map +0 -1
- package/dist/esm/src/cluster/modules/EventLoopMonitor.js +0 -263
- package/dist/esm/src/cluster/modules/EventLoopMonitor.js.map +0 -1
- package/dist/esm/src/cluster/modules/GCStatsTracker.js +0 -198
- package/dist/esm/src/cluster/modules/GCStatsTracker.js.map +0 -1
- package/dist/esm/src/cluster/modules/HealthMonitor.js +0 -440
- package/dist/esm/src/cluster/modules/HealthMonitor.js.map +0 -1
- package/dist/esm/src/cluster/modules/HeapStatsCollector.js +0 -109
- package/dist/esm/src/cluster/modules/HeapStatsCollector.js.map +0 -1
- package/dist/esm/src/cluster/modules/IPCManager.js +0 -759
- package/dist/esm/src/cluster/modules/IPCManager.js.map +0 -1
- package/dist/esm/src/cluster/modules/MetricsCollector.js +0 -538
- package/dist/esm/src/cluster/modules/MetricsCollector.js.map +0 -1
- package/dist/esm/src/cluster/modules/NetworkTracker.js +0 -160
- package/dist/esm/src/cluster/modules/NetworkTracker.js.map +0 -1
- package/dist/esm/src/cluster/modules/ProcessMonitor.js +0 -511
- package/dist/esm/src/cluster/modules/ProcessMonitor.js.map +0 -1
- package/dist/esm/src/cluster/modules/ThroughputCalculator.js +0 -184
- package/dist/esm/src/cluster/modules/ThroughputCalculator.js.map +0 -1
- package/dist/esm/src/cluster/modules/WorkerManager.js +0 -1165
- package/dist/esm/src/cluster/modules/WorkerManager.js.map +0 -1
- package/dist/esm/src/cluster/modules/strategy/LoadBalancer.js +0 -1102
- package/dist/esm/src/cluster/modules/strategy/LoadBalancer.js.map +0 -1
- package/dist/esm/src/config.js +0 -362
- package/dist/esm/src/config.js.map +0 -1
- package/dist/esm/src/const.js +0 -574
- package/dist/esm/src/const.js.map +0 -1
- package/dist/esm/src/encryption/EncryptionService.js +0 -401
- package/dist/esm/src/encryption/EncryptionService.js.map +0 -1
- package/dist/esm/src/file-upload.js +0 -251
- package/dist/esm/src/file-upload.js.map +0 -1
- package/dist/esm/src/index.js +0 -62
- package/dist/esm/src/index.js.map +0 -1
- package/dist/esm/src/middleware/XJsonResponseHandler.js +0 -150
- package/dist/esm/src/middleware/XJsonResponseHandler.js.map +0 -1
- package/dist/esm/src/middleware/XemsSessionMiddleware.js +0 -86
- package/dist/esm/src/middleware/XemsSessionMiddleware.js.map +0 -1
- package/dist/esm/src/middleware/XyPrissMiddlewareAPI.js +0 -352
- package/dist/esm/src/middleware/XyPrissMiddlewareAPI.js.map +0 -1
- package/dist/esm/src/middleware/built-in/BuiltInMiddleware.js +0 -522
- package/dist/esm/src/middleware/built-in/BuiltInMiddleware.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/BrowserOnlyProtector.js +0 -550
- package/dist/esm/src/middleware/built-in/security/BrowserOnlyProtector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/CommandInjectionDetector.js +0 -213
- package/dist/esm/src/middleware/built-in/security/CommandInjectionDetector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/LDAPInjectionDetector.js +0 -94
- package/dist/esm/src/middleware/built-in/security/LDAPInjectionDetector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/MobileOnlyProtector.js +0 -502
- package/dist/esm/src/middleware/built-in/security/MobileOnlyProtector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/PathTraversalDetector.js +0 -210
- package/dist/esm/src/middleware/built-in/security/PathTraversalDetector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/RequestSignatureProtector.js +0 -460
- package/dist/esm/src/middleware/built-in/security/RequestSignatureProtector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/SQLInjectionDetector.js +0 -333
- package/dist/esm/src/middleware/built-in/security/SQLInjectionDetector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/TerminalOnlyProtector.js +0 -476
- package/dist/esm/src/middleware/built-in/security/TerminalOnlyProtector.js.map +0 -1
- package/dist/esm/src/middleware/built-in/security/XXEProtector.js +0 -173
- package/dist/esm/src/middleware/built-in/security/XXEProtector.js.map +0 -1
- package/dist/esm/src/middleware/safe-json-middleware.js +0 -153
- package/dist/esm/src/middleware/safe-json-middleware.js.map +0 -1
- package/dist/esm/src/middleware/security-middleware.js +0 -1057
- package/dist/esm/src/middleware/security-middleware.js.map +0 -1
- package/dist/esm/src/plugins/PluginManager.js +0 -408
- package/dist/esm/src/plugins/PluginManager.js.map +0 -1
- package/dist/esm/src/plugins/api/PluginAPI.js +0 -184
- package/dist/esm/src/plugins/api/PluginAPI.js.map +0 -1
- package/dist/esm/src/plugins/const/PluginHookIds.js +0 -61
- package/dist/esm/src/plugins/const/PluginHookIds.js.map +0 -1
- package/dist/esm/src/plugins/core/PluginManager.js +0 -675
- package/dist/esm/src/plugins/core/PluginManager.js.map +0 -1
- package/dist/esm/src/plugins/modules/PluginEngine.js +0 -492
- package/dist/esm/src/plugins/modules/PluginEngine.js.map +0 -1
- package/dist/esm/src/plugins/modules/PluginRegistry.js +0 -307
- package/dist/esm/src/plugins/modules/PluginRegistry.js.map +0 -1
- package/dist/esm/src/plugins/modules/builtin/JWTAuthPlugin.js +0 -589
- package/dist/esm/src/plugins/modules/builtin/JWTAuthPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/builtin/ResponseTimePlugin.js +0 -411
- package/dist/esm/src/plugins/modules/builtin/ResponseTimePlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/builtin/SmartCachePlugin.js +0 -841
- package/dist/esm/src/plugins/modules/builtin/SmartCachePlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/builtin/server-maintenance-plugin.js +0 -566
- package/dist/esm/src/plugins/modules/builtin/server-maintenance-plugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/core/CachePlugin.js +0 -1975
- package/dist/esm/src/plugins/modules/core/CachePlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/core/PerformancePlugin.js +0 -872
- package/dist/esm/src/plugins/modules/core/PerformancePlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/core/SecurityPlugin.js +0 -797
- package/dist/esm/src/plugins/modules/core/SecurityPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/index.js +0 -273
- package/dist/esm/src/plugins/modules/index.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/builtin/CompressionPlugin.js +0 -281
- package/dist/esm/src/plugins/modules/network/builtin/CompressionPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/builtin/ConnectionPlugin.js +0 -776
- package/dist/esm/src/plugins/modules/network/builtin/ConnectionPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/builtin/ProxyPlugin.js +0 -422
- package/dist/esm/src/plugins/modules/network/builtin/ProxyPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/builtin/RateLimitPlugin.js +0 -584
- package/dist/esm/src/plugins/modules/network/builtin/RateLimitPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/core/NetworkPlugin.js +0 -228
- package/dist/esm/src/plugins/modules/network/core/NetworkPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/core/NetworkPluginFactory.js +0 -38
- package/dist/esm/src/plugins/modules/network/core/NetworkPluginFactory.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/types/NetworkTypes.js +0 -24
- package/dist/esm/src/plugins/modules/network/types/NetworkTypes.js.map +0 -1
- package/dist/esm/src/plugins/modules/network/utils/NetworkPluginUtils.js +0 -61
- package/dist/esm/src/plugins/modules/network/utils/NetworkPluginUtils.js.map +0 -1
- package/dist/esm/src/plugins/modules/types/PluginTypes.js +0 -48
- package/dist/esm/src/plugins/modules/types/PluginTypes.js.map +0 -1
- package/dist/esm/src/plugins/modules/xems/XemsBuiltinPlugin.js +0 -214
- package/dist/esm/src/plugins/modules/xems/XemsBuiltinPlugin.js.map +0 -1
- package/dist/esm/src/plugins/modules/xems/XemsPlugin.js +0 -349
- package/dist/esm/src/plugins/modules/xems/XemsPlugin.js.map +0 -1
- package/dist/esm/src/plugins/plugin-manager.js +0 -149
- package/dist/esm/src/plugins/plugin-manager.js.map +0 -1
- package/dist/esm/src/plugins/route-optimization-plugin.js +0 -419
- package/dist/esm/src/plugins/route-optimization-plugin.js.map +0 -1
- package/dist/esm/src/plugins/server-maintenance-plugin.js +0 -566
- package/dist/esm/src/plugins/server-maintenance-plugin.js.map +0 -1
- package/dist/esm/src/quick-start.js +0 -41
- package/dist/esm/src/quick-start.js.map +0 -1
- package/dist/esm/src/schemas/plugingSchema.js +0 -38
- package/dist/esm/src/schemas/plugingSchema.js.map +0 -1
- package/dist/esm/src/server/FastServer.js +0 -856
- package/dist/esm/src/server/FastServer.js.map +0 -1
- package/dist/esm/src/server/ServerFactory.js +0 -62
- package/dist/esm/src/server/ServerFactory.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/CacheManager.js +0 -243
- package/dist/esm/src/server/components/fastapi/CacheManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/ClusterManagerComponent.js +0 -567
- package/dist/esm/src/server/components/fastapi/ClusterManagerComponent.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/FileUploadManager.js +0 -176
- package/dist/esm/src/server/components/fastapi/FileUploadManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/FileWatcherManager.js +0 -534
- package/dist/esm/src/server/components/fastapi/FileWatcherManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/MonitoringManager.js +0 -305
- package/dist/esm/src/server/components/fastapi/MonitoringManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/PerformanceManager.js +0 -295
- package/dist/esm/src/server/components/fastapi/PerformanceManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/PluginManager.js +0 -393
- package/dist/esm/src/server/components/fastapi/PluginManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/RedirectManager.js +0 -485
- package/dist/esm/src/server/components/fastapi/RedirectManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/RequestProcessor.js +0 -211
- package/dist/esm/src/server/components/fastapi/RequestProcessor.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/RouteManager.js +0 -188
- package/dist/esm/src/server/components/fastapi/RouteManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/WorkerPoolComponent.js +0 -80
- package/dist/esm/src/server/components/fastapi/WorkerPoolComponent.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/console/ConsoleInterceptor.js +0 -978
- package/dist/esm/src/server/components/fastapi/console/ConsoleInterceptor.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/console/encryption/ConsoleEncryption.js +0 -214
- package/dist/esm/src/server/components/fastapi/console/encryption/ConsoleEncryption.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/console/types.js +0 -160
- package/dist/esm/src/server/components/fastapi/console/types.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js +0 -263
- package/dist/esm/src/server/components/fastapi/modules/UFRP/WorkerPoolManager.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/Logger.js +0 -236
- package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/cpu-tasks.js +0 -294
- package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/enhanced-cpu-worker.js +0 -433
- package/dist/esm/src/server/components/fastapi/modules/UFRP/workers/io-worker.js +0 -1617
- package/dist/esm/src/server/components/fastapi/smart-routes.js +0 -345
- package/dist/esm/src/server/components/fastapi/smart-routes.js.map +0 -1
- package/dist/esm/src/server/components/fastapi/templates/redirectTemp.js +0 -99
- package/dist/esm/src/server/components/fastapi/templates/redirectTemp.js.map +0 -1
- package/dist/esm/src/server/components/lifecycle/ServerLifecycleManager.js +0 -520
- package/dist/esm/src/server/components/lifecycle/ServerLifecycleManager.js.map +0 -1
- package/dist/esm/src/server/components/multi-server/MultiServerApp.js +0 -532
- package/dist/esm/src/server/components/multi-server/MultiServerApp.js.map +0 -1
- package/dist/esm/src/server/components/multi-server/MultiServerManager.js +0 -324
- package/dist/esm/src/server/components/multi-server/MultiServerManager.js.map +0 -1
- package/dist/esm/src/server/conf/networkConnectionConf.js +0 -23
- package/dist/esm/src/server/conf/networkConnectionConf.js.map +0 -1
- package/dist/esm/src/server/conf/proxyConfig.js +0 -21
- package/dist/esm/src/server/conf/proxyConfig.js.map +0 -1
- package/dist/esm/src/server/const/Cluster.config.js +0 -213
- package/dist/esm/src/server/const/Cluster.config.js.map +0 -1
- package/dist/esm/src/server/const/ExecutionPredictor_EP.const.js +0 -62
- package/dist/esm/src/server/const/ExecutionPredictor_EP.const.js.map +0 -1
- package/dist/esm/src/server/const/FileWatcher.config.js +0 -96
- package/dist/esm/src/server/const/FileWatcher.config.js.map +0 -1
- package/dist/esm/src/server/const/default.js +0 -389
- package/dist/esm/src/server/const/default.js.map +0 -1
- package/dist/esm/src/server/const/http.js +0 -17
- package/dist/esm/src/server/const/http.js.map +0 -1
- package/dist/esm/src/server/core/HttpServer.js +0 -394
- package/dist/esm/src/server/core/HttpServer.js.map +0 -1
- package/dist/esm/src/server/core/RequestApp.js +0 -93
- package/dist/esm/src/server/core/RequestApp.js.map +0 -1
- package/dist/esm/src/server/core/RequestEnhancer.js +0 -286
- package/dist/esm/src/server/core/RequestEnhancer.js.map +0 -1
- package/dist/esm/src/server/core/ResponseEnhancer.js +0 -516
- package/dist/esm/src/server/core/ResponseEnhancer.js.map +0 -1
- package/dist/esm/src/server/core/StartupProcessor.js +0 -109
- package/dist/esm/src/server/core/StartupProcessor.js.map +0 -1
- package/dist/esm/src/server/core/VirtualServer.js +0 -31
- package/dist/esm/src/server/core/VirtualServer.js.map +0 -1
- package/dist/esm/src/server/core/XHSCBridge.js +0 -502
- package/dist/esm/src/server/core/XHSCBridge.js.map +0 -1
- package/dist/esm/src/server/core/XHSCProtocol.js +0 -311
- package/dist/esm/src/server/core/XHSCProtocol.js.map +0 -1
- package/dist/esm/src/server/core/XyDiagnosticsManager.js +0 -76
- package/dist/esm/src/server/core/XyDiagnosticsManager.js.map +0 -1
- package/dist/esm/src/server/core/XyLifecycleManager.js +0 -235
- package/dist/esm/src/server/core/XyLifecycleManager.js.map +0 -1
- package/dist/esm/src/server/core/XyModuleManager.js +0 -159
- package/dist/esm/src/server/core/XyModuleManager.js.map +0 -1
- package/dist/esm/src/server/core/XyRoutingManager.js +0 -185
- package/dist/esm/src/server/core/XyRoutingManager.js.map +0 -1
- package/dist/esm/src/server/core/XyServerCreator.js +0 -95
- package/dist/esm/src/server/core/XyServerCreator.js.map +0 -1
- package/dist/esm/src/server/core/XyprissApp.js +0 -481
- package/dist/esm/src/server/core/XyprissApp.js.map +0 -1
- package/dist/esm/src/server/core/request/XyRequestManager.js +0 -227
- package/dist/esm/src/server/core/request/XyRequestManager.js.map +0 -1
- package/dist/esm/src/server/handlers/NotFoundHandler.js +0 -81
- package/dist/esm/src/server/handlers/NotFoundHandler.js.map +0 -1
- package/dist/esm/src/server/handlers/templates/notFoundTemplate.js +0 -653
- package/dist/esm/src/server/handlers/templates/notFoundTemplate.js.map +0 -1
- package/dist/esm/src/server/middleware/MiddlewareManager.js +0 -195
- package/dist/esm/src/server/middleware/MiddlewareManager.js.map +0 -1
- package/dist/esm/src/server/optimization/ExecutionPredictor.js +0 -216
- package/dist/esm/src/server/optimization/ExecutionPredictor.js.map +0 -1
- package/dist/esm/src/server/optimization/PerformanceProfiler.js +0 -232
- package/dist/esm/src/server/optimization/PerformanceProfiler.js.map +0 -1
- package/dist/esm/src/server/optimization/RequestPreCompiler.js +0 -707
- package/dist/esm/src/server/optimization/RequestPreCompiler.js.map +0 -1
- package/dist/esm/src/server/optimization/UltraFastOptimizer.js +0 -424
- package/dist/esm/src/server/optimization/UltraFastOptimizer.js.map +0 -1
- package/dist/esm/src/server/optimization/performance-monitor.js +0 -160
- package/dist/esm/src/server/optimization/performance-monitor.js.map +0 -1
- package/dist/esm/src/server/routing/Router.js +0 -351
- package/dist/esm/src/server/routing/Router.js.map +0 -1
- package/dist/esm/src/server/service/Reload/FileWatcher.js +0 -734
- package/dist/esm/src/server/service/Reload/FileWatcher.js.map +0 -1
- package/dist/esm/src/server/service/Reload/HotReloader.js +0 -735
- package/dist/esm/src/server/service/Reload/HotReloader.js.map +0 -1
- package/dist/esm/src/server/service/Reload/exec/TypeScriptExecutor.js +0 -339
- package/dist/esm/src/server/service/Reload/exec/TypeScriptExecutor.js.map +0 -1
- package/dist/esm/src/server/utils/ConfigLoader.js +0 -339
- package/dist/esm/src/server/utils/ConfigLoader.js.map +0 -1
- package/dist/esm/src/server/utils/PortManager.js +0 -235
- package/dist/esm/src/server/utils/PortManager.js.map +0 -1
- package/dist/esm/src/server/utils/WorkerModeHandler.js +0 -63
- package/dist/esm/src/server/utils/WorkerModeHandler.js.map +0 -1
- package/dist/esm/src/server/utils/forceClosePort.js +0 -330
- package/dist/esm/src/server/utils/forceClosePort.js.map +0 -1
- package/dist/esm/src/server/utils/shouldRegisterRouteOnServer.js +0 -32
- package/dist/esm/src/server/utils/shouldRegisterRouteOnServer.js.map +0 -1
- package/dist/esm/src/server/utils/trustProxy.js +0 -776
- package/dist/esm/src/server/utils/trustProxy.js.map +0 -1
- package/dist/esm/src/sys/FSApi.js +0 -1142
- package/dist/esm/src/sys/FSApi.js.map +0 -1
- package/dist/esm/src/sys/FileSystem.js +0 -1300
- package/dist/esm/src/sys/FileSystem.js.map +0 -1
- package/dist/esm/src/sys/PathApi.js +0 -199
- package/dist/esm/src/sys/PathApi.js.map +0 -1
- package/dist/esm/src/sys/SysApi.js +0 -419
- package/dist/esm/src/sys/SysApi.js.map +0 -1
- package/dist/esm/src/sys/System.js +0 -38
- package/dist/esm/src/sys/System.js.map +0 -1
- package/dist/esm/src/sys/XyPrissCache.js +0 -68
- package/dist/esm/src/sys/XyPrissCache.js.map +0 -1
- package/dist/esm/src/sys/XyPrissRunner.js +0 -244
- package/dist/esm/src/sys/XyPrissRunner.js.map +0 -1
- package/dist/esm/src/sys.js +0 -401
- package/dist/esm/src/sys.js.map +0 -1
- package/dist/esm/src/types/NotFoundConfig.js +0 -84
- package/dist/esm/src/types/NotFoundConfig.js.map +0 -1
- package/dist/esm/src/utils/DotEnvLoader.js +0 -72
- package/dist/esm/src/utils/DotEnvLoader.js.map +0 -1
- package/dist/esm/src/utils/mergeWithDefaults.js +0 -174
- package/dist/esm/src/utils/mergeWithDefaults.js.map +0 -1
- package/dist/esm/src/xhs/cluster/XHSCWorker.js +0 -181
- package/dist/esm/src/xhs/cluster/XHSCWorker.js.map +0 -1
- package/dist/index.d.ts +0 -9398
|
@@ -1,1300 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* XyPriss File System API
|
|
6
|
-
*
|
|
7
|
-
* A powerful combination of node:fs and node:path providing a simplified,
|
|
8
|
-
* root-aware API for common file system operations.
|
|
9
|
-
*/
|
|
10
|
-
class XyPrissFS {
|
|
11
|
-
constructor(sys) {
|
|
12
|
-
this.sys = sys;
|
|
13
|
-
}
|
|
14
|
-
// ========== PATH OPERATIONS ==========
|
|
15
|
-
/**
|
|
16
|
-
* Resolves a sequence of paths or path segments into an absolute path, ensuring all paths are interpreted relative to the project root directory.
|
|
17
|
-
* This method provides a root-aware path resolution, preventing access outside the designated project scope and maintaining consistent path handling.
|
|
18
|
-
*
|
|
19
|
-
* @param {...string} paths - A sequence of path segments to be joined and resolved. Each segment can be a string representing a directory or file path.
|
|
20
|
-
* @returns {string} The fully resolved absolute path, anchored to the project root.
|
|
21
|
-
* @throws {TypeError} If any of the provided paths are not strings.
|
|
22
|
-
* @example
|
|
23
|
-
* // Assuming project root is '/home/user/project'
|
|
24
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
25
|
-
* console.log(fs.$resolve('src', 'index.ts')); // Outputs: '/home/user/project/src/index.ts'
|
|
26
|
-
*/
|
|
27
|
-
$resolve(...paths) {
|
|
28
|
-
return path.resolve(this.sys.__root__, ...paths);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Joins all provided path segments together using the platform-specific separator and normalizes the resulting path.
|
|
32
|
-
* This method is essential for constructing paths in a cross-platform manner, handling different operating system path conventions seamlessly.
|
|
33
|
-
*
|
|
34
|
-
* @param {...string} paths - The path segments to be joined. Each argument represents a portion of the path.
|
|
35
|
-
* @returns {string} The joined and normalized path string.
|
|
36
|
-
* @throws {TypeError} If any of the provided paths are not strings.
|
|
37
|
-
* @example
|
|
38
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
39
|
-
* console.log(fs.$join('src', 'components', 'Button.ts')); // Outputs: 'src/components/Button.ts' (on Unix-like systems)
|
|
40
|
-
*/
|
|
41
|
-
$join(...paths) {
|
|
42
|
-
return path.join(...paths);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Extracts the directory portion of a given path, returning the parent directory's path.
|
|
46
|
-
* This method is particularly useful for navigating up the directory tree or isolating the directory context of a file.
|
|
47
|
-
*
|
|
48
|
-
* @param {string} p - The path from which to extract the directory name.
|
|
49
|
-
* @returns {string} The directory name of the provided path.
|
|
50
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
51
|
-
* @example
|
|
52
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
53
|
-
* console.log(fs.$dirname('src/components/Button.ts')); // Outputs: 'src/components'
|
|
54
|
-
*/
|
|
55
|
-
$dirname(p) {
|
|
56
|
-
return path.dirname(p);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves the last portion of a path, which is typically the filename or the last directory in the path.
|
|
60
|
-
* Optionally, an extension can be specified to exclude it from the result, allowing for filename manipulation without extensions.
|
|
61
|
-
*
|
|
62
|
-
* @param {string} p - The path from which to extract the basename.
|
|
63
|
-
* @param {string} [ext] - An optional file extension to remove from the basename.
|
|
64
|
-
* @returns {string} The basename of the path, with the extension removed if specified.
|
|
65
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
66
|
-
* @example
|
|
67
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
68
|
-
* console.log(fs.$basename('src/components/Button.ts')); // Outputs: 'Button.ts'
|
|
69
|
-
* console.log(fs.$basename('src/components/Button.ts', '.ts')); // Outputs: 'Button'
|
|
70
|
-
*/
|
|
71
|
-
$basename(p, ext) {
|
|
72
|
-
return path.basename(p, ext);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Extracts the file extension from a given path, including the leading dot.
|
|
76
|
-
* This method is crucial for file type identification and handling files based on their extensions.
|
|
77
|
-
*
|
|
78
|
-
* @param {string} p - The path from which to extract the extension.
|
|
79
|
-
* @returns {string} The file extension, including the dot, or an empty string if no extension is present.
|
|
80
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
81
|
-
* @example
|
|
82
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
83
|
-
* console.log(fs.$extname('src/components/Button.ts')); // Outputs: '.ts'
|
|
84
|
-
* console.log(fs.$extname('README')); // Outputs: ''
|
|
85
|
-
*/
|
|
86
|
-
$extname(p) {
|
|
87
|
-
return path.extname(p);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Computes the relative path from one path to another, providing the most efficient route between them.
|
|
91
|
-
* This method is invaluable for generating relative links or paths in documentation, imports, or user interfaces.
|
|
92
|
-
*
|
|
93
|
-
* @param {string} from - The starting path for the relative calculation.
|
|
94
|
-
* @param {string} to - The destination path for the relative calculation.
|
|
95
|
-
* @returns {string} The relative path from the 'from' path to the 'to' path.
|
|
96
|
-
* @throws {TypeError} If either path is not a string.
|
|
97
|
-
* @example
|
|
98
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
99
|
-
* console.log(fs.$relative('src/components', 'src/utils/helpers.ts')); // Outputs: '../utils/helpers.ts'
|
|
100
|
-
*/
|
|
101
|
-
$relative(from, to) {
|
|
102
|
-
return path.relative(this.$resolve(from), this.$resolve(to));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Normalizes a path by resolving '.' and '..' segments, eliminating redundant separators, and ensuring a clean, canonical path representation.
|
|
106
|
-
* This method is essential for path sanitization and comparison, preventing issues caused by inconsistent path formats.
|
|
107
|
-
*
|
|
108
|
-
* @param {string} p - The path to be normalized.
|
|
109
|
-
* @returns {string} The normalized path with resolved segments and cleaned separators.
|
|
110
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
111
|
-
* @example
|
|
112
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
113
|
-
* console.log(fs.$normalize('src/../src/components/./Button.ts')); // Outputs: 'src/components/Button.ts'
|
|
114
|
-
*/
|
|
115
|
-
$normalize(p) {
|
|
116
|
-
return path.normalize(p);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Parses a path into its constituent components, providing detailed breakdown including root, directory, base name, extension, and name without extension.
|
|
120
|
-
* This method facilitates advanced path manipulation and analysis by exposing all structural elements of the path.
|
|
121
|
-
*
|
|
122
|
-
* @param {string} p - The path to be parsed.
|
|
123
|
-
* @returns {path.ParsedPath} An object containing the parsed path components: root, dir, base, ext, and name.
|
|
124
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
125
|
-
* @example
|
|
126
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
127
|
-
* const parsed = fs.$parse('src/components/Button.ts');
|
|
128
|
-
* console.log(parsed);
|
|
129
|
-
* // Outputs: { root: '', dir: 'src/components', base: 'Button.ts', ext: '.ts', name: 'Button' }
|
|
130
|
-
*/
|
|
131
|
-
$parse(p) {
|
|
132
|
-
return path.parse(p);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Formats a path object back into a path string, reconstructing the full path from its parsed components.
|
|
136
|
-
* This method is the inverse of path parsing, allowing for programmatic path construction from structured data.
|
|
137
|
-
*
|
|
138
|
-
* @param {path.FormatInputPathObject} pathObject - The path object containing components to format into a string.
|
|
139
|
-
* @returns {string} The formatted path string.
|
|
140
|
-
* @throws {TypeError} If the provided pathObject is not a valid path object.
|
|
141
|
-
* @example
|
|
142
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
143
|
-
* const pathObj = { dir: 'src/components', base: 'Button.ts' };
|
|
144
|
-
* console.log(fs.$format(pathObj)); // Outputs: 'src/components/Button.ts'
|
|
145
|
-
*/
|
|
146
|
-
$format(pathObject) {
|
|
147
|
-
return path.format(pathObject);
|
|
148
|
-
}
|
|
149
|
-
// ========== EXISTENCE & TYPE CHECKS ==========
|
|
150
|
-
/**
|
|
151
|
-
* Synchronously checks if a path exists in the file system, providing a reliable way to verify file or directory presence before operations.
|
|
152
|
-
* This method is essential for conditional logic and error prevention in file system interactions.
|
|
153
|
-
*
|
|
154
|
-
* @param {string} p - The path to check for existence.
|
|
155
|
-
* @returns {boolean} True if the path exists, false otherwise.
|
|
156
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
157
|
-
* @example
|
|
158
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
159
|
-
* if (fs.$exists('config.json')) {
|
|
160
|
-
* console.log('Configuration file found.');
|
|
161
|
-
* } else {
|
|
162
|
-
* console.log('Configuration file missing.');
|
|
163
|
-
* }
|
|
164
|
-
*/
|
|
165
|
-
$exists(p) {
|
|
166
|
-
return fs.existsSync(this.$resolve(p));
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Determines whether the specified path refers to a directory, enabling type-specific handling in file system operations.
|
|
170
|
-
* This method is crucial for distinguishing between files and directories to apply appropriate processing logic.
|
|
171
|
-
*
|
|
172
|
-
* @param {string} p - The path to check if it is a directory.
|
|
173
|
-
* @returns {boolean} True if the path is a directory, false otherwise (including if the path does not exist).
|
|
174
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
175
|
-
* @example
|
|
176
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
177
|
-
* if (fs.$isDir('src')) {
|
|
178
|
-
* console.log('Source directory exists.');
|
|
179
|
-
* } else {
|
|
180
|
-
* console.log('Source is not a directory or does not exist.');
|
|
181
|
-
* }
|
|
182
|
-
*/
|
|
183
|
-
$isDir(p) {
|
|
184
|
-
try {
|
|
185
|
-
return fs.statSync(this.$resolve(p)).isDirectory();
|
|
186
|
-
}
|
|
187
|
-
catch {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Verifies if the given path points to a regular file, allowing for file-specific operations and validations.
|
|
193
|
-
* This check is fundamental for ensuring that file reading or writing operations are applied to appropriate file system entities.
|
|
194
|
-
*
|
|
195
|
-
* @param {string} p - The path to verify as a file.
|
|
196
|
-
* @returns {boolean} True if the path is a regular file, false otherwise (including if the path does not exist or is a directory).
|
|
197
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
198
|
-
* @example
|
|
199
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
200
|
-
* if (fs.$isFile('package.json')) {
|
|
201
|
-
* console.log('Package configuration file is present.');
|
|
202
|
-
* } else {
|
|
203
|
-
* console.log('Package configuration is missing or not a file.');
|
|
204
|
-
* }
|
|
205
|
-
*/
|
|
206
|
-
$isFile(p) {
|
|
207
|
-
try {
|
|
208
|
-
return fs.statSync(this.$resolve(p)).isFile();
|
|
209
|
-
}
|
|
210
|
-
catch {
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Identifies if the specified path is a symbolic link, which is essential for handling symlinks appropriately in file system operations.
|
|
216
|
-
* This method helps in detecting symbolic links to prevent unintended modifications or to apply symlink-specific logic.
|
|
217
|
-
*
|
|
218
|
-
* @param {string} p - The path to check for being a symbolic link.
|
|
219
|
-
* @returns {boolean} True if the path is a symbolic link, false otherwise (including if the path does not exist).
|
|
220
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
221
|
-
* @example
|
|
222
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
223
|
-
* if (fs.$isSymlink('node_modules')) {
|
|
224
|
-
* console.log('Node modules is a symlink.');
|
|
225
|
-
* } else {
|
|
226
|
-
* console.log('Node modules is not a symlink.');
|
|
227
|
-
* }
|
|
228
|
-
*/
|
|
229
|
-
$isSymlink(p) {
|
|
230
|
-
try {
|
|
231
|
-
return fs.lstatSync(this.$resolve(p)).isSymbolicLink();
|
|
232
|
-
}
|
|
233
|
-
catch {
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Determines if a path represents an empty entity, either an empty directory or a zero-byte file.
|
|
239
|
-
* This method is useful for cleanup operations, validation checks, or determining if content needs to be added.
|
|
240
|
-
*
|
|
241
|
-
* @param {string} p - The path to check for emptiness.
|
|
242
|
-
* @returns {boolean} True if the path is empty or does not exist, false if it contains content.
|
|
243
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
244
|
-
* @example
|
|
245
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
246
|
-
* if (fs.$isEmpty('logs')) {
|
|
247
|
-
* console.log('Logs directory is empty.');
|
|
248
|
-
* } else {
|
|
249
|
-
* console.log('Logs directory contains files.');
|
|
250
|
-
* }
|
|
251
|
-
*/
|
|
252
|
-
$isEmpty(p) {
|
|
253
|
-
const fullPath = this.$resolve(p);
|
|
254
|
-
if (!fs.existsSync(fullPath))
|
|
255
|
-
return true;
|
|
256
|
-
if (this.$isDir(p)) {
|
|
257
|
-
return fs.readdirSync(fullPath).length === 0;
|
|
258
|
-
}
|
|
259
|
-
return fs.statSync(fullPath).size === 0;
|
|
260
|
-
}
|
|
261
|
-
// ========== FILE READING ==========
|
|
262
|
-
/**
|
|
263
|
-
* Synchronously reads the entire contents of a file, providing flexible encoding options for different data types.
|
|
264
|
-
* This method is ideal for loading configuration files, templates, or any file content that needs to be processed in memory.
|
|
265
|
-
*
|
|
266
|
-
* @param {string} p - The path to the file to read.
|
|
267
|
-
* @param {BufferEncoding | { encoding?: BufferEncoding; flag?: string }} [options='utf8'] - The encoding to use or an options object specifying encoding and file access flags.
|
|
268
|
-
* @returns {string | Buffer} The file contents as a string (if encoding is specified) or Buffer (if no encoding).
|
|
269
|
-
* @throws {Error} If the file does not exist, cannot be read, or other file system errors occur.
|
|
270
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
271
|
-
* @example
|
|
272
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
273
|
-
* const content = fs.$readFile('README.md', 'utf8');
|
|
274
|
-
* console.log(content);
|
|
275
|
-
*/
|
|
276
|
-
$readFile(p, options = "utf8") {
|
|
277
|
-
return fs.readFileSync(this.$resolve(p), options);
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Synchronously reads and parses a JSON file, automatically handling the file reading and JSON parsing in one convenient operation.
|
|
281
|
-
* This method simplifies loading configuration files, data stores, or any JSON-formatted content with built-in error handling for malformed JSON.
|
|
282
|
-
*
|
|
283
|
-
* @param {string} p - The path to the JSON file to read and parse.
|
|
284
|
-
* @returns {T} The parsed JSON object, typed according to the generic parameter.
|
|
285
|
-
* @throws {SyntaxError} If the file content is not valid JSON.
|
|
286
|
-
* @throws {Error} If the file does not exist or cannot be read.
|
|
287
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
288
|
-
* @template T - The expected type of the parsed JSON object (defaults to any).
|
|
289
|
-
* @example
|
|
290
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
291
|
-
* const config = fs.$readJson<{ port: number; host: string }>('config.json');
|
|
292
|
-
* console.log(`Server will run on ${config.host}:${config.port}`);
|
|
293
|
-
*/
|
|
294
|
-
$readJson(p) {
|
|
295
|
-
const content = this.$readFile(p, "utf8");
|
|
296
|
-
return JSON.parse(content);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Safely reads and parses a JSON file, gracefully handling errors by returning a predefined default value.
|
|
300
|
-
* This method is perfect for optional configuration files or data that may not exist, preventing application crashes due to missing or invalid JSON.
|
|
301
|
-
*
|
|
302
|
-
* @param {string} p - The path to the JSON file to read and parse.
|
|
303
|
-
* @param {T} defaultValue - The value to return if the file doesn't exist, cannot be read, or contains invalid JSON.
|
|
304
|
-
* @returns {T} The parsed JSON object if successful, or the default value if any error occurs.
|
|
305
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
306
|
-
* @template T - The expected type of the parsed JSON object and the default value.
|
|
307
|
-
* @example
|
|
308
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
309
|
-
* const settings = fs.$readJsonSafe('user-settings.json', { theme: 'light', language: 'en' });
|
|
310
|
-
* console.log(`User theme: ${settings.theme}`);
|
|
311
|
-
*/
|
|
312
|
-
$readJsonSafe(p, defaultValue) {
|
|
313
|
-
try {
|
|
314
|
-
return this.$readJson(p);
|
|
315
|
-
}
|
|
316
|
-
catch {
|
|
317
|
-
return defaultValue;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Reads a file and splits its content into an array of lines, handling different line ending conventions automatically.
|
|
322
|
-
* This method is ideal for processing text files line by line, such as configuration files, logs, or CSV data.
|
|
323
|
-
*
|
|
324
|
-
* @param {string} p - The path to the file to read as lines.
|
|
325
|
-
* @returns {string[]} An array of strings, where each element represents a line from the file (including empty lines).
|
|
326
|
-
* @throws {Error} If the file does not exist or cannot be read.
|
|
327
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
328
|
-
* @example
|
|
329
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
330
|
-
* const lines = fs.$readLines('todo.txt');
|
|
331
|
-
* lines.forEach((line, index) => {
|
|
332
|
-
* console.log(`${index + 1}: ${line}`);
|
|
333
|
-
* });
|
|
334
|
-
*/
|
|
335
|
-
$readLines(p) {
|
|
336
|
-
const content = this.$readFile(p, "utf8");
|
|
337
|
-
return content.split(/\r?\n/);
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Reads a file and returns an array of its non-empty lines, filtering out blank lines and whitespace-only lines.
|
|
341
|
-
* This method is perfect for parsing configuration files, lists, or any text content where empty lines are irrelevant.
|
|
342
|
-
*
|
|
343
|
-
* @param {string} p - The path to the file to read and filter for non-empty lines.
|
|
344
|
-
* @returns {string[]} An array of strings containing only the non-empty lines from the file, with whitespace trimmed.
|
|
345
|
-
* @throws {Error} If the file does not exist or cannot be read.
|
|
346
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
347
|
-
* @example
|
|
348
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
349
|
-
* const commands = fs.$readNonEmptyLines('build-commands.txt');
|
|
350
|
-
* commands.forEach(command => {
|
|
351
|
-
* console.log(`Executing: ${command}`);
|
|
352
|
-
* // Execute command
|
|
353
|
-
* });
|
|
354
|
-
*/
|
|
355
|
-
$readNonEmptyLines(p) {
|
|
356
|
-
return this.$readLines(p).filter((line) => line.trim().length > 0);
|
|
357
|
-
}
|
|
358
|
-
// ========== FILE WRITING ==========
|
|
359
|
-
/**
|
|
360
|
-
* Synchronously writes data to a file, automatically creating any necessary parent directories to ensure the write operation succeeds.
|
|
361
|
-
* This method simplifies file creation and modification by handling directory structure setup transparently.
|
|
362
|
-
*
|
|
363
|
-
* @param {string} p - The path to the file to write to.
|
|
364
|
-
* @param {string | NodeJS.ArrayBufferView} data - The data to write to the file.
|
|
365
|
-
* @param {fs.WriteFileOptions} [options] - Optional write options such as encoding, mode, or flags.
|
|
366
|
-
* @throws {Error} If the file cannot be written or directories cannot be created.
|
|
367
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
368
|
-
* @example
|
|
369
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
370
|
-
* fs.$writeFile('logs/app.log', 'Application started successfully\n');
|
|
371
|
-
* // Creates the logs directory if it doesn't exist
|
|
372
|
-
*/
|
|
373
|
-
$writeFile(p, data, options) {
|
|
374
|
-
const fullPath = this.$resolve(p);
|
|
375
|
-
const dir = path.dirname(fullPath);
|
|
376
|
-
if (!fs.existsSync(dir)) {
|
|
377
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
378
|
-
}
|
|
379
|
-
fs.writeFileSync(fullPath, data, options);
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Synchronously writes a JavaScript object to a JSON file with standardized 2-space indentation for readability.
|
|
383
|
-
* This method combines object serialization and file writing, automatically creating parent directories as needed.
|
|
384
|
-
*
|
|
385
|
-
* @param {string} p - The path to the JSON file to write to.
|
|
386
|
-
* @param {any} data - The JavaScript object or value to serialize and write as JSON.
|
|
387
|
-
* @param {fs.WriteFileOptions} [options] - Optional write options such as encoding or mode.
|
|
388
|
-
* @throws {Error} If the data cannot be serialized to JSON or the file cannot be written.
|
|
389
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
390
|
-
* @example
|
|
391
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
392
|
-
* const config = { port: 3000, host: 'localhost', debug: true };
|
|
393
|
-
* fs.$writeJson('config/app.json', config);
|
|
394
|
-
* // Creates a formatted JSON file with proper indentation
|
|
395
|
-
*/
|
|
396
|
-
$writeJson(p, data, options) {
|
|
397
|
-
this.$writeFile(p, JSON.stringify(data, null, 2), options);
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* Synchronously appends data to the end of an existing file, creating the file if it doesn't exist.
|
|
401
|
-
* This method is essential for logging, accumulating data, or building files incrementally without overwriting existing content.
|
|
402
|
-
*
|
|
403
|
-
* @param {string} p - The path to the file to append data to.
|
|
404
|
-
* @param {string | Uint8Array} data - The data to append to the file.
|
|
405
|
-
* @param {fs.WriteFileOptions} [options] - Optional write options such as encoding or mode.
|
|
406
|
-
* @throws {Error} If the file cannot be accessed or written to.
|
|
407
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
408
|
-
* @example
|
|
409
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
410
|
-
* fs.$append('logs/access.log', `${new Date().toISOString()} - User login\n`);
|
|
411
|
-
* // Adds the log entry to the end of the file
|
|
412
|
-
*/
|
|
413
|
-
$append(p, data, options) {
|
|
414
|
-
fs.appendFileSync(this.$resolve(p), data, options);
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Appends a single line of text to a file, automatically adding the appropriate newline character.
|
|
418
|
-
* This method simplifies line-based file writing, ensuring consistent line endings across different platforms.
|
|
419
|
-
*
|
|
420
|
-
* @param {string} p - The path to the file to append the line to.
|
|
421
|
-
* @param {string} line - The line of text to append (without needing to include the newline character).
|
|
422
|
-
* @throws {Error} If the file cannot be accessed or written to.
|
|
423
|
-
* @throws {TypeError} If the provided path or line is not a string.
|
|
424
|
-
* @example
|
|
425
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
426
|
-
* fs.$appendLine('todo.txt', 'Buy groceries');
|
|
427
|
-
* fs.$appendLine('todo.txt', 'Finish project report');
|
|
428
|
-
* // File now contains two lines with proper line endings
|
|
429
|
-
*/
|
|
430
|
-
$appendLine(p, line) {
|
|
431
|
-
this.$append(p, line + "\n");
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* Creates an empty file if it doesn't exist, or updates the access and modification times of an existing file.
|
|
435
|
-
* This method mimics the Unix 'touch' command behavior, useful for creating placeholder files or updating file timestamps.
|
|
436
|
-
*
|
|
437
|
-
* @param {string} p - The path to the file to touch.
|
|
438
|
-
* @throws {Error} If the file cannot be created or its timestamps cannot be updated.
|
|
439
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
440
|
-
* @example
|
|
441
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
442
|
-
* fs.$touch('logs/app.log'); // Creates empty log file if it doesn't exist
|
|
443
|
-
* // If file exists, updates its modification time to current time
|
|
444
|
-
*/
|
|
445
|
-
$touch(p) {
|
|
446
|
-
const fullPath = this.$resolve(p);
|
|
447
|
-
if (fs.existsSync(fullPath)) {
|
|
448
|
-
const now = new Date();
|
|
449
|
-
fs.utimesSync(fullPath, now, now);
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
this.$writeFile(fullPath, "");
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Conditionally writes data to a file only if the file does not already exist, preventing accidental overwrites.
|
|
457
|
-
* This method is crucial for creating default configuration files or initializing resources without destroying existing data.
|
|
458
|
-
*
|
|
459
|
-
* @param {string} p - The path to the file to potentially write to.
|
|
460
|
-
* @param {string | NodeJS.ArrayBufferView} data - The data to write if the file doesn't exist.
|
|
461
|
-
* @returns {boolean} True if the file was written (didn't exist), false if the file already existed.
|
|
462
|
-
* @throws {Error} If the file exists and cannot be written to, or if writing fails.
|
|
463
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
464
|
-
* @example
|
|
465
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
466
|
-
* const written = fs.$writeIfNotExists('config/default.json', '{"theme": "light"}');
|
|
467
|
-
* if (written) {
|
|
468
|
-
* console.log('Default config created');
|
|
469
|
-
* } else {
|
|
470
|
-
* console.log('Config already exists, not overwriting');
|
|
471
|
-
* }
|
|
472
|
-
*/
|
|
473
|
-
$writeIfNotExists(p, data) {
|
|
474
|
-
if (this.$exists(p))
|
|
475
|
-
return false;
|
|
476
|
-
this.$writeFile(p, data);
|
|
477
|
-
return true;
|
|
478
|
-
}
|
|
479
|
-
// ========== DIRECTORY OPERATIONS ==========
|
|
480
|
-
/**
|
|
481
|
-
* Synchronously creates a directory along with all necessary parent directories if they don't already exist.
|
|
482
|
-
* This method ensures the complete directory path is available for subsequent file operations.
|
|
483
|
-
*
|
|
484
|
-
* @param {string} p - The path of the directory to create.
|
|
485
|
-
* @param {boolean} [recursive=true] - Whether to create parent directories recursively (default: true).
|
|
486
|
-
* @throws {Error} If the directory cannot be created or already exists and is not a directory.
|
|
487
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
488
|
-
* @example
|
|
489
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
490
|
-
* fs.$mkdir('data/processed/images/thumbnails');
|
|
491
|
-
* // Creates the entire directory structure if it doesn't exist
|
|
492
|
-
*/
|
|
493
|
-
$mkdir(p, recursive = true) {
|
|
494
|
-
fs.mkdirSync(this.$resolve(p), { recursive });
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Guarantees that a directory exists by creating it if necessary, without throwing an error if it already exists.
|
|
498
|
-
* This method is ideal for setup operations where you need to ensure directory availability without conditional checks.
|
|
499
|
-
*
|
|
500
|
-
* @param {string} p - The path of the directory to ensure exists.
|
|
501
|
-
* @throws {Error} If the directory cannot be created and doesn't already exist.
|
|
502
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
503
|
-
* @example
|
|
504
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
505
|
-
* fs.$ensureDir('output/reports');
|
|
506
|
-
* // Now safe to write files to 'output/reports/' without existence checks
|
|
507
|
-
*/
|
|
508
|
-
$ensureDir(p) {
|
|
509
|
-
const fullPath = this.$resolve(p);
|
|
510
|
-
if (!fs.existsSync(fullPath)) {
|
|
511
|
-
fs.mkdirSync(fullPath, { recursive: true });
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Synchronously retrieves the list of items (files and directories) in a specified directory.
|
|
516
|
-
* This method provides a simple way to explore directory contents without full path information.
|
|
517
|
-
*
|
|
518
|
-
* @param {string} p - The path of the directory to list.
|
|
519
|
-
* @returns {string[]} An array of item names (files and directories) in the directory.
|
|
520
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
521
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
522
|
-
* @example
|
|
523
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
524
|
-
* const items = fs.$ls('src');
|
|
525
|
-
* console.log('Items in src:', items);
|
|
526
|
-
* // Output: ['index.ts', 'components', 'utils', ...]
|
|
527
|
-
*/
|
|
528
|
-
$ls(p) {
|
|
529
|
-
return fs.readdirSync(this.$resolve(p));
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Lists all items in a directory, returning their full absolute paths for immediate use in other operations.
|
|
533
|
-
* This method is particularly useful when you need complete path information for subsequent file operations.
|
|
534
|
-
*
|
|
535
|
-
* @param {string} p - The path of the directory to list with full paths.
|
|
536
|
-
* @returns {string[]} An array of full paths for all items in the directory.
|
|
537
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
538
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
539
|
-
* @example
|
|
540
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
541
|
-
* const fullPaths = fs.$lsFullPath('src');
|
|
542
|
-
* fullPaths.forEach(path => {
|
|
543
|
-
* console.log('Processing:', path);
|
|
544
|
-
* // Can directly use these paths for other operations
|
|
545
|
-
* });
|
|
546
|
-
*/
|
|
547
|
-
$lsFullPath(p) {
|
|
548
|
-
const fullPath = this.$resolve(p);
|
|
549
|
-
return fs
|
|
550
|
-
.readdirSync(fullPath)
|
|
551
|
-
.map((item) => path.join(fullPath, item));
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* Retrieves only the files (excluding directories and other items) from a directory listing.
|
|
555
|
-
* This method is essential for operations that need to process only regular files in a specific directory.
|
|
556
|
-
*
|
|
557
|
-
* @param {string} p - The path of the directory to list files from.
|
|
558
|
-
* @returns {string[]} An array of filenames that are regular files in the directory.
|
|
559
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
560
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
561
|
-
* @example
|
|
562
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
563
|
-
* const files = fs.$lsFiles('src');
|
|
564
|
-
* files.forEach(file => {
|
|
565
|
-
* console.log('Found file:', file);
|
|
566
|
-
* // Process only files, ignore subdirectories
|
|
567
|
-
* });
|
|
568
|
-
*/
|
|
569
|
-
$lsFiles(p) {
|
|
570
|
-
const fullPath = this.$resolve(p);
|
|
571
|
-
return fs.readdirSync(fullPath).filter((item) => {
|
|
572
|
-
return fs.statSync(path.join(fullPath, item)).isFile();
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* Retrieves only the subdirectories (excluding files and other items) from a directory listing.
|
|
577
|
-
* This method is useful for traversing directory structures or performing operations on folder hierarchies.
|
|
578
|
-
*
|
|
579
|
-
* @param {string} p - The path of the directory to list subdirectories from.
|
|
580
|
-
* @returns {string[]} An array of directory names that are subdirectories in the specified directory.
|
|
581
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
582
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
583
|
-
* @example
|
|
584
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
585
|
-
* const dirs = fs.$lsDirs('src');
|
|
586
|
-
* dirs.forEach(dir => {
|
|
587
|
-
* console.log('Found directory:', dir);
|
|
588
|
-
* // Process subdirectories recursively if needed
|
|
589
|
-
* });
|
|
590
|
-
*/
|
|
591
|
-
$lsDirs(p) {
|
|
592
|
-
const fullPath = this.$resolve(p);
|
|
593
|
-
return fs.readdirSync(fullPath).filter((item) => {
|
|
594
|
-
return fs.statSync(path.join(fullPath, item)).isDirectory();
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* Recursively traverses a directory tree and collects all file paths, with optional filtering capabilities.
|
|
599
|
-
* This method is ideal for comprehensive directory analysis, bulk operations, or searching through entire project structures.
|
|
600
|
-
*
|
|
601
|
-
* @param {string} p - The root directory path to start the recursive listing from.
|
|
602
|
-
* @param {(path: string) => boolean} [filter] - Optional filter function to include only files that match specific criteria.
|
|
603
|
-
* @returns {string[]} An array of relative file paths from all subdirectories.
|
|
604
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
605
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
606
|
-
* @example
|
|
607
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
608
|
-
* const allFiles = fs.$lsRecursive('src');
|
|
609
|
-
* console.log('All files in src:', allFiles);
|
|
610
|
-
*
|
|
611
|
-
* // With filter for TypeScript files only
|
|
612
|
-
* const tsFiles = fs.$lsRecursive('src', file => file.endsWith('.ts'));
|
|
613
|
-
* console.log('TypeScript files:', tsFiles);
|
|
614
|
-
*/
|
|
615
|
-
$lsRecursive(p, filter) {
|
|
616
|
-
const results = [];
|
|
617
|
-
const fullPath = this.$resolve(p);
|
|
618
|
-
const walk = (dir) => {
|
|
619
|
-
const items = fs.readdirSync(dir);
|
|
620
|
-
for (const item of items) {
|
|
621
|
-
const itemPath = path.join(dir, item);
|
|
622
|
-
if (fs.statSync(itemPath).isDirectory()) {
|
|
623
|
-
walk(itemPath);
|
|
624
|
-
}
|
|
625
|
-
else {
|
|
626
|
-
const relativePath = path.relative(this.sys.__root__, itemPath);
|
|
627
|
-
if (!filter || filter(relativePath)) {
|
|
628
|
-
results.push(relativePath);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
walk(fullPath);
|
|
634
|
-
return results;
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* Searches recursively through a directory tree to find all files with a specific extension.
|
|
638
|
-
* This method simplifies locating files of particular types across complex project structures.
|
|
639
|
-
*
|
|
640
|
-
* @param {string} p - The root directory path to search in.
|
|
641
|
-
* @param {string} ext - The file extension to search for (with or without leading dot).
|
|
642
|
-
* @returns {string[]} An array of relative file paths that match the specified extension.
|
|
643
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
644
|
-
* @throws {TypeError} If the provided path or extension is not a string.
|
|
645
|
-
* @example
|
|
646
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
647
|
-
* const jsFiles = fs.$findByExt('src', 'js');
|
|
648
|
-
* const tsFiles = fs.$findByExt('src', '.ts');
|
|
649
|
-
* console.log('JavaScript files:', jsFiles);
|
|
650
|
-
* console.log('TypeScript files:', tsFiles);
|
|
651
|
-
*/
|
|
652
|
-
$findByExt(p, ext) {
|
|
653
|
-
const extension = ext.startsWith(".") ? ext : `.${ext}`;
|
|
654
|
-
return this.$lsRecursive(p, (file) => file.endsWith(extension));
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* Performs a recursive search through a directory tree using a regular expression pattern to find matching files.
|
|
658
|
-
* This method provides powerful pattern-based file discovery for complex search requirements.
|
|
659
|
-
*
|
|
660
|
-
* @param {string} p - The root directory path to search in.
|
|
661
|
-
* @param {RegExp} pattern - The regular expression pattern to match against file paths.
|
|
662
|
-
* @returns {string[]} An array of relative file paths that match the provided pattern.
|
|
663
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
664
|
-
* @throws {TypeError} If the provided path is not a string or pattern is not a RegExp.
|
|
665
|
-
* @example
|
|
666
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
667
|
-
* // Find all test files
|
|
668
|
-
* const testFiles = fs.$findByPattern('src', /test\.ts$/);
|
|
669
|
-
* // Find all files starting with 'config'
|
|
670
|
-
* const configFiles = fs.$findByPattern('.', /^config/);
|
|
671
|
-
* console.log('Test files:', testFiles);
|
|
672
|
-
*/
|
|
673
|
-
$findByPattern(p, pattern) {
|
|
674
|
-
return this.$lsRecursive(p, (file) => pattern.test(file));
|
|
675
|
-
}
|
|
676
|
-
// ========== COPY & MOVE OPERATIONS ==========
|
|
677
|
-
/**
|
|
678
|
-
* Synchronously copies a file or directory from one location to another, with optional overwrite control.
|
|
679
|
-
* This method handles both files and directories recursively, ensuring complete and accurate duplication.
|
|
680
|
-
*
|
|
681
|
-
* @param {string} src - The source path of the file or directory to copy.
|
|
682
|
-
* @param {string} dest - The destination path where the file or directory should be copied.
|
|
683
|
-
* @param {boolean} [overwrite=true] - Whether to overwrite the destination if it exists (default: true).
|
|
684
|
-
* @throws {Error} If the source doesn't exist, destination exists and overwrite is false, or copy operation fails.
|
|
685
|
-
* @throws {TypeError} If the provided paths are not strings.
|
|
686
|
-
* @example
|
|
687
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
688
|
-
* fs.$copy('config/default.json', 'config/production.json');
|
|
689
|
-
* // Copies the file, overwriting if production.json exists
|
|
690
|
-
*
|
|
691
|
-
* fs.$copy('templates', 'build/templates', false);
|
|
692
|
-
* // Copies directory only if build/templates doesn't exist
|
|
693
|
-
*/
|
|
694
|
-
$copy(src, dest, overwrite = true) {
|
|
695
|
-
const fullSrc = this.$resolve(src);
|
|
696
|
-
const fullDest = this.$resolve(dest);
|
|
697
|
-
if (!overwrite && fs.existsSync(fullDest)) {
|
|
698
|
-
throw new Error(`Destination already exists: ${dest}`);
|
|
699
|
-
}
|
|
700
|
-
const destDir = path.dirname(fullDest);
|
|
701
|
-
if (!fs.existsSync(destDir)) {
|
|
702
|
-
fs.mkdirSync(destDir, { recursive: true });
|
|
703
|
-
}
|
|
704
|
-
fs.cpSync(fullSrc, fullDest, { recursive: true });
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Creates a duplicate of a file or directory within the same parent directory using a new name.
|
|
708
|
-
* This method is convenient for creating backups, versions, or copies without specifying full destination paths.
|
|
709
|
-
*
|
|
710
|
-
* @param {string} p - The path of the file or directory to duplicate.
|
|
711
|
-
* @param {string} newName - The new name for the duplicated item (without path).
|
|
712
|
-
* @returns {string} The relative path of the newly created duplicate.
|
|
713
|
-
* @throws {Error} If the source doesn't exist, destination already exists, or copy operation fails.
|
|
714
|
-
* @throws {TypeError} If the provided paths are not strings.
|
|
715
|
-
* @example
|
|
716
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
717
|
-
* const backupPath = fs.$duplicate('config.json', 'config.backup.json');
|
|
718
|
-
* console.log('Backup created at:', backupPath);
|
|
719
|
-
* // Creates 'config.backup.json' in the same directory as 'config.json'
|
|
720
|
-
*/
|
|
721
|
-
$duplicate(p, newName) {
|
|
722
|
-
const fullPath = this.$resolve(p);
|
|
723
|
-
const dir = path.dirname(fullPath);
|
|
724
|
-
const newPath = path.join(dir, newName);
|
|
725
|
-
fs.cpSync(fullPath, newPath, { recursive: true });
|
|
726
|
-
return path.relative(this.sys.__root__, newPath);
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* Synchronously moves or renames a file or directory from one location to another.
|
|
730
|
-
* This atomic operation ensures that the item is either completely moved or remains in its original location.
|
|
731
|
-
*
|
|
732
|
-
* @param {string} src - The source path of the file or directory to move.
|
|
733
|
-
* @param {string} dest - The destination path where the file or directory should be moved.
|
|
734
|
-
* @throws {Error} If the source doesn't exist, destination directory doesn't exist, or move operation fails.
|
|
735
|
-
* @throws {TypeError} If the provided paths are not strings.
|
|
736
|
-
* @example
|
|
737
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
738
|
-
* fs.$move('temp/file.txt', 'archive/file.txt');
|
|
739
|
-
* // Moves file.txt from temp/ to archive/ directory
|
|
740
|
-
*
|
|
741
|
-
* fs.$move('oldname.txt', 'newname.txt');
|
|
742
|
-
* // Renames oldname.txt to newname.txt in the same directory
|
|
743
|
-
*/
|
|
744
|
-
$move(src, dest) {
|
|
745
|
-
const fullSrc = this.$resolve(src);
|
|
746
|
-
const fullDest = this.$resolve(dest);
|
|
747
|
-
const destDir = path.dirname(fullDest);
|
|
748
|
-
if (!fs.existsSync(destDir)) {
|
|
749
|
-
fs.mkdirSync(destDir, { recursive: true });
|
|
750
|
-
}
|
|
751
|
-
fs.renameSync(fullSrc, fullDest);
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* Renames a file or directory within its current directory using a new name.
|
|
755
|
-
* This method provides a convenient way to change names without dealing with full path specifications.
|
|
756
|
-
*
|
|
757
|
-
* @param {string} oldPath - The current path of the file or directory to rename.
|
|
758
|
-
* @param {string} newName - The new name for the item (without directory path).
|
|
759
|
-
* @returns {string} The relative path of the renamed item.
|
|
760
|
-
* @throws {Error} If the source doesn't exist, destination already exists, or rename operation fails.
|
|
761
|
-
* @throws {TypeError} If the provided paths are not strings.
|
|
762
|
-
* @example
|
|
763
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
764
|
-
* const newPath = fs.$rename('draft-report.txt', 'final-report.txt');
|
|
765
|
-
* console.log('File renamed to:', newPath);
|
|
766
|
-
* // Renames 'draft-report.txt' to 'final-report.txt' in the same directory
|
|
767
|
-
*/
|
|
768
|
-
$rename(oldPath, newName) {
|
|
769
|
-
const fullOldPath = this.$resolve(oldPath);
|
|
770
|
-
const dir = path.dirname(fullOldPath);
|
|
771
|
-
const newPath = path.join(dir, newName);
|
|
772
|
-
fs.renameSync(fullOldPath, newPath);
|
|
773
|
-
return path.relative(this.sys.__root__, newPath);
|
|
774
|
-
}
|
|
775
|
-
// ========== DELETE OPERATIONS ==========
|
|
776
|
-
/**
|
|
777
|
-
* Synchronously removes a file or directory, including all contents recursively.
|
|
778
|
-
* This method provides forceful deletion with configurable options for handling different scenarios.
|
|
779
|
-
*
|
|
780
|
-
* @param {string} p - The path of the file or directory to remove.
|
|
781
|
-
* @param {fs.RmOptions} [options={ recursive: true, force: true }] - Options for the removal operation.
|
|
782
|
-
* @throws {Error} If the path cannot be removed or doesn't exist.
|
|
783
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
784
|
-
* @example
|
|
785
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
786
|
-
* fs.$rm('temp/build');
|
|
787
|
-
* // Removes the entire build directory and all its contents
|
|
788
|
-
*
|
|
789
|
-
* fs.$rm('unnecessary-file.txt', { recursive: false });
|
|
790
|
-
* // Removes only the file (recursive defaults to true for safety)
|
|
791
|
-
*/
|
|
792
|
-
$rm(p, options = { recursive: true, force: true }) {
|
|
793
|
-
fs.rmSync(this.$resolve(p), options);
|
|
794
|
-
}
|
|
795
|
-
/**
|
|
796
|
-
* Conditionally removes a file or directory only if it exists, preventing errors from attempting to delete non-existent paths.
|
|
797
|
-
* This method is ideal for cleanup operations where the presence of the target is uncertain.
|
|
798
|
-
*
|
|
799
|
-
* @param {string} p - The path of the file or directory to remove if it exists.
|
|
800
|
-
* @returns {boolean} True if the path was removed, false if it didn't exist.
|
|
801
|
-
* @throws {Error} If the path exists but cannot be removed.
|
|
802
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
803
|
-
* @example
|
|
804
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
805
|
-
* const removed = fs.$rmIfExists('temp/cache');
|
|
806
|
-
* if (removed) {
|
|
807
|
-
* console.log('Cache directory cleaned up');
|
|
808
|
-
* } else {
|
|
809
|
-
* console.log('Cache directory was already clean');
|
|
810
|
-
* }
|
|
811
|
-
*/
|
|
812
|
-
$rmIfExists(p) {
|
|
813
|
-
if (this.$exists(p)) {
|
|
814
|
-
this.$rm(p);
|
|
815
|
-
return true;
|
|
816
|
-
}
|
|
817
|
-
return false;
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* Removes all contents of a directory while preserving the directory itself.
|
|
821
|
-
* This method is useful for clearing temporary directories, cache folders, or preparing directories for fresh content.
|
|
822
|
-
*
|
|
823
|
-
* @param {string} p - The path of the directory to empty.
|
|
824
|
-
* @throws {Error} If the directory doesn't exist, is not a directory, or contents cannot be removed.
|
|
825
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
826
|
-
* @example
|
|
827
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
828
|
-
* fs.$emptyDir('build');
|
|
829
|
-
* // Removes all files and subdirectories from build/, but keeps the build/ directory
|
|
830
|
-
*/
|
|
831
|
-
$emptyDir(p) {
|
|
832
|
-
const fullPath = this.$resolve(p);
|
|
833
|
-
if (fs.existsSync(fullPath) && fs.statSync(fullPath).isDirectory()) {
|
|
834
|
-
const items = fs.readdirSync(fullPath);
|
|
835
|
-
for (const item of items) {
|
|
836
|
-
fs.rmSync(path.join(fullPath, item), {
|
|
837
|
-
recursive: true,
|
|
838
|
-
force: true,
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
// ========== FILE STATISTICS ==========
|
|
844
|
-
/**
|
|
845
|
-
* Retrieves comprehensive statistics for a file or directory, including size, timestamps, and permissions.
|
|
846
|
-
* This method provides access to all file system metadata available through Node.js fs.Stats.
|
|
847
|
-
*
|
|
848
|
-
* @param {string} p - The path of the file or directory to get statistics for.
|
|
849
|
-
* @returns {fs.Stats} A Stats object containing detailed file system information.
|
|
850
|
-
* @throws {Error} If the path does not exist or cannot be accessed.
|
|
851
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
852
|
-
* @example
|
|
853
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
854
|
-
* const stats = fs.$stats('package.json');
|
|
855
|
-
* console.log('File size:', stats.size, 'bytes');
|
|
856
|
-
* console.log('Modified:', stats.mtime);
|
|
857
|
-
* console.log('Is directory:', stats.isDirectory());
|
|
858
|
-
*/
|
|
859
|
-
$stats(p) {
|
|
860
|
-
return fs.statSync(this.$resolve(p));
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Retrieves the size of a file in bytes, providing a direct way to check file dimensions.
|
|
864
|
-
* This method is optimized for files and returns the raw byte count for precise size calculations.
|
|
865
|
-
*
|
|
866
|
-
* @param {string} p - The path of the file to get the size for.
|
|
867
|
-
* @returns {number} The size of the file in bytes.
|
|
868
|
-
* @throws {Error} If the path does not exist, is not a file, or cannot be accessed.
|
|
869
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
870
|
-
* @example
|
|
871
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
872
|
-
* const fileSize = fs.$size('bundle.js');
|
|
873
|
-
* console.log(`Bundle size: ${fileSize} bytes`);
|
|
874
|
-
* if (fileSize > 1024 * 1024) {
|
|
875
|
-
* console.log('Warning: Bundle exceeds 1MB');
|
|
876
|
-
* }
|
|
877
|
-
*/
|
|
878
|
-
$size(p) {
|
|
879
|
-
return this.$stats(p).size;
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* Converts a file's size to a human-readable format with appropriate units (B, KB, MB, GB, TB).
|
|
883
|
-
* This method provides user-friendly size representations for display purposes or logging.
|
|
884
|
-
*
|
|
885
|
-
* @param {string} p - The path of the file to get the human-readable size for.
|
|
886
|
-
* @returns {string} The file size formatted as a string with appropriate units (e.g., "1.5 MB").
|
|
887
|
-
* @throws {Error} If the path does not exist, is not a file, or cannot be accessed.
|
|
888
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
889
|
-
* @example
|
|
890
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
891
|
-
* const readableSize = fs.$sizeHuman('large-dataset.json');
|
|
892
|
-
* console.log(`Dataset size: ${readableSize}`);
|
|
893
|
-
* // Output: "Dataset size: 45.2 MB"
|
|
894
|
-
*/
|
|
895
|
-
$sizeHuman(p) {
|
|
896
|
-
const bytes = this.$size(p);
|
|
897
|
-
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
898
|
-
let size = bytes;
|
|
899
|
-
let unitIndex = 0;
|
|
900
|
-
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
901
|
-
size /= 1024;
|
|
902
|
-
unitIndex++;
|
|
903
|
-
}
|
|
904
|
-
return `${size.toFixed(2)} ${units[unitIndex]}`;
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* Calculates the total size of a directory by recursively summing the sizes of all files within it.
|
|
908
|
-
* This method provides comprehensive directory size analysis for storage management and optimization.
|
|
909
|
-
*
|
|
910
|
-
* @param {string} p - The path of the directory to calculate the total size for.
|
|
911
|
-
* @returns {number} The total size of the directory in bytes, including all nested files.
|
|
912
|
-
* @throws {Error} If the directory does not exist or cannot be accessed.
|
|
913
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
914
|
-
* @example
|
|
915
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
916
|
-
* const totalSize = fs.$sizeDir('node_modules');
|
|
917
|
-
* console.log(`Node modules size: ${Math.round(totalSize / 1024 / 1024)} MB`);
|
|
918
|
-
* // Useful for monitoring project bloat or cache sizes
|
|
919
|
-
*/
|
|
920
|
-
$sizeDir(p) {
|
|
921
|
-
const fullPath = this.$resolve(p);
|
|
922
|
-
let totalSize = 0;
|
|
923
|
-
const walk = (dir) => {
|
|
924
|
-
const items = fs.readdirSync(dir);
|
|
925
|
-
for (const item of items) {
|
|
926
|
-
const itemPath = path.join(dir, item);
|
|
927
|
-
const stat = fs.statSync(itemPath);
|
|
928
|
-
if (stat.isDirectory()) {
|
|
929
|
-
walk(itemPath);
|
|
930
|
-
}
|
|
931
|
-
else {
|
|
932
|
-
totalSize += stat.size;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
walk(fullPath);
|
|
937
|
-
return totalSize;
|
|
938
|
-
}
|
|
939
|
-
/**
|
|
940
|
-
* Retrieves the creation timestamp of a file or directory, indicating when it was first created on the file system.
|
|
941
|
-
* This timestamp represents the initial creation time and may differ from modification time.
|
|
942
|
-
*
|
|
943
|
-
* @param {string} p - The path of the file or directory to get the creation time for.
|
|
944
|
-
* @returns {Date} A Date object representing the creation time of the file system entry.
|
|
945
|
-
* @throws {Error} If the path does not exist or cannot be accessed.
|
|
946
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
947
|
-
* @example
|
|
948
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
949
|
-
* const created = fs.$createdAt('important-document.pdf');
|
|
950
|
-
* console.log(`Document was created on: ${created.toLocaleDateString()}`);
|
|
951
|
-
* // Useful for tracking file origins or implementing retention policies
|
|
952
|
-
*/
|
|
953
|
-
$createdAt(p) {
|
|
954
|
-
return this.$stats(p).birthtime;
|
|
955
|
-
}
|
|
956
|
-
/**
|
|
957
|
-
* Retrieves the last modification timestamp of a file or directory, indicating when its content was last changed.
|
|
958
|
-
* This timestamp is crucial for build systems, caching mechanisms, and change detection algorithms.
|
|
959
|
-
*
|
|
960
|
-
* @param {string} p - The path of the file or directory to get the modification time for.
|
|
961
|
-
* @returns {Date} A Date object representing the last modification time of the file system entry.
|
|
962
|
-
* @throws {Error} If the path does not exist or cannot be accessed.
|
|
963
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
964
|
-
* @example
|
|
965
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
966
|
-
* const modified = fs.$modifiedAt('src/index.ts');
|
|
967
|
-
* const now = new Date();
|
|
968
|
-
* const hoursSinceModified = (now - modified) / (1000 * 60 * 60);
|
|
969
|
-
* if (hoursSinceModified > 24) {
|
|
970
|
-
* console.log('File hasn\'t been modified in over a day');
|
|
971
|
-
* }
|
|
972
|
-
*/
|
|
973
|
-
$modifiedAt(p) {
|
|
974
|
-
return this.$stats(p).mtime;
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* Retrieves the last access timestamp of a file or directory, indicating when it was last read or accessed.
|
|
978
|
-
* This timestamp is useful for understanding usage patterns, implementing LRU caches, or identifying stale files.
|
|
979
|
-
*
|
|
980
|
-
* @param {string} p - The path of the file or directory to get the access time for.
|
|
981
|
-
* @returns {Date} A Date object representing the last access time of the file system entry.
|
|
982
|
-
* @throws {Error} If the path does not exist or cannot be accessed.
|
|
983
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
984
|
-
* @example
|
|
985
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
986
|
-
* const accessed = fs.$accessedAt('config/settings.json');
|
|
987
|
-
* const daysSinceAccess = (Date.now() - accessed.getTime()) / (1000 * 60 * 60 * 24);
|
|
988
|
-
* if (daysSinceAccess > 30) {
|
|
989
|
-
* console.log('Configuration file hasn\'t been accessed in over a month');
|
|
990
|
-
* }
|
|
991
|
-
*/
|
|
992
|
-
$accessedAt(p) {
|
|
993
|
-
return this.$stats(p).atime;
|
|
994
|
-
}
|
|
995
|
-
// ========== COMPARISON & SEARCH ==========
|
|
996
|
-
/**
|
|
997
|
-
* Compares the content of two files to determine if they are identical byte-for-byte.
|
|
998
|
-
* This method is essential for duplicate detection, integrity verification, and change tracking.
|
|
999
|
-
*
|
|
1000
|
-
* @param {string} path1 - The path of the first file to compare.
|
|
1001
|
-
* @param {string} path2 - The path of the second file to compare.
|
|
1002
|
-
* @returns {boolean} True if both files exist and have identical content, false otherwise.
|
|
1003
|
-
* @throws {TypeError} If either path is not a string.
|
|
1004
|
-
* @example
|
|
1005
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1006
|
-
* const identical = fs.$isSameContent('config/production.json', 'config/staging.json');
|
|
1007
|
-
* if (identical) {
|
|
1008
|
-
* console.log('Configuration files are synchronized');
|
|
1009
|
-
* } else {
|
|
1010
|
-
* console.log('Configuration files differ - review changes');
|
|
1011
|
-
* }
|
|
1012
|
-
*/
|
|
1013
|
-
$isSameContent(path1, path2) {
|
|
1014
|
-
if (!this.$isFile(path1) || !this.$isFile(path2))
|
|
1015
|
-
return false;
|
|
1016
|
-
const content1 = this.$readFile(path1);
|
|
1017
|
-
const content2 = this.$readFile(path2);
|
|
1018
|
-
return content1.toString() === content2.toString();
|
|
1019
|
-
}
|
|
1020
|
-
/**
|
|
1021
|
-
* Determines if the first file has been modified more recently than the second file.
|
|
1022
|
-
* This method is crucial for build systems, dependency checking, and incremental processing workflows.
|
|
1023
|
-
*
|
|
1024
|
-
* @param {string} path1 - The path of the first file to compare.
|
|
1025
|
-
* @param {string} path2 - The path of the second file to compare.
|
|
1026
|
-
* @returns {boolean} True if the first file is newer (modified more recently) than the second file.
|
|
1027
|
-
* @throws {Error} If either file does not exist.
|
|
1028
|
-
* @throws {TypeError} If either path is not a string.
|
|
1029
|
-
* @example
|
|
1030
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1031
|
-
* if (fs.$isNewer('src/index.ts', 'dist/bundle.js')) {
|
|
1032
|
-
* console.log('Source has been modified - rebuild needed');
|
|
1033
|
-
* // Trigger build process
|
|
1034
|
-
* } else {
|
|
1035
|
-
* console.log('Build is up to date');
|
|
1036
|
-
* }
|
|
1037
|
-
*/
|
|
1038
|
-
$isNewer(path1, path2) {
|
|
1039
|
-
return this.$modifiedAt(path1) > this.$modifiedAt(path2);
|
|
1040
|
-
}
|
|
1041
|
-
/**
|
|
1042
|
-
* Determines if the first file has been modified less recently than the second file.
|
|
1043
|
-
* This method complements $isNewer and is useful for identifying outdated files or cache invalidation.
|
|
1044
|
-
*
|
|
1045
|
-
* @param {string} path1 - The path of the first file to compare.
|
|
1046
|
-
* @param {string} path2 - The path of the second file to compare.
|
|
1047
|
-
* @returns {boolean} True if the first file is older (modified less recently) than the second file.
|
|
1048
|
-
* @throws {Error} If either file does not exist.
|
|
1049
|
-
* @throws {TypeError} If either path is not a string.
|
|
1050
|
-
* @example
|
|
1051
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1052
|
-
* if (fs.$isOlder('dist/bundle.js', 'src/index.ts')) {
|
|
1053
|
-
* console.log('Bundle is outdated - source has been modified');
|
|
1054
|
-
* // Trigger rebuild
|
|
1055
|
-
* } else {
|
|
1056
|
-
* console.log('Bundle is current');
|
|
1057
|
-
* }
|
|
1058
|
-
*/
|
|
1059
|
-
$isOlder(path1, path2) {
|
|
1060
|
-
return this.$modifiedAt(path1) < this.$modifiedAt(path2);
|
|
1061
|
-
}
|
|
1062
|
-
/**
|
|
1063
|
-
* Performs a recursive search through a directory tree to find all files containing the specified text.
|
|
1064
|
-
* This method is powerful for code analysis, configuration validation, and content discovery across project structures.
|
|
1065
|
-
*
|
|
1066
|
-
* @param {string} dir - The root directory path to search in.
|
|
1067
|
-
* @param {string} searchText - The text string to search for within files.
|
|
1068
|
-
* @returns {string[]} An array of relative file paths that contain the search text.
|
|
1069
|
-
* @throws {Error} If the directory does not exist or cannot be read.
|
|
1070
|
-
* @throws {TypeError} If the directory path or search text is not a string.
|
|
1071
|
-
* @example
|
|
1072
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1073
|
-
* const filesWithTodo = fs.$searchInFiles('src', 'TODO');
|
|
1074
|
-
* console.log(`Found ${filesWithTodo.length} files with TODO comments:`);
|
|
1075
|
-
* filesWithTodo.forEach(file => console.log(` - ${file}`));
|
|
1076
|
-
*
|
|
1077
|
-
* // Search for configuration references
|
|
1078
|
-
* const configRefs = fs.$searchInFiles('.', 'process.env.');
|
|
1079
|
-
* console.log('Files using environment variables:', configRefs);
|
|
1080
|
-
*/
|
|
1081
|
-
$searchInFiles(dir, searchText) {
|
|
1082
|
-
const matches = [];
|
|
1083
|
-
const files = this.$lsRecursive(dir, (file) => this.$isFile(file));
|
|
1084
|
-
for (const file of files) {
|
|
1085
|
-
try {
|
|
1086
|
-
const content = this.$readFile(file, "utf8");
|
|
1087
|
-
if (content.includes(searchText)) {
|
|
1088
|
-
matches.push(file);
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
catch {
|
|
1092
|
-
// Skip files that can't be read as text
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
return matches;
|
|
1096
|
-
}
|
|
1097
|
-
// ========== ADVANCED UTILITIES ==========
|
|
1098
|
-
/**
|
|
1099
|
-
* Generates a unique filename by appending a numerical counter if the original filename already exists.
|
|
1100
|
-
* This method ensures file operations won't overwrite existing files by automatically finding an available name.
|
|
1101
|
-
*
|
|
1102
|
-
* @param {string} p - The desired filename path.
|
|
1103
|
-
* @returns {string} A unique filename path that doesn't conflict with existing files.
|
|
1104
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
1105
|
-
* @example
|
|
1106
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1107
|
-
* const uniqueName = fs.$uniqueFilename('backup.json');
|
|
1108
|
-
* console.log(`Using filename: ${uniqueName}`);
|
|
1109
|
-
* // If 'backup.json' exists, returns 'backup (1).json'
|
|
1110
|
-
* // If 'backup (1).json' also exists, returns 'backup (2).json', etc.
|
|
1111
|
-
*/
|
|
1112
|
-
$uniqueFilename(p) {
|
|
1113
|
-
if (!this.$exists(p))
|
|
1114
|
-
return p;
|
|
1115
|
-
const parsed = path.parse(this.$resolve(p));
|
|
1116
|
-
let counter = 1;
|
|
1117
|
-
let newPath;
|
|
1118
|
-
do {
|
|
1119
|
-
const newName = `${parsed.name} (${counter})${parsed.ext}`;
|
|
1120
|
-
newPath = path.join(parsed.dir, newName);
|
|
1121
|
-
counter++;
|
|
1122
|
-
} while (fs.existsSync(newPath));
|
|
1123
|
-
return path.relative(this.sys.__root__, newPath);
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Creates a unique temporary directory with an optional prefix, ensuring no naming conflicts.
|
|
1127
|
-
* This method is ideal for temporary workspaces, build processes, or any scenario requiring isolated directory operations.
|
|
1128
|
-
*
|
|
1129
|
-
* @param {string} [prefix='tmp-'] - The prefix to use for the temporary directory name.
|
|
1130
|
-
* @returns {string} The relative path of the newly created temporary directory.
|
|
1131
|
-
* @throws {Error} If the temporary directory cannot be created.
|
|
1132
|
-
* @throws {TypeError} If the prefix is provided but not a string.
|
|
1133
|
-
* @example
|
|
1134
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1135
|
-
* const tempDir = fs.$mkdtemp('build-');
|
|
1136
|
-
* console.log(`Created temporary directory: ${tempDir}`);
|
|
1137
|
-
* // Creates something like 'build-abc123def' and returns its relative path
|
|
1138
|
-
*
|
|
1139
|
-
* // Use for temporary processing
|
|
1140
|
-
* fs.$writeFile(`${tempDir}/data.txt`, 'temporary data');
|
|
1141
|
-
* // ... process files ...
|
|
1142
|
-
* fs.$rm(tempDir); // Clean up when done
|
|
1143
|
-
*/
|
|
1144
|
-
$mkdtemp(prefix = "tmp-") {
|
|
1145
|
-
const tmpDir = fs.mkdtempSync(path.join(this.sys.__root__, prefix));
|
|
1146
|
-
return path.relative(this.sys.__root__, tmpDir);
|
|
1147
|
-
}
|
|
1148
|
-
/**
|
|
1149
|
-
* Reads file content and normalizes line endings to Unix-style (\n) for clipboard compatibility.
|
|
1150
|
-
* This method ensures that copied text maintains consistent formatting across different platforms and applications.
|
|
1151
|
-
*
|
|
1152
|
-
* @param {string} p - The path of the file to read for clipboard use.
|
|
1153
|
-
* @returns {string} The file content with normalized line endings suitable for clipboard operations.
|
|
1154
|
-
* @throws {Error} If the file does not exist or cannot be read.
|
|
1155
|
-
* @throws {TypeError} If the provided path is not a string.
|
|
1156
|
-
* @example
|
|
1157
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1158
|
-
* const clipboardContent = fs.$readForClipboard('README.md');
|
|
1159
|
-
* // Copy to clipboard (platform-specific implementation needed)
|
|
1160
|
-
* // navigator.clipboard.writeText(clipboardContent);
|
|
1161
|
-
*
|
|
1162
|
-
* // Useful for sharing code snippets or documentation
|
|
1163
|
-
*/
|
|
1164
|
-
$readForClipboard(p) {
|
|
1165
|
-
const content = this.$readFile(p, "utf8");
|
|
1166
|
-
return content.replace(/\r\n/g, "\n");
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Sets up a file system watcher to monitor a file or directory for changes, enabling reactive responses to file system events.
|
|
1170
|
-
* This method is essential for live reloading, automated builds, and real-time file synchronization.
|
|
1171
|
-
*
|
|
1172
|
-
* @param {string} p - The path of the file or directory to watch.
|
|
1173
|
-
* @param {(eventType: string, filename: string | null) => void} callback - The function to call when changes occur.
|
|
1174
|
-
* @returns {fs.FSWatcher} The file system watcher instance that can be used to stop watching.
|
|
1175
|
-
* @throws {Error} If the path does not exist or the watcher cannot be established.
|
|
1176
|
-
* @throws {TypeError} If the path is not a string or callback is not a function.
|
|
1177
|
-
* @example
|
|
1178
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1179
|
-
* const watcher = fs.$watch('src', (eventType, filename) => {
|
|
1180
|
-
* console.log(`${eventType} detected on ${filename}`);
|
|
1181
|
-
* if (eventType === 'change') {
|
|
1182
|
-
* // Trigger rebuild or reload
|
|
1183
|
-
* rebuildProject();
|
|
1184
|
-
* }
|
|
1185
|
-
* });
|
|
1186
|
-
*
|
|
1187
|
-
* // Later, stop watching
|
|
1188
|
-
* // watcher.close();
|
|
1189
|
-
*/
|
|
1190
|
-
$watch(p, callback) {
|
|
1191
|
-
return fs.watch(this.$resolve(p), callback);
|
|
1192
|
-
}
|
|
1193
|
-
/**
|
|
1194
|
-
* Applies a processing function to all files in a directory tree recursively, enabling bulk transformations and operations.
|
|
1195
|
-
* This method is powerful for code refactoring, content updates, or applying consistent changes across multiple files.
|
|
1196
|
-
*
|
|
1197
|
-
* @param {string} dir - The root directory path to process files in.
|
|
1198
|
-
* @param {(filePath: string, content: string) => string} processor - The function to apply to each file's content.
|
|
1199
|
-
* @throws {Error} If the directory does not exist or files cannot be processed.
|
|
1200
|
-
* @throws {TypeError} If the directory path is not a string or processor is not a function.
|
|
1201
|
-
* @example
|
|
1202
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1203
|
-
*
|
|
1204
|
-
* // Update copyright notices in all TypeScript files
|
|
1205
|
-
* fs.$batchProcess('src', (filePath, content) => {
|
|
1206
|
-
* if (filePath.endsWith('.ts')) {
|
|
1207
|
-
* return content.replace(/Copyright 2023/g, 'Copyright 2024');
|
|
1208
|
-
* }
|
|
1209
|
-
* return content; // Return unchanged for non-TS files
|
|
1210
|
-
* });
|
|
1211
|
-
*
|
|
1212
|
-
* // Minify all JSON files
|
|
1213
|
-
* fs.$batchProcess('config', (filePath, content) => {
|
|
1214
|
-
* if (filePath.endsWith('.json')) {
|
|
1215
|
-
* return JSON.stringify(JSON.parse(content)); // Remove extra whitespace
|
|
1216
|
-
* }
|
|
1217
|
-
* return content;
|
|
1218
|
-
* });
|
|
1219
|
-
*/
|
|
1220
|
-
$batchProcess(dir, processor) {
|
|
1221
|
-
const files = this.$lsRecursive(dir);
|
|
1222
|
-
for (const file of files) {
|
|
1223
|
-
if (this.$isFile(file)) {
|
|
1224
|
-
try {
|
|
1225
|
-
const content = this.$readFile(file, "utf8");
|
|
1226
|
-
const processed = processor(file, content);
|
|
1227
|
-
this.$writeFile(file, processed);
|
|
1228
|
-
}
|
|
1229
|
-
catch (error) {
|
|
1230
|
-
console.error(`Error processing ${file}:`, error);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
/**
|
|
1236
|
-
* Creates a backup copy of a file or directory by appending a suffix to the original name.
|
|
1237
|
-
* This method provides a simple way to preserve the current state before making potentially destructive changes.
|
|
1238
|
-
*
|
|
1239
|
-
* @param {string} p - The path of the file or directory to back up.
|
|
1240
|
-
* @param {string} [suffix='.backup'] - The suffix to append to create the backup filename.
|
|
1241
|
-
* @returns {string} The relative path of the created backup.
|
|
1242
|
-
* @throws {Error} If the source doesn't exist or the backup cannot be created.
|
|
1243
|
-
* @throws {TypeError} If the path or suffix is not a string.
|
|
1244
|
-
* @example
|
|
1245
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1246
|
-
* const backupPath = fs.$backup('config/database.json');
|
|
1247
|
-
* console.log(`Backup created: ${backupPath}`);
|
|
1248
|
-
* // Creates 'config/database.json.backup'
|
|
1249
|
-
*
|
|
1250
|
-
* // Modify the original file safely
|
|
1251
|
-
* fs.$writeJson('config/database.json', newConfig);
|
|
1252
|
-
* // If something goes wrong, can restore from backup
|
|
1253
|
-
*/
|
|
1254
|
-
$backup(p, suffix = ".backup") {
|
|
1255
|
-
const fullPath = this.$resolve(p);
|
|
1256
|
-
const backupPath = fullPath + suffix;
|
|
1257
|
-
fs.cpSync(fullPath, backupPath, { recursive: true });
|
|
1258
|
-
return path.relative(this.sys.__root__, backupPath);
|
|
1259
|
-
}
|
|
1260
|
-
/**
|
|
1261
|
-
* Restores a file or directory from its backup copy created with the $backup method.
|
|
1262
|
-
* This method provides a reliable way to revert changes by replacing the current file with its backup version.
|
|
1263
|
-
*
|
|
1264
|
-
* @param {string} p - The path of the file or directory to restore.
|
|
1265
|
-
* @param {string} [suffix='.backup'] - The suffix used when creating the backup.
|
|
1266
|
-
* @returns {boolean} True if the restoration was successful, false if no backup was found.
|
|
1267
|
-
* @throws {Error} If the restoration process fails.
|
|
1268
|
-
* @throws {TypeError} If the path or suffix is not a string.
|
|
1269
|
-
* @example
|
|
1270
|
-
* const fs = new XyPrissFS({ __root__: '/home/user/project' });
|
|
1271
|
-
*
|
|
1272
|
-
* // Create a backup first
|
|
1273
|
-
* fs.$backup('config/settings.json');
|
|
1274
|
-
*
|
|
1275
|
-
* // Make changes that might need reverting
|
|
1276
|
-
* fs.$writeJson('config/settings.json', riskyChanges);
|
|
1277
|
-
*
|
|
1278
|
-
* // If something goes wrong, restore from backup
|
|
1279
|
-
* const restored = fs.$restore('config/settings.json');
|
|
1280
|
-
* if (restored) {
|
|
1281
|
-
* console.log('Settings restored from backup');
|
|
1282
|
-
* } else {
|
|
1283
|
-
* console.log('No backup found');
|
|
1284
|
-
* }
|
|
1285
|
-
*/
|
|
1286
|
-
$restore(p, suffix = ".backup") {
|
|
1287
|
-
const backupPath = this.$resolve(p + suffix);
|
|
1288
|
-
if (!fs.existsSync(backupPath))
|
|
1289
|
-
return false;
|
|
1290
|
-
const originalPath = this.$resolve(p);
|
|
1291
|
-
if (fs.existsSync(originalPath)) {
|
|
1292
|
-
fs.rmSync(originalPath, { recursive: true, force: true });
|
|
1293
|
-
}
|
|
1294
|
-
fs.cpSync(backupPath, originalPath, { recursive: true });
|
|
1295
|
-
return true;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
export { XyPrissFS };
|
|
1300
|
-
//# sourceMappingURL=FileSystem.js.map
|