UNPKG

fortify2-js

Version:

MOST POWERFUL JavaScript Security Library! Military-grade cryptography + 19 enhanced object methods + quantum-resistant algorithms + perfect TypeScript support. More powerful than Lodash with built-in security.

123 lines (119 loc) 3.76 kB
'use strict'; var FileWatcher_config = require('./FileWatcher.config.js'); var types = require('../components/fastapi/console/types.js'); // Default configuration const DEFAULT_OPTIONS = { cache: { strategy: "memory", // Use memory-only by default to avoid Redis dependency ttl: 300000, // 5 minutes enabled: true, memory: { maxSize: 100, algorithm: "lru", }, }, security: { encryption: true, accessMonitoring: true, sanitization: true, auditLogging: false, cors: true, helmet: true, }, performance: { compression: true, batchSize: 100, connectionPooling: true, asyncWrite: true, prefetch: true, // Ultra-performance optimization settings (optimized for ≤7ms targets) optimizationEnabled: true, requestClassification: true, predictivePreloading: true, aggressiveCaching: true, parallelProcessing: true, // RequestPreCompiler optimal settings from testing preCompilerEnabled: true, learningPeriod: 60000, // 1 minute for faster learning optimizationThreshold: 1, // Optimize after just 1 request aggressiveOptimization: true, // Always use aggressive optimization maxCompiledRoutes: 1000, // ExecutionPredictor aggressive settings ultraFastRulesEnabled: true, staticRouteOptimization: true, patternRecognitionEnabled: true, // Cache warming settings cacheWarmupEnabled: true, warmupOnStartup: true, precomputeCommonResponses: true, }, monitoring: { enabled: true, healthChecks: true, metrics: true, detailed: false, alertThresholds: { memoryUsage: 85, hitRate: 0.8, errorRate: 0.02, latency: 50, }, }, server: { enableMiddleware: true, port: 8085, // Default port for a UF Server host: "localhost", trustProxy: false, jsonLimit: "10mb", urlEncodedLimit: "10mb", autoPortSwitch: { enabled: true, maxAttempts: 10, strategy: "random", }, }, fileWatcher: { ...FileWatcher_config.DEFAULT_FW_CONFIG, enabled: false, // Disable file watcher by default to avoid hanging }, logging: { level: "info", components: { server: true, cache: false, // Disable cache logs cluster: true, performance: false, // Disable performance logs fileWatcher: true, plugins: false, // Disable plugin logs security: false, // Disable security warnings monitoring: false, routes: false, middleware: false, userApp: true, // Enable user application console output console: false, // Disable console interception system logs }, types: { startup: true, warnings: true, errors: true, performance: true, debug: true, hotReload: true, portSwitching: true, }, format: { prefix: true, colors: true, compact: false, timestamps: false, }, // Console Interception with Encryption Support consoleInterception: { ...types.DEFAULT_CONSOLE_CONFIG, enabled: false, // Disabled by default (user can enable when needed) preserveOriginal: true, }, }, }; exports.DEFAULT_OPTIONS = DEFAULT_OPTIONS; //# sourceMappingURL=default.js.map