mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
fix: make typescript client compatible with cf workers (#3807)
* make typescript client compatible with cf workers * Update build.sh
This commit is contained in:
@@ -8,8 +8,11 @@ npx --yes @hey-api/openapi-ts@0.43.0 --input "${script_dirpath}/../backend/wind
|
||||
cat <<EOF - src/core/OpenAPI.ts > temp_file && mv temp_file src/core/OpenAPI.ts
|
||||
const getEnv = (key: string) => {
|
||||
if (typeof window === "undefined") {
|
||||
if (typeof process !== "undefined") {
|
||||
return process?.env?.[key];
|
||||
}
|
||||
// node
|
||||
return process?.env?.[key];
|
||||
return globalThis?.process?.env?.[key];
|
||||
}
|
||||
// browser
|
||||
return window?.process?.env?.[key];
|
||||
|
||||
Reference in New Issue
Block a user