find-process
Advanced tools
@@ -17,3 +17,14 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| # Operating System Matrix | ||
| # ubuntu-latest: Latest Ubuntu version (currently 22.04) | ||
| # windows-latest: Latest Windows Server version (currently 2022) | ||
| # macos-12: macOS 12 Monterey (released 2021) | ||
| # macos-13: macOS 13 Ventura (released 2022) | ||
| # macos-14: macOS 14 Sonoma (released 2023) | ||
| # macos-15: macOS 15 Sequoia (released 2024) | ||
| os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14, macos-15] | ||
| # Node.js Version Matrix | ||
| # 16: Node.js 16.x LTS (released 2020, EOL April 2024) | ||
| # 18: Node.js 18.x LTS (released 2022, EOL April 2025) | ||
| # 20: Node.js 20.x LTS (released 2023, EOL April 2026) | ||
| node: [16, 18, 20] | ||
@@ -20,0 +31,0 @@ |
+15
-3
@@ -40,5 +40,17 @@ /* | ||
| // replace header | ||
| const data = utils.stripLine(stdout.toString(), 2) | ||
| const found = utils.extractColumns(data, [0, 3, 8], 10) | ||
| // Drop group header, e.g. "Active Internet connections" | ||
| const table = utils.stripLine(stdout.toString(), 1) | ||
| // Get the next line with the column headers | ||
| const headers = table.slice(0, table.indexOf('\n')) | ||
| // Drop the header line to get the table body | ||
| const body = utils.stripLine(table, 1) | ||
| // In macOS >=Sequoia, columns include `rxbytes` and `txbytes`, which | ||
| // shifts the PID column to index 10. Detect this with a search | ||
| // for rxbytes. (Parsing the headers more robustly isn't possible | ||
| // because some colmn names contain spaces, and others are only separated | ||
| // by a single space.) | ||
| const pidColumn = headers.indexOf('rxbytes') >= 0 ? 10 : 8 | ||
| const found = utils.extractColumns(body, [0, 3, pidColumn], 10) | ||
| .filter(row => { | ||
@@ -45,0 +57,0 @@ return !!String(row[0]).match(/^(udp|tcp)/) |
+7
-6
| { | ||
| "name": "find-process", | ||
| "version": "1.4.10", | ||
| "version": "1.4.11", | ||
| "description": "find process info by port/pid/name etc.", | ||
| "main": "index.js", | ||
| "types": "index.d.ts", | ||
| "scripts": { | ||
| "test": "mocha test/*.test.js && standard", | ||
| "lint": "standard --fix && npm-ensure -t deps" | ||
| }, | ||
| "bin": { | ||
@@ -66,6 +70,3 @@ "find-process": "bin/find-process.js" | ||
| }, | ||
| "scripts": { | ||
| "test": "mocha test/*.test.js && standard", | ||
| "lint": "standard --fix && npm-ensure -t deps" | ||
| } | ||
| } | ||
| "packageManager": "pnpm@9.15.1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf" | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
32146
4.87%743
1.36%