@teamnetwork-nz/prtg-mcp-server 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -0
- package/dist/client.d.ts +26 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +150 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/actions.d.ts +4 -0
- package/dist/tools/actions.d.ts.map +1 -0
- package/dist/tools/actions.js +83 -0
- package/dist/tools/actions.js.map +1 -0
- package/dist/tools/devices.d.ts +4 -0
- package/dist/tools/devices.d.ts.map +1 -0
- package/dist/tools/devices.js +99 -0
- package/dist/tools/devices.js.map +1 -0
- package/dist/tools/metrics.d.ts +4 -0
- package/dist/tools/metrics.d.ts.map +1 -0
- package/dist/tools/metrics.js +70 -0
- package/dist/tools/metrics.js.map +1 -0
- package/dist/tools/navigation.d.ts +4 -0
- package/dist/tools/navigation.d.ts.map +1 -0
- package/dist/tools/navigation.js +121 -0
- package/dist/tools/navigation.js.map +1 -0
- package/dist/tools/sensors.d.ts +4 -0
- package/dist/tools/sensors.d.ts.map +1 -0
- package/dist/tools/sensors.js +131 -0
- package/dist/tools/sensors.js.map +1 -0
- package/dist/tools/system.d.ts +4 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +56 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/types.d.ts +109 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/tz.d.ts +28 -0
- package/dist/tz.d.ts.map +1 -0
- package/dist/tz.js +128 -0
- package/dist/tz.js.map +1 -0
- package/package.json +30 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type SensorStatus = "UP" | "DOWN" | "WARNING" | "UNKNOWN" | "COLLECTING" | "DISCONNECTED" | "PAUSEDBYUSER" | "PAUSEDBYDEPENDENCY" | "PAUSEDBYSCHEDULE" | "UNUSUAL" | "PAUSEDBYLICENSE" | "ACKNOWLEDGED";
|
|
2
|
+
export interface PrtgObject {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
status: SensorStatus;
|
|
8
|
+
favorite: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
status_since?: string;
|
|
11
|
+
parent: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
href: string;
|
|
16
|
+
};
|
|
17
|
+
href: string;
|
|
18
|
+
}
|
|
19
|
+
export interface Sensor extends PrtgObject {
|
|
20
|
+
kind: string;
|
|
21
|
+
uptimetotal?: number;
|
|
22
|
+
downtimetotal?: number;
|
|
23
|
+
lastup?: string | null;
|
|
24
|
+
lastdown?: string | null;
|
|
25
|
+
basic?: {
|
|
26
|
+
name?: string;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
priority?: string;
|
|
29
|
+
sensorinfo?: string;
|
|
30
|
+
parenttags?: string[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface Device extends PrtgObject {
|
|
34
|
+
basic?: {
|
|
35
|
+
name?: string;
|
|
36
|
+
host?: string;
|
|
37
|
+
hostv6?: string;
|
|
38
|
+
tags?: string[];
|
|
39
|
+
parenttags?: string[];
|
|
40
|
+
priority?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface Group extends PrtgObject {
|
|
44
|
+
basic?: {
|
|
45
|
+
name?: string;
|
|
46
|
+
tags?: string[];
|
|
47
|
+
parenttags?: string[];
|
|
48
|
+
priority?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface Probe extends PrtgObject {
|
|
52
|
+
basic?: {
|
|
53
|
+
name?: string;
|
|
54
|
+
tags?: string[];
|
|
55
|
+
priority?: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface Channel {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
kind: string;
|
|
63
|
+
href: string;
|
|
64
|
+
favorite: boolean;
|
|
65
|
+
parent: {
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
type: string;
|
|
69
|
+
href: string;
|
|
70
|
+
};
|
|
71
|
+
basic?: {
|
|
72
|
+
name?: string;
|
|
73
|
+
displayunit?: string;
|
|
74
|
+
unittype?: string;
|
|
75
|
+
hascustomunit?: string;
|
|
76
|
+
};
|
|
77
|
+
last_measurement?: {
|
|
78
|
+
timestamp: string;
|
|
79
|
+
value: number | null;
|
|
80
|
+
minimum: number | null;
|
|
81
|
+
maximum: number | null;
|
|
82
|
+
average: number | null;
|
|
83
|
+
display_value: number | null;
|
|
84
|
+
display_minimum: number | null;
|
|
85
|
+
display_maximum: number | null;
|
|
86
|
+
display_average: number | null;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface TimeseriesResponse {
|
|
90
|
+
channels: Array<{
|
|
91
|
+
name: string;
|
|
92
|
+
unit?: string;
|
|
93
|
+
}>;
|
|
94
|
+
data: Array<[string, ...(number | null)[]]>;
|
|
95
|
+
}
|
|
96
|
+
export interface License {
|
|
97
|
+
edition?: string;
|
|
98
|
+
sensors?: number;
|
|
99
|
+
sensorsused?: number;
|
|
100
|
+
sensorsleft?: number;
|
|
101
|
+
expiry?: string;
|
|
102
|
+
valid?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface PrtgError {
|
|
105
|
+
code: string;
|
|
106
|
+
message: string;
|
|
107
|
+
request_id?: string;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,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AO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,kFAAkF"}
|
package/dist/tz.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the effective IANA timezone name for datetime conversion.
|
|
3
|
+
*
|
|
4
|
+
* PRTG_TZ=local (default) → system local timezone
|
|
5
|
+
* PRTG_TZ=utc → no conversion (pass-through)
|
|
6
|
+
* PRTG_TZ=Pacific/Auckland → explicit IANA timezone
|
|
7
|
+
*/
|
|
8
|
+
export declare function getEffectiveTz(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Interpret a user-supplied datetime string as wall-clock time in the configured timezone
|
|
11
|
+
* and return a UTC ISO-8601 string suitable for sending to the PRTG API.
|
|
12
|
+
*
|
|
13
|
+
* Accepts: "2024-01-15T09:30:00", "2024-01-15 09:30:00", "2024-01-15T09:30:00Z" (Z ignored)
|
|
14
|
+
* Uses two-pass offset resolution to handle DST transitions correctly.
|
|
15
|
+
*/
|
|
16
|
+
export declare function localToUtc(input: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Convert a UTC ISO-8601 datetime string (from the PRTG API) to an ISO-8601 string
|
|
19
|
+
* with the local UTC offset (e.g. "2026-05-09T01:44:56+12:00").
|
|
20
|
+
*/
|
|
21
|
+
export declare function utcToLocal(utcStr: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Recursively walk any JSON value and convert UTC ISO-8601 datetime strings
|
|
24
|
+
* to the configured local timezone. Non-datetime strings and all other types
|
|
25
|
+
* pass through unchanged.
|
|
26
|
+
*/
|
|
27
|
+
export declare function transformDates<T>(value: T): T;
|
|
28
|
+
//# sourceMappingURL=tz.d.ts.map
|
package/dist/tz.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tz.d.ts","sourceRoot":"","sources":["../src/tz.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAavC;AAwCD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAuBhD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAiBjD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAe7C"}
|
package/dist/tz.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const UTC_ISO_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
|
|
2
|
+
/**
|
|
3
|
+
* Returns the effective IANA timezone name for datetime conversion.
|
|
4
|
+
*
|
|
5
|
+
* PRTG_TZ=local (default) → system local timezone
|
|
6
|
+
* PRTG_TZ=utc → no conversion (pass-through)
|
|
7
|
+
* PRTG_TZ=Pacific/Auckland → explicit IANA timezone
|
|
8
|
+
*/
|
|
9
|
+
export function getEffectiveTz() {
|
|
10
|
+
const raw = (process.env["PRTG_TZ"] ?? "local").trim();
|
|
11
|
+
if (raw === "local")
|
|
12
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
13
|
+
if (raw.toLowerCase() === "utc")
|
|
14
|
+
return "UTC";
|
|
15
|
+
// Validate the timezone name early so we get a clear error at startup
|
|
16
|
+
try {
|
|
17
|
+
new Intl.DateTimeFormat("en-US", { timeZone: raw });
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
throw new Error(`PRTG_TZ: "${raw}" is not a valid IANA timezone name (e.g. Pacific/Auckland, America/New_York)`);
|
|
21
|
+
}
|
|
22
|
+
return raw;
|
|
23
|
+
}
|
|
24
|
+
/** Extract date/time components for a UTC instant as seen in the given timezone. */
|
|
25
|
+
function tzParts(date, tz) {
|
|
26
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
27
|
+
timeZone: tz,
|
|
28
|
+
year: "numeric",
|
|
29
|
+
month: "2-digit",
|
|
30
|
+
day: "2-digit",
|
|
31
|
+
hour: "2-digit",
|
|
32
|
+
minute: "2-digit",
|
|
33
|
+
second: "2-digit",
|
|
34
|
+
hour12: false,
|
|
35
|
+
}).formatToParts(date);
|
|
36
|
+
const p = {};
|
|
37
|
+
for (const { type, value } of parts) {
|
|
38
|
+
if (type !== "literal")
|
|
39
|
+
p[type] = parseInt(value, 10);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
year: p["year"],
|
|
43
|
+
month: p["month"],
|
|
44
|
+
day: p["day"],
|
|
45
|
+
hour: p["hour"] === 24 ? 0 : p["hour"], // midnight edge case
|
|
46
|
+
minute: p["minute"],
|
|
47
|
+
second: p["second"],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns (localWallClock - UTC) in milliseconds for a given UTC instant in the target timezone.
|
|
52
|
+
* Positive when the timezone is ahead of UTC (e.g. +12 → +43200000).
|
|
53
|
+
*/
|
|
54
|
+
function offsetMs(date, tz) {
|
|
55
|
+
const { year, month, day, hour, minute, second } = tzParts(date, tz);
|
|
56
|
+
return Date.UTC(year, month - 1, day, hour, minute, second) - date.getTime();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Interpret a user-supplied datetime string as wall-clock time in the configured timezone
|
|
60
|
+
* and return a UTC ISO-8601 string suitable for sending to the PRTG API.
|
|
61
|
+
*
|
|
62
|
+
* Accepts: "2024-01-15T09:30:00", "2024-01-15 09:30:00", "2024-01-15T09:30:00Z" (Z ignored)
|
|
63
|
+
* Uses two-pass offset resolution to handle DST transitions correctly.
|
|
64
|
+
*/
|
|
65
|
+
export function localToUtc(input) {
|
|
66
|
+
const tz = getEffectiveTz();
|
|
67
|
+
if (tz === "UTC")
|
|
68
|
+
return input.endsWith("Z") ? input : input + "Z";
|
|
69
|
+
// Strip any existing tz indicator and normalise to ISO-8601 with no suffix
|
|
70
|
+
const naive = input
|
|
71
|
+
.replace(/Z$/, "")
|
|
72
|
+
.replace(/[+-]\d{2}:?\d{2}$/, "")
|
|
73
|
+
.replace(" ", "T")
|
|
74
|
+
.trim();
|
|
75
|
+
// First estimate: treat the naive string as UTC to obtain an approximate moment
|
|
76
|
+
const approx = new Date(naive + "Z");
|
|
77
|
+
if (isNaN(approx.getTime()))
|
|
78
|
+
return input; // unparseable — pass through
|
|
79
|
+
// Pass 1: get the tz offset at the approximate moment
|
|
80
|
+
const off1 = offsetMs(approx, tz);
|
|
81
|
+
const est = new Date(approx.getTime() - off1);
|
|
82
|
+
// Pass 2: re-check at the refined estimate (handles DST crossover)
|
|
83
|
+
const off2 = offsetMs(est, tz);
|
|
84
|
+
return new Date(approx.getTime() - off2).toISOString();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Convert a UTC ISO-8601 datetime string (from the PRTG API) to an ISO-8601 string
|
|
88
|
+
* with the local UTC offset (e.g. "2026-05-09T01:44:56+12:00").
|
|
89
|
+
*/
|
|
90
|
+
export function utcToLocal(utcStr) {
|
|
91
|
+
const tz = getEffectiveTz();
|
|
92
|
+
if (tz === "UTC")
|
|
93
|
+
return utcStr;
|
|
94
|
+
const date = new Date(utcStr);
|
|
95
|
+
if (isNaN(date.getTime()))
|
|
96
|
+
return utcStr; // unparseable — pass through
|
|
97
|
+
const { year, month, day, hour, minute, second } = tzParts(date, tz);
|
|
98
|
+
const off = offsetMs(date, tz);
|
|
99
|
+
const offMin = off / 60000;
|
|
100
|
+
const sign = offMin >= 0 ? "+" : "-";
|
|
101
|
+
const abs = Math.abs(Math.round(offMin));
|
|
102
|
+
const hh = String(Math.floor(abs / 60)).padStart(2, "0");
|
|
103
|
+
const mm = String(abs % 60).padStart(2, "0");
|
|
104
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
105
|
+
return `${year}-${pad(month)}-${pad(day)}T${pad(hour)}:${pad(minute)}:${pad(second)}${sign}${hh}:${mm}`;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Recursively walk any JSON value and convert UTC ISO-8601 datetime strings
|
|
109
|
+
* to the configured local timezone. Non-datetime strings and all other types
|
|
110
|
+
* pass through unchanged.
|
|
111
|
+
*/
|
|
112
|
+
export function transformDates(value) {
|
|
113
|
+
if (typeof value === "string") {
|
|
114
|
+
return (UTC_ISO_RE.test(value) ? utcToLocal(value) : value);
|
|
115
|
+
}
|
|
116
|
+
if (Array.isArray(value)) {
|
|
117
|
+
return value.map(transformDates);
|
|
118
|
+
}
|
|
119
|
+
if (value !== null && typeof value === "object") {
|
|
120
|
+
const out = {};
|
|
121
|
+
for (const [k, v] of Object.entries(value)) {
|
|
122
|
+
out[k] = transformDates(v);
|
|
123
|
+
}
|
|
124
|
+
return out;
|
|
125
|
+
}
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=tz.js.map
|
package/dist/tz.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tz.js","sourceRoot":"","sources":["../src/tz.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,kDAAkD,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;IAC7E,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC9C,sEAAsE;IACtE,IAAI,CAAC;QACH,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,aAAa,GAAG,+EAA+E,CAChG,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,oFAAoF;AACpF,SAAS,OAAO,CACd,IAAU,EACV,EAAU;IAEV,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QAC7C,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,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,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,cAAc,CAAiB,CAAC;IACnD,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YACtE,GAAG,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,GAAmB,CAAC;IAC7B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teamnetwork-nz/prtg-mcp-server",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "MCP server for PRTG Network Monitor — v2 REST API only, no database required",
|
|
5
|
+
"keywords": ["mcp", "prtg", "monitoring", "network", "claude"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"prtg-mcp-server": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"files": ["dist"],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
21
|
+
"zod": "^3.24.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^18.19.0",
|
|
25
|
+
"typescript": "^5.4.0"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
}
|
|
30
|
+
}
|