custom install module cached

This commit is contained in:
Brian Madison
2025-12-07 20:46:09 -06:00
parent 6430173738
commit 738237b4ae
9 changed files with 1549 additions and 70 deletions

View File

@@ -3,6 +3,7 @@ const boxen = require('boxen');
const wrapAnsi = require('wrap-ansi');
const figlet = require('figlet');
const path = require('node:path');
const os = require('node:os');
const CLIUtils = {
/**
@@ -205,6 +206,22 @@ const CLIUtils = {
// No longer clear screen or show boxes - just a simple completion message
// This is deprecated but kept for backwards compatibility
},
/**
* Expand path with ~ expansion
* @param {string} inputPath - Path to expand
* @returns {string} Expanded path
*/
expandPath(inputPath) {
if (!inputPath) return inputPath;
// Expand ~ to home directory
if (inputPath.startsWith('~')) {
return path.join(os.homedir(), inputPath.slice(1));
}
return inputPath;
},
};
module.exports = { CLIUtils };