Compare commits
6 Commits
v1.8.0
...
934b287673
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
934b287673 | ||
|
|
9f28e5eeb6 | ||
|
|
b2d4953fb6 | ||
|
|
ec4c9ec492 | ||
|
|
27dc6f2b12 | ||
|
|
845dd30b43 |
2
dist/fastify.d.ts.map
vendored
2
dist/fastify.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,qBAAa,SAAS;IACF,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAChC;AAED,8BAAsB,UAAU;IAC/B,OAAO,CAAC,aAAa,CAAgB;gBAEzB,aAAa,EAAE,aAAa;IAIxC,QAAQ,IAAI,aAAa;CAGzB;AAED,8BAAsB,WAAW,CAAC,CAAC;IAClC,OAAO,CAAC,MAAM,CAAI;gBAEN,MAAM,EAAE,CAAC;IAIrB,SAAS,IAAI,CAAC;IAId,mBAAmB,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC;IAO7D,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;CAMpD"}
|
{"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,qBAAa,SAAS;IACF,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAChC;AAED,8BAAsB,UAAU;IAC/B,OAAO,CAAC,aAAa,CAAgB;gBAEzB,aAAa,EAAE,aAAa;IAIxC,QAAQ,IAAI,aAAa;CAGzB;AAED,8BAAsB,WAAW,CAAC,CAAC;IAClC,OAAO,CAAC,MAAM,CAAI;gBAEN,MAAM,EAAE,CAAC;IAIrB,SAAS,IAAI,CAAC;IAId,mBAAmB,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC;IAO7D,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;CAOpD"}
|
||||||
2
dist/fastify.js
vendored
2
dist/fastify.js
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
import { logWarning } from "./logger";
|
||||||
export class API_Error {
|
export class API_Error {
|
||||||
error;
|
error;
|
||||||
constructor(error) {
|
constructor(error) {
|
||||||
@@ -28,6 +29,7 @@ export class BaseService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
getErrorResult(error) {
|
getErrorResult(error) {
|
||||||
|
logWarning(error);
|
||||||
return {
|
return {
|
||||||
result: error,
|
result: error,
|
||||||
successful: false,
|
successful: false,
|
||||||
|
|||||||
2
dist/grist.d.ts
vendored
2
dist/grist.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
export type Record_PersonalGoals = {
|
export type GristRecord_PersonalGoals = {
|
||||||
went_outside: boolean;
|
went_outside: boolean;
|
||||||
standing: boolean;
|
standing: boolean;
|
||||||
standing_goal: number;
|
standing_goal: number;
|
||||||
|
|||||||
2
dist/grist.d.ts.map
vendored
2
dist/grist.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"grist.d.ts","sourceRoot":"","sources":["../src/grist.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
{"version":3,"file":"grist.d.ts","sourceRoot":"","sources":["../src/grist.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
||||||
6
dist/homepage.d.ts
vendored
6
dist/homepage.d.ts
vendored
@@ -1,8 +1,14 @@
|
|||||||
|
import type { GristRecord_PersonalGoals } from "./grist";
|
||||||
import type { API_HA_DeskPosition } from "./homeassistant";
|
import type { API_HA_DeskPosition } from "./homeassistant";
|
||||||
import type { TidalGetCurrent } from "./tidal";
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
export type FullInformation = {
|
export type FullInformation = {
|
||||||
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;
|
||||||
|
};
|
||||||
|
export type ComponentUpdate = {
|
||||||
|
component: string;
|
||||||
|
update: 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,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;CACtC,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,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,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
||||||
1
dist/index.d.ts
vendored
1
dist/index.d.ts
vendored
@@ -1,4 +1,5 @@
|
|||||||
export * from "./fastify.js";
|
export * from "./fastify.js";
|
||||||
|
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";
|
||||||
|
|||||||
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,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,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
||||||
1
dist/index.js
vendored
1
dist/index.js
vendored
@@ -1,4 +1,5 @@
|
|||||||
export * from "./fastify.js";
|
export * from "./fastify.js";
|
||||||
|
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";
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.8.0",
|
"version": "1.8.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.8.0",
|
"version": "1.8.3",
|
||||||
"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.8.0",
|
"version": "1.8.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { AxiosInstance } from "axios";
|
import type { AxiosInstance } from "axios";
|
||||||
|
import { logWarning } from "./logger";
|
||||||
|
|
||||||
export type ServiceResult<T = unknown> = {
|
export type ServiceResult<T = unknown> = {
|
||||||
result: T;
|
result: T;
|
||||||
@@ -40,6 +41,7 @@ export abstract class BaseService<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getErrorResult(error: string): ServiceResult<string> {
|
getErrorResult(error: string): ServiceResult<string> {
|
||||||
|
logWarning(error);
|
||||||
return {
|
return {
|
||||||
result: error,
|
result: error,
|
||||||
successful: false,
|
successful: false,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export type Record_PersonalGoals = {
|
export type GristRecord_PersonalGoals = {
|
||||||
went_outside: boolean;
|
went_outside: boolean;
|
||||||
standing: boolean;
|
standing: boolean;
|
||||||
standing_goal: number;
|
standing_goal: number;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import type { GristRecord_PersonalGoals } from "./grist";
|
||||||
import type { API_HA_DeskPosition } from "./homeassistant";
|
import type { API_HA_DeskPosition } from "./homeassistant";
|
||||||
import type { TidalGetCurrent } from "./tidal";
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
|
|
||||||
@@ -5,4 +6,10 @@ export type FullInformation = {
|
|||||||
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ComponentUpdate = {
|
||||||
|
component: string;
|
||||||
|
update: unknown;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export * from "./fastify.js";
|
export * from "./fastify.js";
|
||||||
|
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";
|
||||||
|
|||||||
Reference in New Issue
Block a user