Tags: enums/Helios
Tags
Remove deprecated config backward compatibility Breaking changes: - Removed HeliosConfig, ServerConfig deprecated types - Removed flat-key fallbacks (hostname, mysql_host, redis_host, etc.) - Only nested config format supported (environment.host, mysql.host, etc.) - Removed asLegacyConfig() bridge and HeliosConfigLoader.load() deprecated method - Removed HeliosAppConfig.typed property
feat: redesign Config system with phased bootstrap, framework-agnosti… …c schema, and typed resource keys (#31) * feat(config): P0 - phase-based setup (#30) Add BootstrapPhase enum (7 phases) and BootstrapConfig with presets (.default, .minimal, .webOnly, .workerOnly). HeliosApp.setup() now gates each infrastructure step behind isEnabled() checks. Factory create() forwards optional bootstrapConfig parameter. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P1 - config schema separation (#30) Introduce HeliosRuntimeConfig (framework-agnostic: mysql/redis optional) backed by EnvironmentConfig and DefaultRuntimeConfigLoader. Deprecate HeliosConfig/ServerConfig; keep MySQLConfig/RedisConfig/FeatureFlags. HeliosAppConfig exposes runtime: HeliosRuntimeConfig as primary property. HeliosConfigLoader gains loadRuntime(configDir:) as preferred new API. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P2 - ConfigSource abstraction (#30) Add ConfigSource enum (.file, .env, .inline, .override) and ConfigSourceLoader. HeliosConfigLoader.loadRuntime(sources:configDir:) enables loading from an explicit ordered list. Backward-compat load(configDir:) preserved with @available(deprecated). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P3 - ResourceConfig with typed keys (#30) Add ResourceKey enum (.workspace, .public_, .resources, .views, .config, .custom(_:)) and ResourceConfig mapping typed keys to path strings. Supports requiredKeys validation for fail-fast startup. Wired into HeliosRuntimeConfig.resources and HeliosAppConfig.patchResources(). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P4 - ExtensionConfig registry (#30) Add ExtensionConfig registry for enable/disable control of framework plugins. Each ExtensionDescriptor carries key, enabled flag, kind (ExtensionKind), and optional JSONValue config. JSONValue provides type-safe, Sendable, Codable JSON representation used across config and extension subsystems. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * test(config): update tests and fixtures for P0-P4 (#30) Update ConfigTests.swift with comprehensive new tests for all P-levels: BootstrapConfig presets, EnvironmentConfig, HeliosRuntimeConfig validation, ConfigSource loading, ResourceConfig, ExtensionConfig, and HeliosAppConfig runtime path. Update TestHeliosApp fixture and IntegrationTests for new API. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor: remove legacy build/validate from HeliosConfigLoader per review feedback * fix: handle legacy flat config keys (mysql_host, redis_host) when no mysql/redis section * test(config): BootstrapWiringTests for phase-aware setup and P0-P4 wiring Tests that HeliosApp.setup() properly skips disabled phases, that ResourceConfig.validate() fires in prepareResources, that ExtensionConfig filtering works in registerExtensions, and that the runtimeConfig factory works end-to-end without disk loading. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: address review feedback - loader schema, resource validation, extension config parsing - Fix DefaultRuntimeConfigLoader to correctly parse resources.paths and resources.requiredKeys (Codable schema), with flat shorthand fallback - Fix extensions parsing to support both { descriptors: [...] } and flat array shorthand, and preserve ExtensionDescriptor.config field - Add resources.validate() call inside HeliosRuntimeConfig.validate() so requiredKeys is a real fail-fast rule, not just a type-level promise - Add anyToJSONValue helper for converting JSONSerialization output * fix(test): use custom key for resource validation test (patchResources auto-fills well-known keys) * test: add end-to-end loader tests for resources, extensions, and validation paths * style: fix SwiftLint violations - identifier names, function body length, line length - Split buildRuntimeConfig into focused sub-methods (environment, bootstrap, resources, extensions, mysql, redis, features) - Rename short variable names (ws, rt, wp, r, d, b, i, s, a, o, kv) to descriptive names throughout - Fix line length violations (all lines <= 120 chars) * style: rename public_ to publicDir for SwiftLint identifier_name compliance * fix: resolve SwiftLint identifier_name, line_length, and type_body_length violations (#30) * refactor(tests): slim ConfigTests.swift to backward-compat scope only Move new-module unit tests out of ConfigTests.swift into their dedicated test suites. ConfigTests now only covers: - Legacy type defaults (ServerConfig, FeatureFlags, TLSMode, AppEnv) - Legacy HeliosConfigLoader.load() backward compatibility - Validation through the runtime system - asLegacyConfig() bridge - HeliosAppConfig facade (both legacy and runtime initializers) New-module tests remain in: BootstrapPhaseTests, RuntimeConfigTests, ConfigSourceTests, ResourceConfigTests, ExtensionConfigTests. --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
feat: redesign Config system with phased bootstrap, framework-agnosti… …c schema, and typed resource keys (#31) * feat(config): P0 - phase-based setup (#30) Add BootstrapPhase enum (7 phases) and BootstrapConfig with presets (.default, .minimal, .webOnly, .workerOnly). HeliosApp.setup() now gates each infrastructure step behind isEnabled() checks. Factory create() forwards optional bootstrapConfig parameter. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P1 - config schema separation (#30) Introduce HeliosRuntimeConfig (framework-agnostic: mysql/redis optional) backed by EnvironmentConfig and DefaultRuntimeConfigLoader. Deprecate HeliosConfig/ServerConfig; keep MySQLConfig/RedisConfig/FeatureFlags. HeliosAppConfig exposes runtime: HeliosRuntimeConfig as primary property. HeliosConfigLoader gains loadRuntime(configDir:) as preferred new API. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P2 - ConfigSource abstraction (#30) Add ConfigSource enum (.file, .env, .inline, .override) and ConfigSourceLoader. HeliosConfigLoader.loadRuntime(sources:configDir:) enables loading from an explicit ordered list. Backward-compat load(configDir:) preserved with @available(deprecated). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P3 - ResourceConfig with typed keys (#30) Add ResourceKey enum (.workspace, .public_, .resources, .views, .config, .custom(_:)) and ResourceConfig mapping typed keys to path strings. Supports requiredKeys validation for fail-fast startup. Wired into HeliosRuntimeConfig.resources and HeliosAppConfig.patchResources(). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * feat(config): P4 - ExtensionConfig registry (#30) Add ExtensionConfig registry for enable/disable control of framework plugins. Each ExtensionDescriptor carries key, enabled flag, kind (ExtensionKind), and optional JSONValue config. JSONValue provides type-safe, Sendable, Codable JSON representation used across config and extension subsystems. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * test(config): update tests and fixtures for P0-P4 (#30) Update ConfigTests.swift with comprehensive new tests for all P-levels: BootstrapConfig presets, EnvironmentConfig, HeliosRuntimeConfig validation, ConfigSource loading, ResourceConfig, ExtensionConfig, and HeliosAppConfig runtime path. Update TestHeliosApp fixture and IntegrationTests for new API. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor: remove legacy build/validate from HeliosConfigLoader per review feedback * fix: handle legacy flat config keys (mysql_host, redis_host) when no mysql/redis section * test(config): BootstrapWiringTests for phase-aware setup and P0-P4 wiring Tests that HeliosApp.setup() properly skips disabled phases, that ResourceConfig.validate() fires in prepareResources, that ExtensionConfig filtering works in registerExtensions, and that the runtimeConfig factory works end-to-end without disk loading. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: address review feedback - loader schema, resource validation, extension config parsing - Fix DefaultRuntimeConfigLoader to correctly parse resources.paths and resources.requiredKeys (Codable schema), with flat shorthand fallback - Fix extensions parsing to support both { descriptors: [...] } and flat array shorthand, and preserve ExtensionDescriptor.config field - Add resources.validate() call inside HeliosRuntimeConfig.validate() so requiredKeys is a real fail-fast rule, not just a type-level promise - Add anyToJSONValue helper for converting JSONSerialization output * fix(test): use custom key for resource validation test (patchResources auto-fills well-known keys) * test: add end-to-end loader tests for resources, extensions, and validation paths * style: fix SwiftLint violations - identifier names, function body length, line length - Split buildRuntimeConfig into focused sub-methods (environment, bootstrap, resources, extensions, mysql, redis, features) - Rename short variable names (ws, rt, wp, r, d, b, i, s, a, o, kv) to descriptive names throughout - Fix line length violations (all lines <= 120 chars) * style: rename public_ to publicDir for SwiftLint identifier_name compliance * fix: resolve SwiftLint identifier_name, line_length, and type_body_length violations (#30) * refactor(tests): slim ConfigTests.swift to backward-compat scope only Move new-module unit tests out of ConfigTests.swift into their dedicated test suites. ConfigTests now only covers: - Legacy type defaults (ServerConfig, FeatureFlags, TLSMode, AppEnv) - Legacy HeliosConfigLoader.load() backward compatibility - Validation through the runtime system - asLegacyConfig() bridge - HeliosAppConfig facade (both legacy and runtime initializers) New-module tests remain in: BootstrapPhaseTests, RuntimeConfigTests, ConfigSourceTests, ResourceConfigTests, ExtensionConfigTests. --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
PreviousNext