sapper-iq 1.0.11 → 1.0.12
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/package.json +1 -1
- package/sapper.mjs +20 -0
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -87,11 +87,31 @@ const tools = {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
+
async function checkForUpdates() {
|
|
91
|
+
try {
|
|
92
|
+
const response = await fetch('https://registry.npmjs.org/sapper-iq/latest');
|
|
93
|
+
const data = await response.json();
|
|
94
|
+
const latestVersion = data.version;
|
|
95
|
+
|
|
96
|
+
if (latestVersion && latestVersion !== CURRENT_VERSION) {
|
|
97
|
+
console.log(chalk.yellow('🔄 UPDATE AVAILABLE!'));
|
|
98
|
+
console.log(chalk.gray(` Current: v${CURRENT_VERSION}`));
|
|
99
|
+
console.log(chalk.green(` Latest: v${latestVersion}`));
|
|
100
|
+
console.log(chalk.cyan(' Run: npm update -g sapper-iq\n'));
|
|
101
|
+
}
|
|
102
|
+
} catch (error) {
|
|
103
|
+
// Silently fail if update check fails
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
90
107
|
async function runSapper() {
|
|
91
108
|
console.clear();
|
|
92
109
|
console.log(chalk.cyan.bold(` SAPPER v${CURRENT_VERSION} | Autonomous "OpenCode" Mode`));
|
|
93
110
|
console.log(chalk.gray(`📁 Working Directory: ${process.cwd()}\n`));
|
|
94
111
|
|
|
112
|
+
// Check for updates
|
|
113
|
+
await checkForUpdates();
|
|
114
|
+
|
|
95
115
|
let messages = [];
|
|
96
116
|
if (fs.existsSync(CONTEXT_FILE)) {
|
|
97
117
|
const resume = await safeQuestion(chalk.green('Resume previous session? (y/n): '));
|