@e-n-v/env 0.0.2 → 0.0.4

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 (99) hide show
  1. package/README.md +43 -24
  2. package/dist/BooleanMap-B2eIP3tZ.d.cts +32 -0
  3. package/dist/BooleanMap-DmFnCA-O.d.ts +32 -0
  4. package/dist/EnvChannel-LMIRYvT1.d.cts +16 -0
  5. package/dist/EnvChannel-w27PEm7x.d.ts +16 -0
  6. package/dist/EnvChannelOptions-BPkWDrmr.d.cts +108 -0
  7. package/dist/EnvChannelOptions-CRwDLWjd.d.ts +108 -0
  8. package/dist/EnvModel-CrGclUpJ.d.cts +134 -0
  9. package/dist/EnvModel-D8rt0EJ6.d.ts +134 -0
  10. package/dist/EnvSource-BVnmdHku.cjs +420 -0
  11. package/dist/EnvSource-DA3ZGlES.js +400 -0
  12. package/dist/ProcessEnvChannel-D465c-dp.d.cts +97 -0
  13. package/dist/ProcessEnvChannel-Do4-yiLI.d.ts +97 -0
  14. package/dist/StringEnvVarSchema-B8MT7htU.d.ts +64 -0
  15. package/dist/StringEnvVarSchema-BF6C0nyT.d.cts +64 -0
  16. package/dist/channels.cjs +8 -0
  17. package/dist/channels.d.cts +20 -0
  18. package/dist/channels.d.ts +20 -0
  19. package/dist/channels.js +4 -0
  20. package/dist/chunk-pbleEpgJ.cjs +44 -0
  21. package/dist/cli.cjs +16 -10
  22. package/dist/cli.js +7 -2
  23. package/dist/coerce-DNIuYAx4.js +11028 -0
  24. package/dist/coerce-b7UVodS9.cjs +12365 -0
  25. package/dist/core.cjs +68 -0
  26. package/dist/core.d.cts +6 -0
  27. package/dist/core.d.ts +6 -0
  28. package/dist/core.js +40 -0
  29. package/dist/custom-Bt_wnxIu.js +114 -0
  30. package/dist/custom-D_Rqjm09.cjs +168 -0
  31. package/dist/files.cjs +18 -0
  32. package/dist/files.d.cts +38 -0
  33. package/dist/files.d.ts +38 -0
  34. package/dist/files.js +13 -0
  35. package/dist/index-D8pslhp4.d.cts +170 -0
  36. package/dist/index-Dq_0aeAL.d.ts +170 -0
  37. package/dist/model-Dic8IJsf.d.ts +29 -0
  38. package/dist/model-ft0WhSSS.d.cts +29 -0
  39. package/dist/model.cjs +14 -0
  40. package/dist/model.d.cts +35 -0
  41. package/dist/model.d.ts +35 -0
  42. package/dist/model.js +9 -0
  43. package/dist/parse-BT1QSa5e.d.cts +28 -0
  44. package/dist/parse-DwtLpVhC.d.ts +28 -0
  45. package/dist/parse.cjs +17 -0
  46. package/dist/parse.d.cts +52 -0
  47. package/dist/parse.d.ts +52 -0
  48. package/dist/parse.js +10 -0
  49. package/dist/prompt-C5WudV9x.d.cts +74 -0
  50. package/dist/prompt-yKdccbtZ.d.ts +74 -0
  51. package/dist/prompt.cjs +24 -0
  52. package/dist/prompt.d.cts +17 -0
  53. package/dist/prompt.d.ts +17 -0
  54. package/dist/prompt.js +12 -0
  55. package/dist/redis-CJOpRPjc.js +395 -0
  56. package/dist/redis-EcC7TX3K.cjs +611 -0
  57. package/dist/resolveChannel-CjAuxy3p.cjs +257 -0
  58. package/dist/resolveChannel-v9BDsw-M.js +224 -0
  59. package/dist/root.cjs +36 -0
  60. package/dist/root.d.cts +21 -0
  61. package/dist/root.d.ts +21 -0
  62. package/dist/root.js +21 -0
  63. package/dist/schema-DH4GiW9A.d.cts +18 -0
  64. package/dist/schema-jN4EtvEP.d.ts +18 -0
  65. package/dist/schemas/zod.cjs +629 -0
  66. package/dist/schemas/zod.d.cts +239 -0
  67. package/dist/schemas/zod.d.ts +239 -0
  68. package/dist/schemas/zod.js +550 -0
  69. package/dist/schemas.cjs +133 -0
  70. package/dist/schemas.d.cts +3 -0
  71. package/dist/schemas.d.ts +3 -0
  72. package/dist/schemas.js +6 -0
  73. package/dist/src-B7FG1rak.js +638 -0
  74. package/dist/src-BBwjK5SK.js +127 -0
  75. package/dist/src-CLTURaoo.js +311 -0
  76. package/dist/src-CVdUqK3q.js +850 -0
  77. package/dist/src-Cjo2XA4n.cjs +138 -0
  78. package/dist/{src-oetJm-nZ.cjs → src-DWYoqPX1.cjs} +31 -1964
  79. package/dist/src-DZmpNGrQ.cjs +1411 -0
  80. package/dist/{src-RlCvrI0s.js → src-Dtv7TlJx.js} +14 -1726
  81. package/dist/src-XjL5cyPG.cjs +873 -0
  82. package/dist/src-meUnCASg.cjs +413 -0
  83. package/dist/validate-BxA3a-ns.d.cts +203 -0
  84. package/dist/validate-CyxrRacF.d.ts +203 -0
  85. package/dist/vars-BNVI6k89.d.ts +21 -0
  86. package/dist/vars-CYOaskkK.cjs +27 -0
  87. package/dist/vars-CptZRPX5.d.cts +21 -0
  88. package/dist/vars-DOW0LiiN.js +22 -0
  89. package/dist/vars.cjs +138 -0
  90. package/dist/vars.d.cts +7 -0
  91. package/dist/vars.d.ts +7 -0
  92. package/dist/vars.js +9 -0
  93. package/package.json +57 -9
  94. package/assets/demo.gif +0 -0
  95. package/assets/env-logo.png +0 -0
  96. package/dist/bundle.cjs +0 -1290
  97. package/dist/bundle.d.cts +0 -1057
  98. package/dist/bundle.d.ts +0 -1055
  99. package/dist/bundle.js +0 -1244
