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 +2 -2
- package/dist/update-notifier.js +4 -4
- package/package.json +2 -2
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 = "
|
|
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 === "
|
|
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", {
|
package/dist/update-notifier.js
CHANGED
|
@@ -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
|
-
|
|
25
|
-
|
|
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
|
|
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.
|
|
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
|
},
|