tsoft-cli 3.4.1 → 3.4.3

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 CHANGED
@@ -5,7 +5,19 @@ All notable changes to T-Soft CLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [3.4.1] - 2026-04-08
8
+ ## [3.4.3] - 2026-04-08
9
+
10
+ ### Fixed
11
+ - Login check before theme create — no more crash when not logged in
12
+
13
+ ### Changed
14
+ - Confirm prompts now use Evet/Hayır select instead of y/N
15
+ - "Minimal tema" renamed to "Starter tema"
16
+
17
+ ## [3.4.2] - 2026-04-08
18
+
19
+ ### Fixed
20
+ - Version now read from package.json instead of hardcoded value
9
21
 
10
22
  ### Changed
11
23
  - OAuth callback page redesigned — clean white background with bordered card
package/locales/en.json CHANGED
@@ -9,6 +9,8 @@
9
9
  "ui.label.theme_selection": "🎨 Theme Selection",
10
10
  "ui.label.loading": "⏳ Processing",
11
11
  "ui.prompt.continue": "Do you want to continue?",
12
+ "ui.label.yes": "Yes",
13
+ "ui.label.no": "No",
12
14
  "ui.label.disabled": "(Disabled)",
13
15
 
14
16
  "error.push.pending_review.message": "Cannot push: theme is pending review.",
@@ -87,12 +89,13 @@
87
89
  "theme.no_themes": "⚠️ No themes found yet.",
88
90
  "theme.count": "Total {{count}} themes found:",
89
91
  "theme.folder_label": "Folder:",
92
+ "theme.login_required": "You must log in first. Run: tsoft login",
90
93
  "theme.creating": "🎨 Creating new theme...",
91
94
  "theme.name_prompt": "Theme Name:",
92
95
  "theme.name_required": "Theme name cannot be empty",
93
96
  "theme.description_prompt": "Description:",
94
97
  "theme.author_prompt": "Developer:",
95
- "theme.minimal_prompt": "Create a minimal theme?\n\nMinimal theme only includes basic blocks.",
98
+ "theme.minimal_prompt": "Start with a starter theme?\n\nStarter theme includes only basic blocks, suitable for building from scratch.",
96
99
  "theme.minimal_title": "🎨 Theme Type",
97
100
  "theme.dir_exists_title": "⚠️ Directory Exists",
98
101
  "theme.dir_exists_prompt": "Directory already exists!\n\nLocation: {{path}}\n\nOverwrite?",
package/locales/tr.json CHANGED
@@ -9,6 +9,8 @@
9
9
  "ui.label.theme_selection": "🎨 Tema Seçimi",
10
10
  "ui.label.loading": "⏳ İşlem Devam Ediyor",
11
11
  "ui.prompt.continue": "Devam etmek istiyor musunuz?",
12
+ "ui.label.yes": "Evet",
13
+ "ui.label.no": "Hayır",
12
14
  "ui.label.disabled": "(Devre Dışı)",
13
15
 
14
16
  "error.push.pending_review.message": "Push yapilamaz: tema inceleme bekliyor.",
@@ -87,12 +89,13 @@
87
89
  "theme.no_themes": "⚠️ Henüz tema bulunmuyor.",
88
90
  "theme.count": "Toplam {{count}} tema bulundu:",
89
91
  "theme.folder_label": "Klasör:",
92
+ "theme.login_required": "Önce giriş yapmalısınız. Çalıştırın: tsoft login",
90
93
  "theme.creating": "🎨 Yeni tema oluşturuluyor...",
91
94
  "theme.name_prompt": "Tema Adı:",
92
95
  "theme.name_required": "Tema adı boş olamaz",
93
96
  "theme.description_prompt": "Açıklama:",
94
97
  "theme.author_prompt": "Geliştirici:",
