@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
|
@@ -15788,7 +15788,7 @@ async function extractFromDirectory(graph, scanPath, opts = {}) {
|
|
|
15788
15788
|
const phase5 = await addInfra(graph, scanPath, services);
|
|
15789
15789
|
const zodPhase = await addZodShapes(graph, services);
|
|
15790
15790
|
const firestoreRulesPhase = await addFirestoreRules(graph, services);
|
|
15791
|
-
const ghostsRetired = retireExtractedEdgesByMissingFile(
|
|
15791
|
+
const ghostsRetired = services.length === 0 ? 0 : retireExtractedEdgesByMissingFile(
|
|
15792
15792
|
graph,
|
|
15793
15793
|
scanPath,
|
|
15794
15794
|
services.map((s) => s.dir),
|
|
@@ -16658,15 +16658,8 @@ async function saveGraphToDisk(graph, outPath) {
|
|
|
16658
16658
|
}
|
|
16659
16659
|
await fs33.rename(tmp, outPath);
|
|
16660
16660
|
}
|
|
16661
|
-
|
|
16662
|
-
let
|
|
16663
|
-
try {
|
|
16664
|
-
raw = await fs33.readFile(outPath, "utf8");
|
|
16665
|
-
} catch (err) {
|
|
16666
|
-
if (err.code === "ENOENT") return;
|
|
16667
|
-
throw err;
|
|
16668
|
-
}
|
|
16669
|
-
let payload = JSON.parse(raw);
|
|
16661
|
+
function migrateSnapshot(input) {
|
|
16662
|
+
let payload = input;
|
|
16670
16663
|
if (payload.schemaVersion === 1) {
|
|
16671
16664
|
payload = migrateV1ToV2(payload);
|
|
16672
16665
|
}
|
|
@@ -16690,6 +16683,17 @@ async function loadGraphFromDisk(graph, outPath) {
|
|
|
16690
16683
|
`persist: unsupported snapshot schemaVersion ${payload.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
16691
16684
|
);
|
|
16692
16685
|
}
|
|
16686
|
+
return payload;
|
|
16687
|
+
}
|
|
16688
|
+
async function loadGraphFromDisk(graph, outPath) {
|
|
16689
|
+
let raw;
|
|
16690
|
+
try {
|
|
16691
|
+
raw = await fs33.readFile(outPath, "utf8");
|
|
16692
|
+
} catch (err) {
|
|
16693
|
+
if (err.code === "ENOENT") return;
|
|
16694
|
+
throw err;
|
|
16695
|
+
}
|
|
16696
|
+
const payload = migrateSnapshot(JSON.parse(raw));
|
|
16693
16697
|
graph.clear();
|
|
16694
16698
|
graph.import(payload.graph);
|
|
16695
16699
|
}
|
|
@@ -23036,13 +23040,21 @@ function registerRoutes(scope, ctx) {
|
|
|
23036
23040
|
return reply.code(400).send({ error: "request body must be { snapshot: <persisted-graph> }" });
|
|
23037
23041
|
}
|
|
23038
23042
|
const snap = body.snapshot;
|
|
23039
|
-
if (typeof snap.schemaVersion !== "number"
|
|
23043
|
+
if (typeof snap.schemaVersion !== "number") {
|
|
23044
|
+
return reply.code(400).send({
|
|
23045
|
+
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23046
|
+
});
|
|
23047
|
+
}
|
|
23048
|
+
let migrated;
|
|
23049
|
+
try {
|
|
23050
|
+
migrated = migrateSnapshot(snap);
|
|
23051
|
+
} catch {
|
|
23040
23052
|
return reply.code(400).send({
|
|
23041
23053
|
error: `unsupported snapshot schemaVersion ${snap.schemaVersion} (expected ${SCHEMA_VERSION})`
|
|
23042
23054
|
});
|
|
23043
23055
|
}
|
|
23044
23056
|
try {
|
|
23045
|
-
const result = mergeSnapshot(proj.graph,
|
|
23057
|
+
const result = mergeSnapshot(proj.graph, migrated);
|
|
23046
23058
|
return {
|
|
23047
23059
|
project: proj.name,
|
|
23048
23060
|
nodesAdded: result.nodesAdded,
|
|
@@ -23605,4 +23617,4 @@ export {
|
|
|
23605
23617
|
deprovisionConnector,
|
|
23606
23618
|
buildApi
|
|
23607
23619
|
};
|
|
23608
|
-
//# sourceMappingURL=chunk-
|
|
23620
|
+
//# sourceMappingURL=chunk-DVCGDMTZ.js.map
|