claude-code-autoconfig 1.0.105 → 1.0.106

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 +14 -14
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -294,6 +294,20 @@ cp .claude/migration/${timestamp}/settings.json .claude/settings.json
294
294
  }
295
295
  }
296
296
 
297
+ // Detect upgrade vs fresh install (must run BEFORE copying files)
298
+ const isUpgrade = (() => {
299
+ // Indicator 1: CLAUDE.md has autoconfig marker
300
+ const claudeMdPath = path.join(cwd, 'CLAUDE.md');
301
+ if (fs.existsSync(claudeMdPath)) {
302
+ const content = fs.readFileSync(claudeMdPath, 'utf8');
303
+ if (content.includes('AUTO-GENERATED BY /autoconfig')) return true;
304
+ }
305
+ // Indicator 2: docs HTML exists (unique autoconfig artifact)
306
+ const docsPath = path.join(claudeDest, 'docs', 'autoconfig.docs.html');
307
+ if (fs.existsSync(docsPath)) return true;
308
+ return false;
309
+ })();
310
+
297
311
  // Step 3: Copy minimal bootstrap (commands/, docs/, agents/, feedback/, hooks/)
298
312
  const commandsSrc = path.join(packageDir, '.claude', 'commands');
299
313
  const docsSrc = path.join(packageDir, '.claude', 'docs');
@@ -390,20 +404,6 @@ if (fs.existsSync(settingsSrc) && (forceMode || !fs.existsSync(settingsDest))) {
390
404
 
391
405
  console.log('\x1b[32m%s\x1b[0m', '✅ Prepared /autoconfig command');
392
406
 
393
- // Detect upgrade vs fresh install
394
- const isUpgrade = (() => {
395
- // Indicator 1: CLAUDE.md has autoconfig marker
396
- const claudeMdPath = path.join(cwd, 'CLAUDE.md');
397
- if (fs.existsSync(claudeMdPath)) {
398
- const content = fs.readFileSync(claudeMdPath, 'utf8');
399
- if (content.includes('AUTO-GENERATED BY /autoconfig')) return true;
400
- }
401
- // Indicator 2: docs HTML exists (unique autoconfig artifact)
402
- const docsPath = path.join(claudeDest, 'docs', 'autoconfig.docs.html');
403
- if (fs.existsSync(docsPath)) return true;
404
- return false;
405
- })();
406
-
407
407
  // Pre-mark all bundled updates as applied when the @applied block is empty.
408
408
  // On fresh installs, /autoconfig handles their content (e.g., debug methodology in MEMORY.md).
409
409
  // On upgrades from pre-update-system versions, these updates are already baked in.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.105",
3
+ "version": "1.0.106",
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",