periderm-cli 0.1.18 → 0.1.20
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 +31 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -175,13 +175,38 @@ program
|
|
|
175
175
|
}
|
|
176
176
|
else {
|
|
177
177
|
uploadSpinner.succeed(`Uploaded! View it at: ${chalk.underline.blue(`${cfg.apiUrl}/dashboard/scans/${res.id ?? ""}`)}`);
|
|
178
|
+
const username = os.userInfo().username;
|
|
179
|
+
const hostname = os.hostname();
|
|
180
|
+
const header = `${username}@${hostname}`;
|
|
181
|
+
const formatEmail = v.email || v.user_id || "Unknown";
|
|
182
|
+
const formatPlan = v.plan || "starter";
|
|
183
|
+
let formatQuota = "Unlimited";
|
|
184
|
+
let remainingNum = Infinity;
|
|
178
185
|
if (v.plan !== "unlimited" && v.scans_remaining !== undefined) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
remainingNum = Math.max(0, v.scans_remaining - 1);
|
|
187
|
+
formatQuota = `${remainingNum} scans`;
|
|
188
|
+
}
|
|
189
|
+
const actualLogoLines = PERIDERM_ASCII.split("\n");
|
|
190
|
+
console.info("");
|
|
191
|
+
for (const line of actualLogoLines) {
|
|
192
|
+
console.info(chalk.hex("#FF4D00")(line));
|
|
193
|
+
}
|
|
194
|
+
console.info("");
|
|
195
|
+
console.info(chalk.bold.cyan(header));
|
|
196
|
+
console.info(chalk.white("─".repeat(header.length)));
|
|
197
|
+
console.info("");
|
|
198
|
+
console.info(chalk.bold.white("Account : ") + chalk.white(formatEmail));
|
|
199
|
+
console.info(chalk.bold.white("Plan : ") + chalk.magenta(formatPlan));
|
|
200
|
+
console.info(chalk.bold.white("Quota : ") + chalk.yellow(formatQuota));
|
|
201
|
+
console.info("");
|
|
202
|
+
console.info(chalk.bold.white("[Next Steps]"));
|
|
203
|
+
console.info(chalk.white(" 1. Run AI Review ") + chalk.hex("#FF4D00")("$ periderm review --deep"));
|
|
204
|
+
console.info(chalk.white(" 2. Local only ") + chalk.hex("#FF4D00")("$ periderm scan --local-only"));
|
|
205
|
+
console.info(chalk.white(" 3. Log out ") + chalk.hex("#FF4D00")("$ periderm logout"));
|
|
206
|
+
console.info("");
|
|
207
|
+
console.info(chalk.white("Need help? Visit ") + chalk.underline.cyan(`${cfg.apiUrl}/docs`) + chalk.white("\n"));
|
|
208
|
+
if (remainingNum <= 3 && v.plan !== "unlimited") {
|
|
209
|
+
console.info(chalk.yellow(`⚠ Almost exhausted! Renew or upgrade at `) + chalk.underline.cyan(`${cfg.apiUrl}/dashboard/billing`));
|
|
185
210
|
}
|
|
186
211
|
}
|
|
187
212
|
}
|