Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ Use `:::note`, `:::tip`, `:::caution` and `:::danger` for callouts.

Keep internal details out of here: internal APIs, architecture and runbooks belong in the private `developer-handbook` repo.

## The list of plugins

[Supported APIs → All plugins](src/content/docs/supported-apis/plugins.md) is built from [`docs/plugins.md`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/docs/plugins.md) in the public `patch-it-plugins` repo, the one list of supported plugins. Don't edit the table on this site; change it there.

- `npm run build` first runs `scripts/sync-plugins.mjs` (npm's `prebuild`): it downloads that file from `main` (raw.githubusercontent.com, no token) and copies the table between `<!-- plugins:start -->` and `<!-- plugins:end -->` into the page, between the same markers.
- **Offline or GitHub down:** it prints a warning and keeps the committed table, so the build never fails on it.
- **Refresh the committed copy** with `npm run sync-plugins` and commit the page; a build that changed the table leaves it as a diff in your working tree.
- The site updates when it's rebuilt: a change merged in `patch-it-plugins` shows up on the next docs deploy.

## llms.txt

The build also writes `/llms.txt` (an index of the docs for AI tools, in the [llmstxt.org](https://llmstxt.org) format) and `/llms-full.txt` (the text of those pages in one file). Both are generated from the pages (`src/pages/llms*.txt.ts`, `src/llms.ts`):
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"private": true,
"scripts": {
"dev": "astro dev",
"sync-plugins": "node scripts/sync-plugins.mjs",
"prebuild": "node scripts/sync-plugins.mjs",
"build": "astro build",
"preview": "astro preview",
"start": "serve dist -l tcp://0.0.0.0:${PORT:-3000}",
Expand Down
60 changes: 60 additions & 0 deletions scripts/sync-plugins.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copies the list of supported plugins from patch-it-plugins into the "All plugins" page.
//
// The source of truth is docs/plugins.md on patch-it-plugins' main branch (a public repo, so no
// token). Its table sits between <!-- plugins:start --> and <!-- plugins:end -->; this script
// puts that table between the same markers in src/content/docs/supported-apis/plugins.md.
//
// Runs before every build (npm's "prebuild"). If GitHub can't be reached, or the file has no
// table, it leaves the committed page alone: that copy is the fallback, so the build never fails
// offline. Run `npm run sync-plugins` and commit the page to refresh the fallback.
import { readFileSync, writeFileSync } from 'node:fs';

// PLUGINS_LIST_URL overrides it, e.g. to preview a patch-it-plugins branch.
const SOURCE = process.env.PLUGINS_LIST_URL || 'https://raw.githubusercontent.com/patch-it-dev/patch-it-plugins/main/docs/plugins.md';
const PAGE = new URL('../src/content/docs/supported-apis/plugins.md', import.meta.url);
const START = '<!-- plugins:start -->';
const END = '<!-- plugins:end -->';

/** The table between the markers: only Markdown table rows, so nothing else can reach the page. */
export function extractTable(markdown) {
const start = markdown.indexOf(START);
const end = markdown.indexOf(END, start);
if (start < 0 || end < 0) return null;
const rows = markdown
.slice(start + START.length, end)
.split('\n')
.map((line) => line.trim())
.filter((line) => line.startsWith('|'));
// A header, the |---| line, and at least one plugin.
return rows.length >= 3 ? rows.join('\n') : null;
}

export function replaceTable(page, table) {
const start = page.indexOf(START);
const end = page.indexOf(END, start);
if (start < 0 || end < 0) throw new Error(`${PAGE.pathname} lost its ${START} / ${END} markers`);
return `${page.slice(0, start + START.length)}\n${table}\n${page.slice(end)}`;
}

async function main() {
let table = null;
try {
const res = await fetch(SOURCE, { signal: AbortSignal.timeout(10_000) });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
table = extractTable(await res.text());
if (!table) throw new Error('no plugin table between the markers');
} catch (err) {
console.warn(`sync-plugins: kept the committed plugin list (${SOURCE}: ${err.message})`);
return;
}
const page = readFileSync(PAGE, 'utf-8');
const next = replaceTable(page, table);
if (next === page) {
console.log('sync-plugins: plugin list is up to date');
return;
}
writeFileSync(PAGE, next);
console.log(`sync-plugins: updated the plugin list from ${SOURCE} (${table.split('\n').length - 2} plugins)`);
}

await main();
2 changes: 1 addition & 1 deletion src/content/docs/supported-apis/anthropic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Anthropic
description: How patch-it tracks Anthropic changes.
sidebar:
order: 4
order: 5
---

We read Anthropic's model deprecations page and SDK migration guides.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/supported-apis/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: OpenAI
description: How patch-it tracks OpenAI changes.
sidebar:
order: 3
order: 4
---

We read OpenAI's deprecations and migration pages.
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/supported-apis/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ sidebar:
| Runtimes | Building |
| CI platforms | Next |

Each source is one plugin. [All plugins](/supported-apis/plugins/) lists every one: what it watches and where it reads it.

## What counts as a change

| Type | Meaning |
Expand Down
29 changes: 29 additions & 0 deletions src/content/docs/supported-apis/plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: All plugins
description: Every source patch-it watches today, one plugin each, with what it reports and where it reads it.
sidebar:
order: 2
---

Every source patch-it watches is one plugin: it reads the provider's own page, spec or feed and turns each change into an event with a link and a quote. This is the full list. Plugins are open source in [patch-it-plugins](https://github.com/patch-it-dev/patch-it-plugins) (Apache-2.0), and this table is copied from its [`docs/plugins.md`](https://github.com/patch-it-dev/patch-it-plugins/blob/main/docs/plugins.md) whenever these docs are built.

<!-- plugins:start -->
| Plugin (`--api`) | Provider | What it watches | Format plugin | Source | Status |
|---|---|---|---|---|---|
| `stripe` | Stripe | REST API changes between OpenAPI spec releases (removed and renamed endpoints, parameters and fields), with migration hints from Stripe's API changelog | `openapi` | [stripe/openapi](https://github.com/stripe/openapi) | live |
| `datadog` | Datadog | API v2 changes between OpenAPI spec releases | `openapi` | [DataDog/datadog-api-client-python](https://github.com/DataDog/datadog-api-client-python) (`.generator/schemas/v2/openapi.yaml`) | live |
| `github` | GitHub | REST API changes between dated API versions | `openapi` | [github/rest-api-description](https://github.com/github/rest-api-description) | live |
| `gitlab` | GitLab | REST API changes between releases, request side only (what callers send) | `openapi` | [gitlab-org/gitlab `doc/api/openapi`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/api/openapi) | live |
| `openai-models` | OpenAI | Model deprecations and shutdown dates (Chat Completions and Responses text models) | `retirements` | [OpenAI deprecations](https://developers.openai.com/api/docs/deprecations) | live |
| `anthropic-models` | Anthropic | Model deprecations and retirement dates (Messages API models) | `retirements` | [Anthropic model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) | live |
| `anthropic` | Anthropic | Parameters removed from `messages.create()` and friends in the Python SDK 1.0 | `migrationguide` | [anthropic-sdk-python MIGRATION.md](https://github.com/anthropics/anthropic-sdk-python/blob/v1.0.0/MIGRATION.md) | live |
| `numpy` | NumPy | Members removed or renamed in the main namespace in NumPy 2.0 | `removedmembers` | [NumPy 2.0 migration guide](https://github.com/numpy/numpy/blob/v2.0.0/doc/source/numpy_2_0_migration_guide.rst) | live |
| `textual` | Textual | Removals and breaking changes in release 0.86.0 | `changelog` | [Textualize/textual CHANGELOG.md](https://github.com/Textualize/textual/blob/v0.86.0/CHANGELOG.md) | live |
| `urllib3` | urllib3 | Removals and deprecations in release 2.0.0 | `changelog` | [urllib3/urllib3 CHANGES.rst](https://github.com/urllib3/urllib3/blob/2.0.0/CHANGES.rst) | live |
| `github-actions` | GitHub | GitHub Actions retirements, such as runner images and the `runs-on` labels they remove | `feed` | [GitHub changelog, Actions label (RSS)](https://github.blog/changelog/label/actions/feed/) | live |
| `vertex-ai-models` | Google | Generative AI model deprecations on Vertex AI | `feed` | [Vertex AI generative AI release notes (Atom)](https://docs.cloud.google.com/feeds/generative-ai-on-vertex-ai-release-notes.xml) | live |
<!-- plugins:end -->

**Format plugin** is the shared reader a plugin is built on: `openapi` diffs a spec per release, `retirements` reads a deprecations page, `migrationguide` and `removedmembers` read migration guides, `changelog` reads a release changelog, `feed` reads an RSS or Atom feed. **Live** means it runs every day.

Missing a provider? [Request it](/supported-apis/request-an-api/), or [write the plugin](https://github.com/patch-it-dev/patch-it-plugins/blob/main/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion src/content/docs/supported-apis/request-an-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Request an API
description: Ask us to support a provider we don't cover yet.
sidebar:
order: 5
order: 6
---

Tell us which provider you need and why. We prioritize by requests.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/supported-apis/stripe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Stripe
description: How patch-it tracks Stripe API changes.
sidebar:
order: 2
order: 3
---

We compare Stripe's OpenAPI spec release to release and read Stripe's changelog.
Expand Down