diff --git a/node_modules/builtins/index.js b/node_modules/builtins/index.js index 3c781da735419..b715278437cbc 100644 --- a/node_modules/builtins/index.js +++ b/node_modules/builtins/index.js @@ -46,7 +46,8 @@ const versionLockedModules = { http2: '>=8.4.0', perf_hooks: '>=8.5.0', trace_events: '>=10.0.0', - worker_threads: '>=12.0.0' + worker_threads: '>=12.0.0', + 'node:test': '>=18.0.0' } const experimentalModules = { diff --git a/node_modules/builtins/package.json b/node_modules/builtins/package.json index 9c6c108d3ff5e..1c43660c7483f 100644 --- a/node_modules/builtins/package.json +++ b/node_modules/builtins/package.json @@ -1,19 +1,19 @@ { "name": "builtins", - "version": "5.0.0", + "version": "5.0.1", "description": "List of node.js builtin modules", "repository": "juliangruber/builtins", "license": "MIT", "main": "index.js", "files": [], "scripts": { - "test": "prettier-standard && standard && node test.js" + "test": "prettier-standard && standard && node-core-test" }, "dependencies": { "semver": "^7.0.0" }, "devDependencies": { - "node-core-test": "^1.1.1", + "node-core-test": "^1.4.0", "prettier-standard": "^15.0.1", "standard": "^14.3.4" } diff --git a/node_modules/https-proxy-agent/dist/agent.js b/node_modules/https-proxy-agent/dist/agent.js index d6665259f91f1..75d11364ed300 100644 --- a/node_modules/https-proxy-agent/dist/agent.js +++ b/node_modules/https-proxy-agent/dist/agent.js @@ -118,13 +118,10 @@ class HttpsProxyAgent extends agent_base_1.Agent { if (statusCode === 200) { req.once('socket', resume); if (opts.secureEndpoint) { - const servername = opts.servername || opts.host; - if (!servername) { - throw new Error('Could not determine "servername"'); - } // The proxy is connecting to a TLS server, so upgrade // this socket connection to a TLS connection. debug('Upgrading socket connection to TLS'); + const servername = opts.servername || opts.host; return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, servername })); } @@ -141,7 +138,7 @@ class HttpsProxyAgent extends agent_base_1.Agent { // // See: https://hackerone.com/reports/541502 socket.destroy(); - const fakeSocket = new net_1.default.Socket(); + const fakeSocket = new net_1.default.Socket({ writable: false }); fakeSocket.readable = true; // Need to wait for the "socket" event to re-play the "data" events. req.once('socket', (s) => { diff --git a/node_modules/https-proxy-agent/dist/agent.js.map b/node_modules/https-proxy-agent/dist/agent.js.map index d1307cdd8afae..0af6c17a3e78a 100644 --- a/node_modules/https-proxy-agent/dist/agent.js.map +++ b/node_modules/https-proxy-agent/dist/agent.js.map @@ -1 +1 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,oDAA4B;AAC5B,kDAAgC;AAEhC,2CAAkE;AAElE,kFAAwD;AAExD,MAAM,KAAK,GAAG,eAAW,CAAC,yBAAyB,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAqB,eAAgB,SAAQ,kBAAK;IAIjD,YAAY,KAAsC;QACjD,IAAI,IAA4B,CAAC;QACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;aAAM;YACN,IAAI,GAAG,KAAK,CAAC;SACb;QACD,IAAI,CAAC,IAAI,EAAE;YACV,MAAM,IAAI,KAAK,CACd,8DAA8D,CAC9D,CAAC;SACF;QACD,KAAK,CAAC,2CAA2C,EAAE,IAAI,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,MAAM,KAAK,qBAAgC,IAAI,CAAE,CAAC;QAElD,wDAAwD;QACxD,uBAAuB;QACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE/D,+DAA+D;QAC/D,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC;QAC1C,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YACnC,KAAK,CAA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AAO,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json index 7872bdf902abf..fb2aba1b94695 100644 --- a/node_modules/https-proxy-agent/package.json +++ b/node_modules/https-proxy-agent/package.json @@ -1,6 +1,6 @@ { "name": "https-proxy-agent", - "version": "5.0.0", + "version": "5.0.1", "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", "main": "dist/index", "types": "dist/index", diff --git a/node_modules/ip/lib/ip.js b/node_modules/ip/lib/ip.js index c1799a8c50f42..5b5ccc246a4ab 100644 --- a/node_modules/ip/lib/ip.js +++ b/node_modules/ip/lib/ip.js @@ -1,17 +1,15 @@ -'use strict'; - var ip = exports; -var Buffer = require('buffer').Buffer; +var { Buffer } = require('buffer'); var os = require('os'); -ip.toBuffer = function(ip, buff, offset) { +ip.toBuffer = function (ip, buff, offset) { offset = ~~offset; var result; if (this.isV4Format(ip)) { result = buff || new Buffer(offset + 4); - ip.split(/\./g).map(function(byte) { + ip.split(/\./g).map((byte) => { result[offset++] = parseInt(byte, 10) & 0xff; }); } else if (this.isV6Format(ip)) { @@ -38,7 +36,7 @@ ip.toBuffer = function(ip, buff, offset) { while (sections.length < 8) sections.push('0'); } else if (sections.length < 8) { for (i = 0; i < sections.length && sections[i] !== ''; i++); - var argv = [ i, 1 ]; + var argv = [i, 1]; for (i = 9 - sections.length; i > 0; i--) { argv.push('0'); } @@ -54,26 +52,27 @@ ip.toBuffer = function(ip, buff, offset) { } if (!result) { - throw Error('Invalid ip address: ' + ip); + throw Error(`Invalid ip address: ${ip}`); } return result; }; -ip.toString = function(buff, offset, length) { +ip.toString = function (buff, offset, length) { offset = ~~offset; length = length || (buff.length - offset); var result = []; + var i; if (length === 4) { // IPv4 - for (var i = 0; i < length; i++) { + for (i = 0; i < length; i++) { result.push(buff[offset + i]); } result = result.join('.'); } else if (length === 16) { // IPv6 - for (var i = 0; i < length; i += 2) { + for (i = 0; i < length; i += 2) { result.push(buff.readUInt16BE(offset + i).toString(16)); } result = result.join(':'); @@ -85,21 +84,27 @@ ip.toString = function(buff, offset, length) { }; var ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/; -var ipv6Regex = - /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i; +var ipv6Regex = /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i; -ip.isV4Format = function(ip) { +ip.isV4Format = function (ip) { return ipv4Regex.test(ip); }; -ip.isV6Format = function(ip) { +ip.isV6Format = function (ip) { return ipv6Regex.test(ip); }; + function _normalizeFamily(family) { + if (family === 4) { + return 'ipv4'; + } + if (family === 6) { + return 'ipv6'; + } return family ? family.toLowerCase() : 'ipv4'; } -ip.fromPrefixLen = function(prefixlen, family) { +ip.fromPrefixLen = function (prefixlen, family) { if (prefixlen > 32) { family = 'ipv6'; } else { @@ -125,14 +130,14 @@ ip.fromPrefixLen = function(prefixlen, family) { return ip.toString(buff); }; -ip.mask = function(addr, mask) { +ip.mask = function (addr, mask) { addr = ip.toBuffer(addr); mask = ip.toBuffer(mask); var result = new Buffer(Math.max(addr.length, mask.length)); - var i = 0; // Same protocol - do bitwise and + var i; if (addr.length === mask.length) { for (i = 0; i < addr.length; i++) { result[i] = addr[i] & mask[i]; @@ -141,11 +146,11 @@ ip.mask = function(addr, mask) { // IPv6 address and IPv4 mask // (Mask low bits) for (i = 0; i < mask.length; i++) { - result[i] = addr[addr.length - 4 + i] & mask[i]; + result[i] = addr[addr.length - 4 + i] & mask[i]; } } else { // IPv6 mask and IPv4 addr - for (var i = 0; i < result.length - 6; i++) { + for (i = 0; i < result.length - 6; i++) { result[i] = 0; } @@ -155,27 +160,29 @@ ip.mask = function(addr, mask) { for (i = 0; i < addr.length; i++) { result[i + 12] = addr[i] & mask[i + 12]; } - i = i + 12; + i += 12; } - for (; i < result.length; i++) + for (; i < result.length; i++) { result[i] = 0; + } return ip.toString(result); }; -ip.cidr = function(cidrString) { +ip.cidr = function (cidrString) { var cidrParts = cidrString.split('/'); var addr = cidrParts[0]; - if (cidrParts.length !== 2) - throw new Error('invalid CIDR subnet: ' + addr); + if (cidrParts.length !== 2) { + throw new Error(`invalid CIDR subnet: ${addr}`); + } var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); return ip.mask(addr, mask); }; -ip.subnet = function(addr, mask) { +ip.subnet = function (addr, mask) { var networkAddress = ip.toLong(ip.mask(addr, mask)); // Calculate the mask's length. @@ -198,37 +205,38 @@ ip.subnet = function(addr, mask) { return { networkAddress: ip.fromLong(networkAddress), - firstAddress: numberOfAddresses <= 2 ? - ip.fromLong(networkAddress) : - ip.fromLong(networkAddress + 1), - lastAddress: numberOfAddresses <= 2 ? - ip.fromLong(networkAddress + numberOfAddresses - 1) : - ip.fromLong(networkAddress + numberOfAddresses - 2), + firstAddress: numberOfAddresses <= 2 + ? ip.fromLong(networkAddress) + : ip.fromLong(networkAddress + 1), + lastAddress: numberOfAddresses <= 2 + ? ip.fromLong(networkAddress + numberOfAddresses - 1) + : ip.fromLong(networkAddress + numberOfAddresses - 2), broadcastAddress: ip.fromLong(networkAddress + numberOfAddresses - 1), subnetMask: mask, subnetMaskLength: maskLength, - numHosts: numberOfAddresses <= 2 ? - numberOfAddresses : numberOfAddresses - 2, + numHosts: numberOfAddresses <= 2 + ? numberOfAddresses : numberOfAddresses - 2, length: numberOfAddresses, - contains: function(other) { + contains(other) { return networkAddress === ip.toLong(ip.mask(other, mask)); - } + }, }; }; -ip.cidrSubnet = function(cidrString) { +ip.cidrSubnet = function (cidrString) { var cidrParts = cidrString.split('/'); var addr = cidrParts[0]; - if (cidrParts.length !== 2) - throw new Error('invalid CIDR subnet: ' + addr); + if (cidrParts.length !== 2) { + throw new Error(`invalid CIDR subnet: ${addr}`); + } var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); return ip.subnet(addr, mask); }; -ip.not = function(addr) { +ip.not = function (addr) { var buff = ip.toBuffer(addr); for (var i = 0; i < buff.length; i++) { buff[i] = 0xff ^ buff[i]; @@ -236,42 +244,45 @@ ip.not = function(addr) { return ip.toString(buff); }; -ip.or = function(a, b) { +ip.or = function (a, b) { + var i; + a = ip.toBuffer(a); b = ip.toBuffer(b); // same protocol if (a.length === b.length) { - for (var i = 0; i < a.length; ++i) { + for (i = 0; i < a.length; ++i) { a[i] |= b[i]; } return ip.toString(a); // mixed protocols - } else { - var buff = a; - var other = b; - if (b.length > a.length) { - buff = b; - other = a; - } - - var offset = buff.length - other.length; - for (var i = offset; i < buff.length; ++i) { - buff[i] |= other[i - offset]; - } + } + var buff = a; + var other = b; + if (b.length > a.length) { + buff = b; + other = a; + } - return ip.toString(buff); + var offset = buff.length - other.length; + for (i = offset; i < buff.length; ++i) { + buff[i] |= other[i - offset]; } + + return ip.toString(buff); }; -ip.isEqual = function(a, b) { +ip.isEqual = function (a, b) { + var i; + a = ip.toBuffer(a); b = ip.toBuffer(b); // Same protocol if (a.length === b.length) { - for (var i = 0; i < a.length; i++) { + for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) return false; } return true; @@ -285,47 +296,47 @@ ip.isEqual = function(a, b) { } // a - IPv4, b - IPv6 - for (var i = 0; i < 10; i++) { + for (i = 0; i < 10; i++) { if (b[i] !== 0) return false; } var word = b.readUInt16BE(10); if (word !== 0 && word !== 0xffff) return false; - for (var i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) { if (a[i] !== b[i + 12]) return false; } return true; }; -ip.isPrivate = function(addr) { +ip.isPrivate = function (addr) { return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i - .test(addr) || - /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || - /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i - .test(addr) || - /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || - /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || - /^f[cd][0-9a-f]{2}:/i.test(addr) || - /^fe80:/i.test(addr) || - /^::1$/.test(addr) || - /^::$/.test(addr); + .test(addr) + || /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) + || /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i + .test(addr) + || /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) + || /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) + || /^f[cd][0-9a-f]{2}:/i.test(addr) + || /^fe80:/i.test(addr) + || /^::1$/.test(addr) + || /^::$/.test(addr); }; -ip.isPublic = function(addr) { +ip.isPublic = function (addr) { return !ip.isPrivate(addr); }; -ip.isLoopback = function(addr) { +ip.isLoopback = function (addr) { return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/ - .test(addr) || - /^fe80::1$/.test(addr) || - /^::1$/.test(addr) || - /^::$/.test(addr); + .test(addr) + || /^fe80::1$/.test(addr) + || /^::1$/.test(addr) + || /^::$/.test(addr); }; -ip.loopback = function(family) { +ip.loopback = function (family) { // // Default to `ipv4` // @@ -353,9 +364,8 @@ ip.loopback = function(family) { // * 'private': the first private ip address of family. // * undefined: First address with `ipv4` or loopback address `127.0.0.1`. // -ip.address = function(name, family) { +ip.address = function (name, family) { var interfaces = os.networkInterfaces(); - var all; // // Default to `ipv4` @@ -367,30 +377,31 @@ ip.address = function(name, family) { // return the address. // if (name && name !== 'private' && name !== 'public') { - var res = interfaces[name].filter(function(details) { - var itemFamily = details.family.toLowerCase(); + var res = interfaces[name].filter((details) => { + var itemFamily = _normalizeFamily(details.family); return itemFamily === family; }); - if (res.length === 0) + if (res.length === 0) { return undefined; + } return res[0].address; } - var all = Object.keys(interfaces).map(function (nic) { + var all = Object.keys(interfaces).map((nic) => { // // Note: name will only be `public` or `private` // when this is called. // - var addresses = interfaces[nic].filter(function (details) { - details.family = details.family.toLowerCase(); + var addresses = interfaces[nic].filter((details) => { + details.family = _normalizeFamily(details.family); if (details.family !== family || ip.isLoopback(details.address)) { return false; - } else if (!name) { + } if (!name) { return true; } - return name === 'public' ? ip.isPrivate(details.address) : - ip.isPublic(details.address); + return name === 'public' ? ip.isPrivate(details.address) + : ip.isPublic(details.address); }); return addresses.length ? addresses[0].address : undefined; @@ -399,18 +410,18 @@ ip.address = function(name, family) { return !all.length ? ip.loopback(family) : all[0]; }; -ip.toLong = function(ip) { +ip.toLong = function (ip) { var ipl = 0; - ip.split('.').forEach(function(octet) { + ip.split('.').forEach((octet) => { ipl <<= 8; ipl += parseInt(octet); }); - return(ipl >>> 0); + return (ipl >>> 0); }; -ip.fromLong = function(ipl) { - return ((ipl >>> 24) + '.' + - (ipl >> 16 & 255) + '.' + - (ipl >> 8 & 255) + '.' + - (ipl & 255) ); +ip.fromLong = function (ipl) { + return (`${ipl >>> 24}.${ + ipl >> 16 & 255}.${ + ipl >> 8 & 255}.${ + ipl & 255}`); }; diff --git a/node_modules/ip/package.json b/node_modules/ip/package.json index c783fdd43767d..70e1a4f02aeb7 100644 --- a/node_modules/ip/package.json +++ b/node_modules/ip/package.json @@ -1,21 +1,25 @@ { "name": "ip", - "version": "1.1.5", + "version": "1.1.8", "author": "Fedor Indutny ", "homepage": "https://github.com/indutny/node-ip", "repository": { "type": "git", "url": "http://github.com/indutny/node-ip.git" }, + "files": [ + "lib", + "README.md" + ], "main": "lib/ip", "devDependencies": { - "jscs": "^2.1.1", - "jshint": "^2.8.0", - "mocha": "~1.3.2" + "eslint": "^8.15.0", + "mocha": "^10.0.0" }, "scripts": { - "test": "jscs lib/*.js test/*.js && jshint lib/*.js && mocha --reporter spec test/*-test.js", - "fix": "jscs lib/*.js test/*.js --fix" + "lint": "eslint lib/*.js test/*.js", + "test": "npm run lint && mocha --reporter spec test/*-test.js", + "fix": "npm run lint -- --fix" }, "license": "MIT" } diff --git a/node_modules/ip/test/api-test.js b/node_modules/ip/test/api-test.js deleted file mode 100644 index 2e390f986d0bf..0000000000000 --- a/node_modules/ip/test/api-test.js +++ /dev/null @@ -1,407 +0,0 @@ -'use strict'; - -var ip = require('..'); -var assert = require('assert'); -var net = require('net'); -var os = require('os'); - -describe('IP library for node.js', function() { - describe('toBuffer()/toString() methods', function() { - it('should convert to buffer IPv4 address', function() { - var buf = ip.toBuffer('127.0.0.1'); - assert.equal(buf.toString('hex'), '7f000001'); - assert.equal(ip.toString(buf), '127.0.0.1'); - }); - - it('should convert to buffer IPv4 address in-place', function() { - var buf = new Buffer(128); - var offset = 64; - ip.toBuffer('127.0.0.1', buf, offset); - assert.equal(buf.toString('hex', offset, offset + 4), '7f000001'); - assert.equal(ip.toString(buf, offset, 4), '127.0.0.1'); - }); - - it('should convert to buffer IPv6 address', function() { - var buf = ip.toBuffer('::1'); - assert(/(00){15,15}01/.test(buf.toString('hex'))); - assert.equal(ip.toString(buf), '::1'); - assert.equal(ip.toString(ip.toBuffer('1::')), '1::'); - assert.equal(ip.toString(ip.toBuffer('abcd::dcba')), 'abcd::dcba'); - }); - - it('should convert to buffer IPv6 address in-place', function() { - var buf = new Buffer(128); - var offset = 64; - ip.toBuffer('::1', buf, offset); - assert(/(00){15,15}01/.test(buf.toString('hex', offset, offset + 16))); - assert.equal(ip.toString(buf, offset, 16), '::1'); - assert.equal(ip.toString(ip.toBuffer('1::', buf, offset), - offset, 16), '1::'); - assert.equal(ip.toString(ip.toBuffer('abcd::dcba', buf, offset), - offset, 16), 'abcd::dcba'); - }); - - it('should convert to buffer IPv6 mapped IPv4 address', function() { - var buf = ip.toBuffer('::ffff:127.0.0.1'); - assert.equal(buf.toString('hex'), '00000000000000000000ffff7f000001'); - assert.equal(ip.toString(buf), '::ffff:7f00:1'); - - buf = ip.toBuffer('ffff::127.0.0.1'); - assert.equal(buf.toString('hex'), 'ffff000000000000000000007f000001'); - assert.equal(ip.toString(buf), 'ffff::7f00:1'); - - buf = ip.toBuffer('0:0:0:0:0:ffff:127.0.0.1'); - assert.equal(buf.toString('hex'), '00000000000000000000ffff7f000001'); - assert.equal(ip.toString(buf), '::ffff:7f00:1'); - }); - }); - - describe('fromPrefixLen() method', function() { - it('should create IPv4 mask', function() { - assert.equal(ip.fromPrefixLen(24), '255.255.255.0'); - }); - it('should create IPv6 mask', function() { - assert.equal(ip.fromPrefixLen(64), 'ffff:ffff:ffff:ffff::'); - }); - it('should create IPv6 mask explicitly', function() { - assert.equal(ip.fromPrefixLen(24, 'IPV6'), 'ffff:ff00::'); - }); - }); - - describe('not() method', function() { - it('should reverse bits in address', function() { - assert.equal(ip.not('255.255.255.0'), '0.0.0.255'); - }); - }); - - describe('or() method', function() { - it('should or bits in ipv4 addresses', function() { - assert.equal(ip.or('0.0.0.255', '192.168.1.10'), '192.168.1.255'); - }); - it('should or bits in ipv6 addresses', function() { - assert.equal(ip.or('::ff', '::abcd:dcba:abcd:dcba'), - '::abcd:dcba:abcd:dcff'); - }); - it('should or bits in mixed addresses', function() { - assert.equal(ip.or('0.0.0.255', '::abcd:dcba:abcd:dcba'), - '::abcd:dcba:abcd:dcff'); - }); - }); - - describe('mask() method', function() { - it('should mask bits in address', function() { - assert.equal(ip.mask('192.168.1.134', '255.255.255.0'), '192.168.1.0'); - assert.equal(ip.mask('192.168.1.134', '::ffff:ff00'), '::ffff:c0a8:100'); - }); - - it('should not leak data', function() { - for (var i = 0; i < 10; i++) - assert.equal(ip.mask('::1', '0.0.0.0'), '::'); - }); - }); - - describe('subnet() method', function() { - // Test cases calculated with http://www.subnet-calculator.com/ - var ipv4Subnet = ip.subnet('192.168.1.134', '255.255.255.192'); - - it('should compute ipv4 network address', function() { - assert.equal(ipv4Subnet.networkAddress, '192.168.1.128'); - }); - - it('should compute ipv4 network\'s first address', function() { - assert.equal(ipv4Subnet.firstAddress, '192.168.1.129'); - }); - - it('should compute ipv4 network\'s last address', function() { - assert.equal(ipv4Subnet.lastAddress, '192.168.1.190'); - }); - - it('should compute ipv4 broadcast address', function() { - assert.equal(ipv4Subnet.broadcastAddress, '192.168.1.191'); - }); - - it('should compute ipv4 subnet number of addresses', function() { - assert.equal(ipv4Subnet.length, 64); - }); - - it('should compute ipv4 subnet number of addressable hosts', function() { - assert.equal(ipv4Subnet.numHosts, 62); - }); - - it('should compute ipv4 subnet mask', function() { - assert.equal(ipv4Subnet.subnetMask, '255.255.255.192'); - }); - - it('should compute ipv4 subnet mask\'s length', function() { - assert.equal(ipv4Subnet.subnetMaskLength, 26); - }); - - it('should know whether a subnet contains an address', function() { - assert.equal(ipv4Subnet.contains('192.168.1.180'), true); - }); - - it('should know whether a subnet does not contain an address', function() { - assert.equal(ipv4Subnet.contains('192.168.1.195'), false); - }); - }); - - describe('subnet() method with mask length 32', function() { - // Test cases calculated with http://www.subnet-calculator.com/ - var ipv4Subnet = ip.subnet('192.168.1.134', '255.255.255.255'); - it('should compute ipv4 network\'s first address', function() { - assert.equal(ipv4Subnet.firstAddress, '192.168.1.134'); - }); - - it('should compute ipv4 network\'s last address', function() { - assert.equal(ipv4Subnet.lastAddress, '192.168.1.134'); - }); - - it('should compute ipv4 subnet number of addressable hosts', function() { - assert.equal(ipv4Subnet.numHosts, 1); - }); - }); - - describe('subnet() method with mask length 31', function() { - // Test cases calculated with http://www.subnet-calculator.com/ - var ipv4Subnet = ip.subnet('192.168.1.134', '255.255.255.254'); - it('should compute ipv4 network\'s first address', function() { - assert.equal(ipv4Subnet.firstAddress, '192.168.1.134'); - }); - - it('should compute ipv4 network\'s last address', function() { - assert.equal(ipv4Subnet.lastAddress, '192.168.1.135'); - }); - - it('should compute ipv4 subnet number of addressable hosts', function() { - assert.equal(ipv4Subnet.numHosts, 2); - }); - }); - - describe('cidrSubnet() method', function() { - // Test cases calculated with http://www.subnet-calculator.com/ - var ipv4Subnet = ip.cidrSubnet('192.168.1.134/26'); - - it('should compute an ipv4 network address', function() { - assert.equal(ipv4Subnet.networkAddress, '192.168.1.128'); - }); - - it('should compute an ipv4 network\'s first address', function() { - assert.equal(ipv4Subnet.firstAddress, '192.168.1.129'); - }); - - it('should compute an ipv4 network\'s last address', function() { - assert.equal(ipv4Subnet.lastAddress, '192.168.1.190'); - }); - - it('should compute an ipv4 broadcast address', function() { - assert.equal(ipv4Subnet.broadcastAddress, '192.168.1.191'); - }); - - it('should compute an ipv4 subnet number of addresses', function() { - assert.equal(ipv4Subnet.length, 64); - }); - - it('should compute an ipv4 subnet number of addressable hosts', function() { - assert.equal(ipv4Subnet.numHosts, 62); - }); - - it('should compute an ipv4 subnet mask', function() { - assert.equal(ipv4Subnet.subnetMask, '255.255.255.192'); - }); - - it('should compute an ipv4 subnet mask\'s length', function() { - assert.equal(ipv4Subnet.subnetMaskLength, 26); - }); - - it('should know whether a subnet contains an address', function() { - assert.equal(ipv4Subnet.contains('192.168.1.180'), true); - }); - - it('should know whether a subnet contains an address', function() { - assert.equal(ipv4Subnet.contains('192.168.1.195'), false); - }); - - }); - - describe('cidr() method', function() { - it('should mask address in CIDR notation', function() { - assert.equal(ip.cidr('192.168.1.134/26'), '192.168.1.128'); - assert.equal(ip.cidr('2607:f0d0:1002:51::4/56'), '2607:f0d0:1002::'); - }); - }); - - describe('isEqual() method', function() { - it('should check if addresses are equal', function() { - assert(ip.isEqual('127.0.0.1', '::7f00:1')); - assert(!ip.isEqual('127.0.0.1', '::7f00:2')); - assert(ip.isEqual('127.0.0.1', '::ffff:7f00:1')); - assert(!ip.isEqual('127.0.0.1', '::ffaf:7f00:1')); - assert(ip.isEqual('::ffff:127.0.0.1', '::ffff:127.0.0.1')); - assert(ip.isEqual('::ffff:127.0.0.1', '127.0.0.1')); - }); - }); - - - describe('isPrivate() method', function() { - it('should check if an address is localhost', function() { - assert.equal(ip.isPrivate('127.0.0.1'), true); - }); - - it('should check if an address is from a 192.168.x.x network', function() { - assert.equal(ip.isPrivate('192.168.0.123'), true); - assert.equal(ip.isPrivate('192.168.122.123'), true); - assert.equal(ip.isPrivate('192.162.1.2'), false); - }); - - it('should check if an address is from a 172.16.x.x network', function() { - assert.equal(ip.isPrivate('172.16.0.5'), true); - assert.equal(ip.isPrivate('172.16.123.254'), true); - assert.equal(ip.isPrivate('171.16.0.5'), false); - assert.equal(ip.isPrivate('172.25.232.15'), true); - assert.equal(ip.isPrivate('172.15.0.5'), false); - assert.equal(ip.isPrivate('172.32.0.5'), false); - }); - - it('should check if an address is from a 169.254.x.x network', function() { - assert.equal(ip.isPrivate('169.254.2.3'), true); - assert.equal(ip.isPrivate('169.254.221.9'), true); - assert.equal(ip.isPrivate('168.254.2.3'), false); - }); - - it('should check if an address is from a 10.x.x.x network', function() { - assert.equal(ip.isPrivate('10.0.2.3'), true); - assert.equal(ip.isPrivate('10.1.23.45'), true); - assert.equal(ip.isPrivate('12.1.2.3'), false); - }); - - it('should check if an address is from a private IPv6 network', function() { - assert.equal(ip.isPrivate('fd12:3456:789a:1::1'), true); - assert.equal(ip.isPrivate('fe80::f2de:f1ff:fe3f:307e'), true); - assert.equal(ip.isPrivate('::ffff:10.100.1.42'), true); - assert.equal(ip.isPrivate('::FFFF:172.16.200.1'), true); - assert.equal(ip.isPrivate('::ffff:192.168.0.1'), true); - }); - - it('should check if an address is from the internet', function() { - assert.equal(ip.isPrivate('165.225.132.33'), false); // joyent.com - }); - - it('should check if an address is a loopback IPv6 address', function() { - assert.equal(ip.isPrivate('::'), true); - assert.equal(ip.isPrivate('::1'), true); - assert.equal(ip.isPrivate('fe80::1'), true); - }); - }); - - describe('loopback() method', function() { - describe('undefined', function() { - it('should respond with 127.0.0.1', function() { - assert.equal(ip.loopback(), '127.0.0.1') - }); - }); - - describe('ipv4', function() { - it('should respond with 127.0.0.1', function() { - assert.equal(ip.loopback('ipv4'), '127.0.0.1') - }); - }); - - describe('ipv6', function() { - it('should respond with fe80::1', function() { - assert.equal(ip.loopback('ipv6'), 'fe80::1') - }); - }); - }); - - describe('isLoopback() method', function() { - describe('127.0.0.1', function() { - it('should respond with true', function() { - assert.ok(ip.isLoopback('127.0.0.1')) - }); - }); - - describe('127.8.8.8', function () { - it('should respond with true', function () { - assert.ok(ip.isLoopback('127.8.8.8')) - }); - }); - - describe('8.8.8.8', function () { - it('should respond with false', function () { - assert.equal(ip.isLoopback('8.8.8.8'), false); - }); - }); - - describe('fe80::1', function() { - it('should respond with true', function() { - assert.ok(ip.isLoopback('fe80::1')) - }); - }); - - describe('::1', function() { - it('should respond with true', function() { - assert.ok(ip.isLoopback('::1')) - }); - }); - - describe('::', function() { - it('should respond with true', function() { - assert.ok(ip.isLoopback('::')) - }); - }); - }); - - describe('address() method', function() { - describe('undefined', function() { - it('should respond with a private ip', function() { - assert.ok(ip.isPrivate(ip.address())); - }); - }); - - describe('private', function() { - [ undefined, 'ipv4', 'ipv6' ].forEach(function(family) { - describe(family, function() { - it('should respond with a private ip', function() { - assert.ok(ip.isPrivate(ip.address('private', family))); - }); - }); - }); - }); - - var interfaces = os.networkInterfaces(); - - Object.keys(interfaces).forEach(function(nic) { - describe(nic, function() { - [ undefined, 'ipv4' ].forEach(function(family) { - describe(family, function() { - it('should respond with an ipv4 address', function() { - var addr = ip.address(nic, family); - assert.ok(!addr || net.isIPv4(addr)); - }); - }); - }); - - describe('ipv6', function() { - it('should respond with an ipv6 address', function() { - var addr = ip.address(nic, 'ipv6'); - assert.ok(!addr || net.isIPv6(addr)); - }); - }) - }); - }); - }); - - describe('toLong() method', function() { - it('should respond with a int', function() { - assert.equal(ip.toLong('127.0.0.1'), 2130706433); - assert.equal(ip.toLong('255.255.255.255'), 4294967295); - }); - }); - - describe('fromLong() method', function() { - it('should repond with ipv4 address', function() { - assert.equal(ip.fromLong(2130706433), '127.0.0.1'); - assert.equal(ip.fromLong(4294967295), '255.255.255.255'); - }); - }) -}); diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json index d275294854868..058584b78998a 100644 --- a/node_modules/is-core-module/core.json +++ b/node_modules/is-core-module/core.json @@ -112,6 +112,7 @@ "node:string_decoder": [">= 14.18 && < 15", ">= 16"], "sys": [">= 0.4 && < 0.7", ">= 0.8"], "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": ">= 18", "timers": true, "node:timers": [">= 14.18 && < 15", ">= 16"], "timers/promises": ">= 15", diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json index 0caddef2e1676..80ce9f5bb1797 100644 --- a/node_modules/is-core-module/package.json +++ b/node_modules/is-core-module/package.json @@ -1,16 +1,11 @@ { "name": "is-core-module", - "version": "2.8.1", + "version": "2.9.0", "description": "Is this specifier a node.js core module?", "main": "index.js", "sideEffects": false, "exports": { - ".": [ - { - "default": "./index.js" - }, - "./index.js" - ], + ".": "./index.js", "./package.json": "./package.json" }, "scripts": { @@ -49,14 +44,15 @@ "has": "^1.0.3" }, "devDependencies": { - "@ljharb/eslint-config": "^20.1.0", - "aud": "^1.1.5", - "auto-changelog": "^2.3.0", - "eslint": "^8.6.0", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "mock-property": "^1.0.0", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "semver": "^6.3.0", - "tape": "^5.4.0" + "tape": "^5.5.3" }, "auto-changelog": { "output": "CHANGELOG.md", diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js index b688cd22f645f..4385b20ea1489 100644 --- a/node_modules/is-core-module/test/index.js +++ b/node_modules/is-core-module/test/index.js @@ -3,6 +3,8 @@ var test = require('tape'); var keys = require('object-keys'); var semver = require('semver'); +var mockProperty = require('mock-property'); + var isCore = require('../'); var data = require('../core.json'); @@ -51,16 +53,18 @@ test('core modules', function (t) { function () { require(mod); }, // eslint-disable-line no-loop-func 'requiring ' + mod + ' does not throw' ); - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } } } } @@ -79,6 +83,10 @@ test('core modules', function (t) { 'v8/tools/tickprocessor', 'v8/tools/profile' ]; + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } for (var i = 0; i < libs.length; ++i) { var mod = libs[i]; if (excludeList.indexOf(mod) === -1) { @@ -87,16 +95,18 @@ test('core modules', function (t) { function () { require(mod); }, // eslint-disable-line no-loop-func 'requiring ' + mod + ' does not throw' ); - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } } } } @@ -105,18 +115,11 @@ test('core modules', function (t) { }); t.test('Object.prototype pollution', function (st) { - /* eslint no-extend-native: 1 */ var nonKey = 'not a core module'; - st.teardown(function () { - delete Object.prototype.fs; - delete Object.prototype.path; - delete Object.prototype.http; - delete Object.prototype[nonKey]; - }); - Object.prototype.fs = false; - Object.prototype.path = '>= 999999999'; - Object.prototype.http = data.http; - Object.prototype[nonKey] = true; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); diff --git a/node_modules/just-diff/index.js b/node_modules/just-diff/index.js index b49bed14662e0..11ad3710b98f4 100644 --- a/node_modules/just-diff/index.js +++ b/node_modules/just-diff/index.js @@ -129,12 +129,13 @@ function diff(obj1, obj2, pathConverter) { } } - return diffs.remove - .reverse() - .concat(diffs.replace) - .concat(diffs.add); + return diffs; } - return getDiff(obj1, obj2, [], {remove: [], replace: [], add: []}); + const finalDiffs = getDiff(obj1, obj2, [], {remove: [], replace: [], add: []}); + return finalDiffs.remove + .reverse() + .concat(finalDiffs.replace) + .concat(finalDiffs.add); } function pushReplace(path, basePath, key, diffs, pathConverter, obj2) { diff --git a/node_modules/just-diff/package.json b/node_modules/just-diff/package.json index bab8a29ae93a4..5a4bb5f129c83 100644 --- a/node_modules/just-diff/package.json +++ b/node_modules/just-diff/package.json @@ -1,6 +1,6 @@ { "name": "just-diff", - "version": "5.0.1", + "version": "5.0.2", "description": "Return an object representing the diffs between two objects. Supports jsonPatch protocol", "main": "index.js", "module": "index.mjs", diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js index b63be6e988835..fb1a076fa3ae8 100644 --- a/node_modules/lru-cache/index.js +++ b/node_modules/lru-cache/index.js @@ -1,15 +1,46 @@ const perf = typeof performance === 'object' && performance && typeof performance.now === 'function' ? performance : Date -const hasAbortController = typeof AbortController !== 'undefined' +const hasAbortController = typeof AbortController === 'function' // minimal backwards-compatibility polyfill +// this doesn't have nearly all the checks and whatnot that +// actual AbortController/Signal has, but it's enough for +// our purposes, and if used properly, behaves the same. const AC = hasAbortController ? AbortController : Object.assign( class AbortController { constructor () { this.signal = new AC.AbortSignal } - abort () { this.signal.aborted = true } + abort () { + this.signal.dispatchEvent('abort') + } }, - { AbortSignal: class AbortSignal { constructor () { this.aborted = false }}} + { + AbortSignal: class AbortSignal { + constructor () { + this.aborted = false + this._listeners = [] + } + dispatchEvent (type) { + if (type === 'abort') { + this.aborted = true + const e = { type, target: this } + this.onabort(e) + this._listeners.forEach(f => f(e), this) + } + } + onabort () {} + addEventListener (ev, fn) { + if (ev === 'abort') { + this._listeners.push(fn) + } + } + removeEventListener (ev, fn) { + if (ev === 'abort') { + this._listeners = this._listeners.filter(f => f !== fn) + } + } + } + } ) const warned = new Set() @@ -306,15 +337,6 @@ class LRUCache { } this.calculatedSize += this.sizes[index] } - this.delete = k => { - if (this.size !== 0) { - const index = this.keyMap.get(k) - if (index !== undefined) { - this.calculatedSize -= this.sizes[index] - } - } - return LRUCache.prototype.delete.call(this, k) - } } removeItemSize (index) {} addItemSize (index, v, k, size) {} @@ -730,6 +752,7 @@ class LRUCache { deprecatedMethod('del', 'delete') return this.delete } + delete (k) { let deleted = false if (this.size !== 0) { @@ -809,6 +832,7 @@ class LRUCache { } } } + get reset () { deprecatedMethod('reset', 'clear') return this.clear @@ -818,6 +842,10 @@ class LRUCache { deprecatedProperty('length', 'size') return this.size } + + static get AbortController () { + return AC + } } module.exports = LRUCache diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json index 32fb9da24e56e..5364b09d2002c 100644 --- a/node_modules/lru-cache/package.json +++ b/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "7.8.1", + "version": "7.9.0", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -23,7 +23,6 @@ "@size-limit/preset-small-lib": "^7.0.8", "benchmark": "^2.1.4", "clock-mock": "^1.0.4", - "heapdump": "^0.3.15", "size-limit": "^7.0.8", "tap": "^15.1.6" }, diff --git a/node_modules/socks-proxy-agent/dist/agent.d.ts b/node_modules/socks-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 96f44af75984c..0000000000000 --- a/node_modules/socks-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { SocksProxyAgentOptions } from '.'; -/** - * The `SocksProxyAgent`. - * - * @api public - */ -export default class SocksProxyAgent extends Agent { - private lookup; - private proxy; - private tlsConnectionOptions; - constructor(_opts: string | SocksProxyAgentOptions); - /** - * Initiates a SOCKS connection to the specified SOCKS proxy server, - * which in turn connects to the specified remote host and port. - * - * @api protected - */ - callback(req: ClientRequest, opts: RequestOptions): Promise; -} diff --git a/node_modules/socks-proxy-agent/dist/agent.js b/node_modules/socks-proxy-agent/dist/agent.js deleted file mode 100644 index 1e4c529f7746f..0000000000000 --- a/node_modules/socks-proxy-agent/dist/agent.js +++ /dev/null @@ -1,181 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const dns_1 = __importDefault(require("dns")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const debug_1 = __importDefault(require("debug")); -const agent_base_1 = require("agent-base"); -const socks_1 = require("socks"); -const debug = debug_1.default('socks-proxy-agent'); -function dnsLookup(host) { - return new Promise((resolve, reject) => { - dns_1.default.lookup(host, (err, res) => { - if (err) { - reject(err); - } - else { - resolve(res); - } - }); - }); -} -function parseSocksProxy(opts) { - let port = 0; - let lookup = false; - let type = 5; - // Prefer `hostname` over `host`, because of `url.parse()` - const host = opts.hostname || opts.host; - if (!host) { - throw new TypeError('No "host"'); - } - if (typeof opts.port === 'number') { - port = opts.port; - } - else if (typeof opts.port === 'string') { - port = parseInt(opts.port, 10); - } - // From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3 - // "The SOCKS service is conventionally located on TCP port 1080" - if (!port) { - port = 1080; - } - // figure out if we want socks v4 or v5, based on the "protocol" used. - // Defaults to 5. - if (opts.protocol) { - switch (opts.protocol.replace(':', '')) { - case 'socks4': - lookup = true; - // pass through - case 'socks4a': - type = 4; - break; - case 'socks5': - lookup = true; - // pass through - case 'socks': // no version specified, default to 5h - case 'socks5h': - type = 5; - break; - default: - throw new TypeError(`A "socks" protocol must be specified! Got: ${opts.protocol}`); - } - } - if (typeof opts.type !== 'undefined') { - if (opts.type === 4 || opts.type === 5) { - type = opts.type; - } - else { - throw new TypeError(`"type" must be 4 or 5, got: ${opts.type}`); - } - } - const proxy = { - host, - port, - type - }; - let userId = opts.userId || opts.username; - let password = opts.password; - if (opts.auth) { - const auth = opts.auth.split(':'); - userId = auth[0]; - password = auth[1]; - } - if (userId) { - Object.defineProperty(proxy, 'userId', { - value: userId, - enumerable: false - }); - } - if (password) { - Object.defineProperty(proxy, 'password', { - value: password, - enumerable: false - }); - } - return { lookup, proxy }; -} -/** - * The `SocksProxyAgent`. - * - * @api public - */ -class SocksProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!'); - } - super(opts); - const parsedProxy = parseSocksProxy(opts); - this.lookup = parsedProxy.lookup; - this.proxy = parsedProxy.proxy; - this.tlsConnectionOptions = opts.tls || {}; - } - /** - * Initiates a SOCKS connection to the specified SOCKS proxy server, - * which in turn connects to the specified remote host and port. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { lookup, proxy } = this; - let { host, port, timeout } = opts; - if (!host) { - throw new Error('No `host` defined!'); - } - if (lookup) { - // Client-side DNS resolution for "4" and "5" socks proxy versions. - host = yield dnsLookup(host); - } - const socksOpts = { - proxy, - destination: { host, port }, - command: 'connect', - timeout - }; - debug('Creating socks proxy connection: %o', socksOpts); - const { socket } = yield socks_1.SocksClient.createConnection(socksOpts); - debug('Successfully created socks proxy connection'); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername }), this.tlsConnectionOptions)); - } - return socket; - }); - } -} -exports.default = SocksProxyAgent; -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/node_modules/socks-proxy-agent/dist/agent.js.map b/node_modules/socks-proxy-agent/dist/agent.js.map deleted file mode 100644 index 4efc16887a93b..0000000000000 --- a/node_modules/socks-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;KACjB;SAAM,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;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G,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/socks-proxy-agent/dist/index.d.ts b/node_modules/socks-proxy-agent/dist/index.d.ts index d031b95ddf593..4de33b1252a18 100644 --- a/node_modules/socks-proxy-agent/dist/index.d.ts +++ b/node_modules/socks-proxy-agent/dist/index.d.ts @@ -1,21 +1,33 @@ /// -import { Url } from 'url'; import { SocksProxy } from 'socks'; -import tls from 'tls'; +import { Agent, ClientRequest, RequestOptions } from 'agent-base'; import { AgentOptions } from 'agent-base'; -import _SocksProxyAgent from './agent'; -declare function createSocksProxyAgent(opts: string | createSocksProxyAgent.SocksProxyAgentOptions): _SocksProxyAgent; -declare namespace createSocksProxyAgent { - interface BaseSocksProxyAgentOptions { - host?: string | null; - port?: string | number | null; - username?: string | null; - tls?: tls.ConnectionOptions | null; - } - export interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions, Partial> { - } - export type SocksProxyAgent = _SocksProxyAgent; - export const SocksProxyAgent: typeof _SocksProxyAgent; - export {}; +import { Url } from 'url'; +import net from 'net'; +import tls from 'tls'; +interface BaseSocksProxyAgentOptions { + host?: string | null; + port?: string | number | null; + username?: string | null; + tls?: tls.ConnectionOptions | null; +} +interface SocksProxyAgentOptionsExtra { + timeout?: number; +} +export interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions, Partial> { +} +export declare class SocksProxyAgent extends Agent { + private readonly shouldLookup; + private readonly proxy; + private readonly tlsConnectionOptions; + timeout: number | null; + constructor(input: string | SocksProxyAgentOptions, options?: SocksProxyAgentOptionsExtra); + /** + * Initiates a SOCKS connection to the specified SOCKS proxy server, + * which in turn connects to the specified remote host and port. + * + * @api protected + */ + callback(req: ClientRequest, opts: RequestOptions): Promise; } -export = createSocksProxyAgent; +export {}; diff --git a/node_modules/socks-proxy-agent/dist/index.js b/node_modules/socks-proxy-agent/dist/index.js index dd1e49a77e436..55b598b7f5ca7 100644 --- a/node_modules/socks-proxy-agent/dist/index.js +++ b/node_modules/socks-proxy-agent/dist/index.js @@ -1,14 +1,197 @@ "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; -const agent_1 = __importDefault(require("./agent")); -function createSocksProxyAgent(opts) { - return new agent_1.default(opts); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SocksProxyAgent = void 0; +const socks_1 = require("socks"); +const agent_base_1 = require("agent-base"); +const debug_1 = __importDefault(require("debug")); +const dns_1 = __importDefault(require("dns")); +const tls_1 = __importDefault(require("tls")); +const debug = (0, debug_1.default)('socks-proxy-agent'); +function parseSocksProxy(opts) { + var _a; + let port = 0; + let lookup = false; + let type = 5; + const host = opts.hostname; + if (host == null) { + throw new TypeError('No "host"'); + } + if (typeof opts.port === 'number') { + port = opts.port; + } + else if (typeof opts.port === 'string') { + port = parseInt(opts.port, 10); + } + // From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3 + // "The SOCKS service is conventionally located on TCP port 1080" + if (port == null) { + port = 1080; + } + // figure out if we want socks v4 or v5, based on the "protocol" used. + // Defaults to 5. + if (opts.protocol != null) { + switch (opts.protocol.replace(':', '')) { + case 'socks4': + lookup = true; + // pass through + case 'socks4a': + type = 4; + break; + case 'socks5': + lookup = true; + // pass through + case 'socks': // no version specified, default to 5h + case 'socks5h': + type = 5; + break; + default: + throw new TypeError(`A "socks" protocol must be specified! Got: ${String(opts.protocol)}`); + } + } + if (typeof opts.type !== 'undefined') { + if (opts.type === 4 || opts.type === 5) { + type = opts.type; + } + else { + throw new TypeError(`"type" must be 4 or 5, got: ${String(opts.type)}`); + } + } + const proxy = { + host, + port, + type + }; + let userId = (_a = opts.userId) !== null && _a !== void 0 ? _a : opts.username; + let password = opts.password; + if (opts.auth != null) { + const auth = opts.auth.split(':'); + userId = auth[0]; + password = auth[1]; + } + if (userId != null) { + Object.defineProperty(proxy, 'userId', { + value: userId, + enumerable: false + }); + } + if (password != null) { + Object.defineProperty(proxy, 'password', { + value: password, + enumerable: false + }); + } + return { lookup, proxy }; +} +const normalizeProxyOptions = (input) => { + let proxyOptions; + if (typeof input === 'string') { + proxyOptions = new URL(input); + } + else { + proxyOptions = input; + } + if (proxyOptions == null) { + throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!'); + } + return proxyOptions; +}; +class SocksProxyAgent extends agent_base_1.Agent { + constructor(input, options) { + var _a; + const proxyOptions = normalizeProxyOptions(input); + super(proxyOptions); + const parsedProxy = parseSocksProxy(proxyOptions); + this.shouldLookup = parsedProxy.lookup; + this.proxy = parsedProxy.proxy; + this.tlsConnectionOptions = proxyOptions.tls != null ? proxyOptions.tls : {}; + this.timeout = (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : null; + } + /** + * Initiates a SOCKS connection to the specified SOCKS proxy server, + * which in turn connects to the specified remote host and port. + * + * @api protected + */ + callback(req, opts) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const { shouldLookup, proxy, timeout } = this; + let { host, port, lookup: lookupCallback } = opts; + if (host == null) { + throw new Error('No `host` defined!'); + } + if (shouldLookup) { + // Client-side DNS resolution for "4" and "5" socks proxy versions. + host = yield new Promise((resolve, reject) => { + // Use the request's custom lookup, if one was configured: + const lookupFn = lookupCallback !== null && lookupCallback !== void 0 ? lookupCallback : dns_1.default.lookup; + lookupFn(host, {}, (err, res) => { + if (err) { + reject(err); + } + else { + resolve(res); + } + }); + }); + } + const socksOpts = { + proxy, + destination: { host, port }, + command: 'connect', + timeout: timeout !== null && timeout !== void 0 ? timeout : undefined + }; + const cleanup = (tlsSocket) => { + req.destroy(); + socket.destroy(); + if (tlsSocket) + tlsSocket.destroy(); + }; + debug('Creating socks proxy connection: %o', socksOpts); + const { socket } = yield socks_1.SocksClient.createConnection(socksOpts); + debug('Successfully created socks proxy connection'); + if (timeout !== null) { + socket.setTimeout(timeout); + socket.on('timeout', () => cleanup()); + } + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + const servername = (_a = opts.servername) !== null && _a !== void 0 ? _a : opts.host; + const tlsSocket = tls_1.default.connect(Object.assign(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, + servername }), this.tlsConnectionOptions)); + tlsSocket.once('error', (error) => { + debug('socket TLS error', error.message); + cleanup(tlsSocket); + }); + return tlsSocket; + } + return socket; + }); + } +} +exports.SocksProxyAgent = SocksProxyAgent; +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; } -(function (createSocksProxyAgent) { - createSocksProxyAgent.SocksProxyAgent = agent_1.default; - createSocksProxyAgent.prototype = agent_1.default.prototype; -})(createSocksProxyAgent || (createSocksProxyAgent = {})); -module.exports = createSocksProxyAgent; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/socks-proxy-agent/dist/index.js.map b/node_modules/socks-proxy-agent/dist/index.js.map index 23f3d1ce592b6..e183e8e7a13ce 100644 --- a/node_modules/socks-proxy-agent/dist/index.js.map +++ b/node_modules/socks-proxy-agent/dist/index.js.map @@ -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,C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-agent/package.json b/node_modules/socks-proxy-agent/package.json index 460043188eb25..268b8a5b18744 100644 --- a/node_modules/socks-proxy-agent/package.json +++ b/node_modules/socks-proxy-agent/package.json @@ -1,64 +1,177 @@ { "name": "socks-proxy-agent", - "version": "6.1.1", "description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS", - "main": "dist/index", - "typings": "dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" + "homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme", + "version": "6.2.0", + "main": "dist/index.js", + "author": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "url": "http://n8.io/" }, + "contributors": [ + { + "name": "Kiko Beats", + "email": "josefrancisco.verdu@gmail.com" + }, + { + "name": "Josh Glazebrook", + "email": "josh@joshglazebrook.com" + }, + { + "name": "talmobi", + "email": "talmobi@users.noreply.github.com" + }, + { + "name": "Indospace.io", + "email": "justin@indospace.io" + }, + { + "name": "Kilian von Pflugk", + "email": "github@jumoog.io" + }, + { + "name": "Kyle", + "email": "admin@hk1229.cn" + }, + { + "name": "Matheus Fernandes", + "email": "matheus.frndes@gmail.com" + }, + { + "name": "Shantanu Sharma", + "email": "shantanu34@outlook.com" + }, + { + "name": "Tim Perry", + "email": "pimterry@gmail.com" + }, + { + "name": "Vadim Baryshev", + "email": "vadimbaryshev@gmail.com" + }, + { + "name": "jigu", + "email": "luo1257857309@gmail.com" + }, + { + "name": "Alba Mendez", + "email": "me@jmendeth.com" + }, + { + "name": "Дмитрий Гуденков", + "email": "Dimangud@rambler.ru" + }, + { + "name": "Andrei Bitca", + "email": "63638922+andrei-bitca-dc@users.noreply.github.com" + }, + { + "name": "Andrew Casey", + "email": "amcasey@users.noreply.github.com" + }, + { + "name": "Brandon Ros", + "email": "brandonros1@gmail.com" + }, + { + "name": "Dang Duy Thanh", + "email": "thanhdd.it@gmail.com" + }, + { + "name": "Dimitar Nestorov", + "email": "8790386+dimitarnestorov@users.noreply.github.com" + } + ], "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-socks-proxy-agent.git" }, + "bugs": { + "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues" + }, "keywords": [ + "agent", + "http", + "https", + "proxy", "socks", "socks4", "socks4a", "socks5", - "socks5h", - "proxy", - "http", - "https", - "agent" + "socks5h" ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues" - }, "dependencies": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" }, "devDependencies": { + "@commitlint/cli": "latest", + "@commitlint/config-conventional": "latest", "@types/debug": "latest", "@types/node": "latest", - "@typescript-eslint/eslint-plugin": "latest", - "@typescript-eslint/parser": "latest", - "eslint": "latest", - "eslint-config-airbnb": "latest", - "eslint-config-prettier": "latest", - "eslint-import-resolver-typescript": "latest", - "eslint-plugin-import": "latest", - "eslint-plugin-jsx-a11y": "latest", - "eslint-plugin-react": "latest", + "cacheable-lookup": "^6.0.4", + "conventional-github-releaser": "latest", + "dns2": "^2.0.1", + "finepack": "latest", + "git-authors-cli": "latest", "mocha": "latest", - "proxy": "latest", + "nano-staged": "latest", + "npm-check-updates": "latest", + "prettier-standard": "latest", "raw-body": "latest", "rimraf": "latest", - "socksv5": "TooTallNate/socksv5#fix/dstSock-close-event", + "simple-git-hooks": "latest", + "socksv5": "github:TooTallNate/socksv5#fix/dstSock-close-event", + "standard": "latest", + "standard-markdown": "latest", + "standard-version": "latest", + "ts-standard": "latest", "typescript": "latest" }, "engines": { "node": ">= 10" - } -} + }, + "files": [ + "dist" + ], + "license": "MIT", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "nano-staged": { + "*.js": [ + "prettier-standard" + ], + "*.md": [ + "standard-markdown" + ], + "package.json": [ + "finepack" + ] + }, + "simple-git-hooks": { + "commit-msg": "npx commitlint --edit", + "pre-commit": "npx nano-staged" + }, + "typings": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "clean": "rimraf node_modules", + "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", + "lint": "ts-standard", + "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", + "prebuild": "rimraf dist", + "prerelease": "npm run update:check && npm run contributors", + "release": "standard-version -a", + "release:github": "conventional-github-releaser -p angular", + "release:tags": "git push --follow-tags origin HEAD:master", + "test": "mocha --reporter spec", + "update": "ncu -u", + "update:check": "ncu -- --error-level 2" + }, + "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 <nathan@tootallnate.net>\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" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6fe4e89141e4f..996442c1c136e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1087,26 +1087,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/@npmcli/template-oss/node_modules/glob": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.1.tgz", - "integrity": "sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@npmcli/template-oss/node_modules/yaml": { "version": "2.0.0-11", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-11.tgz", @@ -1588,9 +1568,9 @@ "license": "MIT" }, "node_modules/builtins": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.0.tgz", - "integrity": "sha512-aizhtbxgT1Udg0Fj6GssXshAVK+nxbtCV+1OtTrMNy67jffDFBY6CUBAkhO4owbleAx6fdbnWdpsmmcXydbzNw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "inBundle": true, "dependencies": { "semver": "^7.0.0" @@ -3582,9 +3562,10 @@ } }, "node_modules/https-proxy-agent": { - "version": "5.0.0", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "inBundle": true, - "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -3751,9 +3732,10 @@ } }, "node_modules/ip": { - "version": "1.1.5", - "inBundle": true, - "license": "MIT" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", + "inBundle": true }, "node_modules/ip-regex": { "version": "4.3.0", @@ -3867,9 +3849,10 @@ } }, "node_modules/is-core-module": { - "version": "2.8.1", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "inBundle": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -4402,9 +4385,10 @@ } }, "node_modules/just-diff": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.0.2.tgz", + "integrity": "sha512-uGd6F+eIZ4T95EinP8ubINGkbEy3jrgBym+6LjW+ja1UG1WQIcEcQ6FLeyXtVJZglk+bj7fvEn+Cu2LBxkgiYQ==", + "inBundle": true }, "node_modules/just-diff-apply": { "version": "5.2.0", @@ -4587,9 +4571,9 @@ } }, "node_modules/lru-cache": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.8.1.tgz", - "integrity": "sha512-E1v547OCgJvbvevfjgK9sNKIVXO96NnsTsFPBlg4ZxjhsJSODoH9lk8Bm0OxvHNm6Vm5Yqkl/1fErDxhYL8Skg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.9.0.tgz", + "integrity": "sha512-lkcNMUKqdJk96TuIXUidxaPuEg5sJo/+ZyVE2BDFnuZGzwXem7d8582eG8vbu4todLfT14snP6iHriCHXXi5Rw==", "inBundle": true, "engines": { "node": ">=12" @@ -6641,13 +6625,14 @@ } }, "node_modules/socks-proxy-agent": { - "version": "6.1.1", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", + "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", "inBundle": true, - "license": "MIT", "dependencies": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { "node": ">= 10" @@ -10920,20 +10905,6 @@ "yaml": "^2.0.0-11" }, "dependencies": { - "glob": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.1.tgz", - "integrity": "sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "yaml": { "version": "2.0.0-11", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-11.tgz", @@ -11245,9 +11216,9 @@ "dev": true }, "builtins": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.0.tgz", - "integrity": "sha512-aizhtbxgT1Udg0Fj6GssXshAVK+nxbtCV+1OtTrMNy67jffDFBY6CUBAkhO4owbleAx6fdbnWdpsmmcXydbzNw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "requires": { "semver": "^7.0.0" } @@ -12539,7 +12510,9 @@ } }, "https-proxy-agent": { - "version": "5.0.0", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "requires": { "agent-base": "6", "debug": "4" @@ -12638,7 +12611,9 @@ } }, "ip": { - "version": "1.1.5" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" }, "ip-regex": { "version": "4.3.0" @@ -12692,7 +12667,9 @@ } }, "is-core-module": { - "version": "2.8.1", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "requires": { "has": "^1.0.3" } @@ -13017,7 +12994,9 @@ } }, "just-diff": { - "version": "5.0.1" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.0.2.tgz", + "integrity": "sha512-uGd6F+eIZ4T95EinP8ubINGkbEy3jrgBym+6LjW+ja1UG1WQIcEcQ6FLeyXtVJZglk+bj7fvEn+Cu2LBxkgiYQ==" }, "just-diff-apply": { "version": "5.2.0" @@ -13266,9 +13245,9 @@ "peer": true }, "lru-cache": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.8.1.tgz", - "integrity": "sha512-E1v547OCgJvbvevfjgK9sNKIVXO96NnsTsFPBlg4ZxjhsJSODoH9lk8Bm0OxvHNm6Vm5Yqkl/1fErDxhYL8Skg==" + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.9.0.tgz", + "integrity": "sha512-lkcNMUKqdJk96TuIXUidxaPuEg5sJo/+ZyVE2BDFnuZGzwXem7d8582eG8vbu4todLfT14snP6iHriCHXXi5Rw==" }, "make-dir": { "version": "3.1.0", @@ -14620,11 +14599,13 @@ } }, "socks-proxy-agent": { - "version": "6.1.1", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", + "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", "requires": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" } }, "source-map": {