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

131 / cnyks / 15442256268

04 Jun 2025 12:27PM UTC coverage: 85.311% (-0.7%) from 86.0%
15442256268

Pull #1

github

131
fix column detection
Pull Request #1: Fix handling of terminal columns

166 of 211 branches covered (78.67%)

2 of 8 new or added lines in 2 files covered. (25.0%)

302 of 354 relevant lines covered (85.31%)

35.6 hits per line

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

79.17
/lib/bundle.js
1
'use strict';
2

3
const Cnyks     = require('./index');
5✔
4
const parseargs = require('nyks/process/parseArgs');
5✔
5
const read      = require('read');
5✔
6

7

8
const COLS = 96;
5✔
9

10
// args can shift pre-imposed design, like ['--ir://start=hi', '--ir://run=']
11
module.exports = function(module, module_name, args = []) {
5✔
12
  const cmdline        = [...args, ...process.argv.slice(2)];
5✔
13
  const cmdline_parsed = parseargs(cmdline);
5✔
14

15
  cmdline_parsed.dict['ir://name']   = module_name || module.name || "app";
5!
16
  cmdline_parsed.dict['ir://stderr'] = process.stderr.write.bind(process.stderr);
5✔
17
  cmdline_parsed.dict['ir://stdout'] = process.stdout.write.bind(process.stdout);
5✔
18
  cmdline_parsed.dict['ir://prompt'] = read;
5✔
19

20
  let width = process.stdout.columns > 0 ? process.stdout.columns - 2 : COLS;
5!
21
  cmdline_parsed.dict['ir://cols']   = Math.min(width, COLS);
5✔
22

23
  let cnyks = Cnyks.start(module, cmdline_parsed.dict, cmdline_parsed.args, function(err) {
5✔
24
    if(err) {
4!
25
      setTimeout(() => {
×
26
        console.error(err, err && err.stack || '');
×
27
        throw "Failure in cnyks";
×
28
      });
29
    }
30
    if(process.stdin.unref)
4!
31
      process.stdin.unref();
4✔
32
    process.emit('cnyksEnd');
4✔
33
  });
34

35
  process.stdout.on("resize", () => {
5✔
NEW
36
    let width = process.stdout.columns > 0 ? process.stdout.columns - 2 : COLS;
×
NEW
37
    cnyks.cols = Math.min(width, COLS);
×
38
  });
39
};
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