@alcyone-labs/arg-parser 2.1.0 → 2.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/dist/config/ConfigurationManager.d.ts +74 -0
- package/dist/config/ConfigurationManager.d.ts.map +1 -0
- package/dist/config/plugins/ConfigPlugin.d.ts +60 -0
- package/dist/config/plugins/ConfigPlugin.d.ts.map +1 -0
- package/dist/config/plugins/ConfigPluginRegistry.d.ts +72 -0
- package/dist/config/plugins/ConfigPluginRegistry.d.ts.map +1 -0
- package/dist/config/plugins/TomlConfigPlugin.d.ts +30 -0
- package/dist/config/plugins/TomlConfigPlugin.d.ts.map +1 -0
- package/dist/config/plugins/YamlConfigPlugin.d.ts +29 -0
- package/dist/config/plugins/YamlConfigPlugin.d.ts.map +1 -0
- package/dist/config/plugins/index.d.ts +5 -0
- package/dist/config/plugins/index.d.ts.map +1 -0
- package/dist/core/ArgParser.d.ts +380 -0
- package/dist/core/ArgParser.d.ts.map +1 -0
- package/dist/core/ArgParserBase.d.ts +206 -0
- package/dist/core/ArgParserBase.d.ts.map +1 -0
- package/dist/core/FlagManager.d.ts +16 -0
- package/dist/core/FlagManager.d.ts.map +1 -0
- package/dist/core/types.d.ts +355 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/dxt/DxtGenerator.d.ts +111 -0
- package/dist/dxt/DxtGenerator.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mcp/ArgParserMcp.d.ts +21 -0
- package/dist/mcp/ArgParserMcp.d.ts.map +1 -0
- package/dist/mcp/mcp-integration.d.ts +86 -0
- package/dist/mcp/mcp-integration.d.ts.map +1 -0
- package/dist/mcp/mcp-notifications.d.ts +138 -0
- package/dist/mcp/mcp-notifications.d.ts.map +1 -0
- package/dist/mcp/mcp-prompts.d.ts +132 -0
- package/dist/mcp/mcp-prompts.d.ts.map +1 -0
- package/dist/mcp/mcp-protocol-versions.d.ts +150 -0
- package/dist/mcp/mcp-protocol-versions.d.ts.map +1 -0
- package/dist/mcp/mcp-resources.d.ts +133 -0
- package/dist/mcp/mcp-resources.d.ts.map +1 -0
- package/dist/testing/fuzzy-test-cli.d.ts +5 -0
- package/dist/testing/fuzzy-test-cli.d.ts.map +1 -0
- package/dist/testing/fuzzy-tester.d.ts +101 -0
- package/dist/testing/fuzzy-tester.d.ts.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ProcessedFlag, TParsedArgs } from "../core/types";
|
|
2
|
+
/**
|
|
3
|
+
* ConfigurationManager handles environment file operations, format conversion,
|
|
4
|
+
* and configuration merging for ArgParser instances.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConfigurationManager {
|
|
7
|
+
private argParserInstance;
|
|
8
|
+
constructor(argParserInstance: any);
|
|
9
|
+
/**
|
|
10
|
+
* Generates a default environment file name based on app configuration
|
|
11
|
+
*/
|
|
12
|
+
generateDefaultEnvFileName(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Handles the --s-save-to-env system flag at the final parser level
|
|
15
|
+
*/
|
|
16
|
+
handleSaveToEnvFlag(processArgs: string[], parserChain: any[]): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Saves current configuration to an environment file
|
|
19
|
+
*/
|
|
20
|
+
saveToEnvFile(filePath: string, _processArgs: string[], parserChain: any[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* Loads configuration from an environment file
|
|
23
|
+
*/
|
|
24
|
+
loadEnvFile(filePath: string, parserChain: any[]): Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* Parses environment file content
|
|
27
|
+
*/
|
|
28
|
+
parseEnvFile(content: string): Record<string, any>;
|
|
29
|
+
/**
|
|
30
|
+
* Parses YAML file content (legacy method - now uses plugin system)
|
|
31
|
+
*/
|
|
32
|
+
parseYamlFile(content: string): Record<string, any>;
|
|
33
|
+
/**
|
|
34
|
+
* Parses JSON file content
|
|
35
|
+
*/
|
|
36
|
+
parseJsonFile(content: string): Record<string, any>;
|
|
37
|
+
/**
|
|
38
|
+
* Parses TOML file content (legacy method - now uses plugin system)
|
|
39
|
+
*/
|
|
40
|
+
parseTomlFile(content: string): Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* Converts raw configuration to flag values with proper type conversion
|
|
43
|
+
*/
|
|
44
|
+
convertConfigToFlagValues(rawConfig: Record<string, any>, parserChain: any[]): Record<string, any>;
|
|
45
|
+
/**
|
|
46
|
+
* Converts a value to the appropriate flag type
|
|
47
|
+
*/
|
|
48
|
+
convertValueToFlagType(value: any, flag: ProcessedFlag): any;
|
|
49
|
+
/**
|
|
50
|
+
* Merges environment configuration with command line arguments
|
|
51
|
+
*/
|
|
52
|
+
mergeEnvConfigWithArgs(envConfig: Record<string, any>, processArgs: string[]): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Generates environment file format
|
|
55
|
+
*/
|
|
56
|
+
generateEnvFormat(flags: ProcessedFlag[], parsedArgs: TParsedArgs<any>): string;
|
|
57
|
+
/**
|
|
58
|
+
* Generates YAML file format (legacy method - now uses plugin system)
|
|
59
|
+
*/
|
|
60
|
+
generateYamlFormat(flags: ProcessedFlag[], parsedArgs: TParsedArgs<any>): string;
|
|
61
|
+
/**
|
|
62
|
+
* Generates JSON file format
|
|
63
|
+
*/
|
|
64
|
+
generateJsonFormat(flags: ProcessedFlag[], parsedArgs: TParsedArgs<any>): string;
|
|
65
|
+
/**
|
|
66
|
+
* Generates TOML file format (legacy method - now uses plugin system)
|
|
67
|
+
*/
|
|
68
|
+
generateTomlFormat(flags: ProcessedFlag[], parsedArgs: TParsedArgs<any>): string;
|
|
69
|
+
/**
|
|
70
|
+
* Gets a string representation of a flag type
|
|
71
|
+
*/
|
|
72
|
+
private getTypeString;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ConfigurationManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationManager.d.ts","sourceRoot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,sBAAsB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IA2B9F;;OAEG;IACI,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM;IA0BtF;;OAEG;IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM;IAmCvF;;OAEG;IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM;IAavF;;OAEG;IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM;IAmCvF;;OAEG;IACH,OAAO,CAAC,aAAa;CAStB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin interface for configuration file format support
|
|
3
|
+
*/
|
|
4
|
+
export interface IConfigPlugin {
|
|
5
|
+
/**
|
|
6
|
+
* File extensions this plugin supports (e.g., ['.toml', '.tml'])
|
|
7
|
+
*/
|
|
8
|
+
readonly supportedExtensions: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Plugin name for identification
|
|
11
|
+
*/
|
|
12
|
+
readonly name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Parse configuration file content
|
|
15
|
+
* @param content File content as string
|
|
16
|
+
* @returns Parsed configuration object
|
|
17
|
+
*/
|
|
18
|
+
parse(content: string): Record<string, any>;
|
|
19
|
+
/**
|
|
20
|
+
* Generate configuration file content
|
|
21
|
+
* @param config Configuration object
|
|
22
|
+
* @param flags Flag definitions for metadata
|
|
23
|
+
* @param parsedArgs Parsed arguments for values
|
|
24
|
+
* @returns Generated file content
|
|
25
|
+
*/
|
|
26
|
+
generate(config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Base class for configuration plugins
|
|
30
|
+
*/
|
|
31
|
+
export declare abstract class ConfigPlugin implements IConfigPlugin {
|
|
32
|
+
abstract readonly supportedExtensions: string[];
|
|
33
|
+
abstract readonly name: string;
|
|
34
|
+
abstract parse(content: string): Record<string, any>;
|
|
35
|
+
abstract generate(config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
36
|
+
/**
|
|
37
|
+
* Check if this plugin supports a given file extension
|
|
38
|
+
*/
|
|
39
|
+
supportsExtension(extension: string): boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Built-in JSON configuration plugin (no external dependencies)
|
|
43
|
+
*/
|
|
44
|
+
export declare class JsonConfigPlugin extends ConfigPlugin {
|
|
45
|
+
readonly supportedExtensions: string[];
|
|
46
|
+
readonly name = "json";
|
|
47
|
+
parse(content: string): Record<string, any>;
|
|
48
|
+
generate(_config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Built-in ENV configuration plugin (no external dependencies)
|
|
52
|
+
*/
|
|
53
|
+
export declare class EnvConfigPlugin extends ConfigPlugin {
|
|
54
|
+
readonly supportedExtensions: string[];
|
|
55
|
+
readonly name = "env";
|
|
56
|
+
parse(content: string): Record<string, any>;
|
|
57
|
+
generate(_config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
58
|
+
private getTypeString;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ConfigPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigPlugin.d.ts","sourceRoot":"","sources":["../../../src/config/plugins/ConfigPlugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAEvC;;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IAEtB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA0B3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM;IAmC7E,OAAO,CAAC,aAAa;CAMtB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { IConfigPlugin } from './ConfigPlugin';
|
|
2
|
+
/**
|
|
3
|
+
* Registry for configuration plugins
|
|
4
|
+
* Manages available config format plugins and provides plugin lookup
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConfigPluginRegistry {
|
|
7
|
+
private plugins;
|
|
8
|
+
private extensionMap;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Register a configuration plugin
|
|
12
|
+
*/
|
|
13
|
+
registerPlugin(plugin: IConfigPlugin): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get plugin by name
|
|
16
|
+
*/
|
|
17
|
+
getPlugin(name: string): IConfigPlugin | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Get plugin by file extension
|
|
20
|
+
*/
|
|
21
|
+
getPluginByExtension(extension: string): IConfigPlugin | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a file extension is supported
|
|
24
|
+
*/
|
|
25
|
+
isExtensionSupported(extension: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get all registered plugin names
|
|
28
|
+
*/
|
|
29
|
+
getRegisteredPlugins(): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Get all supported extensions
|
|
32
|
+
*/
|
|
33
|
+
getSupportedExtensions(): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Unregister a plugin
|
|
36
|
+
*/
|
|
37
|
+
unregisterPlugin(name: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Clear all plugins (useful for testing)
|
|
40
|
+
*/
|
|
41
|
+
clear(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Auto-register optional plugins if their dependencies are available
|
|
44
|
+
* This method attempts to load TOML and YAML plugins without throwing errors
|
|
45
|
+
*/
|
|
46
|
+
autoRegisterOptionalPlugins(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Async version of auto-register optional plugins with ESM support
|
|
49
|
+
* This method attempts to load TOML and YAML plugins without throwing errors
|
|
50
|
+
*/
|
|
51
|
+
autoRegisterOptionalPluginsAsync(): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Global plugin registry instance
|
|
55
|
+
* This can be used throughout the application
|
|
56
|
+
*/
|
|
57
|
+
export declare const globalConfigPluginRegistry: ConfigPluginRegistry;
|
|
58
|
+
/**
|
|
59
|
+
* Convenience function to register optional plugins
|
|
60
|
+
* Call this once at application startup if you want TOML/YAML support
|
|
61
|
+
*/
|
|
62
|
+
export declare function enableOptionalConfigPlugins(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Async convenience function to register optional plugins with ESM support
|
|
65
|
+
* Call this once at application startup if you want TOML/YAML support in ESM environments
|
|
66
|
+
*/
|
|
67
|
+
export declare function enableOptionalConfigPluginsAsync(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Convenience function to register only specific plugins
|
|
70
|
+
*/
|
|
71
|
+
export declare function enableConfigPlugins(pluginNames: string[]): void;
|
|
72
|
+
//# sourceMappingURL=ConfigPluginRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigPluginRegistry.d.ts","sourceRoot":"","sources":["../../../src/config/plugins/ConfigPluginRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,OAAO,CAAyC;IACxD,OAAO,CAAC,YAAY,CAAyC;;IAQ7D;;OAEG;IACI,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IASlD;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIzD;;OAEG;IACI,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIzE;;OAEG;IACI,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIvD;;OAEG;IACI,oBAAoB,IAAI,MAAM,EAAE;IAIvC;;OAEG;IACI,sBAAsB,IAAI,MAAM,EAAE;IAIzC;;OAEG;IACI,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAiB9C;;OAEG;IACI,KAAK,IAAI,IAAI;IAKpB;;;OAGG;IACI,2BAA2B,IAAI,IAAI;IAwB1C;;;OAGG;IACU,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB/D;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,sBAA6B,CAAC;AAErE;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CA+B/D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ConfigPlugin } from './ConfigPlugin';
|
|
2
|
+
/**
|
|
3
|
+
* TOML configuration plugin (requires smol-toml dependency)
|
|
4
|
+
* This plugin is optional and only loaded when TOML support is needed
|
|
5
|
+
*/
|
|
6
|
+
export declare class TomlConfigPlugin extends ConfigPlugin {
|
|
7
|
+
readonly supportedExtensions: string[];
|
|
8
|
+
readonly name = "toml";
|
|
9
|
+
private tomlModule;
|
|
10
|
+
constructor(tomlModule?: any);
|
|
11
|
+
private loadTomlModule;
|
|
12
|
+
parse(content: string): Record<string, any>;
|
|
13
|
+
generate(_config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
14
|
+
/**
|
|
15
|
+
* Simple TOML parsing fallback for basic key-value pairs
|
|
16
|
+
*/
|
|
17
|
+
private parseTomlSimple;
|
|
18
|
+
private getTypeString;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Factory function to create TOML plugin safely
|
|
22
|
+
* Returns null if TOML dependency is not available
|
|
23
|
+
*/
|
|
24
|
+
export declare function createTomlPlugin(): TomlConfigPlugin | null;
|
|
25
|
+
/**
|
|
26
|
+
* Async factory function to create TOML plugin with ESM support
|
|
27
|
+
* Returns null if TOML dependency is not available
|
|
28
|
+
*/
|
|
29
|
+
export declare function createTomlPluginAsync(): Promise<TomlConfigPlugin | null>;
|
|
30
|
+
//# sourceMappingURL=TomlConfigPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TomlConfigPlugin.d.ts","sourceRoot":"","sources":["../../../src/config/plugins/TomlConfigPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,QAAQ,CAAC,mBAAmB,WAAqB;IACjD,QAAQ,CAAC,IAAI,UAAU;IAEvB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,CAAC,EAAE,GAAG;IAS5B,OAAO,CAAC,cAAc;IAkBtB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAiB3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM;IAmD7E;;OAEG;IACH,OAAO,CAAC,eAAe;IA0BvB,OAAO,CAAC,aAAa;CAMtB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,GAAG,IAAI,CAO1D;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmB9E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConfigPlugin } from './ConfigPlugin';
|
|
2
|
+
/**
|
|
3
|
+
* YAML configuration plugin (requires js-yaml dependency)
|
|
4
|
+
* This plugin is optional and only loaded when YAML support is needed
|
|
5
|
+
*/
|
|
6
|
+
export declare class YamlConfigPlugin extends ConfigPlugin {
|
|
7
|
+
readonly supportedExtensions: string[];
|
|
8
|
+
readonly name = "yaml";
|
|
9
|
+
private yamlModule;
|
|
10
|
+
constructor(yamlModule?: any);
|
|
11
|
+
private loadYamlModule;
|
|
12
|
+
parse(content: string): Record<string, any>;
|
|
13
|
+
generate(_config: Record<string, any>, flags: any[], parsedArgs: any): string;
|
|
14
|
+
/**
|
|
15
|
+
* Simple YAML parsing fallback for basic key-value pairs
|
|
16
|
+
*/
|
|
17
|
+
private parseYamlSimple;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Factory function to create YAML plugin safely
|
|
21
|
+
* Returns null if YAML dependency is not available
|
|
22
|
+
*/
|
|
23
|
+
export declare function createYamlPlugin(): YamlConfigPlugin | null;
|
|
24
|
+
/**
|
|
25
|
+
* Async factory function to create YAML plugin with ESM support
|
|
26
|
+
* Returns null if YAML dependency is not available
|
|
27
|
+
*/
|
|
28
|
+
export declare function createYamlPluginAsync(): Promise<YamlConfigPlugin | null>;
|
|
29
|
+
//# sourceMappingURL=YamlConfigPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YamlConfigPlugin.d.ts","sourceRoot":"","sources":["../../../src/config/plugins/YamlConfigPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,QAAQ,CAAC,mBAAmB,WAAqB;IACjD,QAAQ,CAAC,IAAI,UAAU;IAEvB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,CAAC,EAAE,GAAG;IAS5B,OAAO,CAAC,cAAc;IAgBtB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAiB3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM;IA0C7E;;OAEG;IACH,OAAO,CAAC,eAAe;CAyBxB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,GAAG,IAAI,CAO1D;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmB9E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type IConfigPlugin, ConfigPlugin, JsonConfigPlugin, EnvConfigPlugin } from './ConfigPlugin';
|
|
2
|
+
export { ConfigPluginRegistry, globalConfigPluginRegistry, enableOptionalConfigPlugins, enableOptionalConfigPluginsAsync, enableConfigPlugins } from './ConfigPluginRegistry';
|
|
3
|
+
export { TomlConfigPlugin, createTomlPlugin, createTomlPluginAsync } from './TomlConfigPlugin';
|
|
4
|
+
export { YamlConfigPlugin, createYamlPlugin, createYamlPluginAsync } from './YamlConfigPlugin';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/plugins/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
|