@statezero/core 0.1.2 → 0.1.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.
@@ -97,32 +97,27 @@ import { loadConfigFromFile } from "../configFileLoader.js";
97
97
  // Fallback Selection for Inquirer Errors
98
98
  // --------------------
99
99
  /**
100
- * Simple fallback selector when inquirer fails
100
+ * Simple fallback that generates all models when inquirer fails
101
101
  * @param {Array} choices - Array of choice objects with {name, value, checked} properties
102
102
  * @param {string} message - Selection message
103
- * @returns {Promise<Array>} - Selected values
103
+ * @returns {Promise<Array>} - All model values
104
104
  */
105
- async function fallbackSelect(choices, message) {
105
+ async function fallbackSelectAll(choices, message) {
106
106
  console.log(`\n${message}`);
107
- console.log("Interactive selection not available - auto-selecting all available models:");
108
- const selected = [];
107
+ console.log("Interactive selection not available - generating ALL models:");
108
+ const allModels = [];
109
109
  for (const choice of choices) {
110
110
  // Skip separators (they don't have a 'value' property)
111
111
  if (!choice.value) {
112
112
  console.log(choice.name); // Print separator text
113
113
  continue;
114
114
  }
115
- // Auto-select items that were checked by default
116
- if (choice.checked) {
117
- selected.push(choice.value);
118
- console.log(` ✓ ${choice.name}`);
119
- }
120
- else {
121
- console.log(` ${choice.name}`);
122
- }
115
+ // Add ALL models, regardless of checked status
116
+ allModels.push(choice.value);
117
+ console.log(` ✓ ${choice.name}`);
123
118
  }
124
- console.log(`\nAuto-selected ${selected.length} models for generation.`);
125
- return selected;
119
+ console.log(`\nGenerating ALL ${allModels.length} models.`);
120
+ return allModels;
126
121
  }
127
122
  /**
128
123
  * Model selection with inquirer fallback
@@ -146,9 +141,9 @@ async function selectModels(choices, message) {
146
141
  return selectedModels;
147
142
  }
148
143
  catch (error) {
149
- // Fall back to auto-selection if inquirer fails for any reason
150
- console.warn("Interactive selection failed, falling back to auto-selection:", error.message);
151
- return await fallbackSelect(choices, message);
144
+ // Fall back to generating all models if inquirer fails for any reason
145
+ console.warn("Interactive selection failed, generating all models:", error.message);
146
+ return await fallbackSelectAll(choices, message);
152
147
  }
153
148
  }
154
149
  // --------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",