claude-code-autoconfig 1.0.3 → 1.0.5

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.
@@ -787,7 +787,30 @@
787
787
  text-align: center;
788
788
  padding: 40px;
789
789
  }
790
- </style>
790
+
791
+ /* Migration link */
792
+ .migration-link {
793
+ margin: 10px 0 20px 0;
794
+ }
795
+
796
+ .migration-link a {
797
+ color: var(--accent-orange);
798
+ text-decoration: none;
799
+ font-size: 14px;
800
+ padding: 8px 16px;
801
+ background: rgba(255, 153, 51, 0.1);
802
+ border: 1px solid rgba(255, 153, 51, 0.3);
803
+ border-radius: 6px;
804
+ display: inline-block;
805
+ transition: all 0.2s ease;
806
+ }
807
+
808
+ .migration-link a:hover {
809
+ background: rgba(255, 153, 51, 0.2);
810
+ transform: translateY(-1px);
811
+ }
812
+
813
+ </style>
791
814
  </head>
792
815
  <body>
793
816
  <!-- File Preview Modal -->
@@ -812,6 +835,12 @@
812
835
  <div class="slide-number">01 / Overview</div>
813
836
  <h1>✨ Autoconfig Complete</h1>
814
837
  <h2 class="typewriter" data-text="Here's what got installed. Hover over any file or folder to learn what it does."></h2>
838
+ <div class="migration-link" id="migrationLink" style="display: none;">
839
+ <a href="#" id="showMigration">📦 View migrated files</a>
840
+ </div>
841
+ <div class="migration-link" id="backToInstallLink" style="display: none;">
842
+ <a href="#" id="backToInstall">Back to install view</a>
843
+ </div>
815
844
  <div class="slide-content">
816
845
  <div class="tree-panel">
817
846
  <div class="tree-side">
@@ -908,6 +937,29 @@
908
937
  </div>
909
938
  </div>
910
939
  </div>
940
+
941
+ <!-- Migration Tree Panel (hidden by default) -->
942
+ <div class="tree-panel" id="migrationTreePanel" style="display: none;">
943
+ <div class="tree-side">
944
+ <div class="tree-item folder-row" data-folder="migration-root">
945
+ <span class="tree-chevron">›</span>
946
+ <span class="tree-folder-icon">📁</span>
947
+ <span class="folder">.claude/migration/</span>
948
+ </div>
949
+ <div class="tree-item indent-1 folder-row" data-folder="backup-folder">
950
+ <span class="tree-chevron">›</span>
951
+ <span class="tree-folder-icon">📦</span>
952
+ <span class="folder" id="backupFolderName">backup/</span>
953
+ </div>
954
+ <div id="backedUpTreeItems"></div>
955
+ </div>
956
+ <div class="info-side">
957
+ <div class="info-panel" id="migrationInfoPanel">
958
+ <div class="info-panel-title">Migration Backup</div>
959
+ <div class="info-panel-desc">Your previous configuration files were backed up here before the new autoconfig was installed.<br><br>You can restore any file by copying it back from this folder.</div>
960
+ </div>
961
+ </div>
962
+ </div>
911
963
  </div>
912
964
  </div>
913
965
 
@@ -1735,6 +1787,75 @@ Use \`test_\` prefix for test databases, not \`dev_\`.`
1735
1787
  }
1736
1788
  });
1737
1789
  });
1790
+
1791
+ // Migration detection and toggle view
1792
+ const migrationLink = document.getElementById('migrationLink');
1793
+ const backToInstallLink = document.getElementById('backToInstallLink');
1794
+ const showMigrationBtn = document.getElementById('showMigration');
1795
+ const backToInstallBtn = document.getElementById('backToInstall');
1796
+ const mainTreePanel = document.querySelector('.slide[data-slide="0"] .tree-panel:not(#migrationTreePanel)');
1797
+ const migrationTreePanel = document.getElementById('migrationTreePanel');
1798
+ const backupFolderName = document.getElementById('backupFolderName');
1799
+ const backedUpTreeItems = document.getElementById('backedUpTreeItems');
1800
+
1801
+ let migrationData = null;
1802
+
1803
+ // Check for migration
1804
+ async function checkMigration() {
1805
+ try {
1806
+ const guidePath = window.location.pathname;
1807
+ const claudeDir = guidePath.substring(0, guidePath.lastIndexOf('/guide/'));
1808
+ const migrationPath = claudeDir + '/migration/latest.json';
1809
+
1810
+ const response = await fetch(migrationPath);
1811
+ if (response.ok) {
1812
+ migrationData = await response.json();
1813
+ migrationLink.style.display = 'block';
1814
+
1815
+ // Set backup folder name
1816
+ backupFolderName.textContent = migrationData.timestamp + '/';
1817
+
1818
+ // Build tree items for backed up files
1819
+ const itemsHtml = migrationData.backedUpFiles.map(f => `
1820
+ <div class="tree-item indent-2">
1821
+ <span class="tree-spacer"></span>
1822
+ <span class="tree-file-icon">📄</span>
1823
+ <span class="file">${f}</span>
1824
+ </div>
1825
+ `).join('');
1826
+ backedUpTreeItems.innerHTML = itemsHtml;
1827
+ }
1828
+ } catch (e) {
1829
+ // No migration - that's fine
1830
+ }
1831
+ }
1832
+
1833
+ function showMigrationView() {
1834
+ mainTreePanel.style.display = 'none';
1835
+ migrationTreePanel.style.display = 'flex';
1836
+ migrationLink.style.display = 'none';
1837
+ backToInstallLink.style.display = 'block';
1838
+ }
1839
+
1840
+ function showInstallView() {
1841
+ migrationTreePanel.style.display = 'none';
1842
+ mainTreePanel.style.display = 'flex';
1843
+ backToInstallLink.style.display = 'none';
1844
+ migrationLink.style.display = 'block';
1845
+ }
1846
+
1847
+ showMigrationBtn?.addEventListener('click', (e) => {
1848
+ e.preventDefault();
1849
+ showMigrationView();
1850
+ });
1851
+
1852
+ backToInstallBtn?.addEventListener('click', (e) => {
1853
+ e.preventDefault();
1854
+ showInstallView();
1855
+ });
1856
+
1857
+ // Check for migration on load
1858
+ checkMigration();
1738
1859
  </script>
1739
1860
  </body>
1740
1861
  </html>
package/bin/cli.js CHANGED
@@ -89,6 +89,28 @@ if (fs.existsSync(claudeDest)) {
89
89
  }
90
90
  }
91
91
 
92
+ // Write migration metadata for the guide to read
93
+ const latestPath = path.join(migrationDir, 'latest.json');
94
+ const backedUpFiles = [];
95
+
96
+ function collectFiles(dir, prefix = '') {
97
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
98
+ for (const entry of entries) {
99
+ const relPath = prefix ? `${prefix}/${entry.name}` : entry.name;
100
+ if (entry.isDirectory()) {
101
+ collectFiles(path.join(dir, entry.name), relPath);
102
+ } else {
103
+ backedUpFiles.push(relPath);
104
+ }
105
+ }
106
+ }
107
+ collectFiles(migrationPath);
108
+
109
+ fs.writeFileSync(latestPath, JSON.stringify({
110
+ timestamp: timestamp,
111
+ backedUpFiles: backedUpFiles
112
+ }, null, 2));
113
+
92
114
  // Create/update migration README
93
115
  const readmePath = path.join(migrationDir, 'README.md');
94
116
  const readmeContent = `# Migration Backups
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
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",