@comfanion/workflow 4.36.2 → 4.36.4
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/bin/cli.js +3 -21
- package/package.json +1 -1
- package/src/build-info.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -572,28 +572,10 @@ program
|
|
|
572
572
|
await fs.move(tempVectors, path.join(targetDir, 'vectors'), { overwrite: true });
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
// Restore user's config.yaml
|
|
575
|
+
// Restore user's config.yaml completely - only add missing sections
|
|
576
576
|
spinner.text = 'Restoring config.yaml...';
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
// Add vectorizer section if missing
|
|
580
|
-
if (!mergedConfig.includes('vectorizer:')) {
|
|
581
|
-
const newConfigPath = path.join(targetDir, 'config.yaml');
|
|
582
|
-
const newConfig = await fs.readFile(newConfigPath, 'utf8');
|
|
583
|
-
const vectorizerMatch = newConfig.match(/(# =+\n# VECTORIZER[\s\S]*?)(?=# =+\n# [A-Z])/);
|
|
584
|
-
if (vectorizerMatch) {
|
|
585
|
-
// Insert before LSP section or at end
|
|
586
|
-
const insertPoint = mergedConfig.indexOf('# =============================================================================\n# LSP');
|
|
587
|
-
if (insertPoint > 0) {
|
|
588
|
-
mergedConfig = mergedConfig.slice(0, insertPoint) + vectorizerMatch[1] + mergedConfig.slice(insertPoint);
|
|
589
|
-
} else {
|
|
590
|
-
mergedConfig += '\n' + vectorizerMatch[1];
|
|
591
|
-
}
|
|
592
|
-
console.log(chalk.green(' ✅ Added new vectorizer configuration section'));
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
await fs.writeFile(configPath, mergedConfig);
|
|
577
|
+
await fs.writeFile(configPath, configBackup);
|
|
578
|
+
console.log(chalk.green(' ✅ config.yaml preserved'));
|
|
597
579
|
|
|
598
580
|
// Install plugin dependencies
|
|
599
581
|
spinner.text = 'Installing plugin dependencies...';
|
package/package.json
CHANGED