@buildinternet/releases-skills 0.64.0 → 0.66.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/package.json
CHANGED
|
@@ -43,9 +43,11 @@ Two commands built for agents specifically:
|
|
|
43
43
|
### Conventions worth knowing (all in the reader reference)
|
|
44
44
|
|
|
45
45
|
- **IDs and slugs are interchangeable** wherever an identifier is expected (`org_…`, `prod_…`, `src_…`, `rel_…`); IDs are stable across renames. Source/product commands also take an `org/slug` coordinate (e.g. `vercel/vercel-ai-sdk`), which skips a resolver round-trip.
|
|
46
|
-
- **`--json` everywhere** for stable output. Release readers (`get`, `search`, `tail`) return a **slim** shape by default (core fields + markdown-stripped `excerpt` + `contentTokens` hint, plus `media[]` with R2 `r2Url` when present and a `contentTruncated` flag) to save tokens; pass `--full` for the complete payload. (`list` is the inverse: verbose by default — and carries a per-source `Releases` count column — `--compact` for less.)
|
|
46
|
+
- **`--json` everywhere** for stable output. Release readers (`get`, `search`, `tail`) return a **slim** shape by default (core fields + markdown-stripped `excerpt` + `contentTokens` hint, plus `media[]` with R2 `r2Url` when present and a `contentTruncated` flag) to save tokens; pass `--full` for the complete payload. (`list` is the inverse: verbose by default — and carries a per-source `Releases` count column — `--compact` for less.) Narrow further with **`--fields id,version,source.slug`** (comma-separated, dot-notation for nested keys) to project the JSON down to just the leaves you need — on `get`/`search`/`tail`, composes with `--full`.
|
|
47
47
|
- **`tail`/`latest` row cap:** `--count` (alias `--limit`, clamped `1–100`) sets how many releases to return. Only the `--product` feed is cursor-paginated (`--cursor <token>`); the org-wide/global feeds are count-capped, so `--cursor` without `--product` errors.
|
|
48
|
+
- **`--page-all` for the whole list at once:** on the page-based list readers (`list`, `org list`, `admin product list`), `--json --page-all` walks every page and streams one item per line as NDJSON, so you don't have to loop `--page`/`--limit` or react to the truncation warning. Pipe it to `jq -c` or a stream parser. It's `--json`-only and can't be combined with `--page`.
|
|
48
49
|
- **Piped output is bare TSV** (no headers/color/truncation), so `releases list | cut -f2` works without parsing ANSI — but note release rows repeat the title across several columns, so check the layout or just use `--json` before slicing by column number. `COLUMNS=<n>` overrides detected width.
|
|
50
|
+
- **Errors are structured under `--json`.** When a command run with `--json` fails, it prints a parseable `{ "error": { "kind", "message", "status?", "method?", "path?", "field?" } }` to stdout (not a stderr text dump) and exits non-zero — so you can branch on `kind` (`"api"` / `"invalid_input"` / `"error"`) instead of string-matching. Identifiers are also validated before any request: control characters, `..` traversal, `%`/`?`/`#`, and whitespace are rejected with an `invalid_input` error.
|
|
49
51
|
|
|
50
52
|
### Reading a tracked changelog
|
|
51
53
|
|
|
@@ -66,6 +66,16 @@ Mark the org's primary changelog in one step with `--primary` (sets `isPrimary`
|
|
|
66
66
|
releases admin source create "Vitest" --url https://github.com/vitest-dev/vitest --org vitest --primary
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
#### Raw JSON payload (`--input`)
|
|
70
|
+
|
|
71
|
+
Instead of reverse-mapping a payload onto individual flags, send one source as a JSON body with `--input`. The body mirrors the `--batch` element shape (`name`, `url`, `type`, `slug`, `org`, `product`, `feedUrl`, `keywordAllow`, `metadataSet`, `primary`) and runs the same dedup / metadata-packing / validation as the flag path — it is **not** forwarded raw to the API. Pass a literal JSON string, `@<path>` for a file, or `-` for stdin; `--strict`/`--dry-run`/`--json` still apply. Mutually exclusive with `--batch` (use `--batch` for an array).
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
releases admin source create --input '{"name":"Astro","url":"https://astro.build/blog","type":"scrape"}'
|
|
75
|
+
releases admin source create --input @source.json
|
|
76
|
+
echo '{"name":"Astro","url":"https://astro.build/blog"}' | releases admin source create --input -
|
|
77
|
+
```
|
|
78
|
+
|
|
69
79
|
Evaluate without adding:
|
|
70
80
|
|
|
71
81
|
```bash
|
|
@@ -125,6 +135,13 @@ releases admin source update my-blog --slug new-slug --confirm-slug-change
|
|
|
125
135
|
|
|
126
136
|
Slug renames require `--confirm-slug-change` because they break existing web links.
|
|
127
137
|
|
|
138
|
+
Send a batch of field updates as one JSON body with `--input` instead of stacking flags. Keys mirror the flags (`name`, `url`, `type`, `org`, `product`, `kind`, `priority`, `discovery`, `primary`, …); a nested `metadata` object sets source-metadata keys directly (a `null` value deletes a key — the ergonomic equivalent of repeated `--metadata-set`/`--metadata-unset`). Accepts a literal JSON string, `@<path>`, or `-` for stdin. The body wins over any flags; `--json`/`--dry-run` still apply.
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
releases admin source update src_abc123 --input '{"kind":"sdk","priority":"low","metadata":{"crawlEnabled":true}}'
|
|
142
|
+
releases admin source update src_abc123 --input @patch.json
|
|
143
|
+
```
|
|
144
|
+
|
|
128
145
|
`--kind` sets the source's taxonomy. In **release feeds** and **search release hits**, a source with no kind of its own inherits its parent product's kind — so filtering by `kind=sdk` returns content from any source that's either marked SDK or sits under an SDK product. In **catalog listings** and **source lists** (`releases list`, `admin product list`, `search` catalog hits), the filter matches the row's *own* kind field directly with no inheritance — so the same `kind=sdk` filter only returns rows explicitly classified as SDK.
|
|
129
146
|
|
|
130
147
|
### Fetch
|
|
@@ -75,10 +75,13 @@ releases list --kind sdk # filter by taxonomy (platform|sdk|mobile
|
|
|
75
75
|
releases list --json # machine-readable output
|
|
76
76
|
releases list --json --compact # lightweight JSON (id, slug, name, type, org, date)
|
|
77
77
|
releases list --json --limit 20 --page 2 # pagination (server-side)
|
|
78
|
+
releases list --json --page-all # stream every page as NDJSON (one source per line)
|
|
78
79
|
```
|
|
79
80
|
|
|
80
81
|
The text table carries a per-source **`Releases`** count column (a dim `—` when unknown), so you can answer "how many releases does this source have?" without a follow-up call; the `--json` rows expose the same value as `releaseCount`.
|
|
81
82
|
|
|
83
|
+
`--page-all` walks every page for you and streams the result as newline-delimited JSON — one source per line — so you can grab the full list in one command instead of looping `--page`. It's `--json`-only (warns and falls through to the table otherwise) and can't be combined with `--page`; `--limit` still tunes the per-request page size. The same flag is on `releases org list` and `releases admin product list`. Pipe it straight to `jq -c` or any stream parser.
|
|
84
|
+
|
|
82
85
|
Aliased as `releases admin source list` for discoverability within admin workflows.
|
|
83
86
|
|
|
84
87
|
## Get any entity
|