File size: 1,043 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
/**
* `$env/dynamic/private`
* @type {Record<string, string>}
*/
export let private_env = {};
/**
* `$env/dynamic/public`. When prerendering, this will be a proxy that forbids reads
* @type {Record<string, string>}
*/
export let public_env = {};
/**
* The same as `public_env`, but without the proxy. Use for `%sveltekit.env.PUBLIC_FOO%`
* @type {Record<string, string>}
*/
export let safe_public_env = {};
/** @param {any} error */
export let fix_stack_trace = (error) => error?.stack;
/** @type {(environment: Record<string, string>) => void} */
export function set_private_env(environment) {
private_env = environment;
}
/** @type {(environment: Record<string, string>) => void} */
export function set_public_env(environment) {
public_env = environment;
}
/** @type {(environment: Record<string, string>) => void} */
export function set_safe_public_env(environment) {
safe_public_env = environment;
}
/** @param {(error: Error) => string} value */
export function set_fix_stack_trace(value) {
fix_stack_trace = value;
}
|