@redpanda-data/docs-extensions-and-macros 3.5.0 → 3.5.1
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.
|
@@ -13,8 +13,9 @@ module.exports.register = function ({ config }) {
|
|
|
13
13
|
const descriptions = redpandaConnect.latest.asciidoc.attributes.categories
|
|
14
14
|
const componentNameMap = redpandaConnect.latest.asciidoc.attributes.components
|
|
15
15
|
const certifiedConnectors = redpandaConnect.latest.asciidoc.attributes['certified-components']
|
|
16
|
+
const enterpriseConnectors = redpandaConnect.latest.asciidoc.attributes['enterprise-components']
|
|
16
17
|
|
|
17
|
-
if (!descriptions || !componentNameMap || !certifiedConnectors) {
|
|
18
|
+
if (!descriptions || !componentNameMap || !certifiedConnectors || !enterpriseConnectors) {
|
|
18
19
|
if (!descriptions) {
|
|
19
20
|
logger.error('No categories attribute found in redpanda-connect component')
|
|
20
21
|
}
|
|
@@ -24,6 +25,9 @@ module.exports.register = function ({ config }) {
|
|
|
24
25
|
if (!certifiedConnectors) {
|
|
25
26
|
logger.error('No certified-components attribute found in redpanda-connect component')
|
|
26
27
|
}
|
|
28
|
+
if (!enterpriseConnectors) {
|
|
29
|
+
logger.error('No enterprise-components attribute found in redpanda-connect component')
|
|
30
|
+
}
|
|
27
31
|
return
|
|
28
32
|
}
|
|
29
33
|
|
|
@@ -48,7 +52,6 @@ module.exports.register = function ({ config }) {
|
|
|
48
52
|
const statusMatch = /:status: (.*)/.exec(content)
|
|
49
53
|
const driverSupportMatch = /:driver-support: (.*)/.exec(content)
|
|
50
54
|
const cacheSupportMatch = /:cache-support: (.*)/.exec(content)
|
|
51
|
-
const enterpriseMatch = /:enterprise: true/.exec(content)
|
|
52
55
|
const pubUrl = file.pub.url
|
|
53
56
|
const name = file.src.stem
|
|
54
57
|
|
|
@@ -62,8 +65,10 @@ module.exports.register = function ({ config }) {
|
|
|
62
65
|
|
|
63
66
|
const isCertified = certifiedConnectors.some(connector => connector.name === name)
|
|
64
67
|
|
|
68
|
+
const isEnterprise = enterpriseConnectors.some(connector => connector === name)
|
|
69
|
+
|
|
65
70
|
// Override status to "certified" if in the lookup table
|
|
66
|
-
if (isCertified ||
|
|
71
|
+
if (isCertified || isEnterprise) {
|
|
67
72
|
status = 'certified'
|
|
68
73
|
} else {
|
|
69
74
|
status = 'community'
|
|
@@ -92,12 +97,12 @@ module.exports.register = function ({ config }) {
|
|
|
92
97
|
// Populate flatComponentsData
|
|
93
98
|
let flatItem = flatComponentsData.find(item => item.name === commonName)
|
|
94
99
|
if (!flatItem) {
|
|
95
|
-
flatItem = { name: commonName, originalName: name, support: status, types: [], enterprise:
|
|
100
|
+
flatItem = { name: commonName, originalName: name, support: status, types: [], enterprise: isEnterprise ? true : false}
|
|
96
101
|
flatComponentsData.push(flatItem)
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
if (!flatItem.types.some(type => type.type === fileType)) {
|
|
100
|
-
flatItem.types.push({ type: fileType, url: pubUrl, enterprise:
|
|
105
|
+
flatItem.types.push({ type: fileType, url: pubUrl, enterprise: isEnterprise? true : false, support: status})
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
// Populate support data
|