@neat.is/core 0.2.10 → 0.3.1
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/{chunk-QYUB3FQL.js → chunk-4ASCXBZF.js} +12 -124
- package/dist/chunk-4ASCXBZF.js.map +1 -0
- package/dist/{chunk-5BQWBQJR.js → chunk-66Z5IEFY.js} +126 -7
- package/dist/chunk-66Z5IEFY.js.map +1 -0
- package/dist/{chunk-JMLZOKCS.js → chunk-FIXKIYNF.js} +818 -18
- package/dist/chunk-FIXKIYNF.js.map +1 -0
- package/dist/chunk-G3PDTGOW.js +125 -0
- package/dist/chunk-G3PDTGOW.js.map +1 -0
- package/dist/cli.cjs +60 -25
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +17 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +186 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +10 -11
- package/dist/neatd.cjs +1886 -34
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +5 -3
- package/dist/neatd.js.map +1 -1
- package/dist/{otel-grpc-USFL3OI3.js → otel-grpc-J4O2SIBZ.js} +3 -3
- package/dist/server.cjs +49 -17
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +6 -7
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-5BQWBQJR.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-JMLZOKCS.js.map +0 -1
- package/dist/chunk-QYUB3FQL.js.map +0 -1
- package/dist/chunk-W7ZYJZC7.js +0 -807
- package/dist/chunk-W7ZYJZC7.js.map +0 -1
- package/dist/otel-grpc-USFL3OI3.js.map +0 -1
- /package/dist/{chunk-DGUM43GV.js.map → otel-grpc-J4O2SIBZ.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
import {
|
|
3
3
|
buildSearchIndex
|
|
4
4
|
} from "./chunk-XOOCA5T7.js";
|
|
5
|
-
import {
|
|
6
|
-
buildApi
|
|
7
|
-
} from "./chunk-W7ZYJZC7.js";
|
|
8
5
|
import {
|
|
9
6
|
DEFAULT_PROJECT,
|
|
10
7
|
PolicyViolationsLog,
|
|
@@ -18,6 +15,7 @@ import {
|
|
|
18
15
|
addServiceAliases,
|
|
19
16
|
addServiceNodes,
|
|
20
17
|
attachGraphToEventBus,
|
|
18
|
+
buildApi,
|
|
21
19
|
discoverServices,
|
|
22
20
|
emitNeatEvent,
|
|
23
21
|
ensureCompatLoaded,
|
|
@@ -37,12 +35,13 @@ import {
|
|
|
37
35
|
setStatus,
|
|
38
36
|
startPersistLoop,
|
|
39
37
|
startStalenessLoop
|
|
40
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-FIXKIYNF.js";
|
|
41
39
|
import {
|
|
42
|
-
buildOtelReceiver,
|
|
43
40
|
startOtelGrpcReceiver
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import
|
|
41
|
+
} from "./chunk-G3PDTGOW.js";
|
|
42
|
+
import {
|
|
43
|
+
buildOtelReceiver
|
|
44
|
+
} from "./chunk-4ASCXBZF.js";
|
|
46
45
|
|
|
47
46
|
// src/cli.ts
|
|
48
47
|
import path4 from "path";
|
|
@@ -830,7 +829,7 @@ async function runRootCause(client, input) {
|
|
|
830
829
|
const qs = input.errorId ? `?errorId=${encodeURIComponent(input.errorId)}` : "";
|
|
831
830
|
const path5 = projectPath(
|
|
832
831
|
input.project,
|
|
833
|
-
`/
|
|
832
|
+
`/graph/root-cause/${encodeURIComponent(input.errorNode)}${qs}`
|
|
834
833
|
);
|
|
835
834
|
try {
|
|
836
835
|
const result = await client.get(path5);
|
|
@@ -861,7 +860,7 @@ async function runBlastRadius(client, input) {
|
|
|
861
860
|
const qs = input.depth !== void 0 ? `?depth=${input.depth}` : "";
|
|
862
861
|
const path5 = projectPath(
|
|
863
862
|
input.project,
|
|
864
|
-
`/
|
|
863
|
+
`/graph/blast-radius/${encodeURIComponent(input.nodeId)}${qs}`
|
|
865
864
|
);
|
|
866
865
|
try {
|
|
867
866
|
const result = await client.get(path5);
|
|
@@ -900,7 +899,7 @@ async function runDependencies(client, input) {
|
|
|
900
899
|
const depth = input.depth ?? 3;
|
|
901
900
|
const path5 = projectPath(
|
|
902
901
|
input.project,
|
|
903
|
-
`/graph/
|
|
902
|
+
`/graph/dependencies/${encodeURIComponent(input.nodeId)}?depth=${depth}`
|
|
904
903
|
);
|
|
905
904
|
try {
|
|
906
905
|
const result = await client.get(path5);
|
|
@@ -986,7 +985,8 @@ function formatDuration(ms) {
|
|
|
986
985
|
async function runIncidents(client, input) {
|
|
987
986
|
const path5 = input.nodeId ? projectPath(input.project, `/incidents/${encodeURIComponent(input.nodeId)}`) : projectPath(input.project, "/incidents");
|
|
988
987
|
try {
|
|
989
|
-
const
|
|
988
|
+
const body = await client.get(path5);
|
|
989
|
+
const events = body.events;
|
|
990
990
|
if (events.length === 0) {
|
|
991
991
|
return {
|
|
992
992
|
summary: input.nodeId ? `No incidents recorded against ${input.nodeId}.` : "No incidents recorded."
|
|
@@ -1000,7 +1000,7 @@ async function runIncidents(client, input) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
const target = input.nodeId ?? "the project";
|
|
1002
1002
|
return {
|
|
1003
|
-
summary: `${target} has ${
|
|
1003
|
+
summary: `${target} has ${body.total} recorded incident${body.total === 1 ? "" : "s"}; showing the ${ordered.length} most recent.`,
|
|
1004
1004
|
block: blockLines.join("\n"),
|
|
1005
1005
|
provenance: Provenance2.OBSERVED
|
|
1006
1006
|
};
|
|
@@ -1096,9 +1096,10 @@ async function runStaleEdges(client, input) {
|
|
|
1096
1096
|
if (input.limit !== void 0) params.set("limit", String(input.limit));
|
|
1097
1097
|
if (input.edgeType) params.set("edgeType", input.edgeType);
|
|
1098
1098
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
1099
|
-
const
|
|
1100
|
-
projectPath(input.project, `/
|
|
1099
|
+
const body = await client.get(
|
|
1100
|
+
projectPath(input.project, `/stale-events${qs}`)
|
|
1101
1101
|
);
|
|
1102
|
+
const events = body.events;
|
|
1102
1103
|
if (events.length === 0) {
|
|
1103
1104
|
return {
|
|
1104
1105
|
summary: input.edgeType ? `No stale ${input.edgeType} edges recorded.` : "No stale-edge transitions recorded yet."
|
|
@@ -1132,9 +1133,10 @@ async function runPolicies(client, input) {
|
|
|
1132
1133
|
const params = new URLSearchParams();
|
|
1133
1134
|
if (input.policyId) params.set("policyId", input.policyId);
|
|
1134
1135
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
1135
|
-
|
|
1136
|
+
const body = await client.get(
|
|
1136
1137
|
projectPath(input.project, `/policies/violations${qs}`)
|
|
1137
1138
|
);
|
|
1139
|
+
violations = body.violations;
|
|
1138
1140
|
allowed = violations.every((v) => v.onViolation !== "block");
|
|
1139
1141
|
}
|
|
1140
1142
|
if (input.nodeId) {
|