@hkdigital/lib-core 0.4.31 → 0.4.32
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/util/sveltekit/env/all.d.ts +4 -15
- package/dist/util/sveltekit/env/all.js +2 -20
- package/dist/util/sveltekit/env/parsers.d.ts +17 -31
- package/dist/util/sveltekit/env/parsers.js +15 -15
- package/dist/util/sveltekit/env/private.d.ts +6 -8
- package/dist/util/sveltekit/env/private.js +4 -4
- package/dist/util/sveltekit/env/public.d.ts +6 -8
- package/dist/util/sveltekit/env/public.js +3 -3
- package/dist/util/sveltekit/env-all.d.ts +1 -1
- package/dist/util/sveltekit/env-all.js +2 -4
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {boolean} [options.autoGroup=true]
|
|
14
14
|
* Enable automatic prefix grouping
|
|
15
15
|
*
|
|
16
|
-
* @returns {
|
|
16
|
+
* @returns {Record<string, any>} Grouped and parsed combined environment variables
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* // Environment variables:
|
|
@@ -34,21 +34,10 @@ export function getAllEnv(options?: {
|
|
|
34
34
|
camelCase?: boolean | undefined;
|
|
35
35
|
parseValues?: boolean | undefined;
|
|
36
36
|
autoGroup?: boolean | undefined;
|
|
37
|
-
}):
|
|
38
|
-
/**
|
|
39
|
-
* Get combined environment variables by prefix
|
|
40
|
-
*
|
|
41
|
-
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
42
|
-
* @param {Object} [options={}] - Parsing options
|
|
43
|
-
*
|
|
44
|
-
* @returns {Object} Parsed configuration object
|
|
45
|
-
*/
|
|
46
|
-
export function getAllEnvByPrefix(prefix: string, options?: Object): Object;
|
|
37
|
+
}): Record<string, any>;
|
|
47
38
|
/**
|
|
48
39
|
* Get raw combined environment variables (no parsing)
|
|
49
40
|
*
|
|
50
|
-
* @returns {
|
|
41
|
+
* @returns {Record<string, string|undefined>} Raw combined environment variables
|
|
51
42
|
*/
|
|
52
|
-
export function getRawAllEnv():
|
|
53
|
-
[x: string]: string;
|
|
54
|
-
};
|
|
43
|
+
export function getRawAllEnv(): Record<string, string | undefined>;
|
|
@@ -31,7 +31,7 @@ import { autoGroupEnvByPrefix } from './parsers.js';
|
|
|
31
31
|
* @param {boolean} [options.autoGroup=true]
|
|
32
32
|
* Enable automatic prefix grouping
|
|
33
33
|
*
|
|
34
|
-
* @returns {
|
|
34
|
+
* @returns {Record<string, any>} Grouped and parsed combined environment variables
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* // Environment variables:
|
|
@@ -65,28 +65,10 @@ export function getAllEnv(options = {}) {
|
|
|
65
65
|
return { ...publicVars, ...privateVars };
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* Get combined environment variables by prefix
|
|
70
|
-
*
|
|
71
|
-
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
72
|
-
* @param {Object} [options={}] - Parsing options
|
|
73
|
-
*
|
|
74
|
-
* @returns {Object} Parsed configuration object
|
|
75
|
-
*/
|
|
76
|
-
export function getAllEnvByPrefix(prefix, options = {}) {
|
|
77
|
-
const prefixWithUnderscore = prefix.endsWith('_') ? prefix : `${prefix}_`;
|
|
78
|
-
|
|
79
|
-
return getAllEnv({
|
|
80
|
-
...options,
|
|
81
|
-
prefix: prefixWithUnderscore,
|
|
82
|
-
removePrefix: true
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
68
|
/**
|
|
87
69
|
* Get raw combined environment variables (no parsing)
|
|
88
70
|
*
|
|
89
|
-
* @returns {
|
|
71
|
+
* @returns {Record<string, string|undefined>} Raw combined environment variables
|
|
90
72
|
*/
|
|
91
73
|
export function getRawAllEnv() {
|
|
92
74
|
const publicVars = getRawPublicEnv();
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/**
|
|
18
18
|
* Parse environment object with type conversion and key transformation
|
|
19
19
|
*
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
21
21
|
* @param {Object} [options={}] - Parsing options
|
|
22
22
|
* @param {boolean} [options.camelCase=true]
|
|
23
23
|
* Convert env var names to camelCase object keys
|
|
@@ -27,28 +27,24 @@
|
|
|
27
27
|
* @param {boolean} [options.removePrefix=true]
|
|
28
28
|
* Remove prefix from resulting keys
|
|
29
29
|
*
|
|
30
|
-
* @returns {
|
|
30
|
+
* @returns {Record<string, any>} Parsed environment object
|
|
31
31
|
*/
|
|
32
|
-
export function parseEnv(env: {
|
|
33
|
-
[x: string]: string;
|
|
34
|
-
}, options?: {
|
|
32
|
+
export function parseEnv(env: Record<string, string | undefined>, options?: {
|
|
35
33
|
camelCase?: boolean | undefined;
|
|
36
34
|
parseValues?: boolean | undefined;
|
|
37
35
|
prefix?: string | undefined;
|
|
38
36
|
removePrefix?: boolean | undefined;
|
|
39
|
-
}):
|
|
37
|
+
}): Record<string, any>;
|
|
40
38
|
/**
|
|
41
39
|
* Parse environment variables by prefix
|
|
42
40
|
*
|
|
43
|
-
* @param {
|
|
41
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
44
42
|
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
45
43
|
* @param {Object} [options={}] - Parsing options
|
|
46
44
|
*
|
|
47
|
-
* @returns {
|
|
45
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
48
46
|
*/
|
|
49
|
-
export function parseEnvByPrefix(env:
|
|
50
|
-
[x: string]: string;
|
|
51
|
-
}, prefix: string, options?: Object): Object;
|
|
47
|
+
export function parseEnvByPrefix(env: Record<string, string | undefined>, prefix: string, options?: Object): Record<string, any>;
|
|
52
48
|
/**
|
|
53
49
|
* Convert SCREAMING_SNAKE_CASE to camelCase
|
|
54
50
|
*
|
|
@@ -72,14 +68,14 @@ export function parseValue(value: string): any;
|
|
|
72
68
|
* them into configuration objects. All variables with underscores are
|
|
73
69
|
* grouped by their prefix (the part before the first underscore).
|
|
74
70
|
*
|
|
75
|
-
* @param {
|
|
71
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
76
72
|
* @param {Object} [options={}] - Parsing options
|
|
77
73
|
* @param {boolean} [options.camelCase=true]
|
|
78
74
|
* Convert env var names to camelCase object keys
|
|
79
75
|
* @param {boolean} [options.parseValues=true]
|
|
80
76
|
* Parse string values to numbers/booleans when possible
|
|
81
77
|
*
|
|
82
|
-
* @returns {
|
|
78
|
+
* @returns {Record<string, Record<string, any> | any>} Grouped environment variables
|
|
83
79
|
*
|
|
84
80
|
* @example
|
|
85
81
|
* // Input env vars:
|
|
@@ -95,41 +91,31 @@ export function parseValue(value: string): any;
|
|
|
95
91
|
* // single: 'value' // No underscore, stays top-level
|
|
96
92
|
* // }
|
|
97
93
|
*/
|
|
98
|
-
export function autoGroupEnvByPrefix(env: {
|
|
99
|
-
[x: string]: string;
|
|
100
|
-
}, options?: {
|
|
94
|
+
export function autoGroupEnvByPrefix(env: Record<string, string | undefined>, options?: {
|
|
101
95
|
camelCase?: boolean | undefined;
|
|
102
96
|
parseValues?: boolean | undefined;
|
|
103
|
-
}):
|
|
104
|
-
[x: string]: Object;
|
|
105
|
-
};
|
|
97
|
+
}): Record<string, Record<string, any> | any>;
|
|
106
98
|
/**
|
|
107
99
|
* Group environment variables by specific prefixes
|
|
108
100
|
*
|
|
109
|
-
* @param {
|
|
101
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
110
102
|
* @param {string[]} prefixes - Array of prefixes to group by
|
|
111
103
|
* @param {Object} [options={}] - Parsing options
|
|
112
104
|
*
|
|
113
|
-
* @returns {
|
|
105
|
+
* @returns {Record<string, Record<string, any>>} Grouped environment variables
|
|
114
106
|
*
|
|
115
107
|
* @example
|
|
116
108
|
* const grouped = groupEnvByPrefixes(env, ['DATABASE', 'REDIS', 'JWT']);
|
|
117
109
|
* // Returns: { database: {...}, redis: {...}, jwt: {...} }
|
|
118
110
|
*/
|
|
119
|
-
export function groupEnvByPrefixes(env:
|
|
120
|
-
[x: string]: string;
|
|
121
|
-
}, prefixes: string[], options?: Object): {
|
|
122
|
-
[x: string]: Object;
|
|
123
|
-
};
|
|
111
|
+
export function groupEnvByPrefixes(env: Record<string, string | undefined>, prefixes: string[], options?: Object): Record<string, Record<string, any>>;
|
|
124
112
|
/**
|
|
125
113
|
* Filter environment variables by pattern
|
|
126
114
|
*
|
|
127
|
-
* @param {
|
|
115
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
128
116
|
* @param {RegExp|string} pattern - Pattern to match against keys
|
|
129
117
|
* @param {Object} [options={}] - Parsing options
|
|
130
118
|
*
|
|
131
|
-
* @returns {
|
|
119
|
+
* @returns {Record<string, any>} Filtered and parsed environment variables
|
|
132
120
|
*/
|
|
133
|
-
export function filterEnvByPattern(env:
|
|
134
|
-
[x: string]: string;
|
|
135
|
-
}, pattern: RegExp | string, options?: Object): Object;
|
|
121
|
+
export function filterEnvByPattern(env: Record<string, string | undefined>, pattern: RegExp | string, options?: Object): Record<string, any>;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/**
|
|
19
19
|
* Parse environment object with type conversion and key transformation
|
|
20
20
|
*
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
22
22
|
* @param {Object} [options={}] - Parsing options
|
|
23
23
|
* @param {boolean} [options.camelCase=true]
|
|
24
24
|
* Convert env var names to camelCase object keys
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* @param {boolean} [options.removePrefix=true]
|
|
29
29
|
* Remove prefix from resulting keys
|
|
30
30
|
*
|
|
31
|
-
* @returns {
|
|
31
|
+
* @returns {Record<string, any>} Parsed environment object
|
|
32
32
|
*/
|
|
33
33
|
export function parseEnv(env, options = {}) {
|
|
34
34
|
const {
|
|
@@ -41,8 +41,8 @@ export function parseEnv(env, options = {}) {
|
|
|
41
41
|
const result = {};
|
|
42
42
|
|
|
43
43
|
for (const [key, value] of Object.entries(env || {})) {
|
|
44
|
-
// Skip if prefix specified and key doesn't match
|
|
45
|
-
if (prefix && !key.startsWith(prefix)) {
|
|
44
|
+
// Skip if value is undefined or if prefix specified and key doesn't match
|
|
45
|
+
if (value === undefined || (prefix && !key.startsWith(prefix))) {
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -73,11 +73,11 @@ export function parseEnv(env, options = {}) {
|
|
|
73
73
|
/**
|
|
74
74
|
* Parse environment variables by prefix
|
|
75
75
|
*
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
77
77
|
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
78
78
|
* @param {Object} [options={}] - Parsing options
|
|
79
79
|
*
|
|
80
|
-
* @returns {
|
|
80
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
81
81
|
*/
|
|
82
82
|
export function parseEnvByPrefix(env, prefix, options = {}) {
|
|
83
83
|
const prefixWithUnderscore = prefix.endsWith('_') ? prefix : `${prefix}_`;
|
|
@@ -135,14 +135,14 @@ export function parseValue(value) {
|
|
|
135
135
|
* them into configuration objects. All variables with underscores are
|
|
136
136
|
* grouped by their prefix (the part before the first underscore).
|
|
137
137
|
*
|
|
138
|
-
* @param {
|
|
138
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
139
139
|
* @param {Object} [options={}] - Parsing options
|
|
140
140
|
* @param {boolean} [options.camelCase=true]
|
|
141
141
|
* Convert env var names to camelCase object keys
|
|
142
142
|
* @param {boolean} [options.parseValues=true]
|
|
143
143
|
* Parse string values to numbers/booleans when possible
|
|
144
144
|
*
|
|
145
|
-
* @returns {
|
|
145
|
+
* @returns {Record<string, Record<string, any> | any>} Grouped environment variables
|
|
146
146
|
*
|
|
147
147
|
* @example
|
|
148
148
|
* // Input env vars:
|
|
@@ -197,7 +197,7 @@ export function autoGroupEnvByPrefix(env, options = {}) {
|
|
|
197
197
|
|
|
198
198
|
// Add remaining variables (no underscore) as top-level properties
|
|
199
199
|
for (const [key, value] of Object.entries(env)) {
|
|
200
|
-
if (!usedKeys.has(key)) {
|
|
200
|
+
if (!usedKeys.has(key) && value !== undefined) {
|
|
201
201
|
const finalKey = camelCase ? toCamelCase(key) : key.toLowerCase();
|
|
202
202
|
result[finalKey] = parseValues ? parseValue(value) : value;
|
|
203
203
|
}
|
|
@@ -209,11 +209,11 @@ export function autoGroupEnvByPrefix(env, options = {}) {
|
|
|
209
209
|
/**
|
|
210
210
|
* Group environment variables by specific prefixes
|
|
211
211
|
*
|
|
212
|
-
* @param {
|
|
212
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
213
213
|
* @param {string[]} prefixes - Array of prefixes to group by
|
|
214
214
|
* @param {Object} [options={}] - Parsing options
|
|
215
215
|
*
|
|
216
|
-
* @returns {
|
|
216
|
+
* @returns {Record<string, Record<string, any>>} Grouped environment variables
|
|
217
217
|
*
|
|
218
218
|
* @example
|
|
219
219
|
* const grouped = groupEnvByPrefixes(env, ['DATABASE', 'REDIS', 'JWT']);
|
|
@@ -236,19 +236,19 @@ export function groupEnvByPrefixes(env, prefixes, options = {}) {
|
|
|
236
236
|
/**
|
|
237
237
|
* Filter environment variables by pattern
|
|
238
238
|
*
|
|
239
|
-
* @param {
|
|
239
|
+
* @param {Record<string, string | undefined>} env - Raw environment variables
|
|
240
240
|
* @param {RegExp|string} pattern - Pattern to match against keys
|
|
241
241
|
* @param {Object} [options={}] - Parsing options
|
|
242
242
|
*
|
|
243
|
-
* @returns {
|
|
243
|
+
* @returns {Record<string, any>} Filtered and parsed environment variables
|
|
244
244
|
*/
|
|
245
245
|
export function filterEnvByPattern(env, pattern, options = {}) {
|
|
246
246
|
const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern;
|
|
247
|
-
/** @type {
|
|
247
|
+
/** @type {Record<string, string>} */
|
|
248
248
|
const filtered = {};
|
|
249
249
|
|
|
250
250
|
for (const [key, value] of Object.entries(env || {})) {
|
|
251
|
-
if (regex.test(key)) {
|
|
251
|
+
if (regex.test(key) && value !== undefined) {
|
|
252
252
|
filtered[key] = value;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {boolean} [options.autoGroup=true]
|
|
14
14
|
* Enable automatic prefix grouping
|
|
15
15
|
*
|
|
16
|
-
* @returns {
|
|
16
|
+
* @returns {Record<string, any>} Grouped and parsed private environment variables
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* // Environment variables:
|
|
@@ -36,21 +36,19 @@ export function getPrivateEnv(options?: {
|
|
|
36
36
|
camelCase?: boolean | undefined;
|
|
37
37
|
parseValues?: boolean | undefined;
|
|
38
38
|
autoGroup?: boolean | undefined;
|
|
39
|
-
}):
|
|
39
|
+
}): Record<string, any>;
|
|
40
40
|
/**
|
|
41
41
|
* Get private environment variables by prefix
|
|
42
42
|
*
|
|
43
43
|
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
44
44
|
* @param {Object} [options={}] - Parsing options
|
|
45
45
|
*
|
|
46
|
-
* @returns {
|
|
46
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
47
47
|
*/
|
|
48
|
-
export function getPrivateEnvByPrefix(prefix: string, options?: Object):
|
|
48
|
+
export function getPrivateEnvByPrefix(prefix: string, options?: Object): Record<string, any>;
|
|
49
49
|
/**
|
|
50
50
|
* Get raw private environment variables (no parsing)
|
|
51
51
|
*
|
|
52
|
-
* @returns {
|
|
52
|
+
* @returns {Record<string, string|undefined>} Raw private environment variables
|
|
53
53
|
*/
|
|
54
|
-
export function getRawPrivateEnv():
|
|
55
|
-
[x: string]: string;
|
|
56
|
-
};
|
|
54
|
+
export function getRawPrivateEnv(): Record<string, string | undefined>;
|
|
@@ -30,7 +30,7 @@ import { autoGroupEnvByPrefix, parseEnv } from './parsers.js';
|
|
|
30
30
|
* @param {boolean} [options.autoGroup=true]
|
|
31
31
|
* Enable automatic prefix grouping
|
|
32
32
|
*
|
|
33
|
-
* @returns {
|
|
33
|
+
* @returns {Record<string, any>} Grouped and parsed private environment variables
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* // Environment variables:
|
|
@@ -65,7 +65,7 @@ export function getPrivateEnv(options = {}) {
|
|
|
65
65
|
* @param {string} prefix - Environment variable prefix (e.g., 'DATABASE')
|
|
66
66
|
* @param {Object} [options={}] - Parsing options
|
|
67
67
|
*
|
|
68
|
-
* @returns {
|
|
68
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
69
69
|
*/
|
|
70
70
|
export function getPrivateEnvByPrefix(prefix, options = {}) {
|
|
71
71
|
const prefixWithUnderscore = prefix.endsWith('_') ? prefix : `${prefix}_`;
|
|
@@ -80,8 +80,8 @@ export function getPrivateEnvByPrefix(prefix, options = {}) {
|
|
|
80
80
|
/**
|
|
81
81
|
* Get raw private environment variables (no parsing)
|
|
82
82
|
*
|
|
83
|
-
* @returns {
|
|
83
|
+
* @returns {Record<string, string|undefined>} Raw private environment variables
|
|
84
84
|
*/
|
|
85
85
|
export function getRawPrivateEnv() {
|
|
86
86
|
return { ...env };
|
|
87
|
-
}
|
|
87
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {boolean} [options.autoGroup=true]
|
|
14
14
|
* Enable automatic prefix grouping
|
|
15
15
|
*
|
|
16
|
-
* @returns {
|
|
16
|
+
* @returns {Record<string, any>} Grouped and parsed public environment variables
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* // Environment variables:
|
|
@@ -32,21 +32,19 @@ export function getPublicEnv(options?: {
|
|
|
32
32
|
camelCase?: boolean | undefined;
|
|
33
33
|
parseValues?: boolean | undefined;
|
|
34
34
|
autoGroup?: boolean | undefined;
|
|
35
|
-
}):
|
|
35
|
+
}): Record<string, any>;
|
|
36
36
|
/**
|
|
37
37
|
* Get public environment variables by prefix
|
|
38
38
|
*
|
|
39
39
|
* @param {string} prefix - Environment variable prefix (e.g., 'PUBLIC_API')
|
|
40
40
|
* @param {Object} [options={}] - Parsing options
|
|
41
41
|
*
|
|
42
|
-
* @returns {
|
|
42
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
43
43
|
*/
|
|
44
|
-
export function getPublicEnvByPrefix(prefix: string, options?: Object):
|
|
44
|
+
export function getPublicEnvByPrefix(prefix: string, options?: Object): Record<string, any>;
|
|
45
45
|
/**
|
|
46
46
|
* Get raw public environment variables (no parsing)
|
|
47
47
|
*
|
|
48
|
-
* @returns {
|
|
48
|
+
* @returns {Record<string, string>} Raw public environment variables
|
|
49
49
|
*/
|
|
50
|
-
export function getRawPublicEnv():
|
|
51
|
-
[x: string]: string;
|
|
52
|
-
};
|
|
50
|
+
export function getRawPublicEnv(): Record<string, string>;
|
|
@@ -29,7 +29,7 @@ import { autoGroupEnvByPrefix, parseEnv } from './parsers.js';
|
|
|
29
29
|
* @param {boolean} [options.autoGroup=true]
|
|
30
30
|
* Enable automatic prefix grouping
|
|
31
31
|
*
|
|
32
|
-
* @returns {
|
|
32
|
+
* @returns {Record<string, any>} Grouped and parsed public environment variables
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* // Environment variables:
|
|
@@ -60,7 +60,7 @@ export function getPublicEnv(options = {}) {
|
|
|
60
60
|
* @param {string} prefix - Environment variable prefix (e.g., 'PUBLIC_API')
|
|
61
61
|
* @param {Object} [options={}] - Parsing options
|
|
62
62
|
*
|
|
63
|
-
* @returns {
|
|
63
|
+
* @returns {Record<string, any>} Parsed configuration object
|
|
64
64
|
*/
|
|
65
65
|
export function getPublicEnvByPrefix(prefix, options = {}) {
|
|
66
66
|
const prefixWithUnderscore = prefix.endsWith('_') ? prefix : `${prefix}_`;
|
|
@@ -75,7 +75,7 @@ export function getPublicEnvByPrefix(prefix, options = {}) {
|
|
|
75
75
|
/**
|
|
76
76
|
* Get raw public environment variables (no parsing)
|
|
77
77
|
*
|
|
78
|
-
* @returns {
|
|
78
|
+
* @returns {Record<string, string>} Raw public environment variables
|
|
79
79
|
*/
|
|
80
80
|
export function getRawPublicEnv() {
|
|
81
81
|
return { ...env };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getAllEnv,
|
|
1
|
+
export { getAllEnv, getRawAllEnv } from "./env/all.js";
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
* imports private environment variables.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
* import { getAllEnv
|
|
9
|
+
* import { getAllEnv } from './env-all.js';
|
|
10
10
|
*
|
|
11
11
|
* const allVars = getAllEnv();
|
|
12
|
-
* const dbConfig = getAllEnvByPrefix('DATABASE');
|
|
13
12
|
*/
|
|
14
13
|
|
|
15
14
|
export {
|
|
16
15
|
getAllEnv,
|
|
17
|
-
getAllEnvByPrefix,
|
|
18
16
|
getRawAllEnv
|
|
19
|
-
} from './env/all.js';
|
|
17
|
+
} from './env/all.js';
|