opencode-codebase-index 0.22.2 → 0.22.3
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/dist/cli.cjs +21 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +21 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +21 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/pi-extension.cjs +1 -1
- package/dist/pi-extension.js +1 -1
- package/native/codebase-index-native.darwin-arm64.node +0 -0
- package/native/codebase-index-native.darwin-x64.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// open-codebase-index - Semantic codebase indexing and search
|
|
2
2
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -16780,6 +16780,8 @@ var GitHeadWatcher = class {
|
|
|
16780
16780
|
debounceTimer = null;
|
|
16781
16781
|
debounceMs = 100;
|
|
16782
16782
|
// Short debounce for git operations
|
|
16783
|
+
readyPromise = Promise.resolve();
|
|
16784
|
+
resolveReady = null;
|
|
16783
16785
|
constructor(projectRoot) {
|
|
16784
16786
|
this.projectRoot = projectRoot;
|
|
16785
16787
|
}
|
|
@@ -16788,8 +16790,12 @@ var GitHeadWatcher = class {
|
|
|
16788
16790
|
return;
|
|
16789
16791
|
}
|
|
16790
16792
|
if (!isGitRepo(this.projectRoot)) {
|
|
16793
|
+
this.readyPromise = Promise.resolve();
|
|
16791
16794
|
return;
|
|
16792
16795
|
}
|
|
16796
|
+
this.readyPromise = new Promise((resolve15) => {
|
|
16797
|
+
this.resolveReady = resolve15;
|
|
16798
|
+
});
|
|
16793
16799
|
this.onBranchChange = handler;
|
|
16794
16800
|
this.currentBranch = getCurrentBranch(this.projectRoot);
|
|
16795
16801
|
const headPath = getHeadPath(this.projectRoot);
|
|
@@ -16804,6 +16810,10 @@ var GitHeadWatcher = class {
|
|
|
16804
16810
|
});
|
|
16805
16811
|
this.watcher.on("change", () => this.handleHeadChange());
|
|
16806
16812
|
this.watcher.on("add", () => this.handleHeadChange());
|
|
16813
|
+
this.watcher.once("ready", () => {
|
|
16814
|
+
this.resolveReady?.();
|
|
16815
|
+
this.resolveReady = null;
|
|
16816
|
+
});
|
|
16807
16817
|
}
|
|
16808
16818
|
handleHeadChange() {
|
|
16809
16819
|
if (this.debounceTimer) {
|
|
@@ -16841,10 +16851,16 @@ var GitHeadWatcher = class {
|
|
|
16841
16851
|
await watcher.close();
|
|
16842
16852
|
}
|
|
16843
16853
|
this.onBranchChange = null;
|
|
16854
|
+
this.resolveReady?.();
|
|
16855
|
+
this.resolveReady = null;
|
|
16856
|
+
this.readyPromise = Promise.resolve();
|
|
16844
16857
|
}
|
|
16845
16858
|
isRunning() {
|
|
16846
16859
|
return this.watcher !== null;
|
|
16847
16860
|
}
|
|
16861
|
+
async waitUntilReady() {
|
|
16862
|
+
await this.readyPromise;
|
|
16863
|
+
}
|
|
16848
16864
|
};
|
|
16849
16865
|
|
|
16850
16866
|
// src/watcher/index.ts
|
|
@@ -16894,7 +16910,10 @@ function createWatcherWithIndexer(getIndexer, projectRoot, config, host, options
|
|
|
16894
16910
|
fileWatcher,
|
|
16895
16911
|
gitWatcher,
|
|
16896
16912
|
whenReady() {
|
|
16897
|
-
return
|
|
16913
|
+
return Promise.all([
|
|
16914
|
+
fileWatcher.waitUntilReady(),
|
|
16915
|
+
gitWatcher?.waitUntilReady()
|
|
16916
|
+
]).then(() => void 0);
|
|
16898
16917
|
},
|
|
16899
16918
|
async stop() {
|
|
16900
16919
|
stopped = true;
|