periderm-cli 0.1.6 → 0.1.8

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 CHANGED
@@ -386,7 +386,7 @@ else {
386
386
  try {
387
387
  const formData = new FormData();
388
388
  formData.append("name", "Periderm CLI Crash Reporter");
389
- let userEmail = "support@periderm.dev";
389
+ let userEmail = "princejaphethjj@gmail.com";
390
390
  try {
391
391
  const cfg = readConfig();
392
392
  if (cfg.token) {
@@ -400,7 +400,7 @@ else {
400
400
  // ignore token verification errors during crash
401
401
  }
402
402
  formData.append("_replyto", userEmail);
403
- const marker = `\n\n---\n[System Info: Sent from Periderm CLI]\n[User Email: ${userEmail === "support@periderm.dev" ? "Unknown" : userEmail}]`;
403
+ const marker = `\n\n---\n[System Info: Sent from Periderm CLI]\n[User Email: ${userEmail === "princejaphethjj@gmail.com" ? "Unknown" : userEmail}]`;
404
404
  const errMsg = e instanceof Error ? `${e.message}\n${e.stack}` : String(e);
405
405
  formData.append("message", `CLI Crash:\n\n${errMsg}${marker}`);
406
406
  await fetch("https://formspree.io/f/mqakppnn", {
@@ -2,6 +2,7 @@ import chalk from "chalk";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
+ import { readConfig } from "./config.js";
5
6
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
7
  const pkgPath = path.join(__dirname, "..", "package.json");
7
8
  export async function checkUpdate() {
@@ -21,11 +22,10 @@ export async function checkUpdate() {
21
22
  const data = await res.json();
22
23
  const latestVersion = data.version;
23
24
  if (latestVersion && latestVersion !== currentVersion) {
24
- // Basic semver check (only notifies if latest > current simply by string comparison or simple parsing)
25
- // Since it's x.y.z, simple comparison works for basic stuff, but a strict semver check is better.
26
- // We will just check if they are not equal, since latest is usually higher.
25
+ const cfg = readConfig();
26
+ const apiUrl = cfg?.apiUrl;
27
27
  const isWin = process.platform === "win32";
28
- const updateCmd = isWin ? `npm install -g ${name}` : `curl -fsSL https://periderm.dev/install.sh | bash`;
28
+ const updateCmd = isWin ? `npm install -g ${name}` : `curl -fsSL ${apiUrl}/install.sh | bash`;
29
29
  const box = `
30
30
  ╭──────────────────────────────────────────────────────────────╮
31
31
  │ │
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "periderm-cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "A pre-launch checklist for your codebase.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
15
- "postpublish": "cd ../../ && tsx scripts/broadcast-update.ts",
15
+ "postpublish": "cd ../../ && tsx --env-file=.env scripts/broadcast-update.ts",
16
16
  "dev": "tsx src/index.ts",
17
17
  "start": "node dist/index.js"
18
18
  },