@pingroom/cli 0.6.1 → 0.6.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 +6 -6
- package/bin/pingroom.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ from CI, scripts, and agents. Delivered as push straight to your phone.
|
|
|
6
6
|
One dependency (`qrcode-terminal`, used only to draw the pairing QR). Works
|
|
7
7
|
anywhere Node ≥ 20 runs.
|
|
8
8
|
|
|
9
|
-
> **Release status:** npm currently serves 0.6.
|
|
10
|
-
>
|
|
11
|
-
> 0.6.1
|
|
12
|
-
>
|
|
9
|
+
> **Release status:** npm currently serves 0.6.1. The corrected attachment
|
|
10
|
+
> limits are in the tested 0.6.2 release candidate on `main`; the public GitHub
|
|
11
|
+
> Action remains pinned to 0.6.1 until 0.6.2 is published and clean-install
|
|
12
|
+
> verified.
|
|
13
13
|
|
|
14
14
|
## Install and first run
|
|
15
15
|
|
|
@@ -150,7 +150,7 @@ pingroom ping [options]
|
|
|
150
150
|
--button-label <t> Link button text (<= 26 chars; requires --url)
|
|
151
151
|
--require-ack Keep the ping open until an eligible recipient acknowledges it
|
|
152
152
|
--ack-timeout <s> Ack deadline in seconds (requires --require-ack)
|
|
153
|
-
--attach <path> Attach a file; repeat for up to
|
|
153
|
+
--attach <path> Attach a file; repeat for up to 4 (requires --token)
|
|
154
154
|
-w, --webhook <url> Room webhook URL (or env PINGROOM_WEBHOOK_URL)
|
|
155
155
|
--token <token> Agent access token (or env PINGROOM_TOKEN)
|
|
156
156
|
--room <code> Room invite code (used with --token)
|
|
@@ -191,7 +191,7 @@ pingroom ping --token "$PINGROOM_TOKEN" --room AB12 -m "Nightly report" \
|
|
|
191
191
|
```
|
|
192
192
|
|
|
193
193
|
Accepted types are `md`, `pdf`, `html`, `txt`, `jpg`, `jpeg`, `png`, up to
|
|
194
|
-
|
|
194
|
+
5 MiB each and at most 4 per Ping. `--attach` needs an agent token — a webhook ping
|
|
195
195
|
has no uploader identity to bind private files to — and the bound account must
|
|
196
196
|
hold Pro (otherwise the upload fails with `pro_required`). An upload that never
|
|
197
197
|
reaches a ping expires by itself after 24 hours.
|
package/bin/pingroom.js
CHANGED
|
@@ -40,7 +40,7 @@ import { join } from 'node:path';
|
|
|
40
40
|
// Kept in lockstep with package.json / package-lock.json. The GitHub Action is
|
|
41
41
|
// pinned independently to the latest version already published on npm; a test
|
|
42
42
|
// makes that release gate explicit. `hook --print-config` emits this candidate.
|
|
43
|
-
const VERSION = '0.6.
|
|
43
|
+
const VERSION = '0.6.2';
|
|
44
44
|
|
|
45
45
|
const BUILTIN_API = 'https://api.pingroom.io';
|
|
46
46
|
const MCP_ENDPOINT = `${BUILTIN_API}/api/agent/mcp`;
|
|
@@ -78,8 +78,8 @@ ping options:
|
|
|
78
78
|
--button-label <t> Link button text (<= 26 chars; requires --url)
|
|
79
79
|
--require-ack Keep the ping open until an eligible recipient acknowledges it
|
|
80
80
|
--ack-timeout <s> Ack deadline in seconds (requires --require-ack)
|
|
81
|
-
--attach <path> Attach a file (md/pdf/html/txt/jpg/jpeg/png, <=
|
|
82
|
-
repeat for up to
|
|
81
|
+
--attach <path> Attach a file (md/pdf/html/txt/jpg/jpeg/png, <= 5 MiB);
|
|
82
|
+
repeat for up to 4. Requires --token and a Pro account
|
|
83
83
|
-w, --webhook <url> Room webhook URL (or env PINGROOM_WEBHOOK_URL)
|
|
84
84
|
--token <token> Agent access token (or env PINGROOM_TOKEN)
|
|
85
85
|
--room <code> Room invite code (used with --token)
|
|
@@ -702,8 +702,8 @@ async function httpJson(method, url, { body, headers = {}, soft = false, signal
|
|
|
702
702
|
// local usage error instead of a 422 after the bytes have already been sent.
|
|
703
703
|
// Keep in lockstep with laravel config/attachments.php `allowed_extensions`.
|
|
704
704
|
const ATTACHMENT_EXTENSIONS = ['md', 'pdf', 'html', 'txt', 'jpg', 'jpeg', 'png'];
|
|
705
|
-
const ATTACHMENT_MAX_BYTES =
|
|
706
|
-
const ATTACHMENT_MAX_COUNT =
|
|
705
|
+
const ATTACHMENT_MAX_BYTES = 5 * 1024 * 1024;
|
|
706
|
+
const ATTACHMENT_MAX_COUNT = 4;
|
|
707
707
|
const ATTACHMENT_MIME = {
|
|
708
708
|
md: 'text/markdown',
|
|
709
709
|
pdf: 'application/pdf',
|
|
@@ -745,7 +745,7 @@ async function uploadAttachments(paths, apiBase, token) {
|
|
|
745
745
|
if (!info.isFile()) fail(`--attach ${path}: not a file`, EXIT.USAGE);
|
|
746
746
|
if (info.size < 1) fail(`--attach ${name}: file is empty`, EXIT.USAGE);
|
|
747
747
|
if (info.size > ATTACHMENT_MAX_BYTES) {
|
|
748
|
-
fail(`--attach ${name}: file exceeds the
|
|
748
|
+
fail(`--attach ${name}: file exceeds the 5 MiB limit`, EXIT.USAGE);
|
|
749
749
|
}
|
|
750
750
|
|
|
751
751
|
const body = new FormData();
|