periderm-cli 0.1.56 → 0.1.57

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/README.md CHANGED
@@ -17,7 +17,6 @@ Or use the install script from your Periderm dashboard docs (`curl -fsSL https:/
17
17
  ```bash
18
18
  periderm login # authenticate once
19
19
  periderm scan # scan + upload to your dashboard
20
- periderm scan --local-only # local report only, no upload
21
20
  periderm watch # rerun on file change
22
21
  periderm whoami # show current token + plan
23
22
  ```
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ const program = new Command();
31
31
  program
32
32
  .name("periderm")
33
33
  .description("A pre-launch checklist.")
34
- .version("0.1.37");
34
+ .version("0.1.57");
35
35
  // Easter egg: `periderm bless` — hidden, undocumented
36
36
  program
37
37
  .command("bless", { hidden: true })
@@ -58,7 +58,6 @@ program
58
58
  program
59
59
  .command("scan")
60
60
  .description("Scan the current directory and write a markdown report.")
61
- .option("--local-only", "Scan locally without uploading to your Periderm dashboard")
62
61
  .option("--cwd <dir>", "Directory to scan", process.cwd())
63
62
  .action(async (opts) => {
64
63
  const root = path.resolve(opts.cwd);
@@ -157,45 +156,41 @@ program
157
156
  await fs.writeFile(path.join(outDir, "ai-instructions.md"), getAiInstructions(readConfig().apiUrl), "utf8");
158
157
  // Ignore all files in the .periderm folder to prevent leaking vulnerabilities
159
158
  await fs.writeFile(path.join(outDir, ".gitignore"), "*\n", "utf8");
160
- if (!opts.localOnly) {
161
- const cfg = readConfig();
162
- if (!cfg.token) {
163
- console.info(chalk.yellow("no token configured — run `periderm login` first to sync to dashboard."));
159
+ if (!cfg.token) {
160
+ console.info(chalk.yellow("no token configured — run `periderm login` first to sync to dashboard."));
161
+ }
162
+ else {
163
+ const uploadSpinner = ora({ text: UPLOAD_MESSAGES[0], color: "cyan" }).start();
164
+ const uploadStarted = Date.now();
165
+ const stopUploadRotate = startRotatingMessages(uploadSpinner, UPLOAD_MESSAGES);
166
+ const res = await uploadScan(cfg.token, result);
167
+ await finishRotatingMessages(stopUploadRotate, uploadStarted);
168
+ if (res.error) {
169
+ uploadSpinner.fail(`upload failed: ${res.error}`);
170
+ if (res.error.includes("401") || res.error.includes("Invalid token") || res.error.includes("expired")) {
171
+ writeConfig({ ...cfg, token: undefined });
172
+ console.info(chalk.yellow("\nYour session expired or your token is invalid. Please run `periderm login` to authenticate again."));
173
+ }
174
+ // Throw so it gets caught by the crash reporter and sent to Formspree
175
+ throw new Error(`Upload failed: ${res.error}\nContext: Uploading scan for project ${result.projectName}`);
164
176
  }
165
177
  else {
166
- const uploadSpinner = ora({ text: UPLOAD_MESSAGES[0], color: "cyan" }).start();
167
- const uploadStarted = Date.now();
168
- const stopUploadRotate = startRotatingMessages(uploadSpinner, UPLOAD_MESSAGES);
169
- const res = await uploadScan(cfg.token, result);
170
- await finishRotatingMessages(stopUploadRotate, uploadStarted);
171
- if (res.error) {
172
- uploadSpinner.fail(`upload failed: ${res.error}`);
173
- if (res.error.includes("401") || res.error.includes("Invalid token") || res.error.includes("expired")) {
174
- writeConfig({ ...cfg, token: undefined });
175
- console.info(chalk.yellow("\nYour session expired or your token is invalid. Please run `periderm login` to authenticate again."));
176
- }
177
- // Throw so it gets caught by the crash reporter and sent to Formspree
178
- throw new Error(`Upload failed: ${res.error}\nContext: Uploading scan for project ${result.projectName}`);
178
+ uploadSpinner.succeed(`Uploaded! View it at: ${chalk.underline.cyan(`${cfg.apiUrl}/dashboard/scans/${res.id ?? ""}`)}`);
179
+ let formatQuota = "Unlimited";
180
+ let remainingNum = Infinity;
181
+ if (v.plan !== "unlimited" && v.scans_remaining !== undefined) {
182
+ remainingNum = Math.max(0, v.scans_remaining - 1);
183
+ formatQuota = `${remainingNum} scans`;
179
184
  }
180
- else {
181
- uploadSpinner.succeed(`Uploaded! View it at: ${chalk.underline.cyan(`${cfg.apiUrl}/dashboard/scans/${res.id ?? ""}`)}`);
182
- let formatQuota = "Unlimited";
183
- let remainingNum = Infinity;
184
- if (v.plan !== "unlimited" && v.scans_remaining !== undefined) {
185
- remainingNum = Math.max(0, v.scans_remaining - 1);
186
- formatQuota = `${remainingNum} scans`;
187
- }
188
- console.info("");
189
- console.info(chalk.bold.white("Quota : ") + chalk.yellow(formatQuota));
190
- console.info("");
191
- console.info(chalk.bold.white("[Next Steps]"));
192
- console.info(chalk.white(" 1. Run AI Review ") + chalk.hex("#FF4D00")("$ periderm review --deep"));
193
- console.info(chalk.white(" 2. Local only ") + chalk.hex("#FF4D00")("$ periderm scan --local-only"));
194
- console.info(chalk.white(" 3. Log out ") + chalk.hex("#FF4D00")("$ periderm logout"));
195
- console.info("");
196
- if (remainingNum <= 3 && v.plan !== "unlimited") {
197
- console.info(chalk.yellow(`⚠ Almost exhausted! Renew or upgrade at `) + chalk.underline.cyan(`${cfg.apiUrl}/dashboard/billing`));
198
- }
185
+ console.info("");
186
+ console.info(chalk.bold.white("Quota : ") + chalk.yellow(formatQuota));
187
+ console.info("");
188
+ console.info(chalk.bold.white("[Next Steps]"));
189
+ console.info(chalk.white(" 1. Run AI Review ") + chalk.hex("#FF4D00")("$ periderm review --deep"));
190
+ console.info(chalk.white(" 2. Log out ") + chalk.hex("#FF4D00")("$ periderm logout"));
191
+ console.info("");
192
+ if (remainingNum <= 3 && v.plan !== "unlimited") {
193
+ console.info(chalk.yellow(`⚠ Almost exhausted! Renew or upgrade at `) + chalk.underline.cyan(`${cfg.apiUrl}/dashboard/billing`));
199
194
  }
200
195
  }
201
196
  }
@@ -374,8 +369,7 @@ program
374
369
  console.info("");
375
370
  console.info(chalk.bold.white("[Next Steps]"));
376
371
  console.info(chalk.white(" 1. Scan + upload ") + chalk.hex("#FF4D00")("$ periderm scan"));
377
- console.info(chalk.white(" 2. Local only ") + chalk.hex("#FF4D00")("$ periderm scan --local-only"));
378
- console.info(chalk.white(" 3. Log out ") + chalk.hex("#FF4D00")("$ periderm logout"));
372
+ console.info(chalk.white(" 2. Log out ") + chalk.hex("#FF4D00")("$ periderm logout"));
379
373
  console.info("");
380
374
  console.info(chalk.white("Need help? Visit ") + chalk.underline.cyan(`${apiUrl}/docs`) + chalk.white("\n"));
381
375
  server.close();
@@ -57,7 +57,7 @@ You get a terminal verdict plus report files at:
57
57
  - \`.periderm/last-report.md\`
58
58
  - \`.periderm/last-report.json\`
59
59
 
60
- Scans upload to your dashboard by default. Use \`periderm scan --local-only\` for offline-only reports.
60
+ Scans upload to your dashboard by default.
61
61
 
62
62
  ### Project context (admin dashboards & monorepos)
63
63
  Periderm detects project structure — not just folder names — to skip legal, SEO, and accessibility checks on internal admin surfaces. Override with \`.periderm/context.json\`:
@@ -79,7 +79,6 @@ When viewing scan reports, findings are broken down by severity:
79
79
 
80
80
  ### CLI commands
81
81
  - \`periderm scan\`: Scan current directory, upload results, and write reports. Requires login.
82
- - \`periderm scan --local-only\`: Scan locally without uploading to the dashboard.
83
82
  - \`periderm review --deep\`: (Scale/Unlimited plan only) AI agent review for edge cases static checks miss. Appends to your last report.
84
83
  - \`periderm login\`: Link the CLI to your Periderm account via browser.
85
84
  - \`periderm logout\`: Clear the locally stored CLI token.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "periderm-cli",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "description": "Periderm CLI: A pre-launch checklist to catch user-losing bugs, legal liabilities, revenue leaks, runaway cloud bills and so many more before you ship.",
5
5
  "type": "module",
6
6
  "preferGlobal": true,