node-env-resolver 4.0.0 → 5.0.0

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.
Files changed (109) hide show
  1. package/README.md +289 -251
  2. package/dist/audit.d.cts +29 -0
  3. package/dist/audit.d.ts +8 -7
  4. package/dist/builder.cjs +1 -1
  5. package/dist/builder.d.cts +149 -0
  6. package/dist/builder.d.ts +17 -14
  7. package/dist/builder.js +1 -1
  8. package/dist/chunk-4YVXFL3I.cjs +9 -0
  9. package/dist/chunk-6FXCXA4R.cjs +11 -0
  10. package/dist/chunk-BFLXBLZ3.cjs +1 -0
  11. package/dist/chunk-BJ2QNYTS.js +11 -0
  12. package/dist/chunk-DIXI6MUB.js +9 -0
  13. package/dist/chunk-P3TTYVEW.js +16 -0
  14. package/dist/chunk-UCLEPPLS.cjs +16 -0
  15. package/dist/chunk-ZMRT37K3.js +1 -0
  16. package/dist/cli.d.cts +52 -0
  17. package/dist/cli.d.ts +9 -6
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.cts +150 -0
  20. package/dist/index.d.ts +86 -77
  21. package/dist/index.js +1 -1
  22. package/dist/resolver.cjs +1 -1
  23. package/dist/resolver.d.cts +20 -0
  24. package/dist/resolver.d.ts +8 -5
  25. package/dist/resolver.js +1 -1
  26. package/dist/resolvers.cjs +1 -1
  27. package/dist/resolvers.d.cts +407 -0
  28. package/dist/resolvers.d.ts +289 -22
  29. package/dist/resolvers.js +1 -1
  30. package/dist/types.cjs +1 -1
  31. package/dist/types.d.cts +74 -0
  32. package/dist/types.d.ts +58 -172
  33. package/dist/types.js +1 -1
  34. package/dist/utils.cjs +1 -1
  35. package/dist/utils.d.cts +213 -0
  36. package/dist/utils.d.ts +28 -26
  37. package/dist/utils.js +1 -1
  38. package/dist/valibot.cjs +1 -1
  39. package/dist/valibot.d.cts +156 -0
  40. package/dist/valibot.d.ts +11 -8
  41. package/dist/valibot.js +1 -1
  42. package/dist/validation-types.d.cts +29 -0
  43. package/dist/validation-types.d.ts +4 -3
  44. package/dist/validators.cjs +2 -1
  45. package/dist/validators.d.cts +116 -0
  46. package/dist/validators.d.ts +46 -18
  47. package/dist/validators.js +2 -1
  48. package/dist/web.cjs +4 -4
  49. package/dist/web.d.cts +69 -0
  50. package/dist/web.d.ts +28 -10
  51. package/dist/web.js +4 -4
  52. package/dist/zod.cjs +1 -1
  53. package/dist/zod.d.cts +135 -0
  54. package/dist/zod.d.ts +11 -8
  55. package/dist/zod.js +1 -1
  56. package/package.json +7 -7
  57. package/dist/advanced-features.test.d.ts +0 -2
  58. package/dist/advanced-features.test.d.ts.map +0 -1
  59. package/dist/audit.d.ts.map +0 -1
  60. package/dist/audit.test.d.ts +0 -2
  61. package/dist/audit.test.d.ts.map +0 -1
  62. package/dist/builder.d.ts.map +0 -1
  63. package/dist/chunk-54OHKWZJ.js +0 -1
  64. package/dist/chunk-FCFDGYTF.cjs +0 -15
  65. package/dist/chunk-HCVTYYLE.js +0 -9
  66. package/dist/chunk-IU5TG3HL.js +0 -15
  67. package/dist/chunk-J7ZHEMRP.js +0 -9
  68. package/dist/chunk-NKPXKLF7.js +0 -1
  69. package/dist/chunk-P3ZWKKKW.cjs +0 -1
  70. package/dist/chunk-THFGEKYL.cjs +0 -9
  71. package/dist/chunk-ULL4WKTV.cjs +0 -9
  72. package/dist/chunk-XPGSWVRT.cjs +0 -1
  73. package/dist/cli.d.ts.map +0 -1
  74. package/dist/cli.test.d.ts +0 -2
  75. package/dist/cli.test.d.ts.map +0 -1
  76. package/dist/composition.test.d.ts +0 -7
  77. package/dist/composition.test.d.ts.map +0 -1
  78. package/dist/computed.test.d.ts +0 -2
  79. package/dist/computed.test.d.ts.map +0 -1
  80. package/dist/index.d.ts.map +0 -1
  81. package/dist/index.test.d.ts +0 -2
  82. package/dist/index.test.d.ts.map +0 -1
  83. package/dist/nested.test.d.ts +0 -2
  84. package/dist/nested.test.d.ts.map +0 -1
  85. package/dist/performance.test.d.ts +0 -7
  86. package/dist/performance.test.d.ts.map +0 -1
  87. package/dist/priority.test.d.ts +0 -6
  88. package/dist/priority.test.d.ts.map +0 -1
  89. package/dist/providers.d.ts +0 -11
  90. package/dist/providers.d.ts.map +0 -1
  91. package/dist/resolver.d.ts.map +0 -1
  92. package/dist/resolvers.d.ts.map +0 -1
  93. package/dist/resolvers.test.d.ts +0 -2
  94. package/dist/resolvers.test.d.ts.map +0 -1
  95. package/dist/sync-resolvers.test.d.ts +0 -2
  96. package/dist/sync-resolvers.test.d.ts.map +0 -1
  97. package/dist/type-inference.test.d.ts +0 -2
  98. package/dist/type-inference.test.d.ts.map +0 -1
  99. package/dist/type-override.test.d.ts +0 -2
  100. package/dist/type-override.test.d.ts.map +0 -1
  101. package/dist/types.d.ts.map +0 -1
  102. package/dist/utils.d.ts.map +0 -1
  103. package/dist/utils.test.d.ts +0 -2
  104. package/dist/utils.test.d.ts.map +0 -1
  105. package/dist/valibot.d.ts.map +0 -1
  106. package/dist/validation-types.d.ts.map +0 -1
  107. package/dist/validators.d.ts.map +0 -1
  108. package/dist/web.d.ts.map +0 -1
  109. package/dist/zod.d.ts.map +0 -1
