@optiqcode/cli 3.0.0 → 3.0.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.
@@ -184,7 +184,7 @@ export async function index(options) {
184
184
  }
185
185
  else {
186
186
  console.log(chalk.red('\nāœ— Indexing failed - all batches failed'));
187
- return;
187
+ process.exit(1);
188
188
  }
189
189
  console.log(chalk.blue('šŸ“Š Repository ID:'), chalk.bold(repoId));
190
190
  console.log(chalk.blue('šŸ“ Files indexed:'), chalk.bold(uploadedCount), chalk.dim(`/ ${fileContents.length}`));
@@ -194,6 +194,8 @@ export async function index(options) {
194
194
  console.log(chalk.dim('\nTip: Run the index command again to retry failed files.'));
195
195
  }
196
196
  console.log(chalk.dim('\nUse this repo_id for searches'));
197
+ // Exit successfully - prevents hanging due to open handles from prompts/axios
198
+ process.exit(0);
197
199
  }
198
200
  catch (error) {
199
201
  spinner.fail(chalk.red('āœ— Indexing failed'));
@@ -203,6 +205,8 @@ export async function index(options) {
203
205
  else {
204
206
  console.log(chalk.red(error.message));
205
207
  }
208
+ // Exit with error code
209
+ process.exit(1);
206
210
  }
207
211
  }
208
212
  function sleep(ms) {
package/dist/index.js CHANGED
@@ -408,6 +408,8 @@ async function indexOnce(targetPath, config) {
408
408
  console.log(chalk.cyan('\nšŸ“Š Repository ID:'));
409
409
  console.log(chalk.white(` ${repoId}`));
410
410
  console.log(chalk.gray('\n Use this ID for searches\n'));
411
+ // Exit successfully - prevents hanging due to open handles from prompts/axios
412
+ process.exit(0);
411
413
  }
412
414
  catch (error) {
413
415
  spinner.fail(chalk.red('Failed'));
@@ -417,6 +419,8 @@ async function indexOnce(targetPath, config) {
417
419
  else {
418
420
  console.log(chalk.gray(' ' + error.message));
419
421
  }
422
+ // Exit with error code
423
+ process.exit(1);
420
424
  }
421
425
  }
422
426
  async function watchDirectory(targetPath, config) {
@@ -51,7 +51,8 @@ const DEFAULT_IGNORE_PATTERNS = [
51
51
  'build',
52
52
  'eggs',
53
53
  '.eggs',
54
- 'lib',
54
+ // NOTE: 'lib' removed - it's a common source directory in JS/TS projects
55
+ // Python's lib/ is usually inside venv/ which is already ignored
55
56
  'lib64',
56
57
  'parts',
57
58
  'sdist',
@@ -305,7 +306,8 @@ export async function getGitIgnorePatterns(dir) {
305
306
  }
306
307
  // Patterns that should only match at root level (not nested directories)
307
308
  const ROOT_ONLY_PATTERNS = new Set([
308
- 'lib', 'lib64', 'bin', 'out', 'build', 'dist', 'vendor', 'tmp', 'temp',
309
+ // NOTE: 'lib' removed - it's a common source directory in JS/TS projects
310
+ 'lib64', 'bin', 'out', 'build', 'dist', 'vendor', 'tmp', 'temp',
309
311
  'env', 'venv', 'ENV', '.venv', 'eggs', '.eggs', 'parts', 'sdist', 'var', 'wheels',
310
312
  'deps', 'packages', 'site', 'coverage', 'htmlcov',
311
313
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optiqcode/cli",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "CLI tool for Optiq - automatic code indexing and context engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",