From 88051d36d5bab74b707f4b1d939b23aeb5f1dd9c Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Tue, 17 Dec 2024 15:28:35 +0900 Subject: [PATCH] Update npm deps Signed-off-by: Sora Morimoto --- dist/index.js | 60 ++++++++++++++++++------------- dist/post/index.js | 56 +++++++++++++++++------------ packages/setup-ocaml/package.json | 2 +- yarn.lock | 16 ++++----- 4 files changed, 77 insertions(+), 57 deletions(-) diff --git a/dist/index.js b/dist/index.js index bea19301..423a56c7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -78470,6 +78470,7 @@ function readDocType(xmlData, i){ if (xmlData[i] === '<' && !comment) { //Determine the tag type if( hasBody && isEntity(xmlData, i)){ i += 7; + let entityName, val; [entityName, val,i] = readEntityExp(xmlData,i+1); if(val.indexOf("&") === -1) //Parameter entities are not supported entities[ validateEntityName(entityName) ] = { @@ -96063,9 +96064,8 @@ function networkConnections(callback) { }); } if (_darwin) { - // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"'; let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; - const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; + const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { exec('ps -axo pid,command', { maxBuffer: 1024 * 20000 }, function (err2, stdout2) { @@ -96073,8 +96073,10 @@ function networkConnections(callback) { processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); + lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); + const hasTransferred = line.length >= 19; if (line.length >= 8) { let localip = line[3]; let localport = ''; @@ -96094,7 +96096,7 @@ function networkConnections(callback) { } const hasState = states.indexOf(line[5]) >= 0; let connstate = hasState ? line[5] : 'UNKNOWN'; - let pid = parseInt(line[8 + (hasState ? 0 : -1)], 10); + let pid = parseInt(line[8 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); if (connstate) { result.push({ protocol: line[0], @@ -96363,26 +96365,34 @@ const _sunos = (_platform === 'sunos'); function time() { let t = new Date().toString().split(' '); + const result = { + current: Date.now(), + uptime: os.uptime(), + timezone: (t.length >= 7) ? t[5] : '', + timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' + }; if (_darwin || _linux) { - const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); - const lines = stdout.toString().split(os.EOL); - if (lines.length > 3 && !lines[0]) { - lines.shift(); + try { + const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); + const lines = stdout.toString().split(os.EOL); + if (lines.length > 3 && !lines[0]) { + lines.shift(); + } + let timezone = lines[0] || ''; + if (timezone.startsWith('+') || timezone.startsWith('-')) { + timezone = 'GMT'; + } + return { + current: Date.now(), + uptime: os.uptime(), + timezone: lines[1] ? timezone + lines[1] : timezone, + timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' + }; + } catch (e) { + util.noop(); } - return { - current: Date.now(), - uptime: os.uptime(), - timezone: lines[0] && lines[1] ? lines[0] + lines[1] : '', - timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' - }; - } else { - return { - current: Date.now(), - uptime: os.uptime(), - timezone: (t.length >= 7) ? t[5] : '', - timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' - }; - }; + } + return result; } exports.time = time; @@ -102652,7 +102662,7 @@ function wifiConnections(callback) { const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : ''; const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : ''; const ssid = util.getValue(lines, 'SSID', ':', true); - const bssid = util.getValue(lines, 'BSSID', ':', true); + const bssid = util.getValue(lines, 'BSSID', ':', true) || util.getValue(lines, 'AP BSSID', ':', true);; const quality = util.getValue(lines, 'Signal', ':', true); const signalLevel = wifiDBFromQuality(quality); const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null; @@ -146868,7 +146878,7 @@ module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",128],["a1","。",62],[ /***/ 15460: /***/ ((module) => { -module.exports = {"rE":"5.23.10"}; +module.exports = {"rE":"5.23.13"}; /***/ }), @@ -147027,7 +147037,7 @@ __nccwpck_require__.d(attributes_namespaceObject, { removeAttr: () => (removeAttr), removeClass: () => (removeClass), toggleClass: () => (toggleClass), - val: () => (src_val) + val: () => (val) }); // NAMESPACE OBJECT: ../../node_modules/cheerio/dist/esm/api/traversing.js @@ -150851,7 +150861,7 @@ function data(name, value) { } return readData(dataEl, name); } -function src_val(value) { +function val(value) { const querying = arguments.length === 0; const element = this[0]; if (!element || !node_isTag(element)) diff --git a/dist/post/index.js b/dist/post/index.js index a68dafb3..4a7b10aa 100644 --- a/dist/post/index.js +++ b/dist/post/index.js @@ -47321,6 +47321,7 @@ function readDocType(xmlData, i){ if (xmlData[i] === '<' && !comment) { //Determine the tag type if( hasBody && isEntity(xmlData, i)){ i += 7; + let entityName, val; [entityName, val,i] = readEntityExp(xmlData,i+1); if(val.indexOf("&") === -1) //Parameter entities are not supported entities[ validateEntityName(entityName) ] = { @@ -61887,9 +61888,8 @@ function networkConnections(callback) { }); } if (_darwin) { - // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"'; let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; - const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; + const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { exec('ps -axo pid,command', { maxBuffer: 1024 * 20000 }, function (err2, stdout2) { @@ -61897,8 +61897,10 @@ function networkConnections(callback) { processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); + lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); + const hasTransferred = line.length >= 19; if (line.length >= 8) { let localip = line[3]; let localport = ''; @@ -61918,7 +61920,7 @@ function networkConnections(callback) { } const hasState = states.indexOf(line[5]) >= 0; let connstate = hasState ? line[5] : 'UNKNOWN'; - let pid = parseInt(line[8 + (hasState ? 0 : -1)], 10); + let pid = parseInt(line[8 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); if (connstate) { result.push({ protocol: line[0], @@ -62187,26 +62189,34 @@ const _sunos = (_platform === 'sunos'); function time() { let t = new Date().toString().split(' '); + const result = { + current: Date.now(), + uptime: os.uptime(), + timezone: (t.length >= 7) ? t[5] : '', + timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' + }; if (_darwin || _linux) { - const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); - const lines = stdout.toString().split(os.EOL); - if (lines.length > 3 && !lines[0]) { - lines.shift(); + try { + const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); + const lines = stdout.toString().split(os.EOL); + if (lines.length > 3 && !lines[0]) { + lines.shift(); + } + let timezone = lines[0] || ''; + if (timezone.startsWith('+') || timezone.startsWith('-')) { + timezone = 'GMT'; + } + return { + current: Date.now(), + uptime: os.uptime(), + timezone: lines[1] ? timezone + lines[1] : timezone, + timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' + }; + } catch (e) { + util.noop(); } - return { - current: Date.now(), - uptime: os.uptime(), - timezone: lines[0] && lines[1] ? lines[0] + lines[1] : '', - timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' - }; - } else { - return { - current: Date.now(), - uptime: os.uptime(), - timezone: (t.length >= 7) ? t[5] : '', - timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' - }; - }; + } + return result; } exports.time = time; @@ -68476,7 +68486,7 @@ function wifiConnections(callback) { const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : ''; const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : ''; const ssid = util.getValue(lines, 'SSID', ':', true); - const bssid = util.getValue(lines, 'BSSID', ':', true); + const bssid = util.getValue(lines, 'BSSID', ':', true) || util.getValue(lines, 'AP BSSID', ':', true);; const quality = util.getValue(lines, 'Signal', ':', true); const signalLevel = wifiDBFromQuality(quality); const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null; @@ -112049,7 +112059,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4. /***/ 15460: /***/ ((module) => { -module.exports = {"rE":"5.23.10"}; +module.exports = {"rE":"5.23.13"}; /***/ }) diff --git a/packages/setup-ocaml/package.json b/packages/setup-ocaml/package.json index 5b7e345c..fa77a8b3 100644 --- a/packages/setup-ocaml/package.json +++ b/packages/setup-ocaml/package.json @@ -19,7 +19,7 @@ "@actions/tool-cache": "2.0.1", "cheerio": "1.0.0", "semver": "7.6.3", - "systeminformation": "5.23.10", + "systeminformation": "5.23.13", "yaml": "2.6.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 2561247a..2e77b3d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -509,7 +509,7 @@ __metadata: "@vercel/ncc": "npm:0.38.3" cheerio: "npm:1.0.0" semver: "npm:7.6.3" - systeminformation: "npm:5.23.10" + systeminformation: "npm:5.23.13" typescript: "npm:5.7.2" yaml: "npm:2.6.1" languageName: unknown @@ -1140,13 +1140,13 @@ __metadata: linkType: hard "fast-xml-parser@npm:^4.4.1": - version: 4.5.0 - resolution: "fast-xml-parser@npm:4.5.0" + version: 4.5.1 + resolution: "fast-xml-parser@npm:4.5.1" dependencies: strnum: "npm:^1.0.5" bin: fxparser: src/cli/cli.js - checksum: 10c0/71d206c9e137f5c26af88d27dde0108068a5d074401901d643c500c36e95dfd828333a98bda020846c41f5b9b364e2b0e9be5b19b0bdcab5cf31559c07b80a95 + checksum: 10c0/70c6c675770d57d4b73716a1cdccff3780a5f818cffdab9c7560003e1724209001af32fbe7bb27a01107389b1998191c62e20104788ba17e218dfe063aa15b57 languageName: node linkType: hard @@ -1900,12 +1900,12 @@ __metadata: languageName: node linkType: hard -"systeminformation@npm:5.23.10": - version: 5.23.10 - resolution: "systeminformation@npm:5.23.10" +"systeminformation@npm:5.23.13": + version: 5.23.13 + resolution: "systeminformation@npm:5.23.13" bin: systeminformation: lib/cli.js - checksum: 10c0/ae898cc6303d683bd9241dd89142861cdf775a4e7190a94ea50c18d1ce07ebd608e4fda19de6c0fa869d2598a1e7f5693d41589db6e32574c88a31421cd78807 + checksum: 10c0/3776ebd6af081f1a0572225b92646e3b26e127b44095af44eb512969bb11981bbfb5cde392a17e056464afda4f422371f1234bf0d0debcd9676f5a0c988980b5 conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android) languageName: node linkType: hard