periderm-cli 0.1.22 → 0.1.24
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/dist/index.js +13 -4
- package/dist/update-notifier.js +9 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -417,10 +417,19 @@ program
|
|
|
417
417
|
console.info(chalk.red(`token invalid: ${r.error}`));
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
console.info(
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
420
|
+
console.info("");
|
|
421
|
+
for (const line of PERIDERM_ASCII.split("\n")) {
|
|
422
|
+
console.info(chalk.hex("#FF4D00")(line));
|
|
423
|
+
}
|
|
424
|
+
console.info("");
|
|
425
|
+
const formatEmail = r.email || r.user_id || "Unknown";
|
|
426
|
+
const formatPlan = r.plan || "starter";
|
|
427
|
+
const formatQuota = `${r.scans_remaining ?? "?"}`;
|
|
428
|
+
console.info(chalk.bold.white("Account : ") + chalk.white(formatEmail));
|
|
429
|
+
console.info(chalk.bold.white("Plan : ") + chalk.magenta(formatPlan));
|
|
430
|
+
console.info(chalk.bold.white("Quota : ") + chalk.yellow(`${formatQuota} scans`));
|
|
431
|
+
console.info(chalk.bold.white("API : ") + chalk.cyan(cfg.apiUrl));
|
|
432
|
+
console.info("");
|
|
424
433
|
});
|
|
425
434
|
program
|
|
426
435
|
.command("logout")
|
package/dist/update-notifier.js
CHANGED
|
@@ -27,22 +27,15 @@ export async function checkUpdate() {
|
|
|
27
27
|
const isUnix = process.platform !== "win32" && process.platform !== "android";
|
|
28
28
|
const npmCmd = isUnix ? `sudo npm install -g ${name}` : `npm install -g ${name}`;
|
|
29
29
|
const curlCmd = `curl -fsSL ${apiUrl}/install.sh | bash`;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
│${" ".repeat(width)}│
|
|
40
|
-
│ Update via npm: ${chalk.cyan(npmCmd)}${pad(textNpm.length)}│
|
|
41
|
-
│ Update via curl: ${chalk.cyan(curlCmd)}${pad(textCurl.length)}│
|
|
42
|
-
│${" ".repeat(width)}│
|
|
43
|
-
╰${"─".repeat(width)}╯
|
|
44
|
-
`;
|
|
45
|
-
console.log(box);
|
|
30
|
+
const header = "Update Available";
|
|
31
|
+
console.log("");
|
|
32
|
+
console.log(chalk.bold.cyan(header));
|
|
33
|
+
console.log(chalk.white("─".repeat(header.length)));
|
|
34
|
+
console.log(chalk.bold.green(`↑ v${latestVersion} is out now`) + chalk.white(` (you have v${currentVersion})`));
|
|
35
|
+
console.log("");
|
|
36
|
+
console.log(chalk.bold.white("NPM : ") + chalk.white(npmCmd));
|
|
37
|
+
console.log(chalk.bold.white("cURL : ") + chalk.white(curlCmd));
|
|
38
|
+
console.log("");
|
|
46
39
|
}
|
|
47
40
|
}
|
|
48
41
|
catch (e) {
|