This commit is contained in:
1
vscode-server-linux-x64-web/node_modules/agent-base/dist/helpers.d.ts.map
generated
vendored
Normal file
1
vscode-server-linux-x64-web/node_modules/agent-base/dist/helpers.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAClB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC7B,eAAe,CAcjB"}
|
65
vscode-server-linux-x64-web/node_modules/agent-base/dist/helpers.js
generated
vendored
Normal file
65
vscode-server-linux-x64-web/node_modules/agent-base/dist/helpers.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.req = exports.json = exports.toBuffer = void 0;
|
||||
const http = __importStar(require("http"));
|
||||
const https = __importStar(require("https"));
|
||||
async function toBuffer(stream) {
|
||||
let length = 0;
|
||||
const chunks = [];
|
||||
for await (const chunk of stream) {
|
||||
length += chunk.length;
|
||||
chunks.push(chunk);
|
||||
}
|
||||
return Buffer.concat(chunks, length);
|
||||
}
|
||||
exports.toBuffer = toBuffer;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function json(stream) {
|
||||
const buf = await toBuffer(stream);
|
||||
const str = buf.toString('utf8');
|
||||
try {
|
||||
return JSON.parse(str);
|
||||
}
|
||||
catch (_err) {
|
||||
const err = _err;
|
||||
err.message += ` (input: ${str})`;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
exports.json = json;
|
||||
function req(url, opts = {}) {
|
||||
const href = typeof url === 'string' ? url : url.href;
|
||||
const req = (href.startsWith('https:') ? https : http).request(url, opts);
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
req
|
||||
.once('response', resolve)
|
||||
.once('error', reject)
|
||||
.end();
|
||||
});
|
||||
req.then = promise.then.bind(promise);
|
||||
return req;
|
||||
}
|
||||
exports.req = req;
|
1
vscode-server-linux-x64-web/node_modules/agent-base/dist/index.d.ts.map
generated
vendored
Normal file
1
vscode-server-linux-x64-web/node_modules/agent-base/dist/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,cAAc,WAAW,CAAC;AAE1B,UAAU,eAAgB,SAAQ,GAAG,CAAC,iBAAiB;IACtD,cAAc,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,gBAAiB,SAAQ,GAAG,CAAC,iBAAiB;IACvD,cAAc,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAElE,QAAA,MAAM,QAAQ,eAAmC,CAAC;AAQlD,8BAAsB,KAAM,SAAQ,IAAI,CAAC,KAAK;IAC7C,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAgB;IAGlC,OAAO,EAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjE,SAAS,EAAG,OAAO,CAAC;gBAER,IAAI,CAAC,EAAE,IAAI,CAAC,YAAY;IAKpC,QAAQ,CAAC,OAAO,CACf,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,KAAK;IAErD;;OAEG;IACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO;IA+BrD,YAAY,CACX,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,EACzB,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;IAmB5C,gBAAgB,IAAI,MAAM;IAW1B,IAAI,WAAW,IAAI,MAAM,CAKxB;IAED,IAAI,WAAW,CAAC,CAAC,EAAE,MAAM,EAIxB;IAED,IAAI,QAAQ,IAAI,MAAM,CAKrB;IAED,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAIrB;CACD"}
|
111
vscode-server-linux-x64-web/node_modules/agent-base/dist/index.js
generated
vendored
Normal file
111
vscode-server-linux-x64-web/node_modules/agent-base/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Agent = void 0;
|
||||
const http = __importStar(require("http"));
|
||||
__exportStar(require("./helpers"), exports);
|
||||
const INTERNAL = Symbol('AgentBaseInternalState');
|
||||
class Agent extends http.Agent {
|
||||
constructor(opts) {
|
||||
super(opts);
|
||||
this[INTERNAL] = {};
|
||||
}
|
||||
/**
|
||||
* Determine whether this is an `http` or `https` request.
|
||||
*/
|
||||
isSecureEndpoint(options) {
|
||||
if (options) {
|
||||
// First check the `secureEndpoint` property explicitly, since this
|
||||
// means that a parent `Agent` is "passing through" to this instance.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
if (typeof options.secureEndpoint === 'boolean') {
|
||||
return options.secureEndpoint;
|
||||
}
|
||||
// If no explicit `secure` endpoint, check if `protocol` property is
|
||||
// set. This will usually be the case since using a full string URL
|
||||
// or `URL` instance should be the most common usage.
|
||||
if (typeof options.protocol === 'string') {
|
||||
return options.protocol === 'https:';
|
||||
}
|
||||
}
|
||||
// Finally, if no `protocol` property was set, then fall back to
|
||||
// checking the stack trace of the current call stack, and try to
|
||||
// detect the "https" module.
|
||||
const { stack } = new Error();
|
||||
if (typeof stack !== 'string')
|
||||
return false;
|
||||
return stack
|
||||
.split('\n')
|
||||
.some((l) => l.indexOf('(https.js:') !== -1 ||
|
||||
l.indexOf('node:https:') !== -1);
|
||||
}
|
||||
createSocket(req, options, cb) {
|
||||
const connectOpts = {
|
||||
...options,
|
||||
secureEndpoint: this.isSecureEndpoint(options),
|
||||
};
|
||||
Promise.resolve()
|
||||
.then(() => this.connect(req, connectOpts))
|
||||
.then((socket) => {
|
||||
if (socket instanceof http.Agent) {
|
||||
// @ts-expect-error `addRequest()` isn't defined in `@types/node`
|
||||
return socket.addRequest(req, connectOpts);
|
||||
}
|
||||
this[INTERNAL].currentSocket = socket;
|
||||
// @ts-expect-error `createSocket()` isn't defined in `@types/node`
|
||||
super.createSocket(req, options, cb);
|
||||
}, cb);
|
||||
}
|
||||
createConnection() {
|
||||
const socket = this[INTERNAL].currentSocket;
|
||||
this[INTERNAL].currentSocket = undefined;
|
||||
if (!socket) {
|
||||
throw new Error('No socket was returned in the `connect()` function');
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
get defaultPort() {
|
||||
return (this[INTERNAL].defaultPort ??
|
||||
(this.protocol === 'https:' ? 443 : 80));
|
||||
}
|
||||
set defaultPort(v) {
|
||||
if (this[INTERNAL]) {
|
||||
this[INTERNAL].defaultPort = v;
|
||||
}
|
||||
}
|
||||
get protocol() {
|
||||
return (this[INTERNAL].protocol ??
|
||||
(this.isSecureEndpoint() ? 'https:' : 'http:'));
|
||||
}
|
||||
set protocol(v) {
|
||||
if (this[INTERNAL]) {
|
||||
this[INTERNAL].protocol = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Agent = Agent;
|
49
vscode-server-linux-x64-web/node_modules/agent-base/package.json
generated
vendored
Normal file
49
vscode-server-linux-x64-web/node_modules/agent-base/package.json
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "agent-base",
|
||||
"version": "7.1.0",
|
||||
"description": "Turn a function into an `http.Agent` instance",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/TooTallNate/proxy-agents.git",
|
||||
"directory": "packages/agent-base"
|
||||
},
|
||||
"keywords": [
|
||||
"http",
|
||||
"agent",
|
||||
"base",
|
||||
"barebones",
|
||||
"https"
|
||||
],
|
||||
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/node": "^14.18.45",
|
||||
"@types/semver": "^7.3.13",
|
||||
"@types/ws": "^6.0.4",
|
||||
"async-listen": "^3.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.0.4",
|
||||
"ws": "^3.3.3",
|
||||
"tsconfig": "0.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "jest --env node --verbose --bail",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"pack": "node ../../scripts/pack.mjs"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user