@redpanda-data/docs-extensions-and-macros 4.6.3 → 4.6.4

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.
Files changed (2) hide show
  1. package/bin/doc-tools.js +14 -7
  2. package/package.json +1 -1
package/bin/doc-tools.js CHANGED
@@ -485,7 +485,16 @@ automation
485
485
  .option('--template-examples <path>', 'Examples section partial template', path.resolve(__dirname, '../tools/redpanda-connect/templates/examples-partials.hbs'))
486
486
  .option('--overrides <path>', 'Optional JSON file with overrides')
487
487
  .action(async (options) => {
488
- let success = true;
488
+ requireTool('rpk', {
489
+ versionFlag: '--version',
490
+ help: 'rpk is not installed. Install rpk: https://docs.redpanda.com/current/get-started/rpk-install/'
491
+ });
492
+
493
+ requireTool('rpk connect', {
494
+ versionFlag: '--version',
495
+ help: 'rpk connect is not installed. Run rpk connect install before continuing.'
496
+ });
497
+
489
498
  const dataDir = path.resolve(process.cwd(), options.dataDir);
490
499
  fs.mkdirSync(dataDir, { recursive: true });
491
500
 
@@ -495,7 +504,6 @@ automation
495
504
  let dataFile;
496
505
  if (options.fetchConnectors) {
497
506
  try {
498
- execSync('rpk --version', { stdio: 'ignore' });
499
507
  newVersion = getRpkConnectVersion();
500
508
  const tmpFile = path.join(dataDir, `connect-${newVersion}.tmp.json`);
501
509
  const finalFile = path.join(dataDir, `connect-${newVersion}.json`);
@@ -512,7 +520,7 @@ automation
512
520
  console.log(`✅ Fetched and saved: ${finalFile}`);
513
521
  } catch (err) {
514
522
  console.error(`❌ Failed to fetch connectors: ${err.message}`);
515
- success = false;
523
+ process.exit(1);
516
524
  }
517
525
  } else {
518
526
  const candidates = fs.readdirSync(dataDir).filter(f => /^connect-\d+\.\d+\.\d+\.json$/.test(f));
@@ -542,7 +550,7 @@ automation
542
550
  partialFiles = result.partialFiles;
543
551
  } catch (err) {
544
552
  console.error(`❌ Failed to generate partials: ${err.message}`);
545
- success = false;
553
+ process.exit(1);
546
554
  }
547
555
 
548
556
  if (options.draftMissing) {
@@ -613,7 +621,7 @@ automation
613
621
  }
614
622
  } catch (err) {
615
623
  console.error(`❌ Could not draft missing: ${err.message}`);
616
- success = false;
624
+ process.exit(1);
617
625
  }
618
626
  }
619
627
 
@@ -667,8 +675,7 @@ automation
667
675
  console.log('\n📄 Summary:');
668
676
  console.log(` • Run time: ${timestamp}`);
669
677
  console.log(` • Version used: ${newVersion}`);
670
-
671
- process.exit(success ? 0 : 1);
678
+ process.exit(0);
672
679
  });
673
680
 
674
681
  automation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "4.6.3",
3
+ "version": "4.6.4",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",