opencode-codebase-index 0.8.0 → 0.8.1
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/README.md +1 -0
- package/dist/cli.cjs +1 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.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-x64-gnu.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2101,9 +2101,9 @@ var NodeFsHandler = class {
|
|
|
2101
2101
|
if (this.fsw.closed) {
|
|
2102
2102
|
return;
|
|
2103
2103
|
}
|
|
2104
|
-
const
|
|
2104
|
+
const dirname9 = sp.dirname(file);
|
|
2105
2105
|
const basename5 = sp.basename(file);
|
|
2106
|
-
const parent = this.fsw._getWatchedDir(
|
|
2106
|
+
const parent = this.fsw._getWatchedDir(dirname9);
|
|
2107
2107
|
let prevStats = stats;
|
|
2108
2108
|
if (parent.has(basename5))
|
|
2109
2109
|
return;
|
|
@@ -2130,7 +2130,7 @@ var NodeFsHandler = class {
|
|
|
2130
2130
|
prevStats = newStats2;
|
|
2131
2131
|
}
|
|
2132
2132
|
} catch (error) {
|
|
2133
|
-
this.fsw._remove(
|
|
2133
|
+
this.fsw._remove(dirname9, basename5);
|
|
2134
2134
|
}
|
|
2135
2135
|
} else if (parent.has(basename5)) {
|
|
2136
2136
|
const at = newStats.atimeMs;
|
|
@@ -3522,7 +3522,7 @@ function createWatcherWithIndexer(getIndexer2, projectRoot, config) {
|
|
|
3522
3522
|
import { tool } from "@opencode-ai/plugin";
|
|
3523
3523
|
|
|
3524
3524
|
// src/indexer/index.ts
|
|
3525
|
-
import { existsSync as existsSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync2, renameSync, unlinkSync, promises as fsPromises2 } from "fs";
|
|
3525
|
+
import { existsSync as existsSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync2, renameSync, unlinkSync, mkdirSync as mkdirSync2, promises as fsPromises2 } from "fs";
|
|
3526
3526
|
import * as path8 from "path";
|
|
3527
3527
|
import { performance as performance2 } from "perf_hooks";
|
|
3528
3528
|
|
|
@@ -7640,6 +7640,7 @@ var Indexer = class {
|
|
|
7640
7640
|
}
|
|
7641
7641
|
atomicWriteSync(targetPath, data) {
|
|
7642
7642
|
const tempPath = `${targetPath}.tmp`;
|
|
7643
|
+
mkdirSync2(path8.dirname(targetPath), { recursive: true });
|
|
7643
7644
|
writeFileSync2(tempPath, data);
|
|
7644
7645
|
renameSync(tempPath, targetPath);
|
|
7645
7646
|
}
|
|
@@ -10264,7 +10265,7 @@ ${truncateContent(r.content)}
|
|
|
10264
10265
|
}
|
|
10265
10266
|
|
|
10266
10267
|
// src/tools/index.ts
|
|
10267
|
-
import { existsSync as existsSync7, writeFileSync as writeFileSync3, mkdirSync as
|
|
10268
|
+
import { existsSync as existsSync7, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3, statSync as statSync2 } from "fs";
|
|
10268
10269
|
import * as path9 from "path";
|
|
10269
10270
|
var z = tool.schema;
|
|
10270
10271
|
var sharedIndexer = null;
|
|
@@ -10361,7 +10362,7 @@ function saveConfig(config) {
|
|
|
10361
10362
|
const configDir = path9.dirname(configPath);
|
|
10362
10363
|
const configBaseDir = path9.dirname(configDir);
|
|
10363
10364
|
if (!existsSync7(configDir)) {
|
|
10364
|
-
|
|
10365
|
+
mkdirSync3(configDir, { recursive: true });
|
|
10365
10366
|
}
|
|
10366
10367
|
const serializableConfig = { ...config };
|
|
10367
10368
|
if (Array.isArray(serializableConfig.knowledgeBases)) {
|