package/dist/bundle.d.ts DELETED
@@ -1,1055 +0,0 @@
1
- import { ZodTypeAny } from "zod";
2
- import { $ZodType } from "zod/v4/core";
3
- import { DotenvConfigOptions, DotenvConfigOutput, GetOptions, SetOptions } from "@dotenvx/dotenvx";
4
- import { AnySchema } from "joi";
5
- import { Struct } from "superstruct";
6
- import { Formatter } from "picocolors/types";
7
-
8
- //#region ../channels/src/channels/dotenv/DotEnvInstance.d.ts
9
- interface DotEnvConfigOptions {
10
- path?: string;
11
- encoding?: string;
12
- debug?: boolean;
13
- override?: boolean;
14
- [key: string]: unknown;
15
- }
16
- interface DotEnvConfigOutput {
17
- parsed?: Record<string, string>;
18
- error?: Error;
19
- }
20
- interface DotEnvParseOptions {
21
- debug?: boolean;
22
- [key: string]: unknown;
23
- }
24
- interface DotEnvInstance {
25
- parse(src: string | Buffer, options?: DotEnvParseOptions): Record<string, string | undefined>;
26
- config?(options?: DotEnvConfigOptions): DotEnvConfigOutput;
27
- }
28
- //#endregion
29
- //#region ../channels/src/channels/dotenv/DotEnvChannelConfig.d.ts
30
- interface DotEnvChannelConfig {
31
- dotenv: DotEnvInstance;
32
- path?: string;
33
- get?: DotEnvConfigOptions & {
34
- [key: string]: unknown;
35
- };
36
- parse?: DotEnvParseOptions & {
37
- [key: string]: unknown;
38
- };
39
- }
40
- //#endregion
41
- //#region ../channels/src/channels/dotenvx/DotEnvXInstance.d.ts
42
- /**
43
- * Minimal interface for dotenvx functionality used in ask-env.
44
- */
45
- interface DotEnvXInstance {
46
- get(key: string, options?: GetOptions): string;
47
- set(key: string, value: string, options?: SetOptions): unknown;
48
- config(options?: DotenvConfigOptions): DotenvConfigOutput;
49
- }
50
- //#endregion
51
- //#region ../channels/src/channels/dotenvx/DotEnvXGetOptions.d.ts
52
- /**
53
- * Get options without envKeysFile since we manage that ourselves
54
- */
55
- type DotEnvXGetOptions = Omit<GetOptions, "envKeysFile">;
56
- //#endregion
57
- //#region ../channels/src/channels/dotenvx/DotEnvXSetOptions.d.ts
58
- /**
59
- * Set options without envKeysFile since we manage that ourselves
60
- */
61
- type DotEnvXSetOptions = Omit<SetOptions, "envKeysFile">;
62
- //#endregion
63
- //#region ../channels/src/channels/dotenvx/DotEnvXChannelConfig.d.ts
64
- /**
65
- * DotEnvX channel configuration
66
- */
67
- interface DotEnvXChannelConfig {
68
- dotenvx: DotEnvXInstance;
69
- get?: DotEnvXGetOptions & {
70
- [key: string]: unknown;
71
- };
72
- set?: DotEnvXSetOptions & {
73
- [key: string]: unknown;
74
- };
75
- }
76
- //#endregion
77
- //#region ../channels/src/channels/default/DefaultChannelConfig.d.ts
78
- /**
79
- * Default channel configuration
80
- */
81
- interface DefaultChannelConfig {
82
- name: "default";
83
- }
84
- //#endregion
85
- //#region ../channels/src/channels/processenv/ProcessEnvChannelConfig.d.ts
86
- /**
87
- * Configuration for ProcessEnv channel using name
88
- */
89
- interface ProcessEnvChannelConfig {
90
- name: "processenv";
91
- }
92
- /**
93
- * Configuration for ProcessEnv channel using process shorthand
94
- */
95
- interface ProcessChannelConfig {
96
- process: NodeJS.Process;
97
- }
98
- //#endregion
99
- //#region ../channels/src/EnvChannelOptions.d.ts
100
- /**
101
- * Channel options can be:
102
- * - undefined (uses default channel)
103
- * - "default" string (uses default channel)
104
- * - "processenv" string (uses process.env channel)
105
- * - dotenvx instance (uses dotenvx with default options)
106
- * - DotEnvXChannelConfig (uses dotenvx with custom options)
107
- * - DefaultChannelConfig (uses default with custom options)
108
- * - ProcessEnvChannelConfig (uses process.env with config options)
109
- * - ProcessChannelConfig (uses process.env with { process } notation)
110
- */
111
- type EnvChannelOptions = undefined | "default" | "processenv" | DotEnvChannelConfig | DotEnvXChannelConfig | DefaultChannelConfig | ProcessEnvChannelConfig | ProcessChannelConfig;
112
- //#endregion
113
- //#region ../core/src/processing/Processor.d.ts
114
- /**
115
- * Processor function that transforms a string input to type T.
116
- * Returns T if processing succeeds, undefined for empty/null values, throws descriptive errors for invalid values.
117
- * Used by environment variable schemas to convert string values to their target types.
118
- */
119
- type Processor<T> = (value: string) => T | undefined;
120
- //#endregion
121
- //#region ../core/src/types/EnvVarType.d.ts
122
- type EnvVarType = "string" | "number" | "boolean" | "enum";
123
- //#endregion
124
- //#region ../core/src/schemas/EnvVarSchemaInput.d.ts
125
- interface EnvVarSchemaInput<T> {
126
- process?: Processor<T>;
127
- required?: boolean;
128
- default?: T;
129
- description?: string;
130
- }
131
- //#endregion
132
- //#region ../core/src/schemas/EnvVarSchemaBase.d.ts
133
- declare abstract class EnvVarSchemaBase<T> {
134
- abstract readonly type: EnvVarType;
135
- readonly required: boolean;
136
- readonly default?: T;
137
- readonly description?: string;
138
- readonly process: Processor<T>;
139
- constructor(input: EnvVarSchemaInput<T>);
140
- }
141
- //#endregion
142
- //#region ../core/src/schemas/typed/BooleanEnvVarSchema.d.ts
143
- interface BooleanEnvVarSchemaInput extends EnvVarSchemaInput<boolean> {}
144
- declare class BooleanEnvVarSchema extends EnvVarSchemaBase<boolean> {
145
- readonly type: "boolean";
146
- constructor(input?: BooleanEnvVarSchemaInput);
147
- }
148
- //#endregion
149
- //#region ../core/src/schemas/typed/EnumEnvVarSchema.d.ts
150
- interface EnumEnvVarSchemaInput<T extends string = string> extends EnvVarSchemaInput<T> {
151
- values: readonly T[];
152
- }
153
- declare class EnumEnvVarSchema<T extends string = string> extends EnvVarSchemaBase<T> {
154
- readonly type: "enum";
155
- readonly values: readonly T[];
156
- constructor(input: EnumEnvVarSchemaInput<T>);
157
- }
158
- //#endregion
159
- //#region ../core/src/schemas/EnvVarSchemaDetails.d.ts
160
- interface EnvVarSchemaDetails<T> {
161
- type: EnvVarType;
162
- required: boolean;
163
- default?: T;
164
- description?: string;
165
- process?: Processor<T>;
166
- }
167
- //#endregion
168
- //#region ../core/src/schemas/typed/NumberEnvVarSchema.d.ts
169
- interface NumberEnvVarSchemaInput extends EnvVarSchemaInput<number> {}
170
- declare class NumberEnvVarSchema extends EnvVarSchemaBase<number> {
171
- readonly type: "number";
172
- constructor(input?: NumberEnvVarSchemaInput);
173
- }
174
- //#endregion
175
- //#region ../core/src/schemas/typed/StringEnvVarSchema.d.ts
176
- interface StringEnvVarSchemaInput extends EnvVarSchemaInput<string> {
177
- secret?: boolean;
178
- }
179
- declare class StringEnvVarSchema extends EnvVarSchemaBase<string> {
180
- readonly type: "string";
181
- readonly secret?: boolean;
182
- constructor(input?: StringEnvVarSchemaInput);
183
- }
184
- //#endregion
185
- //#region ../core/src/schemas/EnvVarSchema.d.ts
186
- type EnvVarSchema = StringEnvVarSchema | NumberEnvVarSchema | BooleanEnvVarSchema | EnumEnvVarSchema<any>;
187
- /**
188
- * Type guard to check if a value is a EnvVarSchema instance
189
- */
190
- declare function isEnvVarSchema(value: unknown): value is EnvVarSchema;
191
- //#endregion
192
- //#region ../core/src/processing/processors.d.ts
193
- /**
194
- * Default processors for environment variable types.
195
- * Each processor factory returns a function that takes a value and returns T | undefined.
196
- * Returns undefined for empty/null values, throws descriptive errors for invalid values.
197
- */
198
- /**
199
- * Create a string processor - pass through as-is
200
- */
201
- declare const stringProcessor: () => Processor<string>;
202
- /**
203
- * Create a number processor using parseFloat
204
- */
205
- declare const numberProcessor: () => Processor<number>;
206
- /**
207
- * Create a boolean processor from string representation
208
- */
209
- declare const booleanProcessor: () => Processor<boolean>;
210
- /**
211
- * Create an enum processor that validates values against allowed options
212
- */
213
- declare const enumProcessor: (allowedValues: readonly string[]) => Processor<string>;
214
- /**
215
- * Default processors map for each environment variable type
216
- */
217
- declare const processors: {
218
- readonly string: () => Processor<string>;
219
- readonly number: () => Processor<number>;
220
- readonly boolean: () => Processor<boolean>;
221
- readonly enum: (allowedValues: readonly string[]) => Processor<string>;
222
- };
223
- //#endregion
224
- //#region ../core/src/processing/Preprocessor.d.ts
225
- /**
226
- * Custom preprocessing functions to preprocess values before submitting to schema processors.
227
- * Provide `false` to skip preprocessing, `true` to use the built-in default, or a function/options object for custom logic.
228
- * These functions do not guarantee type casting and can be bypassed to skip preprocessing entirely.
229
- */
230
- type Preprocessor<T> = (value: string) => T | string;
231
- type PreprocessorToggle$1<T> = Preprocessor<T> | boolean | undefined;
232
- interface Preprocessors {
233
- /**
234
- * Custom string preprocessing function
235
- * Receives the string value and should return a string value
236
- * @param value - The raw string value from the environment variable
237
- * @returns Preprocessed string value
238
- */
239
- string?: PreprocessorToggle$1<string>;
240
- /**
241
- * Custom number preprocessing function
242
- * Receives the string value and should return a string or the target number type
243
- * @param value - The raw string value from the environment variable
244
- * @returns Preprocessed string or number value
245
- */
246
- number?: PreprocessorToggle$1<number>;
247
- /**
248
- * Custom boolean preprocessing function
249
- * Receives the string value and should return a string or the target boolean type
250
- * @param value - The raw string value from the environment variable
251
- * @returns Preprocessed string or boolean value
252
- */
253
- boolean?: boolean | Preprocessor<boolean> | BooleanPreprocessorOptions | undefined;
254
- /**
255
- * Custom enum preprocessing function
256
- * Receives the string value and should return a string value
257
- * @param value - The raw string value from the environment variable
258
- * @returns Preprocessed string value
259
- */
260
- enum?: PreprocessorToggle$1<string>;
261
- }
262
- type DefaultPreprocessor<T extends EnvVarType> = T extends "number" ? Preprocessor<number> : T extends "boolean" ? Preprocessor<boolean> : Preprocessor<string>;
263
- /**
264
- * Resolve the effective preprocessor for a given environment variable type.
265
- * Respects custom overrides and falls back to built-in defaults (number, boolean).
266
- */
267
- declare function resolvePreprocessor<T extends EnvVarType>(envVarType: T, preprocessorOptions?: Preprocessors): DefaultPreprocessor<T> | undefined;
268
- //#endregion
269
- //#region ../core/src/processing/preprocessors.d.ts
270
- interface BooleanPreprocessorOptions {
271
- true: string[];
272
- false: string[];
273
- }
274
- /**
275
- * Create a string preprocessor - pass through unchanged
276
- */
277
- declare const stringPreprocessor: () => Preprocessor<string>;
278
- /**
279
- * Create a number preprocessor that strips commas and whitespace
280
- */
281
- declare const numberPreprocessor: () => Preprocessor<number>;
282
- /**
283
- * Create a boolean preprocessor that normalizes common truthy/falsy phrases
284
- */
285
- declare const booleanPreprocessor: (options?: BooleanPreprocessorOptions) => Preprocessor<boolean>;
286
- /**
287
- * Create an enum preprocessor - pass through unchanged
288
- */
289
- declare const enumPreprocessor: () => Preprocessor<string>;
290
- /**
291
- * Default preprocessors map for each environment variable type
292
- */
293
- declare const preprocessors: {
294
- readonly string: () => Preprocessor<string>;
295
- readonly number: () => Preprocessor<number>;
296
- readonly boolean: (options?: BooleanPreprocessorOptions) => Preprocessor<boolean>;
297
- readonly enum: () => Preprocessor<string>;
298
- };
299
- //#endregion
300
- //#region ../core/src/types/EnvChannel.d.ts
301
- /**
302
- * Interface for accessing and modifying environment variables
303
- */
304
- interface EnvChannel {
305
- /**
306
- * Get environment variables
307
- */
308
- get(keys?: string[]): Promise<Record<string, string>>;
309
- /**
310
- * Set environment variables
311
- */
312
- set(values: Record<string, string>): Promise<void>;
313
- }
314
- //#endregion
315
- //#region ../core/src/schema.d.ts
316
- declare const schema: {
317
- string: (input?: StringEnvVarSchemaInput) => StringEnvVarSchema;
318
- number: (input?: NumberEnvVarSchemaInput) => NumberEnvVarSchema;
319
- boolean: (input?: BooleanEnvVarSchemaInput) => BooleanEnvVarSchema;
320
- enum: <T extends string = string>(input: EnumEnvVarSchemaInput<T>) => EnumEnvVarSchema<T>;
321
- };
322
- declare const s: {
323
- string: (input?: StringEnvVarSchemaInput) => StringEnvVarSchema;
324
- number: (input?: NumberEnvVarSchemaInput) => NumberEnvVarSchema;
325
- boolean: (input?: BooleanEnvVarSchemaInput) => BooleanEnvVarSchema;
326
- enum: <T extends string = string>(input: EnumEnvVarSchemaInput<T>) => EnumEnvVarSchema<T>;
327
- };
328
- //#endregion
329
- //#region ../channels/src/resolveChannel.d.ts
330
- /**
331
- * Resolve channel options into an EnvChannel instance
332
- * @param options - The channel options to resolve
333
- * @param defaultPath - Default path to use for env files (default: ".env")
334
- * @returns An EnvChannel instance
335
- */
336
- declare function resolveChannel(options: EnvChannelOptions, defaultPath?: string): EnvChannel;
337
- //#endregion
338
- //#region ../channels/src/channels/default/DefaultEnvChannel.d.ts
339
- /**
340
- * Default implementation of EnvChannel that works with .env files using envrw
341
- */
342
- declare class DefaultEnvChannel implements EnvChannel {
343
- private envSource;
344
- /**
345
- * Create a new DefaultEnvChannel
346
- * @param filePath - Path to the .env file to manage
347
- */
348
- constructor(filePath: string);
349
- /**
350
- * Get all environment variables
351
- * @returns Promise that resolves to object containing all environment variable key-value pairs
352
- */
353
- get(): Promise<Record<string, string>>;
354
- /**
355
- * Set multiple environment variables
356
- * @param values - Object containing key-value pairs to set
357
- * @returns Promise that resolves when the values have been set
358
- */
359
- set(values: Record<string, string>): Promise<void>;
360
- }
361
- //#endregion
362
- //#region ../channels/src/channels/dotenv/DotEnvChannel.d.ts
363
- declare class DotEnvChannel implements EnvChannel {
364
- private readonly dotenv;
365
- private readonly targetPath;
366
- private readonly absolutePath;
367
- private readonly encoding;
368
- private readonly parseOptions;
369
- private readonly envSource;
370
- constructor(dotenv: DotEnvInstance, defaultPath?: string, getOptions?: DotEnvConfigOptions, parseOptions?: DotEnvParseOptions);
371
- get(): Promise<Record<string, string>>;
372
- set(values: Record<string, string>): Promise<void>;
373
- getPrimaryPath(): string;
374
- clearCache(): void;
375
- }
376
- //#endregion
377
- //#region ../channels/src/channels/dotenvx/DotEnvXChannel.d.ts
378
- /**
379
- * Simple DotEnvX implementation of EnvChannel that wraps @dotenvx/dotenvx library
380
- * This is just an API mapping wrapper without caching or complex state management
381
- */
382
- declare class DotEnvXChannel implements EnvChannel {
383
- private dotenvx;
384
- private getOptions;
385
- private setOptions;
386
- private defaultPath;
387
- /**
388
- * Create a new DotEnvXChannel
389
- * @param dotenvx - The dotenvx instance to use
390
- * @param defaultPath - Default path for env files
391
- * @param getOptions - Options for get operations
392
- * @param setOptions - Options for set operations
393
- */
394
- constructor(dotenvx: DotEnvXInstance, defaultPath?: string, getOptions?: DotEnvXGetOptions, setOptions?: DotEnvXSetOptions);
395
- /**
396
- * Get all environment variables
397
- * @returns Promise that resolves to object containing all environment variable key-value pairs
398
- */
399
- get(): Promise<Record<string, string>>;
400
- /**
401
- * Set multiple environment variables
402
- * @param values - Object containing key-value pairs to set
403
- * @returns Promise that resolves when the values have been set
404
- */
405
- set(values: Record<string, string>): Promise<void>;
406
- /**
407
- * Get the primary path being used for env files
408
- * @returns The primary path
409
- */
410
- getPrimaryPath(): string;
411
- /**
412
- * Clear any cached data (no-op for this implementation since we don't cache)
413
- */
414
- clearCache(): void;
415
- }
416
- //#endregion
417
- //#region ../channels/src/channels/processenv/ProcessEnvChannel.d.ts
418
- /**
419
- * EnvChannel implementation that works with process.env
420
- * This channel reads from and writes to the current process environment
421
- */
422
- declare class ProcessEnvChannel implements EnvChannel {
423
- /**
424
- * Get all environment variables from process.env
425
- * @returns Promise that resolves to object containing all environment variable key-value pairs
426
- */
427
- get(): Promise<Record<string, string>>;
428
- /**
429
- * Set multiple environment variables in process.env
430
- * @param values - Object containing key-value pairs to set
431
- * @returns Promise that resolves when the values have been set
432
- */
433
- set(values: Record<string, string>): Promise<void>;
434
- }
435
- //#endregion
436
- //#region ../converters/src/converters/SchemaConverter.d.ts
437
- /**
438
- * Interface for schema converters that can convert external schema types
439
- * to envcredible's EnvVarSchema format.
440
- */
441
- interface SchemaConverter<T = unknown> {
442
- /**
443
- * Type guard to check if this converter can handle the given schema
444
- */
445
- applies(schema: unknown): schema is T;
446
- /**
447
- * Convert the schema to a EnvVarSchema
448
- */
449
- convert(schema: T): EnvVarSchema;
450
- }
451
- //#endregion
452
- //#region ../files/src/types.d.ts
453
- type EnvRecord = Record<string, string>;
454
- type EnvSelectionRecord<T extends readonly string[]> = { [K in T[number]]: string | undefined };
455
- type EnvPrimitiveValue = string | number | boolean | bigint;
456
- //#endregion
457
- //#region ../files/src/EnvSource.d.ts
458
- declare class EnvSource {
459
- private readonly filePath;
460
- constructor(filePath: string);
461
- readSync(): EnvRecord;
462
- readSync(name: string): string | undefined;
463
- readSync<const Names extends readonly string[]>(names: Names): EnvSelectionRecord<Names>;
464
- read(): Promise<EnvRecord>;
465
- read(name: string): Promise<string | undefined>;
466
- read<const Names extends readonly string[]>(names: Names): Promise<EnvSelectionRecord<Names>>;
467
- writeSync(name: string, value: EnvPrimitiveValue): void;
468
- writeSync(values: Record<string, EnvPrimitiveValue>): void;
469
- write(name: string, value: EnvPrimitiveValue): Promise<void>;
470
- write(values: Record<string, EnvPrimitiveValue>): Promise<void>;
471
- private readContentSync;
472
- private readContent;
473
- private ensureDirectorySync;
474
- private ensureDirectory;
475
- }
476
- //#endregion
477
- //#region ../files/src/get.d.ts
478
- declare function get(content: string): EnvRecord;
479
- declare function get(content: string, name: string): string | undefined;
480
- declare function get<const Names extends readonly string[]>(content: string, names: Names): EnvSelectionRecord<Names>;
481
- //#endregion
482
- //#region ../files/src/set.d.ts
483
- declare function set(content: string, name: string, value: EnvPrimitiveValue): string;
484
- declare function set(content: string, values: Record<string, EnvPrimitiveValue>): string;
485
- //#endregion
486
- //#region ../files/src/source.d.ts
487
- declare function source(filePath: string): EnvSource;
488
- //#endregion
489
- //#region ../models/src/schemas.d.ts
490
- type JoiSchema = AnySchema;
491
- type ZodV3Schema = ZodTypeAny;
492
- type ZodV4Schema = $ZodType;
493
- type SuperstructSchema = Struct<any, any>;
494
- type Schema = ZodV3Schema | ZodV4Schema | JoiSchema | SuperstructSchema | EnvVarSchema;
495
- //#endregion
496
- //#region ../models/src/types.d.ts
497
- /**
498
- * Supported schema types - local definition to avoid circular dependencies
499
- */
500
- type SupportedSchema = Schema;
501
- type InferZodOutput<T> = T extends {
502
- _output: infer Output;
503
- } ? Output : T extends {
504
- _type: infer LegacyOutput;
505
- } ? LegacyOutput : never;
506
- type InferJoiOutput<T> = T extends {
507
- validate: (...args: any[]) => infer Result;
508
- } ? Result extends {
509
- value: infer Value;
510
- } ? Value : Result extends Promise<infer AsyncResult> ? AsyncResult extends {
511
- value: infer AsyncValue;
512
- } ? AsyncValue : unknown : unknown : T extends {
513
- validateAsync: (...args: any[]) => Promise<infer AsyncValue>;
514
- } ? AsyncValue : unknown;
515
- /**
516
- * Infer the TypeScript type from an EnvVarSchema instance
517
- * Uses the schema's type property and values to determine the correct TypeScript type
518
- */
519
- type InferSchemaType<T> = T extends {
520
- readonly type: "string";
521
- } ? string : T extends {
522
- readonly type: "number";
523
- } ? number : T extends {
524
- readonly type: "boolean";
525
- } ? boolean : T extends {
526
- readonly type: "enum";
527
- readonly values: readonly (infer U)[];
528
- } ? U : T extends EnumEnvVarSchema<infer U> ? U : T extends NumberEnvVarSchema ? number : T extends StringEnvVarSchema ? string : T extends BooleanEnvVarSchema ? boolean : T extends EnvVarSchemaBase<infer U> ? U : T extends AnySchema ? InferJoiOutput<T> : T extends ZodTypeAny ? InferZodOutput<T> : T extends $ZodType ? InferZodOutput<T> : unknown;
529
- /**
530
- * Infer whether a schema field is optional based on its required property
531
- */
532
- type InferOptional<T> = T extends {
533
- required: false;
534
- } ? true : T extends {
535
- required: true;
536
- } ? false : T extends {
537
- required: boolean;
538
- } ? boolean : false;
539
- /**
540
- * Utility type to flatten complex generic types for better IDE display
541
- */
542
- type Simplify<T> = { [K in keyof T]: T[K] } & {};
543
- /**
544
- * Infer the complete environment type from a schemas record
545
- * Handles optional vs required fields properly
546
- * Uses Simplify to flatten the type display in IDEs
547
- */
548
- type InferEnvType<T extends Record<string, SupportedSchema>> = Simplify<{ [K in keyof T]: InferOptional<T[K]> extends true ? InferSchemaType<T[K]> | undefined : InferSchemaType<T[K]> }>;
549
- //#endregion
550
- //#region ../models/src/EnvModelOptions.d.ts
551
- type PreprocessorToggle<T> = Preprocessor<T> | boolean | undefined;
552
- interface Preprocessors$1 {
553
- /**
554
- * Custom string preprocessing function
555
- */
556
- string?: PreprocessorToggle<string>;
557
- /**
558
- * Custom number preprocessing function
559
- */
560
- number?: PreprocessorToggle<number>;
561
- /**
562
- * Custom boolean preprocessing function
563
- */
564
- boolean?: boolean | Preprocessor<boolean> | BooleanPreprocessorOptions | undefined;
565
- /**
566
- * Custom enum preprocessing function
567
- */
568
- enum?: PreprocessorToggle<string>;
569
- }
570
- /**
571
- * Options for creating an EnvModel instance
572
- */
573
- interface EnvModelOptions<T extends Record<string, SupportedSchema> = Record<string, SupportedSchema>> {
574
- /**
575
- * Environment variable schemas
576
- * Map of variable names to their schema definitions
577
- */
578
- schemas: T;
579
- /**
580
- * Preprocessing configuration
581
- * - `true`: Use default preprocessors for all types
582
- * - `false`: Disable all preprocessing
583
- * - Partial object: Customize specific type preprocessors
584
- */
585
- preprocess?: true | false | Partial<Preprocessors$1>;
586
- }
587
- //#endregion
588
- //#region ../models/src/EnvModel.d.ts
589
- /**
590
- * Environment variable specification container
591
- * Encapsulates schemas and preprocessor configuration
592
- */
593
- declare class EnvModel<T extends Record<string, SupportedSchema> = Record<string, SupportedSchema>> {
594
- /**
595
- * Resolved environment variable schemas
596
- */
597
- readonly schemas: Record<string, EnvVarSchema>;
598
- /**
599
- * Preprocessing configuration for environment variable types
600
- */
601
- readonly preprocess: Preprocessors$1;
602
- /**
603
- * Create an EnvModel instance from options
604
- * @param options - Specification options
605
- */
606
- constructor(options: EnvModelOptions<T>);
607
- /**
608
- * Resolve preprocessor configuration from options
609
- * @param config - Preprocessor configuration (true, false, or partial object)
610
- * @returns Resolved preprocessors object
611
- */
612
- private resolvePreprocessors;
613
- }
614
- //#endregion
615
- //#region ../models/src/model.d.ts
616
- /**
617
- * Create an environment variable model
618
- *
619
- * Sugar utility for creating EnvModel instances with full type inference
620
- *
621
- * @param options - Model options
622
- * @returns EnvModel instance with inferred types
623
- *
624
- * @example
625
- * ```typescript
626
- * import { define, s } from "@e-n-v/models";
627
- *
628
- * export default define({
629
- * schemas: {
630
- * PORT: s.number({ default: 3000 }),
631
- * DATABASE_URL: s.string(),
632
- * DEBUG: s.boolean({ default: false })
633
- * },
634
- * preprocess: true
635
- * });
636
- * ```
637
- */
638
- declare function define<T extends Record<string, SupportedSchema>>(options: EnvModelOptions<T>): EnvModel<T>;
639
- //#endregion
640
- //#region ../models/src/resolve.d.ts
641
- /**
642
- * Resolve any supported schema to a EnvVarSchema.
643
- *
644
- * This is the main entry point for converting external schemas
645
- * (like Zod schemas) to envcredible's internal schema format.
646
- * If the input is already a EnvVarSchema, it returns it directly.
647
- *
648
- * @param schema - The schema to convert (e.g., Zod v3/v4 schema or EnvVarSchema)
649
- * @returns EnvVarSchema that can be used with envcredible
650
- * @throws Error if no converter can handle the schema
651
- */
652
- declare function resolveSchema(schema: Schema): EnvVarSchema;
653
- /**
654
- * Resolve mixed schema map (Zod schemas or EnvVarSchema) to pure EnvVarSchema map.
655
- *
656
- * This function takes a map where values can be:
657
- * - Zod v3 schemas
658
- * - Zod v4 schemas
659
- * - Already resolved EnvVarSchema instances
660
- *
661
- * And converts everything to EnvVarSchema instances that can be used throughout envcredible.
662
- *
663
- * @param schemas - Object mapping environment variable names to various schema types
664
- * @returns Record mapping env var names to EnvVarSchema instances
665
- */
666
- declare function resolveSchemas(schemas: Record<string, Schema>): Record<string, EnvVarSchema>;
667
- //#endregion
668
- //#region ../parse/ParseEnvOptions.d.ts
669
- type ParseEnvOptions<T extends Record<string, SupportedSchema> = Record<string, SupportedSchema>> = EnvModelOptions<T>;
670
- //#endregion
671
- //#region ../parse/src/parse.d.ts
672
- /**
673
- * Parse and validate environment variables from a source object
674
- * Does NOT mutate process.env
675
- *
676
- * @param source - Source object containing raw environment variable values
677
- * @param model - Environment variable model (EnvModel instance)
678
- * @returns Strongly typed validated environment variables
679
- * @throws EnvParseError if any validation issues occur
680
- */
681
- declare function parse<T extends Record<string, SupportedSchema>>(source: Record<string, string> | NodeJS.ProcessEnv, model: EnvModel<T>): InferEnvType<T>;
682
- /**
683
- * Parse and validate environment variables from a source object
684
- * Does NOT mutate process.env
685
- *
686
- * @param source - Source object containing raw environment variable values
687
- * @param options - Parse options containing schemas and preprocessing config
688
- * @returns Strongly typed validated environment variables
689
- * @throws EnvParseError if any validation issues occur
690
- */
691
- declare function parse<T extends Record<string, SupportedSchema>>(source: Record<string, string> | NodeJS.ProcessEnv, options: ParseEnvOptions<T>): InferEnvType<T>;
692
- //#endregion
693
- //#region ../parse/src/errors/EnvParseError.d.ts
694
- type EnvParseIssueMissing = {
695
- type: "missing";
696
- key: string;
697
- message: string;
698
- };
699
- type EnvParseIssueInvalid = {
700
- type: "invalid";
701
- key: string;
702
- value: string;
703
- message: string;
704
- };
705
- type EnvParseIssue = EnvParseIssueMissing | EnvParseIssueInvalid;
706
- type EnvParseResult<TValue> = {
707
- ok: true;
708
- value: TValue;
709
- } | {
710
- ok: false;
711
- error: EnvParseError<TValue>;
712
- };
713
- /**
714
- * Error thrown when parsing environment variables fails.
715
- * Collects all issues so callers can inspect them without relying on subclasses.
716
- */
717
- declare class EnvParseError<TValue = Record<string, unknown>> extends Error {
718
- readonly issues: ReadonlyArray<EnvParseIssue>;
719
- readonly partial: Partial<TValue>;
720
- constructor(params: {
721
- issues: EnvParseIssue[];
722
- partial?: Partial<TValue>;
723
- });
724
- /** Number of issues encountered while parsing. */
725
- get issueCount(): number;
726
- /** Keys that were missing but required. */
727
- get missing(): string[];
728
- /** Keys that were present but invalid. */
729
- get invalid(): string[];
730
- /**
731
- * Get all issue messages as a numbered list for easy logging.
732
- */
733
- formatIssues(): string;
734
- private static formatMessage;
735
- }
736
- declare namespace defaults_d_exports {
737
- export { ENV_PATH, SECRET_PATTERNS, TRUNCATE_LENGTH };
738
- }
739
- declare const ENV_PATH = ".env";
740
- declare const TRUNCATE_LENGTH = 40;
741
- declare const SECRET_PATTERNS: ReadonlyArray<RegExp | string>;
742
- //#endregion
743
- //#region ../prompt/src/options/PromptEnvInteractiveOptions.d.ts
744
- /**
745
- * Configuration options for the prompt function
746
- */
747
- type PromptEnvInteractiveOptions = {
748
- /**
749
- * Path to the .env file to read from and write to
750
- * @default ".env"
751
- * @example ".env.local", ".env.production", "config/.env"
752
- */
753
- path?: string;
754
- /**
755
- * Root location used to resolve relative env file paths.
756
- * Supply CommonJS `__dirname` or ESM `import.meta.url` so the env path resolves next to the caller.
757
- * Falls back to the current working directory when omitted.
758
- * @default process.cwd()
759
- * @example import.meta.url, __dirname
760
- */
761
- root?: string;
762
- /**
763
- * Channel configuration for reading and writing environment variables.
764
- * Can be undefined (default), "default", a dotenvx instance, channel config objects, or an EnvChannel instance.
765
- * @default undefined (uses default file-based channel)
766
- * @example dotenvx, { name: "default" }, { dotenvx: instance, get: {}, set: {} }, new DefaultEnvChannel(".env")
767
- */
768
- channel?: EnvChannelOptions | EnvChannel;
769
- /**
770
- * Maximum number of characters to display for values in prompts before truncating
771
- * Longer values will be shown as "value..." to keep the interface clean
772
- * @default 40
773
- * @example 20, 60, 100
774
- */
775
- truncate?: number;
776
- /**
777
- * Array of patterns (strings or RegExp) used to identify secret environment variables
778
- * Secret variables will be masked in prompts and can be toggled to reveal/hide
779
- * @default DEFAULT_SECRET_PATTERNS (includes password, token, api_key, database_url, etc.)
780
- * @example ["PASSWORD", /secret/i, "API_KEY"], [] (empty array disables masking)
781
- */
782
- secrets?: Array<RegExp | string>;
783
- /**
784
- * Color theme function for styling the CLI interface
785
- * Uses picocolors formatter functions to customize the primary color scheme
786
- * @default color.magenta
787
- * @example color.blue, color.green, color.cyan
788
- */
789
- theme?: Formatter;
790
- };
791
- //#endregion
792
- //#region ../prompt/src/options/PromptEnvOptions.d.ts
793
- /**
794
- * Configuration options for the prompt function
795
- */
796
- type PromptEnvOptions = EnvModelOptions & PromptEnvInteractiveOptions;
797
- //#endregion
798
- //#region ../prompt/src/prompt.d.ts
799
- /**
800
- * Interactive CLI tool to generate .env files with schema validation
801
- * @param model - Environment model instance
802
- * @param options - Interactive configuration options
803
- */
804
- declare function prompt(model: EnvModel, options?: PromptEnvInteractiveOptions): Promise<void>;
805
- /**
806
- * Interactive CLI tool to generate .env files with schema validation
807
- * @param options - Configuration options including schemas and interactive settings
808
- */
809
- declare function prompt(options: PromptEnvOptions): Promise<void>;
810
- //#endregion
811
- //#region ../schemas/src/plain/api.d.ts
812
- declare const apiKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
813
- declare const apiBaseUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
814
- declare const apiTimeout: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
815
- declare const API_KEY: StringEnvVarSchema;
816
- declare const API_BASE_URL: StringEnvVarSchema;
817
- declare const API_TIMEOUT: NumberEnvVarSchema;
818
- //#endregion
819
- //#region ../schemas/src/plain/aws.d.ts
820
- declare const awsAccessKeyId: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
821
- declare const awsSecretAccessKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
822
- declare const awsRegion: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
823
- declare const awsS3BucketName: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
824
- declare const awsSqsQueueUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
825
- declare const AWS_ACCESS_KEY_ID: StringEnvVarSchema;
826
- declare const AWS_SECRET_ACCESS_KEY: StringEnvVarSchema;
827
- declare const AWS_REGION: StringEnvVarSchema;
828
- declare const AWS_S3_BUCKET_NAME: StringEnvVarSchema;
829
- declare const AWS_SQS_QUEUE_URL: StringEnvVarSchema;
830
- declare const aws: {
831
- readonly AWS_ACCESS_KEY_ID: StringEnvVarSchema;
832
- readonly AWS_SECRET_ACCESS_KEY: StringEnvVarSchema;
833
- readonly AWS_REGION: StringEnvVarSchema;
834
- readonly AWS_S3_BUCKET_NAME: StringEnvVarSchema;
835
- readonly AWS_SQS_QUEUE_URL: StringEnvVarSchema;
836
- };
837
- //#endregion
838
- //#region ../schemas/src/plain/azure.d.ts
839
- declare const azureStorageConnectionString: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
840
- declare const azureStorageAccountName: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
841
- declare const azureStorageAccountKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
842
- declare const azureServiceBusConnectionString: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
843
- declare const azureEventHubConnectionString: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
844
- declare const AZURE_STORAGE_CONNECTION_STRING: StringEnvVarSchema;
845
- declare const AZURE_STORAGE_ACCOUNT_NAME: StringEnvVarSchema;
846
- declare const AZURE_STORAGE_ACCOUNT_KEY: StringEnvVarSchema;
847
- declare const AZURE_SERVICE_BUS_CONNECTION_STRING: StringEnvVarSchema;
848
- declare const AZURE_EVENT_HUB_CONNECTION_STRING: StringEnvVarSchema;
849
- declare const azure: {
850
- readonly AZURE_STORAGE_CONNECTION_STRING: StringEnvVarSchema;
851
- readonly AZURE_STORAGE_ACCOUNT_NAME: StringEnvVarSchema;
852
- readonly AZURE_STORAGE_ACCOUNT_KEY: StringEnvVarSchema;
853
- readonly AZURE_SERVICE_BUS_CONNECTION_STRING: StringEnvVarSchema;
854
- readonly AZURE_EVENT_HUB_CONNECTION_STRING: StringEnvVarSchema;
855
- };
856
- //#endregion
857
- //#region ../schemas/src/plain/common.d.ts
858
- declare const port: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
859
- declare const PORT: NumberEnvVarSchema;
860
- //#endregion
861
- //#region ../schemas/src/plain/cors.d.ts
862
- declare const corsOrigin: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
863
- declare const CORS_ORIGIN: StringEnvVarSchema;
864
- declare const cors: {
865
- readonly CORS_ORIGIN: StringEnvVarSchema;
866
- };
867
- //#endregion
868
- //#region ../schemas/src/plain/database.d.ts
869
- declare const databaseUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
870
- declare const databaseHost: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
871
- declare const databasePort: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
872
- declare const databaseName: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
873
- declare const databaseUsername: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
874
- declare const databasePassword: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
875
- declare const databaseSchema: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
876
- declare const databasePoolSize: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
877
- declare const databaseTimeout: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
878
- declare const databaseSsl: (input?: Partial<BooleanEnvVarSchemaInput>) => BooleanEnvVarSchema;
879
- declare const DATABASE_URL: StringEnvVarSchema;
880
- declare const DATABASE_HOST: StringEnvVarSchema;
881
- declare const DATABASE_PORT: NumberEnvVarSchema;
882
- declare const DATABASE_NAME: StringEnvVarSchema;
883
- declare const DATABASE_USERNAME: StringEnvVarSchema;
884
- declare const DATABASE_PASSWORD: StringEnvVarSchema;
885
- declare const DATABASE_SCHEMA: StringEnvVarSchema;
886
- declare const DATABASE_POOL_SIZE: NumberEnvVarSchema;
887
- declare const DATABASE_TIMEOUT: NumberEnvVarSchema;
888
- declare const DATABASE_SSL: BooleanEnvVarSchema;
889
- //#endregion
890
- //#region ../schemas/src/plain/docker.d.ts
891
- declare const dockerRegistryUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
892
- declare const dockerRegistryUsername: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
893
- declare const dockerRegistryPassword: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
894
- declare const DOCKER_REGISTRY_URL: StringEnvVarSchema;
895
- declare const DOCKER_REGISTRY_USERNAME: StringEnvVarSchema;
896
- declare const DOCKER_REGISTRY_PASSWORD: StringEnvVarSchema;
897
- declare const docker: {
898
- readonly DOCKER_REGISTRY_URL: StringEnvVarSchema;
899
- readonly DOCKER_REGISTRY_USERNAME: StringEnvVarSchema;
900
- readonly DOCKER_REGISTRY_PASSWORD: StringEnvVarSchema;
901
- };
902
- //#endregion
903
- //#region ../schemas/src/plain/elasticsearch.d.ts
904
- declare const elasticsearchUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
905
- declare const elasticsearchUsername: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
906
- declare const elasticsearchPassword: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
907
- declare const ELASTICSEARCH_URL: StringEnvVarSchema;
908
- declare const ELASTICSEARCH_USERNAME: StringEnvVarSchema;
909
- declare const ELASTICSEARCH_PASSWORD: StringEnvVarSchema;
910
- declare const elasticsearch: {
911
- readonly ELASTICSEARCH_URL: StringEnvVarSchema;
912
- readonly ELASTICSEARCH_USERNAME: StringEnvVarSchema;
913
- readonly ELASTICSEARCH_PASSWORD: StringEnvVarSchema;
914
- };
915
- //#endregion
916
- //#region ../schemas/src/plain/host.d.ts
917
- declare const host: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
918
- declare const HOST: StringEnvVarSchema;
919
- declare const hostSchema: {
920
- readonly HOST: StringEnvVarSchema;
921
- };
922
- //#endregion
923
- //#region ../schemas/src/plain/jwt.d.ts
924
- declare const jwtSecret: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
925
- declare const jwtAccessTokenExpiresIn: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
926
- declare const jwtRefreshTokenExpiresIn: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
927
- declare const JWT_SECRET: StringEnvVarSchema;
928
- declare const JWT_ACCESS_TOKEN_EXPIRES_IN: StringEnvVarSchema;
929
- declare const JWT_REFRESH_TOKEN_EXPIRES_IN: StringEnvVarSchema;
930
- declare const jwt: {
931
- readonly JWT_SECRET: StringEnvVarSchema;
932
- readonly JWT_ACCESS_TOKEN_EXPIRES_IN: StringEnvVarSchema;
933
- readonly JWT_REFRESH_TOKEN_EXPIRES_IN: StringEnvVarSchema;
934
- };
935
- //#endregion
936
- //#region ../schemas/src/plain/kafka.d.ts
937
- declare const kafkaBrokers: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
938
- declare const kafkaClientId: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
939
- declare const KAFKA_BROKERS: StringEnvVarSchema;
940
- declare const KAFKA_CLIENT_ID: StringEnvVarSchema;
941
- declare const kafka: {
942
- readonly KAFKA_BROKERS: StringEnvVarSchema;
943
- readonly KAFKA_CLIENT_ID: StringEnvVarSchema;
944
- };
945
- //#endregion
946
- //#region ../schemas/src/plain/logLevel.d.ts
947
- declare const logLevel: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
948
- declare const LOG_LEVEL: StringEnvVarSchema;
949
- declare const logLevelSchema: {
950
- readonly LOG_LEVEL: StringEnvVarSchema;
951
- };
952
- //#endregion
953
- //#region ../schemas/src/plain/monitoring.d.ts
954
- declare const newRelicLicenseKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
955
- declare const sentryDsn: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
956
- declare const jaegerEndpoint: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
957
- declare const prometheusPort: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
958
- declare const datadogApiKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
959
- declare const NEW_RELIC_LICENSE_KEY: StringEnvVarSchema;
960
- declare const SENTRY_DSN: StringEnvVarSchema;
961
- declare const JAEGER_ENDPOINT: StringEnvVarSchema;
962
- declare const PROMETHEUS_PORT: NumberEnvVarSchema;
963
- declare const DATADOG_API_KEY: StringEnvVarSchema;
964
- declare const monitoring: {
965
- readonly NEW_RELIC_LICENSE_KEY: StringEnvVarSchema;
966
- readonly SENTRY_DSN: StringEnvVarSchema;
967
- readonly JAEGER_ENDPOINT: StringEnvVarSchema;
968
- readonly PROMETHEUS_PORT: NumberEnvVarSchema;
969
- readonly DATADOG_API_KEY: StringEnvVarSchema;
970
- };
971
- //#endregion
972
- //#region ../schemas/src/plain/node.d.ts
973
- declare const nodeEnv: (input?: Partial<StringEnvVarSchemaInput>) => EnumEnvVarSchema<string>;
974
- declare const NODE_ENV: EnumEnvVarSchema<string>;
975
- declare const node: {
976
- readonly NODE_ENV: EnumEnvVarSchema<string>;
977
- };
978
- //#endregion
979
- //#region ../schemas/src/plain/oauth.d.ts
980
- declare const oauthClientId: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
981
- declare const oauthClientSecret: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
982
- declare const oauthRedirectUri: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
983
- declare const oauthScope: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
984
- declare const OAUTH_CLIENT_ID: StringEnvVarSchema;
985
- declare const OAUTH_CLIENT_SECRET: StringEnvVarSchema;
986
- declare const OAUTH_REDIRECT_URI: StringEnvVarSchema;
987
- declare const OAUTH_SCOPE: StringEnvVarSchema;
988
- declare const oauth: {
989
- readonly OAUTH_CLIENT_ID: StringEnvVarSchema;
990
- readonly OAUTH_CLIENT_SECRET: StringEnvVarSchema;
991
- readonly OAUTH_REDIRECT_URI: StringEnvVarSchema;
992
- readonly OAUTH_SCOPE: StringEnvVarSchema;
993
- };
994
- //#endregion
995
- //#region ../schemas/src/plain/openai.d.ts
996
- declare const openaiApiKey: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
997
- declare const openaiOrganizationId: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
998
- declare const openaiProjectId: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
999
- declare const openaiBaseUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1000
- declare const openaiModel: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1001
- declare const openaiTimeout: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
1002
- declare const OPENAI_API_KEY: StringEnvVarSchema;
1003
- declare const OPENAI_ORGANIZATION_ID: StringEnvVarSchema;
1004
- declare const OPENAI_PROJECT_ID: StringEnvVarSchema;
1005
- declare const OPENAI_BASE_URL: StringEnvVarSchema;
1006
- declare const OPENAI_MODEL: StringEnvVarSchema;
1007
- declare const OPENAI_TIMEOUT: NumberEnvVarSchema;
1008
- declare const openai: {
1009
- readonly OPENAI_API_KEY: StringEnvVarSchema;
1010
- readonly OPENAI_ORGANIZATION_ID: StringEnvVarSchema;
1011
- readonly OPENAI_PROJECT_ID: StringEnvVarSchema;
1012
- readonly OPENAI_BASE_URL: StringEnvVarSchema;
1013
- readonly OPENAI_MODEL: StringEnvVarSchema;
1014
- readonly OPENAI_TIMEOUT: NumberEnvVarSchema;
1015
- };
1016
- //#endregion
1017
- //#region ../schemas/src/plain/rabbitmq.d.ts
1018
- declare const rabbitmqUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1019
- declare const RABBITMQ_URL: StringEnvVarSchema;
1020
- declare const rabbitmq: {
1021
- readonly RABBITMQ_URL: StringEnvVarSchema;
1022
- };
1023
- //#endregion
1024
- //#region ../schemas/src/plain/redis.d.ts
1025
- declare const redisUrl: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1026
- declare const redisHost: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1027
- declare const redisPort: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
1028
- declare const redisPassword: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1029
- declare const redisUsername: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1030
- declare const redisDb: (input?: Partial<NumberEnvVarSchemaInput>) => NumberEnvVarSchema;
1031
- declare const redisTls: (input?: Partial<BooleanEnvVarSchemaInput>) => BooleanEnvVarSchema;
1032
- declare const redisTlsCaCertPath: (input?: Partial<StringEnvVarSchemaInput>) => StringEnvVarSchema;
1033
- declare const REDIS_URL: StringEnvVarSchema;
1034
- declare const REDIS_HOST: StringEnvVarSchema;
1035
- declare const REDIS_PORT: NumberEnvVarSchema;
1036
- declare const REDIS_PASSWORD: StringEnvVarSchema;
1037
- declare const REDIS_USERNAME: StringEnvVarSchema;
1038
- declare const REDIS_DB: NumberEnvVarSchema;
1039
- declare const REDIS_TLS: BooleanEnvVarSchema;
1040
- declare const REDIS_TLS_CA_CERT_PATH: StringEnvVarSchema;
1041
- declare const redis: {
1042
- readonly REDIS_URL: StringEnvVarSchema;
1043
- readonly REDIS_HOST: StringEnvVarSchema;
1044
- readonly REDIS_PORT: NumberEnvVarSchema;
1045
- readonly REDIS_PASSWORD: StringEnvVarSchema;
1046
- readonly REDIS_USERNAME: StringEnvVarSchema;
1047
- readonly REDIS_DB: NumberEnvVarSchema;
1048
- readonly REDIS_TLS: BooleanEnvVarSchema;
1049
- readonly REDIS_TLS_CA_CERT_PATH: StringEnvVarSchema;
1050
- };
1051
- declare namespace index_d_exports {
1052
- export { API_BASE_URL, API_KEY, API_TIMEOUT, AWS_ACCESS_KEY_ID, AWS_REGION, AWS_S3_BUCKET_NAME, AWS_SECRET_ACCESS_KEY, AWS_SQS_QUEUE_URL, AZURE_EVENT_HUB_CONNECTION_STRING, AZURE_SERVICE_BUS_CONNECTION_STRING, AZURE_STORAGE_ACCOUNT_KEY, AZURE_STORAGE_ACCOUNT_NAME, AZURE_STORAGE_CONNECTION_STRING, CORS_ORIGIN, DATABASE_HOST, DATABASE_NAME, DATABASE_PASSWORD, DATABASE_POOL_SIZE, DATABASE_PORT, DATABASE_SCHEMA, DATABASE_SSL, DATABASE_TIMEOUT, DATABASE_URL, DATABASE_USERNAME, DATADOG_API_KEY, DOCKER_REGISTRY_PASSWORD, DOCKER_REGISTRY_URL, DOCKER_REGISTRY_USERNAME, ELASTICSEARCH_PASSWORD, ELASTICSEARCH_URL, ELASTICSEARCH_USERNAME, HOST, JAEGER_ENDPOINT, JWT_ACCESS_TOKEN_EXPIRES_IN, JWT_REFRESH_TOKEN_EXPIRES_IN, JWT_SECRET, KAFKA_BROKERS, KAFKA_CLIENT_ID, LOG_LEVEL, NEW_RELIC_LICENSE_KEY, NODE_ENV, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_REDIRECT_URI, OAUTH_SCOPE, OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL, OPENAI_ORGANIZATION_ID, OPENAI_PROJECT_ID, OPENAI_TIMEOUT, PORT, PROMETHEUS_PORT, RABBITMQ_URL, REDIS_DB, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REDIS_TLS, REDIS_TLS_CA_CERT_PATH, REDIS_URL, REDIS_USERNAME, SENTRY_DSN, apiBaseUrl, apiKey, apiTimeout, aws, awsAccessKeyId, awsRegion, awsS3BucketName, awsSecretAccessKey, awsSqsQueueUrl, azure, azureEventHubConnectionString, azureServiceBusConnectionString, azureStorageAccountKey, azureStorageAccountName, azureStorageConnectionString, cors, corsOrigin, databaseHost, databaseName, databasePassword, databasePoolSize, databasePort, databaseSchema, databaseSsl, databaseTimeout, databaseUrl, databaseUsername, datadogApiKey, docker, dockerRegistryPassword, dockerRegistryUrl, dockerRegistryUsername, elasticsearch, elasticsearchPassword, elasticsearchUrl, elasticsearchUsername, host, hostSchema, jaegerEndpoint, jwt, jwtAccessTokenExpiresIn, jwtRefreshTokenExpiresIn, jwtSecret, kafka, kafkaBrokers, kafkaClientId, logLevel, logLevelSchema, monitoring, newRelicLicenseKey, node, nodeEnv, oauth, oauthClientId, oauthClientSecret, oauthRedirectUri, oauthScope, openai, openaiApiKey, openaiBaseUrl, openaiModel, openaiOrganizationId, openaiProjectId, openaiTimeout, port, prometheusPort, rabbitmq, rabbitmqUrl, redis, redisDb, redisHost, redisPassword, redisPort, redisTls, redisTlsCaCertPath, redisUrl, redisUsername, sentryDsn };
1053
- }
1054
- //#endregion
1055
- export { BooleanEnvVarSchema, BooleanEnvVarSchemaInput, BooleanPreprocessorOptions, DefaultChannelConfig, DefaultEnvChannel, DotEnvChannel, DotEnvChannelConfig, DotEnvConfigOptions, DotEnvConfigOutput, DotEnvInstance, DotEnvParseOptions, DotEnvXChannel, DotEnvXChannelConfig, DotEnvXGetOptions, DotEnvXInstance, DotEnvXSetOptions, EnumEnvVarSchema, EnumEnvVarSchemaInput, EnvChannel, EnvChannelOptions, EnvModel, EnvModelOptions, EnvParseError, EnvParseIssue, EnvParseIssueInvalid, EnvParseIssueMissing, EnvParseResult, EnvPrimitiveValue, EnvRecord, EnvSelectionRecord, EnvSource, EnvVarSchema, EnvVarSchemaBase, EnvVarSchemaDetails, EnvVarSchemaInput, EnvVarType, InferEnvType, InferSchemaType, NumberEnvVarSchema, NumberEnvVarSchemaInput, ParseEnvOptions, Preprocessor, Preprocessors, ProcessChannelConfig, ProcessEnvChannel, ProcessEnvChannelConfig, Processor, PromptEnvOptions, SchemaConverter, StringEnvVarSchema, StringEnvVarSchemaInput, SupportedSchema, booleanPreprocessor, booleanProcessor, defaults_d_exports as defaults, define, enumPreprocessor, enumProcessor, get, isEnvVarSchema, numberPreprocessor, numberProcessor, parse, preprocessors, processors, prompt, resolveChannel, resolvePreprocessor, resolveSchema, resolveSchemas, s, schema, index_d_exports as schemas, set, source, stringPreprocessor, stringProcessor };