free-coding-models 0.1.18 → 0.1.19
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/free-coding-models.js +11 -7
- package/package.json +1 -1
|
@@ -97,19 +97,23 @@ async function checkForUpdate() {
|
|
|
97
97
|
return null
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
function runUpdate() {
|
|
100
|
+
function runUpdate(latestVersion) {
|
|
101
101
|
const { execSync } = require('child_process')
|
|
102
102
|
console.log()
|
|
103
|
-
console.log(chalk.bold.cyan(' ⬆ Updating free-coding-models...'))
|
|
103
|
+
console.log(chalk.bold.cyan(' ⬆ Updating free-coding-models to v' + latestVersion + '...'))
|
|
104
104
|
console.log()
|
|
105
105
|
try {
|
|
106
|
-
|
|
106
|
+
// 📖 Force install from npm registry (ignore local cache)
|
|
107
|
+
// 📖 Use --prefer-online to ensure we get the latest published version
|
|
108
|
+
execSync(`npm i -g free-coding-models@${latestVersion} --prefer-online`, { stdio: 'inherit' })
|
|
107
109
|
console.log()
|
|
108
|
-
console.log(chalk.green(' ✅ Update complete!
|
|
110
|
+
console.log(chalk.green(' ✅ Update complete! Version ' + latestVersion + ' installed.'))
|
|
109
111
|
console.log()
|
|
110
|
-
|
|
112
|
+
console.log(chalk.dim(' 📝 Please restart free-coding-models to use the new version.'))
|
|
113
|
+
console.log()
|
|
114
|
+
} catch (err) {
|
|
111
115
|
console.log()
|
|
112
|
-
console.log(chalk.red(' ✖ Update failed. Try manually: npm i -g free-coding-models'))
|
|
116
|
+
console.log(chalk.red(' ✖ Update failed. Try manually: npm i -g free-coding-models@' + latestVersion))
|
|
113
117
|
console.log()
|
|
114
118
|
}
|
|
115
119
|
process.exit(0)
|
|
@@ -1028,7 +1032,7 @@ async function main() {
|
|
|
1028
1032
|
|
|
1029
1033
|
// 📖 Handle "update now" selection from the menu
|
|
1030
1034
|
if (mode === 'update') {
|
|
1031
|
-
runUpdate()
|
|
1035
|
+
runUpdate(latestVersion)
|
|
1032
1036
|
}
|
|
1033
1037
|
|
|
1034
1038
|
// 📖 Handle "Read Changelogs" selection — open GitHub releases in browser
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-coding-models",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Find the fastest coding LLM models in seconds — ping free models from multiple providers, pick the best one for OpenCode, Cursor, or any AI coding assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nvidia",
|