1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.httpExecutor = exports.NodeHttpExecutor = void 0;
|
7 |
|
8 | function _builderUtilRuntime() {
|
9 | const data = require("builder-util-runtime");
|
10 |
|
11 | _builderUtilRuntime = function () {
|
12 | return data;
|
13 | };
|
14 |
|
15 | return data;
|
16 | }
|
17 |
|
18 | function _http() {
|
19 | const data = require("http");
|
20 |
|
21 | _http = function () {
|
22 | return data;
|
23 | };
|
24 |
|
25 | return data;
|
26 | }
|
27 |
|
28 | function https() {
|
29 | const data = _interopRequireWildcard(require("https"));
|
30 |
|
31 | https = function () {
|
32 | return data;
|
33 | };
|
34 |
|
35 | return data;
|
36 | }
|
37 |
|
38 | function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
39 |
|
40 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
41 |
|
42 | class NodeHttpExecutor extends _builderUtilRuntime().HttpExecutor {
|
43 |
|
44 |
|
45 | createRequest(options, callback) {
|
46 | return (options.protocol === "http:" ? _http().request : https().request)(options, callback);
|
47 | }
|
48 |
|
49 | }
|
50 |
|
51 | exports.NodeHttpExecutor = NodeHttpExecutor;
|
52 | const httpExecutor = new NodeHttpExecutor(); exports.httpExecutor = httpExecutor;
|
53 |
|
54 |
|
\ | No newline at end of file |