@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
|
@@ -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
|
-
|
|
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,9 +1,9 @@
|
|
|
1
1
|
= {{{name}}}
|
|
2
2
|
// tag::single-source[]
|
|
3
3
|
:type: {{type}}
|
|
4
|
-
:
|
|
4
|
+
{{#if support}}:support: {{support}}{{/if}}
|
|
5
5
|
:categories: [{{join categories ", "}}]
|
|
6
|
-
: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}}
|
|
7
7
|
|
|
8
8
|
component_type_dropdown::[]
|
|
9
9
|
|