@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.
- package/install.js +5 -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
|
-
|
|
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
|
};
|