Compare commits

..

2 Commits

Author SHA1 Message Date
Darius
1fcc02ef1f 1.10.0 2026-03-05 19:47:21 +01:00
Darius
1085ce870b status => stats 2026-03-05 19:47:14 +01:00
15 changed files with 44 additions and 35 deletions

4
dist/homepage.d.ts vendored
View File

@@ -1,8 +1,8 @@
import type { GristRecord_PersonalGoals } from "./grist"; import type { GristRecord_PersonalGoals } from "./grist";
import type { API_HA_DeskPosition } from "./homeassistant"; import type { API_HA_DeskPosition } from "./homeassistant";
import type { StatusComponentName } from "./status"; import type { StatsComponentName } from "./stats";
import type { TidalGetCurrent } from "./tidal"; import type { TidalGetCurrent } from "./tidal";
export type FullInformation = Record<StatusComponentName, unknown> & { export type FullInformation = Record<StatsComponentName, unknown> & {
ha_desk_position: API_HA_DeskPosition | null; ha_desk_position: API_HA_DeskPosition | null;
ha_temp: string | null; ha_temp: string | null;
tidal_current: TidalGetCurrent | null; tidal_current: TidalGetCurrent | null;

View File

@@ -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"} {"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"}

2
dist/index.d.ts vendored
View File

@@ -3,7 +3,7 @@ export * from "./grist.js";
export * from "./homeassistant.js"; export * from "./homeassistant.js";
export * from "./homepage.js"; export * from "./homepage.js";
export * from "./logger.js"; export * from "./logger.js";
export * from "./status.js"; export * from "./stats.js";
export * from "./tidal.js"; export * from "./tidal.js";
export * from "./timehelper.js"; export * from "./timehelper.js";
export * from "./ws.js"; export * from "./ws.js";

2
dist/index.d.ts.map vendored
View File

@@ -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"} {"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"}

2
dist/index.js vendored
View File

@@ -3,7 +3,7 @@ export * from "./grist.js";
export * from "./homeassistant.js"; export * from "./homeassistant.js";
export * from "./homepage.js"; export * from "./homepage.js";
export * from "./logger.js"; export * from "./logger.js";
export * from "./status.js"; export * from "./stats.js";
export * from "./tidal.js"; export * from "./tidal.js";
export * from "./timehelper.js"; export * from "./timehelper.js";
export * from "./ws.js"; export * from "./ws.js";

20
dist/stats.d.ts vendored Normal file
View File

@@ -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

1
dist/stats.d.ts.map vendored Normal file
View File

@@ -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"}

View File

@@ -1,4 +1,4 @@
export const StatusComponent = { export const StatsComponent = {
HA_DESK_POSITION: "ha_desk_position", HA_DESK_POSITION: "ha_desk_position",
HA_TEMP: "ha_temp", HA_TEMP: "ha_temp",
TIDAL_CURRENT: "tidal_current", TIDAL_CURRENT: "tidal_current",

16
dist/status.d.ts vendored
View File

@@ -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

View File

@@ -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"}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@dpu/shared", "name": "@dpu/shared",
"version": "1.9.9", "version": "1.10.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@dpu/shared", "name": "@dpu/shared",
"version": "1.9.9", "version": "1.10.0",
"dependencies": { "dependencies": {
"@types/ws": "^8.18.1", "@types/ws": "^8.18.1",
"axios": "^1.7.9", "axios": "^1.7.9",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@dpu/shared", "name": "@dpu/shared",
"version": "1.9.9", "version": "1.10.0",
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@@ -1,9 +1,9 @@
import type { GristRecord_PersonalGoals } from "./grist"; import type { GristRecord_PersonalGoals } from "./grist";
import type { API_HA_DeskPosition } from "./homeassistant"; import type { API_HA_DeskPosition } from "./homeassistant";
import type { StatusComponentName } from "./status"; import type { StatsComponentName } from "./stats";
import type { TidalGetCurrent } from "./tidal"; import type { TidalGetCurrent } from "./tidal";
export type FullInformation = Record<StatusComponentName, unknown> & { export type FullInformation = Record<StatsComponentName, unknown> & {
ha_desk_position: API_HA_DeskPosition | null; ha_desk_position: API_HA_DeskPosition | null;
ha_temp: string | null; ha_temp: string | null;
tidal_current: TidalGetCurrent | null; tidal_current: TidalGetCurrent | null;

View File

@@ -3,7 +3,7 @@ export * from "./grist.js";
export * from "./homeassistant.js"; export * from "./homeassistant.js";
export * from "./homepage.js"; export * from "./homepage.js";
export * from "./logger.js"; export * from "./logger.js";
export * from "./status.js"; export * from "./stats.js";
export * from "./tidal.js"; export * from "./tidal.js";
export * from "./timehelper.js"; export * from "./timehelper.js";
export * from "./ws.js"; export * from "./ws.js";

View File

@@ -1,20 +1,25 @@
export const StatusComponent = { export const StatsComponent = {
HA_DESK_POSITION: "ha_desk_position", HA_DESK_POSITION: "ha_desk_position",
HA_TEMP: "ha_temp", HA_TEMP: "ha_temp",
TIDAL_CURRENT: "tidal_current", TIDAL_CURRENT: "tidal_current",
GRIST_PERSONAL_GOALS: "grist_personal_goals", GRIST_PERSONAL_GOALS: "grist_personal_goals",
} as const; } as const;
export type StatusComponentName = export type StatsComponentName =
(typeof StatusComponent)[keyof typeof StatusComponent]; (typeof StatsComponent)[keyof typeof StatsComponent];
export type ComponentUpdate = { export type ComponentUpdate = {
component: StatusComponentName; component: StatsComponentName;
data: unknown; data: unknown;
}; };
export type StepRow = {
year: string;
steps: number;
};
export function createComponentUpdate( export function createComponentUpdate(
component: StatusComponentName, component: StatsComponentName,
data: unknown, data: unknown,
) { ) {
return { return {