UNPKG

@adpt/core

Version:
46 lines 1.8 kB
"use strict"; /* * Copyright 2018-2019 Unbounded Systems, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); const server_1 = require("../server"); const deployment_1 = require("../server/deployment"); const common_1 = require("./common"); async function destroyDeployment(optionsIn) { const options = Object.assign({}, common_1.defaultDeployCommonOptions, optionsIn); const setup = { name: "destroyDeployment", description: "Destroying deployment", client: options.client, logger: options.logger, loggerId: options.loggerId, }; return common_1.withOpsSetup(setup, async (info) => { const { adaptUrl, deployID, } = options; const server = await server_1.adaptServer(adaptUrl, {}); if (!options.dryRun) { await deployment_1.destroyDeployment(server, deployID); } return { type: "success", messages: info.logger.messages, summary: info.logger.summary, }; }); } exports.destroyDeployment = destroyDeployment; //FIXME(manishv) Adding this causes a destroyDeployment to never return //forkExports(module, "destroyDeployment"); //# sourceMappingURL=destroyDeployment.js.map