@redpanda-data/docs-extensions-and-macros 4.15.7 → 4.15.9

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.
@@ -2,6 +2,7 @@ const { execSync } = require('child_process');
2
2
 
3
3
  /**
4
4
  * Generate a JSON diff report between two connector index objects.
5
+ * Includes platform metadata (CGO, cloud-only) to detect transitions.
5
6
  * @param {object} oldIndex - Previous version connector index
6
7
  * @param {object} newIndex - Current version connector index
7
8
  * @param {object} opts - { oldVersion, newVersion, timestamp, binaryAnalysis, oldBinaryAnalysis }
@@ -11,31 +12,39 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
11
12
  const oldMap = buildComponentMap(oldIndex);
12
13
  const newMap = buildComponentMap(newIndex);
13
14
 
14
- // New components
15
+ // New components (include platform metadata)
15
16
  const newComponentKeys = Object.keys(newMap).filter(k => !(k in oldMap));
16
17
  const newComponents = newComponentKeys.map(key => {
17
18
  const [type, name] = key.split(':');
18
19
  const raw = newMap[key].raw;
20
+ const metadata = newMap[key].metadata || {};
19
21
  return {
20
22
  name,
21
23
  type,
22
24
  status: raw.status || raw.type || '',
23
25
  version: raw.version || raw.introducedInVersion || '',
24
- description: raw.description || ''
26
+ description: raw.description || '',
27
+ requiresCgo: metadata.requiresCgo || false,
28
+ cloudOnly: metadata.cloudOnly || false,
29
+ cloudSupported: metadata.cloudSupported || false
25
30
  };
26
31
  });
27
32
 
28
- // Removed components
33
+ // Removed components (include platform metadata to understand why removed)
29
34
  const removedComponentKeys = Object.keys(oldMap).filter(k => !(k in newMap));
30
35
  const removedComponents = removedComponentKeys.map(key => {
31
36
  const [type, name] = key.split(':');
32
37
  const raw = oldMap[key].raw;
38
+ const metadata = oldMap[key].metadata || {};
33
39
  return {
34
40
  name,
35
41
  type,
36
42
  status: raw.status || raw.type || '',
37
43
  version: raw.version || raw.introducedInVersion || '',
38
- description: raw.description || ''
44
+ description: raw.description || '',
45
+ requiresCgo: metadata.requiresCgo || false,
46
+ cloudOnly: metadata.cloudOnly || false,
47
+ cloudSupported: metadata.cloudSupported || false
39
48
  };
40
49
  });
41
50
 
@@ -99,6 +108,57 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
99
108
  }
100
109
  });
101
110
 
111
+ // Platform transitions (CGO, cloud support changes)
112
+ const platformTransitions = [];
113
+ Object.keys(newMap).forEach(cKey => {
114
+ if (!(cKey in oldMap)) return;
115
+
116
+ const oldMeta = oldMap[cKey].metadata || {};
117
+ const newMeta = newMap[cKey].metadata || {};
118
+ const [type, name] = cKey.split(':');
119
+
120
+ const transitions = [];
121
+
122
+ // CGO requirement changes
123
+ if (!oldMeta.requiresCgo && newMeta.requiresCgo) {
124
+ transitions.push('became_cgo_only');
125
+ } else if (oldMeta.requiresCgo && !newMeta.requiresCgo) {
126
+ transitions.push('no_longer_cgo_only');
127
+ }
128
+
129
+ // Cloud support changes
130
+ if (!oldMeta.cloudSupported && newMeta.cloudSupported) {
131
+ transitions.push('added_cloud_support');
132
+ } else if (oldMeta.cloudSupported && !newMeta.cloudSupported) {
133
+ transitions.push('removed_cloud_support');
134
+ }
135
+
136
+ // Cloud-only status changes
137
+ if (!oldMeta.cloudOnly && newMeta.cloudOnly) {
138
+ transitions.push('became_cloud_only');
139
+ } else if (oldMeta.cloudOnly && !newMeta.cloudOnly) {
140
+ transitions.push('no_longer_cloud_only');
141
+ }
142
+
143
+ if (transitions.length > 0) {
144
+ platformTransitions.push({
145
+ name,
146
+ type,
147
+ transitions,
148
+ oldPlatform: {
149
+ requiresCgo: oldMeta.requiresCgo || false,
150
+ cloudSupported: oldMeta.cloudSupported || false,
151
+ cloudOnly: oldMeta.cloudOnly || false
152
+ },
153
+ newPlatform: {
154
+ requiresCgo: newMeta.requiresCgo || false,
155
+ cloudSupported: newMeta.cloudSupported || false,
156
+ cloudOnly: newMeta.cloudOnly || false
157
+ }
158
+ });
159
+ }
160
+ });
161
+
102
162
  // Newly deprecated fields (exist in both versions but became deprecated)
103
163
  const deprecatedFields = [];
104
164
  // Changed default values
@@ -163,6 +223,50 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
163
223
  });
164
224
  });
165
225
 
226
+ // Detect new/removed Bloblang methods and functions
227
+ const oldMethods = new Set((oldIndex['bloblang-methods'] || []).filter(Boolean).map(m => m.name).filter(Boolean));
228
+ const newMethods = new Set((newIndex['bloblang-methods'] || []).filter(Boolean).map(m => m.name).filter(Boolean));
229
+ const oldFunctions = new Set((oldIndex['bloblang-functions'] || []).filter(Boolean).map(f => f.name).filter(Boolean));
230
+ const newFunctions = new Set((newIndex['bloblang-functions'] || []).filter(Boolean).map(f => f.name).filter(Boolean));
231
+
232
+ const newBloblangMethods = Array.from(newMethods).filter(m => !oldMethods.has(m)).sort();
233
+ const removedBloblangMethods = Array.from(oldMethods).filter(m => !newMethods.has(m)).sort();
234
+ const newBloblangFunctions = Array.from(newFunctions).filter(f => !oldFunctions.has(f)).sort();
235
+ const removedBloblangFunctions = Array.from(oldFunctions).filter(f => !newFunctions.has(f)).sort();
236
+
237
+ // Detect deprecated Bloblang methods and functions
238
+ const deprecatedBloblangMethods = [];
239
+ const deprecatedBloblangFunctions = [];
240
+
241
+ const oldMethodsMap = new Map((oldIndex['bloblang-methods'] || []).filter(Boolean).filter(m => m.name).map(m => [m.name, m]));
242
+ const newMethodsMap = new Map((newIndex['bloblang-methods'] || []).filter(Boolean).filter(m => m.name).map(m => [m.name, m]));
243
+ const oldFunctionsMap = new Map((oldIndex['bloblang-functions'] || []).filter(Boolean).filter(f => f.name).map(f => [f.name, f]));
244
+ const newFunctionsMap = new Map((newIndex['bloblang-functions'] || []).filter(Boolean).filter(f => f.name).map(f => [f.name, f]));
245
+
246
+ // Check methods for newly deprecated status
247
+ newMethodsMap.forEach((newMethod, name) => {
248
+ const oldMethod = oldMethodsMap.get(name);
249
+ if (oldMethod) {
250
+ const oldStatus = (oldMethod.status || '').toLowerCase();
251
+ const newStatus = (newMethod.status || '').toLowerCase();
252
+ if (oldStatus !== 'deprecated' && newStatus === 'deprecated') {
253
+ deprecatedBloblangMethods.push(name);
254
+ }
255
+ }
256
+ });
257
+
258
+ // Check functions for newly deprecated status
259
+ newFunctionsMap.forEach((newFunction, name) => {
260
+ const oldFunction = oldFunctionsMap.get(name);
261
+ if (oldFunction) {
262
+ const oldStatus = (oldFunction.status || '').toLowerCase();
263
+ const newStatus = (newFunction.status || '').toLowerCase();
264
+ if (oldStatus !== 'deprecated' && newStatus === 'deprecated') {
265
+ deprecatedBloblangFunctions.push(name);
266
+ }
267
+ }
268
+ });
269
+
166
270
  const result = {
167
271
  comparison: {
168
272
  oldVersion: opts.oldVersion || '',
@@ -176,7 +280,14 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
176
280
  removedFields: removedFields.length,
177
281
  deprecatedComponents: deprecatedComponents.length,
178
282
  deprecatedFields: deprecatedFields.length,
179
- changedDefaults: changedDefaults.length
283
+ changedDefaults: changedDefaults.length,
284
+ platformTransitions: platformTransitions.length,
285
+ newBloblangMethods: newBloblangMethods.length,
286
+ removedBloblangMethods: removedBloblangMethods.length,
287
+ newBloblangFunctions: newBloblangFunctions.length,
288
+ removedBloblangFunctions: removedBloblangFunctions.length,
289
+ deprecatedBloblangMethods: deprecatedBloblangMethods.length,
290
+ deprecatedBloblangFunctions: deprecatedBloblangFunctions.length
180
291
  },
181
292
  details: {
182
293
  newComponents,
@@ -185,7 +296,14 @@ function generateConnectorDiffJson(oldIndex, newIndex, opts = {}) {
185
296
  removedFields,
186
297
  deprecatedComponents,
187
298
  deprecatedFields,
188
- changedDefaults
299
+ changedDefaults,
300
+ platformTransitions,
301
+ newBloblangMethods,
302
+ removedBloblangMethods,
303
+ newBloblangFunctions,
304
+ removedBloblangFunctions,
305
+ deprecatedBloblangMethods,
306
+ deprecatedBloblangFunctions
189
307
  }
190
308
  };
191
309
 
@@ -285,7 +403,19 @@ function buildComponentMap(indexObj) {
285
403
  }
286
404
 
287
405
  const fieldNames = childArray.map(f => f.name);
288
- map[lookupKey] = { raw: component, fields: fieldNames };
406
+
407
+ // Preserve platform metadata for accurate diff comparison
408
+ const metadata = {
409
+ requiresCgo: component.requiresCgo || false,
410
+ cloudSupported: component.cloudSupported || false,
411
+ cloudOnly: component.cloudOnly || false
412
+ };
413
+
414
+ map[lookupKey] = {
415
+ raw: component,
416
+ fields: fieldNames,
417
+ metadata: metadata
418
+ };
289
419
  });
290
420
  });
291
421
 
@@ -92,6 +92,19 @@ function capToTwoSentences (description) {
92
92
  return result.trim()
93
93
  }
94
94
 
95
+ /**
96
+ * Remove platform metadata fields from connectors
97
+ * @param {Array} connectors - Array of connector objects
98
+ */
99
+ function stripPlatformMetadata (connectors) {
100
+ if (!Array.isArray(connectors)) return
101
+ connectors.forEach(c => {
102
+ delete c.cloudSupported
103
+ delete c.requiresCgo
104
+ delete c.cloudOnly
105
+ })
106
+ }
107
+
95
108
  /**
96
109
  * Update whats-new.adoc with new release information
97
110
  * @param {Object} params - Parameters
@@ -487,37 +500,6 @@ function logCollapsed (label, filesArray, maxToShow = 10) {
487
500
  console.log('')
488
501
  }
489
502
 
490
- /**
491
- * Strip augmentation fields from connector data to ensure clean comparisons
492
- * Removes cloudSupported, requiresCgo, cloudOnly fields and filters out cloud-only connectors
493
- * @param {object} data - Connector index data
494
- * @returns {object} Clean connector data without augmentation
495
- */
496
- function stripAugmentationFields(data) {
497
- const cleanData = JSON.parse(JSON.stringify(data));
498
- const connectorTypes = ['inputs', 'outputs', 'processors', 'caches', 'rate_limits',
499
- 'buffers', 'metrics', 'scanners', 'tracers', 'config', 'bloblang-methods'];
500
-
501
- for (const type of connectorTypes) {
502
- if (Array.isArray(cleanData[type])) {
503
- // Remove connectors that were added by augmentation (cloudOnly or requiresCgo without OSS data)
504
- cleanData[type] = cleanData[type].filter(c => {
505
- // Keep if it's not marked as cloudOnly or requiresCgo
506
- // OR if it has a config/fields (meaning it came from OSS, not just binary analysis)
507
- return (!(c.cloudOnly || c.requiresCgo) || c.config || c.fields);
508
- });
509
-
510
- // Remove augmentation fields
511
- cleanData[type].forEach(c => {
512
- delete c.cloudSupported;
513
- delete c.requiresCgo;
514
- delete c.cloudOnly;
515
- });
516
- }
517
- }
518
-
519
- return cleanData;
520
- }
521
503
 
