(commandName, options = {})
| 344 | } |
| 345 | |
| 346 | async executeCommand(commandName, options = {}) { |
| 347 | if (['deploy', 'dev', 'remove', 'info'].includes(commandName)) { |
| 348 | return this[commandName](options) |
| 349 | } else { |
| 350 | if ('executeCustomCommand' in this.#deploymentTypeInstance) { |
| 351 | await this.#state.load() |
| 352 | const response = |
| 353 | await this.#deploymentTypeInstance.executeCustomCommand( |
| 354 | commandName, |
| 355 | options, |
| 356 | ) |
| 357 | await this.#state.save() |
| 358 | return response |
| 359 | } |
| 360 | throw new ServerlessError( |
| 361 | `Unsupported command: ${commandName}`, |
| 362 | 'UNSUPPORTED_COMMAND', |
| 363 | ) |
| 364 | } |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | export { detectAiFramework } |
no test coverage detected