* Runs Serverless Containers Remove * @param {Object} options - The options object * @param {boolean} [options.force=false] - Force removal even if there are warnings * @returns {Promise }
({ all = false, force = false })
| 325 | * @returns {Promise<void>} |
| 326 | */ |
| 327 | async remove({ all = false, force = false }) { |
| 328 | await this.#state.load() |
| 329 | |
| 330 | await this.#deploymentTypeInstance.remove({ all, force }) |
| 331 | |
| 332 | // Reset state |
| 333 | this.#state.state = {} |
| 334 | this.#state.state.name = this.#projectConfig.name |
| 335 | this.#state.state.stage = this.#stage |
| 336 | this.#state.state.isDeployed = false |
| 337 | this.#state.state.timeLastRemoved = new Date().toISOString() |
| 338 | |
| 339 | await this.#state.save() |
| 340 | |
| 341 | logger.debug('Final state', this.#state.state) |
| 342 | |
| 343 | return this.#state.state |
| 344 | } |
| 345 | |
| 346 | async executeCommand(commandName, options = {}) { |
| 347 | if (['deploy', 'dev', 'remove', 'info'].includes(commandName)) { |
no test coverage detected