Compare commits
5 Commits
aae0e0db9d
...
v1.9.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d73d98068a | ||
|
|
b305c2ab66 | ||
|
|
e3fbe3b178 | ||
|
|
4c46c5ae6d | ||
|
|
d416e8db07 |
7
dist/homepage.d.ts
vendored
7
dist/homepage.d.ts
vendored
@@ -1,14 +1,11 @@
|
|||||||
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 { TidalGetCurrent } from "./tidal";
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
export type FullInformation = {
|
export type FullInformation = Record<StatusComponentName, 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;
|
||||||
grist_personal_goals: GristRecord_PersonalGoals | null;
|
grist_personal_goals: GristRecord_PersonalGoals | null;
|
||||||
};
|
};
|
||||||
export type ComponentUpdate = {
|
|
||||||
component: string;
|
|
||||||
data: unknown;
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=homepage.d.ts.map
|
//# sourceMappingURL=homepage.d.ts.map
|
||||||
2
dist/homepage.d.ts.map
vendored
2
dist/homepage.d.ts.map
vendored
@@ -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,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC7B,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;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACd,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,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"}
|
||||||
1
dist/index.d.ts
vendored
1
dist/index.d.ts
vendored
@@ -3,6 +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 "./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
2
dist/index.d.ts.map
vendored
@@ -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,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,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
||||||
1
dist/index.js
vendored
1
dist/index.js
vendored
@@ -3,6 +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 "./tidal.js";
|
export * from "./tidal.js";
|
||||||
export * from "./timehelper.js";
|
export * from "./timehelper.js";
|
||||||
export * from "./ws.js";
|
export * from "./ws.js";
|
||||||
|
|||||||
16
dist/status.d.ts
vendored
Normal file
16
dist/status.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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
|
||||||
1
dist/status.d.ts.map
vendored
Normal file
1
dist/status.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"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"}
|
||||||
12
dist/status.js
vendored
Normal file
12
dist/status.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
export const StatusComponent = {
|
||||||
|
HA_DESK_POSITION: "ha_desk_position",
|
||||||
|
HA_TEMP: "ha_temp",
|
||||||
|
TIDAL_CURRENT: "tidal_current",
|
||||||
|
GRIST_PERSONAL_GOALS: "grist_personal_goals",
|
||||||
|
};
|
||||||
|
export function createComponentUpdate(component, data) {
|
||||||
|
return {
|
||||||
|
component: component,
|
||||||
|
data: data,
|
||||||
|
};
|
||||||
|
}
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.9.7",
|
"version": "1.9.9",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.9.7",
|
"version": "1.9.9",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/ws": "^8.18.1",
|
"@types/ws": "^8.18.1",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.9.7",
|
"version": "1.9.9",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
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 { TidalGetCurrent } from "./tidal";
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
|
|
||||||
export type FullInformation = {
|
export type FullInformation = Record<StatusComponentName, 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;
|
||||||
grist_personal_goals: GristRecord_PersonalGoals | null;
|
grist_personal_goals: GristRecord_PersonalGoals | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ComponentUpdate = {
|
|
||||||
component: string;
|
|
||||||
data: unknown;
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -3,6 +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 "./tidal.js";
|
export * from "./tidal.js";
|
||||||
export * from "./timehelper.js";
|
export * from "./timehelper.js";
|
||||||
export * from "./ws.js";
|
export * from "./ws.js";
|
||||||
|
|||||||
24
src/status.ts
Normal file
24
src/status.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
export const StatusComponent = {
|
||||||
|
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 ComponentUpdate = {
|
||||||
|
component: StatusComponentName;
|
||||||
|
data: unknown;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function createComponentUpdate(
|
||||||
|
component: StatusComponentName,
|
||||||
|
data: unknown,
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
component: component,
|
||||||
|
data: data,
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user