mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 00:56:01 +00:00
feat: remove cloudflare adapter dependency to nodejs_compat
- adjusted bindings extraction to not rely on node inspect anymore - added new vite export that uses nodejs apis
This commit is contained in:
+4
-1
@@ -73,8 +73,11 @@ export const env = <
|
||||
onValid?: (valid: R) => void;
|
||||
},
|
||||
): R extends undefined ? Fallback : R => {
|
||||
let source = opts?.source ?? {};
|
||||
try {
|
||||
source = process?.env ?? {};
|
||||
} catch (e) {}
|
||||
try {
|
||||
const source = opts?.source ?? process.env;
|
||||
const c = envs[key];
|
||||
const g = source[c.key];
|
||||
const v = c.validate(g) as any;
|
||||
|
||||
Reference in New Issue
Block a user