pnpm 6.32.8 → 6.32.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ packageManager: pnpm@7.0.0-alpha.2
11
11
  pendingBuilds:
12
12
  - /node-gyp/8.4.1
13
13
  - /encoding/0.1.13
14
- prunedAt: Sat, 16 Apr 2022 09:50:37 GMT
14
+ prunedAt: Tue, 19 Apr 2022 12:23:03 GMT
15
15
  publicHoistPattern:
16
16
  - '*types*'
17
17
  - '*eslint*'
@@ -376,7 +376,7 @@ packages:
376
376
  minipass-pipeline: 1.2.4
377
377
  negotiator: 0.6.3
378
378
  promise-retry: 2.0.1
379
- socks-proxy-agent: 6.1.1
379
+ socks-proxy-agent: 6.2.0
380
380
  ssri: 8.0.1
381
381
  transitivePeerDependencies:
382
382
  - supports-color
@@ -609,8 +609,8 @@ packages:
609
609
  dev: false
610
610
  optional: true
611
611
 
612
- /socks-proxy-agent/6.1.1:
613
- resolution: {integrity: sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==}
612
+ /socks-proxy-agent/6.2.0:
613
+ resolution: {integrity: sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==}
614
614
  engines: {node: '>= 10'}
615
615
  dependencies:
616
616
  agent-base: 6.0.2
@@ -1,14 +1,197 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
5
- const agent_1 = __importDefault(require("./agent"));
6
- function createSocksProxyAgent(opts) {
7
- return new agent_1.default(opts);
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SocksProxyAgent = void 0;
16
+ const socks_1 = require("socks");
17
+ const agent_base_1 = require("agent-base");
18
+ const debug_1 = __importDefault(require("debug"));
19
+ const dns_1 = __importDefault(require("dns"));
20
+ const tls_1 = __importDefault(require("tls"));
21
+ const debug = (0, debug_1.default)('socks-proxy-agent');
22
+ function parseSocksProxy(opts) {
23
+ var _a;
24
+ let port = 0;
25
+ let lookup = false;
26
+ let type = 5;
27
+ const host = opts.hostname;
28
+ if (host == null) {
29
+ throw new TypeError('No "host"');
30
+ }
31
+ if (typeof opts.port === 'number') {
32
+ port = opts.port;
33
+ }
34
+ else if (typeof opts.port === 'string') {
35
+ port = parseInt(opts.port, 10);
36
+ }
37
+ // From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3
38
+ // "The SOCKS service is conventionally located on TCP port 1080"
39
+ if (port == null) {
40
+ port = 1080;
41
+ }
42
+ // figure out if we want socks v4 or v5, based on the "protocol" used.
43
+ // Defaults to 5.
44
+ if (opts.protocol != null) {
45
+ switch (opts.protocol.replace(':', '')) {
46
+ case 'socks4':
47
+ lookup = true;
48
+ // pass through
49
+ case 'socks4a':
50
+ type = 4;
51
+ break;
52
+ case 'socks5':
53
+ lookup = true;
54
+ // pass through
55
+ case 'socks': // no version specified, default to 5h
56
+ case 'socks5h':
57
+ type = 5;
58
+ break;
59
+ default:
60
+ throw new TypeError(`A "socks" protocol must be specified! Got: ${String(opts.protocol)}`);
61
+ }
62
+ }
63
+ if (typeof opts.type !== 'undefined') {
64
+ if (opts.type === 4 || opts.type === 5) {
65
+ type = opts.type;
66
+ }
67
+ else {
68
+ throw new TypeError(`"type" must be 4 or 5, got: ${String(opts.type)}`);
69
+ }
70
+ }
71
+ const proxy = {
72
+ host,
73
+ port,
74
+ type
75
+ };
76
+ let userId = (_a = opts.userId) !== null && _a !== void 0 ? _a : opts.username;
77
+ let password = opts.password;
78
+ if (opts.auth != null) {
79
+ const auth = opts.auth.split(':');
80
+ userId = auth[0];
81
+ password = auth[1];
82
+ }
83
+ if (userId != null) {
84
+ Object.defineProperty(proxy, 'userId', {
85
+ value: userId,
86
+ enumerable: false
87
+ });
88
+ }
89
+ if (password != null) {
90
+ Object.defineProperty(proxy, 'password', {
91
+ value: password,
92
+ enumerable: false
93
+ });
94
+ }
95
+ return { lookup, proxy };
96
+ }
97
+ const normalizeProxyOptions = (input) => {
98
+ let proxyOptions;
99
+ if (typeof input === 'string') {
100
+ proxyOptions = new URL(input);
101
+ }
102
+ else {
103
+ proxyOptions = input;
104
+ }
105
+ if (proxyOptions == null) {
106
+ throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!');
107
+ }
108
+ return proxyOptions;
109
+ };
110
+ class SocksProxyAgent extends agent_base_1.Agent {
111
+ constructor(input, options) {
112
+ var _a;
113
+ const proxyOptions = normalizeProxyOptions(input);
114
+ super(proxyOptions);
115
+ const parsedProxy = parseSocksProxy(proxyOptions);
116
+ this.shouldLookup = parsedProxy.lookup;
117
+ this.proxy = parsedProxy.proxy;
118
+ this.tlsConnectionOptions = proxyOptions.tls != null ? proxyOptions.tls : {};
119
+ this.timeout = (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : null;
120
+ }
121
+ /**
122
+ * Initiates a SOCKS connection to the specified SOCKS proxy server,
123
+ * which in turn connects to the specified remote host and port.
124
+ *
125
+ * @api protected
126
+ */
127
+ callback(req, opts) {
128
+ var _a;
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ const { shouldLookup, proxy, timeout } = this;
131
+ let { host, port, lookup: lookupCallback } = opts;
132
+ if (host == null) {
133
+ throw new Error('No `host` defined!');
134
+ }
135
+ if (shouldLookup) {
136
+ // Client-side DNS resolution for "4" and "5" socks proxy versions.
137
+ host = yield new Promise((resolve, reject) => {
138
+ // Use the request's custom lookup, if one was configured:
139
+ const lookupFn = lookupCallback !== null && lookupCallback !== void 0 ? lookupCallback : dns_1.default.lookup;
140
+ lookupFn(host, {}, (err, res) => {
141
+ if (err) {
142
+ reject(err);
143
+ }
144
+ else {
145
+ resolve(res);
146
+ }
147
+ });
148
+ });
149
+ }
150
+ const socksOpts = {
151
+ proxy,
152
+ destination: { host, port },
153
+ command: 'connect',
154
+ timeout: timeout !== null && timeout !== void 0 ? timeout : undefined
155
+ };
156
+ const cleanup = (tlsSocket) => {
157
+ req.destroy();
158
+ socket.destroy();
159
+ if (tlsSocket)
160
+ tlsSocket.destroy();
161
+ };
162
+ debug('Creating socks proxy connection: %o', socksOpts);
163
+ const { socket } = yield socks_1.SocksClient.createConnection(socksOpts);
164
+ debug('Successfully created socks proxy connection');
165
+ if (timeout !== null) {
166
+ socket.setTimeout(timeout);
167
+ socket.on('timeout', () => cleanup());
168
+ }
169
+ if (opts.secureEndpoint) {
170
+ // The proxy is connecting to a TLS server, so upgrade
171
+ // this socket connection to a TLS connection.
172
+ debug('Upgrading socket connection to TLS');
173
+ const servername = (_a = opts.servername) !== null && _a !== void 0 ? _a : opts.host;
174
+ const tlsSocket = tls_1.default.connect(Object.assign(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
175
+ servername }), this.tlsConnectionOptions));
176
+ tlsSocket.once('error', (error) => {
177
+ debug('socket TLS error', error.message);
178
+ cleanup(tlsSocket);
179
+ });
180
+ return tlsSocket;
181
+ }
182
+ return socket;
183
+ });
184
+ }
185
+ }
186
+ exports.SocksProxyAgent = SocksProxyAgent;
187
+ function omit(obj, ...keys) {
188
+ const ret = {};
189
+ let key;
190
+ for (key in obj) {
191
+ if (!keys.includes(key)) {
192
+ ret[key] = obj[key];
193
+ }
194
+ }
195
+ return ret;
8
196
  }
