@statocysts/cli 0.2.2 → 0.3.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 +5 -5
- package/dist/cli.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,31 +39,31 @@ The message content is determined in the following order:
|
|
|
39
39
|
### Send to a single URL
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
stato -u "slack://webhook/xxx/yyy/zzz" -m "Hello World"
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Send to multiple URLs
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
48
|
+
stato -u "slack://webhook/xxx/yyy/zzz" -u "json://example.com/api/notify" -m "Hello World"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Read message from file
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
54
|
+
stato -u "slack://webhook/xxx/yyy/zzz" -f message.txt
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Read message from stdin
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
echo "Hello World" |
|
|
60
|
+
echo "Hello World" | stato -u "slack://webhook/xxx/yyy/zzz"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### Use with pipeline
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
cat deployment.log |
|
|
66
|
+
cat deployment.log | stato -u "slack://webhook/xxx/yyy/zzz"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Supported Services
|
package/dist/cli.mjs
CHANGED
|
@@ -63,7 +63,7 @@ async function sendNotifications(urls, message) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
async function main() {
|
|
66
|
-
const argv = await yargs(hideBin(process.argv)).scriptName("
|
|
66
|
+
const argv = await yargs(hideBin(process.argv)).scriptName("stato").usage("$0 -u <url> [-m <message> | -f <file>]").option("url", {
|
|
67
67
|
alias: "u",
|
|
68
68
|
type: "string",
|
|
69
69
|
array: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statocysts/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "CLI for statocysts notification library",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/octoplorer/statocysts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"yargs": "^18.0.0",
|
|
34
|
-
"statocysts": "0.
|
|
34
|
+
"statocysts": "0.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22.0.0",
|