• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / loaders.gl / 24112850045

08 Apr 2026 01:31AM UTC coverage: 35.137% (+0.003%) from 35.134%
24112850045

push

github

web-flow
chore: biome replaces eslint/prettier (#3349)

1225 of 2057 branches covered (59.55%)

Branch coverage included in aggregate %.

55 of 603 new or added lines in 172 files covered. (9.12%)

1 existing line in 1 file now uncovered.

39942 of 115105 relevant lines covered (34.7%)

0.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.57
/modules/worker-utils/src/lib/process-utils/process-utils.ts
1
// loaders.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import ChildProcess from 'child_process';
1✔
6

1✔
7
// Get an available port
1✔
8
// Works on Unix systems
1✔
9
export function getAvailablePort(defaultPort: number = 3000): Promise<number> {
1✔
NEW
10
  return new Promise(resolve => {
×
11
    // Get a list of all ports in use
×
12
    ChildProcess.exec('lsof -i -P -n | grep LISTEN', (error, stdout) => {
×
13
      if (error) {
×
14
        // likely no permission, e.g. CI
×
15
        resolve(defaultPort);
×
16
        return;
×
17
      }
×
18

×
19
      const portsInUse: number[] = [];
×
20
      const regex = /:(\d+) \(LISTEN\)/;
×
NEW
21
      stdout.split('\n').forEach(line => {
×
22
        const match = regex.exec(line);
×
23
        if (match) {
×
24
          portsInUse.push(Number(match[1]));
×
25
        }
×
26
      });
×
27
      let port = defaultPort;
×
28
      while (portsInUse.includes(port)) {
×
29
        port++;
×
30
      }
×
31
      resolve(port);
×
32
    });
×
33
  });
×
34
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc