skillfree 0.1.23 → 0.1.25
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/skillfree.js +0 -7
- package/install.sh +3 -14
- package/package.json +1 -1
package/bin/skillfree.js
CHANGED
|
@@ -25,13 +25,6 @@ auth
|
|
|
25
25
|
const { authSave } = require('../scripts/commands/auth')
|
|
26
26
|
await authSave(apiKey)
|
|
27
27
|
})
|
|
28
|
-
auth
|
|
29
|
-
.command('save <apiKey>')
|
|
30
|
-
.description('直接保存 API Key(供安装脚本调用)')
|
|
31
|
-
.action(async (apiKey) => {
|
|
32
|
-
const { authSave } = require('../scripts/commands/auth')
|
|
33
|
-
await authSave(apiKey)
|
|
34
|
-
})
|
|
35
28
|
auth
|
|
36
29
|
.command('status')
|
|
37
30
|
.description('查看当前登录状态和积分')
|
package/install.sh
CHANGED
|
@@ -116,20 +116,9 @@ while true; do
|
|
|
116
116
|
continue
|
|
117
117
|
fi
|
|
118
118
|
|
|
119
|
-
#
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-H "Authorization: Bearer $API_KEY" \
|
|
123
|
-
"https://skillfree.tech/v1/balance")
|
|
124
|
-
|
|
125
|
-
if [ "$HTTP_CODE" = "200" ]; then
|
|
126
|
-
echo -e " ${GREEN}✓${NC}"
|
|
127
|
-
break
|
|
128
|
-
else
|
|
129
|
-
echo -e " ${RED}✗${NC} (HTTP $HTTP_CODE)"
|
|
130
|
-
echo -e " ${RED}✗${NC} Key 无效,请检查后重试\n"
|
|
131
|
-
API_KEY=""
|
|
132
|
-
fi
|
|
119
|
+
# 格式正确,直接保存(不做网络验证,避免 GFW 干扰)
|
|
120
|
+
success "API Key 已保存"
|
|
121
|
+
break
|
|
133
122
|
done
|
|
134
123
|
|
|
135
124
|
# 有效 Key → 交给 CLI 写入配置
|