selfping 1.1.0 → 1.1.1
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 -0
- package/cli.mjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,12 @@ Sign up at [selfping.com/login](https://www.selfping.com/login) with your phone
|
|
|
42
42
|
- A text when someone signs up, pays, or fills out your contact form
|
|
43
43
|
- A text from your AI agent when it finishes a long run or needs a decision
|
|
44
44
|
|
|
45
|
+
## Runnable examples
|
|
46
|
+
|
|
47
|
+
[SelfPing examples](https://github.com/br-schneider/selfping-examples) includes Python failure alerts, GitHub Actions deployment notifications, and app notifications. Examples use dry runs by default.
|
|
48
|
+
|
|
49
|
+
Guides: [Python and cron](https://www.selfping.com/recipes/python-cron-alert), [deployment failures](https://www.selfping.com/recipes/deploy-failure), [new subscriptions](https://www.selfping.com/recipes/paid-customer), and [agent questions by SMS](https://www.selfping.com/recipes/agent-decisions).
|
|
50
|
+
|
|
45
51
|
## Errors
|
|
46
52
|
|
|
47
53
|
`sendPing` resolves on success and throws `SelfPingError` otherwise. The `status` property carries the HTTP status and the message says what went wrong in plain language: bad key, out of texts for the month, or the text could not be delivered.
|
package/cli.mjs
CHANGED
|
@@ -137,7 +137,8 @@ async function login(io) {
|
|
|
137
137
|
const path = credentialsPath(io.env);
|
|
138
138
|
await mkdir(join(path, ".."), { recursive: true, mode: 0o700 });
|
|
139
139
|
await writeFile(path, `${key}\n`, { mode: 0o600 });
|
|
140
|
-
io.
|
|
140
|
+
const command = io.env.npm_command === "exec" ? "npx selfping" : "selfping";
|
|
141
|
+
io.stdout.write(`Saved to ${path}. Try it: ${command} "Hello from my terminal"\n`);
|
|
141
142
|
if (io.env.SELFPING_API_KEY) {
|
|
142
143
|
io.stdout.write("Note: SELFPING_API_KEY is set in this shell and takes priority over the saved key.\n");
|
|
143
144
|
}
|