@glydeunity/unity-healthcheck-mesh 0.0.0-stage → 0.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +21 -0
  3. package/README.md +343 -2
  4. package/dist/cjs/config.js +408 -0
  5. package/dist/cjs/ids.js +53 -0
  6. package/dist/cjs/index.js +35 -0
  7. package/dist/cjs/package.json +1 -0
  8. package/dist/cjs/probe.js +81 -0
  9. package/dist/cjs/reporters.js +334 -0
  10. package/dist/cjs/runner.js +234 -0
  11. package/dist/cjs/schedule.js +23 -0
  12. package/dist/cjs/types.js +2 -0
  13. package/dist/cjs/uuid5.js +45 -0
  14. package/dist/cjs/version.js +10 -0
  15. package/dist/esm/config.d.ts +85 -0
  16. package/dist/esm/config.js +402 -0
  17. package/dist/esm/config.js.map +1 -0
  18. package/dist/esm/ids.d.ts +47 -0
  19. package/dist/esm/ids.js +47 -0
  20. package/dist/esm/ids.js.map +1 -0
  21. package/dist/esm/index.d.ts +10 -0
  22. package/dist/esm/index.js +8 -0
  23. package/dist/esm/index.js.map +1 -0
  24. package/dist/esm/probe.d.ts +45 -0
  25. package/dist/esm/probe.js +77 -0
  26. package/dist/esm/probe.js.map +1 -0
  27. package/dist/esm/reporters.d.ts +75 -0
  28. package/dist/esm/reporters.js +330 -0
  29. package/dist/esm/reporters.js.map +1 -0
  30. package/dist/esm/runner.d.ts +25 -0
  31. package/dist/esm/runner.js +230 -0
  32. package/dist/esm/runner.js.map +1 -0
  33. package/dist/esm/schedule.d.ts +15 -0
  34. package/dist/esm/schedule.js +20 -0
  35. package/dist/esm/schedule.js.map +1 -0
  36. package/dist/esm/types.d.ts +101 -0
  37. package/dist/esm/types.js +2 -0
  38. package/dist/esm/types.js.map +1 -0
  39. package/dist/esm/uuid5.d.ts +12 -0
  40. package/dist/esm/uuid5.js +42 -0
  41. package/dist/esm/uuid5.js.map +1 -0
  42. package/dist/esm/version.d.ts +7 -0
  43. package/dist/esm/version.js +8 -0
  44. package/dist/esm/version.js.map +1 -0
  45. package/package.json +53 -4
