@datasynx/agentic-ai-cartography 2.5.0 → 2.6.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/cli.js CHANGED
@@ -11,10 +11,12 @@ import {
11
11
  runDrift,
12
12
  runLocalDiscovery,
13
13
  startMcp
14
- } from "./chunk-RYQ4KQCK.js";
14
+ } from "./chunk-X3UWUX3G.js";
15
15
  import {
16
- startApi
17
- } from "./chunk-NQXZUWOI.js";
16
+ entitiesToYaml,
17
+ startApi,
18
+ toBackstageEntities
19
+ } from "./chunk-PQ7Q6MI5.js";
18
20
  import {
19
21
  CartographyDB,
20
22
  buildCartographyToolHandlers,
@@ -1377,30 +1379,7 @@ function generateDiffMermaid(diff) {
1377
1379
  return lines.join("\n");
1378
1380
  }
1379
1381
  function exportBackstageYAML(nodes, edges, org) {
1380
- const owner = org ?? "unknown";
1381
- const docs = [];
1382
- for (const node of nodes) {
1383
- const isComponent = ["web_service", "container", "pod"].includes(node.type);
1384
- const isAPI = node.type === "api_endpoint";
1385
- const kind = isComponent ? "Component" : isAPI ? "API" : "Resource";
1386
- const deps = edges.filter((e) => e.sourceId === node.id).map((e) => ` - resource:default/${sanitize(e.targetId)}`);
1387
- const doc = [
1388
- `apiVersion: backstage.io/v1alpha1`,
1389
- `kind: ${kind}`,
1390
- `metadata:`,
1391
- ` name: ${sanitize(node.id)}`,
1392
- ` annotations:`,
1393
- ` cartography/discovered-at: "${node.discoveredAt}"`,
1394
- ` cartography/confidence: "${node.confidence}"`,
1395
- `spec:`,
1396
- ` type: ${node.type}`,
1397
- ` lifecycle: production`,
1398
- ` owner: ${node.owner ?? owner}`,
1399
- ...deps.length > 0 ? [" dependsOn:", ...deps] : []
1400
- ].join("\n");
1401
- docs.push(doc);
1402
- }
1403
- return docs.join("\n---\n");
1382
+ return entitiesToYaml(toBackstageEntities(nodes, edges, org !== void 0 ? { org } : {}));
1404
1383
  }
1405
1384
  function exportJSON(db, sessionId) {
1406
1385
  const nodes = db.getNodes(sessionId);