Something went wrong. Try again.
Frosted AT Protocol SDK for Dart with tasty lexicon fillings
Something went wrong. Try again.
README.md
Configuration Management System #
This directory contains configuration files for the bin scripts optimization system.
Configuration Files #
script_config.json #
The main configuration file that defines default settings for all scripts.
Environment-Specific Configurations #
script_config_development.json- Development environment overridesscript_config_production.json- Production environment overrides
Configuration Structure #
{
"lexiconsPath": "lexicons",
"packagesPath": "packages",
"binPath": "bin",
"packageMappings": {
"package_name": "relative/path/to/package"
},
"networkConfig": {
"maxRetries": 3,
"initialDelayMs": 1000,
"backoffMultiplier": 2.0,
"timeoutMs": 30000,
"maxConcurrentConnections": 10
},
"loggingConfig": {
"level": "info",
"includeTimestamp": true,
"includeLocation": false,
"logFile": null
},
"maxParallelOperations": 4,
"enableCaching": true,
"cacheDirectory": ".dart_tool/scripts_cache"
}
Environment Variable Overrides #
You can override configuration values using environment variables:
SCRIPT_LEXICONS_PATH- Override lexicons pathSCRIPT_PACKAGES_PATH- Override packages pathSCRIPT_BIN_PATH- Override bin pathSCRIPT_MAX_RETRIES- Override network max retriesSCRIPT_INITIAL_DELAY_MS- Override network initial delaySCRIPT_BACKOFF_MULTIPLIER- Override network backoff multiplierSCRIPT_TIMEOUT_MS- Override network timeoutSCRIPT_MAX_CONNECTIONS- Override max concurrent connectionsSCRIPT_LOG_LEVEL- Override log level (debug, info, warning, error)SCRIPT_LOG_TIMESTAMP- Override timestamp inclusion (true/false)SCRIPT_LOG_LOCATION- Override location inclusion (true/false)SCRIPT_LOG_FILE- Override log file pathSCRIPT_MAX_PARALLEL- Override max parallel operationsSCRIPT_ENABLE_CACHE- Override caching (true/false)SCRIPT_CACHE_DIR- Override cache directory
Usage in Scripts #
import 'shared/shared.dart';
Future<void> main() async {
// Load default configuration
final config = await ConfigLoader.load();
// Load with environment-specific overrides
final devConfig = await ConfigLoader.load(environment: 'development');
// Load from custom path
final customConfig = await ConfigLoader.load(configPath: 'custom_config.json');
}
Configuration Validation #
The system automatically validates:
- Required paths exist
- Numeric values are within valid ranges
- Log levels are valid
- Network configuration is sensible
- Cache directory can be created
Validation errors are reported with clear, actionable messages.