(env: Record<string, string> | undefined)
| 29 | } |
| 30 | |
| 31 | export function resolveEnvVars(env: Record<string, string> | undefined): Record<string, string> | undefined { |
| 32 | if (!env) return undefined |
| 33 | const resolved: Record<string, string> = {} |
| 34 | for (const [key, value] of Object.entries(env)) { |
| 35 | resolved[key] = value.replace(/\$\{(\w+)\}/g, (_, name) => process.env[name] ?? '') |
| 36 | } |
| 37 | return resolved |
| 38 | } |
| 39 | |
| 40 | export function serializeNotebookContext( |
| 41 | file: DeepnoteFile, |
no outgoing calls
no test coverage detected