@redpanda-data/docs-extensions-and-macros 3.5.7 → 3.5.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.
@@ -203,7 +203,7 @@ function generateIndex (playbook, contentCatalog, { indexLatestOnly = false, exc
203
203
  indexItem.deployment = deployment;
204
204
  indexItem.type = 'Lab';
205
205
  indexItem.interactive = false;
206
- indexItem._tags = ['labs'];
206
+ indexItem._tags = [tag];
207
207
  }
208
208
  algolia[cname][version].push(indexItem)
209
209
  algoliaCount++
@@ -4,7 +4,7 @@ module.exports.register = function ({ config }) {
4
4
  const logger = this.getLogger('related-labs-extension');
5
5
 
6
6
  this.on('documentsConverted', async ({ contentCatalog, siteCatalog }) => {
7
- const docs = contentCatalog.findBy({ component: 'ROOT', family: 'page' });
7
+ const docs = contentCatalog.findBy({ family: 'page' });
8
8
  docs.forEach((docPage) => {
9
9
  const relatedLabs = []
10
10
  const sourceAttributes = docPage.asciidoc.attributes
@@ -31,7 +31,7 @@ function findRelated(labPage, sourceCategoryList, sourceDeploymentType, logger)
31
31
  const targetCategoryList = pageCategories.split(',').map(c => c.trim());
32
32
  const targetDeploymentType = getDeploymentType(targetAttributes)
33
33
  const categoryMatch = hasMatchingCategory(sourceCategoryList, targetCategoryList)
34
- if (categoryMatch && (!targetDeploymentType ||sourceDeploymentType === targetDeploymentType || targetDeploymentType === 'Docker')) {
34
+ if (categoryMatch && (!targetDeploymentType ||sourceDeploymentType === targetDeploymentType || (targetDeploymentType === 'Docker' && !sourceDeploymentType))) {
35
35
  return {
36
36
  title: labPage.asciidoc.doctitle,
37
37
  url: labPage.pub.url,
@@ -45,7 +45,8 @@ function getDeploymentType (attributes) {
45
45
  return attributes['env-kubernetes'] ? 'Kubernetes'
46
46
  : attributes['env-linux'] ? 'Linux'
47
47
  : attributes['env-docker'] ? 'Docker'
48
- : attributes.cloud ? 'Redpanda Cloud' : ''
48
+ : attributes['env-cloud'] ? 'Redpanda Cloud'
49
+ : attributes['page-cloud'] ? 'Redpanda Cloud' : ''
49
50
  }
50
51
 
51
52
  function hasMatchingCategory (sourcePageCategories, targetPageCategories) {
@@ -1,22 +1,21 @@
1
- // Fetch the latest release version from GitHub
2
- const { Octokit } = require("@octokit/rest");
3
- const { retry } = require("@octokit/plugin-retry");
4
- const OctokitWithRetries = Octokit.plugin(retry);
5
- const owner = 'redpanda-data';
6
- const repo = 'connect';
7
-
8
- let githubOptions = {
9
- userAgent: 'Redpanda Docs',
10
- baseUrl: 'https://api.github.com',
11
- };
1
+ module.exports = async () => {
2
+ // Fetch the latest release version from GitHub
3
+ const { Octokit } = await import("@octokit/rest");
4
+ const { retry } = await import("@octokit/plugin-retry");
5
+ const OctokitWithRetries = Octokit.plugin(retry);
6
+ const owner = 'redpanda-data';
7
+ const repo = 'connect';
12
8
 
13
- if (process.env.REDPANDA_GITHUB_TOKEN) {
14
- githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
15
- }
9
+ let githubOptions = {
10
+ userAgent: 'Redpanda Docs',
11
+ baseUrl: 'https://api.github.com',
12
+ };
16
13
 
17
- const github = new OctokitWithRetries(githubOptions);
14
+ if (process.env.REDPANDA_GITHUB_TOKEN) {
15
+ githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
16
+ }
18
17
 
19
- module.exports = async () => {
18
+ const github = new OctokitWithRetries(githubOptions);
20
19
  try {
21
20
  const release = await github.rest.repos.getLatestRelease({ owner, repo });
22
21
  tag = release.data.tag_name.replace(/^v/, '');
@@ -1,22 +1,22 @@
1
- const { Octokit } = require("@octokit/rest");
2
- const { retry } = require("@octokit/plugin-retry");
3
- const semver = require("semver");
4
- const OctokitWithRetries = Octokit.plugin(retry);
5
- const owner = 'redpanda-data';
6
- const repo = 'console';
1
+ module.exports = async () => {
2
+ const { Octokit } = await import("@octokit/rest");
3
+ const { retry } = await import("@octokit/plugin-retry");
4
+ const semver = await import("semver");
5
+ const OctokitWithRetries = Octokit.plugin(retry);
6
+ const owner = 'redpanda-data';
7
+ const repo = 'console';
7
8
 
8
- let githubOptions = {
9
- userAgent: 'Redpanda Docs',
10
- baseUrl: 'https://api.github.com',
11
- };
9
+ let githubOptions = {
10
+ userAgent: 'Redpanda Docs',
11
+ baseUrl: 'https://api.github.com',
12
+ };
12
13
 
13
- if (process.env.REDPANDA_GITHUB_TOKEN) {
14
- githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
15
- }
14
+ if (process.env.REDPANDA_GITHUB_TOKEN) {
15
+ githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
16
+ }
16
17
 
17
- const github = new OctokitWithRetries(githubOptions);
18
+ const github = new OctokitWithRetries(githubOptions);
18
19
 
19
- module.exports = async () => {
20
20
  try {
21
21
  const releases = await github.rest.repos.listReleases({
22
22
  owner,
@@ -1,22 +1,21 @@
1
- // Fetch the latest release version from GitHub
2
- const { Octokit } = require("@octokit/rest");
3
- const { retry } = require("@octokit/plugin-retry");
4
- const OctokitWithRetries = Octokit.plugin(retry);
5
- const owner = 'redpanda-data';
6
- const repo = 'redpanda-operator';
7
-
8
- let githubOptions = {
9
- userAgent: 'Redpanda Docs',
10
- baseUrl: 'https://api.github.com',
11
- };
1
+ module.exports = async () => {
2
+ // Fetch the latest release version from GitHub
3
+ const { Octokit } = await import("@octokit/rest");
4
+ const { retry } = await import("@octokit/plugin-retry");
5
+ const OctokitWithRetries = Octokit.plugin(retry);
6
+ const owner = 'redpanda-data';
7
+ const repo = 'redpanda-operator';
12
8
 
13
- if (process.env.REDPANDA_GITHUB_TOKEN) {
14
- githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
15
- }
9
+ let githubOptions = {
10
+ userAgent: 'Redpanda Docs',
11
+ baseUrl: 'https://api.github.com',
12
+ };
16
13
 
17
- const github = new OctokitWithRetries(githubOptions);
14
+ if (process.env.REDPANDA_GITHUB_TOKEN) {
15
+ githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
16
+ }
18
17
 
19
- module.exports = async () => {
18
+ const github = new OctokitWithRetries(githubOptions);
20
19
  try {
21
20
  const release = await github.rest.repos.getLatestRelease({ owner, repo });
22
21
  latestOperatorReleaseVersion = release.data.tag_name;
@@ -1,20 +1,19 @@
1
- const { Octokit } = require("@octokit/rest");
2
- const { retry } = require("@octokit/plugin-retry");
3
- const yaml = require('js-yaml');
4
- const OctokitWithRetries = Octokit.plugin(retry);
5
-
6
- const githubOptions = {
7
- userAgent: 'Redpanda Docs',
8
- baseUrl: 'https://api.github.com',
9
- auth: process.env.REDPANDA_GITHUB_TOKEN
10
- };
1
+ module.exports = async () => {
2
+ const { Octokit } = await import("@octokit/rest");
3
+ const { retry } = await import("@octokit/plugin-retry");
4
+ const yaml = await import('js-yaml');
5
+ const OctokitWithRetries = Octokit.plugin(retry);
11
6
 
12
- const github = new OctokitWithRetries(githubOptions);
13
- const owner = 'redpanda-data';
14
- const repo = 'helm-charts';
15
- const path = 'charts/redpanda/Chart.yaml';
7
+ const githubOptions = {
8
+ userAgent: 'Redpanda Docs',
9
+ baseUrl: 'https://api.github.com',
10
+ auth: process.env.REDPANDA_GITHUB_TOKEN
11
+ };
16
12
 
17
- module.exports = async () => {
13
+ const github = new OctokitWithRetries(githubOptions);
14
+ const owner = 'redpanda-data';
15
+ const repo = 'helm-charts';
16
+ const path = 'charts/redpanda/Chart.yaml';
18
17
  try {
19
18
  const response = await github.repos.getContent({
20
19
  owner: owner,
@@ -1,23 +1,22 @@
1
- const { Octokit } = require("@octokit/rest");
2
- const { retry } = require("@octokit/plugin-retry");
3
- const semver = require("semver");
4
- const OctokitWithRetries = Octokit.plugin(retry);
5
-
6
- const owner = 'redpanda-data';
7
- const repo = 'redpanda';
1
+ module.exports = async () => {
2
+ const { Octokit } = await import("@octokit/rest");
3
+ const { retry } = await import("@octokit/plugin-retry");
4
+ const semver = await import("semver");
5
+ const OctokitWithRetries = Octokit.plugin(retry);
8
6
 
9
- let githubOptions = {
10
- userAgent: 'Redpanda Docs',
11
- baseUrl: 'https://api.github.com',
12
- };
7
+ const owner = 'redpanda-data';
8
+ const repo = 'redpanda';
13
9
 
14
- if (process.env.REDPANDA_GITHUB_TOKEN) {
15
- githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
16
- }
10
+ let githubOptions = {
11
+ userAgent: 'Redpanda Docs',
12
+ baseUrl: 'https://api.github.com',
13
+ };
17
14
 
18
- const github = new OctokitWithRetries(githubOptions);
15
+ if (process.env.REDPANDA_GITHUB_TOKEN) {
16
+ githubOptions.auth = process.env.REDPANDA_GITHUB_TOKEN;
17
+ }
19
18
 
20
- module.exports = async () => {
19
+ const github = new OctokitWithRetries(githubOptions);
21
20
  try {
22
21
  // Fetch all the releases from the repository
23
22
  const releases = await github.rest.repos.listReleases({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",
@@ -57,8 +57,6 @@
57
57
  "url": "git+https://github.com/redpanda-data/docs-extensions-and-macros"
58
58
  },
59
59
  "dependencies": {
60
- "@octokit/plugin-retry": "~4.1.3",
61
- "@octokit/rest": "~19.0.7",
62
60
  "algoliasearch": "^4.17.0",
63
61
  "chalk": "4.1.2",
64
62
  "gulp": "^4.0.2",
@@ -72,6 +70,9 @@
72
70
  "devDependencies": {
73
71
  "@antora/cli": "3.1.4",
74
72
  "@antora/site-generator": "3.1.4",
73
+ "@octokit/core": "^6.1.2",
74
+ "@octokit/plugin-retry": "^7.1.1",
75
+ "@octokit/rest": "^21.0.1",
75
76
  "@web/dev-server": "^0.2.5"
76
77
  }
77
78
  }