@a-company/sentinel 3.6.0 → 3.7.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/dist/cli.js
CHANGED
|
@@ -2,31 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
+
import { createRequire } from "module";
|
|
6
|
+
var require2 = createRequire(import.meta.url);
|
|
7
|
+
var { version: VERSION } = require2("../package.json");
|
|
5
8
|
var program = new Command();
|
|
6
|
-
program.name("sentinel").description("Semantic error monitoring \u2014 errors that speak your language").version(
|
|
7
|
-
program.command("
|
|
8
|
-
const { launchDashboard } = await import("./commands-
|
|
9
|
+
program.name("sentinel").description("Semantic error monitoring \u2014 errors that speak your language").version(VERSION);
|
|
10
|
+
program.command("defend", { isDefault: true }).description("Launch the Sentinel dashboard").option("-p, --port <port>", "Port number", "3838").option("--no-open", "Don't open browser").action(async (opts) => {
|
|
11
|
+
const { launchDashboard } = await import("./commands-JU5VP345.js");
|
|
9
12
|
await launchDashboard(opts);
|
|
10
13
|
});
|
|
11
14
|
program.command("init").description("Initialize Sentinel in current project").option("--detect", "Auto-detect symbols from codebase").action(async (opts) => {
|
|
12
|
-
const { initProject } = await import("./commands-
|
|
15
|
+
const { initProject } = await import("./commands-JU5VP345.js");
|
|
13
16
|
await initProject(opts);
|
|
14
17
|
});
|
|
15
18
|
var triage = program.command("triage").description("Incident triage");
|
|
16
19
|
triage.command("list").description("List incidents").option("-s, --status <status>", "Filter by status (open, investigating, resolved, wont-fix)").option("-e, --env <env>", "Filter by environment").option("--symbol <symbol>", "Filter by symbol").option("-n, --limit <n>", "Max results", "10").action(async (opts) => {
|
|
17
|
-
const { triageList } = await import("./commands-
|
|
20
|
+
const { triageList } = await import("./commands-JU5VP345.js");
|
|
18
21
|
await triageList(opts);
|
|
19
22
|
});
|
|
20
23
|
triage.command("show <id>").description("Show incident details").option("--timeline", "Include flow timeline").action(async (id, opts) => {
|
|
21
|
-
const { triageShow } = await import("./commands-
|
|
24
|
+
const { triageShow } = await import("./commands-JU5VP345.js");
|
|
22
25
|
await triageShow(id, opts);
|
|
23
26
|
});
|
|
24
27
|
triage.command("resolve <id>").description("Resolve an incident").option("--pattern <id>", "Pattern that resolved it").option("--commit <hash>", "Fix commit").option("--notes <text>", "Resolution notes").action(async (id, opts) => {
|
|
25
|
-
const { triageResolve } = await import("./commands-
|
|
28
|
+
const { triageResolve } = await import("./commands-JU5VP345.js");
|
|
26
29
|
await triageResolve(id, opts);
|
|
27
30
|
});
|
|
28
31
|
triage.command("stats").description("Show incident statistics").option("-p, --period <period>", "Period (7d, 30d, 90d)", "7d").action(async (opts) => {
|
|
29
|
-
const { triageStats } = await import("./commands-
|
|
32
|
+
const { triageStats } = await import("./commands-JU5VP345.js");
|
|
30
33
|
await triageStats(opts);
|
|
31
34
|
});
|
|
32
35
|
program.parse();
|
|
@@ -4750,8 +4750,16 @@ function createApp(options) {
|
|
|
4750
4750
|
app.get("/api/health", (_req, res) => {
|
|
4751
4751
|
res.json({ status: "ok", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
4752
4752
|
});
|
|
4753
|
-
const
|
|
4754
|
-
|
|
4753
|
+
const uiCandidates = [
|
|
4754
|
+
path6.join(__dirname2, "sentinel-ui"),
|
|
4755
|
+
// bundled: paradigm/dist/sentinel-ui/ (copied during build)
|
|
4756
|
+
path6.join(__dirname2, "..", "..", "ui", "dist"),
|
|
4757
|
+
// standalone: sentinel/dist/server/ → sentinel/ui/dist
|
|
4758
|
+
path6.join(__dirname2, "..", "ui", "dist")
|
|
4759
|
+
// standalone flat: sentinel/dist/ → sentinel/ui/dist
|
|
4760
|
+
];
|
|
4761
|
+
const uiDistPath = uiCandidates.find((p) => fs5.existsSync(p));
|
|
4762
|
+
if (uiDistPath) {
|
|
4755
4763
|
app.use(express.static(uiDistPath));
|
|
4756
4764
|
app.get("{*path}", (req, res) => {
|
|
4757
4765
|
if (!req.path.startsWith("/api")) {
|
package/dist/server/index.js
CHANGED
|
@@ -1494,8 +1494,16 @@ function createApp(options) {
|
|
|
1494
1494
|
app.get("/api/health", (_req, res) => {
|
|
1495
1495
|
res.json({ status: "ok", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
1496
1496
|
});
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1497
|
+
const uiCandidates = [
|
|
1498
|
+
path3.join(__dirname, "sentinel-ui"),
|
|
1499
|
+
// bundled: paradigm/dist/sentinel-ui/ (copied during build)
|
|
1500
|
+
path3.join(__dirname, "..", "..", "ui", "dist"),
|
|
1501
|
+
// standalone: sentinel/dist/server/ → sentinel/ui/dist
|
|
1502
|
+
path3.join(__dirname, "..", "ui", "dist")
|
|
1503
|
+
// standalone flat: sentinel/dist/ → sentinel/ui/dist
|
|
1504
|
+
];
|
|
1505
|
+
const uiDistPath = uiCandidates.find((p) => fs2.existsSync(p));
|
|
1506
|
+
if (uiDistPath) {
|
|
1499
1507
|
app.use(express.static(uiDistPath));
|
|
1500
1508
|
app.get("{*path}", (req, res) => {
|
|
1501
1509
|
if (!req.path.startsWith("/api")) {
|