integration-operator
Version:
kubernetes operator to integrate deployments
72 lines (66 loc) • 3.17 kB
JavaScript
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["@babel/runtime/regenerator", "@babel/runtime/helpers/newArrowCheck", "regenerator-runtime/runtime.js", "@babel/runtime/helpers/asyncToGenerator", "./integrationOperator", "./config"], factory);
} else if (typeof exports !== "undefined") {
factory(require("@babel/runtime/regenerator"), require("@babel/runtime/helpers/newArrowCheck"), require("regenerator-runtime/runtime.js"), require("@babel/runtime/helpers/asyncToGenerator"), require("./integrationOperator"), require("./config"));
} else {
var mod = {
exports: {}
};
factory(global.regenerator, global.newArrowCheck, global.runtime, global.asyncToGenerator, global.integrationOperator, global.config);
global.bin = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_regenerator, _newArrowCheck2, _runtime, _asyncToGenerator2, _integrationOperator, _config) {
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
_regenerator = _interopRequireDefault(_regenerator);
_newArrowCheck2 = _interopRequireDefault(_newArrowCheck2);
_asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2);
_integrationOperator = _interopRequireDefault(_integrationOperator);
_config = _interopRequireDefault(_config);
/**
* 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.
*/
var logger = console;
(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var _this = this;
var integrationOperator, exit;
return _regenerator.default.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.default(_config.default);
process.on('SIGTERM', function () {
(0, _newArrowCheck2.default)(this, _this);
return exit('SIGTERM');
}.bind(this)).on('SIGINT', function () {
(0, _newArrowCheck2.default)(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