@optiqcode/cli 1.6.0 → 1.7.0
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/index.js +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ async function login() {
|
|
|
62
62
|
if (!otpResponse.data.success) {
|
|
63
63
|
throw new Error('Failed to send code');
|
|
64
64
|
}
|
|
65
|
-
spinner.succeed(chalk.cyan('
|
|
65
|
+
spinner.succeed(chalk.cyan('Code sent\n'));
|
|
66
66
|
const { code } = await prompts({
|
|
67
67
|
type: 'text',
|
|
68
68
|
name: 'code',
|
|
@@ -103,16 +103,16 @@ async function login() {
|
|
|
103
103
|
token: token,
|
|
104
104
|
apiKey: validateResponse.data.context_engine_api_key || '',
|
|
105
105
|
});
|
|
106
|
-
verifySpinner.succeed(chalk.cyan(
|
|
106
|
+
verifySpinner.succeed(chalk.cyan(`Logged in as ${email}\n`));
|
|
107
107
|
return true;
|
|
108
108
|
}
|
|
109
109
|
else {
|
|
110
|
-
verifySpinner.fail(chalk.red('
|
|
110
|
+
verifySpinner.fail(chalk.red('Invalid code'));
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
catch (error) {
|
|
115
|
-
spinner.fail(chalk.red('
|
|
115
|
+
spinner.fail(chalk.red('Login failed'));
|
|
116
116
|
if (error.response?.data?.error) {
|
|
117
117
|
console.log(chalk.gray(' ' + error.response.data.error));
|
|
118
118
|
}
|
|
@@ -301,7 +301,7 @@ async function indexOnce(targetPath, config) {
|
|
|
301
301
|
timeout: 0,
|
|
302
302
|
});
|
|
303
303
|
if (!response.data.success) {
|
|
304
|
-
spinner.fail(chalk.red('
|
|
304
|
+
spinner.fail(chalk.red('Indexing failed'));
|
|
305
305
|
console.log(chalk.gray(response.data.error || 'Unknown error'));
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
@@ -309,7 +309,7 @@ async function indexOnce(targetPath, config) {
|
|
|
309
309
|
totalFiles += response.data.stats?.files_indexed || 0;
|
|
310
310
|
totalEntities += response.data.stats?.entities_indexed || 0;
|
|
311
311
|
}
|
|
312
|
-
spinner.succeed(chalk.cyan('
|
|
312
|
+
spinner.succeed(chalk.cyan('Indexed'));
|
|
313
313
|
console.log(chalk.gray(` ${totalFiles} files • ${totalEntities} entities`));
|
|
314
314
|
console.log(chalk.cyan('\n📊 Repository ID:'));
|
|
315
315
|
console.log(chalk.white(` ${repoId}`));
|
|
@@ -400,11 +400,11 @@ async function watchDirectory(targetPath, config) {
|
|
|
400
400
|
repoId = response.data.repo_id;
|
|
401
401
|
uploadedCount += batch.length;
|
|
402
402
|
}
|
|
403
|
-
spinner.succeed(chalk.cyan(
|
|
403
|
+
spinner.succeed(chalk.cyan(`Indexed ${files.length} files`));
|
|
404
404
|
console.log(chalk.gray(` Repo ID: ${repoId}\n`));
|
|
405
405
|
}
|
|
406
406
|
catch (error) {
|
|
407
|
-
spinner.fail(chalk.red('
|
|
407
|
+
spinner.fail(chalk.red('Failed'));
|
|
408
408
|
if (error.response?.data?.error) {
|
|
409
409
|
console.log(chalk.gray(' ' + error.response.data.error));
|
|
410
410
|
}
|
|
@@ -414,8 +414,6 @@ async function watchDirectory(targetPath, config) {
|
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
console.log(chalk.cyan('👀 Watching for changes...'));
|
|
418
|
-
console.log(chalk.gray(' Press Ctrl+C to stop\n'));
|
|
419
417
|
const ignorePatterns = await getGitIgnorePatterns(targetPath);
|
|
420
418
|
const watcher = chokidar.watch(targetPath, {
|
|
421
419
|
ignored: (filePath) => {
|