open-codebase-index 0.22.1 → 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 +2 -2
- package/.claude-plugin/plugin.json +4 -4
- package/.codex-plugin/plugin.json +7 -7
- package/README.md +1 -1
- package/dist/cli.cjs +22 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +22 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/pi-extension.cjs +2 -2
- package/dist/pi-extension.cjs.map +1 -1
- package/dist/pi-extension.js +2 -2
- package/dist/pi-extension.js.map +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.linux-arm64-gnu.node +0 -0
- package/native/codebase-index-native.linux-x64-gnu.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
2
|
+
// open-codebase-index - Semantic codebase indexing and search
|
|
3
3
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -4149,7 +4149,7 @@ var identity_catalog_default = {
|
|
|
4149
4149
|
current: {
|
|
4150
4150
|
productName: "opencode-codebase-index",
|
|
4151
4151
|
packageName: "opencode-codebase-index",
|
|
4152
|
-
repository: "https://github.com/Helweg/
|
|
4152
|
+
repository: "https://github.com/Helweg/open-codebase-index",
|
|
4153
4153
|
mcpBinary: "opencode-codebase-index-mcp",
|
|
4154
4154
|
mcpServerName: "opencode-codebase-index"
|
|
4155
4155
|
},
|
|
@@ -19592,6 +19592,8 @@ var GitHeadWatcher = class {
|
|
|
19592
19592
|
debounceTimer = null;
|
|
19593
19593
|
debounceMs = 100;
|
|
19594
19594
|
// Short debounce for git operations
|
|
19595
|
+
readyPromise = Promise.resolve();
|
|
19596
|
+
resolveReady = null;
|
|
19595
19597
|
constructor(projectRoot) {
|
|
19596
19598
|
this.projectRoot = projectRoot;
|
|
19597
19599
|
}
|
|
@@ -19600,8 +19602,12 @@ var GitHeadWatcher = class {
|
|
|
19600
19602
|
return;
|
|
19601
19603
|
}
|
|
19602
19604
|
if (!isGitRepo(this.projectRoot)) {
|
|
19605
|
+
this.readyPromise = Promise.resolve();
|
|
19603
19606
|
return;
|
|
19604
19607
|
}
|
|
19608
|
+
this.readyPromise = new Promise((resolve18) => {
|
|
19609
|
+
this.resolveReady = resolve18;
|
|
19610
|
+
});
|
|
19605
19611
|
this.onBranchChange = handler;
|
|
19606
19612
|
this.currentBranch = getCurrentBranch(this.projectRoot);
|
|
19607
19613
|
const headPath = getHeadPath(this.projectRoot);
|
|
@@ -19616,6 +19622,10 @@ var GitHeadWatcher = class {
|
|
|
19616
19622
|
});
|
|
19617
19623
|
this.watcher.on("change", () => this.handleHeadChange());
|
|
19618
19624
|
this.watcher.on("add", () => this.handleHeadChange());
|
|
19625
|
+
this.watcher.once("ready", () => {
|
|
19626
|
+
this.resolveReady?.();
|
|
19627
|
+
this.resolveReady = null;
|
|
19628
|
+
});
|
|
19619
19629
|
}
|
|
19620
19630
|
handleHeadChange() {
|
|
19621
19631
|
if (this.debounceTimer) {
|
|
@@ -19653,10 +19663,16 @@ var GitHeadWatcher = class {
|
|
|
19653
19663
|
await watcher.close();
|
|
19654
19664
|
}
|
|
19655
19665
|
this.onBranchChange = null;
|
|
19666
|
+
this.resolveReady?.();
|
|
19667
|
+
this.resolveReady = null;
|
|
19668
|
+
this.readyPromise = Promise.resolve();
|
|
19656
19669
|
}
|
|
19657
19670
|
isRunning() {
|
|
19658
19671
|
return this.watcher !== null;
|
|
19659
19672
|
}
|
|
19673
|
+
async waitUntilReady() {
|
|
19674
|
+
await this.readyPromise;
|
|
19675
|
+
}
|
|
19660
19676
|
};
|
|
19661
19677
|
|
|
19662
19678
|
// src/watcher/index.ts
|
|
@@ -19706,7 +19722,10 @@ function createWatcherWithIndexer(getIndexer, projectRoot, config, host, options
|
|
|
19706
19722
|
fileWatcher,
|
|
19707
19723
|
gitWatcher,
|
|
19708
19724
|
whenReady() {
|
|
19709
|
-
return
|
|
19725
|
+
return Promise.all([
|
|
19726
|
+
fileWatcher.waitUntilReady(),
|
|
19727
|
+
gitWatcher?.waitUntilReady()
|
|
19728
|
+
]).then(() => void 0);
|
|
19710
19729
|
},
|
|
19711
19730
|
async stop() {
|
|
19712
19731
|
stopped = true;
|