@dyanet/nestjs-config-aws 1.0.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/LICENSE +21 -0
- package/README.md +1183 -0
- package/dist/cjs/config.module.js +178 -0
- package/dist/cjs/config.module.js.map +1 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/integration/index.js +23 -0
- package/dist/cjs/integration/index.js.map +1 -0
- package/dist/cjs/integration/interfaces/configuration-factory.interface.js +3 -0
- package/dist/cjs/integration/interfaces/configuration-factory.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/configuration-source.interface.js +3 -0
- package/dist/cjs/integration/interfaces/configuration-source.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/index.js +26 -0
- package/dist/cjs/integration/interfaces/index.js.map +1 -0
- package/dist/cjs/integration/interfaces/integration-options.interface.js +3 -0
- package/dist/cjs/integration/interfaces/integration-options.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/integration-state.interface.js +3 -0
- package/dist/cjs/integration/interfaces/integration-state.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/nestjs-config-compatibility.interface.js +73 -0
- package/dist/cjs/integration/interfaces/nestjs-config-compatibility.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/nestjs-config-integration.interface.js +3 -0
- package/dist/cjs/integration/interfaces/nestjs-config-integration.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/typed-configuration.interface.js +4 -0
- package/dist/cjs/integration/interfaces/typed-configuration.interface.js.map +1 -0
- package/dist/cjs/integration/interfaces/utility-types.interface.js +52 -0
- package/dist/cjs/integration/interfaces/utility-types.interface.js.map +1 -0
- package/dist/cjs/integration/nestjs-config-integration.module.js +124 -0
- package/dist/cjs/integration/nestjs-config-integration.module.js.map +1 -0
- package/dist/cjs/integration/providers/aws-configuration-loader.service.js +591 -0
- package/dist/cjs/integration/providers/aws-configuration-loader.service.js.map +1 -0
- package/dist/cjs/integration/providers/configuration-factory.provider.js +383 -0
- package/dist/cjs/integration/providers/configuration-factory.provider.js.map +1 -0
- package/dist/cjs/integration/providers/index.js +20 -0
- package/dist/cjs/integration/providers/index.js.map +1 -0
- package/dist/cjs/integration/services/async-config-helper.service.js +356 -0
- package/dist/cjs/integration/services/async-config-helper.service.js.map +1 -0
- package/dist/cjs/integration/services/error-handler.service.js +265 -0
- package/dist/cjs/integration/services/error-handler.service.js.map +1 -0
- package/dist/cjs/integration/services/factory-registration.service.js +512 -0
- package/dist/cjs/integration/services/factory-registration.service.js.map +1 -0
- package/dist/cjs/integration/services/index.js +26 -0
- package/dist/cjs/integration/services/index.js.map +1 -0
- package/dist/cjs/integration/services/integration-state.service.js +83 -0
- package/dist/cjs/integration/services/integration-state.service.js.map +1 -0
- package/dist/cjs/integration/services/namespace-handler.service.js +467 -0
- package/dist/cjs/integration/services/namespace-handler.service.js.map +1 -0
- package/dist/cjs/integration/services/nestjs-config-integration.service.js +316 -0
- package/dist/cjs/integration/services/nestjs-config-integration.service.js.map +1 -0
- package/dist/cjs/integration/services/precedence-handler.service.js +294 -0
- package/dist/cjs/integration/services/precedence-handler.service.js.map +1 -0
- package/dist/cjs/integration/services/validation-integration.service.js +591 -0
- package/dist/cjs/integration/services/validation-integration.service.js.map +1 -0
- package/dist/cjs/integration/utils/config-integration.util.js +283 -0
- package/dist/cjs/integration/utils/config-integration.util.js.map +1 -0
- package/dist/cjs/integration/utils/index.js +19 -0
- package/dist/cjs/integration/utils/index.js.map +1 -0
- package/dist/cjs/interfaces/config-loader.interface.js +3 -0
- package/dist/cjs/interfaces/config-loader.interface.js.map +1 -0
- package/dist/cjs/interfaces/config-service.interface.js +11 -0
- package/dist/cjs/interfaces/config-service.interface.js.map +1 -0
- package/dist/cjs/interfaces/default-schema.interface.js +63 -0
- package/dist/cjs/interfaces/default-schema.interface.js.map +1 -0
- package/dist/cjs/interfaces/errors.interface.js +77 -0
- package/dist/cjs/interfaces/errors.interface.js.map +1 -0
- package/dist/cjs/interfaces/index.js +25 -0
- package/dist/cjs/interfaces/index.js.map +1 -0
- package/dist/cjs/interfaces/module-options.interface.js +3 -0
- package/dist/cjs/interfaces/module-options.interface.js.map +1 -0
- package/dist/cjs/loaders/environment.loader.js +59 -0
- package/dist/cjs/loaders/environment.loader.js.map +1 -0
- package/dist/cjs/loaders/secrets-manager.loader.js +122 -0
- package/dist/cjs/loaders/secrets-manager.loader.js.map +1 -0
- package/dist/cjs/loaders/ssm-parameter-store.loader.js +146 -0
- package/dist/cjs/loaders/ssm-parameter-store.loader.js.map +1 -0
- package/dist/cjs/services/config.service.js +297 -0
- package/dist/cjs/services/config.service.js.map +1 -0
- package/dist/cjs/utils/validation.util.js +114 -0
- package/dist/cjs/utils/validation.util.js.map +1 -0
- package/dist/esm/config.module.js +175 -0
- package/dist/esm/config.module.js.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/integration/index.js +7 -0
- package/dist/esm/integration/index.js.map +1 -0
- package/dist/esm/integration/interfaces/configuration-factory.interface.js +2 -0
- package/dist/esm/integration/interfaces/configuration-factory.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/configuration-source.interface.js +2 -0
- package/dist/esm/integration/interfaces/configuration-source.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/index.js +10 -0
- package/dist/esm/integration/interfaces/index.js.map +1 -0
- package/dist/esm/integration/interfaces/integration-options.interface.js +2 -0
- package/dist/esm/integration/interfaces/integration-options.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/integration-state.interface.js +2 -0
- package/dist/esm/integration/interfaces/integration-state.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/nestjs-config-compatibility.interface.js +64 -0
- package/dist/esm/integration/interfaces/nestjs-config-compatibility.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/nestjs-config-integration.interface.js +2 -0
- package/dist/esm/integration/interfaces/nestjs-config-integration.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/typed-configuration.interface.js +3 -0
- package/dist/esm/integration/interfaces/typed-configuration.interface.js.map +1 -0
- package/dist/esm/integration/interfaces/utility-types.interface.js +44 -0
- package/dist/esm/integration/interfaces/utility-types.interface.js.map +1 -0
- package/dist/esm/integration/nestjs-config-integration.module.js +121 -0
- package/dist/esm/integration/nestjs-config-integration.module.js.map +1 -0
- package/dist/esm/integration/providers/aws-configuration-loader.service.js +588 -0
- package/dist/esm/integration/providers/aws-configuration-loader.service.js.map +1 -0
- package/dist/esm/integration/providers/configuration-factory.provider.js +380 -0
- package/dist/esm/integration/providers/configuration-factory.provider.js.map +1 -0
- package/dist/esm/integration/providers/index.js +4 -0
- package/dist/esm/integration/providers/index.js.map +1 -0
- package/dist/esm/integration/services/async-config-helper.service.js +353 -0
- package/dist/esm/integration/services/async-config-helper.service.js.map +1 -0
- package/dist/esm/integration/services/error-handler.service.js +262 -0
- package/dist/esm/integration/services/error-handler.service.js.map +1 -0
- package/dist/esm/integration/services/factory-registration.service.js +509 -0
- package/dist/esm/integration/services/factory-registration.service.js.map +1 -0
- package/dist/esm/integration/services/index.js +10 -0
- package/dist/esm/integration/services/index.js.map +1 -0
- package/dist/esm/integration/services/integration-state.service.js +80 -0
- package/dist/esm/integration/services/integration-state.service.js.map +1 -0
- package/dist/esm/integration/services/namespace-handler.service.js +464 -0
- package/dist/esm/integration/services/namespace-handler.service.js.map +1 -0
- package/dist/esm/integration/services/nestjs-config-integration.service.js +313 -0
- package/dist/esm/integration/services/nestjs-config-integration.service.js.map +1 -0
- package/dist/esm/integration/services/precedence-handler.service.js +291 -0
- package/dist/esm/integration/services/precedence-handler.service.js.map +1 -0
- package/dist/esm/integration/services/validation-integration.service.js +585 -0
- package/dist/esm/integration/services/validation-integration.service.js.map +1 -0
- package/dist/esm/integration/utils/config-integration.util.js +240 -0
- package/dist/esm/integration/utils/config-integration.util.js.map +1 -0
- package/dist/esm/integration/utils/index.js +3 -0
- package/dist/esm/integration/utils/index.js.map +1 -0
- package/dist/esm/interfaces/config-loader.interface.js +2 -0
- package/dist/esm/interfaces/config-loader.interface.js.map +1 -0
- package/dist/esm/interfaces/config-service.interface.js +7 -0
- package/dist/esm/interfaces/config-service.interface.js.map +1 -0
- package/dist/esm/interfaces/default-schema.interface.js +59 -0
- package/dist/esm/interfaces/default-schema.interface.js.map +1 -0
- package/dist/esm/interfaces/errors.interface.js +69 -0
- package/dist/esm/interfaces/errors.interface.js.map +1 -0
- package/dist/esm/interfaces/index.js +9 -0
- package/dist/esm/interfaces/index.js.map +1 -0
- package/dist/esm/interfaces/module-options.interface.js +2 -0
- package/dist/esm/interfaces/module-options.interface.js.map +1 -0
- package/dist/esm/loaders/environment.loader.js +55 -0
- package/dist/esm/loaders/environment.loader.js.map +1 -0
- package/dist/esm/loaders/secrets-manager.loader.js +118 -0
- package/dist/esm/loaders/secrets-manager.loader.js.map +1 -0
- package/dist/esm/loaders/ssm-parameter-store.loader.js +142 -0
- package/dist/esm/loaders/ssm-parameter-store.loader.js.map +1 -0
- package/dist/esm/services/config.service.js +261 -0
- package/dist/esm/services/config.service.js.map +1 -0
- package/dist/esm/utils/validation.util.js +110 -0
- package/dist/esm/utils/validation.util.js.map +1 -0
- package/dist/types/config.module.d.ts +46 -0
- package/dist/types/config.module.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/integration/index.d.ts +6 -0
- package/dist/types/integration/index.d.ts.map +1 -0
- package/dist/types/integration/interfaces/configuration-factory.interface.d.ts +71 -0
- package/dist/types/integration/interfaces/configuration-factory.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/configuration-source.interface.d.ts +24 -0
- package/dist/types/integration/interfaces/configuration-source.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/index.d.ts +9 -0
- package/dist/types/integration/interfaces/index.d.ts.map +1 -0
- package/dist/types/integration/interfaces/integration-options.interface.d.ts +66 -0
- package/dist/types/integration/interfaces/integration-options.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/integration-state.interface.d.ts +17 -0
- package/dist/types/integration/interfaces/integration-state.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/nestjs-config-compatibility.interface.d.ts +332 -0
- package/dist/types/integration/interfaces/nestjs-config-compatibility.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/nestjs-config-integration.interface.d.ts +259 -0
- package/dist/types/integration/interfaces/nestjs-config-integration.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/typed-configuration.interface.d.ts +209 -0
- package/dist/types/integration/interfaces/typed-configuration.interface.d.ts.map +1 -0
- package/dist/types/integration/interfaces/utility-types.interface.d.ts +249 -0
- package/dist/types/integration/interfaces/utility-types.interface.d.ts.map +1 -0
- package/dist/types/integration/nestjs-config-integration.module.d.ts +36 -0
- package/dist/types/integration/nestjs-config-integration.module.d.ts.map +1 -0
- package/dist/types/integration/providers/aws-configuration-loader.service.d.ts +134 -0
- package/dist/types/integration/providers/aws-configuration-loader.service.d.ts.map +1 -0
- package/dist/types/integration/providers/configuration-factory.provider.d.ts +119 -0
- package/dist/types/integration/providers/configuration-factory.provider.d.ts.map +1 -0
- package/dist/types/integration/providers/index.d.ts +3 -0
- package/dist/types/integration/providers/index.d.ts.map +1 -0
- package/dist/types/integration/services/async-config-helper.service.d.ts +84 -0
- package/dist/types/integration/services/async-config-helper.service.d.ts.map +1 -0
- package/dist/types/integration/services/error-handler.service.d.ts +84 -0
- package/dist/types/integration/services/error-handler.service.d.ts.map +1 -0
- package/dist/types/integration/services/factory-registration.service.d.ts +158 -0
- package/dist/types/integration/services/factory-registration.service.d.ts.map +1 -0
- package/dist/types/integration/services/index.d.ts +9 -0
- package/dist/types/integration/services/index.d.ts.map +1 -0
- package/dist/types/integration/services/integration-state.service.d.ts +41 -0
- package/dist/types/integration/services/integration-state.service.d.ts.map +1 -0
- package/dist/types/integration/services/namespace-handler.service.d.ts +192 -0
- package/dist/types/integration/services/namespace-handler.service.d.ts.map +1 -0
- package/dist/types/integration/services/nestjs-config-integration.service.d.ts +87 -0
- package/dist/types/integration/services/nestjs-config-integration.service.d.ts.map +1 -0
- package/dist/types/integration/services/precedence-handler.service.d.ts +103 -0
- package/dist/types/integration/services/precedence-handler.service.d.ts.map +1 -0
- package/dist/types/integration/services/validation-integration.service.d.ts +222 -0
- package/dist/types/integration/services/validation-integration.service.d.ts.map +1 -0
- package/dist/types/integration/utils/config-integration.util.d.ts +81 -0
- package/dist/types/integration/utils/config-integration.util.d.ts.map +1 -0
- package/dist/types/integration/utils/index.d.ts +2 -0
- package/dist/types/integration/utils/index.d.ts.map +1 -0
- package/dist/types/interfaces/config-loader.interface.d.ts +22 -0
- package/dist/types/interfaces/config-loader.interface.d.ts.map +1 -0
- package/dist/types/interfaces/config-service.interface.d.ts +23 -0
- package/dist/types/interfaces/config-service.interface.d.ts.map +1 -0
- package/dist/types/interfaces/default-schema.interface.d.ts +195 -0
- package/dist/types/interfaces/default-schema.interface.d.ts.map +1 -0
- package/dist/types/interfaces/errors.interface.d.ts +38 -0
- package/dist/types/interfaces/errors.interface.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +6 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/interfaces/module-options.interface.d.ts +64 -0
- package/dist/types/interfaces/module-options.interface.d.ts.map +1 -0
- package/dist/types/loaders/environment.loader.d.ts +26 -0
- package/dist/types/loaders/environment.loader.d.ts.map +1 -0
- package/dist/types/loaders/secrets-manager.loader.d.ts +52 -0
- package/dist/types/loaders/secrets-manager.loader.d.ts.map +1 -0
- package/dist/types/loaders/ssm-parameter-store.loader.d.ts +68 -0
- package/dist/types/loaders/ssm-parameter-store.loader.d.ts.map +1 -0
- package/dist/types/services/config.service.d.ts +94 -0
- package/dist/types/services/config.service.d.ts.map +1 -0
- package/dist/types/utils/validation.util.d.ts +53 -0
- package/dist/types/utils/validation.util.d.ts.map +1 -0
- package/package.json +102 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility types for enhanced TypeScript support in nest-config-aws integration.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Deep readonly type for configuration objects.
|
|
6
|
+
*/
|
|
7
|
+
export type DeepReadonly<T> = {
|
|
8
|
+
readonly [P in keyof T]: T[P] extends (infer U)[] ? DeepReadonlyArray<U> : T[P] extends object ? DeepReadonly<T[P]> : T[P];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Deep readonly array type.
|
|
12
|
+
*/
|
|
13
|
+
export interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Partial deep type for configuration objects.
|
|
17
|
+
*/
|
|
18
|
+
export type PartialDeep<T> = {
|
|
19
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? PartialDeepArray<U> : T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Partial deep array type.
|
|
23
|
+
*/
|
|
24
|
+
export interface PartialDeepArray<T> extends Array<PartialDeep<T>> {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Required deep type for configuration objects.
|
|
28
|
+
*/
|
|
29
|
+
export type RequiredDeep<T> = {
|
|
30
|
+
[P in keyof T]-?: T[P] extends (infer U)[] ? RequiredDeepArray<U> : T[P] extends object ? RequiredDeep<T[P]> : T[P];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Required deep array type.
|
|
34
|
+
*/
|
|
35
|
+
export interface RequiredDeepArray<T> extends Array<RequiredDeep<T>> {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Configuration path type for dot notation access.
|
|
39
|
+
*/
|
|
40
|
+
export type ConfigPath<T, K extends keyof T = keyof T> = K extends string ? T[K] extends Record<string, any> ? `${K}` | `${K}.${ConfigPath<T[K]>}` : `${K}` : never;
|
|
41
|
+
/**
|
|
42
|
+
* Configuration value type for a given path.
|
|
43
|
+
*/
|
|
44
|
+
export type ConfigValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? ConfigValue<T[K], Rest> : never : P extends keyof T ? T[P] : never;
|
|
45
|
+
/**
|
|
46
|
+
* AWS configuration source union type.
|
|
47
|
+
*/
|
|
48
|
+
export type AwsConfigSource = 'secrets-manager' | 'ssm';
|
|
49
|
+
/**
|
|
50
|
+
* Local configuration source union type.
|
|
51
|
+
*/
|
|
52
|
+
export type LocalConfigSource = 'environment' | 'local-file';
|
|
53
|
+
/**
|
|
54
|
+
* All configuration source union type.
|
|
55
|
+
*/
|
|
56
|
+
export type AllConfigSource = AwsConfigSource | LocalConfigSource;
|
|
57
|
+
/**
|
|
58
|
+
* Configuration source metadata.
|
|
59
|
+
*/
|
|
60
|
+
export type ConfigSourceMetadata<T extends AllConfigSource> = {
|
|
61
|
+
source: T;
|
|
62
|
+
isAws: T extends AwsConfigSource ? true : false;
|
|
63
|
+
priority: number;
|
|
64
|
+
loadedAt: Date;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Configuration with source metadata.
|
|
68
|
+
*/
|
|
69
|
+
export type ConfigWithSource<T, S extends AllConfigSource> = T & {
|
|
70
|
+
__metadata: ConfigSourceMetadata<S>;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Extract configuration type from a configuration factory.
|
|
74
|
+
*/
|
|
75
|
+
export type ExtractConfig<T> = T extends () => infer U ? U : never;
|
|
76
|
+
/**
|
|
77
|
+
* Configuration factory map type.
|
|
78
|
+
*/
|
|
79
|
+
export type ConfigFactoryMap = Record<string, () => any>;
|
|
80
|
+
/**
|
|
81
|
+
* Extract all configuration types from a factory map.
|
|
82
|
+
*/
|
|
83
|
+
export type ExtractConfigMap<T extends ConfigFactoryMap> = {
|
|
84
|
+
[K in keyof T]: ExtractConfig<T[K]>;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Namespace configuration type.
|
|
88
|
+
*/
|
|
89
|
+
export type NamespaceConfig<T extends Record<string, any>> = {
|
|
90
|
+
[K in keyof T]: T[K];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Multi-namespace configuration type.
|
|
94
|
+
*/
|
|
95
|
+
export type MultiNamespaceConfig<T extends Record<string, Record<string, any>>> = {
|
|
96
|
+
[K in keyof T]: NamespaceConfig<T[K]>;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Configuration validation result.
|
|
100
|
+
*/
|
|
101
|
+
export type ValidationResult<T = any> = {
|
|
102
|
+
isValid: boolean;
|
|
103
|
+
data?: T;
|
|
104
|
+
errors: string[];
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Async configuration validation result.
|
|
108
|
+
*/
|
|
109
|
+
export type AsyncValidationResult<T = any> = Promise<ValidationResult<T>>;
|
|
110
|
+
/**
|
|
111
|
+
* Configuration transformer function type.
|
|
112
|
+
*/
|
|
113
|
+
export type ConfigTransformerFn<TInput, TOutput> = (input: TInput) => TOutput;
|
|
114
|
+
/**
|
|
115
|
+
* Async configuration transformer function type.
|
|
116
|
+
*/
|
|
117
|
+
export type AsyncConfigTransformerFn<TInput, TOutput> = (input: TInput) => Promise<TOutput>;
|
|
118
|
+
/**
|
|
119
|
+
* Configuration predicate function type.
|
|
120
|
+
*/
|
|
121
|
+
export type ConfigPredicate<T> = (config: T) => boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Async configuration predicate function type.
|
|
124
|
+
*/
|
|
125
|
+
export type AsyncConfigPredicate<T> = (config: T) => Promise<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Configuration key extractor type.
|
|
128
|
+
*/
|
|
129
|
+
export type ConfigKeyExtractor<T> = (config: T) => string[];
|
|
130
|
+
/**
|
|
131
|
+
* Configuration value extractor type.
|
|
132
|
+
*/
|
|
133
|
+
export type ConfigValueExtractor<T, U> = (config: T, key: string) => U | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Configuration merger function type.
|
|
136
|
+
*/
|
|
137
|
+
export type ConfigMerger<T> = (primary: T, secondary: T) => T;
|
|
138
|
+
/**
|
|
139
|
+
* Configuration serializer function type.
|
|
140
|
+
*/
|
|
141
|
+
export type ConfigSerializer<T> = (config: T) => string;
|
|
142
|
+
/**
|
|
143
|
+
* Configuration deserializer function type.
|
|
144
|
+
*/
|
|
145
|
+
export type ConfigDeserializer<T> = (serialized: string) => T;
|
|
146
|
+
/**
|
|
147
|
+
* Configuration cache key generator type.
|
|
148
|
+
*/
|
|
149
|
+
export type CacheKeyGenerator<T> = (config: T) => string;
|
|
150
|
+
/**
|
|
151
|
+
* Configuration cache entry type.
|
|
152
|
+
*/
|
|
153
|
+
export type CacheEntry<T> = {
|
|
154
|
+
key: string;
|
|
155
|
+
value: T;
|
|
156
|
+
timestamp: Date;
|
|
157
|
+
ttl?: number;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Configuration cache type.
|
|
161
|
+
*/
|
|
162
|
+
export type ConfigCache<T> = Map<string, CacheEntry<T>>;
|
|
163
|
+
/**
|
|
164
|
+
* Configuration event type.
|
|
165
|
+
*/
|
|
166
|
+
export type ConfigEventType = 'loaded' | 'updated' | 'error' | 'validated';
|
|
167
|
+
/**
|
|
168
|
+
* Configuration event handler type.
|
|
169
|
+
*/
|
|
170
|
+
export type ConfigEventHandler<T = any> = (event: ConfigEventType, data: T) => void;
|
|
171
|
+
/**
|
|
172
|
+
* Async configuration event handler type.
|
|
173
|
+
*/
|
|
174
|
+
export type AsyncConfigEventHandler<T = any> = (event: ConfigEventType, data: T) => Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* Configuration watcher type.
|
|
177
|
+
*/
|
|
178
|
+
export type ConfigWatcher<T> = {
|
|
179
|
+
watch: (handler: ConfigEventHandler<T>) => void;
|
|
180
|
+
unwatch: (handler: ConfigEventHandler<T>) => void;
|
|
181
|
+
stop: () => void;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Configuration builder pattern interface.
|
|
185
|
+
*/
|
|
186
|
+
export interface ConfigBuilder<T> {
|
|
187
|
+
/**
|
|
188
|
+
* Add a configuration source.
|
|
189
|
+
*/
|
|
190
|
+
addSource(source: AllConfigSource, config: any): ConfigBuilder<T>;
|
|
191
|
+
/**
|
|
192
|
+
* Set precedence rule.
|
|
193
|
+
*/
|
|
194
|
+
setPrecedence(rule: 'aws-first' | 'local-first' | 'merge'): ConfigBuilder<T>;
|
|
195
|
+
/**
|
|
196
|
+
* Add namespace.
|
|
197
|
+
*/
|
|
198
|
+
addNamespace(namespace: string): ConfigBuilder<T>;
|
|
199
|
+
/**
|
|
200
|
+
* Add validation.
|
|
201
|
+
*/
|
|
202
|
+
addValidation(validator: (config: any) => boolean): ConfigBuilder<T>;
|
|
203
|
+
/**
|
|
204
|
+
* Build the configuration.
|
|
205
|
+
*/
|
|
206
|
+
build(): T;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Configuration fluent API interface.
|
|
210
|
+
*/
|
|
211
|
+
export interface ConfigFluentAPI<T> {
|
|
212
|
+
/**
|
|
213
|
+
* Filter configuration by predicate.
|
|
214
|
+
*/
|
|
215
|
+
filter(predicate: ConfigPredicate<T>): ConfigFluentAPI<T>;
|
|
216
|
+
/**
|
|
217
|
+
* Transform configuration.
|
|
218
|
+
*/
|
|
219
|
+
map<U>(transformer: ConfigTransformerFn<T, U>): ConfigFluentAPI<U>;
|
|
220
|
+
/**
|
|
221
|
+
* Validate configuration.
|
|
222
|
+
*/
|
|
223
|
+
validate(validator: ConfigPredicate<T>): ConfigFluentAPI<T>;
|
|
224
|
+
/**
|
|
225
|
+
* Get the final configuration.
|
|
226
|
+
*/
|
|
227
|
+
get(): T;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Type guard for AWS configuration sources.
|
|
231
|
+
*/
|
|
232
|
+
export declare const isAwsSource: (source: AllConfigSource) => source is AwsConfigSource;
|
|
233
|
+
/**
|
|
234
|
+
* Type guard for local configuration sources.
|
|
235
|
+
*/
|
|
236
|
+
export declare const isLocalSource: (source: AllConfigSource) => source is LocalConfigSource;
|
|
237
|
+
/**
|
|
238
|
+
* Type guard for configuration with metadata.
|
|
239
|
+
*/
|
|
240
|
+
export declare const hasMetadata: <T, S extends AllConfigSource>(config: any) => config is ConfigWithSource<T, S>;
|
|
241
|
+
/**
|
|
242
|
+
* Type guard for validation result.
|
|
243
|
+
*/
|
|
244
|
+
export declare const isValidationResult: <T>(result: any) => result is ValidationResult<T>;
|
|
245
|
+
/**
|
|
246
|
+
* Type guard for cache entry.
|
|
247
|
+
*/
|
|
248
|
+
export declare const isCacheEntry: <T>(entry: any) => entry is CacheEntry<T>;
|
|
249
|
+
//# sourceMappingURL=utility-types.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-types.interface.d.ts","sourceRoot":"","sources":["../../../../src/integration/interfaces/utility-types.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC7C,iBAAiB,CAAC,CAAC,CAAC,GACpB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACnB,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAClB,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAAG;AAE/E;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACrC,gBAAg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GAAI,QAAQ,eAAe,KAAG,MAAM,IAAI,iBAEjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,SAAS,eAAe,EACtD,QAAQ,GAAG,KACV,MAAM,IAAI,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAEjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,QAAQ,GAAG,KAAG,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAS/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,OAAO,GAAG,KAAG,KAAK,IAAI,UAAU,CAAC,CAAC,CASjE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { IntegrationOptions, AsyncIntegrationOptions } from './interfaces/integration-options.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Token for injecting integration options
|
|
5
|
+
*/
|
|
6
|
+
export declare const NESTJS_CONFIG_AWS_INTEGRATION_OPTIONS = "NESTJS_CONFIG_AWS_INTEGRATION_OPTIONS";
|
|
7
|
+
/**
|
|
8
|
+
* NestJS module for integrating nestjs-config-aws with @nestjs/config.
|
|
9
|
+
* This module provides AWS-sourced configuration values to the standard @nestjs/config module.
|
|
10
|
+
*/
|
|
11
|
+
export declare class NestConfigAwsIntegrationModule {
|
|
12
|
+
/**
|
|
13
|
+
* Create a synchronous integration module with provided options.
|
|
14
|
+
*
|
|
15
|
+
* @param options - Integration options for the module
|
|
16
|
+
* @returns Dynamic module configuration
|
|
17
|
+
*/
|
|
18
|
+
static forRoot(options?: IntegrationOptions): DynamicModule;
|
|
19
|
+
/**
|
|
20
|
+
* Create an asynchronous integration module with factory-based options.
|
|
21
|
+
* Useful when integration options depend on other services or async operations.
|
|
22
|
+
*
|
|
23
|
+
* @param options - Async integration options with factory function
|
|
24
|
+
* @returns Dynamic module configuration
|
|
25
|
+
*/
|
|
26
|
+
static forRootAsync(options: AsyncIntegrationOptions): DynamicModule;
|
|
27
|
+
/**
|
|
28
|
+
* Create the standard providers for the integration module.
|
|
29
|
+
*/
|
|
30
|
+
private static createProviders;
|
|
31
|
+
/**
|
|
32
|
+
* Create providers for asynchronous module registration.
|
|
33
|
+
*/
|
|
34
|
+
private static createAsyncProviders;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=nestjs-config-integration.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestjs-config-integration.module.d.ts","sourceRoot":"","sources":["../../../src/integration/nestjs-config-integration.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAWzG;;GAEG;AACH,eAAO,MAAM,qCAAqC,0CAA0C,CAAC;AAE7F;;;GAGG;AACH,qBAEa,8BAA8B;IACzC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,kBAAuB,GAAG,aAAa;IA0B/D;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAyBpE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAc9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;CASpC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { IntegrationOptions } from '../interfaces/integration-options.interface';
|
|
2
|
+
import { ConfigurationSource } from '../interfaces/configuration-source.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Service for loading configuration from AWS sources for integration with @nestjs/config.
|
|
5
|
+
* Uses existing AWS loaders to fetch configuration and provides namespace-aware loading capabilities.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AwsConfigurationLoaderService {
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly loaders;
|
|
10
|
+
private readonly options;
|
|
11
|
+
private readonly errorHandler;
|
|
12
|
+
constructor(options?: IntegrationOptions);
|
|
13
|
+
/**
|
|
14
|
+
* Load configuration from AWS sources.
|
|
15
|
+
* @returns Promise resolving to configuration data
|
|
16
|
+
*/
|
|
17
|
+
loadConfiguration(): Promise<Record<string, any>>;
|
|
18
|
+
/**
|
|
19
|
+
* Load configuration for specific namespaces from AWS sources.
|
|
20
|
+
* @param namespaces - Array of namespace names to load
|
|
21
|
+
* @returns Promise resolving to namespaced configuration data
|
|
22
|
+
*/
|
|
23
|
+
loadNamespacedConfiguration(namespaces: string[]): Promise<Record<string, Record<string, any>>>;
|
|
24
|
+
/**
|
|
25
|
+
* Check if AWS services are available.
|
|
26
|
+
* @returns Promise resolving to availability status
|
|
27
|
+
*/
|
|
28
|
+
isAvailable(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Get all available configuration sources with their metadata.
|
|
31
|
+
* @returns Promise resolving to array of configuration sources
|
|
32
|
+
*/
|
|
33
|
+
getAvailableSources(): Promise<ConfigurationSource[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Create configuration loaders based on integration options.
|
|
36
|
+
* @returns Array of configuration loaders
|
|
37
|
+
*/
|
|
38
|
+
private createLoaders;
|
|
39
|
+
/**
|
|
40
|
+
* Get the source type for a given loader.
|
|
41
|
+
* @param loader - The configuration loader
|
|
42
|
+
* @returns The configuration source type
|
|
43
|
+
*/
|
|
44
|
+
private getSourceType;
|
|
45
|
+
/**
|
|
46
|
+
* Get the priority for a given loader based on precedence rules.
|
|
47
|
+
* @param loader - The configuration loader
|
|
48
|
+
* @returns The priority number (higher = higher priority)
|
|
49
|
+
*/
|
|
50
|
+
private getSourcePriority;
|
|
51
|
+
/**
|
|
52
|
+
* Extract configuration for a specific namespace from loaded configuration.
|
|
53
|
+
* @param config - The loaded configuration
|
|
54
|
+
* @param namespace - The namespace to extract
|
|
55
|
+
* @returns Configuration values for the namespace
|
|
56
|
+
*/
|
|
57
|
+
private extractNamespaceConfig;
|
|
58
|
+
/**
|
|
59
|
+
* Extract nested namespace configuration from hierarchical keys.
|
|
60
|
+
* @param config - The loaded configuration
|
|
61
|
+
* @param namespace - The namespace to extract
|
|
62
|
+
* @returns Configuration values for the namespace
|
|
63
|
+
*/
|
|
64
|
+
private extractNestedNamespaceConfig;
|
|
65
|
+
/**
|
|
66
|
+
* Convert snake_case or kebab-case to camelCase.
|
|
67
|
+
* @param str - String to convert
|
|
68
|
+
* @returns camelCase string
|
|
69
|
+
*/
|
|
70
|
+
private toCamelCase;
|
|
71
|
+
/**
|
|
72
|
+
* Convert path segments to nested key structure.
|
|
73
|
+
* @param path - Path string (e.g., "host/port")
|
|
74
|
+
* @returns Nested key structure
|
|
75
|
+
*/
|
|
76
|
+
private pathToNestedKey;
|
|
77
|
+
/**
|
|
78
|
+
* Set a nested value in an object using dot notation.
|
|
79
|
+
* @param obj - Target object
|
|
80
|
+
* @param path - Dot notation path
|
|
81
|
+
* @param value - Value to set
|
|
82
|
+
*/
|
|
83
|
+
private setNestedValue;
|
|
84
|
+
/**
|
|
85
|
+
* Get the Secrets Manager path based on configuration.
|
|
86
|
+
* @returns The secrets manager path
|
|
87
|
+
*/
|
|
88
|
+
private getSecretsManagerPath;
|
|
89
|
+
/**
|
|
90
|
+
* Get the SSM Parameter Store path based on configuration.
|
|
91
|
+
* @returns The SSM parameter path
|
|
92
|
+
*/
|
|
93
|
+
private getSSMParameterPath;
|
|
94
|
+
/**
|
|
95
|
+
* Check if an error is an AWS service error.
|
|
96
|
+
* @param error - The error to check
|
|
97
|
+
* @returns Whether the error is from an AWS service
|
|
98
|
+
*/
|
|
99
|
+
private isAwsServiceError;
|
|
100
|
+
/**
|
|
101
|
+
* Handle AWS-specific errors with appropriate strategies.
|
|
102
|
+
* @param loader - The loader that encountered the error
|
|
103
|
+
* @param error - The AWS error
|
|
104
|
+
* @returns Whether to continue processing
|
|
105
|
+
*/
|
|
106
|
+
private handleAwsSpecificError;
|
|
107
|
+
/**
|
|
108
|
+
* Get the service name for a loader.
|
|
109
|
+
* @param loader - The configuration loader
|
|
110
|
+
* @returns The service name
|
|
111
|
+
*/
|
|
112
|
+
private getServiceName;
|
|
113
|
+
/**
|
|
114
|
+
* Get the resource name for a loader.
|
|
115
|
+
* @param loader - The configuration loader
|
|
116
|
+
* @returns The resource name
|
|
117
|
+
*/
|
|
118
|
+
private getResourceName;
|
|
119
|
+
/**
|
|
120
|
+
* Load configuration with retry logic for retryable errors.
|
|
121
|
+
* @param loader - The configuration loader
|
|
122
|
+
* @param maxRetries - Maximum number of retries
|
|
123
|
+
* @returns Promise resolving to configuration data
|
|
124
|
+
*/
|
|
125
|
+
private loadWithRetry;
|
|
126
|
+
/**
|
|
127
|
+
* Check availability with timeout and error handling.
|
|
128
|
+
* @param loader - The configuration loader
|
|
129
|
+
* @param timeoutMs - Timeout in milliseconds
|
|
130
|
+
* @returns Promise resolving to availability status
|
|
131
|
+
*/
|
|
132
|
+
private checkAvailabilityWithTimeout;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=aws-configuration-loader.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-configuration-loader.service.d.ts","sourceRoot":"","sources":["../../../../src/integration/providers/aws-configuration-loader.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAA2B,MAAM,8CAA8C,CAAC;AAI5G;;;GAGG;AACH,qBACa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkD;IACzE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;gBAGN,OAAO,CAAC,EAAE,kBAAkB;IAOzE;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAkFvD;;;;OAIG;IACG,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IA+ErG;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IA6BrC;;;OAGG;IACG,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAsC3D;;;OAGG;IACH,OAAO,CAAC,aAAa;IA8BrB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAYrB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAqBzB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAgC9B;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAsBpC;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAMnB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAOvB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAoBtB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAU7B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IA0C9B;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAYtB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;YACW,aAAa;IA2B3B;;;;;OAKG;YACW,4BAA4B;CAmB3C"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ConfigFactory } from '@nestjs/config';
|
|
2
|
+
import { ConfigurationFactoryProvider, AwsConfigurationFactory } from '../interfaces/configuration-factory.interface';
|
|
3
|
+
import { ConfigurationSource } from '../interfaces/configuration-source.interface';
|
|
4
|
+
import { PrecedenceRule, IntegrationOptions } from '../interfaces/integration-options.interface';
|
|
5
|
+
import { PrecedenceHandlerService } from '../services/precedence-handler.service';
|
|
6
|
+
/**
|
|
7
|
+
* Implementation of ConfigurationFactoryProvider that creates configuration factories
|
|
8
|
+
* for @nestjs/config integration with AWS configuration sources.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ConfigurationFactoryProviderImpl implements ConfigurationFactoryProvider {
|
|
11
|
+
private readonly precedenceHandler;
|
|
12
|
+
private readonly options?;
|
|
13
|
+
private readonly logger;
|
|
14
|
+
constructor(precedenceHandler: PrecedenceHandlerService, options?: IntegrationOptions | undefined);
|
|
15
|
+
/**
|
|
16
|
+
* Create a configuration factory for a specific namespace.
|
|
17
|
+
* @param namespace - The namespace for the configuration
|
|
18
|
+
* @param config - The configuration data
|
|
19
|
+
* @returns A configuration factory that can be used with @nestjs/config
|
|
20
|
+
*/
|
|
21
|
+
createFactory(namespace: string, config: Record<string, any>): ConfigFactory;
|
|
22
|
+
/**
|
|
23
|
+
* Create multiple namespaced configuration factories from a configuration object.
|
|
24
|
+
* @param config - The configuration data organized by namespace
|
|
25
|
+
* @returns Array of configuration factories
|
|
26
|
+
*/
|
|
27
|
+
createNamespacedFactories(config: Record<string, any>): ConfigFactory[];
|
|
28
|
+
/**
|
|
29
|
+
* Merge AWS configuration with existing local configuration using precedence rules.
|
|
30
|
+
* @param awsConfig - Configuration loaded from AWS sources
|
|
31
|
+
* @param localConfig - Local configuration data
|
|
32
|
+
* @returns Merged configuration data
|
|
33
|
+
*/
|
|
34
|
+
mergeWithExisting(awsConfig: Record<string, any>, localConfig: Record<string, any>): Record<string, any>;
|
|
35
|
+
/**
|
|
36
|
+
* Create an enhanced AWS configuration factory with metadata.
|
|
37
|
+
* @param namespace - Optional namespace for the configuration
|
|
38
|
+
* @param config - The configuration data
|
|
39
|
+
* @param sources - Sources that contributed to this configuration
|
|
40
|
+
* @param precedenceRule - Precedence rule applied to this configuration
|
|
41
|
+
* @returns Enhanced AWS configuration factory
|
|
42
|
+
*/
|
|
43
|
+
createAwsConfigurationFactory(namespace: string | undefined, config: Record<string, any>, sources: ConfigurationSource[], precedenceRule: PrecedenceRule): AwsConfigurationFactory;
|
|
44
|
+
/**
|
|
45
|
+
* Create configuration factories from multiple sources with proper organization.
|
|
46
|
+
* @param sourceConfigs - Map of source name to configuration data
|
|
47
|
+
* @param namespaces - Optional list of namespaces to organize configuration
|
|
48
|
+
* @returns Array of configuration factories organized by namespace
|
|
49
|
+
*/
|
|
50
|
+
createFactoriesFromSources(sourceConfigs: Map<string, Record<string, any>>, namespaces?: string[]): ConfigFactory[];
|
|
51
|
+
/**
|
|
52
|
+
* Create configuration factories from sources with precedence rules.
|
|
53
|
+
* @param sources - Array of configuration sources
|
|
54
|
+
* @param precedenceRule - Precedence rule to apply
|
|
55
|
+
* @param namespaces - Optional list of namespaces to organize configuration
|
|
56
|
+
* @returns Array of configuration factories
|
|
57
|
+
*/
|
|
58
|
+
createFactoriesWithPrecedence(sources: ConfigurationSource[], precedenceRule: PrecedenceRule, namespaces?: string[]): ConfigFactory[];
|
|
59
|
+
/**
|
|
60
|
+
* Merge configuration with explicit precedence rule.
|
|
61
|
+
* @param sources - Configuration sources
|
|
62
|
+
* @param precedenceRule - Precedence rule to apply
|
|
63
|
+
* @returns Merged configuration data
|
|
64
|
+
*/
|
|
65
|
+
mergeWithPrecedence(sources: ConfigurationSource[], precedenceRule: PrecedenceRule): Record<string, any>;
|
|
66
|
+
/**
|
|
67
|
+
* Process configuration values to handle special cases and transformations.
|
|
68
|
+
* @param config - Raw configuration object
|
|
69
|
+
* @returns Processed configuration object
|
|
70
|
+
*/
|
|
71
|
+
private processConfigurationValues;
|
|
72
|
+
/**
|
|
73
|
+
* Process individual configuration values.
|
|
74
|
+
* @param value - The value to process
|
|
75
|
+
* @returns Processed value
|
|
76
|
+
*/
|
|
77
|
+
private processValue;
|
|
78
|
+
/**
|
|
79
|
+
* Convert string values to appropriate types.
|
|
80
|
+
* @param value - String value to convert
|
|
81
|
+
* @returns Converted value
|
|
82
|
+
*/
|
|
83
|
+
private convertStringValue;
|
|
84
|
+
/**
|
|
85
|
+
* Validate if a namespace configuration is valid.
|
|
86
|
+
* @param namespace - The namespace name
|
|
87
|
+
* @param config - The configuration data
|
|
88
|
+
* @returns True if valid, false otherwise
|
|
89
|
+
*/
|
|
90
|
+
private isValidNamespaceConfig;
|
|
91
|
+
/**
|
|
92
|
+
* Deep merge two configuration objects.
|
|
93
|
+
* @param target - Target object
|
|
94
|
+
* @param source - Source object
|
|
95
|
+
* @returns Merged object
|
|
96
|
+
*/
|
|
97
|
+
private deepMerge;
|
|
98
|
+
/**
|
|
99
|
+
* Extract configuration for a specific namespace from multiple sources.
|
|
100
|
+
* @param sourceConfigs - Map of source configurations
|
|
101
|
+
* @param namespace - Target namespace
|
|
102
|
+
* @returns Configuration for the namespace
|
|
103
|
+
*/
|
|
104
|
+
private extractNamespaceConfig;
|
|
105
|
+
/**
|
|
106
|
+
* Merge configuration from multiple sources.
|
|
107
|
+
* @param sourceConfigs - Map of source configurations
|
|
108
|
+
* @returns Merged configuration
|
|
109
|
+
*/
|
|
110
|
+
private mergeSourceConfigs;
|
|
111
|
+
/**
|
|
112
|
+
* Extract sources for a specific namespace.
|
|
113
|
+
* @param sources - All configuration sources
|
|
114
|
+
* @param namespace - Target namespace
|
|
115
|
+
* @returns Sources filtered for the namespace
|
|
116
|
+
*/
|
|
117
|
+
private extractNamespaceSources;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=configuration-factory.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-factory.provider.d.ts","sourceRoot":"","sources":["../../../../src/integration/providers/configuration-factory.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAc,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACtH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE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AE,GACpB,aAAa,EAAE;IAiClB;;;;;OAKG;IACH,mBAAmB,CACjB,OAAO,EAAE,mBAAmB,EAAE,EAC9B,cAAc,EAAE,cAAc,GAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAYtB;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAuBpB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IA8B1B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAkBjB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAgB9B;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;CAmBhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integration/providers/index.ts"],"names":[],"mappings":"AACA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ConfigFactory, ConfigModuleOptions } from '@nestjs/config';
|
|
2
|
+
import { FactoryRegistrationService } from './factory-registration.service';
|
|
3
|
+
import { IntegrationOptions } from '../interfaces/integration-options.interface';
|
|
4
|
+
/**
|
|
5
|
+
* Helper service for async configuration support with @nestjs/config.
|
|
6
|
+
* This service provides utilities for creating async configuration factories
|
|
7
|
+
* and managing dependency injection in async scenarios.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AsyncConfigHelperService {
|
|
10
|
+
private readonly factoryRegistrationService;
|
|
11
|
+
private readonly options;
|
|
12
|
+
private readonly logger;
|
|
13
|
+
constructor(factoryRegistrationService: FactoryRegistrationService, options?: IntegrationOptions);
|
|
14
|
+
/**
|
|
15
|
+
* Create an async configuration factory that loads AWS configuration.
|
|
16
|
+
* This factory can be used with @nestjs/config's load array.
|
|
17
|
+
*
|
|
18
|
+
* @returns Promise resolving to configuration factory
|
|
19
|
+
*/
|
|
20
|
+
createAsyncConfigFactory(): Promise<ConfigFactory>;
|
|
21
|
+
/**
|
|
22
|
+
* Create multiple async configuration factories for namespaces.
|
|
23
|
+
* This method creates separate factories for each namespace.
|
|
24
|
+
*
|
|
25
|
+
* @param namespaces - Array of namespace names
|
|
26
|
+
* @returns Promise resolving to array of namespaced configuration factories
|
|
27
|
+
*/
|
|
28
|
+
createAsyncNamespacedFactories(namespaces: string[]): Promise<ConfigFactory[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Create an async factory function that can be used with dependency injection.
|
|
31
|
+
* This method creates a factory that can receive injected dependencies.
|
|
32
|
+
*
|
|
33
|
+
* @param dependencies - Array of dependency tokens to inject
|
|
34
|
+
* @returns Async factory function
|
|
35
|
+
*/
|
|
36
|
+
createAsyncFactoryWithDependencies(dependencies?: any[]): (...args: any[]) => Promise<ConfigModuleOptions>;
|
|
37
|
+
/**
|
|
38
|
+
* Create an async factory that merges with existing configuration.
|
|
39
|
+
* This method creates a factory that can be combined with other configuration sources.
|
|
40
|
+
*
|
|
41
|
+
* @param existingFactory - Existing configuration factory to merge with
|
|
42
|
+
* @returns Promise resolving to merged configuration factory
|
|
43
|
+
*/
|
|
44
|
+
createMergedAsyncFactory(existingFactory?: ConfigFactory): Promise<ConfigFactory>;
|
|
45
|
+
/**
|
|
46
|
+
* Create configuration options for async module setup.
|
|
47
|
+
* This method creates options that can be used with ConfigModule.forRoot().
|
|
48
|
+
*
|
|
49
|
+
* @param baseOptions - Base configuration options to enhance
|
|
50
|
+
* @returns Promise resolving to enhanced configuration options
|
|
51
|
+
*/
|
|
52
|
+
createAsyncConfigOptions(baseOptions?: ConfigModuleOptions): Promise<ConfigModuleOptions>;
|
|
53
|
+
/**
|
|
54
|
+
* Check if AWS configuration is available for async loading.
|
|
55
|
+
* This method can be used to determine if AWS integration should be enabled.
|
|
56
|
+
*
|
|
57
|
+
* @returns Promise resolving to availability status
|
|
58
|
+
*/
|
|
59
|
+
checkAsyncAvailability(): Promise<{
|
|
60
|
+
isAvailable: boolean;
|
|
61
|
+
factoriesCount: number;
|
|
62
|
+
errors: string[];
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Create a factory that loads configuration on-demand.
|
|
66
|
+
* This factory delays AWS configuration loading until it's actually needed.
|
|
67
|
+
*
|
|
68
|
+
* @returns Configuration factory with lazy loading
|
|
69
|
+
*/
|
|
70
|
+
createLazyAsyncFactory(): ConfigFactory;
|
|
71
|
+
/**
|
|
72
|
+
* Load configuration lazily for the lazy factory.
|
|
73
|
+
* @returns Promise resolving to configuration data
|
|
74
|
+
*/
|
|
75
|
+
private loadConfigurationLazily;
|
|
76
|
+
/**
|
|
77
|
+
* Deep merge two configuration objects.
|
|
78
|
+
* @param target - Target object
|
|
79
|
+
* @param source - Source object
|
|
80
|
+
* @returns Merged object
|
|
81
|
+
*/
|
|
82
|
+
private deepMerge;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=async-config-helper.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-config-helper.service.d.ts","sourceRoot":"","sources":["../../../../src/integration/services/async-config-helper.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAGjF;;;;GAIG;AACH,qBACa,wBAAwB;IAIjC,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAE3C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;gBAGjD,0BAA0B,EAAE,0BAA0B,EAEtD,OAAO,GAAE,kBAAuB;IAGnD;;;;;OAKG;IACG,wBAAwB,IAAI,OAAO,CAAC,aAAa,CAAC;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