MCPcopy Index your code
hub / github.com/serverless/serverless / remove

Method remove

packages/engine/src/index.js:327–344  ·  view source on GitHub ↗

* 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 })

Source from the content-addressed store, hash-verified

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)) {

Callers 1

e2e.test.jsFile · 0.45

Calls 2

loadMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected