Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade @docusaurus/plugin-content-blog from 3.1.0 to 3.4.0 #195

Merged
merged 21 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e8415ae
fix: upgrade @docusaurus/plugin-content-blog from 3.1.0 to 3.4.0
snyk-bot Jul 17, 2024
ca29894
Update kubeslice-cli-demo.mdx (#187)
oilbeater Aug 9, 2024
f17d231
Pull Request for Docusaurus V3 Migration (#203)
veenamj-avesha Aug 12, 2024
488150f
feat(): added `latest` alias to redirect to latest version in place …
Sandesh-d12 Oct 17, 2024
2802323
AM-14456: Use case - Distribute MongoDB for MultiCloud (#218)
uma-kt Oct 22, 2024
3bf88be
fixed a broken link (#224)
veenamj-avesha Oct 22, 2024
e622cb8
updated sidebar and prod dockerfile (#225)
uma-kt Oct 23, 2024
2b6bb73
fixed error (#226)
uma-kt Oct 24, 2024
e043c60
fix: package.json & package-lock.json to reduce vulnerabilities (#223)
narmidm Nov 4, 2024
1479236
fix: package.json & package-lock.json to reduce vulnerabilities (#214)
narmidm Nov 4, 2024
9a5f758
fix: package.json & package-lock.json to reduce vulnerabilities (#216)
narmidm Nov 4, 2024
662ba9c
fix: package.json & package-lock.json to reduce vulnerabilities (#210)
narmidm Nov 4, 2024
b496330
fix: Dockerfile to reduce vulnerabilities (#209)
narmidm Nov 4, 2024
c885a09
fix: Dockerfile to reduce vulnerabilities (#208)
narmidm Nov 4, 2024
09df5a1
[Snyk] Security upgrade @docusaurus/preset-classic from 3.4.0 to 3.5.…
narmidm Nov 4, 2024
1c3dd43
fix: Dockerfile to reduce vulnerabilities (#206)
narmidm Nov 4, 2024
5688a05
fix: prod.dockerfile to reduce vulnerabilities (#205)
narmidm Nov 4, 2024
b44c710
[Snyk] Security upgrade @docusaurus/preset-classic from 3.1.0 to 3.5.…
richiesebastian Nov 4, 2024
077bb37
[Snyk] Upgrade @docusaurus/plugin-google-gtag from 3.1.0 to 3.4.0 (#198)
richiesebastian Nov 4, 2024
00f6e76
[Snyk] Upgrade @docusaurus/preset-classic from 3.1.0 to 3.4.0 (#197)
richiesebastian Nov 4, 2024
af6029f
updated package files
uma-kt Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.14.0-alpine3.15 as builder
FROM node:18.20.4-alpine as builder
WORKDIR /build
COPY . ./
COPY ./images/ ./static/images
Expand Down
33 changes: 30 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const { themes } = require('prism-react-renderer');
const data = require("./versioned_sidebars/version-1.3.0-sidebars.json");
import version from './versions.json'
import { getValidPaths } from './utils.js';


const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;

const validPaths = getValidPaths(data?.version3);
const latestVersion =version[0];

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -18,6 +27,7 @@ const config = {
// If you aren't using GitHub pages, you don't need these.
organizationName: 'kubeslice', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.
staticDirectories:['static', 'images'],

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
Expand Down Expand Up @@ -158,7 +168,24 @@ const config = {
{
id: 'GTM-N7K6NGB', // GTM Container ID
}
]
],
[
"@docusaurus/plugin-client-redirects",
{
fromExtensions: ["html", "htm"],
toExtensions: ["exe", "zip"],
redirects: validPaths?.map((path) => ({
from: `/latest/${path}`,
to: `/${latestVersion}/${path}`,
})),
createRedirects(existingPath) {
if (existingPath.includes("/latest")) {
return [existingPath.replace("/latest", `/${latestVersion}`)];
}
return undefined;
},
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
Expand Down
32,445 changes: 12,667 additions & 19,778 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.1.0",
"@docusaurus/plugin-content-blog": "^3.1.0",
"@docusaurus/plugin-google-gtag": "^3.1.0",
"@docusaurus/preset-classic": "3.1.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"@docusaurus/core": "3.4.0",
"@docusaurus/plugin-content-blog": "^3.4.0",
"@docusaurus/plugin-google-gtag": "^3.4.0",
"@docusaurus/preset-classic": "3.5.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.1.1",
"docusaurus-gtm-plugin": "^0.0.2",
"docusaurus-plugin-sass": "^0.2.5",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.21",
"sass": "^1.54.0"
"@docusaurus/module-type-aliases": "^3.4.0",
"sass": "^1.69.5"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion prod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.14.0-alpine3.15 as builder
FROM node:18.2.0-alpine as builder
WORKDIR /build
COPY package.json ./
COPY package-lock.json ./
Expand Down
8 changes: 4 additions & 4 deletions src/theme/DocVersionBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
useActivePlugin,
useDocVersionSuggestions,
} from '@docusaurus/plugin-content-docs/client';
import {ThemeClassNames} from '@docusaurus/theme-common';
import {
ThemeClassNames,
useDocsPreferredVersion,
useDocsVersion,
} from '@docusaurus/theme-common';
} from '@docusaurus/theme-common/internal';
function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
return (
<Translate
Expand All @@ -37,7 +37,7 @@ function UnmaintainedVersionLabel({siteTitle, versionMetadata}) {
versionLabel: <b>{versionMetadata.label}</b>,
}}>
{
'This is documentation for {siteTitle} {versionLabel}, which is an older version.'
'This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.'
}
</Translate>
);
Expand Down Expand Up @@ -71,7 +71,7 @@ function LatestVersionSuggestionLabel({versionLabel, to, onClick}) {
),
}}>
{
'For the latest documentation, see the {latestVersionLink} ({versionLabel}).'
'For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).'
}
</Translate>
);
Expand Down
2 changes: 0 additions & 2 deletions src/theme/NotFound.d.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/theme/NotFound.js

This file was deleted.

36 changes: 36 additions & 0 deletions src/theme/NotFound/Content/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import clsx from 'clsx';
import Translate from '@docusaurus/Translate';
import Heading from '@theme/Heading';
export default function NotFoundContent({className}) {
return (
<main className={clsx('container margin-vert--xl', className)}>
<div className="row">
<div className="col col--6 col--offset-3">
<Heading as="h1" className="hero__title">
<Translate
id="theme.NotFound.title"
description="The title of the 404 page">
Page Not Found
</Translate>
</Heading>
<p>
<Translate
id="theme.NotFound.p1"
description="The first paragraph of the 404 page">
We could not find what you were looking for.
</Translate>
</p>
<p>
<Translate
id="theme.NotFound.p2"
description="The 2nd paragraph of the 404 page">
Please contact the owner of the site that linked you to the
original URL and let them know their link is broken.
</Translate>
</p>
</div>
</div>
</main>
);
}
31 changes: 31 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function uniquePath(path) {
const segments = path?.split("/").filter(Boolean);
for (let i = 0; i < segments.length; i++) {
if (segments.length === 2 && segments[i] === segments[i + 1]) {
return segments[0] + "/";
}
}
return path;
}


export function getValidPaths(items) {
return items?.flatMap((item) => {
const paths = [];

if (item?.label) {
if (item.label !== "Overview") {
const formattedTitle = `category/${item?.label.toLowerCase().replace(/\s+/g, "-")}`;
paths.push(formattedTitle);
}
}

if (item?.items) {
paths.push(...getValidPaths(item?.items));
} else if (typeof item === "string") {
paths.push(uniquePath(item));
}

return paths;
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Before you begin, ensure the following prerequisites are met:
see [Installing the KubeSlice Controller](/versioned_docs/version-0.2.0/getting-started-with-cloud-clusters/installing-kubeslice/installing-the-kubeslice-controller.mdx).
- You have registered two or more worker clusters with the KubeSlice Controller. For more information,
see [Registering the Worker Cluster](/versioned_docs/version-0.2.0/getting-started-with-cloud-clusters/installing-kubeslice/registering-the-worker-cluster.mdx).
- You have installed Istio in the worker clusters to configure the external gateways. For more information,
see [Installing Istio](/versioned_docs/version-0.2.0/getting-started-with-cloud-clusters/installing-kubeslice/installing-the-kubeslice-controller.mdx#installing-istio).
- You have installed Istio in the worker clusters to configure the external gateways.

## Creating the Slice YAML File

Expand Down Expand Up @@ -255,9 +254,9 @@ The following information is required.

|Variable|Description|
|----|----|
|<cluster name\>|The name of the cluster.|
|<slice configuration\>|The name of the slice configuration file.|
|<project namespace\>|The project namespace on which you apply the slice configuration file.|
|`<cluster name>`|The name of the cluster.|
|`<slice configuration>`|The name of the slice configuration file.|
|`<project namespace>`|The project namespace on which you apply the slice configuration file.|

Perform these steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ The following information is required.

|Parameter|Description|
|----|----|
|<cluster name\>|The name of the cluster.|
|<values\>|The name of the values file.|
|`<cluster name>`|The name of the cluster.|
|`<values >`|The name of the values file.|

Use the following command to apply the YAML:
```
Expand Down Expand Up @@ -196,7 +196,7 @@ The following information is required.

|Parameter|Description|
|-----|-----|
|<project name\>|The given name of the project YAML file.|
|<project name />|The given name of the project YAML file.|

Use the following command to apply the YAML file:
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ The following information is required.

|Values|Description|
|----|----|
|<cluster name\>|The name of the cluster.|
|<cluster registration\>|The name of the registration file.|
|<project namespace\>|The namespace of your project.|
|`<cluster name>`|The name of the cluster.|
|`<cluster registration>`|The name of the registration file.|
|`<project namespace>`|The namespace of your project.|

Perform these steps:

Expand Down Expand Up @@ -373,8 +373,8 @@ The following information is required to apply the YAML file.

|Parameter|Description|
|----|----|
|<cluster name\>|The name of the cluster.|
|<values\>|The file name with the values.|
|`<cluster name>`|The name of the cluster.|
|`<values>`|The file name with the values.|

Perform these steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Kubernetes Service (AKS) `kubeconfig`.

| **Variable** | **Description** |
|-----|-----|
| <resource group name\> | The name of the resource group the cluster belongs to.
<cluster name\> | The name of the cluster you would like to get credentials for.|
| `<resource group name>` | The name of the resource group the cluster belongs to.
`<cluster name>` | The name of the cluster you would like to get credentials for.|

The following command retrieves your AKS cluster `kubeconfig` and add it to your default `kubeconfig` path. Complete this step for each
AKS cluster that you want to work with.
Expand All @@ -43,8 +43,8 @@ Service (EKS) `kubeconfig`.

| **Variable** | **Description** |
|-----|----|
|<cluster name\> | The name of the cluster you want to get credentials for.|
| <cluster region\> | The AWS region the cluster belongs to.|
|`<cluster name>` | The name of the cluster you want to get credentials for.|
| `<cluster region>` | The AWS region the cluster belongs to.|

The following command retrieves your EKS cluster `kubeconfig` and adds
it to your default `kubeconfig` path. Complete this step for each EKS
Expand All @@ -62,9 +62,9 @@ Engine (GKE) `kubeconfig`.

| **Variable** | **Description** |
|-----|----|
|<cluster name\> | The name of the cluster you want to get credentials for.|
| <region\> | The region the cluster belongs to.|
| <project id\> | The project ID that the cluster belongs to.|
|`<cluster name>` | The name of the cluster you want to get credentials for.|
| `<region>` | The region the cluster belongs to.|
| `<project id>` | The project ID that the cluster belongs to.|


The following command retrieves your GKE cluster `kubeconfig` and adds
Expand Down Expand Up @@ -116,10 +116,10 @@ The following information is required to label the GKE cluster nodepools.

|**Variable** | **Description** |
|-----|----|
|<nodepool name\>| The name of the nodepool being labeled.|
|<cluster name\> | The name of the cluster the nodepool being labeled belongs to.|
| <region\> | The Compute Engine region for the cluster the nodepool belongs to.|
| <zone\> | The Compute Engine zone for the cluster the nodepool belongs to.|
|`<nodepool name>`| The name of the nodepool being labeled.|
|`<cluster name>` | The name of the cluster the nodepool being labeled belongs to.|
| `<region>` | The Compute Engine region for the cluster the nodepool belongs to.|
| `<zone>` | The Compute Engine zone for the cluster the nodepool belongs to.|

The following command labels the GKE cluster nodepool:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ automatically on all the clusters of the slice.

| Variables | Description |
|-------------------------|---------------------------------------------------------
| <cluster name\> | The name of the cluster the application is deployed on.|
|<serviceexport name\> | The name of the service export that you want to delete.|
| <namespace\> | The namespace the application is deployed on.|
| `<cluster name>` | The name of the cluster the application is deployed on.|
|`<serviceexport name>` | The name of the service export that you want to delete.|
| `<namespace>` | The namespace the application is deployed on.|

Switch the contexts to the cluster you deployed the application on:

Expand Down
Loading
Loading