system_assignation/node_modules/global-agent/dist/routines/bootstrap.js

30 lines
759 B
JavaScript
Raw Normal View History

2022-03-24 09:22:39 -04:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Logger = _interopRequireDefault(require("../Logger"));
var _factories = require("../factories");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const log = _Logger.default.child({
namespace: 'bootstrap'
});
const bootstrap = configurationInput => {
if (global.GLOBAL_AGENT) {
log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');
return false;
}
global.GLOBAL_AGENT = (0, _factories.createGlobalProxyAgent)(configurationInput);
return true;
};
var _default = bootstrap;
exports.default = _default;
//# sourceMappingURL=bootstrap.js.map