Update nextjs (#550)

This commit is contained in:
Eduard Gert
2026-01-14 16:20:02 +01:00
committed by GitHub
parent 9794dd8398
commit 80f49501d4
11 changed files with 57 additions and 51 deletions

View File

@@ -65,7 +65,7 @@ function renderProperties(properties, required = [], depth = 0) {
}
%>>%>
<% if ((type === 'object' && value.properties) || (type === 'object[]' && value.items.properties)) { %>
<details class="custom-details" open>
<details className="custom-details" open>
<summary><%- value.description || 'More Information' %></summary>
<Properties>
<% if (type === 'object[]') { %>

View File

@@ -14,9 +14,11 @@ const withMDX = nextMDX({
})
const isProd = process.env.NODE_ENV === 'production'
/** @type {import('next').NextConfig} */
const nextConfig = {
assetPrefix: '/docs-static',
assetPrefix: isProd ? '/docs-static' : undefined,
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: {

View File

@@ -48,7 +48,7 @@
"lodash": "^4.17.21",
"mdast-util-to-string": "^3.2.0",
"mdx-annotations": "^0.1.1",
"next": "^13.4.1",
"next": "14.2.35",
"openapi-types": "^12.1.0",
"postcss-focus-visible": "^8.0.2",
"react": "18.2.0",

View File

@@ -1,5 +1,6 @@
import { useEffect, useRef } from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useInView } from 'framer-motion'
import { useSectionStore } from '@/components/SectionProvider'
@@ -39,9 +40,12 @@ function Eyebrow({ tag, label }) {
}
function Anchor({ id, inView, children }) {
const router = useRouter()
const pathname = router.pathname
return (
<Link
href={`#${id}`}
href={`${pathname}#${id}`}
className="group text-inherit no-underline hover:text-inherit"
>
{inView && (

View File

@@ -220,7 +220,7 @@ export function Layout({ children, title, tableOfContents }) {
className="dark:hover:text-slate-300 dark:text-slate-400 text-slate-500 hover:text-slate-700 font-normal'"
>
<FontAwesomeIcon icon={faPaperclip} style={iconStyle} className="icon pr-1" />
<text>Copy link</text>
<span>Copy link</span>
</button>
</li>
<li key="edit-on-github">
@@ -230,7 +230,7 @@ export function Layout({ children, title, tableOfContents }) {
style={{display: "flex", alignItems: 'center'}}
>
<FontAwesomeIcon icon={faGithub} style={iconStyle} className="icon pr-1" />
<text>Edit on Github</text>
<span>Edit on Github</span>
</Link>
</li>
</ol>

View File

@@ -436,7 +436,7 @@ echo $response;
<Properties><Property name="settings" type="object" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -502,7 +502,7 @@ echo $response;
</Property>
<Property name="extra" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -560,7 +560,7 @@ echo $response;
</Property>
<Property name="onboarding" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>

View File

@@ -238,7 +238,7 @@ echo $response;
</Property>
<Property name="nameservers" type="object[]" required={true} minLen={1} maxLen={3}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Nameserver list</summary>
<Properties>
@@ -892,7 +892,7 @@ echo $response;
</Property>
<Property name="nameservers" type="object[]" required={true} minLen={1} maxLen={3}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Nameserver list</summary>
<Properties>

View File

@@ -242,7 +242,7 @@ echo $response;
</Property>
<Property name="resources" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -802,7 +802,7 @@ echo $response;
</Property>
<Property name="resources" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>

View File

@@ -254,7 +254,7 @@ echo $response;
</Property>
<Property name="port_ranges" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of port ranges that are forwarded by the ingress peer</summary>
<Properties>
@@ -281,7 +281,7 @@ echo $response;
</Property>
<Property name="direct_port" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -862,7 +862,7 @@ echo $response;
</Property>
<Property name="port_ranges" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of port ranges that are forwarded by the ingress peer</summary>
<Properties>
@@ -889,7 +889,7 @@ echo $response;
</Property>
<Property name="direct_port" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>

View File

@@ -330,7 +330,7 @@ echo $response;
</Property>
<Property name="rules" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Policy rule object for policy UI editor</summary>
<Properties>
@@ -371,7 +371,7 @@ echo $response;
</Property>
<Property name="port_ranges" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Policy rule affected ports ranges list</summary>
<Properties>
@@ -408,7 +408,7 @@ echo $response;
</Property>
<Property name="sourceResource" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -435,7 +435,7 @@ echo $response;
</Property>
<Property name="destinationResource" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -1442,7 +1442,7 @@ echo $response;
</Property>
<Property name="rules" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Policy rule object for policy UI editor</summary>
<Properties>
@@ -1483,7 +1483,7 @@ echo $response;
</Property>
<Property name="port_ranges" type="object[]" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Policy rule affected ports ranges list</summary>
<Properties>
@@ -1520,7 +1520,7 @@ echo $response;
</Property>
<Property name="sourceResource" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -1547,7 +1547,7 @@ echo $response;
</Property>
<Property name="destinationResource" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>

View File

@@ -300,13 +300,13 @@ echo $response;
</Property>
<Property name="checks" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of objects that perform the actual checks</summary>
<Properties>
<Properties><Property name="nb_version_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -323,13 +323,13 @@ echo $response;
</Property>
<Property name="os_version_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
<Properties><Property name="android" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -346,7 +346,7 @@ echo $response;
</Property>
<Property name="darwin" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -363,7 +363,7 @@ echo $response;
</Property>
<Property name="ios" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -380,7 +380,7 @@ echo $response;
</Property>
<Property name="linux" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check with the kernel version</summary>
<Properties>
@@ -397,7 +397,7 @@ echo $response;
</Property>
<Property name="windows" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check with the kernel version</summary>
<Properties>
@@ -420,13 +420,13 @@ echo $response;
</Property>
<Property name="geo_location_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for geo location</summary>
<Properties>
<Properties><Property name="locations" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of geo locations to which the policy applies</summary>
<Properties>
@@ -459,7 +459,7 @@ echo $response;
</Property>
<Property name="peer_network_range_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for allow or deny access based on peer local network addresses</summary>
<Properties>
@@ -481,13 +481,13 @@ echo $response;
</Property>
<Property name="process_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture Check for binaries exist and are running in the peers system</summary>
<Properties>
<Properties><Property name="processes" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>
@@ -1476,13 +1476,13 @@ echo $response;
</Property>
<Property name="checks" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of objects that perform the actual checks</summary>
<Properties>
<Properties><Property name="nb_version_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -1499,13 +1499,13 @@ echo $response;
</Property>
<Property name="os_version_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
<Properties><Property name="android" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -1522,7 +1522,7 @@ echo $response;
</Property>
<Property name="darwin" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -1539,7 +1539,7 @@ echo $response;
</Property>
<Property name="ios" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for the version of operating system</summary>
<Properties>
@@ -1556,7 +1556,7 @@ echo $response;
</Property>
<Property name="linux" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check with the kernel version</summary>
<Properties>
@@ -1573,7 +1573,7 @@ echo $response;
</Property>
<Property name="windows" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check with the kernel version</summary>
<Properties>
@@ -1596,13 +1596,13 @@ echo $response;
</Property>
<Property name="geo_location_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for geo location</summary>
<Properties>
<Properties><Property name="locations" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>List of geo locations to which the policy applies</summary>
<Properties>
@@ -1635,7 +1635,7 @@ echo $response;
</Property>
<Property name="peer_network_range_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture check for allow or deny access based on peer local network addresses</summary>
<Properties>
@@ -1657,13 +1657,13 @@ echo $response;
</Property>
<Property name="process_check" type="object" required={false}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>Posture Check for binaries exist and are running in the peers system</summary>
<Properties>
<Properties><Property name="processes" type="object[]" required={true}>
<details class="custom-details" open>
<details className="custom-details" open>
<summary>More Information</summary>
<Properties>