95
- "theme.minimal_prompt": "Minimal tema oluşturulsun mu?\n\nMinimal tema sadece temel blokları içerir.",
98
+ "theme.minimal_prompt": "Starter tema ile başlansın mı?\n\nStarter tema sadece temel blokları içerir, sıfırdan geliştirmeye uygundur.",
96
99
  "theme.minimal_title": "🎨 Tema Tipi",
97
100
  "theme.dir_exists_title": "⚠️ Dizin Mevcut",
98
101
  "theme.dir_exists_prompt": "Dizin zaten mevcut!\n\nKonum: {{path}}\n\nÜzerine yazılsın mı?",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsoft-cli",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "tsoft360 tema geliştirme ve yönetim aracı",
5
5
  "type": "module",
6
6
  "bin": {
@@ -73,6 +73,12 @@ export async function themeListCommand() {
73
73
 
74
74
  export async function themeCreateCommand() {
75
75
  try {
76
+ const store = await getActiveStore();
77
+ if (!store) {
78
+ showWarning(t('theme.login_required'));
79
+ return;
80
+ }
81
+
76
82
  console.log(chalk.cyan(t('theme.creating') + '\n'));
77
83
 
78
84
  const name = await input({
@@ -98,7 +104,6 @@ export async function themeCreateCommand() {
98
104
  }, t('theme.minimal_title'));
99
105
 
100
106
  const themeSlug = slugify(name);
101
- const store = await getActiveStore();
102
107
  const storeSlug = normalizeStoreDomain(store);
103
108
  const themePath = path.join(process.cwd(), storeSlug, themeSlug);
104
109
 
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { createRequire } from 'module';
3
4
  import { Command } from 'commander';
4
5
  import chalk from 'chalk';
5
6
  import { setJsonMode } from './output-mode.js';
@@ -17,6 +18,9 @@ import { themeSubmitCommand } from './commands/theme-submit.js';
17
18
  import { themeInitCommand } from './commands/theme-init.js';
18
19
  import { orgSwitchCommand } from './commands/org-switch.js';
19
20
 
21
+ const require = createRequire(import.meta.url);
22
+ const { version } = require('../package.json');
23
+
20
24
  initLocale();
21
25
 
22
26
  const program = new Command();
@@ -24,7 +28,7 @@ const program = new Command();
24
28
  program
25
29
  .name('tsoft')
26
30
  .description('tsoft360 theme development and management tool')
27
- .version('3.4.0');
31
+ .version(version);
28
32
 
29
33
  // Global --json flag for machine-readable output (CI/CD)
30
34
  program.option('--json', 'Machine-readable JSON output for CI/CD');
@@ -53,16 +53,26 @@ export function showBrandedBox(message, title = '', options = {}) {
53
53
  * @param {string} boxTitle - Box başlığı
54
54
  */
55
55
  export async function brandedConfirm(options, boxTitle = t('ui.label.confirm')) {
56
- const {message, ...restOptions} = options;
57
-
58
- // Box içinde mesajı göster
59
- showBrandedBox(message, boxTitle);
56
+ const {message, default: defaultValue = false, ...restOptions} = options;
57
+
58
+ // message içinde \n\n varsa: ilk satır = prompt sorusu, kalan = box açıklaması
59
+ let promptMessage = message;
60
+ if (message.includes('\n\n')) {
61
+ const [question, ...descParts] = message.split('\n\n');
62
+ promptMessage = question;
63
+ showBrandedBox(descParts.join('\n\n'), boxTitle);
64
+ }
60
65
 
61
- // Prompt'u çalıştır
62
- return await inquirerConfirm({
63
- message: t('ui.prompt.continue'),
64
- ...restOptions
66
+ const answer = await inquirerSelect({
67
+ message: promptMessage,
68
+ choices: [
69
+ { name: t('ui.label.yes'), value: true },
70
+ { name: t('ui.label.no'), value: false },
71
+ ],
72
+ default: defaultValue,
65
73
  });
74
+
75
+ return answer;
66
76
  }
67
77
 
68
78
  /**