Two related fixes to make the version cut self-contained and to clean
up after itself.
1. addVersion now runs `generate:smart` before snapshotting, so the
versioned copy captures fresh database pages (from engine spec
metadata), API reference (from openapi.json), and component pages
(from Storybook stories) rather than whatever happened to be on
disk. Added a --skip-generate flag for canonical release cuts where
the operator has placed the `database-diagnostics` artifact from a
green Python-Integration CI run at docs/src/data/databases.json and
wants to preserve the full Flask-context diagnostics rather than
regenerate locally.
2. removeVersion previously left an empty `<section>_versions.json`
file (`[]`) on disk when removing the last version. Docusaurus
would then snapshot that empty file back into content directories
on the next cut. (This is how the orphan files this PR already
cleans up — docs/components/versions.json and
docs/developer_docs/versions.json — got accidentally tracked.) The
remove path now deletes the file when it becomes empty.
Documented the cut prerequisites in docs/README.md ("Before You Cut")
and docs/DOCS_CLAUDE.md.
Tooling-only prep for the upcoming docs version cut. Snapshots will land
in a follow-up PR.
- Finish the developer_portal -> developer_docs rename: update package.json
scripts, manage-versions.mjs usage strings, DocVersionBadge plugin id list
(replaces bogus 'tutorials' and 'developer_portal' ids with the real
'default', 'components', 'admin_docs', 'developer_docs'), DocVersionBanner
dead branch, DOCS_CLAUDE.md, README.md
- Add admin_docs version add/remove scripts (which previously didn't exist)
- Generalize fixVersionedImports in manage-versions.mjs to walk every
section's snapshot dir with a depth-aware regex, and skip fenced code
blocks; replaces the previous hard-coded two-file list
- Remove orphan files: developer_portal_versions.json, tutorials_versions.json
(no such plugin), and the empty docs/components/versions.json and
docs/developer_docs/versions.json that were accidentally tracked inside
content directories
- Exclude auto-generated sidebar.js and sidebar.ts from the ASF license check
(these are produced by docs/scripts/convert-api-sidebar.mjs from the
OpenAPI spec, and a future version cut would otherwise commit them)