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