1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! Advanced Configuration Providers for SuperConfig
//!
//! SuperConfig includes powerful, enterprise-grade configuration providers that go far beyond basic file loading:
//!
//! ## Provider Overview
//!
//! ### Universal Provider - Smart Format Detection
//! Automatically detects configuration file formats (JSON, TOML, YAML) with intelligent
//! caching and extension fallback for optimal performance.
//!
//! **Key Features:**
//! - **4-Scenario Detection**: Standard files, misnamed files, unknown extensions, auto-extension search
//! - **Performance Optimized**: Content-based detection with modification time caching
//! - **Robust Fallbacks**: Graceful handling of missing or corrupted files
//!
//! **Usage with SuperConfig:**
//! ```rust
//! use superconfig::SuperConfig;
//!
//! let config = SuperConfig::new()
//! .with_file("config"); // Auto-detects format internally
//! ```
//!
//! ### Nested Provider - Advanced Environment Variables
//! Enhanced environment variable parsing with JSON support, automatic nesting,
//! and smart type detection.
//!
//! **Key Features:**
//! - **JSON Parsing**: `APP_FEATURES='["auth", "cache"]'` → `features` array
//! - **Automatic Nesting**: `APP_DATABASE_HOST=localhost` → `database.host`
//! - **Smart Type Detection**: Strings, numbers, booleans, arrays, objects
//! - **Performance Caching**: Optimized parsing with intelligent caching
//!
//! **Usage with SuperConfig:**
//! ```rust
//! use superconfig::SuperConfig;
//!
//! let config = SuperConfig::new()
//! .with_env("APP_"); // Enhanced env parsing built-in
//! ```
//!
//! ### Empty Provider - Clean Configuration
//! Filters out empty values while preserving meaningful falsy values,
//! perfect for CLI argument processing.
//!
//! **Key Features:**
//! - **Smart Filtering**: Removes empty strings, arrays, objects
//! - **Preserves Intent**: Keeps `false`, `0`, and other intentional values
//! - **CLI Integration**: Perfect for filtering meaningless CLI arguments
//!
//! **Usage with SuperConfig:**
//! ```rust
//! use superconfig::SuperConfig;
//! use serde::Serialize;
//!
//! #[derive(Serialize)]
//! struct CliArgs { debug: bool }
//!
//! let config = SuperConfig::new()
//! .with_cli_opt(Some(CliArgs { debug: true })); // Automatic empty filtering
//! ```
//!
//! ### Wildcard Provider - Unified Pattern-Based Discovery
//! Revolutionary unified provider using globset patterns for flexible configuration discovery.
//! Replaces hierarchical and single-directory providers with a single, powerful solution.
//!
//! **Key Features:**
//! - **Any Glob Pattern**: Single directory, hierarchy, recursive - any pattern supported
//! - **Multiple Ordering Strategies**: Alphabetical, size, time, or custom rule-based sorting
//! - **High Performance**: Leverages OS-optimized glob matching and compiled patterns
//! - **Enterprise Ready**: Handles complex multi-source configuration scenarios
//! - **100% Figment Compatible**: Works seamlessly with both Figment and SuperConfig APIs
//!
//! **Usage with SuperConfig:**
//! ```rust
//! use superconfig::{SuperConfig, Wildcard};
//!
//! // Git-style hierarchical discovery (most common)
//! let config = SuperConfig::new()
//! .with_hierarchical_config("myapp"); // Built-in hierarchical loading
//!
//! // Advanced pattern-based discovery
//! let config = SuperConfig::new()
//! .merge(Wildcard::new("./config/*.toml")) // Directory patterns
//! .merge(Wildcard::new("/etc/myapp/**/*.yaml")) // Recursive patterns
//! .merge(Wildcard::new("./plugins/**/config.json")); // Plugin discovery
//!
//! // Multi-source configuration
//! # use serde::Serialize;
//! # #[derive(Serialize)]
//! # struct CliArgs { debug: bool }
//! # let cli_args = Some(CliArgs { debug: true });
//! let config = SuperConfig::new()
//! .merge(Wildcard::hierarchical("config", "myapp")) // Git-style discovery
//! .with_env("MYAPP_") // Environment variables
//! .with_cli_opt(cli_args); // CLI arguments
//! ```
//!
//! ## Performance Characteristics
//!
//! All providers implement optimization strategies:
//! - **Lazy Loading**: Resources loaded only when needed
//! - **Intelligent Caching**: Results cached by modification time and content
//! - **Efficient Parsing**: Single-pass processing with type inference
//! - **Memory Optimized**: Minimal memory footprint for large configurations
// New unified exports
pub use ;
// Existing exports
pub use Nested;
pub use Empty;
pub use Universal;