refactor: streamline widget and integration architecture

This commit is contained in:
ajnart committed 2026-08-23 22:33:29 +02:00
1 parent ec295fe26e
commit 425cb653a1
243 files changed
+5722 -2255

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
import { defineWidgetModule } from "@homarr/definitions";
export default defineWidgetModule({
kind: "weather",
icon: "IconCloud",
clientEntry: ".",
documentation: {
slug: "weather",
sourceDirectory: "docs",
},
defaultSize: { width: 2, height: 1 },
operations: [
{
name: "atLocation",
path: ["widget", "weather", "atLocation"],
client: {
refetchIntervalSeconds: 600,
staleTimeSeconds: 300,
persist: true,
},
serverCache: {
namespace: "weather:at-location",
ttlMs: 5 * 60 * 1000,
scope: "shared",
},
},
],
routers: [
{
namespace: "weather",
module: "./weather",
exportName: "weatherRouter",
additionalWidgetKinds: ["clock"],
},
],
});