tsoft-cli 2.5.15 → 3.4.0
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 +160 -0
- package/LICENSE +21 -0
- package/README.md +86 -53
- package/locales/en.json +323 -0
- package/locales/tr.json +323 -0
- package/package.json +41 -45
- package/src/api-client.js +217 -0
- package/src/commands/login.js +94 -0
- package/src/commands/logout.js +44 -0
- package/src/commands/org-switch.js +82 -0
- package/src/commands/theme-dev.js +424 -0
- package/src/commands/theme-init.js +162 -0
- package/src/commands/theme-publish.js +12 -0
- package/src/commands/theme-push.js +197 -0
- package/src/commands/theme-section.js +317 -0
- package/src/commands/theme-submit.js +14 -0
- package/src/commands/theme.js +474 -0
- package/src/commands/whoami.js +132 -0
- package/src/config.js +19 -0
- package/src/errors/error-mapper.js +158 -0
- package/src/i18n.js +84 -0
- package/src/index.js +179 -0
- package/src/output-mode.js +45 -0
- package/src/pkce.js +34 -0
- package/src/server.js +209 -0
- package/src/storage.js +488 -0
- package/src/ui/help-renderer.js +219 -0
- package/src/ui/prompt-wrapper.js +183 -0
- package/bin/run.js +0 -5
- package/build/enums.d.ts +0 -1
- package/build/enums.js +0 -7
- package/build/enums.js.map +0 -1
- package/build/index.d.ts +0 -5
- package/build/index.js +0 -10
- package/build/index.js.map +0 -1
package/locales/tr.json
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ui.label.confirm": "❓ Onay",
|
|
3
|
+
"ui.label.select": "📋 Seçim",
|
|
4
|
+
"ui.label.input": "✏️ Giriş",
|
|
5
|
+
"ui.label.warning": "⚠️ Uyarı",
|
|
6
|
+
"ui.label.error": "❌ Hata",
|
|
7
|
+
"ui.label.success": "✅ Başarılı",
|
|
8
|
+
"ui.label.info": "ℹ️ Bilgi",
|
|
9
|
+
"ui.label.theme_selection": "🎨 Tema Seçimi",
|
|
10
|
+
"ui.label.loading": "⏳ İşlem Devam Ediyor",
|
|
11
|
+
"ui.prompt.continue": "Devam etmek istiyor musunuz?",
|
|
12
|
+
"ui.label.disabled": "(Devre Dışı)",
|
|
13
|
+
|
|
14
|
+
"error.push.pending_review.message": "Push yapilamaz: tema inceleme bekliyor.",
|
|
15
|
+
"error.push.pending_review.hint": "Once geri cekin: tsoft theme withdraw",
|
|
16
|
+
"error.push.auth.message": "Yetkilendirme hatasi.",
|
|
17
|
+
"error.push.auth.hint": "Tekrar giris yapin: tsoft login --org",
|
|
18
|
+
"error.push.backend_error.message": "Sunucu hatasi olustu.",
|
|
19
|
+
"error.push.backend_error.hint": "Detaylar icin: tsoft theme push --verbose",
|
|
20
|
+
"error.push.backend_reject.message": "Push reddedildi.",
|
|
21
|
+
"error.push.backend_reject.hint": "Detaylar icin: tsoft theme push --verbose",
|
|
22
|
+
"error.push.unexpected.message": "Beklenmeyen bir hata olustu.",
|
|
23
|
+
"error.push.unexpected.hint": "Detaylar icin: tsoft theme push --verbose",
|
|
24
|
+
|
|
25
|
+
"error.http.401.message": "Yetkilendirme hatasi.",
|
|
26
|
+
"error.http.401.hint": "Tekrar giris yapin: tsoft login --org",
|
|
27
|
+
"error.http.403.message": "Bu islem icin yetkiniz yok.",
|
|
28
|
+
"error.http.403.hint": "Organizasyon yetkinizi kontrol edin: tsoft org switch",
|
|
29
|
+
"error.http.404.message": "Tema bulunamadi.",
|
|
30
|
+
"error.http.404.hint": "Tema adini kontrol edin: tsoft theme list",
|
|
31
|
+
"error.http.409.message": "Push yapilamaz: tema uygun durumda degil.",
|
|
32
|
+
"error.http.409.hint": "Tema durumunu kontrol edin: tsoft theme dev-status",
|
|
33
|
+
"error.http.423.message": "Tema kilitli.",
|
|
34
|
+
"error.http.423.hint": "Tema baska bir islem tarafindan kilitlenmis olabilir.",
|
|
35
|
+
"error.http.5xx.message": "Sunucu hatasi olustu.",
|
|
36
|
+
"error.http.5xx.hint": "Detaylar icin: tsoft {{command}} --verbose",
|
|
37
|
+
|
|
38
|
+
"error.push.verbose_hint": "Detaylar icin: tsoft theme push --verbose",
|
|
39
|
+
"error.fallback.message": "Beklenmeyen bir hata olustu.",
|
|
40
|
+
"error.fallback.hint": "Detaylar icin: tsoft theme push --verbose",
|
|
41
|
+
"error.auth_required.message": "Yetkilendirme hatasi.",
|
|
42
|
+
"error.auth_required.hint": "Tekrar giris yapin: tsoft login --org",
|
|
43
|
+
|
|
44
|
+
"login.starting": "🔐 tsoft360 yetkilendirme başlatılıyor...",
|
|
45
|
+
"login.browser_opening": "🌐 Tarayıcı açılıyor...",
|
|
46
|
+
"login.waiting": "⏳ Yetkilendirme bekleniyor...",
|
|
47
|
+
"login.waiting_detail": "Tarayıcıda giriş yapın ve mağazanızı seçin.",
|
|
48
|
+
"login.code_received": "✓ Authorization code alındı",
|
|
49
|
+
"login.token_fetching": "🔄 Token alınıyor...",
|
|
50
|
+
"login.token_received": "✓ Token başarıyla alındı",
|
|
51
|
+
"login.credentials_saved": "✓ Kimlik bilgileri kaydedildi",
|
|
52
|
+
"login.success": "🎉 Başarıyla giriş yapıldı!",
|
|
53
|
+
"login.tip": "💡 İpucu: Durum kontrolü için \"tsoft whoami\" komutunu kullanın.",
|
|
54
|
+
"login.json_error.message": "Login komutu interaktif mod gerektiriyor.",
|
|
55
|
+
"login.json_error.hint": "CI/CD icin onceden tsoft login ile kimlik dogrulayip token'i sakladiktan sonra kullanin.",
|
|
56
|
+
"login.error_log": "Detaylar için log dosyalarını kontrol edin.",
|
|
57
|
+
"login.security_error": "State parametresi eşleşmiyor! Güvenlik hatası olabilir.",
|
|
58
|
+
|
|
59
|
+
"logout.starting": "🚪 Çıkış yapılıyor...",
|
|
60
|
+
"logout.not_logged_in": "⚠️ Zaten giriş yapmamışsınız.",
|
|
61
|
+
"logout.revoking": "🔄 Token iptal ediliyor...",
|
|
62
|
+
"logout.revoked": "✓ Token iptal edildi",
|
|
63
|
+
"logout.revoke_failed": "⚠️ Token iptal edilemedi (zaten geçersiz olabilir)",
|
|
64
|
+
"logout.credentials_cleared": "✓ Yerel kimlik bilgileri temizlendi",
|
|
65
|
+
"logout.success": "👋 Başarıyla çıkış yapıldı!",
|
|
66
|
+
"logout.relogin_tip": "Tekrar giriş yapmak için \"tsoft login\" komutunu kullanın.",
|
|
67
|
+
|
|
68
|
+
"whoami.not_logged_in": "⚠️ Giriş yapmamışsınız.",
|
|
69
|
+
"whoami.not_logged_in_tip": "Giriş yapmak için \"tsoft login\" komutunu kullanın.",
|
|
70
|
+
"whoami.not_logged_in.json.message": "Giris yapilmamis.",
|
|
71
|
+
"whoami.not_logged_in.json.hint": "Giris yapmak icin: tsoft login --org",
|
|
72
|
+
"whoami.token_refreshed": "🔄 Token otomatik olarak yenilendi",
|
|
73
|
+
"whoami.session_expired": "⚠️ Oturum süresi dolmuş, yeniden giriş yapılıyor...",
|
|
74
|
+
"whoami.title": "👤 Kimlik Bilgileri",
|
|
75
|
+
"whoami.user_label": "Kullanıcı:",
|
|
76
|
+
"whoami.store_label": "Store:",
|
|
77
|
+
"whoami.access_token_label": "Access Token:",
|
|
78
|
+
"whoami.refresh_token_label": "Refresh Token:",
|
|
79
|
+
"whoami.config_dir_label": "Config Dizini:",
|
|
80
|
+
"whoami.last_update_label": "Son Güncelleme:",
|
|
81
|
+
"whoami.token_valid": "✓ Geçerli ({{expiry}} kaldı)",
|
|
82
|
+
"whoami.token_expired": "✗ Süresi dolmuş",
|
|
83
|
+
"whoami.refresh_valid": "✓ Geçerli ({{days}} gün kaldı)",
|
|
84
|
+
"whoami.relogin_tip": "Ipucu: tsoft login --org ile tekrar giris yapin",
|
|
85
|
+
|
|
86
|
+
"theme.listing": "📋 Temalar listeleniyor...",
|
|
87
|
+
"theme.no_themes": "⚠️ Henüz tema bulunmuyor.",
|
|
88
|
+
"theme.count": "Toplam {{count}} tema bulundu:",
|
|
89
|
+
"theme.folder_label": "Klasör:",
|
|
90
|
+
"theme.creating": "🎨 Yeni tema oluşturuluyor...",
|
|
91
|
+
"theme.name_prompt": "Tema Adı:",
|
|
92
|
+
"theme.name_required": "Tema adı boş olamaz",
|
|
93
|
+
"theme.description_prompt": "Açıklama:",
|
|
94
|
+
"theme.author_prompt": "Geliştirici:",
|
|
95
|
+
"theme.minimal_prompt": "Minimal tema oluşturulsun mu?\n\nMinimal tema sadece temel blokları içerir.",
|
|
96
|
+
"theme.minimal_title": "🎨 Tema Tipi",
|
|
97
|
+
"theme.dir_exists_title": "⚠️ Dizin Mevcut",
|
|
98
|
+
"theme.dir_exists_prompt": "Dizin zaten mevcut!\n\nKonum: {{path}}\n\nÜzerine yazılsın mı?",
|
|
99
|
+
"theme.dir_overwrite_prompt": "Dizin zaten mevcut!\n\nKonum: {{path}}\n\nUzerine yazilsin mi?",
|
|
100
|
+
"theme.cancelled": "İşlem iptal edildi.",
|
|
101
|
+
"theme.saving_db": "🔄 Tema veritabanına kaydediliyor...",
|
|
102
|
+
"theme.saved_db": "✓ Tema veritabanına kaydedildi",
|
|
103
|
+
"theme.downloading_files": "🔄 Tema dosyaları indiriliyor...",
|
|
104
|
+
"theme.files_downloaded": "✓ Tema dosyaları indirildi",
|
|
105
|
+
"theme.extracting": "🔄 Dosyalar çıkartılıyor...",
|
|
106
|
+
"theme.extracted": "✓ Dosyalar çıkartıldı: {{path}}",
|
|
107
|
+
"theme.active_set": "✓ Aktif tema olarak ayarlandı",
|
|
108
|
+
"theme.create_success": "🎉 Tema başarıyla oluşturuldu!",
|
|
109
|
+
"theme.create_location": "Konum: {{path}}",
|
|
110
|
+
"theme.dev_start_tip": "Tema geliştirmeye başlamak için:",
|
|
111
|
+
"theme.file_write_error": "Dosya yazılırken bir hata oluştu.",
|
|
112
|
+
"theme.validation_tip": "İpucu: Lütfen girdiğiniz bilgileri kontrol edin.",
|
|
113
|
+
"theme.token_tip": "İpucu: Önce \"tsoft login\" komutuyla giriş yapın.",
|
|
114
|
+
"theme.connection_error": "Bağlantı Hatası",
|
|
115
|
+
"theme.connection_check": "İnternet bağlantınızı kontrol edip tekrar deneyin.",
|
|
116
|
+
"theme.updating": "🔄 Tema oluşturuluyor...",
|
|
117
|
+
"theme.update_failed_contact": "İpucu: Lütfen sistem yöneticinizle iletişime geçin.",
|
|
118
|
+
"theme.force_update_confirm": "Default tema otomatik olarak güncellenecek ve yeni temanız oluşturulacak.\n\n🔸 Bu işlem:\n • Default temayı en güncel versiyona yükseltir\n • Tüm layout ve section'ları günceller\n • Yeni temanızı güncel default tema üzerinden oluşturur\n\n⏱️ Bu işlem birkaç dakika sürebilir.\n\nDevam edilsin mi?",
|
|
119
|
+
"theme.force_update_title": "🔄 Default Tema Güncellemesi",
|
|
120
|
+
"theme.force_updating": "⏳ Default tema güncelleniyor ve yeni tema oluşturuluyor...",
|
|
121
|
+
"theme.force_update_success_1": "✓ Default tema başarıyla güncellendi",
|
|
122
|
+
"theme.force_update_success_2": "✓ Yeni tema oluşturuldu",
|
|
123
|
+
|
|
124
|
+
"theme.pull.starting": "📥 Tema indirme işlemi başlatılıyor...",
|
|
125
|
+
"theme.pull.no_themes": "İndirilecek tema bulunamadı.",
|
|
126
|
+
"theme.pull.select_title": "Tema İndirme",
|
|
127
|
+
"theme.pull.select_prompt": "Hangi temayı indirmek istiyorsunuz?",
|
|
128
|
+
"theme.pull.downloading": "📦 \"{{name}}\" indiriliyor...",
|
|
129
|
+
"theme.pull.success": "🎉 Tema başarıyla indirildi!",
|
|
130
|
+
|
|
131
|
+
"theme.use.starting": "🎯 Aktif tema ayarlanıyor...",
|
|
132
|
+
"theme.use.no_themes": "Tema bulunamadı.",
|
|
133
|
+
"theme.use.not_found": "❌ Tema bulunamadı: {{name}}",
|
|
134
|
+
"theme.use.available": "Mevcut temalar:",
|
|
135
|
+
"theme.use.select_prompt": "Hangi temayı aktif yapmak istiyorsunuz?",
|
|
136
|
+
"theme.use.select_title": "🎯 Tema Seçimi",
|
|
137
|
+
"theme.use.set": "✓ Aktif tema ayarlandı: {{name}}",
|
|
138
|
+
"theme.use.folder": "Klasör: {{folder}}",
|
|
139
|
+
|
|
140
|
+
"push.no_active_theme": "Aktif tema bulunamadi.",
|
|
141
|
+
"push.usage": "Kullanim: tsoft theme push <theme-name>",
|
|
142
|
+
"push.use_tip": "veya \"tsoft theme use <theme-name>\" ile aktif tema ayarlayin.",
|
|
143
|
+
"push.connecting": "Sunucuya baglaniliyor...",
|
|
144
|
+
"push.checking_status": "Mevcut durum kontrol ediliyor...",
|
|
145
|
+
"push.pushing": "Tema push ediliyor...",
|
|
146
|
+
"push.no_changes": "Degisiklik yok -- mevcut draft guncel.",
|
|
147
|
+
"push.success": "Push tamamlandi",
|
|
148
|
+
"push.first_push_note": "(ilk push)",
|
|
149
|
+
"push.admin_approval": "Admin onayindan sonra 1.0.0 olarak yayinlanacak",
|
|
150
|
+
"push.draft_created": "Yeni draft olusturuldu",
|
|
151
|
+
"push.draft_updated": "Mevcut draft guncellendi",
|
|
152
|
+
"push.changes_added": "+{{count}} yeni",
|
|
153
|
+
"push.changes_removed": "~{{count}} kaldirildi",
|
|
154
|
+
|
|
155
|
+
"dev.starting": "🚀 Geliştirme ortamı başlatılıyor...",
|
|
156
|
+
"dev.active_site": "📍 Aktif Site:",
|
|
157
|
+
"dev.active_theme": "📍 Aktif Tema:",
|
|
158
|
+
"dev.continue_prompt": "Bu site ve tema ile devam etmek istiyor musunuz?",
|
|
159
|
+
"dev.continue_title": "Geliştirme Ortamı",
|
|
160
|
+
"dev.no_themes": "Tema bulunamadı.",
|
|
161
|
+
"dev.select_theme_prompt": "Hangi tema ile çalışmak istiyorsunuz?",
|
|
162
|
+
"dev.select_theme_title": "🎨 Tema Seçimi",
|
|
163
|
+
"dev.active_theme_set": "✓ Aktif tema: {{slug}}",
|
|
164
|
+
"dev.working_dir": "✓ Çalışma dizini: {{path}}",
|
|
165
|
+
"dev.fork_warning_title": "Fork Uyarisi",
|
|
166
|
+
"dev.fork_warning": "Bu tema baska bir organizasyona ait!\n\nTema: {{name}} v{{version}}\nTema Organizasyonu: Organization #{{org_id}}\nSizin Organizasyonunuz: {{user_org}}\n\nFork olusturularak kendi kopyanizda calisabilirsiniz.",
|
|
167
|
+
"dev.fork_cancelled": "Islem iptal edildi.\n\nOneriler:\n tsoft org switch - Organizasyon degistir\n tsoft theme list - Temalari listele",
|
|
168
|
+
"dev.forking": "Tema fork ediliyor...",
|
|
169
|
+
"dev.fork_success": "✓ Tema fork edildi: {{name}}",
|
|
170
|
+
"dev.fork_source": "Kaynak: {{source}} v{{version}}",
|
|
171
|
+
"dev.dir_exists_title": "Dizin Mevcut",
|
|
172
|
+
"dev.dir_exists_prompt": "Dizin zaten mevcut!\n\nKonum: {{path}}\n\nUzerine yazilsin mi?",
|
|
173
|
+
"dev.theme_not_found": "Tema dizini bulunamadı!\n\nBeklenen: {{path}}\n\nÇözüm: tsoft theme pull",
|
|
174
|
+
"dev.checking_lock": "🔒 Lock durumu kontrol ediliyor...",
|
|
175
|
+
"dev.not_locked": "✓ Tema kilitli değil",
|
|
176
|
+
"dev.acquiring_lock": "🔐 Kilit alınıyor...",
|
|
177
|
+
"dev.lock_acquired": "✓ Kilit başarıyla alındı",
|
|
178
|
+
"dev.already_locked": "✓ Zaten sizin kiliniz var",
|
|
179
|
+
"dev.already_synced": "✓ Tema senkronize",
|
|
180
|
+
"dev.not_synced": "⚠️ Kilit var ama tema senkronize değil",
|
|
181
|
+
"dev.lock_by_other": "Tema başka bir developer tarafından kilitli!\n\nDeveloper: {{dev}}\nSon erişim: {{last_access}}\n\nKilidi almak istediğinizden emin misiniz?",
|
|
182
|
+
"dev.lock_warning_title": "🔒 Kilit Uyarısı",
|
|
183
|
+
"dev.lock_override": "🔐 Kilit alınıyor (override)...",
|
|
184
|
+
"dev.watching": "👀 Dosya değişiklikleri izleniyor...",
|
|
185
|
+
"dev.env_running": "💡 Geliştirme ortamı çalışıyor",
|
|
186
|
+
"dev.exit_tip": "Ctrl+C ile güvenli çıkış yapabilirsiniz",
|
|
187
|
+
"dev.stopping": "⏸️ Geliştirme ortamı kapatılıyor...",
|
|
188
|
+
"dev.watch_stopped": "✓ Dosya izleme durduruldu",
|
|
189
|
+
"dev.keepalive_stopped": "✓ Keep-alive durduruldu",
|
|
190
|
+
"dev.lock_kept": "(Lock aktif bırakıldı - sonraki sefer devam edebilirsiniz)",
|
|
191
|
+
"dev.exit_success": "✓ Güvenli çıkış yapıldı",
|
|
192
|
+
"dev.sync_pulling": "📥 Son değişiklikler çekiliyor...",
|
|
193
|
+
"dev.sync_updated": "✓ Dosyalar güncellendi",
|
|
194
|
+
"dev.sync_marking": "🔄 Senkronizasyon işaretleniyor...",
|
|
195
|
+
"dev.sync_done": "✓ Tema senkronize edildi",
|
|
196
|
+
"dev.lock_stolen": "❌ Tema kilidi başka bir developer tarafından alındı!",
|
|
197
|
+
"dev.lock_stolen_owner": "Yeni kilit sahibi: {{owner}}",
|
|
198
|
+
"dev.lock_stolen_stopping": "Geliştirme ortamı durduruluyor...",
|
|
199
|
+
"dev.lock_lost": "❌ Tema başka bir developer tarafından kilitlendi!",
|
|
200
|
+
"dev.not_synced_pulling": "⚠️ Tema senkronize değil! Pull yapılıyor...",
|
|
201
|
+
"dev.file_deleted": "🗑️ {{path}} → Silindi",
|
|
202
|
+
"dev.file_delete_failed": "{{path}} → Silinemedi: {{error}}",
|
|
203
|
+
"dev.file_saved": "✓ {{path}} → Kaydedildi ({{duration}}ms)",
|
|
204
|
+
"dev.file_error": "{{path}} → Hata: {{error}}",
|
|
205
|
+
"dev.keepalive_error": "⚠️ Keep-alive hatası (yeniden denenecek)",
|
|
206
|
+
|
|
207
|
+
"init.no_themes": "Tema bulunamadi.",
|
|
208
|
+
"init.select_prompt": "Hangi temayi fork etmek istiyorsunuz?",
|
|
209
|
+
"init.select_title": "Tema Secimi",
|
|
210
|
+
"init.confirm_prompt": "{{name}} v{{version}} fork edilecek.\nDevam etmek istiyor musunuz?",
|
|
211
|
+
"init.confirm_title": "Fork Onayi",
|
|
212
|
+
"init.cancelled": "Islem iptal edildi.",
|
|
213
|
+
"init.forking": "Tema fork ediliyor...",
|
|
214
|
+
"init.dir_exists_title": "Dizin Mevcut",
|
|
215
|
+
"init.dir_exists_prompt": "Dizin zaten mevcut!\n\nKonum: {{path}}\n\nUzerine yazilsin mi?",
|
|
216
|
+
"init.dir_cancelled": "Islem iptal edildi.",
|
|
217
|
+
"init.downloading": "Tema dosyalari indiriliyor...",
|
|
218
|
+
"init.success": "Tema basariyla fork edildi!",
|
|
219
|
+
"init.theme_label": "Tema:",
|
|
220
|
+
"init.source_label": "Kaynak:",
|
|
221
|
+
"init.location_label": "Konum:",
|
|
222
|
+
"init.dev_tip": "Gelistirmeye baslamak icin: tsoft theme dev {{slug}}",
|
|
223
|
+
"init.json_error.message": "--from parametresi gerekli (JSON modda interaktif secim desteklenmez)",
|
|
224
|
+
"init.json_error.hint": "Kullanim: tsoft --json theme init --from <slug>",
|
|
225
|
+
"init.theme_not_found": "Tema bulunamadi: {{slug}}",
|
|
226
|
+
|
|
227
|
+
"section.list.no_active_theme": "Aktif tema bulunamadı. Lütfen önce \"tsoft theme use <tema-adı>\" komutunu çalıştırın.",
|
|
228
|
+
"section.list.starting": "Section'lar listeleniyor...",
|
|
229
|
+
"section.list.active_theme": "Aktif Tema: {{theme}}",
|
|
230
|
+
"section.list.no_blocks": "⚠️ Henüz block bulunmuyor.",
|
|
231
|
+
"section.list.count": "Toplam {{count}} block bulundu:",
|
|
232
|
+
"section.list.id_label": "ID:",
|
|
233
|
+
"section.list.folder_label": "Klasör:",
|
|
234
|
+
"section.list.sections_label": "Mevcut section'lar ({{count}}):",
|
|
235
|
+
"section.list.tags_label": "Etiketler:",
|
|
236
|
+
"section.list.file_label": "Dosya:",
|
|
237
|
+
"section.list.no_sections": "⚠️ Bu block için section bulunmuyor",
|
|
238
|
+
|
|
239
|
+
"section.add.no_active_theme": "Aktif tema bulunamadı. Lütfen önce \"tsoft theme use <tema-adı>\" komutunu çalıştırın.",
|
|
240
|
+
"section.add.starting": "🔧 Section ekleme işlemi başlatılıyor...",
|
|
241
|
+
"section.add.active_theme": "Aktif Tema: {{theme}}",
|
|
242
|
+
"section.add.no_blocks": "Eklenecek block bulunamadı.",
|
|
243
|
+
"section.add.no_sections": "Eklenecek section bulunamadı.",
|
|
244
|
+
"section.add.block_select_prompt": "Hangi block'ı eklemek istiyorsunuz?",
|
|
245
|
+
"section.add.block_select_title": "📦 Block Seçimi",
|
|
246
|
+
"section.add.block_selected": "\"{{name}}\" block'u seçildi.",
|
|
247
|
+
"section.add.mode_prompt": "Nasıl eklemek istersiniz?",
|
|
248
|
+
"section.add.mode_all": "Tüm section'ları ekle",
|
|
249
|
+
"section.add.mode_selective": "Belirli section'ları seç",
|
|
250
|
+
"section.add.mode_title": "🎯 Ekleme Modu",
|
|
251
|
+
"section.add.checkbox_prompt": "Eklenecek section'ları seçin (Space ile işaretle):",
|
|
252
|
+
"section.add.min_one": "En az bir section seçmelisiniz.",
|
|
253
|
+
"section.add.summary": "{{count}} section eklenecek:",
|
|
254
|
+
"section.add.confirm_prompt": "{{count}} section \"{{theme}}\" temasına eklenecek.\n\nDevam etmek istiyor musunuz?",
|
|
255
|
+
"section.add.confirm_title": "✅ Onay",
|
|
256
|
+
"section.add.cancelled": "İşlem iptal edildi.",
|
|
257
|
+
"section.add.adding": "🔄 Section'lar ekleniyor...",
|
|
258
|
+
"section.add.added": "✓ {{name}} eklendi",
|
|
259
|
+
"section.add.already_exists": "⚠️ {{name}} zaten mevcut.",
|
|
260
|
+
"section.add.overwrite_prompt": "Ne yapmak istersiniz?",
|
|
261
|
+
"section.add.overwrite": "Üzerine yaz",
|
|
262
|
+
"section.add.overwrite_all": "Tümünün üzerine yaz",
|
|
263
|
+
"section.add.skip": "Atla",
|
|
264
|
+
"section.add.overwrite_title": "🔄 Üzerine Yazma",
|
|
265
|
+
"section.add.single_overwrite_prompt": "{{name}} zaten mevcut. Üzerine yazılsın mı?",
|
|
266
|
+
"section.add.single_overwrite_title": "🔄 Üzerine Yazma",
|
|
267
|
+
"section.add.overwritten": "✓ {{name}} üzerine yazıldı",
|
|
268
|
+
"section.add.skipped": "○ {{name}} atlandı",
|
|
269
|
+
"section.add.failed": "✗ {{name}} eklenemedi: {{error}}",
|
|
270
|
+
"section.add.success_count": "✓ {{count}} section başarıyla eklendi",
|
|
271
|
+
"section.add.error_count": "✗ {{count}} section eklenemedi",
|
|
272
|
+
"section.add.updating_files": "🔄 Tema dosyaları güncelleniyor...",
|
|
273
|
+
"section.add.files_downloaded": "✓ Tema dosyaları indirildi",
|
|
274
|
+
"section.add.files_updating": "🔄 Dosyalar güncelleniyor...",
|
|
275
|
+
"section.add.files_updated": "✓ Tema dosyaları güncellendi",
|
|
276
|
+
"section.add.complete": "🎉 İşlem tamamlandı!",
|
|
277
|
+
"section.add.location": "Konum: {{path}}",
|
|
278
|
+
"section.add.download_error": "⚠️ Tema dosyaları güncellenirken hata oluştu:",
|
|
279
|
+
"section.add.manual_tip": "💡 Manuel olarak temayı tekrar indirmeyi deneyin:",
|
|
280
|
+
"section.add.manual_command": "tsoft theme pull",
|
|
281
|
+
|
|
282
|
+
"org.switch.json_error.message": "Bu komut interaktif mod gerektiriyor.",
|
|
283
|
+
"org.switch.json_error.hint": "JSON modunda org switch desteklenmiyor.",
|
|
284
|
+
"org.switch.no_store": "Aktif magaza bulunamadi. Lutfen once \"tsoft login\" komutunu calistirin.",
|
|
285
|
+
"org.switch.no_token": "Token bulunamadi. Lutfen once \"tsoft login\" komutunu calistirin.",
|
|
286
|
+
"org.switch.loading": "Organizasyonlar yukleniyor...",
|
|
287
|
+
"org.switch.no_orgs": "Hicbir organizasyona uyesiniz degil.",
|
|
288
|
+
"org.switch.select_prompt": "Hangi organizasyonda calisacaksiniz?",
|
|
289
|
+
"org.switch.select_title": "Organizasyon Secimi",
|
|
290
|
+
"org.switch.selecting": "{{name}} seciliyor...",
|
|
291
|
+
"org.switch.success": "Aktif organizasyon: {{name}}\nID: {{id}}\n\nArtik bu organizasyon altinda tema gelistirebilirsiniz.",
|
|
292
|
+
"org.switch.error": "Organizasyon secimi basarisiz: {{error}}",
|
|
293
|
+
|
|
294
|
+
"help.tagline": "tsoft360 için tema geliştirme araç seti",
|
|
295
|
+
"help.footer": "Detaylar için: tsoft <komut> --help",
|
|
296
|
+
"help.group.development": "Geliştirme",
|
|
297
|
+
"help.group.theme_management": "Tema Yönetimi",
|
|
298
|
+
"help.group.account": "Hesap",
|
|
299
|
+
"help.cmd.theme_dev": "Canlı yenileme ile tema geliştirme sunucusunu başlat",
|
|
300
|
+
"help.cmd.theme_push": "Tema dosyalarını mağazanıza gönderin",
|
|
301
|
+
"help.cmd.theme_section_list": "Aktif temadaki tüm section'ları listeleyin",
|
|
302
|
+
"help.cmd.theme_section_add": "Aktif temaya yeni bir section ekleyin",
|
|
303
|
+
"help.cmd.theme_list": "Mağazanızdaki tüm temaları listeleyin",
|
|
304
|
+
"help.cmd.theme_create": "Yeni bir tema oluşturun",
|
|
305
|
+
"help.cmd.theme_pull": "Mevcut bir temayı indirin",
|
|
306
|
+
"help.cmd.theme_use": "Aktif temayı ayarlayın",
|
|
307
|
+
"help.cmd.theme_init": "Mevcut bir temayi fork ederek yeni tema başlatın",
|
|
308
|
+
"help.cmd.login": "tsoft360 mağazanızla kimlik doğrulayın",
|
|
309
|
+
"help.cmd.logout": "Oturumu kapatın ve yerel kimlik bilgilerini temizleyin",
|
|
310
|
+
"help.cmd.whoami": "Giriş yapan kullanıcı ve mağaza bilgilerini gösterin",
|
|
311
|
+
"help.cmd.org_switch": "Aktif organizasyonu değiştirin",
|
|
312
|
+
|
|
313
|
+
"help.status.logged_in": "{{email}} ({{store}})",
|
|
314
|
+
"help.status.not_logged_in": "Giriş yapılmadı — tsoft login",
|
|
315
|
+
"help.status.active_theme": "Tema: {{theme}}",
|
|
316
|
+
"help.status.no_theme": "Aktif tema yok — tsoft theme init",
|
|
317
|
+
|
|
318
|
+
"publish.deprecated": "Uyari: \"theme publish\" yerine \"theme push\" kullanin.",
|
|
319
|
+
"submit.deprecated": "Uyari: Submit islemi artik partner panelden yapiliyor.",
|
|
320
|
+
"submit.step1": "1. tsoft theme push",
|
|
321
|
+
"submit.step2": "2. Partner panelde meta/screenshot tamamlayin",
|
|
322
|
+
"submit.step3": "3. Partner panelden submit edin"
|
|
323
|
+
}
|
package/package.json
CHANGED
|
@@ -1,59 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsoft-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"author": "T-Soft",
|
|
6
|
-
"license": "ISC",
|
|
3
|
+
"version": "3.4.0",
|
|
4
|
+
"description": "tsoft360 tema geliştirme ve yönetim aracı",
|
|
7
5
|
"type": "module",
|
|
8
|
-
"packageManager": "pnpm@9.9.0",
|
|
9
|
-
"main": "/build/index.js",
|
|
10
|
-
"types": "/build/index.d.ts",
|
|
11
6
|
"bin": {
|
|
12
|
-
"tsoft": "
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsc"
|
|
7
|
+
"tsoft": "src/index.js"
|
|
16
8
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"@tsoft-cli/theme": "1.5.12",
|
|
20
|
-
"@tsoft-cli/shared": "1.1.2"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/node": "^22.5.2",
|
|
24
|
-
"ts-node": "^10.9.2",
|
|
25
|
-
"typescript": "^5.5.4"
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18.0.0"
|
|
26
11
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"identifier": "COMMANDS"
|
|
34
|
-
},
|
|
35
|
-
"topicSeparator": " ",
|
|
36
|
-
"topics": {
|
|
37
|
-
"theme": {
|
|
38
|
-
"description": "Tema işlemleri"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start": "node src/index.js",
|
|
14
|
+
"dev": "node --watch src/index.js",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"check-locales": "node scripts/check-locales.js"
|
|
41
18
|
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"tsoft",
|
|
21
|
+
"tsoft360",
|
|
22
|
+
"cli",
|
|
23
|
+
"theme",
|
|
24
|
+
"development"
|
|
25
|
+
],
|
|
26
|
+
"author": "T-Soft",
|
|
27
|
+
"license": "MIT",
|
|
42
28
|
"files": [
|
|
43
|
-
"
|
|
29
|
+
"src/",
|
|
30
|
+
"locales/",
|
|
31
|
+
"README.md",
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"LICENSE"
|
|
44
34
|
],
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@inquirer/prompts": "^8.0.2",
|
|
37
|
+
"adm-zip": "^0.5.16",
|
|
38
|
+
"axios": "^1.14.0",
|
|
39
|
+
"boxen": "^8.0.1",
|
|
40
|
+
"chalk": "^5.3.0",
|
|
41
|
+
"chokidar": "^5.0.0",
|
|
42
|
+
"cli-progress": "^3.12.0",
|
|
43
|
+
"cli-spinners": "^3.3.0",
|
|
44
|
+
"commander": "^12.1.0",
|
|
45
|
+
"gradient-string": "^3.0.0",
|
|
46
|
+
"open": "^10.1.0",
|
|
47
|
+
"ora": "^9.3.0",
|
|
48
|
+
"strip-ansi": "^7.1.2"
|
|
53
49
|
},
|
|
54
|
-
"homepage": "https://github.com/tekrom/tsoft-cli
|
|
50
|
+
"homepage": "https://github.com/tekrom/tsoft-cli",
|
|
55
51
|
"repository": {
|
|
56
52
|
"type": "git",
|
|
57
53
|
"url": "git+https://github.com/tekrom/tsoft-cli.git"
|
|
58
54
|
}
|
|
59
|
-
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { loadTokens, ensureValidToken } from './storage.js';
|
|
3
|
+
|
|
4
|
+
export class ApiClient {
|
|
5
|
+
constructor(store) {
|
|
6
|
+
this.store = store;
|
|
7
|
+
this.baseURL = `https://${store}/api/v3/public/onlinestore`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async getAuthHeaders() {
|
|
11
|
+
let tokens = await loadTokens(this.store);
|
|
12
|
+
|
|
13
|
+
if (!tokens) {
|
|
14
|
+
throw new Error('Token bulunamadı. Lütfen önce "tsoft login" komutunu çalıştırın.');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
tokens = await ensureValidToken(tokens);
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
'Authorization': `Bearer ${tokens.accessToken}`,
|
|
21
|
+
'Accept': 'application/json',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async get(endpoint, config = {}) {
|
|
26
|
+
const headers = await this.getAuthHeaders();
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const response = await axios.get(`${this.baseURL}${endpoint}`, {
|
|
30
|
+
...config,
|
|
31
|
+
headers: { ...headers, ...config.headers },
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return response.data;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
this.handleError(error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async post(endpoint, data = {}, config = {}) {
|
|
41
|
+
const headers = await this.getAuthHeaders();
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const response = await axios.post(`${this.baseURL}${endpoint}`, data, {
|
|
45
|
+
...config,
|
|
46
|
+
headers: { ...headers, ...config.headers },
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return response.data;
|
|
50
|
+
} catch (error) {
|
|
51
|
+
this.handleError(error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async download(endpoint, params = {}) {
|
|
56
|
+
const headers = await this.getAuthHeaders();
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
const response = await axios.post(`${this.baseURL}${endpoint}`, params, {
|
|
60
|
+
headers,
|
|
61
|
+
responseType: 'stream',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return response;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
this.handleError(error);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Tema için tüm section'ları listeler
|
|
72
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
73
|
+
* @returns {Promise<Object>} Block'lar ve default_sections
|
|
74
|
+
*/
|
|
75
|
+
async getSections(themeUuid) {
|
|
76
|
+
return await this.get(`/theme/${themeUuid}/sections`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Temaya section ekler
|
|
81
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
82
|
+
* @param {number} blockId - Block ID
|
|
83
|
+
* @param {number|null} themeSectionId - Section ID (nullable)
|
|
84
|
+
* @param {boolean} force - Üzerine yazma bayrağı
|
|
85
|
+
* @returns {Promise<Object>} İşlem sonucu
|
|
86
|
+
*/
|
|
87
|
+
async addSection(themeUuid, blockId, themeSectionId = null, force = false) {
|
|
88
|
+
const payload = {};
|
|
89
|
+
if (themeSectionId) {
|
|
90
|
+
payload.theme_section_id = themeSectionId;
|
|
91
|
+
}
|
|
92
|
+
if (force) {
|
|
93
|
+
payload.force = true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return await this.post(`/theme/${themeUuid}/sections/${blockId}`, payload);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Tema dev status'ünü getir
|
|
101
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
102
|
+
* @returns {Promise<Object>} Dev version durumu
|
|
103
|
+
*/
|
|
104
|
+
async getThemeDevStatus(themeUuid) {
|
|
105
|
+
return await this.get(`/theme/${themeUuid}/dev-status`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Version bump önerilerini getir
|
|
110
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
111
|
+
* @returns {Promise<Object>} Version önerileri
|
|
112
|
+
*/
|
|
113
|
+
async getVersionSuggestions(themeUuid) {
|
|
114
|
+
return await this.get(`/theme/${themeUuid}/suggest-version`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Temayı yayınla
|
|
119
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
120
|
+
* @param {Object} data - Publish verisi
|
|
121
|
+
* @param {string} [data.version] - İlk publish için version (örn: "1.0.0")
|
|
122
|
+
* @param {string} [data.version_bump] - Güncelleme için bump tipi (major/minor/patch)
|
|
123
|
+
* @returns {Promise<Object>} Publish sonucu
|
|
124
|
+
*/
|
|
125
|
+
async publishTheme(themeUuid, data) {
|
|
126
|
+
return await this.post(`/theme/${themeUuid}/publish`, data);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Temayı sync eder (build işlemi tetiklenir)
|
|
131
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
132
|
+
* @returns {Promise<Object>} Sync sonucu
|
|
133
|
+
*/
|
|
134
|
+
async syncTheme(themeUuid) {
|
|
135
|
+
return await this.post(`/theme/${themeUuid}/sync`);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Temayı incelemeye gönder (admin onayı için)
|
|
140
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
141
|
+
* @returns {Promise<Object>} Submit sonucu
|
|
142
|
+
*/
|
|
143
|
+
async submitThemeForReview(themeUuid) {
|
|
144
|
+
return await this.post(`/theme/${themeUuid}/submit-for-review`);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Temayi fork eder (kendi organizasyonuna kopyalar)
|
|
149
|
+
* @param {string} themeUuid - Fork edilecek tema UUID/folder
|
|
150
|
+
* @returns {Promise<Object>} Fork sonucu (yeni tema bilgileri)
|
|
151
|
+
*/
|
|
152
|
+
async forkTheme(themeUuid) {
|
|
153
|
+
return await this.post(`/theme/${themeUuid}/fork`);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Tema push et (draft olustur/guncelle)
|
|
158
|
+
* Orijinal axios error'u korur (error mapper icin response.data gerekli)
|
|
159
|
+
* @param {string} themeUuid - Tema UUID/folder
|
|
160
|
+
* @returns {Promise<Object>} Push sonucu
|
|
161
|
+
*/
|
|
162
|
+
async pushTheme(themeUuid) {
|
|
163
|
+
const headers = await this.getAuthHeaders();
|
|
164
|
+
try {
|
|
165
|
+
const response = await axios.post(`${this.baseURL}/theme/${themeUuid}/push`, {}, { headers });
|
|
166
|
+
return response.data;
|
|
167
|
+
} catch (error) {
|
|
168
|
+
// Re-throw with original response attached for error mapper
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
handleError(error) {
|
|
174
|
+
if (error.response) {
|
|
175
|
+
const status = error.response.status;
|
|
176
|
+
const message = error.response.data?.message || error.message;
|
|
177
|
+
const context = error.response.data?.context;
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
if (status === 401) {
|
|
181
|
+
throw new Error('Yetkilendirme hatası. Lütfen tekrar giriş yapın: tsoft login');
|
|
182
|
+
} else if (status === 403) {
|
|
183
|
+
throw new Error(message || 'Bu işlem için yetkiniz yok.');
|
|
184
|
+
} else if (status === 404) {
|
|
185
|
+
throw new Error('İstenen kaynak bulunamadı.');
|
|
186
|
+
} else if (status === 422) {
|
|
187
|
+
const errorMessage = error.response.data?.error || message;
|
|
188
|
+
// 422 hatalarını yukarı fırlat, üst katmanda handle edilecek
|
|
189
|
+
throw new Error(`VALIDATION_ERROR:${errorMessage}`);
|
|
190
|
+
} else if (status === 428) {
|
|
191
|
+
const lockOwnerInfo = context?.lockOwnerUsername || 'Başka bir developer';
|
|
192
|
+
throw new Error(`LOCK_STOLEN:${lockOwnerInfo}`);
|
|
193
|
+
} else if (status >= 500) {
|
|
194
|
+
throw new Error(`Sunucu hatası: ${message}`);
|
|
195
|
+
} else {
|
|
196
|
+
throw new Error(`API Hatası: ${message}`);
|
|
197
|
+
}
|
|
198
|
+
} else if (error.request) {
|
|
199
|
+
throw new Error('Sunucuya bağlanılamadı. İnternet bağlantınızı kontrol edin.');
|
|
200
|
+
} else {
|
|
201
|
+
throw new Error(`Hata: ${error.message}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export async function createApiClient(store = null) {
|
|
207
|
+
const { getActiveStore } = await import('./storage.js');
|
|
208
|
+
|
|
209
|
+
if (!store) {
|
|
210
|
+
store = await getActiveStore();
|
|
211
|
+
if (!store) {
|
|
212
|
+
throw new Error('Aktif mağaza bulunamadı. Lütfen önce "tsoft login" komutunu çalıştırın.');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return new ApiClient(store);
|
|
217
|
+
}
|