@averyyy/pi-client 0.82.1-piclient.6 → 0.82.1-piclient.7
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/CHANGELOG.md +0 -1
- package/bin/send.js +2 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
### Fixed
|
|
13
13
|
|
|
14
14
|
- Used `--legacy-peer-deps` for npm-global fork updates and documented installs so existing upstream Pi installs do not trigger peer override warnings for forked prerelease aliases.
|
|
15
|
-
- Made `pi-client send` use bounded, checksummed, retry-safe chunk transport and treat an identical existing upload as the successful result of an uncertain retry.
|
|
16
15
|
|
|
17
16
|
### Changed
|
|
18
17
|
|
package/bin/send.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { lstatSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { basename, join, relative, resolve, sep } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
ChunkRequest,
|
|
5
|
-
readPiServerResponseJson,
|
|
6
|
-
} from "@earendil-works/pi-coding-agent/pi-server-request";
|
|
3
|
+
import { ChunkRequest } from "@earendil-works/pi-coding-agent/pi-server-request";
|
|
7
4
|
|
|
8
5
|
function addDirectoryEntries(root, directory, entries) {
|
|
9
6
|
const path = relative(root, directory).split(sep).join("/");
|
|
@@ -42,10 +39,7 @@ export async function runPiClientSend(args) {
|
|
|
42
39
|
authToken: process.env.PI_SERVER_AUTH_TOKEN ?? "",
|
|
43
40
|
});
|
|
44
41
|
const response = await request.postJson("/api/receive", createUploadBody(args[0]));
|
|
45
|
-
const body = await
|
|
46
|
-
if (typeof body !== "object" || body === null || Array.isArray(body)) {
|
|
47
|
-
throw new Error("pi-client send failed: pi-server returned an invalid JSON response");
|
|
48
|
-
}
|
|
42
|
+
const body = await response.json();
|
|
49
43
|
if (!response.ok) {
|
|
50
44
|
console.error(`pi-client send failed (${response.status}): ${body.error ?? response.statusText}`);
|
|
51
45
|
return 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@averyyy/pi-client",
|
|
3
|
-
"version": "0.82.1-piclient.
|
|
3
|
+
"version": "0.82.1-piclient.7",
|
|
4
4
|
"description": "Lightweight CLI wrapper that connects to a pi-server instance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piClient": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@earendil-works/pi-coding-agent": "npm:@averyyy/pi-coding-agent@0.82.1-piclient.
|
|
28
|
+
"@earendil-works/pi-coding-agent": "npm:@averyyy/pi-coding-agent@0.82.1-piclient.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"shx": "0.4.0",
|