@neat.is/core 0.10.5-dev.20261004 → 0.10.5-dev.20261005
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/neatd.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
reconcileDaemonRecordSync,
|
|
4
4
|
startDaemon
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q2SL2SVH.js";
|
|
6
6
|
import {
|
|
7
7
|
listProjects,
|
|
8
8
|
registryPath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DVCGDMTZ.js";
|
|
10
10
|
import {
|
|
11
11
|
BindAuthorityError,
|
|
12
12
|
__require
|
package/dist/server.cjs
CHANGED
|
@@ -17465,7 +17465,7 @@ async function extractFromDirectory(graph, scanPath, opts = {}) {
|
|
|
17465
17465
|
const phase5 = await addInfra(graph, scanPath, services);
|
|
17466
17466
|
const zodPhase = await addZodShapes(graph, services);
|
|
17467
17467
|
const firestoreRulesPhase = await addFirestoreRules(graph, services);
|
|
17468
|
-
const ghostsRetired = retireExtractedEdgesByMissingFile(
|
|
17468
|
+
const ghostsRetired = services.length === 0 ? 0 : retireExtractedEdgesByMissingFile(
|
|
17469
17469
|
graph,
|
|
17470
17470
|
scanPath,
|
|
17471
17471
|
services.map((s) => s.dir),
|
|
@@ -18630,15 +18630,8 @@ async function saveGraphToDisk(graph, outPath) {
|
|
|
18630
18630
|
}
|
|
18631
18631
|
await import_node_fs37.promises.rename(tmp, outPath);
|
|
18632
18632
|
}
|
|
18633
|
-
|
|
18634
|
-
let
|
|
18635
|
-
try {
|
|
18636
|
-
raw = await import_node_fs37.promises.readFile(outPath, "utf8");
|
|
18637
|
-
} catch (err) {
|
|
18638
|
-
if (err.code === "ENOENT") return;
|
|
18639
|
-
throw err;
|
|
18640
|
-
}
|
|
18641
|
-
let payload = JSON.parse(raw);
|
|
18633
|
+
function migrateSnapshot(input) {
|
|
18634
|
+
let payload = input;
|
|
18642
18635
|
if (payload.schemaVersion === 1) {
|
|
18643
18636
|
payload = migrateV1ToV2(payload);
|
|
18644
18637
|
}
|
|
@@ -18662,6 +18655,17 @@ async function loadGraphFromDisk(graph, outPath) {
|
|
|
18662
18655
|
`persist: unsupported snapshot schemaVersion ${payload.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
18663
18656
|
);
|
|
18664
18657
|
}
|
|
18658
|
+
return payload;
|
|
18659
|
+
}
|
|
18660
|
+
async function loadGraphFromDisk(graph, outPath) {
|
|
18661
|
+
let raw;
|
|
18662
|
+
try {
|
|
18663
|
+
raw = await import_node_fs37.promises.readFile(outPath, "utf8");
|
|
18664
|
+
} catch (err) {
|
|
18665
|
+
if (err.code === "ENOENT") return;
|
|
18666
|
+
throw err;
|
|
18667
|
+
}
|
|
18668
|
+
const payload = migrateSnapshot(JSON.parse(raw));
|
|
18665
18669
|
graph.clear();
|
|
18666
18670
|
graph.import(payload.graph);
|
|
18667
18671
|
}
|
|
@@ -23100,13 +23104,21 @@ function registerRoutes(scope, ctx) {
|
|
|
23100
23104
|
return reply.code(400).send({ error: "request body must be { snapshot: <persisted-graph> }" });
|
|
23101
23105
|
}
|
|
23102
23106
|
const snap = body.snapshot;
|
|
23103
|
-
if (typeof snap.schemaVersion !== "number"
|
|
23107
|
+
if (typeof snap.schemaVersion !== "number") {
|
|
23108
|
+
return reply.code(400).send({
|
|
23109
|
+
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23110
|
+
});
|
|
23111
|
+
}
|
|
23112
|
+
let migrated;
|
|
23113
|
+
try {
|
|
23114
|
+
migrated = migrateSnapshot(snap);
|
|
23115
|
+
} catch {
|
|
23104
23116
|
return reply.code(400).send({
|
|
23105
23117
|
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23106
23118
|
});
|
|
23107
23119
|
}
|
|
23108
23120
|
try {
|
|
23109
|
-
const result = mergeSnapshot(proj.graph,
|
|
23121
|
+
const result = mergeSnapshot(proj.graph, migrated);
|
|
23110
23122
|
return {
|
|
23111
23123
|
project: proj.name,
|
|
23112
23124
|
nodesAdded: result.nodesAdded,
|