mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
fix: 修复了代码中的一个错误; refactor: 重写/重构代码,但没有改变API的行为; style: 添加了空格、格式化、缺失的分号等; test: 添加了缺失的测试或修正了现有的测试; docs: 更新了文档,如readme; build: 更新了依赖、项目版本; ops: 影响了基础设施、部署、备份、恢复等操作性组件; chore: 修改了.gitignore等; 根据以上信息,你的commit message可以是:
11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
import { env } from 'node:process';
|
|
|
|
export function getAPIKey(cloudflareEnv: Env) {
|
|
/**
|
|
* The `cloudflareEnv` is only used when deployed or when previewing locally.
|
|
* In development the environment variables are available through `env`.
|
|
*/
|
|
return env.ANTHROPIC_API_KEY || cloudflareEnv.ANTHROPIC_API_KEY;
|
|
}
|
|
|