peakurl 1.0.0 → 1.0.2
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 +4 -2
- package/bin/peakurl.js +12 -7
- package/man/peakurl.1 +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -121,13 +121,15 @@ If you need the raw payload:
|
|
|
121
121
|
peakurl status --json
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Download and extract the
|
|
124
|
+
Download, verify, and extract the current PeakURL core package into the current directory:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
peakurl core download
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
If the current directory already contains
|
|
130
|
+
The command checks the published release checksum before extracting files. If the current directory already contains release-managed files, the command stops by default.
|
|
131
|
+
|
|
132
|
+
Use `--force` only when you intentionally want those files replaced:
|
|
131
133
|
|
|
132
134
|
```bash
|
|
133
135
|
peakurl core download --force
|
package/bin/peakurl.js
CHANGED
|
@@ -37,7 +37,9 @@ function ensureCliError(error) {
|
|
|
37
37
|
var CONFIG_FILENAME = "config.json";
|
|
38
38
|
var STATE_FILENAME = "state.json";
|
|
39
39
|
function getConfigPath() {
|
|
40
|
-
|
|
40
|
+
const paths = envPaths("peakurl", { suffix: "" });
|
|
41
|
+
const directory = process.platform === "darwin" ? paths.data : paths.config;
|
|
42
|
+
return join(directory, CONFIG_FILENAME);
|
|
41
43
|
}
|
|
42
44
|
function getStatePath() {
|
|
43
45
|
return join(envPaths("peakurl", { suffix: "" }).config, STATE_FILENAME);
|
|
@@ -1798,14 +1800,17 @@ function userLabel(user) {
|
|
|
1798
1800
|
function userValue(user) {
|
|
1799
1801
|
return text4(user.username) || text4(user.email) || String(user.id ?? "");
|
|
1800
1802
|
}
|
|
1801
|
-
function userTable(user) {
|
|
1803
|
+
function userTable(user, apiBaseUrl) {
|
|
1802
1804
|
const rows2 = [
|
|
1803
|
-
["
|
|
1804
|
-
["Username", text4(user.username)],
|
|
1805
|
-
["Email", text4(user.email)],
|
|
1805
|
+
["ID", user.id === void 0 ? void 0 : String(user.id)],
|
|
1806
1806
|
["Role", text4(user.role)],
|
|
1807
|
-
["
|
|
1807
|
+
["Username", text4(user.username)],
|
|
1808
|
+
["Name", userLabel(user)],
|
|
1809
|
+
["Email", text4(user.email)]
|
|
1808
1810
|
].filter((entry) => Boolean(entry[1]));
|
|
1811
|
+
if (apiBaseUrl) {
|
|
1812
|
+
rows2.push(["API URL", apiBaseUrl]);
|
|
1813
|
+
}
|
|
1809
1814
|
if (rows2.length === 0) {
|
|
1810
1815
|
return "No user fields returned.";
|
|
1811
1816
|
}
|
|
@@ -2542,7 +2547,7 @@ async function whoami(options) {
|
|
|
2542
2547
|
return;
|
|
2543
2548
|
}
|
|
2544
2549
|
writeStdout(successLine(response.message));
|
|
2545
|
-
writeStdout(userTable(response.data));
|
|
2550
|
+
writeStdout(userTable(response.data, config.apiBaseUrl));
|
|
2546
2551
|
}
|
|
2547
2552
|
|
|
2548
2553
|
// src/index.ts
|
package/man/peakurl.1
CHANGED
|
@@ -305,7 +305,7 @@ This is primarily useful for testing.
|
|
|
305
305
|
.Sh FILES
|
|
306
306
|
.Bl -tag -width "Windows"
|
|
307
307
|
.It macOS
|
|
308
|
-
.Pa ~/Library/
|
|
308
|
+
.Pa ~/Library/Application Support/peakurl/config.json
|
|
309
309
|
.It Linux and other Unix systems
|
|
310
310
|
.Pa ~/.config/peakurl/config.json
|
|
311
311
|
.It Windows
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peakurl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Official CLI for creating, listing, and managing PeakURL short links from the terminal",
|
|
5
5
|
"homepage": "https://peakurl.org",
|
|
6
6
|
"bugs": {
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"commander": "^
|
|
51
|
-
"env-paths": "^
|
|
50
|
+
"commander": "^15.0.0",
|
|
51
|
+
"env-paths": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/node": "^
|
|
55
|
-
"prettier": "^3.6
|
|
56
|
-
"tsup": "^8.5.
|
|
57
|
-
"tsx": "^4.
|
|
58
|
-
"typescript": "^
|
|
54
|
+
"@types/node": "^26.1.2",
|
|
55
|
+
"prettier": "^3.9.6",
|
|
56
|
+
"tsup": "^8.5.1",
|
|
57
|
+
"tsx": "^4.23.4",
|
|
58
|
+
"typescript": "^7.0.2"
|
|
59
59
|
},
|
|
60
60
|
"license": "MIT"
|
|
61
61
|
}
|