coss-cli 0.1.0 → 0.1.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 CHANGED
@@ -18,13 +18,15 @@ Published from [cosscom/coss](https://github.com/cosscom/coss) by CI, with
18
18
  | Command | |
19
19
  | --- | --- |
20
20
  | `coss login` | Opens the dashboard, where you pick an environment; the CLI gets a new API key of it. `--manual` pastes an existing key instead; `--no-browser` (the default over SSH) shows a link and asks for the code it displays. |
21
- | `coss logout` | Removes the saved key, and revokes it if `coss login` created it (`--revoke` revokes a pasted one too). |
21
+ | `coss logout` | Removes the saved key, and revokes it if `coss login` created it (`--revoke` revokes a pasted one too; `--all` signs every profile out). |
22
22
  | `coss whoami` | The key in use, where it comes from, and its organization, project and environment. |
23
- | `coss emails send` | A test email: `--to`, or `--simulate delivered\|bounced\|complained\|suppressed` for the mailbox simulator; `--template` with `--var name=value`; `--wait` follows it to its outcome. |
24
- | `coss logs tail` | New lines of the environment's log as they arrive: API requests, email events, webhook attempts. Filter with `--source`, `--level`, `--type`, `--status`, `-q`; `--since 15m` starts earlier. |
25
- | `coss listen` | Receives the environment's webhook events and forwards each one to `--forward-to`, signed like coss.com signs real deliveries. Verify them with `verifyWebhook` from the `coss` SDK and the signing secret it prints (it stays the same for the profile). |
23
+ | `coss emails send` | A test email: `--to`, or `--simulate delivered\|bounced\|complained\|suppressed` for the mailbox simulator; `--template` with `--var name=value`; `--wait` follows it to its outcome (up to `--timeout`, 60 s). |
24
+ | `coss logs tail` | New lines of the environment's log as they arrive: API requests, email events, webhook attempts. Filter with `--source`, `--level`, `--type`, `--status`, `-q`; `--since 15m` starts earlier; `--interval` sets the poll interval (2000 ms). |
25
+ | `coss listen` | Receives the environment's webhook events and forwards each one to `--forward-to`, signed like coss.com signs real deliveries. Verify them with `verifyWebhook` from the `coss` SDK and the signing secret it prints (it stays the same for the profile). `--header "Name: value"` adds a header to forwarded requests. |
26
26
 
27
- Every command takes `--json` (one JSON object per line), `--profile <name>` and `--help`.
27
+ Every command takes `--json` (one JSON object per line), `--profile <name>` and `--help`; `coss --version`
28
+ prints the CLI's. Results go to stdout, progress to stderr. Exit codes: `0` done, `1` failed, `2` wrong usage,
29
+ `130` stopped with Ctrl-C.
28
30
 
29
31
  ## Configuration
30
32
 
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as nodeIo, n as run } from "./run-DiBz6lcE.js";
2
+ import { c as nodeIo, n as run } from "./run-DLJAwv7I.js";
3
3
  //#region src/cli.ts
4
4
  /** Resolves once everything written to `stream` so far has reached the OS (pipes are async). */
5
5
  function flushed(stream) {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { t as HELP, r as VERSION, s as defaultConfigDir, i as generateSecret, c as nodeIo, n as run, a as sign, o as signatureHeaders } from "./run-DiBz6lcE.js";
1
+ export { t as HELP, r as VERSION, s as defaultConfigDir, i as generateSecret, c as nodeIo, n as run, a as sign, o as signatureHeaders } from "./run-DLJAwv7I.js";
@@ -660,7 +660,7 @@ async function emailsSend(argv, io) {
660
660
  //#endregion
661
661
  //#region src/version.ts
662
662
  /** The package version (`coss --version`, the forwarded requests' user agent). */
663
- const VERSION = "0.1.0";
663
+ const VERSION = "0.1.2";
664
664
  //#endregion
665
665
  //#region src/listen/forward.ts
666
666
  /** Posting an event to the local URL, as coss.com would post it to an endpoint. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coss-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "The coss.com command line: sign in, send test emails, tail your environment's log, and forward webhook events to localhost with `coss listen`.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://coss.com/docs/cli",
@@ -41,7 +41,7 @@
41
41
  "test": "bun test"
42
42
  },
43
43
  "dependencies": {
44
- "coss": "^0.4.0"
44
+ "coss": "^0.6.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@arethetypeswrong/core": "0.18.5",