@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
|
@@ -163,6 +163,50 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
|
|
|
163
163
|
});
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
+
// Detect new/removed Bloblang methods and functions
|
|
167
|
+
const oldMethods = new Set((oldIndex['bloblang-methods'] || []).filter(Boolean).map(m => m.name).filter(Boolean));
|
|
168
|
+
const newMethods = new Set((newIndex['bloblang-methods'] || []).filter(Boolean).map(m => m.name).filter(Boolean));
|
|
169
|
+
const oldFunctions = new Set((oldIndex['bloblang-functions'] || []).filter(Boolean).map(f => f.name).filter(Boolean));
|
|
170
|
+
const newFunctions = new Set((newIndex['bloblang-functions'] || []).filter(Boolean).map(f => f.name).filter(Boolean));
|
|
171
|
+
|
|
172
|
+
const newBloblangMethods = Array.from(newMethods).filter(m => !oldMethods.has(m)).sort();
|
|
173
|
+
const removedBloblangMethods = Array.from(oldMethods).filter(m => !newMethods.has(m)).sort();
|
|
174
|
+
const newBloblangFunctions = Array.from(newFunctions).filter(f => !oldFunctions.has(f)).sort();
|
|
175
|
+
const removedBloblangFunctions = Array.from(oldFunctions).filter(f => !newFunctions.has(f)).sort();
|
|
176
|
+
|
|
177
|
+
// Detect deprecated Bloblang methods and functions
|
|
178
|
+
const deprecatedBloblangMethods = [];
|
|
179
|
+
const deprecatedBloblangFunctions = [];
|
|
180
|
+
|
|
181
|
+
const oldMethodsMap = new Map((oldIndex['bloblang-methods'] || []).filter(Boolean).filter(m => m.name).map(m => [m.name, m]));
|
|
182
|
+
const newMethodsMap = new Map((newIndex['bloblang-methods'] || []).filter(Boolean).filter(m => m.name).map(m => [m.name, m]));
|
|
183
|
+
const oldFunctionsMap = new Map((oldIndex['bloblang-functions'] || []).filter(Boolean).filter(f => f.name).map(f => [f.name, f]));
|
|
184
|
+
const newFunctionsMap = new Map((newIndex['bloblang-functions'] || []).filter(Boolean).filter(f => f.name).map(f => [f.name, f]));
|
|
185
|
+
|
|
186
|
+
// Check methods for newly deprecated status
|
|
187
|
+
newMethodsMap.forEach((newMethod, name) => {
|
|
188
|
+
const oldMethod = oldMethodsMap.get(name);
|
|
189
|
+
if (oldMethod) {
|
|
190
|
+
const oldStatus = (oldMethod.status || '').toLowerCase();
|
|
191
|
+
const newStatus = (newMethod.status || '').toLowerCase();
|
|
192
|
+
if (oldStatus !== 'deprecated' && newStatus === 'deprecated') {
|
|
193
|
+
deprecatedBloblangMethods.push(name);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// Check functions for newly deprecated status
|
|
199
|
+
newFunctionsMap.forEach((newFunction, name) => {
|
|
200
|
+
const oldFunction = oldFunctionsMap.get(name);
|
|
201
|
+
if (oldFunction) {
|
|
202
|
+
const oldStatus = (oldFunction.status || '').toLowerCase();
|
|
203
|
+
const newStatus = (newFunction.status || '').toLowerCase();
|
|
204
|
+
if (oldStatus !== 'deprecated' && newStatus === 'deprecated') {
|
|
205
|
+
deprecatedBloblangFunctions.push(name);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
166
210
|
const result = {
|
|
167
211
|
comparison: {
|
|
168
212
|
oldVersion: opts.oldVersion || '',
|
|
@@ -176,7 +220,13 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
|
|
|
176
220
|
removedFields: removedFields.length,
|
|
177
221
|
deprecatedComponents: deprecatedComponents.length,
|
|
178
222
|
deprecatedFields: deprecatedFields.length,
|
|
179
|
-
changedDefaults: changedDefaults.length
|
|
223
|
+
changedDefaults: changedDefaults.length,
|
|
224
|
+
newBloblangMethods: newBloblangMethods.length,
|
|
225
|
+
removedBloblangMethods: removedBloblangMethods.length,
|
|
226
|
+
newBloblangFunctions: newBloblangFunctions.length,
|
|
227
|
+
removedBloblangFunctions: removedBloblangFunctions.length,
|
|
228
|
+
deprecatedBloblangMethods: deprecatedBloblangMethods.length,
|
|
229
|
+
deprecatedBloblangFunctions: deprecatedBloblangFunctions.length
|
|
180
230
|
},
|
|
181
231
|
details: {
|
|
182
232
|
newComponents,
|
|
@@ -185,7 +235,13 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
|
|
|
185
235
|
removedFields,
|
|
186
236
|
deprecatedComponents,
|
|
187
237
|
deprecatedFields,
|
|
188
|
-
changedDefaults
|
|
238
|
+
changedDefaults,
|
|
239
|
+
newBloblangMethods,
|
|
240
|
+
removedBloblangMethods,
|
|
241
|
+
newBloblangFunctions,
|
|
242
|
+
removedBloblangFunctions,
|
|
243
|
+
deprecatedBloblangMethods,
|
|
244
|
+
deprecatedBloblangFunctions
|
|
189
245
|
}
|
|
190
246
|
};
|
|
191
247
|
|