INNER CODE UNIT · JavaScript
sleep
alohe/quicky · index.js:76
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const log = console.log;
// ---------------------------------------------------------------------------
// Self-update check (skipped in non-TTY, with 24h cache + request timeout)
// ---------------------------------------------------------------------------
const UPDATE_CACHE_PATH = path.join(DEFAULT_FOLDER, ".update-check");
const UPDATE_CACHE_TTL_MS = 24 * 60 * 60 * 1000;
function updateCLI() {
try {
execSync("sudo npm install -g quicky", { stdio: "inherit" });
console.log(
chalk.green("Quicky has been upgraded to the latest version."),
);
} catch (error) {
console.error(chalk.red(`Failed to upgrade Quicky: ${error.message}`));