@redpanda-data/docs-extensions-and-macros 5.47.2 → 5.48.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
|
@@ -1249,7 +1249,21 @@ DOCS=../docs # path to your docs repo checkout
|
|
|
1249
1249
|
git -C "$DOCS" show origin/main:docs-data/property-overrides.json \
|
|
1250
1250
|
> __tests__/docs-data/property-overrides.json
|
|
1251
1251
|
|
|
1252
|
-
|
|
1252
|
+
# docs' own regen renames this file forward on every release (see
|
|
1253
|
+
# property-corpus-drift.sh's header), so there is no fixed filename to
|
|
1254
|
+
# git-show -- a tag pinned here today 404s the moment docs regenerates again.
|
|
1255
|
+
# Discover the tag docs main is actually on: the highest version among
|
|
1256
|
+
# whatever is currently in modules/reference/attachments/. An old RC/beta
|
|
1257
|
+
# cycle's last file, if one is still sitting there, sorts lower and is
|
|
1258
|
+
# skipped -- see the property-extractor helpers for why more than one file
|
|
1259
|
+
# can exist at once.
|
|
1260
|
+
TAG="$(git -C "$DOCS" ls-tree origin/main --name-only -- modules/reference/attachments/ \
|
|
1261
|
+
| grep -oE 'redpanda-properties-(v[0-9]+\.[0-9]+\.[0-9]+[^.]*)\.json' \
|
|
1262
|
+
| sed -E 's/redpanda-properties-(.*)\.json/\1/' \
|
|
1263
|
+
| sort -V | tail -1)"
|
|
1264
|
+
echo "Refreshing against $TAG"
|
|
1265
|
+
|
|
1266
|
+
git -C "$DOCS" show "origin/main:modules/reference/attachments/redpanda-properties-${TAG}.json" \
|
|
1253
1267
|
| node -e '
|
|
1254
1268
|
const fs = require("fs");
|
|
1255
1269
|
const src = JSON.parse(fs.readFileSync(0, "utf8"));
|
|
@@ -1261,8 +1275,9 @@ git -C "$DOCS" show origin/main:modules/reference/attachments/redpanda-propertie
|
|
|
1261
1275
|
}
|
|
1262
1276
|
const out = JSON.parse(fs.readFileSync("__tests__/docs-data/property-snapshot.json", "utf8"));
|
|
1263
1277
|
out.properties = properties;
|
|
1264
|
-
|
|
1265
|
-
|
|
1278
|
+
out.source_tag = process.argv[1];
|
|
1279
|
+
fs.writeFileSync("__tests__/docs-data/property-snapshot.json", JSON.stringify(out, null, 1) + "\n");
|
|
1280
|
+
' "$TAG"
|
|
1266
1281
|
----
|
|
1267
1282
|
|
|
1268
1283
|
The `docs` repo fails its own CI when the overrides mirror drifts, following the
|
|
@@ -177,7 +177,9 @@ function renderStub({ title, file, description, includePrefix, attributes, hasMe
|
|
|
177
177
|
* @param {string} params.navFile - Consumer nav.adoc path
|
|
178
178
|
* @param {string} params.plugin - Plugin command name (e.g. ai)
|
|
179
179
|
* @param {string} params.includePrefix - Antora resource prefix for includes
|
|
180
|
-
* @param {Array<string>} [params.attributes] - Page attributes for new stubs
|
|
180
|
+
* @param {Array<string>} [params.attributes] - Page attributes for new stubs.
|
|
181
|
+
* Defaults to none: a page's maturity is a documentation-team decision, so
|
|
182
|
+
* a consumer that wants a label on new stubs passes it with --attribute.
|
|
181
183
|
* @param {boolean} [params.dryRun]
|
|
182
184
|
* @returns {Object} { created, deleted, keptNonStub, navUpdated, renameCandidates }
|
|
183
185
|
*/
|
|
@@ -187,7 +189,7 @@ function reconcileStubs({
|
|
|
187
189
|
navFile,
|
|
188
190
|
plugin,
|
|
189
191
|
includePrefix,
|
|
190
|
-
attributes = [
|
|
192
|
+
attributes = [],
|
|
191
193
|
dryRun = false
|
|
192
194
|
}) {
|
|
193
195
|
const managedStubRe = new RegExp(`include::[^\\[]*(?:partial|page)\\$[^\\[]*rpk-${plugin}/([\\w.-]+\\.adoc)\\[`)
|