522
504
  /**
523
505
  * Load or fetch connector data for a specific version
@@ -529,15 +511,11 @@ function stripAugmentationFields(data) {
529
511
  async function loadConnectorDataForVersion(version, dataDir, options = {}) {
530
512
  const dataFile = path.join(dataDir, `connect-${version}.json`);
531
513
 
532
- // If file exists, load it
514
+ // If file exists, load it (with platform metadata intact)
533
515
  if (fs.existsSync(dataFile)) {
534
516
  console.log(`✓ Using existing data file: connect-${version}.json`);
535
517
  const data = JSON.parse(fs.readFileSync(dataFile, 'utf8'));
536
-
537
- // Strip augmentation fields to ensure clean comparisons
538
- // Augmentation adds CGO/cloud-only components that shouldn't affect version diffs
539
- const cleanData = stripAugmentationFields(data);
540
- return cleanData;
518
+ return data;
541
519
  }
542
520
 
543
521
  // If not, fetch it
@@ -940,8 +918,8 @@ async function handleRpcnConnectorDocs (options) {
940
918
  let oldIndex = {}
941
919
  let oldVersion = null
942
920
  if (options.oldData && fs.existsSync(options.oldData)) {
943
- // Strip augmentation fields to ensure clean comparisons
944
- oldIndex = stripAugmentationFields(JSON.parse(fs.readFileSync(options.oldData, 'utf8')))
921
+ // Load with platform metadata intact for accurate diff
922
+ oldIndex = JSON.parse(fs.readFileSync(options.oldData, 'utf8'))
945
923
  const m = options.oldData.match(/connect-([\d.]+)\.json$/)
946
924
  if (m) oldVersion = m[1]
947
925
  } else {
@@ -959,30 +937,43 @@ async function handleRpcnConnectorDocs (options) {
959
937
  oldVersion = sortedVersions[0]
960
938
  const oldFile = `connect-${oldVersion}.json`
961
939
  const oldPath = path.join(dataDir, oldFile)
962
- // Strip augmentation fields to ensure clean comparisons
963
- oldIndex = stripAugmentationFields(JSON.parse(fs.readFileSync(oldPath, 'utf8')))
940
+ // Load with platform metadata intact for accurate diff
941
+ oldIndex = JSON.parse(fs.readFileSync(oldPath, 'utf8'))
964
942
  console.log(`📋 Using old version data: ${oldFile}`)
965
943
  } else {
966
944
  oldVersion = getAntoraValue('asciidoc.attributes.latest-connect-version')
967
945
  if (oldVersion) {
968
946
  const oldPath = path.join(dataDir, `connect-${oldVersion}.json`)
969
947
  if (fs.existsSync(oldPath)) {
970
- // Strip augmentation fields to ensure clean comparisons
971
- oldIndex = stripAugmentationFields(JSON.parse(fs.readFileSync(oldPath, 'utf8')))
948
+ // Load with platform metadata intact for accurate diff
949
+ oldIndex = JSON.parse(fs.readFileSync(oldPath, 'utf8'))
972
950
  }
973
951
  }
974
952
  }
975
953
  }
976
954
 
977
- // Load and strip augmentation fields for clean comparisons
978
- let newIndex = stripAugmentationFields(JSON.parse(fs.readFileSync(dataFile, 'utf8')))
955
+ // Load with platform metadata intact for accurate diff
956
+ let newIndex = JSON.parse(fs.readFileSync(dataFile, 'utf8'))
979
957
 
980
- // Save a clean copy of OSS data for binary analysis (before augmentation)
981
- // This ensures the binary analyzer compares actual binaries, not augmented data
958
+ // Save a clean copy of OSS data for binary analysis
959
+ // Binary analyzer needs pure OSS data without augmented CGO/cloud connectors
982
960
  const cleanOssDataPath = path.join(dataDir, `._connect-${newVersion}-clean.json`)
983
961
 
984
- // Use the already-stripped newIndex for clean data
962
+ // Create clean version by removing augmented connectors
985
963
  const cleanData = JSON.parse(JSON.stringify(newIndex))
964
+ const connectorTypes = ['inputs', 'outputs', 'processors', 'caches', 'rate_limits',
965
+ 'buffers', 'metrics', 'scanners', 'tracers']
966
+
967
+ for (const type of connectorTypes) {
968
+ if (Array.isArray(cleanData[type])) {
969
+ // Keep only connectors from OSS rpk (have config/fields)
970
+ // Remove augmentation-only connectors (added by previous binary analysis)
971
+ cleanData[type] = cleanData[type].filter(c => c.config || c.fields)
972
+
973
+ // Remove platform metadata from remaining connectors
974
+ stripPlatformMetadata(cleanData[type])
975
+ }
976
+ }
986
977
 
987
978
  fs.writeFileSync(cleanOssDataPath, JSON.stringify(cleanData, null, 2), 'utf8')
988
979
 
@@ -1031,8 +1022,6 @@ async function handleRpcnConnectorDocs (options) {
1031
1022
  }
1032
1023
  }
1033
1024
 
1034
- printDeltaReport(oldIndex, newIndex)
1035
-
1036
1025
  // Binary analysis
1037
1026
  let oldBinaryAnalysis = null
1038
1027
 
@@ -1250,9 +1239,10 @@ async function handleRpcnConnectorDocs (options) {
1250
1239
  }
1251
1240
  }
1252
1241
 
1253
- // NOTE: We do NOT reload newIndex after augmentation
1254
- // Diff generation should use clean OSS data to avoid false positives from CGO/cloud-only components
1255
- // The augmented data is saved to disk but not used for version comparisons
1242
+ // IMPORTANT: Reload newIndex with augmented data for unified diff
1243
+ // The unified diff approach compares platform metadata to detect transitions
1244
+ newIndex = connectorData
1245
+ console.log(`✓ Reloaded newIndex with augmented data for diff comparison`)
1256
1246
  } catch (err) {
1257
1247
  console.error(`Warning: Failed to augment data file: ${err.message}`)
1258
1248
  }
@@ -1265,9 +1255,51 @@ async function handleRpcnConnectorDocs (options) {
1265
1255
  } else if (versionsMatch) {
1266
1256
  console.log(`⏭️ Skipping diff generation: versions match (${oldVersion} === ${newVersion})`)
1267
1257
  } else {
1258
+ // FALLBACK: If binary analysis failed, strip CGO/cloud augmentation from old data
1259
+ // to prevent false "removed" reports when comparing augmented old vs non-augmented new
1260
+ let oldIndexForDiff = oldIndex
1261
+ // Check if CGO analysis specifically failed (cgoIndex will be undefined if CGO binary couldn't be analyzed)
1262
+ const cgoAnalysisFailed = !binaryAnalysis || !binaryAnalysis.ossVersion || !binaryAnalysis.cgoIndex
1263
+ if (cgoAnalysisFailed) {
1264
+ console.log('⚠️ Binary analysis unavailable - stripping CGO/cloud metadata from old data for clean comparison')
1265
+
1266
+ // Strip CGO/cloud-only connectors and metadata from old data
1267
+ oldIndexForDiff = JSON.parse(JSON.stringify(oldIndex))
1268
+ const connectorTypes = ['inputs', 'outputs', 'processors', 'caches', 'rate_limits',
1269
+ 'buffers', 'metrics', 'scanners', 'tracers']
1270
+
1271
+ let totalStripped = 0
1272
+ for (const type of connectorTypes) {
1273
+ if (Array.isArray(oldIndexForDiff[type])) {
1274
+ const originalCount = oldIndexForDiff[type].length
1275
+
1276
+ // Remove connectors marked as CGO-only or cloud-only
1277
+ // These shouldn't appear as "removed" when binary analysis is unavailable
1278
+ oldIndexForDiff[type] = oldIndexForDiff[type].filter(c => {
1279
+ return !(c.requiresCgo || c.cloudOnly)
1280
+ })
1281
+
1282
+ const removed = originalCount - oldIndexForDiff[type].length
1283
+ if (removed > 0) {
1284
+ console.log(` • Stripped ${removed} CGO/cloud connectors from ${type}`)
1285
+ totalStripped += removed
1286
+ }
1287
+
1288
+ // Remove platform metadata from remaining connectors
1289
+ stripPlatformMetadata(oldIndexForDiff[type])
1290
+ }
1291
+ }
1292
+
1293
+ if (totalStripped > 0) {
1294
+ console.log(` ✓ Total stripped: ${totalStripped} CGO/cloud connectors`)
1295
+ }
1296
+ }
1297
+
1298
+ printDeltaReport(oldIndexForDiff, newIndex)
1299
+
1268
1300
  const { generateConnectorDiffJson } = require('./report-delta.js')
1269
1301
  diffJson = generateConnectorDiffJson(
1270
- oldIndex,
1302
+ oldIndexForDiff,
1271
1303
  newIndex,
1272
1304
  {
1273
1305
  oldVersion: oldVersion,
@@ -1,15 +1,41 @@
1
1
  // This content is autogenerated. Do not edit manually. To override descriptions, use the doc-tools CLI with the --overrides option: https://redpandadata.atlassian.net/wiki/spaces/DOC/pages/1247543314/Generate+reference+docs+for+Redpanda+Connect
2
2
 
3
3
  = {{name}}
4
-
5
4
  {{#if signature}}
5
+
6
6
  *Signature*: `{{signature}}`
7
7
  {{/if}}
8
+ {{#if (eq status "deprecated")}}
8
9
 
10
+ [WARNING]
11
+ ====
12
+ This {{#if signature}}function{{else}}method{{/if}} is deprecated and will be removed in a future version.
13
+ ====
14
+ {{/if}}
9
15
  {{#if description}}
10
- {{description}}
16
+
17
+ {{{ensurePeriod description}}}
11
18
  {{/if}}
12
19
 
20
+ {{#if params}}
21
+ {{#if params.named}}
22
+
23
+ == Parameters
24
+
25
+ [cols="1,1,3"]
26
+ |===
27
+ | Name | Type | Description
28
+
29
+ {{#each params.named}}
30
+ | `{{name}}`{{#if is_optional}} (optional){{/if}}
31
+ | `{{type}}`
32
+ | {{{description}}}
33
+
34
+ {{/each}}
35
+ |===
36
+
37
+ {{/if}}
38
+ {{/if}}
13
39
 
14
40
  {{#if examples}}
15
41
  == Examples
@@ -0,0 +1,29 @@
1
+ = Bloblang Functions
2
+ // tag::single-source[]
3
+ :description: A list of Bloblang functions
4
+
5
+ // © 2024 Redpanda Data Inc.
6
+
7
+
8
+ Functions can be placed anywhere and allow you to extract information from your environment, generate values, or access data from the underlying message being mapped:
9
+
10
+ ```bloblang
11
+ root.doc.id = uuid_v4()
12
+ root.doc.received_at = now()
13
+ root.doc.host = hostname()
14
+ ```
15
+
16
+ Functions support both named and nameless style arguments:
17
+
18
+ ```bloblang
19
+ root.values_one = range(start: 0, stop: this.max, step: 2)
20
+ root.values_two = range(0, this.max, 2)
21
+
22
+ # In: {"max":10}
23
+ ```
24
+ {{#each functions}}
25
+
26
+ include::redpanda-connect:components:partial$bloblang-functions/{{this}}.adoc[leveloffset=+1]
27
+ {{/each}}
28
+
29
+ // end::single-source[]
@@ -0,0 +1,39 @@
1
+ = Bloblang Methods
2
+ // tag::single-source[]
3
+ :description: A list of Bloblang methods
4
+
5
+ // © 2024 Redpanda Data Inc.
6
+
7
+
8
+ Methods provide most of the power in Bloblang as they allow you to augment values and can be added to any expression (including other methods):
9
+
10
+ ```bloblang
11
+ root.doc.id = this.thing.id.string().catch(uuid_v4())
12
+ root.doc.reduced_nums = this.thing.nums.map_each(num -> if num < 10 {
13
+ deleted()
14
+ } else {
15
+ num - 10
16
+ })
17
+ root.has_good_taste = ["pikachu","mewtwo","magmar"].contains(this.user.fav_pokemon)
18
+
19
+ # In: {"thing":{"id":123,"nums":[5,12,18,7,25]},"user":{"fav_pokemon":"pikachu"}}
20
+ ```
21
+
22
+ Methods support both named and nameless style arguments:
23
+
24
+ ```bloblang
25
+ root.foo_one = this.(bar | baz).trim().replace_all(old: "dog", new: "cat")
26
+ root.foo_two = this.(bar | baz).trim().replace_all("dog", "cat")
27
+
28
+ # In: {"bar":" I love my dog "}
29
+ ```
30
+ {{#each categories}}
31
+
32
+ == {{{toSentenceCase this.name}}}
33
+ {{#each this.methods}}
34
+
35
+ include::redpanda-connect:components:partial$bloblang-methods/{{this}}.adoc[leveloffset=+2]
36
+ {{/each}}
37
+ {{/each}}
38
+
39
+ // end::single-source[]
@@ -1,10 +1,9 @@
1
1
  = {{{name}}}
2
2
  // tag::single-source[]
3
3
  :type: {{type}}
4
- :status: {{status}}
5
4
  {{#if support}}:support: {{support}}{{/if}}
6
5
  :categories: [{{join categories ", "}}]
7
- :description: {{#if summary}}{{{summary}}}{{else if description}}{{description}}{{else}}TODO: Missing description. Add a description in the overrides file or source data.{{/if}}
6
+ :description: {{#if summary}}{{{summary}}}{{else if description}}{{description}}{{else}}// TODO: Missing description. Add a description in the overrides file or source data.{{/if}}
8
7
 
9
8
  component_type_dropdown::[]
10
9
 
@@ -9,5 +9,5 @@ endif::[]
9
9
  {{#if description}}
10
10
  {{{description}}}
11
11
  {{else}}
12
- TODO: Missing description. Add a description in the overrides file or source data.
12
+ // TODO: Missing description. Add a description in the overrides file or source data.
13
13
  {{/if}}