UNPKG

integration-operator

Version:
58 lines (51 loc) 1.94 kB
import _regeneratorRuntime from "@babel/runtime/regenerator"; import _newArrowCheck from "@babel/runtime/helpers/newArrowCheck"; import "regenerator-runtime/runtime.js"; import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; /** * Copyright 2021 Silicon Hills 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. */ import IntegrationOperator from "./integrationOperator"; import config from "./config"; var logger = console; _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { var _this = this; var integrationOperator, exit; return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: exit = function _exit(_reason) { integrationOperator.stop(); process.exit(0); }; integrationOperator = new IntegrationOperator(config); process.on('SIGTERM', function () { _newArrowCheck(this, _this); return exit('SIGTERM'); }.bind(this)).on('SIGINT', function () { _newArrowCheck(this, _this); return exit('SIGINT'); }.bind(this)); _context.next = 5; return integrationOperator.start(); case 5: case "end": return _context.stop(); } } }, _callee, this); }))().catch(logger.error); //# sourceMappingURL=bin.js.map