From 70033d57a24612f2f70482ae793c3bee3e5eec3f Mon Sep 17 00:00:00 2001 From: Prikshit Singh <99068054+prikshitsingh24@users.noreply.github.com> Date: Sun, 8 Sep 2024 23:15:29 +0530 Subject: [PATCH 01/16] docs(website): improve Blog page Layout (#1153) Signed-off-by: Philip Miglinci Co-authored-by: Philip Miglinci --- website/src/theme/BlogLayout/index.tsx | 8 ++ .../BlogListPage/StructuredData/index.tsx | 14 +++ website/src/theme/BlogListPage/index.tsx | 57 ++++++++++++ .../theme/BlogPostItem/Container/index.tsx | 9 ++ .../src/theme/BlogPostItem/Content/index.tsx | 24 ++++++ .../Footer/ReadMoreLink/index.tsx | 37 ++++++++ .../src/theme/BlogPostItem/Footer/index.tsx | 86 +++++++++++++++++++ .../BlogPostItem/Header/Author/index.tsx | 40 +++++++++ .../BlogPostItem/Header/Authors/index.tsx | 35 ++++++++ .../Header/Authors/styles.module.css | 9 ++ .../theme/BlogPostItem/Header/Info/index.tsx | 77 +++++++++++++++++ .../Header/Info/styles.module.css | 5 ++ .../theme/BlogPostItem/Header/Title/index.tsx | 19 ++++ .../Header/Title/styles.module.css | 16 ++++ .../src/theme/BlogPostItem/Header/index.tsx | 14 +++ website/src/theme/BlogPostItem/index.tsx | 82 +++++++++++++++--- .../src/theme/BlogPostItem/styles.module.css | 32 +++++++ .../LatestBlogPostItem/LatestBlogPostItem.tsx | 32 +++++++ .../LatestBlogPostItem/styles.module.css | 41 +++++++++ website/src/theme/BlogPostItems/index.tsx | 46 ++++++++++ .../src/theme/BlogPostItems/styles.module.css | 23 +++++ website/src/theme/BlogPostPaginator/index.tsx | 53 ++++++++++++ website/src/theme/BlogSidebar/index.tsx | 18 ++++ 23 files changed, 765 insertions(+), 12 deletions(-) create mode 100644 website/src/theme/BlogLayout/index.tsx create mode 100644 website/src/theme/BlogListPage/StructuredData/index.tsx create mode 100644 website/src/theme/BlogListPage/index.tsx create mode 100644 website/src/theme/BlogPostItem/Container/index.tsx create mode 100644 website/src/theme/BlogPostItem/Content/index.tsx create mode 100644 website/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx create mode 100644 website/src/theme/BlogPostItem/Footer/index.tsx create mode 100644 website/src/theme/BlogPostItem/Header/Author/index.tsx create mode 100644 website/src/theme/BlogPostItem/Header/Authors/index.tsx create mode 100644 website/src/theme/BlogPostItem/Header/Authors/styles.module.css create mode 100644 website/src/theme/BlogPostItem/Header/Info/index.tsx create mode 100644 website/src/theme/BlogPostItem/Header/Info/styles.module.css create mode 100644 website/src/theme/BlogPostItem/Header/Title/index.tsx create mode 100644 website/src/theme/BlogPostItem/Header/Title/styles.module.css create mode 100644 website/src/theme/BlogPostItem/Header/index.tsx create mode 100644 website/src/theme/BlogPostItem/styles.module.css create mode 100644 website/src/theme/BlogPostItems/LatestBlogPostItem/LatestBlogPostItem.tsx create mode 100644 website/src/theme/BlogPostItems/LatestBlogPostItem/styles.module.css create mode 100644 website/src/theme/BlogPostItems/index.tsx create mode 100644 website/src/theme/BlogPostItems/styles.module.css create mode 100644 website/src/theme/BlogPostPaginator/index.tsx create mode 100644 website/src/theme/BlogSidebar/index.tsx diff --git a/website/src/theme/BlogLayout/index.tsx b/website/src/theme/BlogLayout/index.tsx new file mode 100644 index 000000000..e15f7b032 --- /dev/null +++ b/website/src/theme/BlogLayout/index.tsx @@ -0,0 +1,8 @@ +import type {Props} from '@theme/BlogLayout'; +import Layout from '@theme/Layout'; + +export default function BlogLayout(props: Props): JSX.Element { + const {children, ...layoutProps} = props; + + return {children}; +} diff --git a/website/src/theme/BlogListPage/StructuredData/index.tsx b/website/src/theme/BlogListPage/StructuredData/index.tsx new file mode 100644 index 000000000..1bece9438 --- /dev/null +++ b/website/src/theme/BlogListPage/StructuredData/index.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import Head from '@docusaurus/Head'; +import type {Props} from '@theme/BlogListPage/StructuredData'; + +export default function BlogListPageStructuredData(props: Props): JSX.Element { + const structuredData = props; + return ( + + + + ); +} diff --git a/website/src/theme/BlogListPage/index.tsx b/website/src/theme/BlogListPage/index.tsx new file mode 100644 index 000000000..5c789c2dc --- /dev/null +++ b/website/src/theme/BlogListPage/index.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import clsx from 'clsx'; + +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import { + PageMetadata, + HtmlClassNameProvider, + ThemeClassNames, +} from '@docusaurus/theme-common'; +import BlogLayout from '@theme/BlogLayout'; +import BlogListPaginator from '@theme/BlogListPaginator'; +import SearchMetadata from '@theme/SearchMetadata'; +import type {Props} from '@theme/BlogListPage'; +import BlogListPageStructuredData from '@theme/BlogListPage/StructuredData'; +import BlogPostItems from '../BlogPostItems'; + +function BlogListPageMetadata(props: Props): JSX.Element { + const {metadata} = props; + const { + siteConfig: {title: siteTitle}, + } = useDocusaurusContext(); + const {blogDescription, blogTitle, permalink} = metadata; + const isBlogOnlyMode = permalink === '/'; + const title = isBlogOnlyMode ? siteTitle : blogTitle; + return ( + <> + + + + ); +} + +function BlogListPageContent(props: Props): JSX.Element { + const {metadata, items, sidebar} = props; + return ( + + +
+ +
+
+ ); +} + +export default function BlogListPage(props: Props): JSX.Element { + return ( + + + + + + ); +} diff --git a/website/src/theme/BlogPostItem/Container/index.tsx b/website/src/theme/BlogPostItem/Container/index.tsx new file mode 100644 index 000000000..1768db1d8 --- /dev/null +++ b/website/src/theme/BlogPostItem/Container/index.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import type {Props} from '@theme/BlogPostItem/Container'; + +export default function BlogPostItemContainer({ + children, + className, +}: Props): JSX.Element { + return
{children}
; +} diff --git a/website/src/theme/BlogPostItem/Content/index.tsx b/website/src/theme/BlogPostItem/Content/index.tsx new file mode 100644 index 000000000..938951eb7 --- /dev/null +++ b/website/src/theme/BlogPostItem/Content/index.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import clsx from 'clsx'; +import {blogPostContainerID} from '@docusaurus/utils-common'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import MDXContent from '@theme/MDXContent'; +import type {Props} from '@theme/BlogPostItem/Content'; + +export default function BlogPostItemContent({ + children, + className, +}: Props): JSX.Element { + const {isBlogPostPage} = useBlogPost(); + + if (!isBlogPostPage) return null; + + return ( +
+ {children} +
+ ); +} diff --git a/website/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx b/website/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx new file mode 100644 index 000000000..703db1343 --- /dev/null +++ b/website/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import Translate, {translate} from '@docusaurus/Translate'; +import Link from '@docusaurus/Link'; +import type {Props} from '@theme/BlogPostItem/Footer/ReadMoreLink'; + +function ReadMoreLabel() { + return ( + + + Read More + + + ); +} + +export default function BlogPostItemFooterReadMoreLink( + props: Props, +): JSX.Element { + const {blogPostTitle, ...linkProps} = props; + return ( + + + + ); +} diff --git a/website/src/theme/BlogPostItem/Footer/index.tsx b/website/src/theme/BlogPostItem/Footer/index.tsx new file mode 100644 index 000000000..9981e67b1 --- /dev/null +++ b/website/src/theme/BlogPostItem/Footer/index.tsx @@ -0,0 +1,86 @@ +import React from 'react'; +import clsx from 'clsx'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import {ThemeClassNames} from '@docusaurus/theme-common'; +import EditMetaRow from '@theme/EditMetaRow'; +import TagsListInline from '@theme/TagsListInline'; +import ReadMoreLink from '@theme/BlogPostItem/Footer/ReadMoreLink'; +import {BlogDiscussion} from '@site/src/components/GiscusWrapper'; + +export default function BlogPostItemFooter(): JSX.Element | null { + const {metadata, isBlogPostPage} = useBlogPost(); + const {enableComments = true} = metadata.frontMatter; + const { + tags, + title, + editUrl, + hasTruncateMarker, + lastUpdatedBy, + lastUpdatedAt, + } = metadata; + + // A post is truncated if it's in the "list view" and it has a truncate marker + const truncatedPost = !isBlogPostPage && hasTruncateMarker; + + const tagsExists = tags.length > 0; + + const renderFooter = tagsExists || truncatedPost || editUrl; + + if (!renderFooter) { + return null; + } + + // BlogPost footer - details view + if (isBlogPostPage) { + const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy); + + return ( +
+ {tagsExists && ( +
+
+ +
+
+ )} + {canDisplayEditMetaRow && ( + + )} + {enableComments && } +
+ ); + } + // BlogPost footer - list view + else { + return ( +
+ {tagsExists && ( +
+ +
+ )} + {truncatedPost && ( +
+ +
+ )} +
+ ); + } +} diff --git a/website/src/theme/BlogPostItem/Header/Author/index.tsx b/website/src/theme/BlogPostItem/Header/Author/index.tsx new file mode 100644 index 000000000..915c0fb93 --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Author/index.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import clsx from 'clsx'; +import Link, {type Props as LinkProps} from '@docusaurus/Link'; + +import type {Props} from '@theme/BlogPostItem/Header/Author'; + +function MaybeLink(props: LinkProps): JSX.Element { + if (props.href) { + return ; + } + return <>{props.children}; +} + +export default function BlogPostItemHeaderAuthor({ + author, + className, +}: Props): JSX.Element { + const {name, title, url, imageURL, email} = author; + const link = url || (email && `mailto:${email}`) || undefined; + return ( +
+ {imageURL && ( + + {name} + + )} + + {name && ( +
+
+ + {name} + +
+ {title && {title}} +
+ )} +
+ ); +} diff --git a/website/src/theme/BlogPostItem/Header/Authors/index.tsx b/website/src/theme/BlogPostItem/Header/Authors/index.tsx new file mode 100644 index 000000000..47f31b884 --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Authors/index.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import clsx from 'clsx'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import BlogPostItemHeaderAuthor from '@theme/BlogPostItem/Header/Author'; +import type {Props} from '@theme/BlogPostItem/Header/Authors'; +import styles from './styles.module.css'; + +// Component responsible for the authors layout +export default function BlogPostItemHeaderAuthors({ + className, +}: Props): JSX.Element | null { + const { + metadata: {authors}, + assets, + } = useBlogPost(); + const authorsCount = authors.length; + if (authorsCount === 0) { + return null; + } + return ( +
+ {authors.map((author, idx) => ( +
+ +
+ ))} +
+ ); +} diff --git a/website/src/theme/BlogPostItem/Header/Authors/styles.module.css b/website/src/theme/BlogPostItem/Header/Authors/styles.module.css new file mode 100644 index 000000000..31133a09b --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Authors/styles.module.css @@ -0,0 +1,9 @@ +.authorCol { + max-width: inherit !important; + flex-grow: 1 !important; + } + + .imageOnlyAuthorRow { + flex-flow: row wrap; + gap: 0.7rem; + } \ No newline at end of file diff --git a/website/src/theme/BlogPostItem/Header/Info/index.tsx b/website/src/theme/BlogPostItem/Header/Info/index.tsx new file mode 100644 index 000000000..a492030ff --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Info/index.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import clsx from 'clsx'; +import {translate} from '@docusaurus/Translate'; +import {usePluralForm} from '@docusaurus/theme-common'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import {useDateTimeFormat} from '@docusaurus/theme-common/internal'; +import type {Props} from '@theme/BlogPostItem/Header/Info'; + +import styles from './styles.module.css'; + +// Very simple pluralization: probably good enough for now +function useReadingTimePlural() { + const {selectMessage} = usePluralForm(); + return (readingTimeFloat: number) => { + const readingTime = Math.ceil(readingTimeFloat); + return selectMessage( + readingTime, + translate( + { + id: 'theme.blog.post.readingTime.plurals', + description: + 'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)', + message: 'One min read|{readingTime} min read', + }, + {readingTime}, + ), + ); + }; +} + +function ReadingTime({readingTime}: {readingTime: number}) { + const readingTimePlural = useReadingTimePlural(); + return <>{readingTimePlural(readingTime)}; +} + +function DateTime({ + date, + formattedDate, +}: { + date: string; + formattedDate: string; +}) { + return ; +} + +function Spacer() { + return <>{' · '}; +} + +export default function BlogPostItemHeaderInfo({ + className, +}: Props): JSX.Element { + const {metadata} = useBlogPost(); + const {date, readingTime} = metadata; + + const dateTimeFormat = useDateTimeFormat({ + day: 'numeric', + month: 'long', + year: 'numeric', + timeZone: 'UTC', + }); + + const formatDate = (blogDate: string) => + dateTimeFormat.format(new Date(blogDate)); + + return ( +
+ + {typeof readingTime !== 'undefined' && ( + <> + + + + )} +
+ ); +} diff --git a/website/src/theme/BlogPostItem/Header/Info/styles.module.css b/website/src/theme/BlogPostItem/Header/Info/styles.module.css new file mode 100644 index 000000000..7ecb882e4 --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Info/styles.module.css @@ -0,0 +1,5 @@ +.container { + font-size: 0.9rem; + display: flex; + gap: 0.5rem; + } \ No newline at end of file diff --git a/website/src/theme/BlogPostItem/Header/Title/index.tsx b/website/src/theme/BlogPostItem/Header/Title/index.tsx new file mode 100644 index 000000000..ea8617330 --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Title/index.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import clsx from 'clsx'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import type {Props} from '@theme/BlogPostItem/Header/Title'; + +import styles from './styles.module.css'; + +export default function BlogPostItemHeaderTitle({ + className, +}: Props): JSX.Element { + const {metadata, isBlogPostPage} = useBlogPost(); + const {title} = metadata; + const TitleHeading = isBlogPostPage ? 'h1' : 'h2'; + return ( + + {title} + + ); +} diff --git a/website/src/theme/BlogPostItem/Header/Title/styles.module.css b/website/src/theme/BlogPostItem/Header/Title/styles.module.css new file mode 100644 index 000000000..627caaeec --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/Title/styles.module.css @@ -0,0 +1,16 @@ +h2.title { + font-size: 1.2rem; + } + + .title a { + text-decoration: none !important; + } + + /** + Blog post title should be smaller on smaller devices + **/ + @media (max-width: 576px) { + h2.title { + font-size: 1rem; + } + } \ No newline at end of file diff --git a/website/src/theme/BlogPostItem/Header/index.tsx b/website/src/theme/BlogPostItem/Header/index.tsx new file mode 100644 index 000000000..086bbcf7e --- /dev/null +++ b/website/src/theme/BlogPostItem/Header/index.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import BlogPostItemHeaderTitle from '@theme/BlogPostItem/Header/Title'; +import BlogPostItemHeaderInfo from '@theme/BlogPostItem/Header/Info'; +import BlogPostItemHeaderAuthors from '@theme/BlogPostItem/Header/Authors'; + +export default function BlogPostItemHeader(): JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/website/src/theme/BlogPostItem/index.tsx b/website/src/theme/BlogPostItem/index.tsx index 63430b86a..162009582 100644 --- a/website/src/theme/BlogPostItem/index.tsx +++ b/website/src/theme/BlogPostItem/index.tsx @@ -1,20 +1,78 @@ import React from 'react'; -import BlogPostItem from '@theme-original/BlogPostItem'; -import type BlogPostItemType from '@theme/BlogPostItem'; -import type {WrapperProps} from '@docusaurus/types'; +import clsx from 'clsx'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; -import {BlogDiscussion} from '@site/src/components/GiscusWrapper'; +import BlogPostItemHeader from '@theme/BlogPostItem/Header'; +import BlogPostItemContent from '@theme/BlogPostItem/Content'; +import BlogPostItemFooter from '@theme/BlogPostItem/Footer'; +import TOC from '@theme/TOC'; +import type {Props} from '@theme/BlogPostItem'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import styles from './styles.module.css'; +import Link from '@docusaurus/Link'; +import BlogPostItemHeaderTitle from './Header/Title'; +import BlogPostItemHeaderAuthors from './Header/Authors'; +import BlogPostItemHeaderInfo from './Header/Info'; +import BlogSidebar from '@theme/BlogSidebar'; -type Props = WrapperProps; +export default function BlogPostItem({ + children, + className, +}: Props): JSX.Element { + const post = useBlogPost(); -export default function BlogPostItemWrapper(props: Props) { - const {metadata, isBlogPostPage} = useBlogPost(); - const {enableComments = true} = metadata.frontMatter; + const isPage = post.isBlogPostPage; + const isTOC = isPage && post.toc?.length > 0; + // Post preview as a card + if (!isPage) { + return ( + +
+ article image +
+ +
+
+ + +
+
Read more {`->`}
+
+
+
+ + ); + } + + // Full post page return ( - <> - - {enableComments && isBlogPostPage && } - +
+
+
+
+ +
+
+ + {children} + +
+ + {isTOC && ( +
+ +
+ )} +
+
+
); } diff --git a/website/src/theme/BlogPostItem/styles.module.css b/website/src/theme/BlogPostItem/styles.module.css new file mode 100644 index 000000000..e9f6f69ed --- /dev/null +++ b/website/src/theme/BlogPostItem/styles.module.css @@ -0,0 +1,32 @@ +.postCard { + height: 100%; + text-decoration: none; + } + + a.postLink { + text-decoration: none !important; + border: 1px solid transparent; + border-radius: var(--ifm-card-border-radius); + /* color: #fff; */ + } + + a.postLink:hover { + border: 1px solid #605e5c; + } + + .postCardHeader { + display: flex; + flex-direction: column; + padding: 1rem; + flex-grow: 1; + } + + .postCardBottom { + margin-top: auto; + display: flex; + } + + .readMore { + margin-left: auto; + align-self: flex-end; + } \ No newline at end of file diff --git a/website/src/theme/BlogPostItems/LatestBlogPostItem/LatestBlogPostItem.tsx b/website/src/theme/BlogPostItems/LatestBlogPostItem/LatestBlogPostItem.tsx new file mode 100644 index 000000000..4171bf283 --- /dev/null +++ b/website/src/theme/BlogPostItems/LatestBlogPostItem/LatestBlogPostItem.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import styles from './styles.module.css'; +import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import BlogPostItemHeaderAuthors from '../../BlogPostItem/Header/Authors'; +import BlogPostItemHeaderInfo from '../../BlogPostItem/Header/Info'; +import Link from '@docusaurus/Link'; +import {Props} from '@theme/BlogPostItem'; + +export function LatestBlogPostItem({children}: Props) { + const post = useBlogPost(); + return ( +
+ +
+

{post.metadata.title}

+ +
+ + +
+ +
{children}
+ Read more {`->`} +
+
+ ); +} diff --git a/website/src/theme/BlogPostItems/LatestBlogPostItem/styles.module.css b/website/src/theme/BlogPostItems/LatestBlogPostItem/styles.module.css new file mode 100644 index 000000000..41f066422 --- /dev/null +++ b/website/src/theme/BlogPostItems/LatestBlogPostItem/styles.module.css @@ -0,0 +1,41 @@ +.container { + display: flex; + gap: 3rem; + } + + .metaContainer { + display: flex; + flex-direction: column; + gap: 0rem; + } + + .info { + display: flex; + gap: 2rem; + } + + .image { + width: 50%; + object-fit:cover; + border-radius: var(--ifm-card-border-radius); + flex-shrink: 0; + } + + .title { + font-size: 2.5rem; + margin-bottom: 1.5rem; + } + + .content { + margin-top: 2rem; + } + + @media (max-width: 1000px) { + .container { + flex-direction: column; + } + .image { + height: 250px; + width: 100%; + } + } \ No newline at end of file diff --git a/website/src/theme/BlogPostItems/index.tsx b/website/src/theme/BlogPostItems/index.tsx new file mode 100644 index 000000000..5f54347ac --- /dev/null +++ b/website/src/theme/BlogPostItems/index.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import {BlogPostProvider} from '@docusaurus/plugin-content-blog/client'; +import BlogPostItem from '@theme/BlogPostItem'; +import type {Props} from '@theme/BlogPostItems'; +import {LatestBlogPostItem} from './LatestBlogPostItem/LatestBlogPostItem'; +import styles from './styles.module.css'; +import {BlogPaginatedMetadata} from '@docusaurus/plugin-content-blog'; + +export default function BlogPostItems({ + items, + metadata, + component: BlogPostItemComponent = BlogPostItem, +}: Props & {metadata: BlogPaginatedMetadata}): JSX.Element { + const [latestBlog, ...rest] = items; + const showLatest = metadata?.page === 1; + + return ( + <> + {showLatest && ( +
+
+

Latest

+ + {latestBlog.content} + +
+
+ )} +
+
+ {(showLatest ? rest : items).map(({content: BlogPostContent}) => ( + + + + + + ))} +
+
+ + ); +} diff --git a/website/src/theme/BlogPostItems/styles.module.css b/website/src/theme/BlogPostItems/styles.module.css new file mode 100644 index 000000000..eabe5da7b --- /dev/null +++ b/website/src/theme/BlogPostItems/styles.module.css @@ -0,0 +1,23 @@ +:root { + --blog-latest-background: #f8f8f8; + } + + html[data-theme="dark"] { + --blog-latest-background: #292827; + } + + .latestContainer { + padding: 5rem 0 6rem 0; + background: radial-gradient(circle at 10% 10%, var(--glasskube-pink), transparent 90%), + radial-gradient(circle at 90% 400px, var(--glasskube-main-3), transparent 20%); + } + + .itemGrid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); + gap: 2rem; + } + + .title { + font-size: 40px; + } diff --git a/website/src/theme/BlogPostPaginator/index.tsx b/website/src/theme/BlogPostPaginator/index.tsx new file mode 100644 index 000000000..fc280d3d4 --- /dev/null +++ b/website/src/theme/BlogPostPaginator/index.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import Translate, {translate} from '@docusaurus/Translate'; +import PaginatorNavLink from '@theme/PaginatorNavLink'; +import type {Props} from '@theme/BlogPostPaginator'; + +export default function BlogPostPaginator(props: Props): JSX.Element { + const {nextItem, prevItem} = props; + + return ( + + ); +} diff --git a/website/src/theme/BlogSidebar/index.tsx b/website/src/theme/BlogSidebar/index.tsx new file mode 100644 index 000000000..563e29bfd --- /dev/null +++ b/website/src/theme/BlogSidebar/index.tsx @@ -0,0 +1,18 @@ +import Link from '@docusaurus/Link'; +import React from 'react'; + +export default function BlogSidebar(): JSX.Element { + return ( +
+
Recent posts
+
+ + View Recent posts + +
+
+ ); +} From 511a66b738cd60ea0fff6752cfecb71ee41c8933 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:17:31 -0700 Subject: [PATCH 02/16] fix(deps): update dependency @getcanary/web to ^0.0.102 (#1204) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package-lock.json | 8 ++++---- website/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index a4dbaf1ba..902cd22a7 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -21,7 +21,7 @@ "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", "@getcanary/docusaurus-theme-search-pagefind": "^0.0.13", - "@getcanary/web": "^0.0.101", + "@getcanary/web": "^0.0.102", "@giscus/react": "^3.0.0", "@lottiefiles/react-lottie-player": "^3.5.3", "@mdx-js/react": "^3.0.0", @@ -3370,9 +3370,9 @@ } }, "node_modules/@getcanary/web": { - "version": "0.0.101", - "resolved": "https://registry.npmjs.org/@getcanary/web/-/web-0.0.101.tgz", - "integrity": "sha512-/GeoSpVKq0w2HmjeF855zOeKE8a6cFcdtAsLHC0/ATJTkrAjAuAaTn5We0WX2w0UGBdzHuc94bYXJCklbTEoCg==", + "version": "0.0.102", + "resolved": "https://registry.npmjs.org/@getcanary/web/-/web-0.0.102.tgz", + "integrity": "sha512-o21n9KYHwHk/M16WSghXTkKT3kkGTXu0dusTT3Jdir0Kh5ohgZxKxClOcjP45CCuIV/s+qRUtlKoAb7U1swzdw==", "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.6.8", diff --git a/website/package.json b/website/package.json index 605374e61..87d4fa944 100644 --- a/website/package.json +++ b/website/package.json @@ -31,7 +31,7 @@ "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", "@getcanary/docusaurus-theme-search-pagefind": "^0.0.13", - "@getcanary/web": "^0.0.101", + "@getcanary/web": "^0.0.102", "@giscus/react": "^3.0.0", "@lottiefiles/react-lottie-player": "^3.5.3", "@mdx-js/react": "^3.0.0", From 371474cf3b58ed88d8a3de48bf5815f802989dff Mon Sep 17 00:00:00 2001 From: Jake Page <38757612+jakepage91@users.noreply.github.com> Date: Sun, 8 Sep 2024 19:18:09 -0700 Subject: [PATCH 03/16] docs(website): change the site banner (#1206) Co-authored-by: Philip Miglinci --- website/docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 19ab2dd3b..739a30e92 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -128,7 +128,7 @@ const config: Config = { }, announcementBar: { id: 'announcementBar-1', // Increment on change - content: `🧊 Glasskube Native Packages are on the horizon! 😎 Help us make architecture decisions 💡`, + content: `Launch Week #2: September 9-13 🧊 See what's new! 🌵`, isCloseable: false, }, image: From 243798e860785da5db4b80815e136e9bfab436b0 Mon Sep 17 00:00:00 2001 From: Philip Miglinci Date: Mon, 9 Sep 2024 10:25:48 -0700 Subject: [PATCH 04/16] docs(website): improve launch week wording (#1213) Signed-off-by: Philip Miglinci --- .../blog/2024-09-09-launch-week-2/index.mdx | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/website/blog/2024-09-09-launch-week-2/index.mdx b/website/blog/2024-09-09-launch-week-2/index.mdx index 819db166e..4ed21848d 100644 --- a/website/blog/2024-09-09-launch-week-2/index.mdx +++ b/website/blog/2024-09-09-launch-week-2/index.mdx @@ -1,7 +1,7 @@ --- slug: launch-week-number-2 title: Launch week 2 - A new frontier of Kubernetes package management -description: We have happy to announce the second official Glasskube Launch week, full of updates, fun and a whole lot of Kubernetes package management. +description: We have happy to announce the second official Glasskube Launch week, full of updates, fun and a whole lot of Kubernetes package management. authors: [ jpage, pmig ] tags: [ glasskube, gitops, launch-week] image: https://github.com/user-attachments/assets/3d4d0bee-fa39-4d52-8873-09d9226c1b18 @@ -10,7 +10,8 @@ image: https://github.com/user-attachments/assets/3d4d0bee-fa39-4d52-8873-09d922 Howdy there Kubernetes package managers! 🤠 -In case you’re new around these parts. A lot has been going on in the wild world of Kubernetes package management lately, so we thought it was high time to put a launch week together to announce a few features, share some exciting news and keep you up to date on what's going on with the most exciting Kubernetes package manager around these parts. +In case you’re new around these parts. +A lot has been going on in the wild world of Kubernetes package management lately, so we thought it was high time to put a launch week together to announce a few features, share some exciting news and keep you up to date on what's going on with the most exciting Kubernetes package manager around these parts. Yeehaw! @@ -28,21 +29,25 @@ So you might be thinking to yourself, what does the Glasskube team have up their ## 1\. Glasskube is Gitops Ready with ArgoCD -Day one of launch week will be about celebrating the fact that it’s safe to consider Glasskube “[GitOps ready](https://glasskube.dev/docs/integration/gitops/)“. This might not seem like such a big deal to folks not experienced in DevOps and Cloud engineering practices but experienced Kubernetes administrators will quickly pick up on how much of a big deal this is. +Day one of launch week will be about celebrating the fact that it’s safe to consider Glasskube “[GitOps ready](https://glasskube.dev/docs/integration/gitops/)“. +As GitOps became the standard to revision Kubernetes configuration files and use Git as the single source of truth. +Glasskube can not only directly modify the resources in your cluster, but now also output your Glasskube packages as yaml to put them into Git. ![GitOps ready](https://github.com/user-attachments/assets/491b146a-63a0-4585-93ee-aac8b7013f53) -During the rest of the launch week, we will showcase a Glasskube feature that adds key components to the GitOps completeness of Glasskube. +During the rest of the launch week, we will showcase more new features of Glasskube daily. ## 2\. What’s so good about GitOps anyway? -Imagine if I told you you could set up a full Kubernetes setup with just one command. Glasskube bootstrap command +Imagine if I told you, you could bootstrap an ArgoCD setup with just one command and keep it up-to-date. +The Glasskube bootstrap command now also supports bootstrapping from git. ![Glasskube GitOps command](https://github.com/user-attachments/assets/3dab678a-1ff7-4167-82b6-975070c70a0d) -The Glasskube GitOps template is [officially here](https://glasskube.dev/blog/gitops-template/), think of it as a package for your packages. You can now define every single component of your cluster package stack, [now supporting both public and private packages](https://github.com/glasskube/gitops-template?tab=readme-ov-file#private-repositories), push it to a Git repository, and let ArgoCD handle the deployment. +The Glasskube GitOps template is [officially here](https://glasskube.dev/blog/gitops-template/). +You can now define every single component of your cluster package stack, [now supporting both public and private GitHub repositories](https://github.com/glasskube/gitops-template?tab=readme-ov-file#private-repositories), push it to a Git repository, and let ArgoCD handle the deployment. -And it’s no exaggeration to say that deploying your cluster packages to Kubernetes now takes seconds instead of hours. Who wouldn’t want that? +And it’s no exaggeration to say that deploying your packages to Kubernetes now takes seconds instead of hours. Who wouldn’t want that? ![GitOps template diagram](https://github.com/user-attachments/assets/236af5f2-64a9-42f2-92f8-a30438777365) @@ -50,7 +55,9 @@ And it’s no exaggeration to say that deploying your cluster packages to Kubern You might be wondering, "Wait, so I don’t have to update the packages myself?" -That's right! The Glasskube package repository, the GitHub repo that stores all the packages on Glasskube Hub, runs a [Renovate](https://docs.renovatebot.com/) integration on the backend repo every day. If new versions of supported Glasskube packages are available, we test and add them to the list of versions you can choose from. +That's right! The public Glasskube package repository, the GitHub repo setup similar to Homebrews public tap, is the source for our [Renovate](https://docs.renovatebot.com/) integration. +So if new versions of supported Glasskube packages are available, we test and add them to the list of versions you can choose from. +Also the Renovate automation picks the latest version up and creates a pull request in your GitOps repository. ![Renovate integration](https://github.com/user-attachments/assets/65c07bef-2124-43b8-8d36-133219af40bb) @@ -58,7 +65,8 @@ Well dive deeper into [how this works](https://glasskube.dev/docs/integration/re ## 4\. Everybody needs a home, and so do packages -Introducing [Glasskube Hub](https://glasskube.dev/products/hub/), think of it as the equivalent to Docker Hub or Artifact Hub, but for Glasskube packages. All available Glasskube packages are conveniently gathered in one place and can be consumed on demand. +Introducing [Glasskube Hub](https://glasskube.dev/products/hub/), think of it as the equivalent to Docker Hub or Artifact Hub, but for Glasskube packages. +All available Glasskube packages are conveniently gathered in one place and can be consumed on demand. ![Glasskube hub](https://github.com/user-attachments/assets/74dd15b1-ebdc-4071-b02e-00d802e8a71b) @@ -66,7 +74,9 @@ Apart from storing freely available Open Source Packages, the Glasskube Hub will Wait, what are private packages exactly? -- If your organization excels at what you do, so much so that customers are clamoring to self-host your solution, yet you lack the time, resources, or inclination to make it happen - Private Packages are the answer. We partner with you to build and host a Glasskube native package around your offering, making it incredibly simple to customize, configure, install, and update your tool within your customers infrastructure. If you’d like to learn more, [schedule a call today](https://cal.glasskube.eu/team/founder/demo). +If your organization excels at what you do, so much so that customers are clamoring to self-host your solution, yet you lack the time, resources, or inclination to make it happen - Private Packages are the answer. +We partner with you to build and host a Glasskube native package around your offering, making it incredibly simple to customize, configure, install, and update your tool within your customers’ infrastructure. +If you’d like to learn more, [schedule a call today](https://cal.glasskube.eu/team/founder/demo). Throughout the launch week, well dive into the best ways to use Glasskube Hub, including how to work with private packages stored there. @@ -78,10 +88,10 @@ Even though the feature was introduced a couple of minor versions ago. We will e Here is a sneak preview: -- **Cluster-scoped:** these are the ones that provide cluster-wide functionality or manage shared resources, such as networking, monitoring, or security tools. -- **Namespaced:** these are usually packages that can be specific to a particular application or team, or when you need multiple isolated instances of the same package. + - **Cluster-scoped:** these are the ones that provide cluster-wide functionality or manage shared resources, such as networking, monitoring, or security tools. + - **Namespaced:** these are usually packages that can be specific to a particular application or team, or when you need multiple isolated instances of the same package. -Package scopes eliminate redundancy, streamlining your deployments and maximizing efficiency. +Package scopes give package authors the possibility to control the scope of the installation. ## Wait there’s more? @@ -103,4 +113,4 @@ No launch week can be complete without an actual product launch! We are explorin ## Don’t miss a thing -Follow us on [Discord](https://discord.gg/e89NzZerVu?event=1274009068884721725), [Twitter](https://x.com/glasskube), and [LinkedIn](https://www.linkedin.com/company/glasskube) because we’ll be sharing announcements events every day. I hope you are as excited as we are! \ No newline at end of file +Follow us on [Discord](https://discord.gg/e89NzZerVu?event=1274009068884721725), [Twitter](https://x.com/glasskube), and [LinkedIn](https://www.linkedin.com/company/glasskube) because we’ll be sharing announcements events every day. I hope you are as excited as we are! From 0e2ca5b936c5f6d93a401efbfb1d16615bde8714 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:31:20 +0000 Subject: [PATCH 05/16] chore(deps): update dependency typescript to ~5.6.0 (#1214) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package-lock.json | 8 ++++---- website/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 902cd22a7..0c69560ea 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -48,7 +48,7 @@ "eslint-plugin-react": "^7.34.3", "globals": "^15.6.0", "prettier": "^3.3.2", - "typescript": "~5.5.0", + "typescript": "~5.6.0", "typescript-eslint": "^8.0.0" }, "engines": { @@ -19594,9 +19594,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/website/package.json b/website/package.json index 87d4fa944..1ead5abd8 100644 --- a/website/package.json +++ b/website/package.json @@ -58,7 +58,7 @@ "eslint-plugin-react": "^7.34.3", "globals": "^15.6.0", "prettier": "^3.3.2", - "typescript": "~5.5.0", + "typescript": "~5.6.0", "typescript-eslint": "^8.0.0" }, "browserslist": { From 7ff01ce5d020bf2df8cd970b0bd2fc565d5a8fab Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Mon, 9 Sep 2024 19:31:59 +0200 Subject: [PATCH 06/16] docs: add package manifest reference (#1212) Signed-off-by: Jakob Steiner --- website/docs/06_reference/package-manifest.md | 211 ++++++++++++++++++ .../01_helm.md | 0 .../02_timoni.md | 0 .../03_olm.md | 0 website/sidebars.ts | 12 +- 5 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 website/docs/06_reference/package-manifest.md rename website/docs/{06_comparisons => 07_comparisons}/01_helm.md (100%) rename website/docs/{06_comparisons => 07_comparisons}/02_timoni.md (100%) rename website/docs/{06_comparisons => 07_comparisons}/03_olm.md (100%) diff --git a/website/docs/06_reference/package-manifest.md b/website/docs/06_reference/package-manifest.md new file mode 100644 index 000000000..bca6e54bb --- /dev/null +++ b/website/docs/06_reference/package-manifest.md @@ -0,0 +1,211 @@ +# Package Manifest + +## Properties + +| Name | Type | Required / Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------- | +| scope | string | `"Namespaced"` | One of: Cluster, Namespaced | +| name | string | required | Name of the package | +| shortDescription | string | | | +| longDescription | string | | | +| defaultNamespace | string | required | +| references | [][PackageReference](#packagereference) | | +| iconUrl | string | | +| helm | [HelmManifest](#helmmanifest) | | +| manifests | [][PlainManifest](#plainmanifest) | | +| valueDefinitions | map[string][ValueDefinition](#valuedefinition) | | +| transformations | [][TransformationDefinition](#transformationdefinition) | | | +| transitiveResources | [][TypedLocalObjectReference](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference/) | | +| entrypoints | [][PackageEntrypoint](#packageentrypoint) | | +| dependencies | [][Dependency](#dependency) | | +| components | [][Component](#component) | | + +## Subresources + +### PackageReference + +| Name | Type | Required / Default | Description | +| ----- | ------ | ------------------ | ----------- | +| label | string | required | | +| url | string | required | | + +### HelmManifest + +| Name | Type | Required / Default | Description | +| ------------- | ---------- | ------------------ | ----------- | +| repositoryUrl | string | required | | +| chartName | string | required | | +| chartVersion | string | required | | +| values | _any JSON_ | | | + +### PlainManifest + +| Name | Type | Required / Default | Description | +| ---------------- | ------ | ------------------ | -------------------------------------------- | +| url | string | required | | +| defaultNamespace | string | | overrides the package-level defaultNamespace | + +### ValueDefinition + +| Name | Type | Required / Default | Description | +| ------------ | --------------------------------------------------------- | ------------------ | -------------------------------------- | +| type | string | required | One of: boolean, text, number, options | +| metadata | [ValueDefinitionMetadata](#valuedefinitionmetadata) | | | +| defaultValue | string | | | +| options | []string | | | +| constrains | [ValueDefinitionConstraints](#valuedefinitionconstraints) | | | +| targets | [ValueDefinitionTarget](#valuedefinitiontarget) | | | + +### TransformationDefinition + +| Name | Type | Required / Default | Description | +| ------- | ------------------------------------------------- | ------------------ | ----------- | +| source | TransformationSource | required | | +| targets | [][ValueDefinitionTarget](#valuedefinitiontarget) | required | | + +### ValueDefinitionMetadata + +| Name | Type | Required / Default | Description | +| ----------- | -------- | ------------------ | ---------------------------------------------- | +| label | | | form label to show on the UI | +| description | | | longer description to show along side the form | +| hints | []string | | currently unused | + +### ValueDefinitionConstraints + +| Name | Type | Required / Default | Description | +| --------- | ------ | ------------------ | --------------------------------------------------------------- | +| required | bool | required | whether this value **must** be specified. It may still be empty | +| min | int | | minimum value for values with type number | +| max | int | | maximum number for values with type number | +| minLength | int | | minimum length for values with type text | +| maxLength | int | | maximum lenght for values with type text | +| pattern | string | | regex pattern for validation | + +### ValueDefinitionTarget + +| Name | Type | Required / Default | Description | +| ------------- | ------------------------------------- | ------------------ | --------------------------------------------- | +| resource | TypedObjectReference | | reference of a resource owned by this package | +| chartName | string | | name of a helm chart managed by this package | +| patch | [PartialJsonPatch](#partialjsonpatch) | required | | +| valueTemplate | string | | | + +Either `resource` or `chartName` must be specified. + +### PartialJsonPatch + +| Name | Type | Required / Default | Description | +| ---- | ------ | ------------------ | ----------- | +| op | string | required | | +| path | string | required | | + +The `value` to create a compete JSON Patch is supplied by the controller. +See https://jsonpatch.com/ for a complete reference. + +### TransformationSource + +| Name | Type | Required / Default | Description | +| -------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------- | +| resource | [TypedLocalObjectReference](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference/) | | leave empty to reference the current package | +| path | string | required | JSON path to a property of the resource ([reference](https://goessner.net/articles/JsonPath/)) | + +### PackageEntrypoint + +| Name | Type | Required / Default | Description | +| ----------- | ------ | ------------------ | ----------- | +| name | string | | | +| serviceName | string | required | | +| port | int32 | required | | +| localPort | int32 | | | +| scheme | string | | | + +### Dependency + +| Name | Type | Required / Default | Description | +| ------- | ------ | ------------------ | --------------------------------------- | +| name | string | required | | +| version | string | | a semver constraint for this dependency | + +### Component + +| Name | Type | Required / Default | Description | +| ------------- | ------ | ------------------ | -------------------------------------- | +| name | string | required | | +| installedName | string | | name suffix for the created `Package` | +| version | string | | a semver constraint for this component | + +## Complete Example + +```yaml title="package.yaml" +name: example +scope: Namespaced +defaultNamespace: default +iconUrl: https://example.com/logo.jpeg +shortDescription: An example package for this documentation +longDescription: | + An extended description of this package. + + Markdown is **supported**. +references: + - label: GitHub + url: https://github.com/example/example +entrypoints: + - name: ui + serviceName: example-ui + port: 443 + localPort: 8443 + scheme: https +helm: + repositoryUrl: https://charts.example.com/ + chartName: example + chartVersion: v1.0.0 + values: + config: + database: + driver: postgresql +manifests: + - url: https://github.com/example/example/releases/v1.0.0/example.yaml +dependencies: + - name: cloudnative-pg + version: '1.x.x' +components: + - name: postgresql + installedName: db + version: '>=1.0.0' +transitiveResources: + - apiVersion: v1 + kind: Secret + name: db-app +valueDefinitions: + someConfigAttribute: + type: text + metadata: + label: Some text + description: Longer text + constraints: + required: true + minLength: 5 + maxLength: 24 + targets: + - chartName: example + patch: + op: add + path: /config/database/dbName + - resource: + apiVersion: v1 + kind: ConfigMap + name: example + patch: + op: add + path: /data/DB_NAME +transformations: + - source: + path: '{ $.metadata.name }' + targets: + - chartName: example + patch: + op: add + path: /config/database/dbHost + valueTemplate: '"{{.}}-db-rw"' +``` diff --git a/website/docs/06_comparisons/01_helm.md b/website/docs/07_comparisons/01_helm.md similarity index 100% rename from website/docs/06_comparisons/01_helm.md rename to website/docs/07_comparisons/01_helm.md diff --git a/website/docs/06_comparisons/02_timoni.md b/website/docs/07_comparisons/02_timoni.md similarity index 100% rename from website/docs/06_comparisons/02_timoni.md rename to website/docs/07_comparisons/02_timoni.md diff --git a/website/docs/06_comparisons/03_olm.md b/website/docs/07_comparisons/03_olm.md similarity index 100% rename from website/docs/06_comparisons/03_olm.md rename to website/docs/07_comparisons/03_olm.md diff --git a/website/sidebars.ts b/website/sidebars.ts index 1e627f796..438589826 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -54,13 +54,23 @@ const sidebars: SidebarsConfig = { }, ], }, + { + type: 'category', + label: 'Reference', + items: [ + { + type: 'autogenerated', + dirName: '06_reference', + }, + ], + }, { type: 'category', label: 'Comparisons', items: [ { type: 'autogenerated', - dirName: '06_comparisons', + dirName: '07_comparisons', }, ], }, From f5ada7e90c9364983eb3f8f93177bb1e3516e1f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:38:27 +0000 Subject: [PATCH 07/16] chore(deps): update dependency typescript-eslint to v8.5.0 (#1215) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package-lock.json | 222 +++++++++++++++++++------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 0c69560ea..b0e1ef6f3 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -4584,17 +4584,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.4.0.tgz", - "integrity": "sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz", + "integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/type-utils": "8.4.0", - "@typescript-eslint/utils": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/type-utils": "8.5.0", + "@typescript-eslint/utils": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -4618,14 +4618,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", - "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0" + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4636,9 +4636,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", - "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", "dev": true, "license": "MIT", "engines": { @@ -4650,14 +4650,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", - "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -4679,16 +4679,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", - "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", + "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0" + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4702,13 +4702,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", - "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/types": "8.5.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -4746,16 +4746,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.4.0.tgz", - "integrity": "sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz", + "integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "debug": "^4.3.4" }, "engines": { @@ -4775,14 +4775,14 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", - "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0" + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4793,9 +4793,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", - "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", "dev": true, "license": "MIT", "engines": { @@ -4807,14 +4807,14 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", - "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -4836,13 +4836,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", - "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/types": "8.5.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -4898,14 +4898,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.4.0.tgz", - "integrity": "sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz", + "integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.4.0", - "@typescript-eslint/utils": "8.4.0", + "@typescript-eslint/typescript-estree": "8.5.0", + "@typescript-eslint/utils": "8.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -4923,14 +4923,14 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", - "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0" + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4941,9 +4941,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", - "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", "dev": true, "license": "MIT", "engines": { @@ -4955,14 +4955,14 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", - "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -4984,16 +4984,16 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", - "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", + "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0" + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5007,13 +5007,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", - "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/types": "8.5.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -19607,15 +19607,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.4.0.tgz", - "integrity": "sha512-67qoc3zQZe3CAkO0ua17+7aCLI0dU+sSQd1eKPGq06QE4rfQjstVXR6woHO5qQvGUa550NfGckT4tzh3b3c8Pw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.5.0.tgz", + "integrity": "sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.4.0", - "@typescript-eslint/parser": "8.4.0", - "@typescript-eslint/utils": "8.4.0" + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", + "@typescript-eslint/utils": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -19631,14 +19631,14 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", - "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", + "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0" + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -19649,9 +19649,9 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", - "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", + "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", "dev": true, "license": "MIT", "engines": { @@ -19663,14 +19663,14 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", - "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", + "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/visitor-keys": "8.5.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -19692,16 +19692,16 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", - "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", + "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0" + "@typescript-eslint/scope-manager": "8.5.0", + "@typescript-eslint/types": "8.5.0", + "@typescript-eslint/typescript-estree": "8.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -19715,13 +19715,13 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", - "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", + "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/types": "8.5.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { From dbfd2a994e65cab74fc52e2c36ae364d54125677 Mon Sep 17 00:00:00 2001 From: Jake Page <38757612+jakepage91@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:50:02 -0700 Subject: [PATCH 08/16] docs(website): some spelling changes and new visual assets (#1216) --- .../blog/2024-09-09-launch-week-2/index.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/blog/2024-09-09-launch-week-2/index.mdx b/website/blog/2024-09-09-launch-week-2/index.mdx index 4ed21848d..8aa0f77b9 100644 --- a/website/blog/2024-09-09-launch-week-2/index.mdx +++ b/website/blog/2024-09-09-launch-week-2/index.mdx @@ -1,7 +1,7 @@ --- slug: launch-week-number-2 title: Launch week 2 - A new frontier of Kubernetes package management -description: We have happy to announce the second official Glasskube Launch week, full of updates, fun and a whole lot of Kubernetes package management. +description: We are happy to announce the second official Glasskube Launch week, full of updates, fun and a whole lot of Kubernetes package management. authors: [ jpage, pmig ] tags: [ glasskube, gitops, launch-week] image: https://github.com/user-attachments/assets/3d4d0bee-fa39-4d52-8873-09d9226c1b18 @@ -30,7 +30,7 @@ So you might be thinking to yourself, what does the Glasskube team have up their ## 1\. Glasskube is Gitops Ready with ArgoCD Day one of launch week will be about celebrating the fact that it’s safe to consider Glasskube “[GitOps ready](https://glasskube.dev/docs/integration/gitops/)“. -As GitOps became the standard to revision Kubernetes configuration files and use Git as the single source of truth. +GitOps has became the standard for Kubernetes configuration file revision, utilizing Git as the single source of truth. Glasskube can not only directly modify the resources in your cluster, but now also output your Glasskube packages as yaml to put them into Git. ![GitOps ready](https://github.com/user-attachments/assets/491b146a-63a0-4585-93ee-aac8b7013f53) @@ -39,7 +39,7 @@ During the rest of the launch week, we will showcase more new features of Glassk ## 2\. What’s so good about GitOps anyway? -Imagine if I told you, you could bootstrap an ArgoCD setup with just one command and keep it up-to-date. +Imagine if I told you you could bootstrap an ArgoCD setup with just one command and keep it up-to-date. The Glasskube bootstrap command now also supports bootstrapping from git. ![Glasskube GitOps command](https://github.com/user-attachments/assets/3dab678a-1ff7-4167-82b6-975070c70a0d) @@ -49,7 +49,7 @@ You can now define every single component of your cluster package stack, [now su And it’s no exaggeration to say that deploying your packages to Kubernetes now takes seconds instead of hours. Who wouldn’t want that? -![GitOps template diagram](https://github.com/user-attachments/assets/236af5f2-64a9-42f2-92f8-a30438777365) +![GitOps template diagram](https://github.com/user-attachments/assets/31237e57-c924-42f6-8f9b-ec737226014a) ## 3\. Hear that? …silence! But your packages are still up-to-date @@ -57,11 +57,11 @@ You might be wondering, "Wait, so I don’t have to update the packages myself?" That's right! The public Glasskube package repository, the GitHub repo setup similar to Homebrews public tap, is the source for our [Renovate](https://docs.renovatebot.com/) integration. So if new versions of supported Glasskube packages are available, we test and add them to the list of versions you can choose from. -Also the Renovate automation picks the latest version up and creates a pull request in your GitOps repository. +Also the Renovate automation picks up the latest version and creates a pull request in your GitOps repository. -![Renovate integration](https://github.com/user-attachments/assets/65c07bef-2124-43b8-8d36-133219af40bb) +![Renovate integration](https://github.com/user-attachments/assets/09c6a01a-1f21-4acd-bedb-33e8390886d4) -Well dive deeper into [how this works](https://glasskube.dev/docs/integration/renovate/) and discuss how you can opt in or out of the auto-updating feature. +We'll dive deeper into [how this works](https://glasskube.dev/docs/integration/renovate/) and discuss how you can opt in or out of the auto-updating feature. ## 4\. Everybody needs a home, and so do packages @@ -70,15 +70,15 @@ All available Glasskube packages are conveniently gathered in one place and can ![Glasskube hub](https://github.com/user-attachments/assets/74dd15b1-ebdc-4071-b02e-00d802e8a71b) -Apart from storing freely available Open Source Packages, the Glasskube Hub will also host private packages. +In addition to storing freely available Open Source Packages, the Glasskube Hub will also host private packages. Wait, what are private packages exactly? If your organization excels at what you do, so much so that customers are clamoring to self-host your solution, yet you lack the time, resources, or inclination to make it happen - Private Packages are the answer. -We partner with you to build and host a Glasskube native package around your offering, making it incredibly simple to customize, configure, install, and update your tool within your customers’ infrastructure. +We partner with you to build and host a Glasskube native package around your offering, making it incredibly simple to customize, configure, install, and update your tool within your customers' infrastructure. If you’d like to learn more, [schedule a call today](https://cal.glasskube.eu/team/founder/demo). -Throughout the launch week, well dive into the best ways to use Glasskube Hub, including how to work with private packages stored there. +Throughout the launch week, we'll dive into the best ways to use Glasskube Hub, including how to work with private packages stored there. ## 5\. Introducing Package Scopes @@ -88,10 +88,10 @@ Even though the feature was introduced a couple of minor versions ago. We will e Here is a sneak preview: - - **Cluster-scoped:** these are the ones that provide cluster-wide functionality or manage shared resources, such as networking, monitoring, or security tools. - - **Namespaced:** these are usually packages that can be specific to a particular application or team, or when you need multiple isolated instances of the same package. + - **Cluster-scoped:** These are packages that provide cluster-wide functionality or manage shared resources, such as networking, monitoring, or security tools. + - **Namespaced:** These are usually packages that can be specific to a particular application or team, or when you need multiple isolated instances of the same package. -Package scopes give package authors the possibility to control the scope of the installation. +Package scopes give package authors the ability to control the scope of the installation. ## Wait there’s more? From 54c78cdb0ea5151a661104282d11a99bea15d496 Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Mon, 9 Sep 2024 22:37:48 +0200 Subject: [PATCH 09/16] chore: change transitiveResources type to TypeLocalObjectReference (#1211) Signed-off-by: Jakob Steiner --- api/v1alpha1/package_manifest.go | 15 ++++------ api/v1alpha1/zz_generated.deepcopy.go | 22 +++------------ .../packages.glasskube.dev_packageinfos.yaml | 16 +++++++---- internal/manifest/plain/prefix.go | 28 ++++++++++++++----- internal/manifest/plain/prefix_test.go | 9 ++++-- .../static/schemas/v1/package-manifest.json | 12 +++----- 6 files changed, 51 insertions(+), 51 deletions(-) diff --git a/api/v1alpha1/package_manifest.go b/api/v1alpha1/package_manifest.go index ee6addf2b..3284261b9 100644 --- a/api/v1alpha1/package_manifest.go +++ b/api/v1alpha1/package_manifest.go @@ -20,8 +20,8 @@ import ( "strings" "github.com/invopop/jsonschema" + corev1 "k8s.io/api/core/v1" apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type HelmManifest struct { @@ -110,11 +110,6 @@ func (s *PackageScope) IsNamespaced() bool { return s != nil && *s == ScopeNamespaced } -type TransitiveResource struct { - metav1.GroupVersionKind `json:",inline"` - Name string `json:"name" jsonschema:"required"` -} - type PackageManifest struct { // Scope is optional (default is Cluster) Scope *PackageScope `json:"scope,omitempty"` @@ -126,10 +121,10 @@ type PackageManifest struct { // Helm instructs the controller to create a helm release when installing this package. Helm *HelmManifest `json:"helm,omitempty"` // Kustomize instructs the controller to apply a kustomization when installing this package [PLACEHOLDER]. - Kustomize *KustomizeManifest `json:"kustomize,omitempty"` - Manifests []PlainManifest `json:"manifests,omitempty"` - ValueDefinitions map[string]ValueDefinition `json:"valueDefinitions,omitempty"` - TransitiveResources []TransitiveResource `json:"transitiveResources,omitempty"` + Kustomize *KustomizeManifest `json:"kustomize,omitempty"` + Manifests []PlainManifest `json:"manifests,omitempty"` + ValueDefinitions map[string]ValueDefinition `json:"valueDefinitions,omitempty"` + TransitiveResources []corev1.TypedLocalObjectReference `json:"transitiveResources,omitempty"` // DefaultNamespace to install the package. May be overridden. DefaultNamespace string `json:"defaultNamespace,omitempty" jsonschema:"required"` Entrypoints []PackageEntrypoint `json:"entrypoints,omitempty"` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 35daefb24..31fa8210f 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -432,8 +432,10 @@ func (in *PackageManifest) DeepCopyInto(out *PackageManifest) { } if in.TransitiveResources != nil { in, out := &in.TransitiveResources, &out.TransitiveResources - *out = make([]TransitiveResource, len(*in)) - copy(*out, *in) + *out = make([]corev1.TypedLocalObjectReference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Entrypoints != nil { in, out := &in.Entrypoints, &out.Entrypoints @@ -768,22 +770,6 @@ func (in *PlainManifest) DeepCopy() *PlainManifest { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TransitiveResource) DeepCopyInto(out *TransitiveResource) { - *out = *in - out.GroupVersionKind = in.GroupVersionKind -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransitiveResource. -func (in *TransitiveResource) DeepCopy() *TransitiveResource { - if in == nil { - return nil - } - out := new(TransitiveResource) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValueConfiguration) DeepCopyInto(out *ValueConfiguration) { *out = *in diff --git a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml index 053afbab8..e69bbc8a8 100644 --- a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml +++ b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml @@ -256,21 +256,27 @@ spec: type: string transitiveResources: items: + description: |- + TypedLocalObjectReference contains enough information to let you locate the + typed referenced object inside the same namespace. properties: - group: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. type: string kind: + description: Kind is the type of resource being referenced type: string name: - type: string - version: + description: Name is the name of resource being referenced type: string required: - - group - kind - name - - version type: object + x-kubernetes-map-type: atomic type: array valueDefinitions: additionalProperties: diff --git a/internal/manifest/plain/prefix.go b/internal/manifest/plain/prefix.go index 2345a38fb..b6c366199 100644 --- a/internal/manifest/plain/prefix.go +++ b/internal/manifest/plain/prefix.go @@ -6,6 +6,7 @@ import ( "github.com/glasskube/glasskube/api/v1alpha1" "github.com/glasskube/glasskube/internal/controller/ctrlpkg" "github.com/glasskube/glasskube/internal/kustomize" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client" @@ -19,7 +20,10 @@ func prefixAndUpdateReferences( ) ([]client.Object, error) { if pkg.IsNamespaceScoped() { kustomization := createKustomization(pkg) - transitiveObjects := createTransitiveObjects(manifest.TransitiveResources) + transitiveObjects, err := createTransitiveObjects(manifest.TransitiveResources) + if err != nil { + return nil, err + } if result, err := kustomize.KustomizeObjects(kustomization, append(objects, transitiveObjects...)); err != nil { return nil, err } else { @@ -48,20 +52,30 @@ func createKustomization(pkg ctrlpkg.Package) kstypes.Kustomization { } } -func createTransitiveObjects(resList []v1alpha1.TransitiveResource) []client.Object { +func createTransitiveObjects(resList []v1.TypedLocalObjectReference) ([]client.Object, error) { result := make([]client.Object, len(resList)) for i, res := range resList { - result[i] = createTransitiveObject(res) + if obj, err := createTransitiveObject(res); err != nil { + return nil, err + } else { + result[i] = obj + } } - return result + return result, nil } // createTransitiveObject creates a "stub" [client.Object] for a given [v1alpha1.TransitiveResource]. // This Object can not be applied in a cluster and serve only as "reference", so the kustomize name reference // transformer updates any references to them. -func createTransitiveObject(res v1alpha1.TransitiveResource) client.Object { +func createTransitiveObject(res v1.TypedLocalObjectReference) (client.Object, error) { var result unstructured.Unstructured + if res.APIGroup == nil { + result.SetGroupVersionKind(schema.GroupVersionKind{Kind: res.Kind}) + } else if gv, err := schema.ParseGroupVersion(*res.APIGroup); err != nil { + return nil, err + } else { + result.SetGroupVersionKind(gv.WithKind(res.Kind)) + } result.SetName(res.Name) - result.SetGroupVersionKind(schema.GroupVersionKind(res.GroupVersionKind)) - return &result + return &result, nil } diff --git a/internal/manifest/plain/prefix_test.go b/internal/manifest/plain/prefix_test.go index f834f90e6..d9fa1177d 100644 --- a/internal/manifest/plain/prefix_test.go +++ b/internal/manifest/plain/prefix_test.go @@ -5,8 +5,10 @@ import ( "io" "github.com/glasskube/glasskube/api/v1alpha1" + "github.com/glasskube/glasskube/internal/util" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/yaml" @@ -199,10 +201,11 @@ var _ = Describe("updateReferences", func() { objs := parseObjs(secretAndDeployment) expectedObj := parseObjs(secretAndDeploymentExpectedWithTransitive) newObjs, err := prefixAndUpdateReferences(pkg, &v1alpha1.PackageManifest{ - TransitiveResources: []v1alpha1.TransitiveResource{ + TransitiveResources: []corev1.TypedLocalObjectReference{ { - GroupVersionKind: metav1.GroupVersionKind{Version: "v1", Kind: "Secret"}, - Name: "test1", + APIGroup: util.Pointer("v1"), + Kind: "Secret", + Name: "test1", }, }, }, objs) diff --git a/website/static/schemas/v1/package-manifest.json b/website/static/schemas/v1/package-manifest.json index 8d9c39680..4c23ff9fa 100644 --- a/website/static/schemas/v1/package-manifest.json +++ b/website/static/schemas/v1/package-manifest.json @@ -145,12 +145,9 @@ "url" ] }, - "TransitiveResource": { + "TypedLocalObjectReference": { "properties": { - "group": { - "type": "string" - }, - "version": { + "apiGroup": { "type": "string" }, "kind": { @@ -163,8 +160,7 @@ "additionalProperties": false, "type": "object", "required": [ - "group", - "version", + "apiGroup", "kind", "name" ] @@ -356,7 +352,7 @@ }, "transitiveResources": { "items": { - "$ref": "#/$defs/TransitiveResource" + "$ref": "#/$defs/TypedLocalObjectReference" }, "type": "array" }, From 5f934cb5e47ad02438ad2c0d55b13a25d7708807 Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Tue, 10 Sep 2024 11:21:16 +0200 Subject: [PATCH 10/16] feat(package-operator): add support for resource transformations (#1210) Signed-off-by: Jakob Steiner --- api/v1alpha1/package_manifest.go | 11 +++ api/v1alpha1/zz_generated.deepcopy.go | 50 ++++++++++ .../packages.glasskube.dev_packageinfos.yaml | 90 +++++++++++++++++ internal/controller/common.go | 15 ++- internal/manifest/adapter.go | 4 +- internal/manifest/helm/flux/adapter.go | 6 +- internal/manifest/plain/adapter.go | 6 +- internal/manifesttransformations/patches.go | 45 +++++++++ .../source_resolver.go | 98 +++++++++++++++++++ .../source_resolver_test.go | 36 +++++++ .../manifesttransformations/suite_test.go | 13 +++ .../patch.go | 10 +- .../patch_test.go | 12 +-- internal/resourcepatch/suite_test.go | 13 +++ .../static/schemas/v1/package-manifest.json | 40 ++++++++ 15 files changed, 428 insertions(+), 21 deletions(-) create mode 100644 internal/manifesttransformations/patches.go create mode 100644 internal/manifesttransformations/source_resolver.go create mode 100644 internal/manifesttransformations/source_resolver_test.go create mode 100644 internal/manifesttransformations/suite_test.go rename internal/{manifestvalues => resourcepatch}/patch.go (95%) rename internal/{manifestvalues => resourcepatch}/patch_test.go (94%) create mode 100644 internal/resourcepatch/suite_test.go diff --git a/api/v1alpha1/package_manifest.go b/api/v1alpha1/package_manifest.go index 3284261b9..38020642d 100644 --- a/api/v1alpha1/package_manifest.go +++ b/api/v1alpha1/package_manifest.go @@ -110,6 +110,16 @@ func (s *PackageScope) IsNamespaced() bool { return s != nil && *s == ScopeNamespaced } +type TransformationSource struct { + Resource *corev1.TypedLocalObjectReference `json:"resource,omitempty"` + Path string `json:"path" jsonschema:"required"` +} + +type TransformationDefinition struct { + Source TransformationSource `json:"source" jsonschema:"required"` + Targets []ValueDefinitionTarget `json:"targets" jsonschema:"required"` +} + type PackageManifest struct { // Scope is optional (default is Cluster) Scope *PackageScope `json:"scope,omitempty"` @@ -124,6 +134,7 @@ type PackageManifest struct { Kustomize *KustomizeManifest `json:"kustomize,omitempty"` Manifests []PlainManifest `json:"manifests,omitempty"` ValueDefinitions map[string]ValueDefinition `json:"valueDefinitions,omitempty"` + Transformations []TransformationDefinition `json:"transformations,omitempty"` TransitiveResources []corev1.TypedLocalObjectReference `json:"transitiveResources,omitempty"` // DefaultNamespace to install the package. May be overridden. DefaultNamespace string `json:"defaultNamespace,omitempty" jsonschema:"required"` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 31fa8210f..c1d7bd029 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -430,6 +430,13 @@ func (in *PackageManifest) DeepCopyInto(out *PackageManifest) { (*out)[key] = *val.DeepCopy() } } + if in.Transformations != nil { + in, out := &in.Transformations, &out.Transformations + *out = make([]TransformationDefinition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.TransitiveResources != nil { in, out := &in.TransitiveResources, &out.TransitiveResources *out = make([]corev1.TypedLocalObjectReference, len(*in)) @@ -770,6 +777,49 @@ func (in *PlainManifest) DeepCopy() *PlainManifest { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TransformationDefinition) DeepCopyInto(out *TransformationDefinition) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + if in.Targets != nil { + in, out := &in.Targets, &out.Targets + *out = make([]ValueDefinitionTarget, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransformationDefinition. +func (in *TransformationDefinition) DeepCopy() *TransformationDefinition { + if in == nil { + return nil + } + out := new(TransformationDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TransformationSource) DeepCopyInto(out *TransformationSource) { + *out = *in + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransformationSource. +func (in *TransformationSource) DeepCopy() *TransformationSource { + if in == nil { + return nil + } + out := new(TransformationSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValueConfiguration) DeepCopyInto(out *ValueConfiguration) { *out = *in diff --git a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml index e69bbc8a8..4f658bcd7 100644 --- a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml +++ b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml @@ -254,6 +254,96 @@ spec: type: string shortDescription: type: string + transformations: + items: + properties: + source: + properties: + path: + type: string + resource: + description: |- + TypedLocalObjectReference contains enough information to let you locate the + typed referenced object inside the same namespace. + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + targets: + items: + properties: + chartName: + type: string + patch: + properties: + op: + type: string + path: + type: string + required: + - op + - path + type: object + resource: + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: |- + Namespace is the namespace of resource being referenced + Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. + (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: string + required: + - kind + - name + type: object + valueTemplate: + type: string + required: + - patch + type: object + x-kubernetes-validations: + - message: ValueDefinitionTarget must have either resource + or chartName but not both + rule: has(self.resource) != has(self.chartName) + type: array + required: + - source + - targets + type: object + type: array transitiveResources: items: description: |- diff --git a/internal/controller/common.go b/internal/controller/common.go index 972f29e06..08d0a6434 100644 --- a/internal/controller/common.go +++ b/internal/controller/common.go @@ -20,9 +20,11 @@ import ( deputil "github.com/glasskube/glasskube/internal/dependency/util" "github.com/glasskube/glasskube/internal/manifest" "github.com/glasskube/glasskube/internal/manifest/result" + "github.com/glasskube/glasskube/internal/manifesttransformations" "github.com/glasskube/glasskube/internal/manifestvalues" "github.com/glasskube/glasskube/internal/names" repoclient "github.com/glasskube/glasskube/internal/repo/client" + "github.com/glasskube/glasskube/internal/resourcepatch" "github.com/glasskube/glasskube/internal/telemetry" "github.com/glasskube/glasskube/internal/util" "github.com/glasskube/glasskube/pkg/condition" @@ -156,7 +158,7 @@ func (r *PackageReconcilationContext) reconcilePackageInfoReady(ctx context.Cont return r.finalize(ctx) } - var patches []manifestvalues.TargetPatch + var patches []resourcepatch.TargetPatch if resolvedValues, err := r.ValueResolver.Resolve(ctx, r.pkg.GetSpec().Values); err != nil { r.setShouldUpdate( conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, @@ -167,7 +169,7 @@ func (r *PackageReconcilationContext) reconcilePackageInfoReady(ctx context.Cont conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, condition.ValueConfigurationInvalid, err.Error())) return r.finalizeWithError(ctx, err) - } else if p, err := manifestvalues.GeneratePatches(*piManifest, resolvedValues); err != nil { + } else if p, err := resourcepatch.GeneratePatches(*piManifest, resolvedValues); err != nil { r.setShouldUpdate( conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, condition.InstallationFailed, err.Error())) @@ -176,6 +178,15 @@ func (r *PackageReconcilationContext) reconcilePackageInfoReady(ctx context.Cont patches = p } + if p, err := manifesttransformations.ResolveAndGeneratePatches(ctx, r.Client, r.pkg, piManifest); err != nil { + r.setShouldUpdate( + conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, + condition.InstallationFailed, err.Error())) + return r.finalizeWithError(ctx, err) + } else { + patches = append(patches, p...) + } + // First, collect the adapters for all included manifests and ensure that they are supported. // If one manifest type is not supported, no action must be performed! diff --git a/internal/manifest/adapter.go b/internal/manifest/adapter.go index 789896226..aa992562c 100644 --- a/internal/manifest/adapter.go +++ b/internal/manifest/adapter.go @@ -6,7 +6,7 @@ import ( "github.com/glasskube/glasskube/api/v1alpha1" "github.com/glasskube/glasskube/internal/controller/ctrlpkg" "github.com/glasskube/glasskube/internal/manifest/result" - "github.com/glasskube/glasskube/internal/manifestvalues" + "github.com/glasskube/glasskube/internal/resourcepatch" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" @@ -17,6 +17,6 @@ type ManifestAdapter interface { Reconcile(ctx context.Context, pkg ctrlpkg.Package, pi *v1alpha1.PackageInfo, - patches manifestvalues.TargetPatches, + patches resourcepatch.TargetPatches, ) (*result.ReconcileResult, error) } diff --git a/internal/manifest/helm/flux/adapter.go b/internal/manifest/helm/flux/adapter.go index 16b42e8dd..871357a67 100644 --- a/internal/manifest/helm/flux/adapter.go +++ b/internal/manifest/helm/flux/adapter.go @@ -15,8 +15,8 @@ import ( "github.com/glasskube/glasskube/internal/controller/owners/utils" "github.com/glasskube/glasskube/internal/manifest" "github.com/glasskube/glasskube/internal/manifest/result" - "github.com/glasskube/glasskube/internal/manifestvalues" "github.com/glasskube/glasskube/internal/names" + "github.com/glasskube/glasskube/internal/resourcepatch" corev1 "k8s.io/api/core/v1" extv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -59,7 +59,7 @@ func (a *FluxHelmAdapter) Reconcile( ctx context.Context, pkg ctrlpkg.Package, pi *packagesv1alpha1.PackageInfo, - patches manifestvalues.TargetPatches, + patches resourcepatch.TargetPatches, ) (*result.ReconcileResult, error) { manifest := pi.Status.Manifest log := ctrl.LoggerFrom(ctx) @@ -160,7 +160,7 @@ func (a *FluxHelmAdapter) ensureHelmRelease( ctx context.Context, pkg ctrlpkg.Package, manifest *packagesv1alpha1.PackageManifest, - patches manifestvalues.TargetPatches, + patches resourcepatch.TargetPatches, ) (*helmv2.HelmRelease, error) { var namespace string if pkg.IsNamespaceScoped() { diff --git a/internal/manifest/plain/adapter.go b/internal/manifest/plain/adapter.go index 8e8106794..cf8ab0c0b 100644 --- a/internal/manifest/plain/adapter.go +++ b/internal/manifest/plain/adapter.go @@ -13,7 +13,7 @@ import ( ownerutils "github.com/glasskube/glasskube/internal/controller/owners/utils" "github.com/glasskube/glasskube/internal/manifest" "github.com/glasskube/glasskube/internal/manifest/result" - "github.com/glasskube/glasskube/internal/manifestvalues" + "github.com/glasskube/glasskube/internal/resourcepatch" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -56,7 +56,7 @@ func (a *Adapter) Reconcile( ctx context.Context, pkg ctrlpkg.Package, pi *packagesv1alpha1.PackageInfo, - patches manifestvalues.TargetPatches, + patches resourcepatch.TargetPatches, ) (*result.ReconcileResult, error) { var allOwned []packagesv1alpha1.OwnedResourceRef for _, manifest := range pi.Status.Manifest.Manifests { @@ -111,7 +111,7 @@ func (r *Adapter) reconcilePlainManifest( pkg ctrlpkg.Package, pi *packagesv1alpha1.PackageInfo, manifest packagesv1alpha1.PlainManifest, - patches manifestvalues.TargetPatches, + patches resourcepatch.TargetPatches, ) ([]packagesv1alpha1.OwnedResourceRef, error) { log := ctrl.LoggerFrom(ctx) var objectsToApply []client.Object diff --git a/internal/manifesttransformations/patches.go b/internal/manifesttransformations/patches.go new file mode 100644 index 000000000..bbe42b0ce --- /dev/null +++ b/internal/manifesttransformations/patches.go @@ -0,0 +1,45 @@ +package manifesttransformations + +import ( + "context" + + "github.com/glasskube/glasskube/api/v1alpha1" + "github.com/glasskube/glasskube/internal/controller/ctrlpkg" + "github.com/glasskube/glasskube/internal/resourcepatch" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +func GeneratePatches(tr v1alpha1.TransformationDefinition, resolvedValue any) ([]resourcepatch.TargetPatch, error) { + result := make([]resourcepatch.TargetPatch, len(tr.Targets)) + for i, t := range tr.Targets { + if patch, err := resourcepatch.GenerateTargetPatch(t, resolvedValue); err != nil { + return nil, err + } else { + result[i] = *patch + } + } + return result, nil +} + +func ResolveAndGeneratePatches( + ctx context.Context, + client client.Client, + pkg ctrlpkg.Package, + manifest *v1alpha1.PackageManifest, +) (resourcepatch.TargetPatches, error) { + if len(manifest.Transformations) == 0 { + return nil, nil + } + resolver := NewResolver(client) + var allPatches []resourcepatch.TargetPatch + for _, t := range manifest.Transformations { + if value, err := resolver.Resolve(ctx, pkg, t.Source); err != nil { + return nil, err + } else if patches, err := GeneratePatches(t, value); err != nil { + return nil, err + } else { + allPatches = append(allPatches, patches...) + } + } + return allPatches, nil +} diff --git a/internal/manifesttransformations/source_resolver.go b/internal/manifesttransformations/source_resolver.go new file mode 100644 index 000000000..e59cf7551 --- /dev/null +++ b/internal/manifesttransformations/source_resolver.go @@ -0,0 +1,98 @@ +package manifesttransformations + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/glasskube/glasskube/api/v1alpha1" + "github.com/glasskube/glasskube/internal/controller/ctrlpkg" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/util/jsonpath" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +type ResourceResolver interface { + GetResource(ctx context.Context, ref corev1.TypedObjectReference) (*unstructured.Unstructured, error) +} + +type ctrlResourceResolver struct { + client client.Client +} + +func (r *ctrlResourceResolver) GetResource( + ctx context.Context, + ref corev1.TypedObjectReference, +) (*unstructured.Unstructured, error) { + var obj unstructured.Unstructured + obj.SetName(ref.Name) + obj.SetNamespace(*ref.Namespace) + if gv, err := schema.ParseGroupVersion(*ref.APIGroup); err != nil { + return nil, err + } else { + obj.SetGroupVersionKind(gv.WithKind(ref.Kind)) + } + if err := r.client.Get(ctx, client.ObjectKeyFromObject(&obj), &obj); err != nil { + return nil, err + } + return &obj, nil +} + +type SourceResolver struct { + resourceResolver ResourceResolver +} + +func NewResolver(client client.Client) *SourceResolver { + return &SourceResolver{ + &ctrlResourceResolver{client: client}, + } +} + +func refWithNamespace(ref corev1.TypedLocalObjectReference, namespace string) corev1.TypedObjectReference { + return corev1.TypedObjectReference{ + APIGroup: ref.APIGroup, + Kind: ref.Kind, + Name: ref.Name, + Namespace: &namespace, + } +} + +func (resolver *SourceResolver) Resolve( + ctx context.Context, + pkg ctrlpkg.Package, + source v1alpha1.TransformationSource, +) (any, error) { + jp := jsonpath.New("") + if err := jp.Parse(source.Path); err != nil { + return nil, err + } + + var resource *unstructured.Unstructured + if source.Resource != nil { + ref := refWithNamespace(*source.Resource, pkg.GetNamespace()) + if r, err := resolver.resourceResolver.GetResource(ctx, ref); err != nil { + return nil, err + } else { + resource = r + } + } else { + resource = &unstructured.Unstructured{} + if data, err := json.Marshal(pkg); err != nil { + return nil, err + } else if err = json.Unmarshal(data, resource); err != nil { + return nil, err + } + } + + if results, err := jp.FindResults(resource.UnstructuredContent()); err != nil { + return nil, err + } else if len(results) != 1 { + return nil, fmt.Errorf("jsonpath produced unexpected number of results (%v)", len(results)) + } else if len(results[0]) != 1 { + return nil, fmt.Errorf("jsonpath produced unexpected number of subresults (%v)", len(results[0])) + } else { + return results[0][0].Interface(), nil + } +} diff --git a/internal/manifesttransformations/source_resolver_test.go b/internal/manifesttransformations/source_resolver_test.go new file mode 100644 index 000000000..460987908 --- /dev/null +++ b/internal/manifesttransformations/source_resolver_test.go @@ -0,0 +1,36 @@ +package manifesttransformations + +import ( + "context" + + "github.com/glasskube/glasskube/api/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" +) + +var ctrlClient client.Client + +var resolver SourceResolver + +var _ = Describe("Resolve", func() { + BeforeEach(func() { + ctrlClient = fake.NewClientBuilder().Build() + NewResolver(ctrlClient) + }) + + It("should return package name", func(ctx context.Context) { + pkg := v1alpha1.Package{ + TypeMeta: metav1.TypeMeta{Kind: "Package", APIVersion: "packages.glasskube.dev/v1alpha1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "default"}, + } + src := v1alpha1.TransformationSource{ + Path: "{ $.metadata.name }", + } + result, err := resolver.Resolve(ctx, &pkg, src) + Expect(err).NotTo(HaveOccurred()) + Expect(result).To(Equal("test")) + }) +}) diff --git a/internal/manifesttransformations/suite_test.go b/internal/manifesttransformations/suite_test.go new file mode 100644 index 000000000..32f09e8dd --- /dev/null +++ b/internal/manifesttransformations/suite_test.go @@ -0,0 +1,13 @@ +package manifesttransformations + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestDependency(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "ManifestTransformations Suite") +} diff --git a/internal/manifestvalues/patch.go b/internal/resourcepatch/patch.go similarity index 95% rename from internal/manifestvalues/patch.go rename to internal/resourcepatch/patch.go index 90c35861c..6676ddc3b 100644 --- a/internal/manifestvalues/patch.go +++ b/internal/resourcepatch/patch.go @@ -1,4 +1,4 @@ -package manifestvalues +package resourcepatch import ( "bytes" @@ -65,11 +65,11 @@ type TargetPatch struct { patch jsonpatch.Patch } -// generateTargetPatch does three things: +// GenerateTargetPatch does three things: // - execute the targets valueTemplate if it exists // - create an applicable jsonpatch // - resolve the targets resource GVK -func generateTargetPatch(target v1alpha1.ValueDefinitionTarget, value string) (*TargetPatch, error) { +func GenerateTargetPatch(target v1alpha1.ValueDefinitionTarget, value any) (*TargetPatch, error) { if actualValue, err := getActualValue(target, value); err != nil { return nil, err } else if jsonPatch, err := generateJsonPatch(target.Patch, actualValue); err != nil { @@ -89,7 +89,7 @@ func generateTargetPatch(target v1alpha1.ValueDefinitionTarget, value string) (* } } -func getActualValue(target v1alpha1.ValueDefinitionTarget, value string) (any, error) { +func getActualValue(target v1alpha1.ValueDefinitionTarget, value any) (any, error) { if len(target.ValueTemplate) == 0 { return value, nil } @@ -190,7 +190,7 @@ func GeneratePatches(manifest v1alpha1.PackageManifest, values map[string]string def := manifest.ValueDefinitions[name] if value, ok := values[name]; ok { for _, target := range def.Targets { - if patch, err := generateTargetPatch(target, value); err != nil { + if patch, err := GenerateTargetPatch(target, value); err != nil { return nil, err } else { result = append(result, *patch) diff --git a/internal/manifestvalues/patch_test.go b/internal/resourcepatch/patch_test.go similarity index 94% rename from internal/manifestvalues/patch_test.go rename to internal/resourcepatch/patch_test.go index 1e2e15439..48121769e 100644 --- a/internal/manifestvalues/patch_test.go +++ b/internal/resourcepatch/patch_test.go @@ -1,4 +1,4 @@ -package manifestvalues +package resourcepatch import ( "encoding/json" @@ -65,11 +65,11 @@ var _ = Describe("GeneratePatches", func() { }) }) -var _ = Describe("generateTargetPatch", func() { - DescribeTable("generateTargetPatch", +var _ = Describe("GenerateTargetPatch", func() { + DescribeTable("GenerateTargetPatch", func(target v1alpha1.ValueDefinitionTarget, value string, expectError bool, resource *targetResource, chartName *string, patch string) { - result, err := generateTargetPatch(target, value) + result, err := GenerateTargetPatch(target, value) if expectError { Expect(err).To(HaveOccurred()) } else { @@ -134,7 +134,7 @@ var _ = Describe("generateTargetPatch", func() { var _ = Describe("ApplyToResource", func() { It("should patch resource", func() { - patch, err := generateTargetPatch(v1alpha1.ValueDefinitionTarget{ + patch, err := GenerateTargetPatch(v1alpha1.ValueDefinitionTarget{ Resource: &corev1.TypedObjectReference{APIGroup: &appsv1group, Kind: "Deployment", Name: "foo", Namespace: &foo}, Patch: v1alpha1.PartialJsonPatch{Op: "add", Path: "/spec/replicas"}, }, "2") @@ -156,7 +156,7 @@ var _ = Describe("ApplyToResource", func() { Expect(obj).To(Equal(expected)) }) It("should patch helm values", func() { - patch, err := generateTargetPatch(v1alpha1.ValueDefinitionTarget{ + patch, err := GenerateTargetPatch(v1alpha1.ValueDefinitionTarget{ ChartName: &foo, Patch: v1alpha1.PartialJsonPatch{Op: "add", Path: "/spec/replicas"}, }, "2") diff --git a/internal/resourcepatch/suite_test.go b/internal/resourcepatch/suite_test.go new file mode 100644 index 000000000..528b2dccb --- /dev/null +++ b/internal/resourcepatch/suite_test.go @@ -0,0 +1,13 @@ +package resourcepatch + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestDependency(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "ResourcePatch Suite") +} diff --git a/website/static/schemas/v1/package-manifest.json b/website/static/schemas/v1/package-manifest.json index 4c23ff9fa..592f15d07 100644 --- a/website/static/schemas/v1/package-manifest.json +++ b/website/static/schemas/v1/package-manifest.json @@ -145,6 +145,40 @@ "url" ] }, + "TransformationDefinition": { + "properties": { + "source": { + "$ref": "#/$defs/TransformationSource" + }, + "targets": { + "items": { + "$ref": "#/$defs/ValueDefinitionTarget" + }, + "type": "array" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "targets" + ] + }, + "TransformationSource": { + "properties": { + "resource": { + "$ref": "#/$defs/TypedLocalObjectReference" + }, + "path": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "path" + ] + }, "TypedLocalObjectReference": { "properties": { "apiGroup": { @@ -350,6 +384,12 @@ }, "type": "object" }, + "transformations": { + "items": { + "$ref": "#/$defs/TransformationDefinition" + }, + "type": "array" + }, "transitiveResources": { "items": { "$ref": "#/$defs/TypedLocalObjectReference" From 8c85acecef1d618695c7c44d8c7cdfe04af0a2c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:27:43 +0000 Subject: [PATCH 11/16] fix(deps): update dependency @getcanary/web to ^0.0.104 (#1217) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package-lock.json | 8 ++++---- website/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index b0e1ef6f3..5b65ca4ad 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -21,7 +21,7 @@ "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", "@getcanary/docusaurus-theme-search-pagefind": "^0.0.13", - "@getcanary/web": "^0.0.102", + "@getcanary/web": "^0.0.104", "@giscus/react": "^3.0.0", "@lottiefiles/react-lottie-player": "^3.5.3", "@mdx-js/react": "^3.0.0", @@ -3370,9 +3370,9 @@ } }, "node_modules/@getcanary/web": { - "version": "0.0.102", - "resolved": "https://registry.npmjs.org/@getcanary/web/-/web-0.0.102.tgz", - "integrity": "sha512-o21n9KYHwHk/M16WSghXTkKT3kkGTXu0dusTT3Jdir0Kh5ohgZxKxClOcjP45CCuIV/s+qRUtlKoAb7U1swzdw==", + "version": "0.0.104", + "resolved": "https://registry.npmjs.org/@getcanary/web/-/web-0.0.104.tgz", + "integrity": "sha512-qSwSMzbOBhPyC5vEDj9/jXoc5qUfkq+Iymf0gJb1ZqLG9/uStF7XQQxkFsllh92Ybybbowf2ptRla9gDCEezWw==", "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.6.8", diff --git a/website/package.json b/website/package.json index 1ead5abd8..c449d1d51 100644 --- a/website/package.json +++ b/website/package.json @@ -31,7 +31,7 @@ "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", "@getcanary/docusaurus-theme-search-pagefind": "^0.0.13", - "@getcanary/web": "^0.0.102", + "@getcanary/web": "^0.0.104", "@giscus/react": "^3.0.0", "@lottiefiles/react-lottie-player": "^3.5.3", "@mdx-js/react": "^3.0.0", From ede058b09172135a3f0bad8fd6bc73551087a55d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 08:30:00 +0000 Subject: [PATCH 12/16] chore(deps): update commitlint monorepo to v19.5.0 (#1221) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 498 ++++++++++++++-------------------------------- package.json | 4 +- 2 files changed, 152 insertions(+), 350 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb0488f48..a2d2df7bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,8 +16,8 @@ "htmx.org": "2.0.2" }, "devDependencies": { - "@commitlint/cli": "19.4.1", - "@commitlint/config-conventional": "19.4.1", + "@commitlint/cli": "19.5.0", + "@commitlint/config-conventional": "19.5.0", "esbuild": "0.23.1", "prettier": "3.3.3", "prettier-plugin-go-template": "0.0.15" @@ -142,18 +142,18 @@ "dev": true }, "node_modules/@commitlint/cli": { - "version": "19.4.1", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.4.1.tgz", - "integrity": "sha512-EerFVII3ZcnhXsDT9VePyIdCJoh3jEzygN1L37MjQXgPfGS6fJTWL/KHClVMod1d8w94lFC3l4Vh/y5ysVAz2A==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.5.0.tgz", + "integrity": "sha512-gaGqSliGwB86MDmAAKAtV9SV1SHdmN8pnGq4EJU4+hLisQ7IFfx4jvU4s+pk6tl0+9bv6yT+CaZkufOinkSJIQ==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/format": "^19.3.0", - "@commitlint/lint": "^19.4.1", - "@commitlint/load": "^19.4.0", - "@commitlint/read": "^19.4.0", - "@commitlint/types": "^19.0.3", - "execa": "^8.0.1", + "@commitlint/format": "^19.5.0", + "@commitlint/lint": "^19.5.0", + "@commitlint/load": "^19.5.0", + "@commitlint/read": "^19.5.0", + "@commitlint/types": "^19.5.0", + "tinyexec": "^0.3.0", "yargs": "^17.0.0" }, "bin": { @@ -164,13 +164,13 @@ } }, "node_modules/@commitlint/config-conventional": { - "version": "19.4.1", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.4.1.tgz", - "integrity": "sha512-D5S5T7ilI5roybWGc8X35OBlRXLAwuTseH1ro0XgqkOWrhZU8yOwBOslrNmSDlTXhXLq8cnfhQyC42qaUCzlXA==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.5.0.tgz", + "integrity": "sha512-OBhdtJyHNPryZKg0fFpZNOBM1ZDbntMvqMuSmpfyP86XSfwzGw4CaoYRG4RutUPg0BTK07VMRIkNJT6wi2zthg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "conventional-changelog-conventionalcommits": "^7.0.2" }, "engines": { @@ -178,12 +178,13 @@ } }, "node_modules/@commitlint/config-validator": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.0.3.tgz", - "integrity": "sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.5.0.tgz", + "integrity": "sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==", "dev": true, + "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "ajv": "^8.11.0" }, "engines": { @@ -191,13 +192,13 @@ } }, "node_modules/@commitlint/ensure": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-19.0.3.tgz", - "integrity": "sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-19.5.0.tgz", + "integrity": "sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", @@ -209,21 +210,23 @@ } }, "node_modules/@commitlint/execute-rule": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz", - "integrity": "sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-19.5.0.tgz", + "integrity": "sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==", "dev": true, + "license": "MIT", "engines": { "node": ">=v18" } }, "node_modules/@commitlint/format": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-19.3.0.tgz", - "integrity": "sha512-luguk5/aF68HiF4H23ACAfk8qS8AHxl4LLN5oxPc24H+2+JRPsNr1OS3Gaea0CrH7PKhArBMKBz5RX9sA5NtTg==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-19.5.0.tgz", + "integrity": "sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A==", "dev": true, + "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "chalk": "^5.3.0" }, "engines": { @@ -231,12 +234,13 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.2.2.tgz", - "integrity": "sha512-eNX54oXMVxncORywF4ZPFtJoBm3Tvp111tg1xf4zWXGfhBPKpfKG6R+G3G4v5CPlRROXpAOpQ3HMhA9n1Tck1g==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.5.0.tgz", + "integrity": "sha512-0XQ7Llsf9iL/ANtwyZ6G0NGp5Y3EQ8eDQSxv/SRcfJ0awlBY4tHFAvwWbw66FVUaWICH7iE5en+FD9TQsokZ5w==", "dev": true, + "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "semver": "^7.6.0" }, "engines": { @@ -244,32 +248,32 @@ } }, "node_modules/@commitlint/lint": { - "version": "19.4.1", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.4.1.tgz", - "integrity": "sha512-Ws4YVAZ0jACTv6VThumITC1I5AG0UyXMGua3qcf55JmXIXm/ejfaVKykrqx7RyZOACKVAs8uDRIsEsi87JZ3+Q==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.5.0.tgz", + "integrity": "sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/is-ignored": "^19.2.2", - "@commitlint/parse": "^19.0.3", - "@commitlint/rules": "^19.4.1", - "@commitlint/types": "^19.0.3" + "@commitlint/is-ignored": "^19.5.0", + "@commitlint/parse": "^19.5.0", + "@commitlint/rules": "^19.5.0", + "@commitlint/types": "^19.5.0" }, "engines": { "node": ">=v18" } }, "node_modules/@commitlint/load": { - "version": "19.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.4.0.tgz", - "integrity": "sha512-I4lCWaEZYQJ1y+Y+gdvbGAx9pYPavqZAZ3/7/8BpWh+QjscAn8AjsUpLV2PycBsEx7gupq5gM4BViV9xwTIJuw==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.5.0.tgz", + "integrity": "sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/config-validator": "^19.0.3", - "@commitlint/execute-rule": "^19.0.0", - "@commitlint/resolve-extends": "^19.1.0", - "@commitlint/types": "^19.0.3", + "@commitlint/config-validator": "^19.5.0", + "@commitlint/execute-rule": "^19.5.0", + "@commitlint/resolve-extends": "^19.5.0", + "@commitlint/types": "^19.5.0", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", "cosmiconfig-typescript-loader": "^5.0.0", @@ -282,9 +286,9 @@ } }, "node_modules/@commitlint/message": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-19.0.0.tgz", - "integrity": "sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-19.5.0.tgz", + "integrity": "sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ==", "dev": true, "license": "MIT", "engines": { @@ -292,12 +296,13 @@ } }, "node_modules/@commitlint/parse": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-19.0.3.tgz", - "integrity": "sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-19.5.0.tgz", + "integrity": "sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw==", "dev": true, + "license": "MIT", "dependencies": { - "@commitlint/types": "^19.0.3", + "@commitlint/types": "^19.5.0", "conventional-changelog-angular": "^7.0.0", "conventional-commits-parser": "^5.0.0" }, @@ -306,30 +311,31 @@ } }, "node_modules/@commitlint/read": { - "version": "19.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.4.0.tgz", - "integrity": "sha512-r95jLOEZzKDakXtnQub+zR3xjdnrl2XzerPwm7ch1/cc5JGq04tyaNpa6ty0CRCWdVrk4CZHhqHozb8yZwy2+g==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.5.0.tgz", + "integrity": "sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/top-level": "^19.0.0", - "@commitlint/types": "^19.0.3", - "execa": "^8.0.1", + "@commitlint/top-level": "^19.5.0", + "@commitlint/types": "^19.5.0", "git-raw-commits": "^4.0.0", - "minimist": "^1.2.8" + "minimist": "^1.2.8", + "tinyexec": "^0.3.0" }, "engines": { "node": ">=v18" } }, "node_modules/@commitlint/resolve-extends": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz", - "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.5.0.tgz", + "integrity": "sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==", "dev": true, + "license": "MIT", "dependencies": { - "@commitlint/config-validator": "^19.0.3", - "@commitlint/types": "^19.0.3", + "@commitlint/config-validator": "^19.5.0", + "@commitlint/types": "^19.5.0", "global-directory": "^4.0.1", "import-meta-resolve": "^4.0.0", "lodash.mergewith": "^4.6.2", @@ -340,26 +346,25 @@ } }, "node_modules/@commitlint/rules": { - "version": "19.4.1", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.4.1.tgz", - "integrity": "sha512-AgctfzAONoVxmxOXRyxXIq7xEPrd7lK/60h2egp9bgGUMZK9v0+YqLOA+TH+KqCa63ZoCr8owP2YxoSSu7IgnQ==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.5.0.tgz", + "integrity": "sha512-hDW5TPyf/h1/EufSHEKSp6Hs+YVsDMHazfJ2azIk9tHPXS6UqSz1dIRs1gpqS3eMXgtkT7JH6TW4IShdqOwhAw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/ensure": "^19.0.3", - "@commitlint/message": "^19.0.0", - "@commitlint/to-lines": "^19.0.0", - "@commitlint/types": "^19.0.3", - "execa": "^8.0.1" + "@commitlint/ensure": "^19.5.0", + "@commitlint/message": "^19.5.0", + "@commitlint/to-lines": "^19.5.0", + "@commitlint/types": "^19.5.0" }, "engines": { "node": ">=v18" } }, "node_modules/@commitlint/to-lines": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-19.0.0.tgz", - "integrity": "sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-19.5.0.tgz", + "integrity": "sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ==", "dev": true, "license": "MIT", "engines": { @@ -367,10 +372,11 @@ } }, "node_modules/@commitlint/top-level": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-19.0.0.tgz", - "integrity": "sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-19.5.0.tgz", + "integrity": "sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^7.0.0" }, @@ -379,10 +385,11 @@ } }, "node_modules/@commitlint/types": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.0.3.tgz", - "integrity": "sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==", + "version": "19.5.0", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.5.0.tgz", + "integrity": "sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==", "dev": true, + "license": "MIT", "dependencies": { "@types/conventional-commits-parser": "^5.0.0", "chalk": "^5.3.0" @@ -847,6 +854,7 @@ "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", "integrity": "sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -866,15 +874,16 @@ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" }, "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -1003,6 +1012,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, + "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, @@ -1027,6 +1037,7 @@ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", "dev": true, + "license": "MIT", "dependencies": { "is-text-path": "^2.0.0", "JSONStream": "^1.3.5", @@ -1083,20 +1094,6 @@ "typescript": ">=4" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/dargs": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", @@ -1203,40 +1200,26 @@ "node": ">=0.8.0" } }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true, + "license": "MIT" }, "node_modules/find-up": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^7.2.0", "path-exists": "^5.0.0", @@ -1258,18 +1241,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/giscus": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/giscus/-/giscus-1.5.0.tgz", @@ -1300,6 +1271,7 @@ "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", "dev": true, + "license": "MIT", "dependencies": { "ini": "4.1.1" }, @@ -1335,15 +1307,6 @@ "integrity": "sha512-eUPIpQaWKKstX393XNCRCMJTrqPzikh36Y9RceqsUZLTtlFjFaVDgwZLUsrFk8J2uzZxkkfiy0TE359j2eN6hA==", "license": "0BSD" }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "engines": { - "node": ">=16.17.0" - } - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -1370,10 +1333,11 @@ } }, "node_modules/import-meta-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", - "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -1384,6 +1348,7 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -1412,23 +1377,12 @@ "node": ">=8" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-text-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", "dev": true, + "license": "MIT", "dependencies": { "text-extensions": "^2.0.0" }, @@ -1436,12 +1390,6 @@ "node": ">=8" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, "node_modules/jiti": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", @@ -1479,7 +1427,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsonparse": { "version": "1.3.1", @@ -1488,13 +1437,15 @@ "dev": true, "engines": [ "node >= 0.2.0" - ] + ], + "license": "MIT" }, "node_modules/JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, + "license": "(MIT OR Apache-2.0)", "dependencies": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -1545,6 +1496,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^6.0.0" }, @@ -1585,7 +1537,8 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.snakecase": { "version": "4.1.1", @@ -1614,18 +1567,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/meow": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", @@ -1638,24 +1579,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -1665,53 +1588,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-limit": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, @@ -1727,6 +1609,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^4.0.0" }, @@ -1772,19 +1655,11 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/prettier": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", @@ -1816,15 +1691,6 @@ "prettier": "^3.0.0" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1839,6 +1705,7 @@ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1848,18 +1715,17 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1867,39 +1733,6 @@ "node": ">=10" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -1935,18 +1768,6 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1964,6 +1785,7 @@ "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -1975,7 +1797,15 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", + "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "dev": true, + "license": "MIT" }, "node_modules/typescript": { "version": "5.3.3", @@ -2011,6 +1841,7 @@ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -2018,30 +1849,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -2068,12 +1875,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -2102,10 +1903,11 @@ } }, "node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.20" }, diff --git a/package.json b/package.json index 998beb461..50bf28fd3 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "htmx-ext-response-targets": "2.0.1" }, "devDependencies": { - "@commitlint/cli": "19.4.1", - "@commitlint/config-conventional": "19.4.1", + "@commitlint/cli": "19.5.0", + "@commitlint/config-conventional": "19.5.0", "esbuild": "0.23.1", "prettier": "3.3.3", "prettier-plugin-go-template": "0.0.15" From 8f24214aedd71c8fa41d198c2b36067ec8f33947 Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Wed, 11 Sep 2024 12:12:43 +0200 Subject: [PATCH 13/16] feat(cli): add `--use-default` flag for `install`, `update`, `configure` commands (#1219) Signed-off-by: Jakob Steiner --- cmd/glasskube/cmd/configure.go | 7 ++- cmd/glasskube/cmd/install.go | 4 +- cmd/glasskube/cmd/update.go | 9 +++- internal/manifestvalues/cli/configure.go | 49 ++++++++++++++++--- .../flags/use_default_options.go | 14 ++++++ .../flags/{flags.go => values_options.go} | 0 6 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 internal/manifestvalues/flags/use_default_options.go rename internal/manifestvalues/flags/{flags.go => values_options.go} (100%) diff --git a/cmd/glasskube/cmd/configure.go b/cmd/glasskube/cmd/configure.go index 961180d13..8c4c4de6b 100644 --- a/cmd/glasskube/cmd/configure.go +++ b/cmd/glasskube/cmd/configure.go @@ -19,6 +19,7 @@ import ( var configureCmdOptions = struct { flags.ValuesOptions + flags.UseDefaultOptions OutputOptions NamespaceOptions KindOptions @@ -72,7 +73,10 @@ func runConfigure(cmd *cobra.Command, args []string) { } else if len(pkgManifest.ValueDefinitions) == 0 { fmt.Fprintln(os.Stderr, "❌ this package has no configuration values") cliutils.ExitWithError() - } else if values, err := cli.Configure(*pkgManifest, pkg.GetSpec().Values); err != nil { + } else if values, err := cli.Configure(*pkgManifest, + cli.WithOldValues(pkg.GetSpec().Values), + cli.WithUseDefaults(configureCmdOptions.UseDefault), + ); err != nil { fmt.Fprintf(os.Stderr, "❌ error during configure: %v\n", err) cliutils.ExitWithError() } else { @@ -141,6 +145,7 @@ func runConfigure(cmd *cobra.Command, args []string) { func init() { configureCmdOptions.ValuesOptions.AddFlagsToCommand(configureCmd) + configureCmdOptions.UseDefaultOptions.AddFlagsToCommand(configureCmd) configureCmdOptions.OutputOptions.AddFlagsToCommand(configureCmd) configureCmdOptions.NamespaceOptions.AddFlagsToCommand(configureCmd) configureCmdOptions.KindOptions.AddFlagsToCommand(configureCmd) diff --git a/cmd/glasskube/cmd/install.go b/cmd/glasskube/cmd/install.go index fb07a1439..4499b3d9d 100644 --- a/cmd/glasskube/cmd/install.go +++ b/cmd/glasskube/cmd/install.go @@ -30,6 +30,7 @@ import ( var installCmdOptions = struct { flags.ValuesOptions + flags.UseDefaultOptions Version string Repository string EnableAutoUpdates bool @@ -178,7 +179,7 @@ var installCmd = &cobra.Command{ pkgBuilder.WithValues(values) } } else { - if values, err := cli.Configure(manifest, nil); err != nil { + if values, err := cli.Configure(manifest, cli.WithUseDefaults(installCmdOptions.UseDefault)); err != nil { cancel() } else { pkgBuilder.WithValues(values) @@ -342,6 +343,7 @@ func init() { installCmd.PersistentFlags().BoolVar(&installCmdOptions.NoWait, "no-wait", false, "Perform non-blocking install") installCmd.PersistentFlags().BoolVarP(&installCmdOptions.Yes, "yes", "y", false, "Do not ask for any confirmation") installCmdOptions.ValuesOptions.AddFlagsToCommand(installCmd) + installCmdOptions.UseDefaultOptions.AddFlagsToCommand(installCmd) installCmdOptions.OutputOptions.AddFlagsToCommand(installCmd) installCmdOptions.NamespaceOptions.AddFlagsToCommand(installCmd) installCmdOptions.DryRunOptions.AddFlagsToCommand(installCmd) diff --git a/cmd/glasskube/cmd/update.go b/cmd/glasskube/cmd/update.go index e663e3ade..ad1ba7451 100644 --- a/cmd/glasskube/cmd/update.go +++ b/cmd/glasskube/cmd/update.go @@ -13,6 +13,7 @@ import ( "github.com/glasskube/glasskube/internal/controller/ctrlpkg" "github.com/glasskube/glasskube/internal/manifestvalues/cli" + "github.com/glasskube/glasskube/internal/manifestvalues/flags" "github.com/glasskube/glasskube/api/v1alpha1" "github.com/glasskube/glasskube/internal/clicontext" @@ -30,6 +31,7 @@ import ( ) var updateCmdOptions struct { + flags.UseDefaultOptions Version string Yes bool DryRunOptions @@ -255,8 +257,10 @@ func updateConfigurationIfNeeded(ctx context.Context, pkg ctrlpkg.Package, newVe if len(newManifest.ValueDefinitions) > 0 { if cliutils.YesNoPrompt(fmt.Sprintf("Do you want to update the configuration for %s?", pkg.GetName()), false) { - - values, err := cli.Configure(*newManifest, pkg.GetSpec().Values) + values, err := cli.Configure(*newManifest, + cli.WithOldValues(pkg.GetSpec().Values), + cli.WithUseDefaults(updateCmdOptions.UseDefault), + ) if err != nil { return fmt.Errorf("error during configuration: %v", err) } @@ -276,6 +280,7 @@ func init() { updateCmdOptions.OutputOptions.AddFlagsToCommand(updateCmd) updateCmdOptions.KindOptions.AddFlagsToCommand(updateCmd) updateCmdOptions.NamespaceOptions.AddFlagsToCommand(updateCmd) + updateCmdOptions.UseDefaultOptions.AddFlagsToCommand(updateCmd) RootCmd.AddCommand(updateCmd) updateCmdOptions.DryRunOptions.AddFlagsToCommand(updateCmd) } diff --git a/internal/manifestvalues/cli/configure.go b/internal/manifestvalues/cli/configure.go index c374db230..6805107e1 100644 --- a/internal/manifestvalues/cli/configure.go +++ b/internal/manifestvalues/cli/configure.go @@ -35,10 +35,42 @@ var ( red = color.RedString ) +type UseDefaultValuesOption []string + +func (o UseDefaultValuesOption) ShouldUseDefault(name string, def v1alpha1.ValueDefinition) bool { + for _, v := range o { + switch v { + case "all", name: + return def.DefaultValue != "" + } + } + return false +} + +type ConfigureOptions struct { + oldValues map[string]v1alpha1.ValueConfiguration + UseDefaultValuesOption +} + +type ConfigureOption func(*ConfigureOptions) + +func WithOldValues(oldValues map[string]v1alpha1.ValueConfiguration) ConfigureOption { + return func(co *ConfigureOptions) { co.oldValues = oldValues } +} + +func WithUseDefaults(opts UseDefaultValuesOption) ConfigureOption { + return func(co *ConfigureOptions) { co.UseDefaultValuesOption = opts } +} + func Configure( manifest v1alpha1.PackageManifest, - oldValues map[string]v1alpha1.ValueConfiguration, + opts ...ConfigureOption, ) (map[string]v1alpha1.ValueConfiguration, error) { + var options ConfigureOptions + for _, fn := range opts { + fn(&options) + } + newValues := make(map[string]v1alpha1.ValueConfiguration, len(manifest.ValueDefinitions)) if len(manifest.ValueDefinitions) > 0 { fmt.Fprintf(os.Stderr, "\n%v has %v values for configuration.\n\n", @@ -54,13 +86,18 @@ func Configure( for i, name := range maputils.KeysSorted(manifest.ValueDefinitions) { def := manifest.ValueDefinitions[name] var oldValuePtr *v1alpha1.ValueConfiguration - if oldValue, ok := oldValues[name]; ok { + if oldValue, ok := options.oldValues[name]; ok { oldValuePtr = &oldValue } - if newValue, err := ConfigureSingle(name, def, oldValuePtr); err != nil { - return nil, err - } else if newValue != nil { - newValues[name] = *newValue + if options.ShouldUseDefault(name, def) { + fmt.Fprintf(os.Stderr, "Using default value for %v: %v\n", name, def.DefaultValue) + newValues[name] = v1alpha1.ValueConfiguration{Value: util.Pointer(def.DefaultValue)} + } else { + if newValue, err := ConfigureSingle(name, def, oldValuePtr); err != nil { + return nil, err + } else if newValue != nil { + newValues[name] = *newValue + } } fmt.Fprintf(os.Stderr, "\nProgress: %v%v\n\n", green(strings.Repeat("✔", i+1)), diff --git a/internal/manifestvalues/flags/use_default_options.go b/internal/manifestvalues/flags/use_default_options.go new file mode 100644 index 000000000..a1b282372 --- /dev/null +++ b/internal/manifestvalues/flags/use_default_options.go @@ -0,0 +1,14 @@ +package flags + +import "github.com/spf13/cobra" + +type UseDefaultOptions struct { + UseDefault []string +} + +func (opts *UseDefaultOptions) AddFlagsToCommand(cmd *cobra.Command) { + flags := cmd.Flags() + flags.StringArrayVar(&opts.UseDefault, "use-default", opts.UseDefault, + "Instruct glasskube to use the default value for the speciefied definition name(s).\n"+ + "Specify \"all\" to use all available default values.") +} diff --git a/internal/manifestvalues/flags/flags.go b/internal/manifestvalues/flags/values_options.go similarity index 100% rename from internal/manifestvalues/flags/flags.go rename to internal/manifestvalues/flags/values_options.go From 9c5416edf2e1747134ba787a9bc2bba44696cc6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:04:22 +0200 Subject: [PATCH 14/16] chore(deps): bump body-parser and express in /website (#1222) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/package-lock.json | 163 ++++++++++++++++++++++++-------------- 1 file changed, 103 insertions(+), 60 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 5b65ca4ad..2b4a045ba 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -6098,10 +6098,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "license": "MIT", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -6111,7 +6110,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -6125,7 +6124,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6134,7 +6132,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -6143,7 +6140,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -6154,8 +6150,21 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/bonjour-service": { "version": "1.2.1", @@ -6934,7 +6943,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8152,7 +8160,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -8170,7 +8177,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -9310,7 +9316,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -9375,37 +9380,36 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", - "license": "MIT", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", + "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -9437,6 +9441,14 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -9444,10 +9456,9 @@ "license": "MIT" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "license": "MIT" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "node_modules/express/node_modules/range-parser": { "version": "1.2.1", @@ -9923,7 +9934,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -10897,7 +10907,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -12768,7 +12777,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -12786,10 +12794,12 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -15087,7 +15097,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", "bin": { "mime": "cli.js" }, @@ -16958,7 +16967,6 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.4" }, @@ -17047,7 +17055,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -17062,7 +17069,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -17071,7 +17077,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -18176,10 +18181,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "license": "MIT", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -18203,7 +18207,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -18211,20 +18214,17 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/send/node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -18339,10 +18339,9 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "license": "MIT", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", + "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -18353,6 +18352,55 @@ "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-static/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-static/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static/node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static/node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -18389,8 +18437,7 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shallow-clone": { "version": "3.0.1", @@ -19325,7 +19372,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", "engines": { "node": ">=0.6" } @@ -19477,7 +19523,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -19490,7 +19535,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -19499,7 +19543,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, From ff7c3cefa541b59544be29a5e41ab96fc5d2cb67 Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Wed, 11 Sep 2024 16:12:34 +0200 Subject: [PATCH 15/16] feat(package-operator): add specifying values for package components (#1218) Signed-off-by: Jakob Steiner --- api/v1alpha1/common.go | 8 ++- api/v1alpha1/package_manifest.go | 12 ++++ api/v1alpha1/zz_generated.deepcopy.go | 58 +++++++++++++++++-- .../packages.glasskube.dev_packageinfos.yaml | 8 +++ internal/controller/common.go | 26 ++++++++- internal/manifestvalues/cli/configure.go | 4 +- internal/manifestvalues/flags/flags_test.go | 2 +- internal/manifestvalues/resolver_test.go | 2 +- internal/web/configurationvalues.go | 4 +- website/docs/06_reference/package-manifest.md | 28 +++++++-- .../static/schemas/v1/package-manifest.json | 18 ++++++ 11 files changed, 148 insertions(+), 22 deletions(-) diff --git a/api/v1alpha1/common.go b/api/v1alpha1/common.go index 6dbb2c813..ad3a21e13 100644 --- a/api/v1alpha1/common.go +++ b/api/v1alpha1/common.go @@ -78,11 +78,15 @@ type ValueReference struct { PackageRef *PackageValueSource `json:"packageRef,omitempty"` } +type InlineValueConfiguration struct { + Value *string `json:"value,omitempty"` +} + // +kubebuilder:validation:MinProperties:=1 // +kubebuilder:validation:MaxProperties:=1 type ValueConfiguration struct { - Value *string `json:"value,omitempty"` - ValueFrom *ValueReference `json:"valueFrom,omitempty"` + InlineValueConfiguration `json:",inline"` + ValueFrom *ValueReference `json:"valueFrom,omitempty"` } // PackageSpec defines the desired state diff --git a/api/v1alpha1/package_manifest.go b/api/v1alpha1/package_manifest.go index 38020642d..9c29c2d5e 100644 --- a/api/v1alpha1/package_manifest.go +++ b/api/v1alpha1/package_manifest.go @@ -83,6 +83,18 @@ type Component struct { Name string `json:"name" jsonschema:"required"` InstalledName string `json:"installedName,omitempty"` Version string `json:"version,omitempty"` + // Specify configuration for this component + Values ComponentValues `json:"values,omitempty"` +} + +type ComponentValues map[string]InlineValueConfiguration + +func (values ComponentValues) AsPackageValues() map[string]ValueConfiguration { + result := make(map[string]ValueConfiguration, len(values)) + for name, value := range values { + result[name] = ValueConfiguration{InlineValueConfiguration: value} + } + return result } // +kubebuilder:validation:Enum=Cluster;Namespaced diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index c1d7bd029..41654d8c6 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -88,6 +88,13 @@ func (in *ClusterPackageList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Component) DeepCopyInto(out *Component) { *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make(ComponentValues, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component. @@ -100,6 +107,27 @@ func (in *Component) DeepCopy() *Component { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ComponentValues) DeepCopyInto(out *ComponentValues) { + { + in := &in + *out = make(ComponentValues, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentValues. +func (in ComponentValues) DeepCopy() ComponentValues { + if in == nil { + return nil + } + out := new(ComponentValues) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Dependency) DeepCopyInto(out *Dependency) { *out = *in @@ -135,6 +163,26 @@ func (in *HelmManifest) DeepCopy() *HelmManifest { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InlineValueConfiguration) DeepCopyInto(out *InlineValueConfiguration) { + *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlineValueConfiguration. +func (in *InlineValueConfiguration) DeepCopy() *InlineValueConfiguration { + if in == nil { + return nil + } + out := new(InlineValueConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSON) DeepCopyInto(out *JSON) { *out = *in @@ -457,7 +505,9 @@ func (in *PackageManifest) DeepCopyInto(out *PackageManifest) { if in.Components != nil { in, out := &in.Components, &out.Components *out = make([]Component, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } } @@ -823,11 +873,7 @@ func (in *TransformationSource) DeepCopy() *TransformationSource { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValueConfiguration) DeepCopyInto(out *ValueConfiguration) { *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } + in.InlineValueConfiguration.DeepCopyInto(&out.InlineValueConfiguration) if in.ValueFrom != nil { in, out := &in.ValueFrom, &out.ValueFrom *out = new(ValueReference) diff --git a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml index 4f658bcd7..535c4efaf 100644 --- a/config/crd/bases/packages.glasskube.dev_packageinfos.yaml +++ b/config/crd/bases/packages.glasskube.dev_packageinfos.yaml @@ -131,6 +131,14 @@ spec: type: string name: type: string + values: + additionalProperties: + properties: + value: + type: string + type: object + description: Specify configuration for this component + type: object version: type: string required: diff --git a/internal/controller/common.go b/internal/controller/common.go index 08d0a6434..ab3cd8068 100644 --- a/internal/controller/common.go +++ b/internal/controller/common.go @@ -3,6 +3,7 @@ package controller import ( "context" "fmt" + "reflect" "slices" "strings" @@ -329,6 +330,7 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo } var newPkg ctrlpkg.Package + var pkgValues map[string]packagesv1alpha1.ValueConfiguration if requirement.ComponentMetadata != nil { newPkg = &packagesv1alpha1.Package{ @@ -337,6 +339,11 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo Namespace: requirement.ComponentMetadata.Namespace, }, } + for _, cmp := range r.pi.Status.Manifest.Components { + if cmp.Name == requirement.Name { + pkgValues = cmp.Values.AsPackageValues() + } + } } else { newPkg = &packagesv1alpha1.ClusterPackage{ ObjectMeta: metav1.ObjectMeta{ @@ -374,6 +381,7 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo Version: requirement.Version, RepositoryName: repositoryName, } + newPkg.GetSpec().Values = pkgValues return nil }); err != nil { log.Error(err, "Failed to create required package", "required", requirement.Name) @@ -401,7 +409,10 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo var ownedPackages []packagesv1alpha1.OwnedResourceRef var waitingFor []string - var handleRequiredPackage = func(requiredPkg ctrlpkg.Package) error { + var handleRequiredPackage = func( + requiredPkg ctrlpkg.Package, + componentValues map[string]packagesv1alpha1.ValueConfiguration, + ) error { if err := r.Get(ctx, client.ObjectKeyFromObject(requiredPkg), requiredPkg); err != nil { if apierrors.IsNotFound(err) { waitingFor = append(waitingFor, requiredPkg.GetName()) @@ -416,6 +427,15 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo } else { ownedPackages = append(ownedPackages, owned) } + + if !reflect.DeepEqual(componentValues, requiredPkg.GetSpec().Values) { + requiredPkg.GetSpec().Values = componentValues + if err := r.Update(ctx, requiredPkg); err != nil { + log.Error(err, "Failed to update values of required package", "package", requiredPkg) + failed = append(failed, requiredPkg.GetName()) + } + } + if meta.IsStatusConditionTrue(requiredPkg.GetStatus().Conditions, string(condition.Failed)) { failed = append(failed, requiredPkg.GetName()) } else if !meta.IsStatusConditionTrue(requiredPkg.GetStatus().Conditions, string(condition.Ready)) { @@ -430,7 +450,7 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo requiredPkg := packagesv1alpha1.ClusterPackage{ ObjectMeta: metav1.ObjectMeta{Name: dep.Name}, } - if err := handleRequiredPackage(&requiredPkg); err != nil { + if err := handleRequiredPackage(&requiredPkg, nil); err != nil { r.setShouldUpdate(conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, condition.InstallationFailed, err.Error())) return false @@ -447,7 +467,7 @@ func (r *PackageReconcilationContext) ensureDependencies(ctx context.Context) bo if requiredPkg.Namespace == "" { requiredPkg.Namespace = r.pi.Status.Manifest.DefaultNamespace } - if err := handleRequiredPackage(&requiredPkg); err != nil { + if err := handleRequiredPackage(&requiredPkg, cmp.Values.AsPackageValues()); err != nil { r.setShouldUpdate(conditions.SetFailed(ctx, r.EventRecorder, r.pkg, &r.pkg.GetStatus().Conditions, condition.InstallationFailed, err.Error())) return false diff --git a/internal/manifestvalues/cli/configure.go b/internal/manifestvalues/cli/configure.go index 6805107e1..4b1851466 100644 --- a/internal/manifestvalues/cli/configure.go +++ b/internal/manifestvalues/cli/configure.go @@ -91,7 +91,9 @@ func Configure( } if options.ShouldUseDefault(name, def) { fmt.Fprintf(os.Stderr, "Using default value for %v: %v\n", name, def.DefaultValue) - newValues[name] = v1alpha1.ValueConfiguration{Value: util.Pointer(def.DefaultValue)} + newValues[name] = v1alpha1.ValueConfiguration{ + InlineValueConfiguration: v1alpha1.InlineValueConfiguration{Value: util.Pointer(def.DefaultValue)}, + } } else { if newValue, err := ConfigureSingle(name, def, oldValuePtr); err != nil { return nil, err diff --git a/internal/manifestvalues/flags/flags_test.go b/internal/manifestvalues/flags/flags_test.go index 14dd0a00c..e8f98f7c2 100644 --- a/internal/manifestvalues/flags/flags_test.go +++ b/internal/manifestvalues/flags/flags_test.go @@ -8,7 +8,7 @@ import ( var _ = Describe("ParseValues", func() { foo := "foo" - fooMap := map[string]v1alpha1.ValueConfiguration{"foo": {Value: &foo}} + fooMap := map[string]v1alpha1.ValueConfiguration{"foo": {InlineValueConfiguration: v1alpha1.InlineValueConfiguration{Value: &foo}}} var opts *ValuesOptions BeforeEach(func() { opts = &ValuesOptions{} }) DescribeTable("should parse", diff --git a/internal/manifestvalues/resolver_test.go b/internal/manifestvalues/resolver_test.go index a7a015c89..4238adc0a 100644 --- a/internal/manifestvalues/resolver_test.go +++ b/internal/manifestvalues/resolver_test.go @@ -34,7 +34,7 @@ var _ = Describe("resolver", func() { It("should resolve literal value", func(ctx context.Context) { resolver := newTestResolver() result, err := resolver.Resolve(ctx, map[string]v1alpha1.ValueConfiguration{ - "test": {Value: &testConst}, + "test": {InlineValueConfiguration: v1alpha1.InlineValueConfiguration{Value: &testConst}}, }) Expect(err).NotTo(HaveOccurred()) Expect(result).To(Equal(map[string]string{"test": "test"})) diff --git a/internal/web/configurationvalues.go b/internal/web/configurationvalues.go index 6a55a105c..c15fcbbcb 100644 --- a/internal/web/configurationvalues.go +++ b/internal/web/configurationvalues.go @@ -72,9 +72,9 @@ func extractValues(r *http.Request, manifest *v1alpha1.PackageManifest) (map[str if strings.ToLower(formVal) == "on" { boolStr = strconv.FormatBool(true) } - values[valueName] = v1alpha1.ValueConfiguration{Value: &boolStr} + values[valueName] = v1alpha1.ValueConfiguration{InlineValueConfiguration: v1alpha1.InlineValueConfiguration{Value: &boolStr}} } else { - values[valueName] = v1alpha1.ValueConfiguration{Value: &formVal} + values[valueName] = v1alpha1.ValueConfiguration{InlineValueConfiguration: v1alpha1.InlineValueConfiguration{Value: &formVal}} } } else { return nil, fmt.Errorf("cannot extract value %v because of unknown reference kind %v", valueName, refKindVal) diff --git a/website/docs/06_reference/package-manifest.md b/website/docs/06_reference/package-manifest.md index bca6e54bb..d470c7197 100644 --- a/website/docs/06_reference/package-manifest.md +++ b/website/docs/06_reference/package-manifest.md @@ -100,7 +100,7 @@ Either `resource` or `chartName` must be specified. | op | string | required | | | path | string | required | | -The `value` to create a compete JSON Patch is supplied by the controller. +The `value` to create a complete JSON Patch is supplied by the controller. See https://jsonpatch.com/ for a complete reference. ### TransformationSource @@ -129,11 +129,20 @@ See https://jsonpatch.com/ for a complete reference. ### Component -| Name | Type | Required / Default | Description | -| ------------- | ------ | ------------------ | -------------------------------------- | -| name | string | required | | -| installedName | string | | name suffix for the created `Package` | -| version | string | | a semver constraint for this component | +| Name | Type | Required / Default | Description | +| ------------- | ---------------------------------------------------------------- | ------------------ | -------------------------------------- | +| name | string | required | | +| installedName | string | | name suffix for the created `Package` | +| version | string | | a semver constraint for this component | +| values | map[string][InlineValueConfiguration](#inlinevalueconfiguration) | | specify values for this component | + +### InlineValueConfiguration + +A stripped down variant of a package's value configuration that only supports directly specified values and no reference values. + +| Name | Type | Required / Default | Description | +| ----- | ------ | ------------------ | ----------- | +| value | string | required | | ## Complete Example @@ -173,6 +182,9 @@ components: - name: postgresql installedName: db version: '>=1.0.0' + values: + enableSuperuserAccess: + value: 'true' transitiveResources: - apiVersion: v1 kind: Secret @@ -209,3 +221,7 @@ transformations: path: /config/database/dbHost valueTemplate: '"{{.}}-db-rw"' ``` + +## JSON Schema + +An up to date JSON schema file is available at https://glasskube.dev/schemas/v1/package-manifest.json. diff --git a/website/static/schemas/v1/package-manifest.json b/website/static/schemas/v1/package-manifest.json index 592f15d07..70e4975e8 100644 --- a/website/static/schemas/v1/package-manifest.json +++ b/website/static/schemas/v1/package-manifest.json @@ -12,6 +12,9 @@ }, "version": { "type": "string" + }, + "values": { + "$ref": "#/$defs/ComponentValues" } }, "additionalProperties": false, @@ -20,6 +23,12 @@ "name" ] }, + "ComponentValues": { + "additionalProperties": { + "$ref": "#/$defs/InlineValueConfiguration" + }, + "type": "object" + }, "Dependency": { "properties": { "name": { @@ -58,6 +67,15 @@ "chartVersion" ] }, + "InlineValueConfiguration": { + "properties": { + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "JSON": { "additionalProperties": true, "type": "object" From 8db61a6caa4770ee8065b3f2b9e46044b5d95a6a Mon Sep 17 00:00:00 2001 From: "glasskube[bot]" <133648757+glasskube-bot@users.noreply.github.com> Date: Wed, 11 Sep 2024 08:16:32 -0700 Subject: [PATCH 16/16] chore(main): release 0.21.0 (#1203) --- .release-please-manifest.json | 2 +- CHANGELOG.md | 34 +++++++++++++++++++++++++++ config/autoupdater/kustomization.yaml | 2 +- config/default/kustomization.yaml | 2 +- website/src/partials/_install.mdx | 12 +++++----- website/static/release.json | 2 +- 6 files changed, 44 insertions(+), 10 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 461342f9e..86b0e83d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.20.1" + ".": "0.21.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e25c0c29..b3623ea64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## [0.21.0](https://github.com/glasskube/glasskube/compare/v0.20.1...v0.21.0) (2024-09-11) + + +### Features + +* **cli:** add `--use-default` flag for `install`, `update`, `configure` commands ([#1219](https://github.com/glasskube/glasskube/issues/1219)) ([8f24214](https://github.com/glasskube/glasskube/commit/8f24214aedd71c8fa41d198c2b36067ec8f33947)) +* **package-operator:** add specifying values for package components ([#1218](https://github.com/glasskube/glasskube/issues/1218)) ([ff7c3ce](https://github.com/glasskube/glasskube/commit/ff7c3cefa541b59544be29a5e41ab96fc5d2cb67)) +* **package-operator:** add support for resource transformations ([#1210](https://github.com/glasskube/glasskube/issues/1210)) ([5f934cb](https://github.com/glasskube/glasskube/commit/5f934cb5e47ad02438ad2c0d55b13a25d7708807)) + + +### Bug Fixes + +* **deps:** update dependency @getcanary/web to ^0.0.102 ([#1204](https://github.com/glasskube/glasskube/issues/1204)) ([511a66b](https://github.com/glasskube/glasskube/commit/511a66b738cd60ea0fff6752cfecb71ee41c8933)) +* **deps:** update dependency @getcanary/web to ^0.0.104 ([#1217](https://github.com/glasskube/glasskube/issues/1217)) ([8c85ace](https://github.com/glasskube/glasskube/commit/8c85acecef1d618695c7c44d8c7cdfe04af0a2c0)) +* **deps:** update fontsource monorepo ([#1202](https://github.com/glasskube/glasskube/issues/1202)) ([e281523](https://github.com/glasskube/glasskube/commit/e2815234da09f37ff0b5c31e3cabf68cdb22aae4)) + + +### Other + +* change transitiveResources type to TypeLocalObjectReference ([#1211](https://github.com/glasskube/glasskube/issues/1211)) ([54c78cd](https://github.com/glasskube/glasskube/commit/54c78cdb0ea5151a661104282d11a99bea15d496)) +* **deps:** bump body-parser and express in /website ([#1222](https://github.com/glasskube/glasskube/issues/1222)) ([9c5416e](https://github.com/glasskube/glasskube/commit/9c5416edf2e1747134ba787a9bc2bba44696cc6e)) +* **deps:** update commitlint monorepo to v19.5.0 ([#1221](https://github.com/glasskube/glasskube/issues/1221)) ([ede058b](https://github.com/glasskube/glasskube/commit/ede058b09172135a3f0bad8fd6bc73551087a55d)) +* **deps:** update dependency typescript to ~5.6.0 ([#1214](https://github.com/glasskube/glasskube/issues/1214)) ([0e2ca5b](https://github.com/glasskube/glasskube/commit/0e2ca5b936c5f6d93a401efbfb1d16615bde8714)) +* **deps:** update dependency typescript-eslint to v8.5.0 ([#1215](https://github.com/glasskube/glasskube/issues/1215)) ([f5ada7e](https://github.com/glasskube/glasskube/commit/f5ada7e90c9364983eb3f8f93177bb1e3516e1f8)) + + +### Docs + +* add package manifest reference ([#1212](https://github.com/glasskube/glasskube/issues/1212)) ([7ff01ce](https://github.com/glasskube/glasskube/commit/7ff01ce5d020bf2df8cd970b0bd2fc565d5a8fab)) +* **website:** change the site banner ([#1206](https://github.com/glasskube/glasskube/issues/1206)) ([371474c](https://github.com/glasskube/glasskube/commit/371474cf3b58ed88d8a3de48bf5815f802989dff)) +* **website:** improve Blog page Layout ([#1153](https://github.com/glasskube/glasskube/issues/1153)) ([70033d5](https://github.com/glasskube/glasskube/commit/70033d57a24612f2f70482ae793c3bee3e5eec3f)) +* **website:** improve launch week wording ([#1213](https://github.com/glasskube/glasskube/issues/1213)) ([243798e](https://github.com/glasskube/glasskube/commit/243798e860785da5db4b80815e136e9bfab436b0)) +* **website:** some spelling changes and new visual assets ([#1216](https://github.com/glasskube/glasskube/issues/1216)) ([dbfd2a9](https://github.com/glasskube/glasskube/commit/dbfd2a994e65cab74fc52e2c36ae364d54125677)) + ## [0.20.1](https://github.com/glasskube/glasskube/compare/v0.20.0...v0.20.1) (2024-09-06) diff --git a/config/autoupdater/kustomization.yaml b/config/autoupdater/kustomization.yaml index 15cde3aa3..6920cd7ab 100644 --- a/config/autoupdater/kustomization.yaml +++ b/config/autoupdater/kustomization.yaml @@ -7,4 +7,4 @@ commonLabels: app.kubernetes.io/name: glasskube-autoupdate images: - name: ghcr.io/glasskube/glasskube - newTag: v0.20.1 # x-release-please-version + newTag: v0.21.0 # x-release-please-version diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 462a82f39..0d99cbfd6 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -34,7 +34,7 @@ resources: images: - name: controller newName: ghcr.io/glasskube/package-operator - newTag: v0.20.1 # x-release-please-version + newTag: v0.21.0 # x-release-please-version # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml diff --git a/website/src/partials/_install.mdx b/website/src/partials/_install.mdx index 168c1597a..c47a88d69 100644 --- a/website/src/partials/_install.mdx +++ b/website/src/partials/_install.mdx @@ -15,7 +15,7 @@ import TabItem from '@theme/TabItem'; {/* x-release-please-start-version */} ``` - dnf install https://releases.dl.glasskube.dev/glasskube_v0.20.1_amd64.rpm + dnf install https://releases.dl.glasskube.dev/glasskube_v0.21.0_amd64.rpm ``` {/* x-release-please-end */} @@ -25,8 +25,8 @@ import TabItem from '@theme/TabItem'; {/* x-release-please-start-version */} ``` - curl -LO https://releases.dl.glasskube.dev/glasskube_v0.20.1_amd64.deb - sudo dpkg -i glasskube_v0.20.1_amd64.deb + curl -LO https://releases.dl.glasskube.dev/glasskube_v0.21.0_amd64.deb + sudo dpkg -i glasskube_v0.21.0_amd64.deb ``` {/* x-release-please-end */} @@ -35,8 +35,8 @@ import TabItem from '@theme/TabItem'; APK-based installation (Alpine) {/* x-release-please-start-version */} ``` - curl -LO https://releases.dl.glasskube.dev/glasskube_v0.20.1_amd64.apk - apk add --allow-untrusted glasskube_v0.20.1_amd64.apk + curl -LO https://releases.dl.glasskube.dev/glasskube_v0.21.0_amd64.apk + apk add --allow-untrusted glasskube_v0.21.0_amd64.apk ``` {/* x-release-please-end */} @@ -47,7 +47,7 @@ import TabItem from '@theme/TabItem'; {/* x-release-please-start-version */} - Download the [windows archive](https://releases.dl.glasskube.dev/glasskube_v0.20.1_windows_x86_64.zip) from our + Download the [windows archive](https://releases.dl.glasskube.dev/glasskube_v0.21.0_windows_x86_64.zip) from our latest [Release](https://github.com/glasskube/glasskube/releases/latest) and unpack it using Windows Explorer. {/* x-release-please-end */} diff --git a/website/static/release.json b/website/static/release.json index 119ff5c74..9a8fd5d7f 100644 --- a/website/static/release.json +++ b/website/static/release.json @@ -1 +1 @@ -{"version":"0.20.1"} +{"version":"0.21.0"}