feat(custom-widgets): complete Custom JSX v2 (#6390)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-13 19:48:57 +02:00
1 parent 3a1245cbc5
commit acdfcbb18e
416 files changed
+37853 -18066

No files matched your search

-21
View File
@@ -7,7 +7,6 @@ import { z } from "zod/v4";
import { createDocumentationLink } from "./index";
import { integrationDocSlugs } from "./integration-doc-slugs";
import { widgetDocSlugs } from "./widget-doc-slugs";
import { customJsxComponentRegistry } from "@homarr/custom-widgets/core";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -70,28 +69,8 @@ const slugMapPaths = [
];
const outputPath = path.join(__dirname, "homarr-docs-sitemap.ts");
const customJsxRegistryOutputPath = path.join(
__dirname,
"../../../../apps/docs/src/generated/custom-jsx-components.json",
);
const updateCustomJsxRegistryAsync = async () => {
await fs.mkdir(dirname(customJsxRegistryOutputPath), { recursive: true });
const documentationRegistry = customJsxComponentRegistry.map(
({ name, package: packageName, category, safety, reason, documentationUrl }) => ({
name,
package: packageName,
category,
safety,
reason,
documentationUrl,
}),
);
await fs.writeFile(customJsxRegistryOutputPath, `${JSON.stringify(documentationRegistry, null, 2)}\n`);
};
const main = async () => {
await updateCustomJsxRegistryAsync();
let paths: string[];
try {
const sitemapXml = await fetchSitemapAsync();
+3
View File
@@ -42,6 +42,7 @@ export const groupPermissions = {
integration: ["create", "use-all", "interact-all", "full-all"],
"search-engine": ["create", "modify-all", "full-all"],
media: ["upload", "view-all", "full-all"],
"custom-widget": ["manage", "secret-write"],
other: ["view-logs"],
admin: true,
} as const;
@@ -67,6 +68,8 @@ const groupPermissionParents = {
"integration-full-all",
"search-engine-full-all",
"media-full-all",
"custom-widget-manage",
"custom-widget-secret-write",
"other-view-logs",
],
} satisfies Partial<Record<GroupPermissionKey, GroupPermissionKey[]>>;