summaryrefslogtreecommitdiff
path: root/desktop/node_modules/global-agent/dist/routines
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2023-10-24 17:43:37 +0200
committerRaindropsSys <raindrops@equestria.dev>2023-10-24 17:43:37 +0200
commitae187b6d75c8079da0be1dc288613bad8466fe61 (patch)
tree5ea0d34185a2270f29ffaa65e1f5258028d7d5d0 /desktop/node_modules/global-agent/dist/routines
downloadmist-ae187b6d75c8079da0be1dc288613bad8466fe61.tar.gz
mist-ae187b6d75c8079da0be1dc288613bad8466fe61.tar.bz2
mist-ae187b6d75c8079da0be1dc288613bad8466fe61.zip
Initial commit
Diffstat (limited to 'desktop/node_modules/global-agent/dist/routines')
-rw-r--r--desktop/node_modules/global-agent/dist/routines/bootstrap.js30
-rw-r--r--desktop/node_modules/global-agent/dist/routines/bootstrap.js.flow25
-rw-r--r--desktop/node_modules/global-agent/dist/routines/bootstrap.js.map1
-rw-r--r--desktop/node_modules/global-agent/dist/routines/index.js16
-rw-r--r--desktop/node_modules/global-agent/dist/routines/index.js.flow3
-rw-r--r--desktop/node_modules/global-agent/dist/routines/index.js.map1
6 files changed, 76 insertions, 0 deletions
diff --git a/desktop/node_modules/global-agent/dist/routines/bootstrap.js b/desktop/node_modules/global-agent/dist/routines/bootstrap.js
new file mode 100644
index 0000000..444df53
--- /dev/null
+++ b/desktop/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/desktop/node_modules/global-agent/dist/routines/bootstrap.js.flow b/desktop/node_modules/global-agent/dist/routines/bootstrap.js.flow
new file mode 100644
index 0000000..038feb3
--- /dev/null
+++ b/desktop/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/desktop/node_modules/global-agent/dist/routines/bootstrap.js.map b/desktop/node_modules/global-agent/dist/routines/bootstrap.js.map
new file mode 100644
index 0000000..84bbf79
--- /dev/null
+++ b/desktop/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/desktop/node_modules/global-agent/dist/routines/index.js b/desktop/node_modules/global-agent/dist/routines/index.js
new file mode 100644
index 0000000..2ae1be2
--- /dev/null
+++ b/desktop/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/desktop/node_modules/global-agent/dist/routines/index.js.flow b/desktop/node_modules/global-agent/dist/routines/index.js.flow
new file mode 100644
index 0000000..e47a8a0
--- /dev/null
+++ b/desktop/node_modules/global-agent/dist/routines/index.js.flow
@@ -0,0 +1,3 @@
+// @flow
+
+export {default as bootstrap} from './bootstrap';
diff --git a/desktop/node_modules/global-agent/dist/routines/index.js.map b/desktop/node_modules/global-agent/dist/routines/index.js.map
new file mode 100644
index 0000000..97295d9
--- /dev/null
+++ b/desktop/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