@redpanda-data/docs-extensions-and-macros 4.15.6 → 4.15.8
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/bin/doc-tools.js +2 -0
- package/package.json +1 -1
- package/tools/redpanda-connect/AUTOMATION.md +834 -0
- package/tools/redpanda-connect/generate-rpcn-connector-docs.js +107 -1
- package/tools/redpanda-connect/github-release-utils.js +275 -0
- package/tools/redpanda-connect/helpers/bloblangExample.js +23 -3
- package/tools/redpanda-connect/helpers/buildConfigYaml.js +13 -8
- package/tools/redpanda-connect/helpers/ensurePeriod.js +27 -0
- package/tools/redpanda-connect/helpers/hasOptionalParams.js +7 -0
- package/tools/redpanda-connect/helpers/index.js +3 -0
- package/tools/redpanda-connect/helpers/toSentenceCase.js +69 -0
- package/tools/redpanda-connect/multi-version-summary.js +92 -0
- package/tools/redpanda-connect/parse-csv-connectors.js +1 -0
- package/tools/redpanda-connect/pr-summary-formatter.js +672 -25
- package/tools/redpanda-connect/report-delta.js +58 -2
- package/tools/redpanda-connect/rpcn-connector-docs-handler.js +462 -66
- package/tools/redpanda-connect/templates/bloblang-function.hbs +28 -2
- package/tools/redpanda-connect/templates/bloblang-functions-overview.hbs +29 -0
- package/tools/redpanda-connect/templates/bloblang-methods-overview.hbs +39 -0
- package/tools/redpanda-connect/templates/connector.hbs +2 -2
- package/tools/redpanda-connect/templates/intro.hbs +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Create a master diff JSON that aggregates changes across multiple releases
|
|
8
|
+
*
|
|
9
|
+
* @param {Array} intermediateResults - Array of {fromVersion, toVersion, diffPath, success}
|
|
10
|
+
* @param {string} finalDiffPath - Path to the final diff JSON
|
|
11
|
+
* @param {string} outputPath - Where to write the master diff
|
|
12
|
+
* @returns {Object} Master diff object
|
|
13
|
+
*/
|
|
14
|
+
function createMasterDiff(intermediateResults, finalDiffPath, outputPath) {
|
|
15
|
+
const releases = [];
|
|
16
|
+
|
|
17
|
+
// Add all intermediate releases
|
|
18
|
+
for (const result of intermediateResults) {
|
|
19
|
+
if (!result.success) continue;
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const diffData = JSON.parse(fs.readFileSync(result.diffPath, 'utf8'));
|
|
23
|
+
releases.push({
|
|
24
|
+
fromVersion: result.fromVersion,
|
|
25
|
+
toVersion: result.toVersion,
|
|
26
|
+
date: diffData.comparison?.timestamp || new Date().toISOString(),
|
|
27
|
+
summary: diffData.summary || {},
|
|
28
|
+
details: diffData.details || {},
|
|
29
|
+
binaryAnalysis: diffData.binaryAnalysis || null
|
|
30
|
+
});
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.warn(`Warning: Failed to load ${result.diffPath}: ${err.message}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Add the final release
|
|
37
|
+
if (finalDiffPath && fs.existsSync(finalDiffPath)) {
|
|
38
|
+
try {
|
|
39
|
+
const diffData = JSON.parse(fs.readFileSync(finalDiffPath, 'utf8'));
|
|
40
|
+
const finalFromVersion = diffData.comparison?.oldVersion;
|
|
41
|
+
const finalToVersion = diffData.comparison?.newVersion;
|
|
42
|
+
|
|
43
|
+
releases.push({
|
|
44
|
+
fromVersion: finalFromVersion,
|
|
45
|
+
toVersion: finalToVersion,
|
|
46
|
+
date: diffData.comparison?.timestamp || new Date().toISOString(),
|
|
47
|
+
summary: diffData.summary || {},
|
|
48
|
+
details: diffData.details || {},
|
|
49
|
+
binaryAnalysis: diffData.binaryAnalysis || null
|
|
50
|
+
});
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.warn(`Warning: Failed to load ${finalDiffPath}: ${err.message}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Calculate total summary across all releases
|
|
57
|
+
const totalSummary = {
|
|
58
|
+
versions: releases.map(r => r.toVersion),
|
|
59
|
+
releaseCount: releases.length,
|
|
60
|
+
newComponents: releases.reduce((sum, r) => sum + (r.summary.newComponents || 0), 0),
|
|
61
|
+
newFields: releases.reduce((sum, r) => sum + (r.summary.newFields || 0), 0),
|
|
62
|
+
removedComponents: releases.reduce((sum, r) => sum + (r.summary.removedComponents || 0), 0),
|
|
63
|
+
removedFields: releases.reduce((sum, r) => sum + (r.summary.removedFields || 0), 0),
|
|
64
|
+
deprecatedComponents: releases.reduce((sum, r) => sum + (r.summary.deprecatedComponents || 0), 0),
|
|
65
|
+
deprecatedFields: releases.reduce((sum, r) => sum + (r.summary.deprecatedFields || 0), 0),
|
|
66
|
+
changedDefaults: releases.reduce((sum, r) => sum + (r.summary.changedDefaults || 0), 0)
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const masterDiff = {
|
|
70
|
+
metadata: {
|
|
71
|
+
generatedAt: new Date().toISOString(),
|
|
72
|
+
startVersion: releases[0]?.fromVersion,
|
|
73
|
+
endVersion: releases[releases.length - 1]?.toVersion,
|
|
74
|
+
processedReleases: releases.length
|
|
75
|
+
},
|
|
76
|
+
totalSummary,
|
|
77
|
+
releases
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Write to file
|
|
81
|
+
if (outputPath) {
|
|
82
|
+
fs.writeFileSync(outputPath, JSON.stringify(masterDiff, null, 2), 'utf8');
|
|
83
|
+
console.log(`✓ Created master diff: ${path.basename(outputPath)}`);
|
|
84
|
+
console.log(` Spans ${releases.length} release(s): ${releases[0]?.fromVersion} → ${releases[releases.length - 1]?.toVersion}`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return masterDiff;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = {
|
|
91
|
+
createMasterDiff
|
|
92
|
+
};
|
|
@@ -48,6 +48,7 @@ async function parseCSVConnectors(localCsvPath, logger) {
|
|
|
48
48
|
return {
|
|
49
49
|
name: trimmed.name,
|
|
50
50
|
type: trimmed.type,
|
|
51
|
+
support: trimmed.support || 'community', // certified, community, enterprise
|
|
51
52
|
is_cloud_supported: (trimmed.cloud || '').toLowerCase() === 'y' ? 'y' : 'n'
|
|
52
53
|
};
|
|
53
54
|
})
|