@e-n-v/env 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BooleanMap-B7MeMkJC.d.ts → BooleanMap-BPQuO3Ae.d.ts} +1 -3
- package/dist/{BooleanMap-D93UJnv5.d.cts → BooleanMap-CX_YrPCf.d.cts} +1 -3
- package/dist/EnvChannelOptions-BbKeuO-o.d.cts +366 -0
- package/dist/EnvChannelOptions-BbKeuO-o.d.ts +366 -0
- package/dist/{EnvSource-DA3ZGlES.js → EnvSource-WAGWqRVM.js} +6 -10
- package/dist/{EnvSource-BVnmdHku.cjs → EnvSource-s8F_M_6O.cjs} +21 -28
- package/dist/EnvVarSchema-CDZGmnex.cjs +15 -0
- package/dist/EnvVarSchema-Dr6q7jf6.js +10 -0
- package/dist/{ProcessEnvChannel-Do4-yiLI.d.ts → ProcessEnvChannel-CwhV7_EB.d.ts} +2 -4
- package/dist/{ProcessEnvChannel-D465c-dp.d.cts → ProcessEnvChannel-DWHPZePe.d.cts} +2 -4
- package/dist/channels.cjs +3 -4
- package/dist/channels.d.cts +3 -4
- package/dist/channels.d.ts +3 -4
- package/dist/channels.js +2 -4
- package/dist/cli.cjs +10 -23
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -13
- package/dist/core.cjs +13 -14
- package/dist/core.d.cts +147 -6
- package/dist/core.d.ts +147 -6
- package/dist/core.js +9 -11
- package/dist/{custom-Bt_wnxIu.js → custom-Bd-jLg80.js} +3 -12
- package/dist/{custom-D_Rqjm09.cjs → custom-Dyb9TnER.cjs} +48 -58
- package/dist/files.cjs +6 -6
- package/dist/files.d.cts +2 -2
- package/dist/files.d.ts +2 -2
- package/dist/files.js +2 -5
- package/dist/{parse-awxwtQ1N.d.ts → index-B2eNij2x.d.cts} +1 -2
- package/dist/{parse-5fpTbjTr.d.cts → index-BHTM8nxS.d.ts} +1 -2
- package/dist/{prompt-DG8haZjn.d.ts → index-BKBW9Dxs.d.cts} +3 -4
- package/dist/{prompt-lmZdPaBh.d.cts → index-CEyOIRdj.d.ts} +3 -4
- package/dist/{EnvModel-BiT0OiDZ.d.ts → index-Cb0abjLf.d.ts} +59 -7
- package/dist/{EnvModel-I0fWZZ_n.d.cts → index-Cz3frUwZ.d.cts} +58 -6
- package/dist/index.cjs +27 -30
- package/dist/index.d.cts +11 -13
- package/dist/index.d.ts +11 -13
- package/dist/index.js +8 -14
- package/dist/model.cjs +10 -11
- package/dist/model.d.cts +2 -35
- package/dist/model.d.ts +2 -35
- package/dist/model.js +2 -6
- package/dist/parse.cjs +14 -14
- package/dist/parse.d.cts +5 -8
- package/dist/parse.d.ts +5 -8
- package/dist/parse.js +4 -7
- package/dist/preprocessors-BKuIcZa1.d.ts +83 -0
- package/dist/preprocessors-DFVyF0c7.d.cts +83 -0
- package/dist/prompt.cjs +12 -15
- package/dist/prompt.d.cts +5 -10
- package/dist/prompt.d.ts +5 -10
- package/dist/prompt.js +3 -9
- package/dist/{redis-Cazgs3_J.cjs → redis-CyTF0SYT.cjs} +260 -268
- package/dist/{redis-DXhlNtvD.js → redis-D18f4ztf.js} +15 -22
- package/dist/{index-UQm0jdkG.d.cts → redis-DsW-Vkwq.d.cts} +2 -6
- package/dist/{index-ClKndmJv.d.ts → redis-tRD4nAy_.d.ts} +2 -6
- package/dist/{resolveChannel-v9BDsw-M.js → resolveChannel-D1Fzl4TL.js} +59 -63
- package/dist/{resolveChannel-CjAuxy3p.cjs → resolveChannel-DxZNYdDe.cjs} +84 -92
- package/dist/{chunk-pbleEpgJ.cjs → rolldown-runtime-C0BPl7ul.cjs} +15 -16
- package/dist/{chunk-Bp6m_JJh.js → rolldown-runtime-D7D4PA-g.js} +4 -4
- package/dist/{schema-DdDa3Qjy.d.cts → schema-B-JLVS42.d.ts} +1 -3
- package/dist/{schema-CHypJTDK.d.ts → schema-B1i83alz.d.cts} +1 -3
- package/dist/schema-CtP5lpU1.js +11 -0
- package/dist/schema-D9nJKipf.cjs +22 -0
- package/dist/schemas/zod.cjs +42 -340
- package/dist/schemas/zod.d.cts +112 -114
- package/dist/schemas/zod.d.ts +112 -114
- package/dist/schemas/zod.js +111 -401
- package/dist/schemas.cjs +152 -155
- package/dist/schemas.d.cts +1 -2
- package/dist/schemas.d.ts +1 -2
- package/dist/schemas.js +2 -6
- package/dist/{src-CdqOYilA.cjs → src-5GYFbR9n.cjs} +21 -24
- package/dist/{src-BrNrE0hX.js → src-8rEOvFG5.js} +11 -14
- package/dist/{src-DI-VW4dW.js → src-CdzAzdq-.js} +77 -110
- package/dist/{src-B5Qu-M-r.js → src-Cg49gGJb.js} +9 -43
- package/dist/{src-dO72HN6e.cjs → src-CttkcdpE.cjs} +90 -130
- package/dist/{src-PHSSk-t3.cjs → src-D5KzIEH_.cjs} +130 -110
- package/dist/{src-DVdOONrX.cjs → src-DB0Har0j.cjs} +911 -932
- package/dist/{src-DQaQ28lz.js → src-DWc-WWjX.js} +107 -89
- package/dist/{src-vBXlFkSP.js → src-DvUBRBe3.js} +115 -136
- package/dist/{src-DywfI0fM.cjs → src-TZx_e95f.cjs} +78 -131
- package/dist/{vars-DF9DoAF4.d.ts → vars-DtzGL5Nc.d.cts} +1 -4
- package/dist/{vars-KUgv2rti.d.cts → vars-obKYxaSu.d.ts} +1 -4
- package/dist/vars.cjs +175 -160
- package/dist/vars.d.cts +2 -6
- package/dist/vars.d.ts +2 -6
- package/dist/vars.js +21 -9
- package/package.json +3 -2
- package/dist/EnvChannelOptions-BPkWDrmr.d.cts +0 -108
- package/dist/EnvChannelOptions-CRwDLWjd.d.ts +0 -108
- package/dist/coerce-DNIuYAx4.js +0 -11028
- package/dist/coerce-b7UVodS9.cjs +0 -12365
- package/dist/model-BNDYMM9l.d.ts +0 -29
- package/dist/model-CJMnbGuS.d.cts +0 -29
- package/dist/validate-8HbVniNt.d.cts +0 -204
- package/dist/validate-CE8hQ5JG.d.ts +0 -204
- package/dist/vars-BHXXBiY1.cjs +0 -27
- package/dist/vars-FOuH_HuL.js +0 -22
- /package/dist/{EnvChannel-LMIRYvT1.d.cts → EnvChannel-CfSwa_25.d.cts} +0 -0
- /package/dist/{EnvChannel-w27PEm7x.d.ts → EnvChannel-CfSwa_25.d.ts} +0 -0
- /package/dist/{StringEnvVarSchema-BwSGgmeG.d.ts → StringEnvVarSchema-D9Jr1Aws.d.cts} +0 -0
- /package/dist/{StringEnvVarSchema-DnsZTIS0.d.cts → StringEnvVarSchema-D9Jr1Aws.d.ts} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { a as EnumEnvVarSchema, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-
|
|
2
|
-
|
|
1
|
+
import { a as EnumEnvVarSchema, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-D9Jr1Aws.js";
|
|
3
2
|
//#region ../core/src/schemas/EnvVarSchema.d.ts
|
|
4
|
-
|
|
5
3
|
type EnvVarSchema = StringEnvVarSchema | NumberEnvVarSchema | BooleanEnvVarSchema | EnumEnvVarSchema<any>;
|
|
6
4
|
/**
|
|
7
5
|
* Type guard to check if a value is a EnvVarSchema instance
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { a as EnumEnvVarSchema, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-
|
|
2
|
-
|
|
1
|
+
import { a as EnumEnvVarSchema, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-D9Jr1Aws.cjs";
|
|
3
2
|
//#region ../core/src/schemas/EnvVarSchema.d.ts
|
|
4
|
-
|
|
5
3
|
type EnvVarSchema = StringEnvVarSchema | NumberEnvVarSchema | BooleanEnvVarSchema | EnumEnvVarSchema<any>;
|
|
6
4
|
/**
|
|
7
5
|
* Type guard to check if a value is a EnvVarSchema instance
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { URL } from "url";
|
|
2
|
+
//#region ../channels/src/channels/dotenv/DotEnvInstance.d.ts
|
|
3
|
+
interface DotEnvConfigOptions {
|
|
4
|
+
path?: string;
|
|
5
|
+
encoding?: string;
|
|
6
|
+
debug?: boolean;
|
|
7
|
+
override?: boolean;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface DotEnvConfigOutput {
|
|
11
|
+
parsed?: Record<string, string>;
|
|
12
|
+
error?: Error;
|
|
13
|
+
}
|
|
14
|
+
interface DotEnvParseOptions {
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
interface DotEnvInstance {
|
|
19
|
+
parse(src: string | Buffer, options?: DotEnvParseOptions): Record<string, string | undefined>;
|
|
20
|
+
config?(options?: DotEnvConfigOptions): DotEnvConfigOutput;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region ../channels/src/channels/dotenv/DotEnvChannelConfig.d.ts
|
|
24
|
+
interface DotEnvChannelConfig {
|
|
25
|
+
dotenv: DotEnvInstance;
|
|
26
|
+
path?: string;
|
|
27
|
+
get?: DotEnvConfigOptions & {
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
parse?: DotEnvParseOptions & {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../node_modules/@dotenvx/dotenvx/src/lib/main.d.ts
|
|
36
|
+
interface DotenvParseOutput {
|
|
37
|
+
[name: string]: string;
|
|
38
|
+
}
|
|
39
|
+
interface DotenvConfigOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Specify explicit env sources. When set, `path` and `convention` are ignored.
|
|
42
|
+
*
|
|
43
|
+
* @default undefined
|
|
44
|
+
* @example require('@dotenvx/dotenvx').config({ envs: [{ type: 'envFile', value: '.env' }] })
|
|
45
|
+
* @example require('@dotenvx/dotenvx').config({ envs: [{ type: 'env', value: 'HELLO=World', privateKeyName: 'DOTENV_PRIVATE_KEY' }] })
|
|
46
|
+
*/
|
|
47
|
+
envs?: DotenvConfigEnv[];
|
|
48
|
+
/**
|
|
49
|
+
* Specify a custom path if your file containing environment variables is located elsewhere.
|
|
50
|
+
* Can also be an array of strings, specifying multiple paths.
|
|
51
|
+
*
|
|
52
|
+
* @default require('path').resolve(process.cwd(), '.env')
|
|
53
|
+
* @example require('@dotenvx/dotenvx').config({ path: '/custom/path/to/.env' })
|
|
54
|
+
* @example require('@dotenvx/dotenvx').config({ path: ['/path/to/first.env', '/path/to/second.env'] })
|
|
55
|
+
*/
|
|
56
|
+
path?: string | string[] | URL;
|
|
57
|
+
/**
|
|
58
|
+
* Specify the encoding of your file containing environment variables.
|
|
59
|
+
*
|
|
60
|
+
* @default 'utf8'
|
|
61
|
+
* @example require('@dotenvx/dotenvx').config({ encoding: 'latin1' })
|
|
62
|
+
*/
|
|
63
|
+
encoding?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Override any environment variables that have already been set on your machine with values from your .env file.
|
|
66
|
+
* @default false
|
|
67
|
+
* @example require('@dotenvx/dotenvx').config({ overload: true })
|
|
68
|
+
* @alias overload
|
|
69
|
+
*/
|
|
70
|
+
overload?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @default false
|
|
73
|
+
* @alias override
|
|
74
|
+
*/
|
|
75
|
+
override?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Throw immediately if an error is encountered - like a missing .env file.
|
|
78
|
+
* @default false
|
|
79
|
+
* @example require('@dotenvx/dotenvx').config({ strict: true })
|
|
80
|
+
*/
|
|
81
|
+
strict?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Suppress specific errors like MISSING_ENV_FILE. The error keys can be found
|
|
84
|
+
* in src/lib/helpers/errors.js
|
|
85
|
+
* @default []
|
|
86
|
+
* @example require('@dotenvx/dotenvx').config({ ignore: ['MISSING_ENV_FILE'] })
|
|
87
|
+
*/
|
|
88
|
+
ignore?: string[];
|
|
89
|
+
/**
|
|
90
|
+
* Specify an object to write your secrets to. Defaults to process.env environment variables.
|
|
91
|
+
*
|
|
92
|
+
* @default process.env
|
|
93
|
+
* @example const processEnv = {}; require('@dotenvx/dotenvx').config({ processEnv: processEnv })
|
|
94
|
+
*/
|
|
95
|
+
processEnv?: DotenvPopulateInput;
|
|
96
|
+
/**
|
|
97
|
+
* Mask resolved values, optionally setting the number of visible characters.
|
|
98
|
+
* @default false
|
|
99
|
+
* @example require('@dotenvx/dotenvx').config({ mask: true })
|
|
100
|
+
* @example require('@dotenvx/dotenvx').config({ mask: 0 })
|
|
101
|
+
*/
|
|
102
|
+
mask?: boolean | number;
|
|
103
|
+
/**
|
|
104
|
+
* Customize the path to your .env.keys file. This is useful with monorepos.
|
|
105
|
+
* @default []
|
|
106
|
+
* @example require('@dotenvx/dotenvx').config({ envKeysFile: '../../.env.keys'} })
|
|
107
|
+
*/
|
|
108
|
+
envKeysFile?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Legacy option retained for compatibility.
|
|
111
|
+
*
|
|
112
|
+
* @default undefined
|
|
113
|
+
* @example require('@dotenvx/dotenvx').config({ DOTENV_KEY: 'dotenv://:key_1234…' })
|
|
114
|
+
*/
|
|
115
|
+
DOTENV_KEY?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Load a .env convention (available conventions: 'nextjs, flow')
|
|
118
|
+
*/
|
|
119
|
+
convention?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Turn on logging to help debug why certain keys or values are not being set as you expect.
|
|
122
|
+
*
|
|
123
|
+
* @default false
|
|
124
|
+
* @example require('@dotenvx/dotenvx').config({ debug: process.env.DEBUG })
|
|
125
|
+
*/
|
|
126
|
+
debug?: boolean;
|
|
127
|
+
verbose?: boolean;
|
|
128
|
+
quiet?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Disable spinner output from child Dotenvx Armor commands.
|
|
131
|
+
*
|
|
132
|
+
* @default false
|
|
133
|
+
* @example require('@dotenvx/dotenvx').config({ noSpinner: true })
|
|
134
|
+
*/
|
|
135
|
+
noSpinner?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Set Armor token.
|
|
138
|
+
*
|
|
139
|
+
* @example require('@dotenvx/dotenvx').config({ token: process.env.DOTENVX_ARMOR_TOKEN })
|
|
140
|
+
*/
|
|
141
|
+
token?: string;
|
|
142
|
+
logLevel?: 'error' | 'warn' | 'success' | 'info' | 'help' | 'verbose' | 'debug';
|
|
143
|
+
/**
|
|
144
|
+
* Turn off Dotenvx Armor features.
|
|
145
|
+
*
|
|
146
|
+
* @default false
|
|
147
|
+
* @example require('@dotenvx/dotenvx').config({ noArmor: true })
|
|
148
|
+
*/
|
|
149
|
+
noArmor?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Turn off OS secret store features.
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
* @example require('@dotenvx/dotenvx').config({ noNative: true })
|
|
155
|
+
*/
|
|
156
|
+
noNative?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Turn off 1Password secret reference resolution.
|
|
159
|
+
*
|
|
160
|
+
* @default false
|
|
161
|
+
* @example require('@dotenvx/dotenvx').config({ no1Password: true })
|
|
162
|
+
*/
|
|
163
|
+
no1Password?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Turn off Bitwarden secret reference resolution.
|
|
166
|
+
*
|
|
167
|
+
* @default false
|
|
168
|
+
* @example require('@dotenvx/dotenvx').config({ noBitwarden: true })
|
|
169
|
+
*/
|
|
170
|
+
noBitwarden?: boolean;
|
|
171
|
+
}
|
|
172
|
+
type DotenvConfigEnv = DotenvConfigEnvFile | DotenvConfigEnvSrc;
|
|
173
|
+
interface DotenvConfigEnvFile {
|
|
174
|
+
type: 'envFile';
|
|
175
|
+
value: string | URL;
|
|
176
|
+
}
|
|
177
|
+
interface DotenvConfigEnvSrc {
|
|
178
|
+
type: 'env';
|
|
179
|
+
value: string | Buffer;
|
|
180
|
+
privateKeyName?: string;
|
|
181
|
+
}
|
|
182
|
+
interface DotenvConfigOutput {
|
|
183
|
+
error?: Error;
|
|
184
|
+
parsed?: DotenvParseOutput;
|
|
185
|
+
}
|
|
186
|
+
interface DotenvPopulateInput {
|
|
187
|
+
[name: string]: string;
|
|
188
|
+
}
|
|
189
|
+
interface SetOptions {
|
|
190
|
+
/**
|
|
191
|
+
* Specify a custom path if your file containing environment variables is located elsewhere.
|
|
192
|
+
* Can also be an array of strings, specifying multiple paths.
|
|
193
|
+
*
|
|
194
|
+
* @default require('path').resolve(process.cwd(), '.env')
|
|
195
|
+
* @example require('@dotenvx/dotenvx').set(key, value, { path: '/custom/path/to/.env' })
|
|
196
|
+
* @example require('@dotenvx/dotenvx').set(key, value, { path: ['/path/to/first.env', '/path/to/second.env'] })
|
|
197
|
+
*/
|
|
198
|
+
path?: string | string[] | URL;
|
|
199
|
+
/**
|
|
200
|
+
* Customize the path to your .env.keys file. This is useful with monorepos.
|
|
201
|
+
* @default []
|
|
202
|
+
* @example require('@dotenvx/dotenvx').config(key, value, { envKeysFile: '../../.env.keys'} })
|
|
203
|
+
*/
|
|
204
|
+
envKeysFile?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Set a .env convention (available conventions: 'nextjs, flow')
|
|
207
|
+
*/
|
|
208
|
+
convention?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Specify whether the variable has to be encrypted
|
|
211
|
+
* @default true
|
|
212
|
+
* @example require('@dotenvx/dotenvx').config(key, value, { encrypt: false } })
|
|
213
|
+
*/
|
|
214
|
+
encrypt?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Turn off Dotenvx Armor features.
|
|
217
|
+
*
|
|
218
|
+
* @default false
|
|
219
|
+
* @example require('@dotenvx/dotenvx').set(key, value, { noArmor: true })
|
|
220
|
+
*/
|
|
221
|
+
noArmor?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Turn off OS secret store features.
|
|
224
|
+
*
|
|
225
|
+
* @default false
|
|
226
|
+
* @example require('@dotenvx/dotenvx').set(key, value, { noNative: true })
|
|
227
|
+
*/
|
|
228
|
+
noNative?: boolean;
|
|
229
|
+
}
|
|
230
|
+
interface GetOptions {
|
|
231
|
+
/**
|
|
232
|
+
* Mask returned values, optionally setting the number of visible characters.
|
|
233
|
+
* @default false
|
|
234
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { mask: true })
|
|
235
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { mask: 0 })
|
|
236
|
+
*/
|
|
237
|
+
mask?: boolean | number;
|
|
238
|
+
/**
|
|
239
|
+
* Suppress specific errors like MISSING_ENV_FILE. The error keys can be found
|
|
240
|
+
* in src/lib/helpers/errors.js
|
|
241
|
+
* @default []
|
|
242
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { ignore: ['MISSING_ENV_FILE'] })
|
|
243
|
+
*/
|
|
244
|
+
ignore?: string[];
|
|
245
|
+
/**
|
|
246
|
+
* Override any environment variables that have already been set on your machine with values from your .env file.
|
|
247
|
+
* @default false
|
|
248
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { overload: true })
|
|
249
|
+
* @alias overload
|
|
250
|
+
*/
|
|
251
|
+
overload?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Customize the path to your .env.keys file. This is useful with monorepos.
|
|
254
|
+
* @default []
|
|
255
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { envKeysFile: '../../.env.keys'} })
|
|
256
|
+
*/
|
|
257
|
+
envKeysFile?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Throw immediately if an error is encountered - like a missing .env file.
|
|
260
|
+
* @default false
|
|
261
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { strict: true })
|
|
262
|
+
*/
|
|
263
|
+
strict?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Turn off Dotenvx Armor features.
|
|
266
|
+
*
|
|
267
|
+
* @default false
|
|
268
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { noArmor: true })
|
|
269
|
+
*/
|
|
270
|
+
noArmor?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Turn off OS secret store features.
|
|
273
|
+
*
|
|
274
|
+
* @default false
|
|
275
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { noNative: true })
|
|
276
|
+
*/
|
|
277
|
+
noNative?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Turn off 1Password secret reference resolution.
|
|
280
|
+
*
|
|
281
|
+
* @default false
|
|
282
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { no1Password: true })
|
|
283
|
+
*/
|
|
284
|
+
no1Password?: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Turn off Bitwarden secret reference resolution.
|
|
287
|
+
*
|
|
288
|
+
* @default false
|
|
289
|
+
* @example require('@dotenvx/dotenvx').get('KEY', { noBitwarden: true })
|
|
290
|
+
*/
|
|
291
|
+
noBitwarden?: boolean;
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region ../channels/src/channels/dotenvx/DotEnvXInstance.d.ts
|
|
295
|
+
/**
|
|
296
|
+
* Minimal interface for dotenvx functionality used in ask-env.
|
|
297
|
+
*/
|
|
298
|
+
interface DotEnvXInstance {
|
|
299
|
+
get(key: string, options?: GetOptions): Promise<string>;
|
|
300
|
+
set(key: string, value: string, options?: SetOptions): Promise<unknown>;
|
|
301
|
+
config(options?: DotenvConfigOptions): DotenvConfigOutput;
|
|
302
|
+
}
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region ../channels/src/channels/dotenvx/DotEnvXGetOptions.d.ts
|
|
305
|
+
/**
|
|
306
|
+
* Get options without envKeysFile since we manage that ourselves
|
|
307
|
+
*/
|
|
308
|
+
type DotEnvXGetOptions = Omit<GetOptions, "envKeysFile">;
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region ../channels/src/channels/dotenvx/DotEnvXSetOptions.d.ts
|
|
311
|
+
/**
|
|
312
|
+
* Set options without envKeysFile since we manage that ourselves
|
|
313
|
+
*/
|
|
314
|
+
type DotEnvXSetOptions = Omit<SetOptions, "envKeysFile">;
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region ../channels/src/channels/dotenvx/DotEnvXChannelConfig.d.ts
|
|
317
|
+
/**
|
|
318
|
+
* DotEnvX channel configuration
|
|
319
|
+
*/
|
|
320
|
+
interface DotEnvXChannelConfig {
|
|
321
|
+
dotenvx: DotEnvXInstance;
|
|
322
|
+
get?: DotEnvXGetOptions & {
|
|
323
|
+
[key: string]: unknown;
|
|
324
|
+
};
|
|
325
|
+
set?: DotEnvXSetOptions & {
|
|
326
|
+
[key: string]: unknown;
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region ../channels/src/channels/default/DefaultChannelConfig.d.ts
|
|
331
|
+
/**
|
|
332
|
+
* Default channel configuration
|
|
333
|
+
*/
|
|
334
|
+
interface DefaultChannelConfig {
|
|
335
|
+
name: "default";
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region ../channels/src/channels/processenv/ProcessEnvChannelConfig.d.ts
|
|
339
|
+
/**
|
|
340
|
+
* Configuration for ProcessEnv channel using name
|
|
341
|
+
*/
|
|
342
|
+
interface ProcessEnvChannelConfig {
|
|
343
|
+
name: "processenv";
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Configuration for ProcessEnv channel using process shorthand
|
|
347
|
+
*/
|
|
348
|
+
interface ProcessChannelConfig {
|
|
349
|
+
process: NodeJS.Process;
|
|
350
|
+
}
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region ../channels/src/EnvChannelOptions.d.ts
|
|
353
|
+
/**
|
|
354
|
+
* Channel options can be:
|
|
355
|
+
* - undefined (uses default channel)
|
|
356
|
+
* - "default" string (uses default channel)
|
|
357
|
+
* - "processenv" string (uses process.env channel)
|
|
358
|
+
* - dotenvx instance (uses dotenvx with default options)
|
|
359
|
+
* - DotEnvXChannelConfig (uses dotenvx with custom options)
|
|
360
|
+
* - DefaultChannelConfig (uses default with custom options)
|
|
361
|
+
* - ProcessEnvChannelConfig (uses process.env with config options)
|
|
362
|
+
* - ProcessChannelConfig (uses process.env with { process } notation)
|
|
363
|
+
*/
|
|
364
|
+
type EnvChannelOptions = undefined | "default" | "processenv" | DotEnvChannelConfig | DotEnvXChannelConfig | DefaultChannelConfig | ProcessEnvChannelConfig | ProcessChannelConfig;
|
|
365
|
+
//#endregion
|
|
366
|
+
export { DotEnvXChannelConfig as a, DotEnvXInstance as c, DotEnvConfigOutput as d, DotEnvInstance as f, DefaultChannelConfig as i, DotEnvChannelConfig as l, ProcessChannelConfig as n, DotEnvXSetOptions as o, DotEnvParseOptions as p, ProcessEnvChannelConfig as r, DotEnvXGetOptions as s, EnvChannelOptions as t, DotEnvConfigOptions as u };
|