@greatwait/cli 0.1.0-alpha.8 → 0.2.0
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 +48 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@ against a receiver you control.
|
|
|
6
6
|
```sh
|
|
7
7
|
npm install --global @greatwait/cli
|
|
8
8
|
greatwait login --api-url https://api.greatwait.dev
|
|
9
|
-
greatwait journey
|
|
10
9
|
```
|
|
11
10
|
|
|
12
11
|
## What it is
|
|
@@ -44,18 +43,59 @@ directory, readable by you and nobody else. A staging credential is never
|
|
|
44
43
|
presented to production, because the two are separate entries rather than one
|
|
45
44
|
current context.
|
|
46
45
|
|
|
47
|
-
## First
|
|
46
|
+
## First callback
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
Use a public HTTPS receiver you control. Once signed in, schedule directly to
|
|
49
|
+
its URL and wait for the first delivery:
|
|
51
50
|
|
|
52
51
|
```sh
|
|
53
|
-
greatwait
|
|
54
|
-
greatwait schedules create --endpoint ep_… --in 30s --data '{"greeting":"first value"}'
|
|
55
|
-
greatwait occurrences wait sch_… occ_…
|
|
56
|
-
greatwait attempts list sch_… occ_…
|
|
52
|
+
greatwait schedules create --url https://your-receiver.example.com/greatwait --in 30s --data '{"hello":"world"}' --wait
|
|
57
53
|
```
|
|
58
54
|
|
|
55
|
+
GreatWait uses your project's destination at that URL or creates one. The
|
|
56
|
+
answer includes the schedule and occurrence ids; copy them into the read:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
greatwait attempts list <schedule> <occurrence>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Look for `state: succeeded` and the status your receiver returned. `--wait`
|
|
63
|
+
stops after three minutes by default; a settled failure is also an outcome,
|
|
64
|
+
so inspect the attempt. If it times out, use
|
|
65
|
+
`greatwait occurrences wait <schedule> <occurrence>` and read the attempts
|
|
66
|
+
again. The timeout does not cancel the scheduled call.
|
|
67
|
+
|
|
68
|
+
For a signed receiver, first add your URL in
|
|
69
|
+
[Settings → Endpoints](https://app.greatwait.dev/settings/endpoints), reveal its
|
|
70
|
+
signing secret, and configure the receiver. The direct-URL schedule reuses that
|
|
71
|
+
destination. If the schedule already created it, reveal the secret and configure
|
|
72
|
+
the receiver before its due time; use a longer `--in` if needed. Direct-URL
|
|
73
|
+
scheduling never prints the signing secret. Verify the signature over the exact request bytes
|
|
74
|
+
before parsing, as described in the
|
|
75
|
+
[CLI quickstart](https://docs.greatwait.dev/guides/cli).
|
|
76
|
+
|
|
77
|
+
## Clean up
|
|
78
|
+
|
|
79
|
+
Archive the finished schedule. Read it to find its destination id:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
greatwait schedules read <schedule>
|
|
83
|
+
greatwait schedules archive <schedule>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
If this walkthrough created the destination and no other schedule uses it,
|
|
87
|
+
disable it:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
greatwait destinations disable <destination> --yes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If you stop before delivery, cancel the schedule with
|
|
94
|
+
`greatwait schedules cancel <schedule> --yes` first. Revoke a walkthrough API
|
|
95
|
+
key in the dashboard, or use `greatwait credentials revoke <credential> --yes`
|
|
96
|
+
while signed in through OAuth. Finish with `greatwait logout` to revoke the CLI
|
|
97
|
+
grant and remove local credentials.
|
|
98
|
+
|
|
59
99
|
## Output and exit codes
|
|
60
100
|
|
|
61
101
|
`--json` is a versioned machine shape, not a serialization of the human text.
|
package/package.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"url": "https://github.com/flowxo/greatwait/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@greatwait/api-client": "0.
|
|
11
|
-
"@greatwait/contracts": "0.
|
|
10
|
+
"@greatwait/api-client": "0.2.0",
|
|
11
|
+
"@greatwait/contracts": "0.2.0"
|
|
12
12
|
},
|
|
13
|
-
"description": "The GreatWait command line: sign in,
|
|
13
|
+
"description": "The GreatWait command line: sign in, schedule a call to a URL, and read its delivery outcome over the public API.",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=22.13.0"
|
|
16
16
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"type": "module",
|
|
51
|
-
"version": "0.
|
|
51
|
+
"version": "0.2.0"
|
|
52
52
|
}
|