@opentrace/opentrace 0.4.0-rc.596 → 0.4.0-rc.599
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/lib/app.cjs +1 -1
- package/dist/lib/app.js +1 -1
- package/dist/lib/{createLadybugStore-C8DTjCMI.cjs → createLadybugStore-Bf8hShzn.cjs} +18 -1
- package/dist/lib/{createLadybugStore-C8DTjCMI.cjs.map → createLadybugStore-Bf8hShzn.cjs.map} +1 -1
- package/dist/lib/{createLadybugStore-DXC5_pR5.js → createLadybugStore-Bfm4MpGZ.js} +18 -1
- package/dist/lib/{createLadybugStore-DXC5_pR5.js.map → createLadybugStore-Bfm4MpGZ.js.map} +1 -1
- package/dist/lib/src/store/ladybugStore.d.ts +9 -0
- package/dist/lib/src/store/ladybugStore.d.ts.map +1 -1
- package/dist/lib/store.cjs +1 -1
- package/dist/lib/store.js +1 -1
- package/package.json +1 -1
package/dist/lib/app.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const browser = require("./browser-DGngmpUM.cjs");
|
|
6
|
-
const createLadybugStore = require("./createLadybugStore-
|
|
6
|
+
const createLadybugStore = require("./createLadybugStore-Bf8hShzn.cjs");
|
|
7
7
|
const useJobStream = require("./useJobStream-BitxnpbI.cjs");
|
|
8
8
|
const SettingsDrawer = require("./SettingsDrawer-CUCk2cj9.cjs");
|
|
9
9
|
const IndexingProgress = require("./IndexingProgress-Dgyb9B53.cjs");
|
package/dist/lib/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState, useEffect, useCallback } from "react";
|
|
3
3
|
import { u as useStore, S as StoreProvider } from "./browser-DkJIwwcY.js";
|
|
4
|
-
import { c as createLadybugStore } from "./createLadybugStore-
|
|
4
|
+
import { c as createLadybugStore } from "./createLadybugStore-Bfm4MpGZ.js";
|
|
5
5
|
import { u as useJobService, a as useJobStream, J as JobServiceProvider } from "./useJobStream-DpZX-Frr.js";
|
|
6
6
|
import { l as loadAnimationSettings, G as GraphViewer, C as ChatPanel, S as SettingsDrawer } from "./SettingsDrawer-C3rZhveV.js";
|
|
7
7
|
import { n as normalizeRepoUrl, d as detectProvider } from "./IndexingProgress-DVYWqZhT.js";
|
|
@@ -13118,8 +13118,25 @@ class LadybugGraphStore {
|
|
|
13118
13118
|
for (const id of [...this.flushedSourceIds]) {
|
|
13119
13119
|
if (matches(id)) this.flushedSourceIds.delete(id);
|
|
13120
13120
|
}
|
|
13121
|
+
await this.sweepOrphanedDependencies();
|
|
13121
13122
|
await this.rebuildPackageDedupIndex();
|
|
13122
13123
|
}
|
|
13124
|
+
/** Delete Dependency nodes left with no incoming edges after
|
|
13125
|
+
* deleteRepo's RELATES sweep. Safe because Dependency nodes are only
|
|
13126
|
+
* ever created paired with an edge (DEPENDS_ON from Repository during
|
|
13127
|
+
* manifest parsing, IMPORTS from File during import analysis), so zero
|
|
13128
|
+
* incoming edges means the node was exclusively referenced by the
|
|
13129
|
+
* just-deleted repo. MUST run after the RELATES sweep, and before
|
|
13130
|
+
* rebuildPackageDedupIndex so flushedPackageIds resyncs from the
|
|
13131
|
+
* surviving rows. */
|
|
13132
|
+
async sweepOrphanedDependencies() {
|
|
13133
|
+
const orphans = await this.query(
|
|
13134
|
+
`MATCH (n:Dependency) OPTIONAL MATCH ()-[r:RELATES]->(n) WITH n, count(r) AS refs WHERE refs = 0 RETURN n.id AS id`
|
|
13135
|
+
);
|
|
13136
|
+
if (orphans.length === 0) return;
|
|
13137
|
+
const idList = orphans.map((o) => `'${esc(o.id)}'`).join(", ");
|
|
13138
|
+
await this.exec(`MATCH (n:Dependency) WHERE n.id IN [${idList}] DELETE n`);
|
|
13139
|
+
}
|
|
13123
13140
|
/** Rebuild `flushedPackageIds` from the current Dependency rows.
|
|
13124
13141
|
*
|
|
13125
13142
|
* The set is the store's in-memory guard against COPY FROM PK
|
|
@@ -14052,4 +14069,4 @@ function createLadybugStore() {
|
|
|
14052
14069
|
return singletonStore;
|
|
14053
14070
|
}
|
|
14054
14071
|
exports.createLadybugStore = createLadybugStore;
|
|
14055
|
-
//# sourceMappingURL=createLadybugStore-
|
|
14072
|
+
//# sourceMappingURL=createLadybugStore-Bf8hShzn.cjs.map
|