@@ -1,13 +1,15 @@
1
+ import { Resolver, SyncResolver, Validator } from './types.js';
2
+
1
3
  /**
2
4
  * Built-in resolvers for environment variable resolution
3
5
  */
4
- import type { Resolver, SyncResolver } from './types';
5
- export interface DotenvOptions {
6
+
7
+ interface DotenvOptions {
6
8
  path?: string;
7
9
  expand?: boolean;
8
10
  }
9
- export declare function dotenv(options?: string | DotenvOptions): Resolver;
10
- export declare function processEnv(): SyncResolver;
11
+ declare function dotenv(options?: string | DotenvOptions): Resolver;
12
+ declare function processEnv(): SyncResolver;
11
13
  /**
12
14
  * Load configuration from package.json
13
15
  * Reads version, name, and config fields by default
@@ -20,13 +22,13 @@ export declare function processEnv(): SyncResolver;
20
22
  * import { packageJson } from 'node-env-resolver/resolvers';
21
23
  *
22
24
  * // Loads: VERSION, NAME, CONFIG_* from package.json
23
- * const config = await resolve.async([
25
+ * const config = await resolveAsync([
24
26
  * packageJson(),
25
- * { VERSION: 'string', NAME: 'string' }
27
+ * { VERSION: string(), NAME: string() }
26
28
  * ]);
27
29
  * ```
28
30
  */
29
- export declare function packageJson(options?: {
31
+ declare function packageJson(options?: {
30
32
  path?: string;
31
33
  fields?: string[];
32
34
  }): Resolver;
@@ -43,13 +45,13 @@ export declare function packageJson(options?: {
43
45
  * import { http } from 'node-env-resolver/resolvers';
44
46
  *
45
47
  * // Fetch config from remote endpoint
46
- * const config = await resolve.async([
48
+ * const config = await resolveAsync([
47
49
  * http('https://config.example.com/app.json'),
48
- * { PORT: 3000, API_KEY: 'string' }
50
+ * { PORT: 3000, API_KEY: string() }
49
51
  * ]);
50
52
  * ```
51
53
  */
52
- export declare function http(url: string, options?: RequestInit & {
54
+ declare function http(url: string, options?: RequestInit & {
53
55
  timeout?: number;
54
56
  }): Resolver;
55
57
  /**
@@ -63,12 +65,12 @@ export declare function http(url: string, options?: RequestInit & {
63
65
  * import { resolve } from 'node-env-resolver';
64
66
  * import { json } from 'node-env-resolver/resolvers';
65
67
  *
66
- * const config = await resolve.async(
68
+ * const config = await resolveAsync(
67
69
  * [json('config.json'), { PORT: 3000 }]
68
70
  * );
69
71
  * ```
70
72
  */
71
- export declare function json(path?: string): Resolver;
73
+ declare function json(path?: string): Resolver;
72
74
  /**
73
75
  * Load secrets from a directory (Docker secrets / Kubernetes mounted secrets)
74
76
  * Each file in the directory becomes an environment variable (filename = key, content = value)
@@ -81,17 +83,17 @@ export declare function json(path?: string): Resolver;
81
83
  * import { resolve } from 'node-env-resolver';
82
84
  * import { secrets } from 'node-env-resolver/resolvers';
83
85
  *
84
- * const config = await resolve.async(
85
- * [secrets('/run/secrets'), { DB_PASSWORD: 'string' }]
86
+ * const config = await resolveAsync(
87
+ * [secrets('/run/secrets'), { DB_PASSWORD: string() }]
86
88
  * );
87
89
  * ```
88
90
  */
89
- export declare function secrets(path?: string): Resolver;
91
+ declare function secrets(path?: string): Resolver;
90
92
  /**
91
93
  * YAML configuration file resolver interface
92
94
  * Requires 'js-yaml' as a peer dependency (install separately for tree-shaking)
93
95
  */
94
- export interface YamlOptions {
96
+ interface YamlOptions {
95
97
  path?: string;
96
98
  }
97
99
  /**
@@ -106,17 +108,17 @@ export interface YamlOptions {
106
108
  * import { resolve } from 'node-env-resolver';
107
109
  * import { yaml } from 'node-env-resolver/resolvers';
108
110
  *
109
- * const config = await resolve.async(
111
+ * const config = await resolveAsync(
110
112
  * [yaml('config.yaml'), { PORT: 3000 }]
111
113
  * );
112
114
  * ```
113
115
  */
114
- export declare function yaml(options?: string | YamlOptions): Resolver;
116
+ declare function yaml(options?: string | YamlOptions): Resolver;
115
117
  /**
116
118
  * TOML configuration file resolver interface
117
119
  * Requires 'smol-toml' as a peer dependency (install separately for tree-shaking)
118
120
  */
119
- export interface TomlOptions {
121
+ interface TomlOptions {
120
122
  path?: string;
121
123
  }
122
124
  /**
@@ -131,10 +133,275 @@ export interface TomlOptions {
131
133
  * import { resolve } from 'node-env-resolver';
132
134
  * import { toml } from 'node-env-resolver/resolvers';
133
135
  *
134
- * const config = await resolve.async(
136
+ * const config = await resolveAsync(
135
137
  * [toml('config.toml'), { PORT: 3000 }]
136
138
  * );
137
139
  * ```
138
140
  */
139
- export declare function toml(options?: string | TomlOptions): Resolver;
140
- //# sourceMappingURL=resolvers.d.ts.map
141
+ declare function toml(options?: string | TomlOptions): Resolver;
142
+ declare function string<Opts extends {
143
+ default?: string;
144
+ optional?: boolean;
145
+ min?: number;
146
+ max?: number;
147
+ allowEmpty?: boolean;
148
+ pattern?: string;
149
+ } = Record<string, never>>(opts?: Opts): Opts extends {
150
+ optional: true;
151
+ } ? Validator<string> & {
152
+ optional: true;
153
+ default?: Opts['default'];
154
+ } : Validator<string> & {
155
+ optional?: Opts['optional'];
156
+ default?: Opts['default'];
157
+ };
158
+ declare function number<Opts extends {
159
+ default?: number;
160
+ optional?: boolean;
161
+ min?: number;
162
+ max?: number;
163
+ } = Record<string, never>>(opts?: Opts): Opts extends {
164
+ optional: true;
165
+ } ? Validator<number> & {
166
+ optional: true;
167
+ default?: Opts['default'];
168
+ } : Validator<number> & {
169
+ optional?: Opts['optional'];
170
+ default?: Opts['default'];
171
+ };
172
+ declare function boolean<Opts extends {
173
+ default?: boolean;
174
+ optional?: boolean;
175
+ } = Record<string, never>>(opts?: Opts): Opts extends {
176
+ optional: true;
177
+ } ? Validator<boolean> & {
178
+ optional: true;
179
+ default?: Opts['default'];
180
+ } : Validator<boolean> & {
181
+ optional?: Opts['optional'];
182
+ default?: Opts['default'];
183
+ };
184
+ declare function url<Opts extends {
185
+ default?: string;
186
+ optional?: boolean;
187
+ } = Record<string, never>>(opts?: Opts): Opts extends {
188
+ optional: true;
189
+ } ? Validator<string> & {
190
+ optional: true;
191
+ default?: Opts['default'];
192
+ } : Validator<string> & {
193
+ optional?: Opts['optional'];
194
+ default?: Opts['default'];
195
+ };
196
+ declare function email<Opts extends {
197
+ default?: string;
198
+ optional?: boolean;
199
+ } = Record<string, never>>(opts?: Opts): Opts extends {
200
+ optional: true;
201
+ } ? Validator<string> & {
202
+ optional: true;
203
+ default?: Opts['default'];
204
+ } : Validator<string> & {
205
+ optional?: Opts['optional'];
206
+ default?: Opts['default'];
207
+ };
208
+ declare function port<Opts extends {
209
+ default?: number;
210
+ optional?: boolean;
211
+ } = Record<string, never>>(opts?: Opts): Opts extends {
212
+ optional: true;
213
+ } ? Validator<number> & {
214
+ optional: true;
215
+ default?: Opts['default'];
216
+ } : Validator<number> & {
217
+ optional?: Opts['optional'];
218
+ default?: Opts['default'];
219
+ };
220
+ declare function postgres<Opts extends {
221
+ default?: string;
222
+ optional?: boolean;
223
+ } = Record<string, never>>(opts?: Opts): Opts extends {
224
+ optional: true;
225
+ } ? Validator<string> & {
226
+ optional: true;
227
+ default?: Opts['default'];
228
+ } : Validator<string> & {
229
+ optional?: Opts['optional'];
230
+ default?: Opts['default'];
231
+ };
232
+ declare function mysql<Opts extends {
233
+ default?: string;
234
+ optional?: boolean;
235
+ } = Record<string, never>>(opts?: Opts): Opts extends {
236
+ optional: true;
237
+ } ? Validator<string> & {
238
+ optional: true;
239
+ default?: Opts['default'];
240
+ } : Validator<string> & {
241
+ optional?: Opts['optional'];
242
+ default?: Opts['default'];
243
+ };
244
+ declare function mongodb<Opts extends {
245
+ default?: string;
246
+ optional?: boolean;
247
+ } = Record<string, never>>(opts?: Opts): Opts extends {
248
+ optional: true;
249
+ } ? Validator<string> & {
250
+ optional: true;
251
+ default?: Opts['default'];
252
+ } : Validator<string> & {
253
+ optional?: Opts['optional'];
254
+ default?: Opts['default'];
255
+ };
256
+ declare function redis<Opts extends {
257
+ default?: string;
258
+ optional?: boolean;
259
+ } = Record<string, never>>(opts?: Opts): Opts extends {
260
+ optional: true;
261
+ } ? Validator<string> & {
262
+ optional: true;
263
+ default?: Opts['default'];
264
+ } : Validator<string> & {
265
+ optional?: Opts['optional'];
266
+ default?: Opts['default'];
267
+ };
268
+ declare function https<Opts extends {
269
+ default?: string;
270
+ optional?: boolean;
271
+ } = Record<string, never>>(opts?: Opts): Opts extends {
272
+ optional: true;
273
+ } ? Validator<string> & {
274
+ optional: true;
275
+ default?: Opts['default'];
276
+ } : Validator<string> & {
277
+ optional?: Opts['optional'];
278
+ default?: Opts['default'];
279
+ };
280
+ declare function stringArray<Opts extends {
281
+ default?: string[];
282
+ optional?: boolean;
283
+ separator?: string;
284
+ } = Record<string, never>>(opts?: Opts): Opts extends {
285
+ optional: true;
286
+ } ? Validator<string[]> & {
287
+ optional: true;
288
+ default?: Opts['default'];
289
+ } : Validator<string[]> & {
290
+ optional?: Opts['optional'];
291
+ default?: Opts['default'];
292
+ };
293
+ declare function numberArray<Opts extends {
294
+ default?: number[];
295
+ optional?: boolean;
296
+ separator?: string;
297
+ } = Record<string, never>>(opts?: Opts): Opts extends {
298
+ optional: true;
299
+ } ? Validator<number[]> & {
300
+ optional: true;
301
+ default?: Opts['default'];
302
+ } : Validator<number[]> & {
303
+ optional?: Opts['optional'];
304
+ default?: Opts['default'];
305
+ };
306
+ declare function urlArray<Opts extends {
307
+ default?: string[];
308
+ optional?: boolean;
309
+ separator?: string;
310
+ } = Record<string, never>>(opts?: Opts): Opts extends {
311
+ optional: true;
312
+ } ? Validator<string[]> & {
313
+ optional: true;
314
+ default?: Opts['default'];
315
+ } : Validator<string[]> & {
316
+ optional?: Opts['optional'];
317
+ default?: Opts['default'];
318
+ };
319
+ declare function enums<T extends readonly (string | number)[], Opts extends {
320
+ default?: T[number];
321
+ optional?: boolean;
322
+ } = Record<string, never>>(values: T, opts?: Opts): Opts extends {
323
+ optional: true;
324
+ } ? Validator<T[number]> & {
325
+ optional: true;
326
+ default?: Opts['default'];
327
+ } : Validator<T[number]> & {
328
+ optional?: Opts['optional'];
329
+ default?: Opts['default'];
330
+ };
331
+ declare function duration<Opts extends {
332
+ default?: number;
333
+ optional?: boolean;
334
+ } = Record<string, never>>(opts?: Opts): Opts extends {
335
+ optional: true;
336
+ } ? Validator<number> & {
337
+ optional: true;
338
+ default?: Opts['default'];
339
+ } : Validator<number> & {
340
+ optional?: Opts['optional'];
341
+ default?: Opts['default'];
342
+ };
343
+ declare function file<Opts extends {
344
+ default?: string;
345
+ optional?: boolean;
346
+ secretsDir?: string;
347
+ } = Record<string, never>>(opts?: Opts): Opts extends {
348
+ optional: true;
349
+ } ? Validator<string> & {
350
+ optional: true;
351
+ default?: Opts['default'];
352
+ secretsDir?: Opts['secretsDir'];
353
+ } : Validator<string> & {
354
+ optional?: Opts['optional'];
355
+ default?: Opts['default'];
356
+ secretsDir?: Opts['secretsDir'];
357
+ };
358
+ declare function secret<Opts extends {
359
+ default?: string;
360
+ optional?: boolean;
361
+ } = Record<string, never>>(opts?: Opts): Opts extends {
362
+ optional: true;
363
+ } ? Validator<string> & {
364
+ optional: true;
365
+ default?: Opts['default'];
366
+ } : Validator<string> & {
367
+ optional?: Opts['optional'];
368
+ default?: Opts['default'];
369
+ };
370
+ declare function custom<T = unknown, Opts extends {
371
+ default?: T;
372
+ optional?: boolean;
373
+ } = Record<string, never>>(validator: (value: string) => T, opts?: Opts): Opts extends {
374
+ optional: true;
375
+ } ? Validator<T> & {
376
+ optional: true;
377
+ default?: Opts['default'];
378
+ } : Validator<T> & {
379
+ optional?: Opts['optional'];
380
+ default?: Opts['default'];
381
+ };
382
+ declare function date<Opts extends {
383
+ default?: string;
384
+ optional?: boolean;
385
+ } = Record<string, never>>(opts?: Opts): Opts extends {
386
+ optional: true;
387
+ } ? Validator<string> & {
388
+ optional: true;
389
+ default?: Opts['default'];
390
+ } : Validator<string> & {
391
+ optional?: Opts['optional'];
392
+ default?: Opts['default'];
393
+ };
394
+ declare function timestamp<Opts extends {
395
+ default?: number;
396
+ optional?: boolean;
397
+ } = Record<string, never>>(opts?: Opts): Opts extends {
398
+ optional: true;
399
+ } ? Validator<number> & {
400
+ optional: true;
401
+ default?: Opts['default'];
402
+ } : Validator<number> & {
403
+ optional?: Opts['optional'];
404
+ default?: Opts['default'];
405
+ };
406
+
407
+ export { type DotenvOptions, type TomlOptions, type YamlOptions, boolean, custom, date, dotenv, duration, email, enums, file, http, https, json, mongodb, mysql, number, numberArray, packageJson, port, postgres, processEnv, redis, secret, secrets, string, stringArray, timestamp, toml, url, urlArray, yaml };
package/dist/resolvers.js CHANGED
@@ -1 +1 @@
1
- export{a as dotenv,d as http,e as json,c as packageJson,b as processEnv,f as secrets,h as toml,g as yaml}from'./chunk-IU5TG3HL.js';import'./chunk-5PELJRUQ.js';
1
+ export{k as boolean,A as custom,B as date,a as dotenv,x as duration,m as email,w as enums,y as file,d as http,s as https,e as json,q as mongodb,p as mysql,j as number,u as numberArray,c as packageJson,n as port,o as postgres,b as processEnv,r as redis,z as secret,f as secrets,i as string,t as stringArray,C as timestamp,h as toml,l as url,v as urlArray,g as yaml}from'./chunk-P3TTYVEW.js';import'./chunk-5PELJRUQ.js';
package/dist/types.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkP3ZWKKKW_cjs=require('./chunk-P3ZWKKKW.cjs');require('./chunk-KIQXH265.cjs');Object.defineProperty(exports,"isAsyncOnlyResolver",{enumerable:true,get:function(){return chunkP3ZWKKKW_cjs.b}});Object.defineProperty(exports,"isSyncResolver",{enumerable:true,get:function(){return chunkP3ZWKKKW_cjs.a}});
1
+ 'use strict';var chunkBFLXBLZ3_cjs=require('./chunk-BFLXBLZ3.cjs');require('./chunk-KIQXH265.cjs');Object.defineProperty(exports,"isAsyncOnlyResolver",{enumerable:true,get:function(){return chunkBFLXBLZ3_cjs.b}});Object.defineProperty(exports,"isSyncResolver",{enumerable:true,get:function(){return chunkBFLXBLZ3_cjs.a}});
@@ -0,0 +1,74 @@
1
+ type Validator<T> = ((value: string) => T) & {
2
+ optional?: boolean;
3
+ default?: T;
4
+ };
5
+ type SimpleEnvSchema = Record<string, Validator<unknown> | string | number | boolean | readonly string[]>;
6
+ type InferSimpleValue<V> = V extends Validator<infer R> ? V extends {
7
+ optional: true;
8
+ } ? R | undefined : R : V extends number ? number : V extends boolean ? boolean : V extends readonly (infer U)[] ? U : V extends string ? string : never;
9
+ type InferSimpleSchema<T extends SimpleEnvSchema> = {
10
+ [K in keyof T]: InferSimpleValue<T[K]>;
11
+ };
12
+ type InferNestedSchema<T extends SimpleEnvSchema> = InferSimpleSchema<T>;
13
+ type InferResolveResult<T extends SimpleEnvSchema, O extends ResolveOptions | undefined> = O extends {
14
+ nestedDelimiter: string;
15
+ } ? InferNestedSchema<T> : InferSimpleSchema<T>;
16
+ interface SyncResolver {
17
+ loadSync(): Record<string, string>;
18
+ load?(): Promise<Record<string, string>>;
19
+ name?: string;
20
+ metadata?: Record<string, unknown>;
21
+ }
22
+ interface AsyncResolver {
23
+ load(): Promise<Record<string, string>>;
24
+ loadSync?(): Record<string, string>;
25
+ name?: string;
26
+ metadata?: Record<string, unknown>;
27
+ }
28
+ type Resolver = SyncResolver | AsyncResolver;
29
+ declare const isSyncResolver: (resolver: Resolver) => resolver is SyncResolver;
30
+ declare const isAsyncOnlyResolver: (resolver: Resolver) => resolver is AsyncResolver;
31
+ interface ResolveOptions {
32
+ priority?: 'first' | 'last';
33
+ nestedDelimiter?: string;
34
+ validateDefaults?: boolean;
35
+ secretsDir?: string;
36
+ arraySeparator?: string;
37
+ interpolate?: boolean;
38
+ strict?: boolean;
39
+ policies?: Record<string, unknown>;
40
+ enableAudit?: boolean;
41
+ }
42
+ type SafeResolveResultType<T> = {
43
+ success: true;
44
+ data: T;
45
+ } | {
46
+ success: false;
47
+ error: string;
48
+ details?: unknown;
49
+ };
50
+ type Provenance = {
51
+ source: string;
52
+ timestamp: number;
53
+ metadata?: Record<string, unknown>;
54
+ cached?: boolean;
55
+ };
56
+ type PolicyOptions = {
57
+ allowDotenvInProduction?: boolean;
58
+ requireSecretsForSensitive?: boolean;
59
+ blockInsecureProtocols?: boolean;
60
+ enforceAllowedSources?: boolean;
61
+ };
62
+ type SimpleEnvValue = Validator<unknown> | string | number | boolean | readonly string[];
63
+ type EnvSchema = Record<string, unknown>;
64
+ interface EnvDefinition {
65
+ type?: string;
66
+ validator?: (value: string, key?: string) => unknown;
67
+ default?: unknown;
68
+ optional?: boolean;
69
+ secretsDir?: string;
70
+ }
71
+ type InferType = unknown;
72
+ type InferSchema = unknown;
73
+
74
+ export { type AsyncResolver, type EnvDefinition, type EnvSchema, type InferNestedSchema, type InferResolveResult, type InferSchema, type InferSimpleSchema, type InferSimpleValue, type InferType, type PolicyOptions, type Provenance, type ResolveOptions, type Resolver, type SafeResolveResultType, type SimpleEnvSchema, type SimpleEnvValue, type SyncResolver, type Validator, isAsyncOnlyResolver, isSyncResolver };