* Update the adonisrc.ts file with new configuration settings. * This method allows modification of the AdonisJS runtime configuration. * * @param params - Parameters for updating the RC file (varies based on update type) * * @example * ```ts * await codemods.updateRcFile((rcFil
(...params: Parameters<CodeTransformer['updateRcFile']>)
| 313 | * ``` |
| 314 | */ |
| 315 | async updateRcFile(...params: Parameters<CodeTransformer['updateRcFile']>) { |
| 316 | const transformer = await this.#getCodeTransformer() |
| 317 | if (!transformer) { |
| 318 | this.#cliLogger.warning( |
| 319 | 'Cannot update "adonisrc.ts" file. Install "@adonisjs/assembler" to modify source files' |
| 320 | ) |
| 321 | return |
| 322 | } |
| 323 | |
| 324 | const action = this.#cliLogger.action('update adonisrc.ts file') |
| 325 | try { |
| 326 | await transformer.updateRcFile(...params) |
| 327 | action.succeeded() |
| 328 | } catch (error: any) { |
| 329 | this.emit('error', error) |
| 330 | action.failed(error.message) |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Register a new Vite plugin in the vite.config.ts file. |
no test coverage detected