natureco-cli 5.51.3 → 5.51.4
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/utils/natureco-account.js +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to NatureCo CLI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [5.51.4] - 2026-07-11 — "account: OTP kodu magiclink tipini de dener"
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **6/8 haneli kodla giriş** (`{{ .Token }}` şablona eklenmişse) çalışır: kod doğrulaması `type:email` başarısızsa `type:magiclink` ile tekrar denenir; boşluklar temizlenir. (Kod tek kullanımlık — her `account login` yeni kod üretir, EN SON e-postadaki kodu kullan.)
|
|
9
|
+
|
|
5
10
|
## [5.51.3] - 2026-07-11 — "account: implicit magic link (fragment access_token)"
|
|
6
11
|
|
|
7
12
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.51.
|
|
3
|
+
"version": "5.51.4",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
|
@@ -70,9 +70,21 @@ async function sendOtp(email) {
|
|
|
70
70
|
return { sent: true, email };
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* OTP kodunu doğrula → oturum. Supabase'de e-postayla gelen kodun doğrulama tipi
|
|
75
|
+
* şablona göre 'email' ya da 'magiclink' olabilir → ikisini de dener.
|
|
76
|
+
*/
|
|
74
77
|
async function verifyOtp(email, token) {
|
|
75
|
-
|
|
78
|
+
const code = String(token).replace(/\s+/g, '');
|
|
79
|
+
try {
|
|
80
|
+
return saveSession(_shape(await _post('/verify', { type: 'email', email, token: code })));
|
|
81
|
+
} catch (e1) {
|
|
82
|
+
try {
|
|
83
|
+
return saveSession(_shape(await _post('/verify', { type: 'magiclink', email, token: code })));
|
|
84
|
+
} catch (_) {
|
|
85
|
+
throw e1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
76
88
|
}
|
|
77
89
|
|
|
78
90
|
// JWT access_token içinden kullanıcıyı çöz (imza doğrulaması yok — sadece görüntüleme)
|