diff options
Diffstat (limited to 'node_modules/global-agent/dist/routines')
6 files changed, 76 insertions, 0 deletions
| diff --git a/node_modules/global-agent/dist/routines/bootstrap.js b/node_modules/global-agent/dist/routines/bootstrap.js new file mode 100644 index 0000000..444df53 --- /dev/null +++ b/node_modules/global-agent/dist/routines/bootstrap.js @@ -0,0 +1,30 @@ +"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
\ No newline at end of file diff --git a/node_modules/global-agent/dist/routines/bootstrap.js.flow b/node_modules/global-agent/dist/routines/bootstrap.js.flow new file mode 100644 index 0000000..038feb3 --- /dev/null +++ b/node_modules/global-agent/dist/routines/bootstrap.js.flow @@ -0,0 +1,25 @@ +// @flow + +import Logger from '../Logger'; +import { +  createGlobalProxyAgent, +} from '../factories'; +import type { +  ProxyAgentConfigurationInputType, +} from '../types'; + +const log = Logger.child({ +  namespace: 'bootstrap', +}); + +export default (configurationInput?: ProxyAgentConfigurationInputType): boolean => { +  if (global.GLOBAL_AGENT) { +    log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored'); + +    return false; +  } + +  global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput); + +  return true; +}; diff --git a/node_modules/global-agent/dist/routines/bootstrap.js.map b/node_modules/global-agent/dist/routines/bootstrap.js.map new file mode 100644 index 0000000..84bbf79 --- /dev/null +++ b/node_modules/global-agent/dist/routines/bootstrap.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/routines/bootstrap.js"],"names":["log","Logger","child","namespace","configurationInput","global","GLOBAL_AGENT","warn"],"mappings":";;;;;;;AAEA;;AACA;;;;AAOA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;kBAIgBC,kB,IAAmE;AACjF,MAAIC,MAAM,CAACC,YAAX,EAAyB;AACvBN,IAAAA,GAAG,CAACO,IAAJ,CAAS,iFAAT;AAEA,WAAO,KAAP;AACD;;AAEDF,EAAAA,MAAM,CAACC,YAAP,GAAsB,uCAAuBF,kBAAvB,CAAtB;AAEA,SAAO,IAAP;AACD,C","sourcesContent":["// @flow\n\nimport Logger from '../Logger';\nimport {\n  createGlobalProxyAgent,\n} from '../factories';\nimport type {\n  ProxyAgentConfigurationInputType,\n} from '../types';\n\nconst log = Logger.child({\n  namespace: 'bootstrap',\n});\n\nexport default (configurationInput?: ProxyAgentConfigurationInputType): boolean => {\n  if (global.GLOBAL_AGENT) {\n    log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');\n\n    return false;\n  }\n\n  global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput);\n\n  return true;\n};\n"],"file":"bootstrap.js"}
\ No newline at end of file diff --git a/node_modules/global-agent/dist/routines/index.js b/node_modules/global-agent/dist/routines/index.js new file mode 100644 index 0000000..2ae1be2 --- /dev/null +++ b/node_modules/global-agent/dist/routines/index.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { +  value: true +}); +Object.defineProperty(exports, "bootstrap", { +  enumerable: true, +  get: function () { +    return _bootstrap.default; +  } +}); + +var _bootstrap = _interopRequireDefault(require("./bootstrap")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map
\ No newline at end of file diff --git a/node_modules/global-agent/dist/routines/index.js.flow b/node_modules/global-agent/dist/routines/index.js.flow new file mode 100644 index 0000000..e47a8a0 --- /dev/null +++ b/node_modules/global-agent/dist/routines/index.js.flow @@ -0,0 +1,3 @@ +// @flow + +export {default as bootstrap} from './bootstrap'; diff --git a/node_modules/global-agent/dist/routines/index.js.map b/node_modules/global-agent/dist/routines/index.js.map new file mode 100644 index 0000000..97295d9 --- /dev/null +++ b/node_modules/global-agent/dist/routines/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/routines/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAEA","sourcesContent":["// @flow\n\nexport {default as bootstrap} from './bootstrap';\n"],"file":"index.js"}
\ No newline at end of file | 
