@ijuantm/simpl-addon 2.6.4 → 2.6.6

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.
Files changed (2) hide show
  1. package/install.js +5 -2
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -18,12 +18,15 @@ const CDN_BASE = 'https://cdn.simpl.iwanvanderwal.nl/framework';
18
18
  const LOCAL_RELEASES_DIR = process.env.SIMPL_LOCAL_RELEASES || path.join(process.cwd(), 'local-releases');
19
19
  const BOX_WIDTH = 62;
20
20
 
21
- const log = (message, color = 'reset') => console.log(`${COLORS[color]}${message}${COLORS.reset}`);
21
+ const log = (message = '', color = 'reset') => console.log(`${COLORS[color]}${message}${COLORS.reset}`);
22
22
 
23
23
  const box = (title) => {
24
24
  log();
25
25
  log(` ╭${'─'.repeat(BOX_WIDTH)}╮`);
26
- log(` ${COLORS.bold}${title}${COLORS.reset}${' '.repeat(Math.max(0, BOX_WIDTH - title.length - 2))}│`);
26
+ const contentWidth = BOX_WIDTH - 2; // Remove the two padding characters on each side
27
+ const remainingSpace = contentWidth - (typeof title === 'string' ? title.length : 0);
28
+ const padding = remainingSpace > 0 ? ' '.repeat(remainingSpace) : '';
29
+ log(` │ ${COLORS.bold}${title}${COLORS.reset}${padding}│`);
27
30
  log(` ╰${'─'.repeat(BOX_WIDTH)}╯`);
28
31
  log();
29
32
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ijuantm/simpl-addon",
3
3
  "description": "CLI tool to install Simpl framework add-ons.",
4
- "version": "2.6.4",
4
+ "version": "2.6.6",
5
5
  "scripts": {
6
6
  "link": "npm link",
7
7
  "unlink": "npm unlink -g @ijuantm/simpl-addon"