@tamyla/clodo-framework 2.0.14 → 2.0.15

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
@@ -1,3 +1,10 @@
1
+ ## [2.0.15](https://github.com/tamylaa/clodo-framework/compare/v2.0.14...v2.0.15) (2025-10-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * improve customer selection UX with number support ([2e10d56](https://github.com/tamylaa/clodo-framework/commit/2e10d562061c478ecc238e1185e2514af453d00e))
7
+
1
8
  ## [2.0.14](https://github.com/tamylaa/clodo-framework/compare/v2.0.13...v2.0.14) (2025-10-12)
2
9
 
3
10
 
@@ -516,8 +516,8 @@ program
516
516
  const customers = configPersistence.getConfiguredCustomers();
517
517
  if (customers.length > 0) {
518
518
  console.log(chalk.cyan('💡 Configured customers:'));
519
- customers.forEach(customer => {
520
- console.log(chalk.white(` ${customer}`));
519
+ customers.forEach((customer, index) => {
520
+ console.log(chalk.white(` ${index + 1}. ${customer}`));
521
521
  });
522
522
  console.log('');
523
523
  }
@@ -527,8 +527,30 @@ program
527
527
  if (!coreInputs.cloudflareAccountId) {
528
528
  console.log(chalk.cyan('📊 Tier 1: Core Input Collection\n'));
529
529
 
530
- // Collect basic info
531
- const customer = options.customer || await inputCollector.question('Customer name: ');
530
+ // Collect basic info with smart customer selection
531
+ let customer = options.customer;
532
+ if (!customer) {
533
+ const customers = configPersistence.getConfiguredCustomers();
534
+ if (customers.length > 0) {
535
+ const selection = await inputCollector.question('Select customer (enter number or name): ');
536
+
537
+ // Try to parse as number first
538
+ const num = parseInt(selection);
539
+ if (!isNaN(num) && num >= 1 && num <= customers.length) {
540
+ customer = customers[num - 1];
541
+ console.log(chalk.green(`✓ Selected: ${customer}\n`));
542
+ } else if (customers.includes(selection)) {
543
+ customer = selection;
544
+ console.log(chalk.green(`✓ Selected: ${customer}\n`));
545
+ } else {
546
+ // New customer name
547
+ customer = selection;
548
+ console.log(chalk.yellow(`⚠️ Creating new customer: ${customer}\n`));
549
+ }
550
+ } else {
551
+ customer = await inputCollector.question('Customer name: ');
552
+ }
553
+ }
532
554
  const environment = options.env || await inputCollector.collectEnvironment();
533
555
  const serviceName = await inputCollector.collectServiceName();
534
556
  const serviceType = await inputCollector.collectServiceType();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamyla/clodo-framework",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "Reusable framework for Clodo-style software architecture on Cloudflare Workers + D1",
5
5
  "type": "module",
6
6
  "sideEffects": [