claude-code-autoconfig 1.0.109 → 1.0.110

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.
Files changed (2) hide show
  1. package/bin/cli.js +18 -0
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -354,6 +354,15 @@ function copyDirIfMissing(src, dest) {
354
354
  }
355
355
 
356
356
  // Copy commands (required for /autoconfig to work)
357
+ // Preserve user's saved @screenshotDir in gls.md across upgrades
358
+ const glsDest = path.join(claudeDest, 'commands', 'gls.md');
359
+ let savedScreenshotDir = null;
360
+ if (fs.existsSync(glsDest)) {
361
+ const firstLine = fs.readFileSync(glsDest, 'utf8').split(/\r?\n/)[0];
362
+ const match = firstLine.match(/<!-- @screenshotDir (.+?) -->/);
363
+ if (match) savedScreenshotDir = match[1].trim();
364
+ }
365
+
357
366
  if (fs.existsSync(commandsSrc)) {
358
367
  copyDir(commandsSrc, path.join(claudeDest, 'commands'));
359
368
  } else {
@@ -361,6 +370,15 @@ if (fs.existsSync(commandsSrc)) {
361
370
  process.exit(1);
362
371
  }
363
372
 
373
+ // Restore saved screenshot dir after commands overwrite
374
+ if (savedScreenshotDir && fs.existsSync(glsDest)) {
375
+ const content = fs.readFileSync(glsDest, 'utf8');
376
+ fs.writeFileSync(glsDest, content.replace(
377
+ /<!-- @screenshotDir\s*-->/,
378
+ `<!-- @screenshotDir ${savedScreenshotDir} -->`
379
+ ));
380
+ }
381
+
364
382
  // Copy docs (only .html files — skip internal planning docs)
365
383
  if (fs.existsSync(docsSrc)) {
366
384
  const docsDestDir = path.join(claudeDest, 'docs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.109",
3
+ "version": "1.0.110",
4
4
  "description": "Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.",
5
5
  "author": "ADAC 1001 <info@adac1001.com>",
6
6
  "license": "MIT",