fix(custom-widgets): finish v2 hardening
This commit is contained in:
97 files changed
+2833
-12393
No files matched your search
@@ -1,12 +1,19 @@
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { customJsxAuthoringCatalog } from "../src/core/component-catalog";
|
||||
import { customJsxExamples } from "../src/core/examples";
|
||||
import { getCustomWidgetJsonSchema } from "../src/core/schema";
|
||||
|
||||
export const CUSTOM_WIDGET_SKILL_SOURCE_PATHS = [
|
||||
"SKILL.md",
|
||||
"references/schema.md",
|
||||
"references/widget-schema.json",
|
||||
"references/runtime.md",
|
||||
"references/security.md",
|
||||
"references/components.md",
|
||||
"references/component-catalog.json",
|
||||
"references/examples.json",
|
||||
"references/mantine-core.md",
|
||||
"references/mantine-dates.md",
|
||||
"references/mantine-charts.md",
|
||||
@@ -18,6 +25,16 @@ const repositoryRoot = resolve(packageRoot, "../..");
|
||||
const skillRoot = resolve(repositoryRoot, ".agents/skills/homarr-custom-widget");
|
||||
const outputPath = resolve(packageRoot, "src/core/skill-content.generated.json");
|
||||
|
||||
await writeFile(
|
||||
resolve(skillRoot, "references/widget-schema.json"),
|
||||
`${JSON.stringify(getCustomWidgetJsonSchema(), null, 2)}\n`,
|
||||
);
|
||||
await writeFile(
|
||||
resolve(skillRoot, "references/component-catalog.json"),
|
||||
`${JSON.stringify(customJsxAuthoringCatalog)}\n`,
|
||||
);
|
||||
await writeFile(resolve(skillRoot, "references/examples.json"), `${JSON.stringify(customJsxExamples, null, 2)}\n`);
|
||||
|
||||
const files = await Promise.all(
|
||||
CUSTOM_WIDGET_SKILL_SOURCE_PATHS.map(async (path) => ({
|
||||
path,
|
||||
|
||||
Reference in new issue
Block a user