scip-query 0.3.1 → 0.3.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/dist/cli.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/cli.ts
4
4
  import { program } from "commander";
5
+ import { createRequire } from "module";
5
6
  import { existsSync as existsSync8, realpathSync } from "fs";
6
7
  import { join as join10 } from "path";
7
8
  import { fileURLToPath as fileURLToPath2 } from "url";
@@ -964,7 +965,7 @@ var Watcher = class {
964
965
  return new Promise((resolve4, reject) => {
965
966
  const start = Date.now();
966
967
  const tmpDb = this.indexPaths.dbPath + ".tmp";
967
- const tmpScip = this.indexPaths.indexPath + ".tmp";
968
+ const tmpScip = tempScipPath(this.indexPaths.indexPath);
968
969
  const child = fork(
969
970
  new URL("./reindex-worker.js", import.meta.url).pathname,
970
971
  [],
@@ -1005,6 +1006,9 @@ var Watcher = class {
1005
1006
  this.onStatus(status);
1006
1007
  }
1007
1008
  };
1009
+ function tempScipPath(indexPath) {
1010
+ return indexPath.endsWith(".scip") ? indexPath.slice(0, -".scip".length) + ".tmp.scip" : indexPath + ".tmp.scip";
1011
+ }
1008
1012
 
1009
1013
  // src/queries/stats.ts
1010
1014
  function stats(db) {
@@ -6265,6 +6269,8 @@ function installSkills(opts = {}) {
6265
6269
  }
6266
6270
 
6267
6271
  // src/cli.ts
6272
+ var require2 = createRequire(import.meta.url);
6273
+ var { version: cliVersion } = require2("../package.json");
6268
6274
  function resolveProjectRoot() {
6269
6275
  return process.env["SCIP_QUERY_PROJECT_ROOT"] ?? process.cwd();
6270
6276
  }
@@ -6367,7 +6373,7 @@ var queries = {
6367
6373
  redundantReexports,
6368
6374
  similarSignatures
6369
6375
  };
6370
- program.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version("0.1.0");
6376
+ program.name("scip-query").description("Language-agnostic code intelligence CLI powered by SCIP indexes").version(cliVersion);
6371
6377
  program.command("reindex").description("Index the codebase and convert to SQLite").option("-l, --language <lang>", "Index only this language (can be repeated)", collect, []).option("--pnpm-workspaces", "Enable pnpm workspace support (TypeScript)").action(async (opts) => {
6372
6378
  const projectRoot = resolveProjectRoot();
6373
6379
  try {
package/dist/index.js CHANGED
@@ -1115,7 +1115,7 @@ var Watcher = class {
1115
1115
  return new Promise((resolve3, reject) => {
1116
1116
  const start = Date.now();
1117
1117
  const tmpDb = this.indexPaths.dbPath + ".tmp";
1118
- const tmpScip = this.indexPaths.indexPath + ".tmp";
1118
+ const tmpScip = tempScipPath(this.indexPaths.indexPath);
1119
1119
  const child = fork(
1120
1120
  new URL("./reindex-worker.js", import.meta.url).pathname,
1121
1121
  [],
@@ -1156,6 +1156,9 @@ var Watcher = class {
1156
1156
  this.onStatus(status);
1157
1157
  }
1158
1158
  };
1159
+ function tempScipPath(indexPath) {
1160
+ return indexPath.endsWith(".scip") ? indexPath.slice(0, -".scip".length) + ".tmp.scip" : indexPath + ".tmp.scip";
1161
+ }
1159
1162
 
1160
1163
  // src/setup.ts
1161
1164
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scip-query",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Language-agnostic code intelligence CLI powered by SCIP indexes",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",