From 1085ce870b845b92021d4e9c97cc1d836a261875 Mon Sep 17 00:00:00 2001 From: Darius Date: Thu, 5 Mar 2026 19:47:14 +0100 Subject: [PATCH] status => stats --- dist/homepage.d.ts | 4 ++-- dist/homepage.d.ts.map | 2 +- dist/index.d.ts | 2 +- dist/index.d.ts.map | 2 +- dist/index.js | 2 +- dist/stats.d.ts | 20 ++++++++++++++++++++ dist/stats.d.ts.map | 1 + dist/{status.js => stats.js} | 2 +- dist/status.d.ts | 16 ---------------- dist/status.d.ts.map | 1 - src/homepage.ts | 4 ++-- src/index.ts | 2 +- src/{status.ts => stats.ts} | 15 ++++++++++----- 13 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 dist/stats.d.ts create mode 100644 dist/stats.d.ts.map rename dist/{status.js => stats.js} (89%) delete mode 100644 dist/status.d.ts delete mode 100644 dist/status.d.ts.map rename src/{status.ts => stats.ts} (56%) diff --git a/dist/homepage.d.ts b/dist/homepage.d.ts index af55334..d38778b 100644 --- a/dist/homepage.d.ts +++ b/dist/homepage.d.ts @@ -1,8 +1,8 @@ import type { GristRecord_PersonalGoals } from "./grist"; import type { API_HA_DeskPosition } from "./homeassistant"; -import type { StatusComponentName } from "./status"; +import type { StatsComponentName } from "./stats"; import type { TidalGetCurrent } from "./tidal"; -export type FullInformation = Record & { +export type FullInformation = Record & { ha_desk_position: API_HA_DeskPosition | null; ha_temp: string | null; tidal_current: TidalGetCurrent | null; diff --git a/dist/homepage.d.ts.map b/dist/homepage.d.ts.map index 5710050..91ae5bf 100644 --- a/dist/homepage.d.ts.map +++ b/dist/homepage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../src/homepage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,GAAG;IACpE,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACvD,CAAC"} \ No newline at end of file +{"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../src/homepage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAG;IACnE,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACvD,CAAC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 2531c4c..393d802 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -3,7 +3,7 @@ export * from "./grist.js"; export * from "./homeassistant.js"; export * from "./homepage.js"; export * from "./logger.js"; -export * from "./status.js"; +export * from "./stats.js"; export * from "./tidal.js"; export * from "./timehelper.js"; export * from "./ws.js"; diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 2ff17f0..7563414 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 0ae2822..f719cfc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3,7 +3,7 @@ export * from "./grist.js"; export * from "./homeassistant.js"; export * from "./homepage.js"; export * from "./logger.js"; -export * from "./status.js"; +export * from "./stats.js"; export * from "./tidal.js"; export * from "./timehelper.js"; export * from "./ws.js"; diff --git a/dist/stats.d.ts b/dist/stats.d.ts new file mode 100644 index 0000000..6f9d832 --- /dev/null +++ b/dist/stats.d.ts @@ -0,0 +1,20 @@ +export declare const StatsComponent: { + readonly HA_DESK_POSITION: "ha_desk_position"; + readonly HA_TEMP: "ha_temp"; + readonly TIDAL_CURRENT: "tidal_current"; + readonly GRIST_PERSONAL_GOALS: "grist_personal_goals"; +}; +export type StatsComponentName = (typeof StatsComponent)[keyof typeof StatsComponent]; +export type ComponentUpdate = { + component: StatsComponentName; + data: unknown; +}; +export type StepRow = { + year: string; + steps: number; +}; +export declare function createComponentUpdate(component: StatsComponentName, data: unknown): { + component: StatsComponentName; + data: unknown; +}; +//# sourceMappingURL=stats.d.ts.map \ No newline at end of file diff --git a/dist/stats.d.ts.map b/dist/stats.d.ts.map new file mode 100644 index 0000000..e17d98b --- /dev/null +++ b/dist/stats.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC7B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,qBAAqB,CACpC,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,OAAO;;;EAMb"} \ No newline at end of file diff --git a/dist/status.js b/dist/stats.js similarity index 89% rename from dist/status.js rename to dist/stats.js index 3527e16..a876f84 100644 --- a/dist/status.js +++ b/dist/stats.js @@ -1,4 +1,4 @@ -export const StatusComponent = { +export const StatsComponent = { HA_DESK_POSITION: "ha_desk_position", HA_TEMP: "ha_temp", TIDAL_CURRENT: "tidal_current", diff --git a/dist/status.d.ts b/dist/status.d.ts deleted file mode 100644 index fbc16e7..0000000 --- a/dist/status.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare const StatusComponent: { - readonly HA_DESK_POSITION: "ha_desk_position"; - readonly HA_TEMP: "ha_temp"; - readonly TIDAL_CURRENT: "tidal_current"; - readonly GRIST_PERSONAL_GOALS: "grist_personal_goals"; -}; -export type StatusComponentName = (typeof StatusComponent)[keyof typeof StatusComponent]; -export type ComponentUpdate = { - component: StatusComponentName; - data: unknown; -}; -export declare function createComponentUpdate(component: StatusComponentName, data: unknown): { - component: StatusComponentName; - data: unknown; -}; -//# sourceMappingURL=status.d.ts.map \ No newline at end of file diff --git a/dist/status.d.ts.map b/dist/status.d.ts.map deleted file mode 100644 index 1f60b48..0000000 --- a/dist/status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,wBAAgB,qBAAqB,CACpC,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,OAAO;;;EAMb"} \ No newline at end of file diff --git a/src/homepage.ts b/src/homepage.ts index dd95909..5941dca 100644 --- a/src/homepage.ts +++ b/src/homepage.ts @@ -1,9 +1,9 @@ import type { GristRecord_PersonalGoals } from "./grist"; import type { API_HA_DeskPosition } from "./homeassistant"; -import type { StatusComponentName } from "./status"; +import type { StatsComponentName } from "./stats"; import type { TidalGetCurrent } from "./tidal"; -export type FullInformation = Record & { +export type FullInformation = Record & { ha_desk_position: API_HA_DeskPosition | null; ha_temp: string | null; tidal_current: TidalGetCurrent | null; diff --git a/src/index.ts b/src/index.ts index 0ae2822..f719cfc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ export * from "./grist.js"; export * from "./homeassistant.js"; export * from "./homepage.js"; export * from "./logger.js"; -export * from "./status.js"; +export * from "./stats.js"; export * from "./tidal.js"; export * from "./timehelper.js"; export * from "./ws.js"; diff --git a/src/status.ts b/src/stats.ts similarity index 56% rename from src/status.ts rename to src/stats.ts index 3f713e4..0156893 100644 --- a/src/status.ts +++ b/src/stats.ts @@ -1,20 +1,25 @@ -export const StatusComponent = { +export const StatsComponent = { HA_DESK_POSITION: "ha_desk_position", HA_TEMP: "ha_temp", TIDAL_CURRENT: "tidal_current", GRIST_PERSONAL_GOALS: "grist_personal_goals", } as const; -export type StatusComponentName = - (typeof StatusComponent)[keyof typeof StatusComponent]; +export type StatsComponentName = + (typeof StatsComponent)[keyof typeof StatsComponent]; export type ComponentUpdate = { - component: StatusComponentName; + component: StatsComponentName; data: unknown; }; +export type StepRow = { + year: string; + steps: number; +}; + export function createComponentUpdate( - component: StatusComponentName, + component: StatsComponentName, data: unknown, ) { return {