@redpanda-data/docs-extensions-and-macros 5.2.0 → 5.2.1
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
|
@@ -1692,13 +1692,18 @@ function formatExamples(text) {
|
|
|
1692
1692
|
i++
|
|
1693
1693
|
} else if (isIndented) {
|
|
1694
1694
|
// Command line — collect all consecutive command lines into one code block
|
|
1695
|
-
// (stops at a blank line or a comment line)
|
|
1696
|
-
|
|
1697
|
-
|
|
1695
|
+
// (stops at a blank line or a comment line). Dedent by the run's minimum
|
|
1696
|
+
// indent rather than trimming each line, so multi-line commands with
|
|
1697
|
+
// backslash continuations keep their relative indentation.
|
|
1698
|
+
const run = []
|
|
1698
1699
|
while (i < lines.length && /^\s{2,}\S/.test(lines[i]) && !lines[i].trim().startsWith('#')) {
|
|
1699
|
-
|
|
1700
|
+
run.push(lines[i])
|
|
1700
1701
|
i++
|
|
1701
1702
|
}
|
|
1703
|
+
const minIndent = Math.min(...run.map(l => l.match(/^\s*/)[0].length))
|
|
1704
|
+
result.push('[,bash]')
|
|
1705
|
+
result.push('----')
|
|
1706
|
+
run.forEach(l => result.push(l.slice(minIndent)))
|
|
1702
1707
|
result.push('----')
|
|
1703
1708
|
} else if (/^\s*`rpk .+`\s*$/.test(line)) {
|
|
1704
1709
|
// Inline backticked command on its own line - convert to code block
|
|
@@ -14,7 +14,7 @@ const { validateDirectory, formatResults } = require('./validate-output')
|
|
|
14
14
|
/**
|
|
15
15
|
* Known rpk plugins that are managed separately (have install/uninstall commands)
|
|
16
16
|
*/
|
|
17
|
-
const KNOWN_PLUGINS = ['ai', 'check', 'connect', 'oxla']
|
|
17
|
+
const KNOWN_PLUGINS = ['ai', 'check', 'connect', 'k8s', 'oxla']
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Parse Go version from 'go version' output
|
|
@@ -497,6 +497,13 @@ function fetchRpkTreeFromLinuxSource(sourcePath) {
|
|
|
497
497
|
} else if (stderr.includes('unknown command') || stderr.includes('Error: unknown command')) {
|
|
498
498
|
console.log(` - ${plugin} is not an installable plugin`)
|
|
499
499
|
} else {
|
|
500
|
+
// A failed install is non-fatal: generation continues, but this
|
|
501
|
+
// plugin's commands will be absent from the tree. Expected for `k8s`
|
|
502
|
+
// during the 26.2 beta window — `rpk k8s install` finds no `latest`
|
|
503
|
+
// release because the plugin publisher's stableVersionRe only promotes
|
|
504
|
+
// pure X.Y.Z versions, so k8s commands only appear at GA. A pre-GA
|
|
505
|
+
// regen that omits `rpk k8s` pages is this, not a generator bug.
|
|
506
|
+
// See redpanda-data/docs#1801.
|
|
500
507
|
console.warn(` ✗ Failed to install ${plugin}: ${stderr || stdout}`)
|
|
501
508
|
}
|
|
502
509
|
}
|