@neat.is/core 0.10.5-dev.20261004 → 0.10.5-dev.20261006
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-HHAPD6JD.js → chunk-DVCGDMTZ.js} +25 -13
- package/dist/{chunk-HHAPD6JD.js.map → chunk-DVCGDMTZ.js.map} +1 -1
- package/dist/{chunk-TONL5O2E.js → chunk-Q2SL2SVH.js} +2 -2
- package/dist/cli.cjs +24 -12
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.cjs +24 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +24 -12
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs +24 -12
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-TONL5O2E.js.map → chunk-Q2SL2SVH.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
routeSpanToProject,
|
|
3
3
|
startDaemon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q2SL2SVH.js";
|
|
5
5
|
import {
|
|
6
6
|
ProjectNameCollisionError,
|
|
7
7
|
addProject,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
thresholdForEdgeType,
|
|
38
38
|
touchLastSeen,
|
|
39
39
|
writeAtomically
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-DVCGDMTZ.js";
|
|
41
41
|
import {
|
|
42
42
|
startOtelGrpcReceiver
|
|
43
43
|
} from "./chunk-LXQCL4MP.js";
|
package/dist/neatd.cjs
CHANGED
|
@@ -16512,7 +16512,7 @@ async function extractFromDirectory(graph, scanPath, opts = {}) {
|
|
|
16512
16512
|
const phase5 = await addInfra(graph, scanPath, services);
|
|
16513
16513
|
const zodPhase = await addZodShapes(graph, services);
|
|
16514
16514
|
const firestoreRulesPhase = await addFirestoreRules(graph, services);
|
|
16515
|
-
const ghostsRetired = retireExtractedEdgesByMissingFile(
|
|
16515
|
+
const ghostsRetired = services.length === 0 ? 0 : retireExtractedEdgesByMissingFile(
|
|
16516
16516
|
graph,
|
|
16517
16517
|
scanPath,
|
|
16518
16518
|
services.map((s) => s.dir),
|
|
@@ -16697,15 +16697,8 @@ async function saveGraphToDisk(graph, outPath) {
|
|
|
16697
16697
|
}
|
|
16698
16698
|
await import_node_fs34.promises.rename(tmp, outPath);
|
|
16699
16699
|
}
|
|
16700
|
-
|
|
16701
|
-
let
|
|
16702
|
-
try {
|
|
16703
|
-
raw = await import_node_fs34.promises.readFile(outPath, "utf8");
|
|
16704
|
-
} catch (err) {
|
|
16705
|
-
if (err.code === "ENOENT") return;
|
|
16706
|
-
throw err;
|
|
16707
|
-
}
|
|
16708
|
-
let payload = JSON.parse(raw);
|
|
16700
|
+
function migrateSnapshot(input) {
|
|
16701
|
+
let payload = input;
|
|
16709
16702
|
if (payload.schemaVersion === 1) {
|
|
16710
16703
|
payload = migrateV1ToV2(payload);
|
|
16711
16704
|
}
|
|
@@ -16729,6 +16722,17 @@ async function loadGraphFromDisk(graph, outPath) {
|
|
|
16729
16722
|
`persist: unsupported snapshot schemaVersion ${payload.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
16730
16723
|
);
|
|
16731
16724
|
}
|
|
16725
|
+
return payload;
|
|
16726
|
+
}
|
|
16727
|
+
async function loadGraphFromDisk(graph, outPath) {
|
|
16728
|
+
let raw;
|
|
16729
|
+
try {
|
|
16730
|
+
raw = await import_node_fs34.promises.readFile(outPath, "utf8");
|
|
16731
|
+
} catch (err) {
|
|
16732
|
+
if (err.code === "ENOENT") return;
|
|
16733
|
+
throw err;
|
|
16734
|
+
}
|
|
16735
|
+
const payload = migrateSnapshot(JSON.parse(raw));
|
|
16732
16736
|
graph.clear();
|
|
16733
16737
|
graph.import(payload.graph);
|
|
16734
16738
|
}
|
|
@@ -23525,13 +23529,21 @@ function registerRoutes(scope, ctx) {
|
|
|
23525
23529
|
return reply.code(400).send({ error: "request body must be { snapshot: <persisted-graph> }" });
|
|
23526
23530
|
}
|
|
23527
23531
|
const snap = body.snapshot;
|
|
23528
|
-
if (typeof snap.schemaVersion !== "number"
|
|
23532
|
+
if (typeof snap.schemaVersion !== "number") {
|
|
23533
|
+
return reply.code(400).send({
|
|
23534
|
+
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23535
|
+
});
|
|
23536
|
+
}
|
|
23537
|
+
let migrated;
|
|
23538
|
+
try {
|
|
23539
|
+
migrated = migrateSnapshot(snap);
|
|
23540
|
+
} catch {
|
|
23529
23541
|
return reply.code(400).send({
|
|
23530
23542
|
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23531
23543
|
});
|
|
23532
23544
|
}
|
|
23533
23545
|
try {
|
|
23534
|
-
const result = mergeSnapshot(proj.graph,
|
|
23546
|
+
const result = mergeSnapshot(proj.graph, migrated);
|
|
23535
23547
|
return {
|
|
23536
23548
|
project: proj.name,
|
|
23537
23549
|
nodesAdded: result.nodesAdded,
|