(parsed: Record<string, string>)
| 1093 | } |
| 1094 | |
| 1095 | function dotEnvExpand(parsed: Record<string, string>): Record<string, string> { |
| 1096 | const newParsed: Record<string, string> = Object.create(null) |
| 1097 | |
| 1098 | for (const configKey of Object.keys(parsed)) { |
| 1099 | // resolve escape sequences |
| 1100 | newParsed[configKey] = interpolate(parsed[configKey], parsed).replace(/\\\$/g, "$") |
| 1101 | } |
| 1102 | |
| 1103 | return newParsed |
| 1104 | } |
| 1105 | |
| 1106 | function interpolate(envValue: string, parsed: Record<string, string>): string { |
| 1107 | // find the last unescaped dollar sign in the |
no test coverage detected