9
- (function (createSocksProxyAgent) {
10
- createSocksProxyAgent.SocksProxyAgent = agent_1.default;
11
- createSocksProxyAgent.prototype = agent_1.default.prototype;
12
- })(createSocksProxyAgent || (createSocksProxyAgent = {}));
13
- module.exports = createSocksProxyAgent;
14
197
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAuC;AAEvC,SAAS,qBAAqB,CAC7B,IAA2D;IAE3D,OAAO,IAAI,eAAgB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,WAAU,qBAAqB;IAcjB,qCAAe,GAAG,eAAgB,CAAC;IAEhD,qBAAqB,CAAC,SAAS,GAAG,eAAgB,CAAC,SAAS,CAAC;AAC9D,CAAC,EAjBS,qBAAqB,KAArB,qBAAqB,QAiB9B;AAED,iBAAS,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAmE;AACnE,2CAAiE;AAEjE,kDAA+B;AAE/B,8CAAqB;AAErB,8CAAqB;AAarB,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAA;AAE9C,SAAS,eAAe,CAAE,IAA4B;;IACpD,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,IAAI,IAAI,GAAuB,CAAC,CAAA;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAA;IAE1B,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,MAAM,IAAI,SAAS,CAAC,WAAW,CAAC,CAAA;KACjC;IAED,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;QACjC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;KACjB;SAAM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ACjB;YAED,OAAO,MAAM,CAAA;;KACd;CACF;AA7FD,0CA6FC;AAED,SAAS,IAAI,CACX,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAAgD,CAAA;IAC5D,IAAI,GAAqB,CAAA;IACzB,KAAK,GAAG,IAAI,GAAG,EAAE;QACf,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACvB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;SACpB;KACF;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -1,64 +1,177 @@
1
1
  {
2
2
  "name": "socks-proxy-agent",
3
- "version": "6.1.1",
4
3
  "description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
5
- "main": "dist/index",
6
- "typings": "dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "scripts": {
11
- "prebuild": "rimraf dist",
12
- "build": "tsc",
13
- "test": "mocha --reporter spec",
14
- "test-lint": "eslint src --ext .js,.ts",
15
- "prepublishOnly": "npm run build"
4
+ "homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
5
+ "version": "6.2.0",
6
+ "main": "dist/index.js",
7
+ "author": {
8
+ "email": "nathan@tootallnate.net",
9
+ "name": "Nathan Rajlich",
10
+ "url": "http://n8.io/"
16
11
  },
12
+ "contributors": [
13
+ {
14
+ "name": "Kiko Beats",
15
+ "email": "josefrancisco.verdu@gmail.com"
16
+ },
17
+ {
18
+ "name": "Josh Glazebrook",
19
+ "email": "josh@joshglazebrook.com"
20
+ },
21
+ {
22
+ "name": "talmobi",
23
+ "email": "talmobi@users.noreply.github.com"
24
+ },
25
+ {
26
+ "name": "Indospace.io",
27
+ "email": "justin@indospace.io"
28
+ },
29
+ {
30
+ "name": "Kilian von Pflugk",
31
+ "email": "github@jumoog.io"
32
+ },
33
+ {
34
+ "name": "Kyle",
35
+ "email": "admin@hk1229.cn"
36
+ },
37
+ {
38
+ "name": "Matheus Fernandes",
39
+ "email": "matheus.frndes@gmail.com"
40
+ },
41
+ {
42
+ "name": "Shantanu Sharma",
43
+ "email": "shantanu34@outlook.com"
44
+ },
45
+ {
46
+ "name": "Tim Perry",
47
+ "email": "pimterry@gmail.com"
48
+ },
49
+ {
50
+ "name": "Vadim Baryshev",
51
+ "email": "vadimbaryshev@gmail.com"
52
+ },
53
+ {
54
+ "name": "jigu",
55
+ "email": "luo1257857309@gmail.com"
56
+ },
57
+ {
58
+ "name": "Alba Mendez",
59
+ "email": "me@jmendeth.com"
60
+ },
61
+ {
62
+ "name": "Дмитрий Гуденков",
63
+ "email": "Dimangud@rambler.ru"
64
+ },
65
+ {
66
+ "name": "Andrei Bitca",
67
+ "email": "63638922+andrei-bitca-dc@users.noreply.github.com"
68
+ },
69
+ {
70
+ "name": "Andrew Casey",
71
+ "email": "amcasey@users.noreply.github.com"
72
+ },
73
+ {
74
+ "name": "Brandon Ros",
75
+ "email": "brandonros1@gmail.com"
76
+ },
77
+ {
78
+ "name": "Dang Duy Thanh",
79
+ "email": "thanhdd.it@gmail.com"
80
+ },
81
+ {
82
+ "name": "Dimitar Nestorov",
83
+ "email": "8790386+dimitarnestorov@users.noreply.github.com"
84
+ }
85
+ ],
17
86
  "repository": {
18
87
  "type": "git",
19
88
  "url": "git://github.com/TooTallNate/node-socks-proxy-agent.git"
20
89
  },
90
+ "bugs": {
91
+ "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues"
92
+ },
21
93
  "keywords": [
94
+ "agent",
95
+ "http",
96
+ "https",
97
+ "proxy",
22
98
  "socks",
23
99
  "socks4",
24
100
  "socks4a",
25
101
  "socks5",
26
- "socks5h",
27
- "proxy",
28
- "http",
29
- "https",
30
- "agent"
102
+ "socks5h"
31
103
  ],
32
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
33
- "license": "MIT",
34
- "bugs": {
35
- "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues"
36
- },
37
104
  "dependencies": {
38
105
  "agent-base": "^6.0.2",
39
- "debug": "^4.3.1",
40
- "socks": "^2.6.1"
106
+ "debug": "^4.3.3",
107
+ "socks": "^2.6.2"
41
108
  },
42
109
  "devDependencies": {
110
+ "@commitlint/cli": "latest",
111
+ "@commitlint/config-conventional": "latest",
43
112
  "@types/debug": "latest",
44
113
  "@types/node": "latest",
45
- "@typescript-eslint/eslint-plugin": "latest",
46
- "@typescript-eslint/parser": "latest",
47
- "eslint": "latest",
48
- "eslint-config-airbnb": "latest",
49
- "eslint-config-prettier": "latest",
50
- "eslint-import-resolver-typescript": "latest",
51
- "eslint-plugin-import": "latest",
52
- "eslint-plugin-jsx-a11y": "latest",
53
- "eslint-plugin-react": "latest",
114
+ "cacheable-lookup": "^6.0.4",
115
+ "conventional-github-releaser": "latest",
116
+ "dns2": "^2.0.1",
117
+ "finepack": "latest",
118
+ "git-authors-cli": "latest",
54
119
  "mocha": "latest",
55
- "proxy": "latest",
120
+ "nano-staged": "latest",
121
+ "npm-check-updates": "latest",
122
+ "prettier-standard": "latest",
56
123
  "raw-body": "latest",
57
124
  "rimraf": "latest",
58
- "socksv5": "TooTallNate/socksv5#fix/dstSock-close-event",
125
+ "simple-git-hooks": "latest",
126
+ "socksv5": "github:TooTallNate/socksv5#fix/dstSock-close-event",
127
+ "standard": "latest",
128
+ "standard-markdown": "latest",
129
+ "standard-version": "latest",
130
+ "ts-standard": "latest",
59
131
  "typescript": "latest"
60
132
  },
61
133
  "engines": {
62
134
  "node": ">= 10"
63
- }
64
- }
135
+ },
136
+ "files": [
137
+ "dist"
138
+ ],
139
+ "license": "MIT",
140
+ "commitlint": {
141
+ "extends": [
142
+ "@commitlint/config-conventional"
143
+ ]
144
+ },
145
+ "nano-staged": {
146
+ "*.js": [
147
+ "prettier-standard"
148
+ ],
149
+ "*.md": [
150
+ "standard-markdown"
151
+ ],
152
+ "package.json": [
153
+ "finepack"
154
+ ]
155
+ },
156
+ "simple-git-hooks": {
157
+ "commit-msg": "npx commitlint --edit",
158
+ "pre-commit": "npx nano-staged"
159
+ },
160
+ "typings": "dist/index.d.ts",
161
+ "scripts": {
162
+ "build": "tsc",
163
+ "clean": "rimraf node_modules",
164
+ "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
165
+ "lint": "ts-standard",
166
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
167
+ "prebuild": "rimraf dist",
168
+ "prerelease": "npm run update:check && npm run contributors",
169
+ "release": "standard-version -a",
170
+ "release:github": "conventional-github-releaser -p angular",
171
+ "release:tags": "git push --follow-tags origin HEAD:master",
172
+ "test": "mocha --reporter spec",
173
+ "update": "ncu -u",
174
+ "update:check": "ncu -- --error-level 2"
175
+ },
176
+ "readme": "socks-proxy-agent\n================\n### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS\n[![Build Status](https://github.com/TooTallNate/node-socks-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-socks-proxy-agent/actions?workflow=Node+CI)\n\nThis module provides an `http.Agent` implementation that connects to a\nspecified SOCKS proxy server, and can be used with the built-in `http`\nand `https` modules.\n\nIt can also be used in conjunction with the `ws` module to establish a WebSocket\nconnection over a SOCKS proxy. See the \"Examples\" section below.\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\nnpm install socks-proxy-agent\n```\n\n\nExamples\n--------\n\n#### TypeScript example\n\n```ts\nimport https from 'https';\nimport { SocksProxyAgent } from 'socks-proxy-agent';\n\nconst info = {\n\thostname: 'br41.nordvpn.com',\n\tuserId: 'your-name@gmail.com',\n\tpassword: 'abcdef12345124'\n};\nconst agent = new SocksProxyAgent(info);\n\nhttps.get('https://ipinfo.io', { agent }, (res) => {\n\tconsole.log(res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `http` module example\n\n```js\nvar url = require('url');\nvar http = require('http');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// HTTP endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'http://nodejs.org/api/';\nconsole.log('attempting to GET %j', endpoint);\nvar opts = url.parse(endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\nopts.agent = agent;\n\nhttp.get(opts, function (res) {\n\tconsole.log('\"response\" event!', res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `https` module example\n\n```js\nvar url = require('url');\nvar https = require('https');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// HTTP endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'https://encrypted.google.com/';\nconsole.log('attempting to GET %j', endpoint);\nvar opts = url.parse(endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\nopts.agent = agent;\n\nhttps.get(opts, function (res) {\n\tconsole.log('\"response\" event!', res.headers);\n\tres.pipe(process.stdout);\n});\n```\n\n#### `ws` WebSocket connection example\n\n``` js\nvar WebSocket = require('ws');\nvar { SocksProxyAgent } = require('socks-proxy-agent');\n\n// SOCKS proxy to connect to\nvar proxy = process.env.socks_proxy || 'socks://127.0.0.1:1080';\nconsole.log('using proxy server %j', proxy);\n\n// WebSocket endpoint for the proxy to connect to\nvar endpoint = process.argv[2] || 'ws://echo.websocket.org';\nconsole.log('attempting to connect to WebSocket %j', endpoint);\n\n// create an instance of the `SocksProxyAgent` class with the proxy server information\nvar agent = new SocksProxyAgent(proxy);\n\n// initiate the WebSocket connection\nvar socket = new WebSocket(endpoint, { agent: agent });\n\nsocket.on('open', function () {\n\tconsole.log('\"open\" event!');\n\tsocket.send('hello world');\n});\n\nsocket.on('message', function (data, flags) {\n\tconsole.log('\"message\" event! %j %j', data, flags);\n\tsocket.close();\n});\n```\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
177
+ }
package/dist/pnpm.cjs CHANGED
@@ -3182,7 +3182,7 @@ var require_lib4 = __commonJS({
3182
3182
  var load_json_file_1 = __importDefault(require_load_json_file());
3183
3183
  var defaultManifest = {
3184
3184
  name: "pnpm" != null && true ? "pnpm" : "pnpm",
3185
- version: "6.32.8" != null && true ? "6.32.8" : "0.0.0"
3185
+ version: "6.32.9" != null && true ? "6.32.9" : "0.0.0"
3186
3186
  };
3187
3187
  var pkgJson;
3188
3188
  if (require.main == null) {
@@ -36806,13 +36806,14 @@ var require_reportMisc = __commonJS({
36806
36806
  return mod && mod.__esModule ? mod : { "default": mod };
36807
36807
  };
36808
36808
  Object.defineProperty(exports2, "__esModule", { value: true });
36809
+ exports2.LOG_LEVEL_NUMBER = void 0;
36809
36810
  var os_1 = __importDefault(require("os"));
36810
36811
  var Rx = __importStar2(require_cjs());
36811
36812
  var operators_1 = require_operators();
36812
36813
  var reportError_1 = __importDefault(require_reportError());
36813
36814
  var formatWarn_1 = __importDefault(require_formatWarn());
36814
36815
  var zooming_1 = require_zooming();
36815
- var LOG_LEVEL_NUMBER = {
36816
+ exports2.LOG_LEVEL_NUMBER = {
36816
36817
  error: 0,
36817
36818
  warn: 1,
36818
36819
  info: 2,
@@ -36821,9 +36822,9 @@ var require_reportMisc = __commonJS({
36821
36822
  var MAX_SHOWN_WARNINGS = 5;
36822
36823
  exports2.default = (log$, opts) => {
36823
36824
  var _a, _b;
36824
- const maxLogLevel = (_b = LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : "info"]) !== null && _b !== void 0 ? _b : LOG_LEVEL_NUMBER["info"];
36825
+ const maxLogLevel = (_b = exports2.LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : "info"]) !== null && _b !== void 0 ? _b : exports2.LOG_LEVEL_NUMBER["info"];
36825
36826
  const reportWarning = makeWarningReporter(opts);
36826
- return Rx.merge(log$.registry, log$.other).pipe((0, operators_1.filter)((obj) => LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel && (obj.level !== "info" || !obj["prefix"] || obj["prefix"] === opts.cwd)), (0, operators_1.map)((obj) => {
36827
+ return Rx.merge(log$.registry, log$.other).pipe((0, operators_1.filter)((obj) => exports2.LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel && (obj.level !== "info" || !obj["prefix"] || obj["prefix"] === opts.cwd)), (0, operators_1.map)((obj) => {
36827
36828
  switch (obj.level) {
36828
36829
  case "warn": {
36829
36830
  return reportWarning(obj);
@@ -40926,6 +40927,38 @@ Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://twitter.com/pn
40926
40927
  var require_reporterForClient = __commonJS({
40927
40928
  "../default-reporter/lib/reporterForClient/index.js"(exports2) {
40928
40929
  "use strict";
40930
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
40931
+ if (k2 === void 0)
40932
+ k2 = k;
40933
+ var desc = Object.getOwnPropertyDescriptor(m, k);
40934
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
40935
+ desc = { enumerable: true, get: function() {
40936
+ return m[k];
40937
+ } };
40938
+ }
40939
+ Object.defineProperty(o, k2, desc);
40940
+ } : function(o, m, k, k2) {
40941
+ if (k2 === void 0)
40942
+ k2 = k;
40943
+ o[k2] = m[k];
40944
+ });
40945
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
40946
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
40947
+ } : function(o, v) {
40948
+ o["default"] = v;
40949
+ });
40950
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
40951
+ if (mod && mod.__esModule)
40952
+ return mod;
40953
+ var result2 = {};
40954
+ if (mod != null) {
40955
+ for (var k in mod)
40956
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
40957
+ __createBinding2(result2, mod, k);
40958
+ }
40959
+ __setModuleDefault2(result2, mod);
40960
+ return result2;
40961
+ };
40929
40962
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
40930
40963
  return mod && mod.__esModule ? mod : { "default": mod };
40931
40964
  };
@@ -40937,7 +40970,7 @@ var require_reporterForClient = __commonJS({
40937
40970
  var reportHooks_1 = __importDefault(require_reportHooks());
40938
40971
  var reportInstallChecks_1 = __importDefault(require_reportInstallChecks());
40939
40972
  var reportLifecycleScripts_1 = __importDefault(require_reportLifecycleScripts());
40940
- var reportMisc_1 = __importDefault(require_reportMisc());
40973
+ var reportMisc_1 = __importStar2(require_reportMisc());
40941
40974
  var reportPeerDependencyIssues_1 = __importDefault(require_reportPeerDependencyIssues());
40942
40975
  var reportProgress_1 = __importDefault(require_reportProgress());
40943
40976
  var reportRequestRetry_1 = __importDefault(require_reportRequestRetry());
@@ -40947,23 +40980,17 @@ var require_reporterForClient = __commonJS({
40947
40980
  var reportSummary_1 = __importDefault(require_reportSummary());
40948
40981
  var reportUpdateCheck_1 = __importDefault(require_reportUpdateCheck());
40949
40982
  function default_1(log$, opts) {
40950
- var _a, _b, _c, _d;
40983
+ var _a, _b, _c, _d, _e, _f;
40951
40984
  const width = (_b = (_a = opts.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80;
40952
40985
  const cwd = (_d = (_c = opts.pnpmConfig) === null || _c === void 0 ? void 0 : _c.dir) !== null && _d !== void 0 ? _d : process.cwd();
40953
40986
  const throttle = typeof opts.throttleProgress === "number" && opts.throttleProgress > 0 ? (0, operators_1.throttleTime)(opts.throttleProgress, void 0, { leading: true, trailing: true }) : void 0;
40954
40987
  const outputs = [
40955
- (0, reportProgress_1.default)(log$, {
40956
- cwd,
40957
- throttle
40958
- }),
40959
- (0, reportPeerDependencyIssues_1.default)(log$),
40960
40988
  (0, reportLifecycleScripts_1.default)(log$, {
40961
40989
  appendOnly: opts.appendOnly === true || opts.streamLifecycleOutput,
40962
40990
  aggregateOutput: opts.aggregateOutput,
40963
40991
  cwd,
40964
40992
  width
40965
40993
  }),
40966
- (0, reportDeprecations_1.default)(log$.deprecation, { cwd, isRecursive: opts.isRecursive }),
40967
40994
  (0, reportMisc_1.default)(log$, {
40968
40995
  appendOnly: opts.appendOnly === true,
40969
40996
  config: opts.config,
@@ -40971,12 +40998,6 @@ var require_reporterForClient = __commonJS({
40971
40998
  logLevel: opts.logLevel,
40972
40999
  zoomOutCurrent: opts.isRecursive
40973
41000
  }),
40974
- ...(0, reportStats_1.default)(log$, {
40975
- cmd: opts.cmd,
40976
- cwd,
40977
- isRecursive: opts.isRecursive,
40978
- width
40979
- }),
40980
41001
  (0, reportInstallChecks_1.default)(log$.installCheck, { cwd }),
40981
41002
  (0, reportRequestRetry_1.default)(log$.requestRetry),
40982
41003
  (0, reportScope_1.default)(log$.scope, { isRecursive: opts.isRecursive, cmd: opts.cmd }),
@@ -40985,6 +41006,21 @@ var require_reporterForClient = __commonJS({
40985
41006
  (0, reportContext_1.default)(log$, { cwd }),
40986
41007
  (0, reportUpdateCheck_1.default)(log$.updateCheck)
40987
41008
  ];
41009
+ const logLevelNumber = (_f = reportMisc_1.LOG_LEVEL_NUMBER[(_e = opts.logLevel) !== null && _e !== void 0 ? _e : "info"]) !== null && _f !== void 0 ? _f : reportMisc_1.LOG_LEVEL_NUMBER["info"];
41010
+ if (logLevelNumber >= reportMisc_1.LOG_LEVEL_NUMBER.warn) {
41011
+ outputs.push((0, reportPeerDependencyIssues_1.default)(log$), (0, reportDeprecations_1.default)(log$.deprecation, { cwd, isRecursive: opts.isRecursive }));
41012
+ }
41013
+ if (logLevelNumber >= reportMisc_1.LOG_LEVEL_NUMBER.info) {
41014
+ outputs.push((0, reportProgress_1.default)(log$, {
41015
+ cwd,
41016
+ throttle
41017
+ }), ...(0, reportStats_1.default)(log$, {
41018
+ cmd: opts.cmd,
41019
+ cwd,
41020
+ isRecursive: opts.isRecursive,
41021
+ width
41022
+ }));
41023
+ }
40988
41024
  if (!opts.appendOnly) {
40989
41025
  outputs.push((0, reportBigTarballsProgress_1.default)(log$));
40990
41026
  }
@@ -116489,7 +116525,7 @@ var require_resolveDependencyTree = __commonJS({
116489
116525
  childrenNodeIds[child.alias] = child.depPath;
116490
116526
  continue;
116491
116527
  }
116492
- if ((0, nodeIdUtils_1.nodeIdContainsSequence)(parentNodeId, parentId, child.depPath)) {
116528
+ if ((0, nodeIdUtils_1.nodeIdContainsSequence)(parentNodeId, parentId, child.depPath) || parentId === child.depPath) {
116493
116529
  continue;
116494
116530
  }
116495
116531
  const childNodeId = (0, nodeIdUtils_1.createNodeId)(parentNodeId, child.depPath);
@@ -117313,10 +117349,10 @@ var require_resolvePeers = __commonJS({
117313
117349
  const children = node.children;
117314
117350
  const parentPkgs = (0, isEmpty_1.default)(children) ? parentParentPkgs : {
117315
117351
  ...parentParentPkgs,
117316
- ...toPkgByName(Object.keys(children).map((alias) => ({
117352
+ ...toPkgByName(Object.entries(children).map(([alias, nodeId2]) => ({
117317
117353
  alias,
117318
- node: ctx.dependenciesTree[children[alias]],
117319
- nodeId: children[alias]
117354
+ node: ctx.dependenciesTree[nodeId2],
117355
+ nodeId: nodeId2
117320
117356
  })))
117321
117357
  };
117322
117358
  const hit = (_a = ctx.peersCache.get(resolvedPackage.depPath)) === null || _a === void 0 ? void 0 : _a.find((cache) => cache.resolvedPeers.every(([name, cachedNodeId]) => {
@@ -117427,14 +117463,17 @@ var require_resolvePeers = __commonJS({
117427
117463
  const allChildren = {};
117428
117464
  if (!ownId || !parentIds.includes(ownId))
117429
117465
  return allChildren;
117430
- const nodeIdChunks = parentIds.join(">").split(ownId);
117466
+ const nodeIdChunks = parentIds.join(">").split(`>${ownId}>`);
117431
117467
  nodeIdChunks.pop();
117432
117468
  nodeIdChunks.reduce((accNodeId, part) => {
117433
- accNodeId += `${part}${ownId}`;
117469
+ accNodeId += `>${part}>${ownId}`;
117434
117470
  const parentNode = dependenciesTree[`${accNodeId}>`];
117435
- Object.assign(allChildren, typeof parentNode.children === "function" ? parentNode.children() : parentNode.children);
117471
+ if (typeof parentNode.children === "function") {
117472
+ parentNode.children = parentNode.children();
117473
+ }
117474
+ Object.assign(allChildren, parentNode.children);
117436
117475
  return accNodeId;
117437
- }, ">");
117476
+ }, "");
117438
117477
  return allChildren;
117439
117478
  }
117440
117479
  function resolvePeersOfChildren(children, parentPkgs, ctx) {
@@ -178553,7 +178592,7 @@ var require_exec = __commonJS({
178553
178592
  PNPM_PACKAGE_NAME: (_b = (_a2 = opts.selectedProjectsGraph) === null || _a2 === void 0 ? void 0 : _a2[prefix]) === null || _b === void 0 ? void 0 : _b.package.manifest.name
178554
178593
  },
178555
178594
  prependPaths: [
178556
- path_1.default.join(opts.dir, "node_modules/.bin"),
178595
+ path_1.default.join(prefix, "node_modules/.bin"),
178557
178596
  ...opts.extraBinPaths
178558
178597
  ],
178559
178598
  userAgent: opts.userAgent
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pnpm",
3
3
  "description": "Fast, disk space efficient package manager",
4
- "version": "6.32.8",
4
+ "version": "6.32.9",
5
5
  "bin": {
6
6
  "pnpm": "bin/pnpm.cjs",
7
7
  "pnpx": "bin/pnpx.cjs"
@@ -22,35 +22,35 @@
22
22
  "@pnpm/assert-project": "workspace:*",
23
23
  "@pnpm/byline": "^1.0.0",
24
24
  "@pnpm/cli-meta": "workspace:2.0.2",
25
- "@pnpm/cli-utils": "workspace:0.6.52",
25
+ "@pnpm/cli-utils": "workspace:0.6.53",
26
26
  "@pnpm/client": "workspace:6.1.3",
27
27
  "@pnpm/command": "workspace:2.0.0",
28
28
  "@pnpm/common-cli-options-help": "workspace:0.8.0",
29
29
  "@pnpm/config": "workspace:13.13.3",
30
30
  "@pnpm/constants": "workspace:5.0.0",
31
31
  "@pnpm/core-loggers": "workspace:6.1.4",
32
- "@pnpm/default-reporter": "workspace:8.5.14",
32
+ "@pnpm/default-reporter": "workspace:8.5.15",
33
33
  "@pnpm/file-reporter": "workspace:2.0.0",
34
- "@pnpm/filter-workspace-packages": "workspace:4.4.24",
34
+ "@pnpm/filter-workspace-packages": "workspace:4.4.25",
35
35
  "@pnpm/find-workspace-dir": "workspace:3.0.2",
36
- "@pnpm/find-workspace-packages": "workspace:3.1.44",
36
+ "@pnpm/find-workspace-packages": "workspace:3.1.45",
37
37
  "@pnpm/lockfile-types": "workspace:3.2.0",
38
38
  "@pnpm/logger": "^4.0.0",
39
39
  "@pnpm/modules-yaml": "workspace:9.1.1",
40
40
  "@pnpm/nopt": "^0.2.1",
41
41
  "@pnpm/parse-cli-args": "workspace:4.4.1",
42
42
  "@pnpm/pick-registry-for-package": "workspace:2.0.11",
43
- "@pnpm/plugin-commands-audit": "workspace:5.1.44",
44
- "@pnpm/plugin-commands-env": "workspace:1.4.17",
45
- "@pnpm/plugin-commands-installation": "workspace:8.4.9",
46
- "@pnpm/plugin-commands-listing": "workspace:4.1.13",
47
- "@pnpm/plugin-commands-outdated": "workspace:5.1.12",
48
- "@pnpm/plugin-commands-publishing": "workspace:4.5.4",
49
- "@pnpm/plugin-commands-rebuild": "workspace:5.4.17",
50
- "@pnpm/plugin-commands-script-runners": "workspace:4.6.4",
51
- "@pnpm/plugin-commands-server": "workspace:3.0.73",
52
- "@pnpm/plugin-commands-setup": "workspace:1.1.37",
53
- "@pnpm/plugin-commands-store": "workspace:4.1.16",
43
+ "@pnpm/plugin-commands-audit": "workspace:5.1.45",
44
+ "@pnpm/plugin-commands-env": "workspace:1.4.18",
45
+ "@pnpm/plugin-commands-installation": "workspace:8.4.10",
46
+ "@pnpm/plugin-commands-listing": "workspace:4.1.14",
47
+ "@pnpm/plugin-commands-outdated": "workspace:5.1.13",
48
+ "@pnpm/plugin-commands-publishing": "workspace:4.5.5",
49
+ "@pnpm/plugin-commands-rebuild": "workspace:5.4.18",
50
+ "@pnpm/plugin-commands-script-runners": "workspace:4.6.5",
51
+ "@pnpm/plugin-commands-server": "workspace:3.0.74",
52
+ "@pnpm/plugin-commands-setup": "workspace:1.1.38",
53
+ "@pnpm/plugin-commands-store": "workspace:4.1.17",
54
54
  "@pnpm/prepare": "workspace:*",
55
55
  "@pnpm/read-package-json": "workspace:5.0.12",
56
56
  "@pnpm/read-project-manifest": "workspace:2.0.13",
@@ -1,181 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const dns_1 = __importDefault(require("dns"));
16
- const tls_1 = __importDefault(require("tls"));
17
- const url_1 = __importDefault(require("url"));
18
- const debug_1 = __importDefault(require("debug"));
19
- const agent_base_1 = require("agent-base");
20
- const socks_1 = require("socks");
21
- const debug = debug_1.default('socks-proxy-agent');
22
- function dnsLookup(host) {
23
- return new Promise((resolve, reject) => {
24
- dns_1.default.lookup(host, (err, res) => {
25
- if (err) {
26
- reject(err);
27
- }
28
- else {
29
- resolve(res);
30
- }
31
- });
32
- });
33
- }
34
- function parseSocksProxy(opts) {
35
- let port = 0;
36
- let lookup = false;
37
- let type = 5;
38
- // Prefer `hostname` over `host`, because of `url.parse()`
39
- const host = opts.hostname || opts.host;
40
- if (!host) {
41
- throw new TypeError('No "host"');
42
- }
43
- if (typeof opts.port === 'number') {
44
- port = opts.port;
45
- }
46
- else if (typeof opts.port === 'string') {
47
- port = parseInt(opts.port, 10);
48
- }
49
- // From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3
50
- // "The SOCKS service is conventionally located on TCP port 1080"
51
- if (!port) {
52
- port = 1080;
53
- }
54
- // figure out if we want socks v4 or v5, based on the "protocol" used.
55
- // Defaults to 5.
56
- if (opts.protocol) {
57
- switch (opts.protocol.replace(':', '')) {
58
- case 'socks4':
59
- lookup = true;
60
- // pass through
61
- case 'socks4a':
62
- type = 4;
63
- break;
64
- case 'socks5':
65
- lookup = true;
66
- // pass through
67
- case 'socks': // no version specified, default to 5h
68
- case 'socks5h':
69
- type = 5;
70
- break;
71
- default:
72
- throw new TypeError(`A "socks" protocol must be specified! Got: ${opts.protocol}`);
73
- }
74
- }
75
- if (typeof opts.type !== 'undefined') {
76
- if (opts.type === 4 || opts.type === 5) {
77
- type = opts.type;
78
- }
79
- else {
80
- throw new TypeError(`"type" must be 4 or 5, got: ${opts.type}`);
81
- }
82
- }
83
- const proxy = {
84
- host,
85
- port,
86
- type
87
- };
88
- let userId = opts.userId || opts.username;
89
- let password = opts.password;
90
- if (opts.auth) {
91
- const auth = opts.auth.split(':');
92
- userId = auth[0];
93
- password = auth[1];
94
- }
95
- if (userId) {
96
- Object.defineProperty(proxy, 'userId', {
97
- value: userId,
98
- enumerable: false
99
- });
100
- }
101
- if (password) {
102
- Object.defineProperty(proxy, 'password', {
103
- value: password,
104
- enumerable: false
105
- });
106
- }
107
- return { lookup, proxy };
108
- }
109
- /**
110
- * The `SocksProxyAgent`.
111
- *
112
- * @api public
113
- */
114
- class SocksProxyAgent extends agent_base_1.Agent {
115
- constructor(_opts) {
116
- let opts;
117
- if (typeof _opts === 'string') {
118
- opts = url_1.default.parse(_opts);
119
- }
120
- else {
121
- opts = _opts;
122
- }
123
- if (!opts) {
124
- throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!');
125
- }
126
- super(opts);
127
- const parsedProxy = parseSocksProxy(opts);
128
- this.lookup = parsedProxy.lookup;
129
- this.proxy = parsedProxy.proxy;
130
- this.tlsConnectionOptions = opts.tls || {};
131
- }
132
- /**
133
- * Initiates a SOCKS connection to the specified SOCKS proxy server,
134
- * which in turn connects to the specified remote host and port.
135
- *
136
- * @api protected
137
- */
138
- callback(req, opts) {
139
- return __awaiter(this, void 0, void 0, function* () {
140
- const { lookup, proxy } = this;
141
- let { host, port, timeout } = opts;
142
- if (!host) {
143
- throw new Error('No `host` defined!');
144
- }
145
- if (lookup) {
146
- // Client-side DNS resolution for "4" and "5" socks proxy versions.
147
- host = yield dnsLookup(host);
148
- }
149
- const socksOpts = {
150
- proxy,
151
- destination: { host, port },
152
- command: 'connect',
153
- timeout
154
- };
155
- debug('Creating socks proxy connection: %o', socksOpts);
156
- const { socket } = yield socks_1.SocksClient.createConnection(socksOpts);
157
- debug('Successfully created socks proxy connection');
158
- if (opts.secureEndpoint) {
159
- // The proxy is connecting to a TLS server, so upgrade
160
- // this socket connection to a TLS connection.
161
- debug('Upgrading socket connection to TLS');
162
- const servername = opts.servername || opts.host;
163
- return tls_1.default.connect(Object.assign(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
164
- servername }), this.tlsConnectionOptions));
165
- }
166
- return socket;
167
- });
168
- }
169
- }
170
- exports.default = SocksProxyAgent;
171
- function omit(obj, ...keys) {
172
- const ret = {};
173
- let key;
174
- for (key in obj) {
175
- if (!keys.includes(key)) {
176
- ret[key] = obj[key];
177
- }
178
- }
179
- return ret;
180
- }
181
- //# sourceMappingURL=agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AAEtB,8CAAsB;AACtB,8CAAsB;AACtB,kDAAgC;AAChC,2CAAkE;AAClE,iCAAoE;AAGpE,MAAM,KAAK,GAAG,eAAW,CAAC,mBAAmB,CAAC,CAAC;AAE/C,SAAS,SAAS,CAAC,IAAY;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,aAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,GAAG,EAAE;gBACR,MAAM,CAAC,GAAG,CAAC,CAAC;aACZ;iBAAM;gBACN,OAAO,CAAC,GAAG,CAAC,CAAC;aACb;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACvB,IAA4B;IAE5B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,IAAI,GAAuB,CAAC,CAAC;IAEjC,0DAA0D;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC;IACxC,IAAI,CAAC,IAAI,EAAE;QACV,MAAM,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;KACjC;IAED,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