@hasna/uptime 0.1.9 → 0.1.11
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/CHANGELOG.md +34 -0
- package/SECURITY.md +4 -2
- package/dist/api.js +179 -58
- package/dist/checks.d.ts +2 -1
- package/dist/checks.d.ts.map +1 -1
- package/dist/checks.js +2 -1
- package/dist/cli/index.js +180 -59
- package/dist/cloud-plan.js +1 -1
- package/dist/imports.d.ts +6 -2
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +72 -8
- package/dist/index.js +180 -59
- package/dist/mcp/index.js +166 -47
- package/dist/service.d.ts +36 -10
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +166 -47
- package/dist/store.d.ts +13 -3
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +140 -26
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/aws-deployment-runbook.md +327 -14
- package/infra/aws/outputs.tf +35 -0
- package/infra/aws/terraform.tfvars.example +1 -1
- package/infra/aws/variables.tf +1 -1
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -14575,13 +14575,74 @@ function isDeniedIpv4(ip) {
|
|
|
14575
14575
|
}
|
|
14576
14576
|
function isDeniedIpv6(ip) {
|
|
14577
14577
|
const normalized = ip.toLowerCase();
|
|
14578
|
-
|
|
14578
|
+
const mappedIpv4 = ipv4FromMappedIpv6(normalized);
|
|
14579
|
+
if (mappedIpv4)
|
|
14580
|
+
return isDeniedIpv4(mappedIpv4);
|
|
14581
|
+
const words = parseIpv6Words(normalized);
|
|
14582
|
+
return normalized === "::" || normalized === "::1" || words !== null && (words[0] & 65472) === 65152 || normalized.startsWith("fc") || normalized.startsWith("fd") || normalized.startsWith("ff");
|
|
14583
|
+
}
|
|
14584
|
+
function ipv4FromMappedIpv6(ip) {
|
|
14585
|
+
const words = parseIpv6Words(ip);
|
|
14586
|
+
if (!words)
|
|
14587
|
+
return null;
|
|
14588
|
+
if (words[0] !== 0 || words[1] !== 0 || words[2] !== 0 || words[3] !== 0 || words[4] !== 0 || words[5] !== 65535) {
|
|
14589
|
+
return null;
|
|
14590
|
+
}
|
|
14591
|
+
return [
|
|
14592
|
+
words[6] >> 8,
|
|
14593
|
+
words[6] & 255,
|
|
14594
|
+
words[7] >> 8,
|
|
14595
|
+
words[7] & 255
|
|
14596
|
+
].join(".");
|
|
14597
|
+
}
|
|
14598
|
+
function parseIpv6Words(value) {
|
|
14599
|
+
let ip = value.toLowerCase();
|
|
14600
|
+
const zoneIndex = ip.indexOf("%");
|
|
14601
|
+
if (zoneIndex >= 0)
|
|
14602
|
+
ip = ip.slice(0, zoneIndex);
|
|
14603
|
+
if (ip.includes(".")) {
|
|
14604
|
+
const lastColon = ip.lastIndexOf(":");
|
|
14605
|
+
if (lastColon < 0)
|
|
14606
|
+
return null;
|
|
14607
|
+
const ipv43 = parseIpv4Words(ip.slice(lastColon + 1));
|
|
14608
|
+
if (!ipv43)
|
|
14609
|
+
return null;
|
|
14610
|
+
ip = `${ip.slice(0, lastColon)}:${(ipv43[0] << 8 | ipv43[1]).toString(16)}:${(ipv43[2] << 8 | ipv43[3]).toString(16)}`;
|
|
14611
|
+
}
|
|
14612
|
+
const compressed = ip.split("::");
|
|
14613
|
+
if (compressed.length > 2)
|
|
14614
|
+
return null;
|
|
14615
|
+
const left = parseIpv6Side(compressed[0]);
|
|
14616
|
+
const right = compressed.length === 2 ? parseIpv6Side(compressed[1]) : [];
|
|
14617
|
+
if (!left || !right)
|
|
14618
|
+
return null;
|
|
14619
|
+
if (compressed.length === 1)
|
|
14620
|
+
return left.length === 8 ? left : null;
|
|
14621
|
+
const missing = 8 - left.length - right.length;
|
|
14622
|
+
if (missing < 1)
|
|
14623
|
+
return null;
|
|
14624
|
+
return [...left, ...Array(missing).fill(0), ...right];
|
|
14625
|
+
}
|
|
14626
|
+
function parseIpv6Side(value) {
|
|
14627
|
+
if (!value)
|
|
14628
|
+
return [];
|
|
14629
|
+
const words = value.split(":");
|
|
14630
|
+
if (words.some((word) => !/^[0-9a-f]{1,4}$/.test(word)))
|
|
14631
|
+
return null;
|
|
14632
|
+
return words.map((word) => Number.parseInt(word, 16));
|
|
14633
|
+
}
|
|
14634
|
+
function parseIpv4Words(value) {
|
|
14635
|
+
const words = value.split(".").map((part) => Number(part));
|
|
14636
|
+
if (words.length !== 4 || words.some((word) => !Number.isInteger(word) || word < 0 || word > 255)) {
|
|
14637
|
+
return null;
|
|
14638
|
+
}
|
|
14639
|
+
return words;
|
|
14579
14640
|
}
|
|
14580
14641
|
|
|
14581
14642
|
// src/imports.ts
|
|
14582
|
-
function previewImport(store, request) {
|
|
14643
|
+
function previewImport(store, request, options = {}) {
|
|
14583
14644
|
const source = normalizeSource(request.source);
|
|
14584
|
-
const items = dedupePreviewItems(request.records.map((record2) => previewRecord(store, source, record2, request.defaults ?? {})));
|
|
14645
|
+
const items = dedupePreviewItems(request.records.map((record2) => previewRecord(store, source, record2, request.defaults ?? {}, options)));
|
|
14585
14646
|
return {
|
|
14586
14647
|
source,
|
|
14587
14648
|
generatedAt: new Date().toISOString(),
|
|
@@ -14655,7 +14716,7 @@ function rollbackImport(store, batchId) {
|
|
|
14655
14716
|
items
|
|
14656
14717
|
};
|
|
14657
14718
|
}
|
|
14658
|
-
function previewRecord(store, source, record2, defaults) {
|
|
14719
|
+
function previewRecord(store, source, record2, defaults, options) {
|
|
14659
14720
|
const warnings = [];
|
|
14660
14721
|
let candidate;
|
|
14661
14722
|
try {
|
|
@@ -14675,13 +14736,16 @@ function previewRecord(store, source, record2, defaults) {
|
|
|
14675
14736
|
reason: error51 instanceof Error ? error51.message : String(error51)
|
|
14676
14737
|
};
|
|
14677
14738
|
}
|
|
14678
|
-
const
|
|
14679
|
-
const
|
|
14680
|
-
|
|
14739
|
+
const monitorOptions = options.workspaceId ? { workspaceId: options.workspaceId } : undefined;
|
|
14740
|
+
const rawProvenance = store.getProvenance(candidate.source, candidate.sourceId);
|
|
14741
|
+
const provenanceMonitor = rawProvenance ? store.getMonitor(rawProvenance.monitorId, monitorOptions) : null;
|
|
14742
|
+
const provenance = provenanceMonitor ? rawProvenance : null;
|
|
14743
|
+
const monitor = provenanceMonitor ?? store.getMonitor(candidate.name, monitorOptions);
|
|
14744
|
+
if (rawProvenance && !provenanceMonitor && !options.workspaceId) {
|
|
14681
14745
|
return { candidate, action: "create", monitor: null, provenance, warnings: ["source provenance points to a missing monitor"], reason: null };
|
|
14682
14746
|
}
|
|
14683
14747
|
if (provenance && monitor) {
|
|
14684
|
-
const nameOwner = store.getMonitor(candidate.name);
|
|
14748
|
+
const nameOwner = store.getMonitor(candidate.name, monitorOptions);
|
|
14685
14749
|
if (nameOwner && nameOwner.id !== monitor.id) {
|
|
14686
14750
|
return {
|
|
14687
14751
|
candidate,
|
|
@@ -15136,7 +15200,7 @@ var REQUIRED_TABLES = [
|
|
|
15136
15200
|
];
|
|
15137
15201
|
var PROBE_TABLES = new Set(["probe_identities", "probe_check_jobs", "probe_submissions"]);
|
|
15138
15202
|
var REPORT_AUDIT_TABLES = new Set(["report_schedules", "report_runs", "audit_events"]);
|
|
15139
|
-
var CURRENT_SCHEMA_VERSION = "
|
|
15203
|
+
var CURRENT_SCHEMA_VERSION = "4";
|
|
15140
15204
|
|
|
15141
15205
|
class StaleCheckResultError extends Error {
|
|
15142
15206
|
constructor(message) {
|
|
@@ -15197,7 +15261,8 @@ class UptimeStore {
|
|
|
15197
15261
|
this.db.run(`
|
|
15198
15262
|
CREATE TABLE IF NOT EXISTS monitors (
|
|
15199
15263
|
id TEXT PRIMARY KEY,
|
|
15200
|
-
|
|
15264
|
+
workspace_id TEXT NOT NULL DEFAULT 'local',
|
|
15265
|
+
name TEXT NOT NULL,
|
|
15201
15266
|
kind TEXT NOT NULL CHECK (kind IN ('http', 'tcp', 'browser_page')),
|
|
15202
15267
|
url TEXT,
|
|
15203
15268
|
host TEXT,
|
|
@@ -15212,9 +15277,11 @@ class UptimeStore {
|
|
|
15212
15277
|
last_checked_at TEXT,
|
|
15213
15278
|
revision INTEGER NOT NULL DEFAULT 1,
|
|
15214
15279
|
created_at TEXT NOT NULL,
|
|
15215
|
-
updated_at TEXT NOT NULL
|
|
15280
|
+
updated_at TEXT NOT NULL,
|
|
15281
|
+
UNIQUE (workspace_id, name)
|
|
15216
15282
|
)
|
|
15217
15283
|
`);
|
|
15284
|
+
this.ensureColumn("monitors", "workspace_id", "TEXT NOT NULL DEFAULT 'local'");
|
|
15218
15285
|
this.ensureColumn("monitors", "revision", "INTEGER NOT NULL DEFAULT 1");
|
|
15219
15286
|
this.ensureMonitorKindAllowsBrowserPage();
|
|
15220
15287
|
this.db.run(`
|
|
@@ -15364,6 +15431,7 @@ class UptimeStore {
|
|
|
15364
15431
|
`);
|
|
15365
15432
|
this.db.query("INSERT OR REPLACE INTO schema_migrations (key, value, updated_at) VALUES ('schema_version', ?, ?)").run(CURRENT_SCHEMA_VERSION, new Date().toISOString());
|
|
15366
15433
|
this.db.run("CREATE INDEX IF NOT EXISTS idx_results_monitor_time ON check_results(monitor_id, checked_at DESC)");
|
|
15434
|
+
this.db.run("CREATE INDEX IF NOT EXISTS idx_monitors_workspace_enabled_name ON monitors(workspace_id, enabled, name)");
|
|
15367
15435
|
this.db.run("CREATE INDEX IF NOT EXISTS idx_incidents_monitor_status ON incidents(monitor_id, status)");
|
|
15368
15436
|
this.db.run("CREATE INDEX IF NOT EXISTS idx_check_leases_until ON check_leases(leased_until)");
|
|
15369
15437
|
this.db.run("CREATE INDEX IF NOT EXISTS idx_monitor_provenance_monitor ON monitor_provenance(monitor_id)");
|
|
@@ -15425,8 +15493,10 @@ class UptimeStore {
|
|
|
15425
15493
|
if (this.mode === "hosted")
|
|
15426
15494
|
assertHostedTargetAllowed(normalized);
|
|
15427
15495
|
const now = new Date().toISOString();
|
|
15496
|
+
const workspaceId = normalizeWorkspaceId(options.workspaceId ?? input.workspaceId ?? "local");
|
|
15428
15497
|
const monitor = {
|
|
15429
15498
|
id: newId("mon"),
|
|
15499
|
+
workspaceId,
|
|
15430
15500
|
name: normalized.name,
|
|
15431
15501
|
kind: normalized.kind,
|
|
15432
15502
|
url: normalized.url ?? null,
|
|
@@ -15445,22 +15515,33 @@ class UptimeStore {
|
|
|
15445
15515
|
updatedAt: now
|
|
15446
15516
|
};
|
|
15447
15517
|
this.db.query(`INSERT INTO monitors (
|
|
15448
|
-
id, name, kind, url, host, port, method, expected_status,
|
|
15518
|
+
id, workspace_id, name, kind, url, host, port, method, expected_status,
|
|
15449
15519
|
interval_seconds, timeout_ms, retry_count, enabled, status,
|
|
15450
15520
|
last_checked_at, revision, created_at, updated_at
|
|
15451
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(monitor.id, monitor.name, monitor.kind, monitor.url, monitor.host, monitor.port, monitor.method, monitor.expectedStatus, monitor.intervalSeconds, monitor.timeoutMs, monitor.retryCount, monitor.enabled ? 1 : 0, monitor.status, monitor.lastCheckedAt, monitor.revision, monitor.createdAt, monitor.updatedAt);
|
|
15521
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(monitor.id, monitor.workspaceId, monitor.name, monitor.kind, monitor.url, monitor.host, monitor.port, monitor.method, monitor.expectedStatus, monitor.intervalSeconds, monitor.timeoutMs, monitor.retryCount, monitor.enabled ? 1 : 0, monitor.status, monitor.lastCheckedAt, monitor.revision, monitor.createdAt, monitor.updatedAt);
|
|
15452
15522
|
return monitor;
|
|
15453
15523
|
}
|
|
15454
15524
|
listMonitors(options = {}) {
|
|
15455
|
-
const
|
|
15525
|
+
const workspaceId = options.workspaceId ? normalizeWorkspaceId(options.workspaceId) : undefined;
|
|
15526
|
+
const clauses = [];
|
|
15527
|
+
const args = [];
|
|
15528
|
+
if (workspaceId) {
|
|
15529
|
+
clauses.push("workspace_id = ?");
|
|
15530
|
+
args.push(workspaceId);
|
|
15531
|
+
}
|
|
15532
|
+
if (!options.includeDisabled)
|
|
15533
|
+
clauses.push("enabled = 1");
|
|
15534
|
+
const where = clauses.length ? `WHERE ${clauses.join(" AND ")}` : "";
|
|
15535
|
+
const rows = this.db.query(`SELECT * FROM monitors ${where} ORDER BY name ASC`).all(...args);
|
|
15456
15536
|
return rows.map(monitorFromRow);
|
|
15457
15537
|
}
|
|
15458
|
-
getMonitor(idOrName) {
|
|
15459
|
-
const
|
|
15538
|
+
getMonitor(idOrName, options = {}) {
|
|
15539
|
+
const workspaceId = options.workspaceId ? normalizeWorkspaceId(options.workspaceId) : undefined;
|
|
15540
|
+
const row = this.db.query(`SELECT * FROM monitors WHERE (id = ? OR name = ?)${workspaceId ? " AND workspace_id = ?" : ""}`).get(...workspaceId ? [idOrName, idOrName, workspaceId] : [idOrName, idOrName]);
|
|
15460
15541
|
return row ? monitorFromRow(row) : null;
|
|
15461
15542
|
}
|
|
15462
15543
|
updateMonitor(idOrName, input, options = {}) {
|
|
15463
|
-
const current = this.getMonitor(idOrName);
|
|
15544
|
+
const current = this.getMonitor(idOrName, { workspaceId: options.workspaceId });
|
|
15464
15545
|
if (!current)
|
|
15465
15546
|
throw new Error(`Monitor not found: ${idOrName}`);
|
|
15466
15547
|
if (this.mode === "hosted") {
|
|
@@ -15484,10 +15565,10 @@ class UptimeStore {
|
|
|
15484
15565
|
if (definitionChanged(current, next)) {
|
|
15485
15566
|
this.closeOpenIncident(current.id, updatedAt);
|
|
15486
15567
|
}
|
|
15487
|
-
return this.getMonitor(current.id);
|
|
15568
|
+
return this.getMonitor(current.id, { workspaceId: options.workspaceId });
|
|
15488
15569
|
}
|
|
15489
|
-
deleteMonitor(idOrName) {
|
|
15490
|
-
const current = this.getMonitor(idOrName);
|
|
15570
|
+
deleteMonitor(idOrName, options = {}) {
|
|
15571
|
+
const current = this.getMonitor(idOrName, { workspaceId: options.workspaceId });
|
|
15491
15572
|
if (!current)
|
|
15492
15573
|
return false;
|
|
15493
15574
|
this.db.query("DELETE FROM monitors WHERE id = ?").run(current.id);
|
|
@@ -15864,7 +15945,20 @@ class UptimeStore {
|
|
|
15864
15945
|
}
|
|
15865
15946
|
listResults(options = {}) {
|
|
15866
15947
|
const limit = clampLimit(options.limit ?? 50);
|
|
15867
|
-
const
|
|
15948
|
+
const workspaceId = options.workspaceId ? normalizeWorkspaceId(options.workspaceId) : undefined;
|
|
15949
|
+
const clauses = [];
|
|
15950
|
+
const args = [];
|
|
15951
|
+
if (options.monitorId) {
|
|
15952
|
+
clauses.push("check_results.monitor_id = ?");
|
|
15953
|
+
args.push(options.monitorId);
|
|
15954
|
+
}
|
|
15955
|
+
if (workspaceId) {
|
|
15956
|
+
clauses.push("monitors.workspace_id = ?");
|
|
15957
|
+
args.push(workspaceId);
|
|
15958
|
+
}
|
|
15959
|
+
const where = clauses.length ? `WHERE ${clauses.join(" AND ")}` : "";
|
|
15960
|
+
args.push(limit);
|
|
15961
|
+
const rows = this.db.query(`SELECT check_results.* FROM check_results JOIN monitors ON monitors.id = check_results.monitor_id ${where} ORDER BY checked_at DESC LIMIT ?`).all(...args);
|
|
15868
15962
|
return rows.map(checkResultFromRow);
|
|
15869
15963
|
}
|
|
15870
15964
|
getProvenance(source, sourceId) {
|
|
@@ -15907,24 +16001,28 @@ class UptimeStore {
|
|
|
15907
16001
|
const clauses = [];
|
|
15908
16002
|
const args = [];
|
|
15909
16003
|
if (options.status) {
|
|
15910
|
-
clauses.push("status = ?");
|
|
16004
|
+
clauses.push("incidents.status = ?");
|
|
15911
16005
|
args.push(options.status);
|
|
15912
16006
|
}
|
|
15913
16007
|
if (options.monitorId) {
|
|
15914
|
-
clauses.push("monitor_id = ?");
|
|
16008
|
+
clauses.push("incidents.monitor_id = ?");
|
|
15915
16009
|
args.push(options.monitorId);
|
|
15916
16010
|
}
|
|
16011
|
+
if (options.workspaceId) {
|
|
16012
|
+
clauses.push("monitors.workspace_id = ?");
|
|
16013
|
+
args.push(normalizeWorkspaceId(options.workspaceId));
|
|
16014
|
+
}
|
|
15917
16015
|
const where = clauses.length ? `WHERE ${clauses.join(" AND ")}` : "";
|
|
15918
16016
|
args.push(clampLimit(options.limit ?? 50));
|
|
15919
|
-
const rows = this.db.query(`SELECT
|
|
16017
|
+
const rows = this.db.query(`SELECT incidents.* FROM incidents JOIN monitors ON monitors.id = incidents.monitor_id ${where} ORDER BY opened_at DESC LIMIT ?`).all(...args);
|
|
15920
16018
|
return rows.map(incidentFromRow);
|
|
15921
16019
|
}
|
|
15922
16020
|
getOpenIncident(monitorId) {
|
|
15923
16021
|
const row = this.db.query("SELECT * FROM incidents WHERE monitor_id = ? AND status = 'open' ORDER BY opened_at DESC LIMIT 1").get(monitorId);
|
|
15924
16022
|
return row ? incidentFromRow(row) : null;
|
|
15925
16023
|
}
|
|
15926
|
-
summary() {
|
|
15927
|
-
const monitors = this.listMonitors({ includeDisabled: true });
|
|
16024
|
+
summary(options = {}) {
|
|
16025
|
+
const monitors = this.listMonitors({ includeDisabled: true, workspaceId: options.workspaceId });
|
|
15928
16026
|
const summaries = monitors.map((monitor) => this.monitorSummary(monitor));
|
|
15929
16027
|
return {
|
|
15930
16028
|
generatedAt: new Date().toISOString(),
|
|
@@ -15936,11 +16034,15 @@ class UptimeStore {
|
|
|
15936
16034
|
down: monitors.filter((m) => m.status === "down").length,
|
|
15937
16035
|
paused: monitors.filter((m) => !m.enabled || m.status === "paused").length,
|
|
15938
16036
|
unknown: monitors.filter((m) => m.status === "unknown").length,
|
|
15939
|
-
openIncidents: this.countOpenIncidents()
|
|
16037
|
+
openIncidents: this.countOpenIncidents(options.workspaceId)
|
|
15940
16038
|
}
|
|
15941
16039
|
};
|
|
15942
16040
|
}
|
|
15943
|
-
countOpenIncidents() {
|
|
16041
|
+
countOpenIncidents(workspaceId) {
|
|
16042
|
+
if (workspaceId) {
|
|
16043
|
+
const row2 = this.db.query("SELECT COUNT(*) AS count FROM incidents JOIN monitors ON monitors.id = incidents.monitor_id WHERE incidents.status = 'open' AND monitors.workspace_id = ?").get(normalizeWorkspaceId(workspaceId));
|
|
16044
|
+
return Number(row2?.count ?? 0);
|
|
16045
|
+
}
|
|
15944
16046
|
const row = this.db.query("SELECT COUNT(*) AS count FROM incidents WHERE status = 'open'").get();
|
|
15945
16047
|
return Number(row?.count ?? 0);
|
|
15946
16048
|
}
|
|
@@ -16004,7 +16106,9 @@ class UptimeStore {
|
|
|
16004
16106
|
}
|
|
16005
16107
|
ensureMonitorKindAllowsBrowserPage() {
|
|
16006
16108
|
const row = this.db.query("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'monitors'").get();
|
|
16007
|
-
|
|
16109
|
+
const needsBrowserPage = !row?.sql?.includes("browser_page");
|
|
16110
|
+
const needsWorkspaceUnique = Boolean(row?.sql?.includes("name TEXT NOT NULL UNIQUE"));
|
|
16111
|
+
if (!row?.sql || !needsBrowserPage && !needsWorkspaceUnique)
|
|
16008
16112
|
return;
|
|
16009
16113
|
this.db.run("PRAGMA foreign_keys = OFF");
|
|
16010
16114
|
this.db.run("PRAGMA legacy_alter_table = ON");
|
|
@@ -16014,7 +16118,8 @@ class UptimeStore {
|
|
|
16014
16118
|
this.db.run(`
|
|
16015
16119
|
CREATE TABLE monitors (
|
|
16016
16120
|
id TEXT PRIMARY KEY,
|
|
16017
|
-
|
|
16121
|
+
workspace_id TEXT NOT NULL DEFAULT 'local',
|
|
16122
|
+
name TEXT NOT NULL,
|
|
16018
16123
|
kind TEXT NOT NULL CHECK (kind IN ('http', 'tcp', 'browser_page')),
|
|
16019
16124
|
url TEXT,
|
|
16020
16125
|
host TEXT,
|
|
@@ -16029,17 +16134,18 @@ class UptimeStore {
|
|
|
16029
16134
|
last_checked_at TEXT,
|
|
16030
16135
|
revision INTEGER NOT NULL DEFAULT 1,
|
|
16031
16136
|
created_at TEXT NOT NULL,
|
|
16032
|
-
updated_at TEXT NOT NULL
|
|
16137
|
+
updated_at TEXT NOT NULL,
|
|
16138
|
+
UNIQUE (workspace_id, name)
|
|
16033
16139
|
)
|
|
16034
16140
|
`);
|
|
16035
16141
|
this.db.run(`
|
|
16036
16142
|
INSERT INTO monitors (
|
|
16037
|
-
id, name, kind, url, host, port, method, expected_status,
|
|
16143
|
+
id, workspace_id, name, kind, url, host, port, method, expected_status,
|
|
16038
16144
|
interval_seconds, timeout_ms, retry_count, enabled, status,
|
|
16039
16145
|
last_checked_at, revision, created_at, updated_at
|
|
16040
16146
|
)
|
|
16041
16147
|
SELECT
|
|
16042
|
-
id, name, kind, url, host, port, method, expected_status,
|
|
16148
|
+
id, workspace_id, name, kind, url, host, port, method, expected_status,
|
|
16043
16149
|
interval_seconds, timeout_ms, retry_count, enabled, status,
|
|
16044
16150
|
last_checked_at, revision, created_at, updated_at
|
|
16045
16151
|
FROM monitors_old_kind
|
|
@@ -16239,6 +16345,16 @@ function rejectControlCharacters2(value, label) {
|
|
|
16239
16345
|
throw new Error(`${label} must not contain control characters`);
|
|
16240
16346
|
}
|
|
16241
16347
|
}
|
|
16348
|
+
function normalizeWorkspaceId(value) {
|
|
16349
|
+
const normalized = value.trim();
|
|
16350
|
+
if (!normalized)
|
|
16351
|
+
throw new Error("Workspace id is required");
|
|
16352
|
+
rejectControlCharacters2(normalized, "Workspace id");
|
|
16353
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/.test(normalized)) {
|
|
16354
|
+
throw new Error("Workspace id contains unsupported characters");
|
|
16355
|
+
}
|
|
16356
|
+
return normalized;
|
|
16357
|
+
}
|
|
16242
16358
|
function normalizeScheduleSlot(value) {
|
|
16243
16359
|
const slot = value.trim();
|
|
16244
16360
|
if (!slot)
|
|
@@ -16425,6 +16541,7 @@ function assertIsoTimestamp(value, label) {
|
|
|
16425
16541
|
function monitorFromRow(row) {
|
|
16426
16542
|
return {
|
|
16427
16543
|
id: row.id,
|
|
16544
|
+
workspaceId: row.workspace_id ?? "local",
|
|
16428
16545
|
name: row.name,
|
|
16429
16546
|
kind: row.kind,
|
|
16430
16547
|
url: row.url,
|
|
@@ -16905,20 +17022,20 @@ class UptimeService {
|
|
|
16905
17022
|
close() {
|
|
16906
17023
|
this.store.close();
|
|
16907
17024
|
}
|
|
16908
|
-
createMonitor(input) {
|
|
16909
|
-
return this.store.createMonitor(input);
|
|
17025
|
+
createMonitor(input, options = {}) {
|
|
17026
|
+
return this.store.createMonitor(input, options);
|
|
16910
17027
|
}
|
|
16911
|
-
updateMonitor(idOrName, input) {
|
|
16912
|
-
return this.store.updateMonitor(idOrName, input);
|
|
17028
|
+
updateMonitor(idOrName, input, options = {}) {
|
|
17029
|
+
return this.store.updateMonitor(idOrName, input, options);
|
|
16913
17030
|
}
|
|
16914
|
-
deleteMonitor(idOrName) {
|
|
16915
|
-
return this.store.deleteMonitor(idOrName);
|
|
17031
|
+
deleteMonitor(idOrName, options = {}) {
|
|
17032
|
+
return this.store.deleteMonitor(idOrName, options);
|
|
16916
17033
|
}
|
|
16917
17034
|
listMonitors(options = {}) {
|
|
16918
17035
|
return this.store.listMonitors(options);
|
|
16919
17036
|
}
|
|
16920
|
-
getMonitor(idOrName) {
|
|
16921
|
-
return this.store.getMonitor(idOrName);
|
|
17037
|
+
getMonitor(idOrName, options = {}) {
|
|
17038
|
+
return this.store.getMonitor(idOrName, options);
|
|
16922
17039
|
}
|
|
16923
17040
|
listResults(options = {}) {
|
|
16924
17041
|
return this.store.listResults(options);
|
|
@@ -16926,8 +17043,8 @@ class UptimeService {
|
|
|
16926
17043
|
listIncidents(options = {}) {
|
|
16927
17044
|
return this.store.listIncidents(options);
|
|
16928
17045
|
}
|
|
16929
|
-
summary() {
|
|
16930
|
-
return this.store.summary();
|
|
17046
|
+
summary(options = {}) {
|
|
17047
|
+
return this.store.summary(options);
|
|
16931
17048
|
}
|
|
16932
17049
|
createProbe(input) {
|
|
16933
17050
|
const store = this.probeStore();
|
|
@@ -16967,8 +17084,8 @@ class UptimeService {
|
|
|
16967
17084
|
const execute = () => this.submitProbeResultInTransaction(input);
|
|
16968
17085
|
return this.store.runInTransaction ? this.store.runInTransaction(execute) : execute();
|
|
16969
17086
|
}
|
|
16970
|
-
previewImport(request) {
|
|
16971
|
-
return previewImport(this.store, request);
|
|
17087
|
+
previewImport(request, options = {}) {
|
|
17088
|
+
return previewImport(this.store, request, options);
|
|
16972
17089
|
}
|
|
16973
17090
|
applyImport(request) {
|
|
16974
17091
|
return applyImport(this.store, request);
|
|
@@ -16983,7 +17100,8 @@ class UptimeService {
|
|
|
16983
17100
|
return this.store.verifyBackup(backupPath);
|
|
16984
17101
|
}
|
|
16985
17102
|
buildReport(options = {}) {
|
|
16986
|
-
|
|
17103
|
+
const { workspaceId, ...reportOptions } = options;
|
|
17104
|
+
return buildUptimeReport(this.summary({ workspaceId }), reportOptions);
|
|
16987
17105
|
}
|
|
16988
17106
|
async sendReport(options = {}) {
|
|
16989
17107
|
if (this.store.mode === "hosted" && (options.email || options.sms || options.logs)) {
|
|
@@ -17307,6 +17425,7 @@ class UptimeService {
|
|
|
17307
17425
|
throw new Error("Probe job fencing token is invalid");
|
|
17308
17426
|
if (!job.leaseExpiresAt || job.leaseExpiresAt <= new Date().toISOString())
|
|
17309
17427
|
throw new Error("Probe job lease expired");
|
|
17428
|
+
const evidence = input.evidence ? normalizeBrowserEvidence(monitor.url ?? monitor.host ?? "https://example.invalid", input.evidence) : null;
|
|
17310
17429
|
const result = this.store.recordCheckResult({
|
|
17311
17430
|
monitorId: monitor.id,
|
|
17312
17431
|
checkedAt: input.checkedAt,
|
|
@@ -17314,7 +17433,7 @@ class UptimeService {
|
|
|
17314
17433
|
latencyMs: input.latencyMs,
|
|
17315
17434
|
statusCode: input.statusCode ?? null,
|
|
17316
17435
|
error: input.error ?? null,
|
|
17317
|
-
evidence
|
|
17436
|
+
evidence,
|
|
17318
17437
|
attemptCount: input.attemptCount ?? 1,
|
|
17319
17438
|
expectedMonitorRevision: input.monitorRevision
|
|
17320
17439
|
});
|
package/dist/service.d.ts
CHANGED
|
@@ -13,23 +13,33 @@ export interface UptimeStoreLike {
|
|
|
13
13
|
close(): void;
|
|
14
14
|
createMonitor(input: ImportedMonitorInput, options?: {
|
|
15
15
|
allowBrowserPage?: boolean;
|
|
16
|
+
workspaceId?: string;
|
|
16
17
|
}): Monitor;
|
|
17
18
|
updateMonitor(idOrName: string, input: ImportedUpdateMonitorInput, options?: {
|
|
18
19
|
allowBrowserPage?: boolean;
|
|
20
|
+
workspaceId?: string;
|
|
19
21
|
}): Monitor;
|
|
20
|
-
deleteMonitor(idOrName: string
|
|
22
|
+
deleteMonitor(idOrName: string, options?: {
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
}): boolean;
|
|
21
25
|
listMonitors(options?: {
|
|
22
26
|
includeDisabled?: boolean;
|
|
27
|
+
workspaceId?: string;
|
|
23
28
|
}): Monitor[];
|
|
24
|
-
getMonitor(idOrName: string
|
|
29
|
+
getMonitor(idOrName: string, options?: {
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
}): Monitor | null;
|
|
25
32
|
getCheckResult?(id: string): CheckResult | null;
|
|
26
33
|
listResults(options?: ListResultsOptions): CheckResult[];
|
|
27
34
|
listIncidents(options?: {
|
|
28
35
|
status?: "open" | "closed";
|
|
29
36
|
monitorId?: string;
|
|
37
|
+
workspaceId?: string;
|
|
30
38
|
limit?: number;
|
|
31
39
|
}): Incident[];
|
|
32
|
-
summary(
|
|
40
|
+
summary(options?: {
|
|
41
|
+
workspaceId?: string;
|
|
42
|
+
}): UptimeSummary;
|
|
33
43
|
backup(destinationPath?: string): UptimeBackup;
|
|
34
44
|
verifyBackup(backupPath: string): UptimeBackupCheck;
|
|
35
45
|
acquireCheckLease(monitorId: string, owner: string, ttlMs: number): boolean;
|
|
@@ -110,20 +120,32 @@ export declare class UptimeService {
|
|
|
110
120
|
private readonly inFlightReportSchedules;
|
|
111
121
|
constructor(options?: UptimeServiceOptions);
|
|
112
122
|
close(): void;
|
|
113
|
-
createMonitor(input: CreateMonitorInput
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
createMonitor(input: CreateMonitorInput, options?: {
|
|
124
|
+
workspaceId?: string;
|
|
125
|
+
}): Monitor;
|
|
126
|
+
updateMonitor(idOrName: string, input: UpdateMonitorInput, options?: {
|
|
127
|
+
workspaceId?: string;
|
|
128
|
+
}): Monitor;
|
|
129
|
+
deleteMonitor(idOrName: string, options?: {
|
|
130
|
+
workspaceId?: string;
|
|
131
|
+
}): boolean;
|
|
116
132
|
listMonitors(options?: {
|
|
117
133
|
includeDisabled?: boolean;
|
|
134
|
+
workspaceId?: string;
|
|
118
135
|
}): Monitor[];
|
|
119
|
-
getMonitor(idOrName: string
|
|
136
|
+
getMonitor(idOrName: string, options?: {
|
|
137
|
+
workspaceId?: string;
|
|
138
|
+
}): Monitor | null;
|
|
120
139
|
listResults(options?: ListResultsOptions): CheckResult[];
|
|
121
140
|
listIncidents(options?: {
|
|
122
141
|
status?: "open" | "closed";
|
|
123
142
|
monitorId?: string;
|
|
143
|
+
workspaceId?: string;
|
|
124
144
|
limit?: number;
|
|
125
145
|
}): Incident[];
|
|
126
|
-
summary(
|
|
146
|
+
summary(options?: {
|
|
147
|
+
workspaceId?: string;
|
|
148
|
+
}): UptimeSummary;
|
|
127
149
|
createProbe(input: CreateProbeInput): CreateProbeResult;
|
|
128
150
|
listProbes(options?: {
|
|
129
151
|
includeDisabled?: boolean;
|
|
@@ -148,12 +170,16 @@ export declare class UptimeService {
|
|
|
148
170
|
result: CheckResult;
|
|
149
171
|
receipt: ProbeSubmissionReceipt;
|
|
150
172
|
};
|
|
151
|
-
previewImport(request: ImportRequest
|
|
173
|
+
previewImport(request: ImportRequest, options?: {
|
|
174
|
+
workspaceId?: string;
|
|
175
|
+
}): ImportPreview;
|
|
152
176
|
applyImport(request: ImportRequest): ImportApplyResult;
|
|
153
177
|
rollbackImport(batchId: string): ImportRollbackResult;
|
|
154
178
|
backup(destinationPath?: string): UptimeBackup;
|
|
155
179
|
verifyBackup(backupPath: string): UptimeBackupCheck;
|
|
156
|
-
buildReport(options?: BuildUptimeReportOptions
|
|
180
|
+
buildReport(options?: BuildUptimeReportOptions & {
|
|
181
|
+
workspaceId?: string;
|
|
182
|
+
}): UptimeReport;
|
|
157
183
|
sendReport(options?: SendUptimeReportOptions): Promise<UptimeReportDelivery[]>;
|
|
158
184
|
createReportSchedule(input: CreateReportScheduleInput): ReportSchedule;
|
|
159
185
|
listReportSchedules(options?: {
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8C,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAErK,OAAO,EAAsC,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,KAAK,4BAA4B,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClP,OAAO,EAAuC,KAAK,wBAAwB,EAAE,KAAK,uBAAuB,EAAE,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC7K,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,aAAa,EACd,MAAM,YAAY,CAAC;AAKpB,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,WAAW,CAAC,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