@openstatus/health-tcp 0.1.4-dev.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 +71 -0
- package/dist/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/mod.cjs +39 -0
- package/dist/mod.d.cts +33 -0
- package/dist/mod.d.cts.map +1 -0
- package/dist/mod.d.ts +33 -0
- package/dist/mod.d.ts.map +1 -0
- package/dist/mod.js +38 -0
- package/dist/mod.js.map +1 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @openstatus/health-tcp
|
|
2
|
+
|
|
3
|
+
TCP probe for [`@openstatus/health`](https://jsr.io/@openstatus/health).
|
|
4
|
+
Opens a socket to `host:port`, reports `ok` as soon as the connection is
|
|
5
|
+
established and closes it again — the check for every dependency that has
|
|
6
|
+
no client library or HTTP endpoint: an SMTP relay, a Memcached node, a
|
|
7
|
+
database behind a bastion, a legacy service on a bare port.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
deno add jsr:@openstatus/health jsr:@openstatus/health-tcp
|
|
11
|
+
npm install @openstatus/health @openstatus/health-tcp
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { createHealthHandler } from "@openstatus/health";
|
|
16
|
+
import { tcpProbe } from "@openstatus/health-tcp";
|
|
17
|
+
|
|
18
|
+
Deno.serve(
|
|
19
|
+
createHealthHandler({
|
|
20
|
+
probes: [
|
|
21
|
+
tcpProbe({ name: "smtp", host: "smtp.example.com", port: 587 }),
|
|
22
|
+
tcpProbe({ name: "memcached", host: "10.0.0.5", port: 11211 }),
|
|
23
|
+
],
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A successful connect proves the host resolves, the network path is open
|
|
29
|
+
and something is listening on the port; it does not prove that the
|
|
30
|
+
listener speaks the protocol you expect or would accept your credentials.
|
|
31
|
+
Refused and unreachable connections fail the check with the socket error,
|
|
32
|
+
and a `timeoutMs` destroys a socket that is still waiting for the
|
|
33
|
+
handshake. Give each probe a `name` when you mount more than one — they all
|
|
34
|
+
default to `tcp`, and duplicate names are rejected.
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
tcpProbe({
|
|
38
|
+
host: "smtp.example.com",
|
|
39
|
+
port: 587,
|
|
40
|
+
// optional overrides from the Probe contract
|
|
41
|
+
name: "smtp",
|
|
42
|
+
critical: true,
|
|
43
|
+
timeoutMs: 1000,
|
|
44
|
+
skip: () => env.SMTP_HOST == null,
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Non-critical by default: a bare port check rarely maps to a dependency
|
|
49
|
+
requests cannot proceed without. Set `critical: true` when it does.
|
|
50
|
+
|
|
51
|
+
This probe uses `node:net`, so it runs on Node.js, Deno and Bun but not on
|
|
52
|
+
edge runtimes without a socket API. The connect function is typed
|
|
53
|
+
structurally, and `connect` can be replaced for tests.
|
|
54
|
+
|
|
55
|
+
## About openstatus
|
|
56
|
+
|
|
57
|
+
[openstatus](https://www.openstatus.dev/) is the open-source uptime monitoring
|
|
58
|
+
and status page platform. This package is part of
|
|
59
|
+
[`@openstatus/health`](https://github.com/openstatusHQ/health), the `/health`
|
|
60
|
+
endpoints behind openstatus's own services, extracted so any JavaScript server
|
|
61
|
+
can expose one. Point an
|
|
62
|
+
[openstatus monitor](https://www.openstatus.dev/docs/reference/http-monitor)
|
|
63
|
+
at the endpoint and assert on `status` in the body to be alerted on
|
|
64
|
+
`degraded` before it becomes `unhealthy`.
|
|
65
|
+
|
|
66
|
+
Source: [github.com/openstatusHQ/health](https://github.com/openstatusHQ/health).
|
|
67
|
+
Issues and PRs welcome.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
[MIT](https://github.com/openstatusHQ/health/blob/main/LICENSE)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, '__toESM', {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return __toESM;
|
|
29
|
+
}
|
|
30
|
+
});
|
package/dist/mod.cjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const node_net = require_rolldown_runtime.__toESM(require("node:net"));
|
|
3
|
+
const __openstatus_health = require_rolldown_runtime.__toESM(require("@openstatus/health"));
|
|
4
|
+
|
|
5
|
+
//#region src/mod.ts
|
|
6
|
+
/** Probe name when `name` is unset. */
|
|
7
|
+
const tcpDefaultName = "tcp";
|
|
8
|
+
/** A probe that connects to `host:port`; non-critical by default. Throws `ProbeConfigError` for an empty `host` or an invalid `port`. */
|
|
9
|
+
function tcpProbe(options) {
|
|
10
|
+
const { host, port } = options;
|
|
11
|
+
if (typeof host !== "string" || host.length === 0) throw new __openstatus_health.ProbeConfigError("tcpProbe", "host", typeof host !== "string" ? `must be a string, got ${String(host)}` : "must not be empty");
|
|
12
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) throw new __openstatus_health.ProbeConfigError("tcpProbe", "port", `must be an integer between 1 and 65535, got ${String(port)}`);
|
|
13
|
+
const connect = options.connect ?? node_net.connect;
|
|
14
|
+
return {
|
|
15
|
+
name: options.name ?? tcpDefaultName,
|
|
16
|
+
critical: options.critical ?? false,
|
|
17
|
+
timeoutMs: options.timeoutMs,
|
|
18
|
+
skip: options.skip,
|
|
19
|
+
run: (signal) => new Promise((resolve, reject) => {
|
|
20
|
+
const socket = connect({
|
|
21
|
+
host,
|
|
22
|
+
port
|
|
23
|
+
});
|
|
24
|
+
const settle = (finish) => {
|
|
25
|
+
signal.removeEventListener("abort", onAbort);
|
|
26
|
+
socket.destroy();
|
|
27
|
+
finish();
|
|
28
|
+
};
|
|
29
|
+
const onAbort = () => settle(() => reject(signal.reason));
|
|
30
|
+
socket.once("connect", () => settle(resolve));
|
|
31
|
+
socket.once("error", (error) => settle(() => reject(error ?? /* @__PURE__ */ new Error("socket error"))));
|
|
32
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.tcpDefaultName = tcpDefaultName;
|
|
39
|
+
exports.tcpProbe = tcpProbe;
|
package/dist/mod.d.cts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Probe, ProbeOverrides } from "@openstatus/health";
|
|
2
|
+
|
|
3
|
+
//#region src/mod.d.ts
|
|
4
|
+
|
|
5
|
+
/** Probe name when `name` is unset. */
|
|
6
|
+
declare const tcpDefaultName = "tcp";
|
|
7
|
+
/** The subset of a `net.Socket` the probe uses. */
|
|
8
|
+
interface TcpLikeSocket {
|
|
9
|
+
/** Listen once for `connect` (established) or `error` (failed). */
|
|
10
|
+
once(event: "connect" | "error", listener: (error?: Error) => void): TcpLikeSocket;
|
|
11
|
+
/** Close the socket. */
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
14
|
+
/** What the probe connects with; `net.connect` by default. */
|
|
15
|
+
type TcpConnect = (options: {
|
|
16
|
+
readonly host: string;
|
|
17
|
+
readonly port: number;
|
|
18
|
+
}) => TcpLikeSocket;
|
|
19
|
+
/** Options for `tcpProbe()`. */
|
|
20
|
+
interface TcpProbeOptions extends ProbeOverrides {
|
|
21
|
+
/** Hostname or IP address. */
|
|
22
|
+
readonly host: string;
|
|
23
|
+
/** Port, 1–65535. */
|
|
24
|
+
readonly port: number;
|
|
25
|
+
/** Replacement `connect`, for tests. */
|
|
26
|
+
readonly connect?: TcpConnect;
|
|
27
|
+
}
|
|
28
|
+
/** A probe that connects to `host:port`; non-critical by default. Throws `ProbeConfigError` for an empty `host` or an invalid `port`. */
|
|
29
|
+
declare function tcpProbe(options: TcpProbeOptions): Probe;
|
|
30
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
31
|
+
//#endregion
|
|
32
|
+
export { TcpConnect, TcpLikeSocket, TcpProbeOptions, tcpDefaultName, tcpProbe };
|
|
33
|
+
//# sourceMappingURL=mod.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.cts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;AAoDA;AAAwB,cA7BX,cAAA,GA6BW,KAAA;;AAA4B,UA1BnC,aAAA,CA0BmC;EAAK;sDAtBlC,iBAClB;;;;;KAMO,UAAA;;;MAEP;;UAGY,eAAA,SAAwB;;;;;;qBAMpB;;;iBAIL,QAAA,UAAkB,kBAAkB"}
|
package/dist/mod.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Probe, ProbeOverrides } from "@openstatus/health";
|
|
2
|
+
|
|
3
|
+
//#region src/mod.d.ts
|
|
4
|
+
|
|
5
|
+
/** Probe name when `name` is unset. */
|
|
6
|
+
declare const tcpDefaultName = "tcp";
|
|
7
|
+
/** The subset of a `net.Socket` the probe uses. */
|
|
8
|
+
interface TcpLikeSocket {
|
|
9
|
+
/** Listen once for `connect` (established) or `error` (failed). */
|
|
10
|
+
once(event: "connect" | "error", listener: (error?: Error) => void): TcpLikeSocket;
|
|
11
|
+
/** Close the socket. */
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
14
|
+
/** What the probe connects with; `net.connect` by default. */
|
|
15
|
+
type TcpConnect = (options: {
|
|
16
|
+
readonly host: string;
|
|
17
|
+
readonly port: number;
|
|
18
|
+
}) => TcpLikeSocket;
|
|
19
|
+
/** Options for `tcpProbe()`. */
|
|
20
|
+
interface TcpProbeOptions extends ProbeOverrides {
|
|
21
|
+
/** Hostname or IP address. */
|
|
22
|
+
readonly host: string;
|
|
23
|
+
/** Port, 1–65535. */
|
|
24
|
+
readonly port: number;
|
|
25
|
+
/** Replacement `connect`, for tests. */
|
|
26
|
+
readonly connect?: TcpConnect;
|
|
27
|
+
}
|
|
28
|
+
/** A probe that connects to `host:port`; non-critical by default. Throws `ProbeConfigError` for an empty `host` or an invalid `port`. */
|
|
29
|
+
declare function tcpProbe(options: TcpProbeOptions): Probe;
|
|
30
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
31
|
+
//#endregion
|
|
32
|
+
export { TcpConnect, TcpLikeSocket, TcpProbeOptions, tcpDefaultName, tcpProbe };
|
|
33
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;AAoDA;AAAwB,cA7BX,cAAA,GA6BW,KAAA;;AAA4B,UA1BnC,aAAA,CA0BmC;EAAK;sDAtBlC,iBAClB;;;;;KAMO,UAAA;;;MAEP;;UAGY,eAAA,SAAwB;;;;;;qBAMpB;;;iBAIL,QAAA,UAAkB,kBAAkB"}
|
package/dist/mod.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { connect } from "node:net";
|
|
2
|
+
import { ProbeConfigError } from "@openstatus/health";
|
|
3
|
+
|
|
4
|
+
//#region src/mod.ts
|
|
5
|
+
/** Probe name when `name` is unset. */
|
|
6
|
+
const tcpDefaultName = "tcp";
|
|
7
|
+
/** A probe that connects to `host:port`; non-critical by default. Throws `ProbeConfigError` for an empty `host` or an invalid `port`. */
|
|
8
|
+
function tcpProbe(options) {
|
|
9
|
+
const { host, port } = options;
|
|
10
|
+
if (typeof host !== "string" || host.length === 0) throw new ProbeConfigError("tcpProbe", "host", typeof host !== "string" ? `must be a string, got ${String(host)}` : "must not be empty");
|
|
11
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) throw new ProbeConfigError("tcpProbe", "port", `must be an integer between 1 and 65535, got ${String(port)}`);
|
|
12
|
+
const connect$1 = options.connect ?? connect;
|
|
13
|
+
return {
|
|
14
|
+
name: options.name ?? tcpDefaultName,
|
|
15
|
+
critical: options.critical ?? false,
|
|
16
|
+
timeoutMs: options.timeoutMs,
|
|
17
|
+
skip: options.skip,
|
|
18
|
+
run: (signal) => new Promise((resolve, reject) => {
|
|
19
|
+
const socket = connect$1({
|
|
20
|
+
host,
|
|
21
|
+
port
|
|
22
|
+
});
|
|
23
|
+
const settle = (finish) => {
|
|
24
|
+
signal.removeEventListener("abort", onAbort);
|
|
25
|
+
socket.destroy();
|
|
26
|
+
finish();
|
|
27
|
+
};
|
|
28
|
+
const onAbort = () => settle(() => reject(signal.reason));
|
|
29
|
+
socket.once("connect", () => settle(resolve));
|
|
30
|
+
socket.once("error", (error) => settle(() => reject(error ?? /* @__PURE__ */ new Error("socket error"))));
|
|
31
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { tcpDefaultName, tcpProbe };
|
|
38
|
+
//# sourceMappingURL=mod.js.map
|
package/dist/mod.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.js","names":["options: TcpProbeOptions","connect","netConnect","finish: () => void"],"sources":["../src/mod.ts"],"sourcesContent":["/**\n * TCP probe for `@openstatus/health`: opens a socket to `host:port` and\n * closes it again, for any dependency without a client library.\n *\n * ```ts\n * import { tcpProbe } from \"@openstatus/health-tcp\";\n *\n * const probe = tcpProbe({ host: \"smtp.example.com\", port: 587 });\n * ```\n *\n * Node.js, Deno and Bun only: it uses `node:net`.\n *\n * @module\n */\n\nimport { connect as netConnect } from \"node:net\";\nimport {\n type Probe,\n ProbeConfigError,\n type ProbeOverrides,\n} from \"@openstatus/health\";\n\n/** Probe name when `name` is unset. */\nexport const tcpDefaultName = \"tcp\";\n\n/** The subset of a `net.Socket` the probe uses. */\nexport interface TcpLikeSocket {\n /** Listen once for `connect` (established) or `error` (failed). */\n once(\n event: \"connect\" | \"error\",\n listener: (error?: Error) => void,\n ): TcpLikeSocket;\n /** Close the socket. */\n destroy(): void;\n}\n\n/** What the probe connects with; `net.connect` by default. */\nexport type TcpConnect = (\n options: { readonly host: string; readonly port: number },\n) => TcpLikeSocket;\n\n/** Options for `tcpProbe()`. */\nexport interface TcpProbeOptions extends ProbeOverrides {\n /** Hostname or IP address. */\n readonly host: string;\n /** Port, 1–65535. */\n readonly port: number;\n /** Replacement `connect`, for tests. */\n readonly connect?: TcpConnect;\n}\n\n/** A probe that connects to `host:port`; non-critical by default. Throws `ProbeConfigError` for an empty `host` or an invalid `port`. */\nexport function tcpProbe(options: TcpProbeOptions): Probe {\n const { host, port } = options;\n if (typeof host !== \"string\" || host.length === 0) {\n throw new ProbeConfigError(\n \"tcpProbe\",\n \"host\",\n typeof host !== \"string\"\n ? `must be a string, got ${String(host)}`\n : \"must not be empty\",\n );\n }\n if (!Number.isInteger(port) || port < 1 || port > 65535) {\n throw new ProbeConfigError(\n \"tcpProbe\",\n \"port\",\n `must be an integer between 1 and 65535, got ${String(port)}`,\n );\n }\n const connect = options.connect ?? netConnect;\n return {\n name: options.name ?? tcpDefaultName,\n critical: options.critical ?? false,\n timeoutMs: options.timeoutMs,\n skip: options.skip,\n run: (signal) =>\n new Promise<void>((resolve, reject) => {\n const socket = connect({ host, port });\n const settle = (finish: () => void) => {\n signal.removeEventListener(\"abort\", onAbort);\n socket.destroy();\n finish();\n };\n const onAbort = () => settle(() => reject(signal.reason));\n socket.once(\"connect\", () => settle(resolve));\n socket.once(\n \"error\",\n (error) => settle(() => reject(error ?? new Error(\"socket error\"))),\n );\n signal.addEventListener(\"abort\", onAbort, { once: true });\n }),\n };\n}\n"],"mappings":";;;;;AAuBA,MAAa,iBAAiB;;AA6B9B,SAAgB,SAASA,SAAiC;CACxD,MAAM,EAAE,MAAM,MAAM,GAAG;AACvB,YAAW,SAAS,YAAY,KAAK,WAAW,EAC9C,OAAM,IAAI,iBACR,YACA,eACO,SAAS,YACX,wBAAwB,OAAO,KAAK,CAAC,IACtC;AAGR,MAAK,OAAO,UAAU,KAAK,IAAI,OAAO,KAAK,OAAO,MAChD,OAAM,IAAI,iBACR,YACA,SACC,8CAA8C,OAAO,KAAK,CAAC;CAGhE,MAAMC,YAAU,QAAQ,WAAWC;AACnC,QAAO;EACL,MAAM,QAAQ,QAAQ;EACtB,UAAU,QAAQ,YAAY;EAC9B,WAAW,QAAQ;EACnB,MAAM,QAAQ;EACd,KAAK,CAAC,WACJ,IAAI,QAAc,CAAC,SAAS,WAAW;GACrC,MAAM,SAAS,UAAQ;IAAE;IAAM;GAAM,EAAC;GACtC,MAAM,SAAS,CAACC,WAAuB;AACrC,WAAO,oBAAoB,SAAS,QAAQ;AAC5C,WAAO,SAAS;AAChB,YAAQ;GACT;GACD,MAAM,UAAU,MAAM,OAAO,MAAM,OAAO,OAAO,OAAO,CAAC;AACzD,UAAO,KAAK,WAAW,MAAM,OAAO,QAAQ,CAAC;AAC7C,UAAO,KACL,SACA,CAAC,UAAU,OAAO,MAAM,OAAO,yBAAS,IAAI,MAAM,gBAAgB,CAAC,CACpE;AACD,UAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAM,EAAC;EAC1D;CACJ;AACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openstatus/health-tcp",
|
|
3
|
+
"version": "0.1.4-dev.0",
|
|
4
|
+
"description": "TCP connect probe for @openstatus/health",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"openstatus",
|
|
7
|
+
"health",
|
|
8
|
+
"healthcheck",
|
|
9
|
+
"tcp",
|
|
10
|
+
"socket",
|
|
11
|
+
"network",
|
|
12
|
+
"port"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "openstatus",
|
|
17
|
+
"url": "https://www.openstatus.dev/"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/openstatusHQ/health",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/openstatusHQ/health.git",
|
|
23
|
+
"directory": "packages/tcp/"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/openstatusHQ/health/issues"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"module": "./dist/mod.js",
|
|
30
|
+
"main": "./dist/mod.cjs",
|
|
31
|
+
"types": "./dist/mod.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": {
|
|
35
|
+
"import": "./dist/mod.d.ts",
|
|
36
|
+
"require": "./dist/mod.d.cts"
|
|
37
|
+
},
|
|
38
|
+
"import": "./dist/mod.js",
|
|
39
|
+
"require": "./dist/mod.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"files": [
|
|
45
|
+
"dist/"
|
|
46
|
+
],
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=22"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@openstatus/health": "^0.1.4-dev.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": ">=22",
|
|
55
|
+
"tsdown": "^0.12.7",
|
|
56
|
+
"typescript": "^5.8.3"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsdown",
|
|
60
|
+
"prepack": "tsdown",
|
|
61
|
+
"test": "node --experimental-transform-types --test"
|
|
62
|
+
}
|
|
63
|
+
}
|