()
| 149 | } |
| 150 | |
| 151 | export async function updateFromConfigurationFile(): Promise<void> { |
| 152 | if (existsSync(SERVER_CONFIG_FILE_PATH)) { |
| 153 | Logger.info( |
| 154 | `Reading server configuration from file ${SERVER_CONFIG_FILE_PATH}`, |
| 155 | ); |
| 156 | const json = readFileSync(SERVER_CONFIG_FILE_PATH, "utf-8"); |
| 157 | const data = parseJsonWithSchema( |
| 158 | json, |
| 159 | z.object({ |
| 160 | configuration: PartialConfigurationSchema, |
| 161 | }), |
| 162 | ); |
| 163 | |
| 164 | await patchConfiguration(data.configuration); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | export const __testing = { |
| 169 | mergeConfigurations, |
no test coverage detected