From 80f49501d4609173df46c875e56b053cf88c1f93 Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Wed, 14 Jan 2026 16:20:02 +0100 Subject: [PATCH] Update nextjs (#550) --- generator/templates/ApiTemplate.ts | 2 +- next.config.mjs | 4 +- package.json | 2 +- src/components/Heading.jsx | 6 ++- src/components/Layout.jsx | 4 +- src/pages/ipa/resources/accounts.mdx | 6 +-- src/pages/ipa/resources/dns.mdx | 4 +- src/pages/ipa/resources/groups.mdx | 4 +- src/pages/ipa/resources/ingress-ports.mdx | 8 ++-- src/pages/ipa/resources/policies.mdx | 16 +++---- src/pages/ipa/resources/posture-checks.mdx | 52 +++++++++++----------- 11 files changed, 57 insertions(+), 51 deletions(-) diff --git a/generator/templates/ApiTemplate.ts b/generator/templates/ApiTemplate.ts index bd4ca121..8ae87c20 100644 --- a/generator/templates/ApiTemplate.ts +++ b/generator/templates/ApiTemplate.ts @@ -65,7 +65,7 @@ function renderProperties(properties, required = [], depth = 0) { } %>>%> <% if ((type === 'object' && value.properties) || (type === 'object[]' && value.items.properties)) { %> -
+
<%- value.description || 'More Information' %> <% if (type === 'object[]') { %> diff --git a/next.config.mjs b/next.config.mjs index 8d47c918..041e4004 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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: { diff --git a/package.json b/package.json index c9291b72..a7db7468 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/Heading.jsx b/src/components/Heading.jsx index 518cf0f6..96be4464 100644 --- a/src/components/Heading.jsx +++ b/src/components/Heading.jsx @@ -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 ( {inView && ( diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 1936b865..025700e2 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -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'" > - Copy link + Copy link
  • @@ -230,7 +230,7 @@ export function Layout({ children, title, tableOfContents }) { style={{display: "flex", alignItems: 'center'}} > - Edit on Github + Edit on Github
  • diff --git a/src/pages/ipa/resources/accounts.mdx b/src/pages/ipa/resources/accounts.mdx index bd3c42f9..3356a7e9 100644 --- a/src/pages/ipa/resources/accounts.mdx +++ b/src/pages/ipa/resources/accounts.mdx @@ -436,7 +436,7 @@ echo $response; -
    +
    More Information @@ -502,7 +502,7 @@ echo $response; -
    +
    More Information @@ -560,7 +560,7 @@ echo $response; -
    +
    More Information diff --git a/src/pages/ipa/resources/dns.mdx b/src/pages/ipa/resources/dns.mdx index 8ca013e2..7a520dc6 100644 --- a/src/pages/ipa/resources/dns.mdx +++ b/src/pages/ipa/resources/dns.mdx @@ -238,7 +238,7 @@ echo $response; -
    +
    Nameserver list @@ -892,7 +892,7 @@ echo $response; -
    +
    Nameserver list diff --git a/src/pages/ipa/resources/groups.mdx b/src/pages/ipa/resources/groups.mdx index 888935a4..c336f2fa 100644 --- a/src/pages/ipa/resources/groups.mdx +++ b/src/pages/ipa/resources/groups.mdx @@ -242,7 +242,7 @@ echo $response; -
    +
    More Information @@ -802,7 +802,7 @@ echo $response; -
    +
    More Information diff --git a/src/pages/ipa/resources/ingress-ports.mdx b/src/pages/ipa/resources/ingress-ports.mdx index e9c19ce5..9d7326e2 100644 --- a/src/pages/ipa/resources/ingress-ports.mdx +++ b/src/pages/ipa/resources/ingress-ports.mdx @@ -254,7 +254,7 @@ echo $response; -
    +
    List of port ranges that are forwarded by the ingress peer @@ -281,7 +281,7 @@ echo $response; -
    +
    More Information @@ -862,7 +862,7 @@ echo $response; -
    +
    List of port ranges that are forwarded by the ingress peer @@ -889,7 +889,7 @@ echo $response; -
    +
    More Information diff --git a/src/pages/ipa/resources/policies.mdx b/src/pages/ipa/resources/policies.mdx index 288b8674..6b89cb42 100644 --- a/src/pages/ipa/resources/policies.mdx +++ b/src/pages/ipa/resources/policies.mdx @@ -330,7 +330,7 @@ echo $response; -
    +
    Policy rule object for policy UI editor @@ -371,7 +371,7 @@ echo $response; -
    +
    Policy rule affected ports ranges list @@ -408,7 +408,7 @@ echo $response; -
    +
    More Information @@ -435,7 +435,7 @@ echo $response; -
    +
    More Information @@ -1442,7 +1442,7 @@ echo $response; -
    +
    Policy rule object for policy UI editor @@ -1483,7 +1483,7 @@ echo $response; -
    +
    Policy rule affected ports ranges list @@ -1520,7 +1520,7 @@ echo $response; -
    +
    More Information @@ -1547,7 +1547,7 @@ echo $response; -
    +
    More Information diff --git a/src/pages/ipa/resources/posture-checks.mdx b/src/pages/ipa/resources/posture-checks.mdx index 1b6a314a..c97b2690 100644 --- a/src/pages/ipa/resources/posture-checks.mdx +++ b/src/pages/ipa/resources/posture-checks.mdx @@ -300,13 +300,13 @@ echo $response; -
    +
    List of objects that perform the actual checks -
    +
    Posture check for the version of operating system @@ -323,13 +323,13 @@ echo $response; -
    +
    Posture check for the version of operating system -
    +
    Posture check for the version of operating system @@ -346,7 +346,7 @@ echo $response; -
    +
    Posture check for the version of operating system @@ -363,7 +363,7 @@ echo $response; -
    +
    Posture check for the version of operating system @@ -380,7 +380,7 @@ echo $response; -
    +
    Posture check with the kernel version @@ -397,7 +397,7 @@ echo $response; -
    +
    Posture check with the kernel version @@ -420,13 +420,13 @@ echo $response; -
    +
    Posture check for geo location -
    +
    List of geo locations to which the policy applies @@ -459,7 +459,7 @@ echo $response; -
    +
    Posture check for allow or deny access based on peer local network addresses @@ -481,13 +481,13 @@ echo $response; -
    +
    Posture Check for binaries exist and are running in the peer’s system -
    +
    More Information @@ -1476,13 +1476,13 @@ echo $response; -
    +
    List of objects that perform the actual checks -
    +
    Posture check for the version of operating system @@ -1499,13 +1499,13 @@ echo $response; -
    +
    Posture check for the version of operating system -
    +
    Posture check for the version of operating system @@ -1522,7 +1522,7 @@ echo $response; -
    +
    Posture check for the version of operating system @@ -1539,7 +1539,7 @@ echo $response; -
    +
    Posture check for the version of operating system @@ -1556,7 +1556,7 @@ echo $response; -
    +
    Posture check with the kernel version @@ -1573,7 +1573,7 @@ echo $response; -
    +
    Posture check with the kernel version @@ -1596,13 +1596,13 @@ echo $response; -
    +
    Posture check for geo location -
    +
    List of geo locations to which the policy applies @@ -1635,7 +1635,7 @@ echo $response; -
    +
    Posture check for allow or deny access based on peer local network addresses @@ -1657,13 +1657,13 @@ echo $response; -
    +
    Posture Check for binaries exist and are running in the peer’s system -
    +
    More Information