@@ -0,0 +1,230 @@
1
+ import { toResolvedMeshes, validateMeshConfig } from './config.js';
2
+ import { computeCheckId, floorToMinute } from './ids.js';
3
+ import { probe } from './probe.js';
4
+ import { createReporter } from './reporters.js';
5
+ import { nextTickDelay } from './schedule.js';
6
+ import { PACKAGE_NAME, PACKAGE_VERSION } from './version.js';
7
+ /** How long a reporter problem stays quiet after being logged. */
8
+ export const DIAGNOSTIC_INTERVAL_MS = 10 * 60_000;
9
+ function firstEnv(env, ...names) {
10
+ for (const name of names) {
11
+ const value = env[name]?.trim();
12
+ if (value)
13
+ return value;
14
+ }
15
+ return undefined;
16
+ }
17
+ function defaultLog(message, detail) {
18
+ if (detail) {
19
+ console.warn(message, detail);
20
+ }
21
+ else {
22
+ console.warn(message);
23
+ }
24
+ }
25
+ function defaultWriteLine(line, report) {
26
+ // The level split lets a stdout shipper that reads the console method file
27
+ // failures under a level of their own.
28
+ if (report.healthy) {
29
+ console.info(line);
30
+ }
31
+ else {
32
+ console.warn(line);
33
+ }
34
+ }
35
+ function isDefined(value) {
36
+ return value !== undefined;
37
+ }
38
+ function createEngine(options) {
39
+ const env = options.env ?? process.env;
40
+ const observer = (options.observer ?? firstEnv(env, 'WEBSITE_HOSTNAME', 'HOSTNAME') ?? 'unknown').replace(/[^A-Za-z0-9._:[\]-]+/g, '_');
41
+ const environment = options.environment ?? firstEnv(env, 'NODE_ENV') ?? 'unknown';
42
+ const now = options.now ?? Date.now;
43
+ const log = options.log ?? defaultLog;
44
+ const lastWarned = new Map();
45
+ const warn = (key, message, detail) => {
46
+ const nowMs = now();
47
+ const last = lastWarned.get(key);
48
+ if (last !== undefined && nowMs - last < DIAGNOSTIC_INTERVAL_MS)
49
+ return;
50
+ lastWarned.set(key, nowMs);
51
+ log(`[unity-mesh] ${message}`, detail);
52
+ };
53
+ const entries = toResolvedMeshes(validateMeshConfig(options.meshes))
54
+ .filter((mesh) => mesh.environments === undefined || mesh.environments.includes(environment))
55
+ .map((mesh) => ({ mesh, reporters: [], armed: false, timer: undefined, inFlight: undefined, controller: undefined }));
56
+ const engine = {
57
+ observer,
58
+ environment,
59
+ userAgent: `${PACKAGE_NAME}/${PACKAGE_VERSION} (${observer})`,
60
+ now,
61
+ fetchImpl: options.fetch ?? globalThis.fetch,
62
+ env,
63
+ writeLine: options.writeLine ?? defaultWriteLine,
64
+ entries,
65
+ warn,
66
+ };
67
+ const context = {
68
+ observer,
69
+ environment,
70
+ env,
71
+ fetchImpl: engine.fetchImpl,
72
+ now,
73
+ writeLine: engine.writeLine,
74
+ warn,
75
+ };
76
+ for (const entry of entries) {
77
+ const meshContext = { ...context, mesh: entry.mesh };
78
+ entry.reporters.push(...entry.mesh.reports.map((target) => createReporter(meshContext, target)));
79
+ }
80
+ return engine;
81
+ }
82
+ function toReport(engine, mesh, host, outcome, slotMs, finishedAtMs) {
83
+ return {
84
+ v: 1,
85
+ check_id: computeCheckId(mesh.namespace, {
86
+ minute: slotMs,
87
+ server: host.server,
88
+ path: host.path,
89
+ result: outcome.result,
90
+ }),
91
+ mesh: mesh.id,
92
+ observer: engine.observer,
93
+ server: host.server,
94
+ scheme: host.scheme,
95
+ port: host.port ?? (host.scheme === 'https' ? 443 : 80),
96
+ path: host.path,
97
+ result: outcome.result,
98
+ healthy: outcome.healthy,
99
+ status: outcome.status,
100
+ latency_ms: outcome.latencyMs,
101
+ at: new Date(finishedAtMs).toISOString(),
102
+ minute: new Date(slotMs).toISOString(),
103
+ };
104
+ }
105
+ /**
106
+ * Probes every host of one mesh once and hands the reports to its reporters.
107
+ * A reporter failure is logged; a cancelled round reports nothing.
108
+ *
109
+ * @param engine - Process engine
110
+ * @param entry - Mesh to run
111
+ * @returns This round's reports; rejects only on a defect in this package
112
+ */
113
+ function runRound(engine, entry) {
114
+ const slotMs = floorToMinute(engine.now());
115
+ const controller = new AbortController();
116
+ entry.controller = controller;
117
+ const round = (async () => {
118
+ const probed = await Promise.all(entry.mesh.hosts.map(async (host) => {
119
+ const outcome = await probe(host, {
120
+ fetchImpl: engine.fetchImpl,
121
+ signal: controller.signal,
122
+ userAgent: engine.userAgent,
123
+ });
124
+ return controller.signal.aborted ? undefined : toReport(engine, entry.mesh, host, outcome, slotMs, engine.now());
125
+ }));
126
+ if (controller.signal.aborted)
127
+ return [];
128
+ const reports = probed.filter(isDefined);
129
+ for (const reporter of entry.reporters) {
130
+ try {
131
+ await reporter.report(reports);
132
+ }
133
+ catch (error) {
134
+ engine.warn(`${entry.mesh.id}:${reporter.name}`, `${reporter.name} reporter failed`, {
135
+ mesh: entry.mesh.id,
136
+ error: error instanceof Error ? error.message : String(error),
137
+ });
138
+ }
139
+ }
140
+ return reports;
141
+ })();
142
+ const tracked = round.finally(() => {
143
+ if (entry.controller === controller) {
144
+ entry.controller = undefined;
145
+ entry.inFlight = undefined;
146
+ }
147
+ });
148
+ entry.inFlight = tracked.then(() => undefined, () => undefined);
149
+ return tracked;
150
+ }
151
+ /** Schedules rounds on the mesh's interval until the entry is disarmed. */
152
+ function arm(engine, entry) {
153
+ if (entry.armed)
154
+ return;
155
+ entry.armed = true;
156
+ const schedule = () => {
157
+ if (!entry.armed)
158
+ return;
159
+ entry.timer = setTimeout(fire, nextTickDelay(entry.mesh.intervalMs, engine.now()));
160
+ };
161
+ const fire = () => {
162
+ entry.timer = undefined;
163
+ if (!entry.armed)
164
+ return;
165
+ if (entry.inFlight) {
166
+ schedule();
167
+ return;
168
+ }
169
+ void runRound(engine, entry)
170
+ .catch((error) => {
171
+ engine.warn(`${entry.mesh.id}:round`, 'probe round crashed', {
172
+ error: error instanceof Error ? error.message : String(error),
173
+ });
174
+ })
175
+ .finally(schedule);
176
+ };
177
+ schedule();
178
+ }
179
+ function disarm(entry) {
180
+ entry.armed = false;
181
+ if (entry.timer !== undefined) {
182
+ clearTimeout(entry.timer);
183
+ entry.timer = undefined;
184
+ }
185
+ entry.controller?.abort();
186
+ }
187
+ async function runAll(engine) {
188
+ const rounds = await Promise.all(engine.entries.map((entry) => runRound(engine, entry)));
189
+ return rounds.flat();
190
+ }
191
+ /**
192
+ * Starts probing: every mesh that applies to this environment runs on its own
193
+ * interval until `stop()` is called. Timers are ordinary ones, so they keep a
194
+ * bare script alive.
195
+ *
196
+ * @param options - Mesh list plus optional overrides. `meshes` may be the raw
197
+ * `unity-mesh` value or the output of `parseMeshConfig`
198
+ * @returns The running meshes
199
+ * @throws MeshConfigError when the mesh list is not usable
200
+ */
201
+ export function startMeshProbes(options) {
202
+ const engine = createEngine(options);
203
+ for (const entry of engine.entries)
204
+ arm(engine, entry);
205
+ return {
206
+ get meshes() {
207
+ return engine.entries.map((entry) => entry.mesh.id);
208
+ },
209
+ run: () => runAll(engine),
210
+ stop: async () => {
211
+ for (const entry of engine.entries)
212
+ disarm(entry);
213
+ await Promise.all(engine.entries.map((entry) => entry.inFlight));
214
+ },
215
+ };
216
+ }
217
+ /**
218
+ * Runs one round on every mesh that applies to this environment, with no
219
+ * timers. Bugsnag's transition memory lives in the process, so a one-shot
220
+ * round reports every failure it sees as a new one.
221
+ *
222
+ * @param options - Mesh list plus optional overrides. `meshes` may be the raw
223
+ * `unity-mesh` value or the output of `parseMeshConfig`
224
+ * @returns This round's reports
225
+ * @throws MeshConfigError when the mesh list is not usable
226
+ */
227
+ export async function runProbeRound(options) {
228
+ return runAll(createEngine(options));
229
+ }
230
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAwC,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAuC,MAAM,gBAAgB,CAA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FSET_MS = 5000;
3
+ /**
4
+ * Milliseconds until the next round. Rounds land on interval boundaries plus a
5
+ * fixed offset, so every server on a synced clock probes in the same second and
6
+ * their observations fall in one dedup minute.
7
+ *
8
+ * The result is always in `(0, intervalMs]`. A round that finishes in the same
9
+ * millisecond it fired must wait a whole interval, never refire at once.
10
+ *
11
+ * @param intervalMs - Milliseconds between rounds
12
+ * @param nowMs - Current time, milliseconds since the epoch
13
+ * @returns Delay to pass to `setTimeout`
14
+ */
15
+ export declare function nextTickDelay(intervalMs: number, nowMs: number): number;
@@ -0,0 +1,20 @@
1
+ /** Seconds after each interval boundary that a round fires. */
2
+ export const TICK_OFFSET_MS = 5_000;
3
+ /**
4
+ * Milliseconds until the next round. Rounds land on interval boundaries plus a
5
+ * fixed offset, so every server on a synced clock probes in the same second and
6
+ * their observations fall in one dedup minute.
7
+ *
8
+ * The result is always in `(0, intervalMs]`. A round that finishes in the same
9
+ * millisecond it fired must wait a whole interval, never refire at once.
10
+ *
11
+ * @param intervalMs - Milliseconds between rounds
12
+ * @param nowMs - Current time, milliseconds since the epoch
13
+ * @returns Delay to pass to `setTimeout`
14
+ */
15
+ export function nextTickDelay(intervalMs, nowMs) {
16
+ const offset = TICK_OFFSET_MS % intervalMs;
17
+ const next = (Math.floor((nowMs - offset) / intervalMs) + 1) * intervalMs + offset;
18
+ return next - nowMs;
19
+ }
20
+ //# sourceMappingURL=schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../src/schedule.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB,EAAE,KAAa;IAC7D,MAAM,MAAM,GAAG,cAAc,GAAG,UAAU,CAAC;IAC3C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,MAAM,CAAC;IACnF,OAAO,IAAI,GAAG,KAAK,CAAC;AACtB,CAAC"}
@@ -0,0 +1,101 @@
1
+ /** Report payload formats the reporters accept. */
2
+ export type PayloadFormat = 'victorialogs/stdout' | 'victorialogs' | 'bugsnag' | 'opentelemetry';
3
+ /** One host a mesh probes. */
4
+ export interface HostTarget {
5
+ /** Bare hostname, lowercased. No scheme, port or path. */
6
+ server: string;
7
+ /** Request path. Defaults to `/`. */
8
+ path?: string;
9
+ /** Defaults to `https`. */
10
+ scheme?: 'https' | 'http';
11
+ /** Defaults to the scheme's standard port. */
12
+ port?: number;
13
+ /** Status code, or codes, that count as healthy. Defaults to 200. */
14
+ expect?: number | number[];
15
+ /** Give-up time for one probe. Defaults to 5000. */
16
+ 'timeout-ms'?: number;
17
+ }
18
+ /** Where a mesh's reports go. */
19
+ export interface ReportTarget {
20
+ /**
21
+ * Destination. `stdout` (or omitted) for `victorialogs/stdout`; the ingest
22
+ * base URL for `victorialogs`; the notify endpoint for `bugsnag` (defaults to
23
+ * `https://notify.bugsnag.com`). Must be omitted for `opentelemetry`, which
24
+ * goes through the process's own OpenTelemetry providers.
25
+ */
26
+ 'target-url'?: string;
27
+ 'payload-format': PayloadFormat;
28
+ /** Give-up time for one report request. Defaults to 10000. */
29
+ 'timeout-ms'?: number;
30
+ /** `bugsnag` only: environment variable holding the notifier API key. Defaults to `BUGSNAG_API_KEY`. */
31
+ 'api-key-env'?: string;
32
+ /** `victorialogs` only: environment variable holding the basic-auth username. Defaults to `VICTORIA_LOGS_USERNAME`. */
33
+ 'username-env'?: string;
34
+ /** `victorialogs` only: environment variable holding the basic-auth password. Defaults to `VICTORIA_LOGS_PASSWORD`. */
35
+ 'password-env'?: string;
36
+ }
37
+ /** One mesh as written under the `unity-mesh` key. */
38
+ export interface MeshConfig {
39
+ /** Stable id, lowercased letters, digits, dot, underscore and hyphen. */
40
+ 'mesh-id': string;
41
+ /** UUID all servers of the mesh hash ids in. Defaults to uuid5 of the mesh id. */
42
+ namespace?: string;
43
+ /** `NODE_ENV` values this mesh runs in. Defaults to every environment. */
44
+ environments?: string[];
45
+ /** Minutes between rounds, as a multiple of 60. Defaults to 60. */
46
+ 'interval-seconds'?: number;
47
+ hosts: HostTarget[];
48
+ report: ReportTarget | ReportTarget[];
49
+ }
50
+ /** One observation of one target by one server. Reporters serialise it as-is. */
51
+ export interface ProbeReport {
52
+ /** Record schema version. */
53
+ v: 1;
54
+ /** Mesh-wide dedup id: uuid5 of "<minute>|<server>|<path>|<result>". */
55
+ check_id: string;
56
+ mesh: string;
57
+ /** The probing server. Not part of `check_id`. */
58
+ observer: string;
59
+ server: string;
60
+ scheme: 'https' | 'http';
61
+ port: number;
62
+ path: string;
63
+ /** HTTP status as text ("200"), or a failure class: TIMEOUT, DNS, REFUSED, TLS, RESET, NETWORK. */
64
+ result: string;
65
+ healthy: boolean;
66
+ /** HTTP status, or null when no response arrived. */
67
+ status: number | null;
68
+ latency_ms: number;
69
+ /** When the response arrived or the attempt gave up. */
70
+ at: string;
71
+ /** Start of the minute `check_id` was derived from. */
72
+ minute: string;
73
+ }
74
+ /** What `startMeshProbes` needs beyond the mesh list. Every field is optional. */
75
+ export interface MeshProbesOptions {
76
+ /** Value of the `unity-mesh` key: an array of meshes. Validated eagerly. */
77
+ meshes: unknown;
78
+ /** Name of this probing server. Defaults to `WEBSITE_HOSTNAME`, then `HOSTNAME`, then `unknown`. */
79
+ observer?: string;
80
+ /** Value `environments` is matched against. Defaults to `NODE_ENV`, then `unknown`. */
81
+ environment?: string;
82
+ /** Clock, milliseconds since the epoch. */
83
+ now?: () => number;
84
+ /** HTTP client used for probes and HTTP reporters. */
85
+ fetch?: typeof globalThis.fetch;
86
+ /** Where reporters read credentials. Defaults to `process.env`. */
87
+ env?: Record<string, string | undefined>;
88
+ /** Receives one JSON line per report from `victorialogs/stdout` reporters. */
89
+ writeLine?: (line: string, report: ProbeReport) => void;
90
+ /** Receives reporter problems. Default: `console.warn`. */
91
+ log?: (message: string, detail?: Record<string, unknown>) => void;
92
+ }
93
+ /** A running set of meshes. */
94
+ export interface MeshProbesHandle {
95
+ /** Ids of the meshes this server probes, after the `environments` gate. */
96
+ readonly meshes: readonly string[];
97
+ /** Runs one round now, on every mesh, and returns its reports. */
98
+ run(): Promise<ProbeReport[]>;
99
+ /** Cancels future rounds and waits for the round in flight to finish reporting. */
100
+ stop(): Promise<void>;
101
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /** True when `value` is a UUID in the 8-4-4-4-12 text form. */
2
+ export declare function isUuid(value: string): boolean;
3
+ /**
4
+ * RFC 4122 version 5 (name-based, SHA-1) UUID, identical to `uuid.v5` from the
5
+ * `uuid` package. Implemented here so the package has no runtime dependency and
6
+ * so the id recipe is small enough to port to a non-Node server.
7
+ *
8
+ * @param namespace - UUID naming the id space
9
+ * @param name - UTF-8 name to hash inside that space
10
+ * @returns Lowercase UUID v5 of `name` in `namespace`
11
+ */
12
+ export declare function uuid5(namespace: string, name: string): string;
@@ -0,0 +1,42 @@
1
+ import { createHash } from 'node:crypto';
2
+ const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3
+ /** True when `value` is a UUID in the 8-4-4-4-12 text form. */
4
+ export function isUuid(value) {
5
+ return UUID_PATTERN.test(value);
6
+ }
7
+ /** Parses a UUID's 16 bytes from its text form. */
8
+ function uuidToBytes(uuid) {
9
+ const hex = uuid.replace(/-/g, '').toLowerCase();
10
+ const bytes = new Uint8Array(16);
11
+ for (let index = 0; index < bytes.length; index += 1) {
12
+ bytes[index] = Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16);
13
+ }
14
+ return bytes;
15
+ }
16
+ /** Formats 16 bytes as the lowercase 8-4-4-4-12 text form. */
17
+ function bytesToUuid(bytes) {
18
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
19
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
20
+ }
21
+ /**
22
+ * RFC 4122 version 5 (name-based, SHA-1) UUID, identical to `uuid.v5` from the
23
+ * `uuid` package. Implemented here so the package has no runtime dependency and
24
+ * so the id recipe is small enough to port to a non-Node server.
25
+ *
26
+ * @param namespace - UUID naming the id space
27
+ * @param name - UTF-8 name to hash inside that space
28
+ * @returns Lowercase UUID v5 of `name` in `namespace`
29
+ */
30
+ export function uuid5(namespace, name) {
31
+ if (!isUuid(namespace)) {
32
+ throw new TypeError(`uuid5: namespace must be a UUID, got "${namespace}"`);
33
+ }
34
+ const digest = createHash('sha1').update(uuidToBytes(namespace)).update(name, 'utf8').digest();
35
+ const bytes = new Uint8Array(digest.subarray(0, 16));
36
+ const versionByte = bytes[6] ?? 0;
37
+ const variantByte = bytes[8] ?? 0;
38
+ bytes[6] = (versionByte & 0x0f) | 0x50; // version 5
39
+ bytes[8] = (variantByte & 0x3f) | 0x80; // RFC 4122 variant
40
+ return bytesToUuid(bytes);
41
+ }
42
+ //# sourceMappingURL=uuid5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid5.js","sourceRoot":"","sources":["../../src/uuid5.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,YAAY,GAAG,iEAAiE,CAAC;AAEvF,+DAA+D;AAC/D,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,mDAAmD;AACnD,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,GAAG,GAAG,IAAI,CA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AC,MAAM,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/F,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,YAAY;IACpD,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,mBAAmB;IAC3D,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Package identity. `PACKAGE_VERSION` is hand-maintained; tests/version.test.ts
3
+ * fails when it drifts from package.json.
4
+ */
5
+ export declare const PACKAGE_NAME = "@glydeunity/unity-healthcheck-mesh";
6
+ export declare const PACKAGE_VERSION = "0.1.0";
7
+ export declare const PACKAGE_URL = "https://github.com/Glyde-Inc/unity-healthcheck-mesh";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Package identity. `PACKAGE_VERSION` is hand-maintained; tests/version.test.ts
3
+ * fails when it drifts from package.json.
4
+ */
5
+ export const PACKAGE_NAME = '@glydeunity/unity-healthcheck-mesh';
6
+ export const PACKAGE_VERSION = '0.1.0';
7
+ export const PACKAGE_URL = 'https://github.com/Glyde-Inc/unity-healthcheck-mesh';
8
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oCAAoC,CAAC;AACjE,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,qDAAqD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
2
  "name": "@glydeunity/unity-healthcheck-mesh",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "External health probes that stamp each report with a uuid5 dedup id, so independent servers form a monitoring mesh without coordinating.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20.0.0"
9
+ },
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/esm/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/esm/index.d.ts",
15
+ "import": "./dist/esm/index.js",
16
+ "require": "./dist/cjs/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "CHANGELOG.md"
23
+ ],
24
+ "sideEffects": false,
25
+ "peerDependencies": {
26
+ "@opentelemetry/api": ">=1.9.0"
27
+ },
28
+ "peerDependenciesMeta": {
29
+ "@opentelemetry/api": {
30
+ "optional": true
31
+ }
32
+ },
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "registry": "https://registry.npmjs.org/"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/Glyde-Inc/unity-healthcheck-mesh.git"
40
+ },
41
+ "scripts": {
42
+ "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
43
+ "build": "npm run clean && tsc -p tsconfig.json && node scripts/build-cjs.mjs",
44
+ "typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json",
45
+ "test": "node --import tsx --test \"tests/**/*.test.ts\"",
46
+ "pack:check": "npm pack --dry-run"
47
+ },
48
+ "devDependencies": {
49
+ "@opentelemetry/api": "^1.9.1",
50
+ "@types/node": "^25.6.0",
51
+ "tsx": "^4.23.13",
52
+ "typescript": "~6.0.3",
53
+ "uuid": "^14.0.3"
54
+ }
55
+ }