Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aae0e0db9d | ||
|
|
9983ba1215 | ||
|
|
872d3755d0 | ||
|
|
6d5d34e6d2 | ||
|
|
4ed43fc8a0 | ||
|
|
78f5e4a313 | ||
|
|
e32afa0f70 | ||
|
|
405ebe1e8e | ||
|
|
1fb937973c | ||
|
|
9688c9581a | ||
|
|
6b4bd73b14 | ||
|
|
e834725b1a | ||
|
|
e6a7262cf7 | ||
|
|
850eb74210 | ||
|
|
c1c5a41aa5 | ||
|
|
2b85020d52 | ||
|
|
493739238e | ||
|
|
7d96b3a82e | ||
|
|
f49c868007 | ||
|
|
ff4248961b | ||
|
|
fbc6916e2c | ||
|
|
934b287673 | ||
|
|
9f28e5eeb6 | ||
|
|
b2d4953fb6 | ||
|
|
ec4c9ec492 | ||
|
|
27dc6f2b12 | ||
|
|
845dd30b43 | ||
|
|
4509de76a2 | ||
|
|
4337372b38 | ||
|
|
cd95b63174 | ||
|
|
17e6b75ec5 | ||
|
|
bb8014ccf3 | ||
|
|
ad9cf36e98 | ||
|
|
60bcd23f5b | ||
|
|
c674d0fa72 | ||
|
|
c072f52a1a | ||
|
|
ceadd4e5a2 | ||
|
|
b32006cf10 | ||
|
|
0ab6194b43 | ||
|
|
46f359bb1e | ||
|
|
9b852dc40c | ||
|
|
a6d837f953 | ||
|
|
921882054d | ||
|
|
cdd2fcb59e | ||
|
|
8daeed6b5f | ||
|
|
6d05233a6e | ||
|
|
3dd61ab4e8 | ||
|
|
b7ea7bc552 | ||
|
|
d23c89c3c9 | ||
|
|
fd766a822c | ||
|
|
bf580c8a84 | ||
|
|
12fc98c925 | ||
|
|
3b7ef0f3ee | ||
|
|
ada7268062 | ||
|
|
b55e1dd0a6 | ||
|
|
49f04ef82f | ||
|
|
862401fa9b | ||
|
|
20e94a7e0e | ||
|
|
7f2b8ce5aa | ||
|
|
14df9ae2cd | ||
|
|
36f2535cf8 | ||
|
|
3dfa3007bf | ||
|
|
e80ff5fece | ||
|
|
694d88bb72 | ||
|
|
9569477a26 |
2
dist/fastify.d.ts
vendored
2
dist/fastify.d.ts
vendored
@@ -17,6 +17,6 @@ export declare abstract class BaseService<T> {
|
|||||||
constructor(client: T);
|
constructor(client: T);
|
||||||
getClient(): T;
|
getClient(): T;
|
||||||
getSuccessfulResult<R = unknown>(result: R): ServiceResult<R>;
|
getSuccessfulResult<R = unknown>(result: R): ServiceResult<R>;
|
||||||
getErrorResult(error: string): ServiceResult<string>;
|
getErrorResult(errorMessage: string, error?: unknown): ServiceResult<string>;
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=fastify.d.ts.map
|
//# sourceMappingURL=fastify.d.ts.map
|
||||||
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;IACvC,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,qBAAa,SAAS;IACD,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CACjC;AAED,8BAAsB,UAAU;IAC9B,OAAO,CAAC,aAAa,CAAgB;gBAEzB,aAAa,EAAE,aAAa;IAIxC,QAAQ,IAAI,aAAa;CAG1B;AAED,8BAAsB,WAAW,CAAC,CAAC;IACjC,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;CAMrD"}
|
{"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,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;CAO5E"}
|
||||||
6
dist/fastify.js
vendored
6
dist/fastify.js
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
import { logWarning } from "./logger.js";
|
||||||
export class API_Error {
|
export class API_Error {
|
||||||
error;
|
error;
|
||||||
constructor(error) {
|
constructor(error) {
|
||||||
@@ -27,9 +28,10 @@ export class BaseService {
|
|||||||
successful: true,
|
successful: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
getErrorResult(error) {
|
getErrorResult(errorMessage, error) {
|
||||||
|
logWarning(errorMessage, error);
|
||||||
return {
|
return {
|
||||||
result: error,
|
result: errorMessage,
|
||||||
successful: false,
|
successful: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
15
dist/grist.d.ts
vendored
Normal file
15
dist/grist.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export type GristRecord_PersonalGoals = {
|
||||||
|
went_outside: boolean;
|
||||||
|
standing: boolean;
|
||||||
|
standing_goal: number;
|
||||||
|
steps: boolean;
|
||||||
|
steps_goal: number;
|
||||||
|
pushups: boolean;
|
||||||
|
squats: boolean;
|
||||||
|
leg_raises: boolean;
|
||||||
|
reps_goal: number;
|
||||||
|
stairs: boolean;
|
||||||
|
stairs_goal: number;
|
||||||
|
is_workday: boolean;
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=grist.d.ts.map
|
||||||
1
dist/grist.d.ts.map
vendored
Normal file
1
dist/grist.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"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"}
|
||||||
1
dist/grist.js
vendored
Normal file
1
dist/grist.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
21
dist/homeassistant.d.ts
vendored
21
dist/homeassistant.d.ts
vendored
@@ -10,9 +10,9 @@ export type HomeAssistantEntity = {
|
|||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
};
|
};
|
||||||
last_changed: string;
|
last_changed: string;
|
||||||
last_reported: string;
|
last_reported?: string;
|
||||||
last_updated: string;
|
last_updated?: string;
|
||||||
context: {
|
context?: {
|
||||||
id: string;
|
id: string;
|
||||||
parent_id: string | null;
|
parent_id: string | null;
|
||||||
user_id: string | null;
|
user_id: string | null;
|
||||||
@@ -21,12 +21,23 @@ export type HomeAssistantEntity = {
|
|||||||
export interface HomeAssistantDeskPositionResult {
|
export interface HomeAssistantDeskPositionResult {
|
||||||
raw: HomeAssistantEntity;
|
raw: HomeAssistantEntity;
|
||||||
as_boolean: boolean;
|
as_boolean: boolean;
|
||||||
as_text: () => string;
|
|
||||||
last_changed: TimeBetween;
|
last_changed: TimeBetween;
|
||||||
}
|
}
|
||||||
export type API_HA_DeskPosition = {
|
export type API_HA_DeskPosition = {
|
||||||
position: string;
|
|
||||||
is_standing: boolean;
|
is_standing: boolean;
|
||||||
last_changed: string;
|
last_changed: string;
|
||||||
|
last_changed_seconds: number;
|
||||||
|
};
|
||||||
|
export type HA_Update = {
|
||||||
|
entity_id: string;
|
||||||
|
state: string;
|
||||||
|
attributes: {
|
||||||
|
state_class?: string;
|
||||||
|
unit_of_measurement?: string;
|
||||||
|
icon?: string;
|
||||||
|
friendly_name?: string;
|
||||||
|
[key: string]: unknown;
|
||||||
|
};
|
||||||
|
timestamp: string;
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=homeassistant.d.ts.map
|
//# sourceMappingURL=homeassistant.d.ts.map
|
||||||
2
dist/homeassistant.d.ts.map
vendored
2
dist/homeassistant.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"homeassistant.d.ts","sourceRoot":"","sources":["../src/homeassistant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QACV,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC9C,GAAG,EAAE,mBAAmB,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
{"version":3,"file":"homeassistant.d.ts","sourceRoot":"","sources":["../src/homeassistant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;CACF,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC/C,GAAG,EAAE,mBAAmB,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
||||||
14
dist/homepage.d.ts
vendored
Normal file
14
dist/homepage.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import type { GristRecord_PersonalGoals } from "./grist";
|
||||||
|
import type { API_HA_DeskPosition } from "./homeassistant";
|
||||||
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
|
export type FullInformation = {
|
||||||
|
ha_desk_position: API_HA_DeskPosition | null;
|
||||||
|
ha_temp: string | null;
|
||||||
|
tidal_current: TidalGetCurrent | null;
|
||||||
|
grist_personal_goals: GristRecord_PersonalGoals | null;
|
||||||
|
};
|
||||||
|
export type ComponentUpdate = {
|
||||||
|
component: string;
|
||||||
|
data: unknown;
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=homepage.d.ts.map
|
||||||
1
dist/homepage.d.ts.map
vendored
Normal file
1
dist/homepage.d.ts.map
vendored
Normal file
@@ -0,0 +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"}
|
||||||
1
dist/homepage.js
vendored
Normal file
1
dist/homepage.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {};
|
||||||
13
dist/index.d.ts
vendored
13
dist/index.d.ts
vendored
@@ -1,6 +1,9 @@
|
|||||||
export * from "./fastify";
|
export * from "./fastify.js";
|
||||||
export * from "./homeassistant";
|
export * from "./grist.js";
|
||||||
export * from "./logger";
|
export * from "./homeassistant.js";
|
||||||
export * from "./tidal";
|
export * from "./homepage.js";
|
||||||
export * from "./timehelper";
|
export * from "./logger.js";
|
||||||
|
export * from "./tidal.js";
|
||||||
|
export * from "./timehelper.js";
|
||||||
|
export * from "./ws.js";
|
||||||
//# sourceMappingURL=index.d.ts.map
|
//# sourceMappingURL=index.d.ts.map
|
||||||
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,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,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"}
|
||||||
13
dist/index.js
vendored
13
dist/index.js
vendored
@@ -1,5 +1,8 @@
|
|||||||
export * from "./fastify";
|
export * from "./fastify.js";
|
||||||
export * from "./homeassistant";
|
export * from "./grist.js";
|
||||||
export * from "./logger";
|
export * from "./homeassistant.js";
|
||||||
export * from "./tidal";
|
export * from "./homepage.js";
|
||||||
export * from "./timehelper";
|
export * from "./logger.js";
|
||||||
|
export * from "./tidal.js";
|
||||||
|
export * from "./timehelper.js";
|
||||||
|
export * from "./ws.js";
|
||||||
|
|||||||
18
dist/tidal.d.ts
vendored
18
dist/tidal.d.ts
vendored
@@ -1,14 +1,26 @@
|
|||||||
export type TidalSong = {
|
export type TidalGetCurrent = {
|
||||||
title: string;
|
title: string;
|
||||||
artists: string;
|
artists: string;
|
||||||
|
artistsArray: string[];
|
||||||
album: string;
|
album: string;
|
||||||
playingFrom: string;
|
playingFrom: string;
|
||||||
status: "playing" | "paused";
|
status: "playing" | "paused";
|
||||||
url: string;
|
url: string;
|
||||||
current: string;
|
current: string;
|
||||||
|
currentInSeconds: number;
|
||||||
duration: string;
|
duration: string;
|
||||||
};
|
durationInSeconds: number;
|
||||||
export type TidalVolume = {
|
image: string;
|
||||||
|
icon: string;
|
||||||
|
localAlbumArt: string;
|
||||||
|
favorite: boolean;
|
||||||
|
trackId: string;
|
||||||
volume: number;
|
volume: number;
|
||||||
|
player: {
|
||||||
|
status: "playing" | "paused";
|
||||||
|
shuffle: boolean;
|
||||||
|
repeat: "all" | "single" | "none";
|
||||||
|
};
|
||||||
|
artist: string;
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=tidal.d.ts.map
|
//# sourceMappingURL=tidal.d.ts.map
|
||||||
2
dist/tidal.d.ts.map
vendored
2
dist/tidal.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"tidal.d.ts","sourceRoot":"","sources":["../src/tidal.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
{"version":3,"file":"tidal.d.ts","sourceRoot":"","sources":["../src/tidal.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE;QACP,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;QAC7B,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;KAClC,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;CACf,CAAC"}
|
||||||
6
dist/timehelper.d.ts
vendored
6
dist/timehelper.d.ts
vendored
@@ -1,7 +1,8 @@
|
|||||||
export declare class TimeSpan {
|
export declare class TimeSpan {
|
||||||
private start;
|
private start;
|
||||||
private end;
|
private end;
|
||||||
constructor(timeSpanStr: string);
|
private timeZone;
|
||||||
|
constructor(timeSpanStr: string, timeZone: string);
|
||||||
private parseTime;
|
private parseTime;
|
||||||
contains(timestamp?: number): boolean;
|
contains(timestamp?: number): boolean;
|
||||||
}
|
}
|
||||||
@@ -10,5 +11,6 @@ export interface TimeBetween {
|
|||||||
toReadable: (roundToMinutes?: boolean) => string;
|
toReadable: (roundToMinutes?: boolean) => string;
|
||||||
}
|
}
|
||||||
export declare function calculateSecondsBetween(start: number, end: number): TimeBetween;
|
export declare function calculateSecondsBetween(start: number, end: number): TimeBetween;
|
||||||
export declare function secondsToReadable(secs: number, roundToMinutes?: boolean): string;
|
export declare function formatSecondsToDHMS(secs: number, roundToMinutes?: boolean): string;
|
||||||
|
export declare function formatSecondsToMS(s: number): string;
|
||||||
//# sourceMappingURL=timehelper.d.ts.map
|
//# sourceMappingURL=timehelper.d.ts.map
|
||||||
2
dist/timehelper.d.ts.map
vendored
2
dist/timehelper.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"timehelper.d.ts","sourceRoot":"","sources":["../src/timehelper.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,GAAG,CAAqC;gBAEpC,WAAW,EAAE,MAAM;IAM/B,OAAO,CAAC,SAAS;IAKjB,QAAQ,CAAC,SAAS,GAAE,MAAmB,GAAG,OAAO;CAgBlD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CAClD;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,WAAW,CAOb;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,cAAc,GAAE,OAAe,GAC9B,MAAM,CAmBR"}
|
{"version":3,"file":"timehelper.d.ts","sourceRoot":"","sources":["../src/timehelper.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACpB,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,GAAG,CAAqC;IAChD,OAAO,CAAC,QAAQ,CAAC;gBAEL,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAOjD,OAAO,CAAC,SAAS;IAKjB,QAAQ,CAAC,SAAS,GAAE,MAAmB,GAAG,OAAO;CAqBjD;AAED,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACjD;AAED,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACT,WAAW,CAOb;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,MAAM,EACZ,cAAc,GAAE,OAAe,GAC7B,MAAM,CAmBR;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAInD"}
|
||||||
38
dist/timehelper.js
vendored
38
dist/timehelper.js
vendored
@@ -1,10 +1,12 @@
|
|||||||
export class TimeSpan {
|
export class TimeSpan {
|
||||||
start;
|
start;
|
||||||
end;
|
end;
|
||||||
constructor(timeSpanStr) {
|
timeZone;
|
||||||
|
constructor(timeSpanStr, timeZone) {
|
||||||
const [startStr, endStr] = timeSpanStr.split("-");
|
const [startStr, endStr] = timeSpanStr.split("-");
|
||||||
this.start = this.parseTime(startStr);
|
this.start = this.parseTime(startStr);
|
||||||
this.end = this.parseTime(endStr);
|
this.end = this.parseTime(endStr);
|
||||||
|
this.timeZone = timeZone;
|
||||||
}
|
}
|
||||||
parseTime(timeStr) {
|
parseTime(timeStr) {
|
||||||
const [hours, minutes] = timeStr.split(":").map(Number);
|
const [hours, minutes] = timeStr.split(":").map(Number);
|
||||||
@@ -12,8 +14,13 @@ export class TimeSpan {
|
|||||||
}
|
}
|
||||||
contains(timestamp = Date.now()) {
|
contains(timestamp = Date.now()) {
|
||||||
const date = new Date(timestamp);
|
const date = new Date(timestamp);
|
||||||
const hours = date.getHours();
|
const berlinTimeStr = date.toLocaleString("de-DE", {
|
||||||
const minutes = date.getMinutes();
|
timeZone: this.timeZone, // "Europe/Berlin"
|
||||||
|
hour12: false,
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
});
|
||||||
|
const [hours, minutes] = berlinTimeStr.split(":").map(Number);
|
||||||
const currentMinutes = hours * 60 + minutes;
|
const currentMinutes = hours * 60 + minutes;
|
||||||
const startMinutes = this.start.hours * 60 + this.start.minutes;
|
const startMinutes = this.start.hours * 60 + this.start.minutes;
|
||||||
const endMinutes = this.end.hours * 60 + this.end.minutes;
|
const endMinutes = this.end.hours * 60 + this.end.minutes;
|
||||||
@@ -29,18 +36,23 @@ export function calculateSecondsBetween(start, end) {
|
|||||||
const seconds = Math.max(60, (end - start) / 1000);
|
const seconds = Math.max(60, (end - start) / 1000);
|
||||||
return {
|
return {
|
||||||
seconds,
|
seconds,
|
||||||
toReadable: (roundToMinutes) => secondsToReadable(seconds, roundToMinutes),
|
toReadable: (roundToMinutes) => formatSecondsToDHMS(seconds, roundToMinutes),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export function secondsToReadable(secs, roundToMinutes = false) {
|
export function formatSecondsToDHMS(secs, roundToMinutes = false) {
|
||||||
const totalSeconds = roundToMinutes ? Math.round(secs / 60) * 60 : secs;
|
const totalSeconds = roundToMinutes ? Math.round(secs / 60) * 60 : secs;
|
||||||
var days = Math.floor(totalSeconds / (3600 * 24));
|
const days = Math.floor(totalSeconds / (3600 * 24));
|
||||||
var hours = Math.floor((totalSeconds % (3600 * 24)) / 3600);
|
const hours = Math.floor((totalSeconds % (3600 * 24)) / 3600);
|
||||||
var minutes = Math.floor((totalSeconds % 3600) / 60);
|
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||||
var seconds = Math.floor(totalSeconds % 60);
|
const seconds = Math.floor(totalSeconds % 60);
|
||||||
var dayDisplay = days > 0 ? days + (days === 1 ? " day, " : " days, ") : "";
|
const dayDisplay = days > 0 ? days + (days === 1 ? " day, " : " days, ") : "";
|
||||||
var hourDisplay = hours > 0 ? hours + (hours === 1 ? " hour, " : " hours, ") : "";
|
const hourDisplay = hours > 0 ? hours + (hours === 1 ? " hour, " : " hours, ") : "";
|
||||||
var minuteDisplay = minutes > 0 ? minutes + (minutes === 1 ? " minute, " : " minutes, ") : "";
|
const minuteDisplay = minutes > 0 ? minutes + (minutes === 1 ? " minute, " : " minutes, ") : "";
|
||||||
var secondDisplay = seconds > 0 ? seconds + (seconds === 1 ? " second" : " seconds") : "";
|
const secondDisplay = seconds > 0 ? seconds + (seconds === 1 ? " second" : " seconds") : "";
|
||||||
return (dayDisplay + hourDisplay + minuteDisplay + secondDisplay).replace(/,\s*$/, "");
|
return (dayDisplay + hourDisplay + minuteDisplay + secondDisplay).replace(/,\s*$/, "");
|
||||||
}
|
}
|
||||||
|
export function formatSecondsToMS(s) {
|
||||||
|
const mins = Math.floor(s / 60);
|
||||||
|
const secs = s % 60;
|
||||||
|
return `${mins}:${secs < 10 ? "0" : ""}${secs}`;
|
||||||
|
}
|
||||||
|
|||||||
14
dist/ws.d.ts
vendored
Normal file
14
dist/ws.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import type { WebSocket } from "ws";
|
||||||
|
export type WsEvent = {
|
||||||
|
type: string;
|
||||||
|
data?: unknown;
|
||||||
|
};
|
||||||
|
export type WsClientChangeCallback = (clients: number) => void;
|
||||||
|
export declare class WsService {
|
||||||
|
private clients;
|
||||||
|
addClient(ws: WebSocket): void;
|
||||||
|
removeClient(ws: WebSocket): void;
|
||||||
|
broadcast(message: WsEvent): void;
|
||||||
|
getClientCount(): number;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=ws.d.ts.map
|
||||||
1
dist/ws.d.ts.map
vendored
Normal file
1
dist/ws.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../src/ws.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAGpC,MAAM,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAE/D,qBAAa,SAAS;IACrB,OAAO,CAAC,OAAO,CAA6B;IAE5C,SAAS,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI;IAK9B,YAAY,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI;IAKjC,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAMjC,cAAc,IAAI,MAAM;CAGxB"}
|
||||||
20
dist/ws.js
vendored
Normal file
20
dist/ws.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { logInfo } from "./logger.js";
|
||||||
|
export class WsService {
|
||||||
|
clients = new Set();
|
||||||
|
addClient(ws) {
|
||||||
|
this.clients.add(ws);
|
||||||
|
logInfo(`Socket connected. Total clients: ${this.clients.size}`);
|
||||||
|
}
|
||||||
|
removeClient(ws) {
|
||||||
|
this.clients.delete(ws);
|
||||||
|
logInfo(`Socket disconnected. Total clients: ${this.clients.size}`);
|
||||||
|
}
|
||||||
|
broadcast(message) {
|
||||||
|
this.clients.forEach((socket) => {
|
||||||
|
socket.send(JSON.stringify(message));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getClientCount() {
|
||||||
|
return this.clients.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
441
package-lock.json
generated
441
package-lock.json
generated
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.2.4",
|
"version": "1.9.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.2.4",
|
"version": "1.9.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/ws": "^8.18.1",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"chalk": "^5.6.2",
|
"chalk": "^5.6.2",
|
||||||
"rimraf": "^6.1.0"
|
"rimraf": "^6.1.0"
|
||||||
@@ -30,9 +31,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@isaacs/brace-expansion": {
|
"node_modules/@isaacs/brace-expansion": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz",
|
||||||
"integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
|
"integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/balanced-match": "^4.0.1"
|
"@isaacs/balanced-match": "^4.0.1"
|
||||||
@@ -41,55 +42,22 @@
|
|||||||
"node": "20 || >=22"
|
"node": "20 || >=22"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@isaacs/cliui": {
|
|
||||||
"version": "8.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
|
||||||
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"string-width": "^5.1.2",
|
|
||||||
"string-width-cjs": "npm:string-width@^4.2.0",
|
|
||||||
"strip-ansi": "^7.0.1",
|
|
||||||
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
|
||||||
"wrap-ansi": "^8.1.0",
|
|
||||||
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.10.1",
|
"version": "24.10.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.11.tgz",
|
||||||
"integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
|
"integrity": "sha512-/Af7O8r1frCVgOz0I62jWUtMohJ0/ZQU/ZoketltOJPZpnb17yoNc9BSoVuV9qlaIXJiPNOpsfq4ByFajSArNQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.16.0"
|
"undici-types": "~7.16.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-regex": {
|
"node_modules/@types/ws": {
|
||||||
"version": "6.2.2",
|
"version": "8.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
|
||||||
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
|
"integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"dependencies": {
|
||||||
"node": ">=12"
|
"@types/node": "*"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ansi-styles": {
|
|
||||||
"version": "6.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
|
|
||||||
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/asynckit": {
|
"node_modules/asynckit": {
|
||||||
@@ -99,9 +67,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.4",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.4.tgz",
|
||||||
"integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
|
"integrity": "sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
@@ -134,24 +102,6 @@
|
|||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/color-convert": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"color-name": "~1.1.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/color-name": {
|
|
||||||
"version": "1.1.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
|
||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/combined-stream": {
|
"node_modules/combined-stream": {
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||||
@@ -164,20 +114,6 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cross-spawn": {
|
|
||||||
"version": "7.0.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
|
||||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"path-key": "^3.1.0",
|
|
||||||
"shebang-command": "^2.0.0",
|
|
||||||
"which": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/delayed-stream": {
|
"node_modules/delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
@@ -201,18 +137,6 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eastasianwidth": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
|
||||||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/emoji-regex": {
|
|
||||||
"version": "9.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
|
||||||
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/es-define-property": {
|
"node_modules/es-define-property": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||||
@@ -278,22 +202,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/foreground-child": {
|
|
||||||
"version": "3.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
|
|
||||||
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"cross-spawn": "^7.0.6",
|
|
||||||
"signal-exit": "^4.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/form-data": {
|
"node_modules/form-data": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
|
||||||
@@ -357,21 +265,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/glob": {
|
"node_modules/glob": {
|
||||||
"version": "11.1.0",
|
"version": "13.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.1.tgz",
|
||||||
"integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==",
|
"integrity": "sha512-B7U/vJpE3DkJ5WXTgTpTRN63uV42DseiXXKMwG14LQBXmsdeIoHAPbU/MEo6II0k5ED74uc2ZGTC6MwHFQhF6w==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.3.1",
|
"minimatch": "^10.1.2",
|
||||||
"jackspeak": "^4.1.1",
|
|
||||||
"minimatch": "^10.1.1",
|
|
||||||
"minipass": "^7.1.2",
|
"minipass": "^7.1.2",
|
||||||
"package-json-from-dist": "^1.0.0",
|
|
||||||
"path-scurry": "^2.0.0"
|
"path-scurry": "^2.0.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
|
||||||
"glob": "dist/esm/bin.mjs"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "20 || >=22"
|
||||||
},
|
},
|
||||||
@@ -430,41 +332,11 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-fullwidth-code-point": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/isexe": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/jackspeak": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
|
|
||||||
"integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
|
|
||||||
"license": "BlueOak-1.0.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@isaacs/cliui": "^8.0.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "20 || >=22"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "11.2.2",
|
"version": "11.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz",
|
||||||
"integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==",
|
"integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==",
|
||||||
"license": "ISC",
|
"license": "BlueOak-1.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "20 || >=22"
|
||||||
}
|
}
|
||||||
@@ -500,12 +372,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "10.1.1",
|
"version": "10.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.2.tgz",
|
||||||
"integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
|
"integrity": "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/brace-expansion": "^5.0.0"
|
"@isaacs/brace-expansion": "^5.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "20 || >=22"
|
||||||
@@ -529,15 +401,6 @@
|
|||||||
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
||||||
"license": "BlueOak-1.0.0"
|
"license": "BlueOak-1.0.0"
|
||||||
},
|
},
|
||||||
"node_modules/path-key": {
|
|
||||||
"version": "3.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
|
||||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/path-scurry": {
|
"node_modules/path-scurry": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz",
|
||||||
@@ -561,12 +424,12 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/rimraf": {
|
"node_modules/rimraf": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
|
||||||
"integrity": "sha512-DxdlA1bdNzkZK7JiNWH+BAx1x4tEJWoTofIopFo6qWUU94jYrFZ0ubY05TqH3nWPJ1nKa1JWVFDINZ3fnrle/A==",
|
"integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": "^11.0.3",
|
"glob": "^13.0.0",
|
||||||
"package-json-from-dist": "^1.0.1"
|
"package-json-from-dist": "^1.0.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -579,135 +442,6 @@
|
|||||||
"url": "https://github.com/sponsors/isaacs"
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shebang-command": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"shebang-regex": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/shebang-regex": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/signal-exit": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
|
||||||
"license": "ISC",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string-width": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
|
||||||
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"eastasianwidth": "^0.2.0",
|
|
||||||
"emoji-regex": "^9.2.2",
|
|
||||||
"strip-ansi": "^7.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string-width-cjs": {
|
|
||||||
"name": "string-width",
|
|
||||||
"version": "4.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
|
||||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"emoji-regex": "^8.0.0",
|
|
||||||
"is-fullwidth-code-point": "^3.0.0",
|
|
||||||
"strip-ansi": "^6.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string-width-cjs/node_modules/ansi-regex": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string-width-cjs/node_modules/emoji-regex": {
|
|
||||||
"version": "8.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/string-width-cjs/node_modules/strip-ansi": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strip-ansi": {
|
|
||||||
"version": "7.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
|
|
||||||
"integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": "^6.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strip-ansi-cjs": {
|
|
||||||
"name": "strip-ansi",
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.9.3",
|
"version": "5.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||||
@@ -726,114 +460,7 @@
|
|||||||
"version": "7.16.0",
|
"version": "7.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
||||||
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
|
||||||
"node_modules/which": {
|
|
||||||
"version": "2.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
|
||||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"isexe": "^2.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"node-which": "bin/node-which"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi": {
|
|
||||||
"version": "8.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
|
||||||
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^6.1.0",
|
|
||||||
"string-width": "^5.0.1",
|
|
||||||
"strip-ansi": "^7.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs": {
|
|
||||||
"name": "wrap-ansi",
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.0.0",
|
|
||||||
"string-width": "^4.1.0",
|
|
||||||
"strip-ansi": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"color-convert": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
|
|
||||||
"version": "8.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
|
|
||||||
"version": "4.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
|
||||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"emoji-regex": "^8.0.0",
|
|
||||||
"is-fullwidth-code-point": "^3.0.0",
|
|
||||||
"strip-ansi": "^6.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dpu/shared",
|
"name": "@dpu/shared",
|
||||||
"version": "1.2.4",
|
"version": "1.9.7",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"typescript": ">=4.5.0"
|
"typescript": ">=4.5.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/ws": "^8.18.1",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"chalk": "^5.6.2",
|
"chalk": "^5.6.2",
|
||||||
"rimraf": "^6.1.0"
|
"rimraf": "^6.1.0"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { AxiosInstance } from "axios";
|
import type { AxiosInstance } from "axios";
|
||||||
|
import { logWarning } from "./logger.js";
|
||||||
|
|
||||||
export type ServiceResult<T = unknown> = {
|
export type ServiceResult<T = unknown> = {
|
||||||
result: T;
|
result: T;
|
||||||
@@ -39,9 +40,10 @@ export abstract class BaseService<T> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getErrorResult(error: string): ServiceResult<string> {
|
getErrorResult(errorMessage: string, error?: unknown): ServiceResult<string> {
|
||||||
|
logWarning(errorMessage, error);
|
||||||
return {
|
return {
|
||||||
result: error,
|
result: errorMessage,
|
||||||
successful: false,
|
successful: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/grist.ts
Normal file
14
src/grist.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export type GristRecord_PersonalGoals = {
|
||||||
|
went_outside: boolean;
|
||||||
|
standing: boolean;
|
||||||
|
standing_goal: number;
|
||||||
|
steps: boolean;
|
||||||
|
steps_goal: number;
|
||||||
|
pushups: boolean;
|
||||||
|
squats: boolean;
|
||||||
|
leg_raises: boolean;
|
||||||
|
reps_goal: number;
|
||||||
|
stairs: boolean;
|
||||||
|
stairs_goal: number;
|
||||||
|
is_workday: boolean;
|
||||||
|
};
|
||||||
@@ -11,9 +11,9 @@ export type HomeAssistantEntity = {
|
|||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
};
|
};
|
||||||
last_changed: string; // datetime string
|
last_changed: string; // datetime string
|
||||||
last_reported: string; // datetime string
|
last_reported?: string; // datetime string
|
||||||
last_updated: string; // datetime string
|
last_updated?: string; // datetime string
|
||||||
context: {
|
context?: {
|
||||||
id: string;
|
id: string;
|
||||||
parent_id: string | null;
|
parent_id: string | null;
|
||||||
user_id: string | null;
|
user_id: string | null;
|
||||||
@@ -23,12 +23,24 @@ export type HomeAssistantEntity = {
|
|||||||
export interface HomeAssistantDeskPositionResult {
|
export interface HomeAssistantDeskPositionResult {
|
||||||
raw: HomeAssistantEntity;
|
raw: HomeAssistantEntity;
|
||||||
as_boolean: boolean;
|
as_boolean: boolean;
|
||||||
as_text: () => string;
|
|
||||||
last_changed: TimeBetween;
|
last_changed: TimeBetween;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type API_HA_DeskPosition = {
|
export type API_HA_DeskPosition = {
|
||||||
position: string;
|
|
||||||
is_standing: boolean;
|
is_standing: boolean;
|
||||||
last_changed: string;
|
last_changed: string;
|
||||||
|
last_changed_seconds: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type HA_Update = {
|
||||||
|
entity_id: string;
|
||||||
|
state: string;
|
||||||
|
attributes: {
|
||||||
|
state_class?: string;
|
||||||
|
unit_of_measurement?: string;
|
||||||
|
icon?: string;
|
||||||
|
friendly_name?: string;
|
||||||
|
[key: string]: unknown;
|
||||||
|
};
|
||||||
|
timestamp: string; // datetime string
|
||||||
};
|
};
|
||||||
|
|||||||
15
src/homepage.ts
Normal file
15
src/homepage.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { GristRecord_PersonalGoals } from "./grist";
|
||||||
|
import type { API_HA_DeskPosition } from "./homeassistant";
|
||||||
|
import type { TidalGetCurrent } from "./tidal";
|
||||||
|
|
||||||
|
export type FullInformation = {
|
||||||
|
ha_desk_position: API_HA_DeskPosition | null;
|
||||||
|
ha_temp: string | null;
|
||||||
|
tidal_current: TidalGetCurrent | null;
|
||||||
|
grist_personal_goals: GristRecord_PersonalGoals | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ComponentUpdate = {
|
||||||
|
component: string;
|
||||||
|
data: unknown;
|
||||||
|
};
|
||||||
13
src/index.ts
13
src/index.ts
@@ -1,5 +1,8 @@
|
|||||||
export * from "./fastify";
|
export * from "./fastify.js";
|
||||||
export * from "./homeassistant";
|
export * from "./grist.js";
|
||||||
export * from "./logger";
|
export * from "./homeassistant.js";
|
||||||
export * from "./tidal";
|
export * from "./homepage.js";
|
||||||
export * from "./timehelper";
|
export * from "./logger.js";
|
||||||
|
export * from "./tidal.js";
|
||||||
|
export * from "./timehelper.js";
|
||||||
|
export * from "./ws.js";
|
||||||
|
|||||||
19
src/tidal.ts
19
src/tidal.ts
@@ -1,14 +1,25 @@
|
|||||||
export type TidalSong = {
|
export type TidalGetCurrent = {
|
||||||
title: string;
|
title: string;
|
||||||
artists: string;
|
artists: string;
|
||||||
|
artistsArray: string[];
|
||||||
album: string;
|
album: string;
|
||||||
playingFrom: string;
|
playingFrom: string;
|
||||||
status: "playing" | "paused";
|
status: "playing" | "paused";
|
||||||
url: string;
|
url: string;
|
||||||
current: string;
|
current: string;
|
||||||
|
currentInSeconds: number;
|
||||||
duration: string;
|
duration: string;
|
||||||
};
|
durationInSeconds: number;
|
||||||
|
image: string;
|
||||||
export type TidalVolume = {
|
icon: string;
|
||||||
|
localAlbumArt: string;
|
||||||
|
favorite: boolean;
|
||||||
|
trackId: string;
|
||||||
volume: number;
|
volume: number;
|
||||||
|
player: {
|
||||||
|
status: "playing" | "paused";
|
||||||
|
shuffle: boolean;
|
||||||
|
repeat: "all" | "single" | "none";
|
||||||
|
};
|
||||||
|
artist: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
export class TimeSpan {
|
export class TimeSpan {
|
||||||
private start: { hours: number; minutes: number };
|
private start: { hours: number; minutes: number };
|
||||||
private end: { hours: number; minutes: number };
|
private end: { hours: number; minutes: number };
|
||||||
|
private timeZone;
|
||||||
|
|
||||||
constructor(timeSpanStr: string) {
|
constructor(timeSpanStr: string, timeZone: string) {
|
||||||
const [startStr, endStr] = timeSpanStr.split("-");
|
const [startStr, endStr] = timeSpanStr.split("-");
|
||||||
this.start = this.parseTime(startStr);
|
this.start = this.parseTime(startStr);
|
||||||
this.end = this.parseTime(endStr);
|
this.end = this.parseTime(endStr);
|
||||||
|
this.timeZone = timeZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
private parseTime(timeStr: string) {
|
private parseTime(timeStr: string) {
|
||||||
@@ -16,10 +18,15 @@ export class TimeSpan {
|
|||||||
contains(timestamp: number = Date.now()): boolean {
|
contains(timestamp: number = Date.now()): boolean {
|
||||||
const date = new Date(timestamp);
|
const date = new Date(timestamp);
|
||||||
|
|
||||||
const hours = date.getHours();
|
const berlinTimeStr = date.toLocaleString("de-DE", {
|
||||||
const minutes = date.getMinutes();
|
timeZone: this.timeZone, // "Europe/Berlin"
|
||||||
const currentMinutes = hours * 60 + minutes;
|
hour12: false,
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
});
|
||||||
|
|
||||||
|
const [hours, minutes] = berlinTimeStr.split(":").map(Number);
|
||||||
|
const currentMinutes = hours * 60 + minutes;
|
||||||
const startMinutes = this.start.hours * 60 + this.start.minutes;
|
const startMinutes = this.start.hours * 60 + this.start.minutes;
|
||||||
const endMinutes = this.end.hours * 60 + this.end.minutes;
|
const endMinutes = this.end.hours * 60 + this.end.minutes;
|
||||||
|
|
||||||
@@ -44,30 +51,36 @@ export function calculateSecondsBetween(
|
|||||||
return {
|
return {
|
||||||
seconds,
|
seconds,
|
||||||
toReadable: (roundToMinutes?: boolean) =>
|
toReadable: (roundToMinutes?: boolean) =>
|
||||||
secondsToReadable(seconds, roundToMinutes),
|
formatSecondsToDHMS(seconds, roundToMinutes),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function secondsToReadable(
|
export function formatSecondsToDHMS(
|
||||||
secs: number,
|
secs: number,
|
||||||
roundToMinutes: boolean = false,
|
roundToMinutes: boolean = false,
|
||||||
): string {
|
): string {
|
||||||
const totalSeconds = roundToMinutes ? Math.round(secs / 60) * 60 : secs;
|
const totalSeconds = roundToMinutes ? Math.round(secs / 60) * 60 : secs;
|
||||||
|
|
||||||
var days = Math.floor(totalSeconds / (3600 * 24));
|
const days = Math.floor(totalSeconds / (3600 * 24));
|
||||||
var hours = Math.floor((totalSeconds % (3600 * 24)) / 3600);
|
const hours = Math.floor((totalSeconds % (3600 * 24)) / 3600);
|
||||||
var minutes = Math.floor((totalSeconds % 3600) / 60);
|
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||||
var seconds = Math.floor(totalSeconds % 60);
|
const seconds = Math.floor(totalSeconds % 60);
|
||||||
|
|
||||||
var dayDisplay = days > 0 ? days + (days === 1 ? " day, " : " days, ") : "";
|
const dayDisplay = days > 0 ? days + (days === 1 ? " day, " : " days, ") : "";
|
||||||
var hourDisplay =
|
const hourDisplay =
|
||||||
hours > 0 ? hours + (hours === 1 ? " hour, " : " hours, ") : "";
|
hours > 0 ? hours + (hours === 1 ? " hour, " : " hours, ") : "";
|
||||||
var minuteDisplay =
|
const minuteDisplay =
|
||||||
minutes > 0 ? minutes + (minutes === 1 ? " minute, " : " minutes, ") : "";
|
minutes > 0 ? minutes + (minutes === 1 ? " minute, " : " minutes, ") : "";
|
||||||
var secondDisplay =
|
const secondDisplay =
|
||||||
seconds > 0 ? seconds + (seconds === 1 ? " second" : " seconds") : "";
|
seconds > 0 ? seconds + (seconds === 1 ? " second" : " seconds") : "";
|
||||||
return (dayDisplay + hourDisplay + minuteDisplay + secondDisplay).replace(
|
return (dayDisplay + hourDisplay + minuteDisplay + secondDisplay).replace(
|
||||||
/,\s*$/,
|
/,\s*$/,
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function formatSecondsToMS(s: number): string {
|
||||||
|
const mins = Math.floor(s / 60);
|
||||||
|
const secs = s % 60;
|
||||||
|
return `${mins}:${secs < 10 ? "0" : ""}${secs}`;
|
||||||
|
}
|
||||||
|
|||||||
33
src/ws.ts
Normal file
33
src/ws.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { WebSocket } from "ws";
|
||||||
|
import { logInfo } from "./logger.js";
|
||||||
|
|
||||||
|
export type WsEvent = {
|
||||||
|
type: string;
|
||||||
|
data?: unknown;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type WsClientChangeCallback = (clients: number) => void;
|
||||||
|
|
||||||
|
export class WsService {
|
||||||
|
private clients: Set<WebSocket> = new Set();
|
||||||
|
|
||||||
|
addClient(ws: WebSocket): void {
|
||||||
|
this.clients.add(ws);
|
||||||
|
logInfo(`Socket connected. Total clients: ${this.clients.size}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
removeClient(ws: WebSocket): void {
|
||||||
|
this.clients.delete(ws);
|
||||||
|
logInfo(`Socket disconnected. Total clients: ${this.clients.size}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcast(message: WsEvent): void {
|
||||||
|
this.clients.forEach((socket) => {
|
||||||
|
socket.send(JSON.stringify(message));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getClientCount(): number {
|
||||||
|
return this.clients.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user