@adpt/core
Version:
AdaptJS core library
37 lines • 1.56 kB
JavaScript
;
/*
* 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 listDeployments(options) {
const setup = Object.assign({ name: "listDeployments", description: "Listing deployments" }, options);
return common_1.withOpsSetup(setup, async (info) => {
const { logger } = info;
const server = await server_1.adaptServer(options.adaptUrl, {});
return {
type: "success",
deployments: await deployment_1.listDeployments(server),
messages: logger.messages,
summary: logger.summary,
};
});
}
exports.listDeployments = listDeployments;
//FIXME(manishv) Adding this causes a straggling listener which means processes never exit
//forkExports(module, "listDeployments");
//# sourceMappingURL=listDeployments.js.map