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