pompelmi 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/pompelmi.js CHANGED
@@ -10,20 +10,45 @@ const pkg = require('../package.json');
10
10
  // ── Logo ──────────────────────────────────────────────────────────────────────
11
11
 
12
12
  async function printLogo() {
13
+ const titleLines = [
14
+ '\x1b[33mpompelmi\x1b[0m — ClamAV Antivirus Scanning for Node.js',
15
+ '\x1b[90mv' + pkg.version + ' • Zero dependencies • TCP • UNIX socket\x1b[0m',
16
+ ];
17
+
13
18
  try {
14
19
  const terminalImage = (await import('terminal-image')).default;
15
20
  const imgPath = path.join(__dirname, '../src/grapefruit.png');
16
21
  if (fs.existsSync(imgPath)) {
17
22
  const image = await terminalImage.file(imgPath, {
18
- width: '20%',
19
- height: '20%',
23
+ width: 24,
20
24
  preserveAspectRatio: true,
21
25
  });
22
- process.stdout.write(image);
26
+
27
+ const rawLines = image.split('\n');
28
+ // Drop trailing blank line that terminal-image appends
29
+ const imgLines = rawLines[rawLines.length - 1].trim() === ''
30
+ ? rawLines.slice(0, -1)
31
+ : rawLines;
32
+ const pad = ' ';
33
+ const gap = ' ';
34
+ const maxRows = Math.max(imgLines.length, titleLines.length);
35
+
36
+ process.stdout.write('\n');
37
+ for (let i = 0; i < maxRows; i++) {
38
+ const imgPart = imgLines[i] ?? ' '.repeat(24);
39
+ const textPart = i === 0 ? titleLines[0]
40
+ : i === 1 ? titleLines[1]
41
+ : '';
42
+ process.stdout.write(pad + imgPart + gap + textPart + '\n');
43
+ }
44
+ process.stdout.write('\n');
45
+ return;
23
46
  }
24
47
  } catch (_) {}
25
- console.log('\x1b[33m pompelmi\x1b[0m — ClamAV Antivirus Scanning for Node.js');
26
- console.log('\x1b[90m v' + pkg.version + ' • Zero dependencies • TCP • UNIX socket • GitHub Action\x1b[0m\n');
48
+
49
+ // Fallback: text-only header
50
+ console.log('\n\x1b[33m pompelmi\x1b[0m — ClamAV Antivirus Scanning for Node.js');
51
+ console.log('\x1b[90m v' + pkg.version + ' • Zero dependencies • TCP • UNIX socket\x1b[0m\n');
27
52
  }
28
53
 
29
54
  // ── Argument parsing ──────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pompelmi",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "ClamAV for humans — scan any file and get back Clean, Malicious, or ScanError. No daemons. No cloud. No native bindings.",
5
5
  "license": "ISC",
6
6
  "author": "pompelmi contributors",
package/pr_info.tmp ADDED
@@ -0,0 +1,2 @@
1
+ {"branch":null,"number":null,"url":null}
2
+ EOF