@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
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
startStalenessLoop,
|
|
34
34
|
touchLastSeen,
|
|
35
35
|
writeAtomically
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-DVCGDMTZ.js";
|
|
37
37
|
import {
|
|
38
38
|
assertBindAuthority,
|
|
39
39
|
buildOtelReceiver,
|
|
@@ -1983,4 +1983,4 @@ export {
|
|
|
1983
1983
|
resolveHost,
|
|
1984
1984
|
startDaemon
|
|
1985
1985
|
};
|
|
1986
|
-
//# sourceMappingURL=chunk-
|
|
1986
|
+
//# sourceMappingURL=chunk-Q2SL2SVH.js.map
|
package/dist/cli.cjs
CHANGED
|
@@ -16702,7 +16702,7 @@ async function extractFromDirectory(graph, scanPath, opts = {}) {
|
|
|
16702
16702
|
const phase5 = await addInfra(graph, scanPath, services);
|
|
16703
16703
|
const zodPhase = await addZodShapes(graph, services);
|
|
16704
16704
|
const firestoreRulesPhase = await addFirestoreRules(graph, services);
|
|
16705
|
-
const ghostsRetired = retireExtractedEdgesByMissingFile(
|
|
16705
|
+
const ghostsRetired = services.length === 0 ? 0 : retireExtractedEdgesByMissingFile(
|
|
16706
16706
|
graph,
|
|
16707
16707
|
scanPath,
|
|
16708
16708
|
services.map((s) => s.dir),
|
|
@@ -17564,15 +17564,8 @@ async function saveGraphToDisk(graph, outPath) {
|
|
|
17564
17564
|
}
|
|
17565
17565
|
await import_node_fs35.promises.rename(tmp, outPath);
|
|
17566
17566
|
}
|
|
17567
|
-
|
|
17568
|
-
let
|
|
17569
|
-
try {
|
|
17570
|
-
raw = await import_node_fs35.promises.readFile(outPath, "utf8");
|
|
17571
|
-
} catch (err) {
|
|
17572
|
-
if (err.code === "ENOENT") return;
|
|
17573
|
-
throw err;
|
|
17574
|
-
}
|
|
17575
|
-
let payload = JSON.parse(raw);
|
|
17567
|
+
function migrateSnapshot(input) {
|
|
17568
|
+
let payload = input;
|
|
17576
17569
|
if (payload.schemaVersion === 1) {
|
|
17577
17570
|
payload = migrateV1ToV2(payload);
|
|
17578
17571
|
}
|
|
@@ -17596,6 +17589,17 @@ async function loadGraphFromDisk(graph, outPath) {
|
|
|
17596
17589
|
`persist: unsupported snapshot schemaVersion ${payload.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
17597
17590
|
);
|
|
17598
17591
|
}
|
|
17592
|
+
return payload;
|
|
17593
|
+
}
|
|
17594
|
+
async function loadGraphFromDisk(graph, outPath) {
|
|
17595
|
+
let raw;
|
|
17596
|
+
try {
|
|
17597
|
+
raw = await import_node_fs35.promises.readFile(outPath, "utf8");
|
|
17598
|
+
} catch (err) {
|
|
17599
|
+
if (err.code === "ENOENT") return;
|
|
17600
|
+
throw err;
|
|
17601
|
+
}
|
|
17602
|
+
const payload = migrateSnapshot(JSON.parse(raw));
|
|
17599
17603
|
graph.clear();
|
|
17600
17604
|
graph.import(payload.graph);
|
|
17601
17605
|
}
|
|
@@ -24233,13 +24237,21 @@ function registerRoutes(scope, ctx) {
|
|
|
24233
24237
|
return reply.code(400).send({ error: "request body must be { snapshot: <persisted-graph> }" });
|
|
24234
24238
|
}
|
|
24235
24239
|
const snap = body.snapshot;
|
|
24236
|
-
if (typeof snap.schemaVersion !== "number"
|
|
24240
|
+
if (typeof snap.schemaVersion !== "number") {
|
|
24241
|
+
return reply.code(400).send({
|
|
24242
|
+
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
24243
|
+
});
|
|
24244
|
+
}
|
|
24245
|
+
let migrated;
|
|
24246
|
+
try {
|
|
24247
|
+
migrated = migrateSnapshot(snap);
|
|
24248
|
+
} catch {
|
|
24237
24249
|
return reply.code(400).send({
|
|
24238
24250
|
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
24239
24251
|
});
|
|
24240
24252
|
}
|
|
24241
24253
|
try {
|
|
24242
|
-
const result = mergeSnapshot(proj.graph,
|
|
24254
|
+
const result = mergeSnapshot(proj.graph, migrated);
|
|
24243
24255
|
return {
|
|
24244
24256
|
project: proj.name,
|
|
24245
24257
|
nodesAdded: result.nodesAdded,
|