vibefast-cli 0.2.1 → 0.2.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/DOCS-CLEANUP-SUMMARY.md +140 -0
  3. package/DOCS.md +141 -0
  4. package/ERROR-MESSAGE-CLEANUP.md +64 -0
  5. package/IMPLEMENTATION-COMPLETE.md +6 -5
  6. package/MANUAL-STEPS-GUIDE.md +385 -0
  7. package/MANUAL-STEPS-USER-FLOW.md +231 -0
  8. package/PLAN-VS-IMPLEMENTATION.md +248 -0
  9. package/PUBLISHED-0.2.2.md +65 -0
  10. package/README.md +24 -2
  11. package/START-HERE.md +115 -0
  12. package/dist/commands/add.d.ts.map +1 -1
  13. package/dist/commands/add.js +0 -2
  14. package/dist/commands/add.js.map +1 -1
  15. package/dist/commands/devices.d.ts.map +1 -1
  16. package/dist/commands/devices.js +1 -3
  17. package/dist/commands/devices.js.map +1 -1
  18. package/dist/commands/list.d.ts.map +1 -1
  19. package/dist/commands/list.js +1 -3
  20. package/dist/commands/list.js.map +1 -1
  21. package/dist/core/http.d.ts.map +1 -1
  22. package/dist/core/http.js +61 -33
  23. package/dist/core/http.js.map +1 -1
  24. package/docs/next-steps.md +12 -0
  25. package/package.json +10 -1
  26. package/recipes/audio-recorder@latest.zip +0 -0
  27. package/recipes/charts/apps/native/src/app/charts/index.tsx +3 -0
  28. package/recipes/charts/apps/native/src/features/charts/app/preview.tsx +3 -0
  29. package/recipes/charts/apps/native/src/features/charts/components/area-chart.tsx +3 -0
  30. package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -0
  31. package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +3 -0
  32. package/recipes/charts/apps/native/src/features/charts/components/chart-card.tsx +3 -0
  33. package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -0
  34. package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +3 -0
  35. package/recipes/charts/apps/native/src/features/charts/components/index.ts +3 -0
  36. package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +3 -0
  37. package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +3 -0
  38. package/recipes/charts/apps/native/src/features/charts/components/radial-bar-chart.tsx +3 -0
  39. package/recipes/charts/apps/native/src/features/charts/components/stacked-area-chart.tsx +3 -0
  40. package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +3 -0
  41. package/recipes/charts/apps/native/src/features/charts/data/mock-data.ts +3 -0
  42. package/recipes/charts/apps/native/src/features/charts/types/index.ts +3 -0
  43. package/recipes/charts/recipe.json +7 -1
  44. package/recipes/charts@latest.zip +0 -0
  45. package/recipes/chatbot/apps/native/src/app/chatbot/index.tsx +1 -0
  46. package/recipes/chatbot/apps/native/src/features/chatbot/app/index.tsx +1 -0
  47. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +1 -0
  48. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-input-bar.tsx +1 -0
  49. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +1 -0
  50. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +1 -0
  51. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +1 -0
  52. package/recipes/chatbot/apps/native/src/features/chatbot/components/image-preview-list.tsx +1 -0
  53. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +1 -0
  54. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/index.ts +1 -0
  55. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +1 -0
  56. package/recipes/chatbot/apps/native/src/features/chatbot/components/message-error-boundary.tsx +1 -0
  57. package/recipes/chatbot/apps/native/src/features/chatbot/components/message-list.tsx +1 -0
  58. package/recipes/chatbot/apps/native/src/features/chatbot/components/model-selector.tsx +1 -0
  59. package/recipes/chatbot/apps/native/src/features/chatbot/components/report-content-modal.tsx +1 -0
  60. package/recipes/chatbot/apps/native/src/features/chatbot/components/suggested-messages.tsx +1 -0
  61. package/recipes/chatbot/apps/native/src/features/chatbot/constants/models.ts +1 -0
  62. package/recipes/chatbot/apps/native/src/features/chatbot/constants/report-reasons.ts +1 -0
  63. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +1 -0
  64. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chat-config.ts +1 -0
  65. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +1 -0
  66. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +1 -0
  67. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-conversation.ts +1 -0
  68. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-image-picker.ts +1 -0
  69. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +1 -0
  70. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +1 -0
  71. package/recipes/chatbot/apps/native/src/features/chatbot/models/index.ts +1 -0
  72. package/recipes/chatbot/apps/native/src/features/chatbot/models/models.ts +1 -0
  73. package/recipes/chatbot/apps/native/src/features/chatbot/models/providers.ts +1 -0
  74. package/recipes/chatbot/apps/native/src/features/chatbot/models/types.ts +1 -0
  75. package/recipes/chatbot/apps/native/src/features/chatbot/services/file-uploader.ts +1 -0
  76. package/recipes/chatbot/apps/native/src/features/chatbot/services/message-handler-service.ts +1 -0
  77. package/recipes/chatbot/apps/native/src/features/chatbot/types/index.ts +1 -0
  78. package/recipes/chatbot/apps/native/src/features/chatbot/utils/chat-telemetry.ts +1 -0
  79. package/recipes/chatbot/packages/backend/convex/chatbot/index.ts +30 -0
  80. package/recipes/chatbot/recipe.json +16 -1
  81. package/recipes/chatbot@latest.zip +0 -0
  82. package/recipes/image-generator@latest.zip +0 -0
  83. package/recipes/quiz@latest.zip +0 -0
  84. package/recipes/tracker-app@latest.zip +0 -0
  85. package/recipes/voice-bot@latest.zip +0 -0
  86. package/scripts/create-recipes.mjs +33 -1
  87. package/src/commands/add.ts +0 -2
  88. package/src/commands/devices.ts +1 -3
  89. package/src/commands/list.ts +1 -3
  90. package/src/core/http.ts +62 -36
  91. package/MONITORING-AND-ANNOUNCEMENT-GUIDE.md +0 -669
  92. package/PRE-PUBLISH-CHECKLIST.md +0 -558
  93. package/PUBLISHED-SUCCESS.md +0 -282
  94. package/READY-TO-PUBLISH.md +0 -419
  95. package/RECIPES-READY.md +0 -172
  96. package/cloudflare-worker/mini-native@latest.zip +0 -0
  97. package/cloudflare-worker/test-recipe/apps/native/src/app/mini/index.tsx +0 -15
  98. package/cloudflare-worker/test-recipe/recipe.json +0 -16
  99. package/text.md +0 -27
  100. /package/{AUTO-DETECT-DEPS.md → docs/archive/AUTO-DETECT-DEPS.md} +0 -0
  101. /package/{FINAL-PACKAGE-STRATEGY.md → docs/archive/FINAL-PACKAGE-STRATEGY.md} +0 -0
  102. /package/{FINAL-SIMPLE-PLAN.md → docs/archive/FINAL-SIMPLE-PLAN.md} +0 -0
  103. /package/{FINAL-STATUS.md → docs/archive/FINAL-STATUS.md} +0 -0
  104. /package/{FLOW-DIAGRAM.md → docs/archive/FLOW-DIAGRAM.md} +0 -0
  105. /package/{GOTCHAS-AND-RISKS.md → docs/archive/GOTCHAS-AND-RISKS.md} +0 -0
  106. /package/{IMPLEMENTATION-PLAN.md → docs/archive/IMPLEMENTATION-PLAN.md} +0 -0
  107. /package/{PLAN.md → docs/archive/PLAN.md} +0 -0
  108. /package/{PRODUCTION-READINESS.md → docs/archive/PRODUCTION-READINESS.md} +0 -0
  109. /package/{PRODUCTION-TEST-RESULTS.md → docs/archive/PRODUCTION-TEST-RESULTS.md} +0 -0
  110. /package/{SIMPLIFIED-PLAN.md → docs/archive/SIMPLIFIED-PLAN.md} +0 -0
  111. /package/{STATUS.md → docs/archive/STATUS.md} +0 -0
  112. /package/{SUCCESS.md → docs/archive/SUCCESS.md} +0 -0
  113. /package/{TEST-SUMMARY.md → docs/archive/TEST-SUMMARY.md} +0 -0
  114. /package/{TESTING-CHECKLIST.md → docs/archive/TESTING-CHECKLIST.md} +0 -0
  115. /package/{USER-MODIFICATIONS.md → docs/archive/USER-MODIFICATIONS.md} +0 -0
@@ -17,6 +17,9 @@ const features = [
17
17
  icon: '📊',
18
18
  description: 'Beautiful data visualization with charts',
19
19
  color: '#6366F1',
20
+ dependencies: {
21
+ expo: ['@shopify/react-native-skia', 'react-native-svg'],
22
+ },
20
23
  },
21
24
  {
22
25
  name: 'chatbot',
@@ -24,6 +27,17 @@ const features = [
24
27
  icon: '💬',
25
28
  description: 'AI-powered chat assistant',
26
29
  color: '#F43F5E',
30
+ dependencies: {
31
+ expo: [
32
+ 'convex',
33
+ 'expo-clipboard',
34
+ 'markdown-it',
35
+ 'react-native-markdown-display',
36
+ 'react-syntax-highlighter',
37
+ 'react-native-reanimated',
38
+ 'react-native-safe-area-context',
39
+ ],
40
+ },
27
41
  },
28
42
  {
29
43
  name: 'voice-bot',
@@ -97,7 +111,7 @@ async function createRecipe(feature) {
97
111
  });
98
112
  console.log(` ✓ Copied app route`);
99
113
  }
100
-
114
+
101
115
  // Check if feature components exist
102
116
  if (await exists(featurePath)) {
103
117
  const destFeaturePath = join(recipeDir, 'apps/native/src/features', feature.name);
@@ -110,6 +124,19 @@ async function createRecipe(feature) {
110
124
  console.log(` ✓ Copied feature components`);
111
125
  }
112
126
 
127
+ // Check if Convex backend exists for this feature
128
+ const convexPath = join(monorepoPath, 'packages/backend/convex', feature.name);
129
+ if (await exists(convexPath)) {
130
+ const destConvexPath = join(recipeDir, 'packages/backend/convex', feature.name);
131
+ await mkdir(dirname(destConvexPath), { recursive: true });
132
+ await cp(convexPath, destConvexPath, { recursive: true });
133
+ copySpecs.push({
134
+ from: `packages/backend/convex/${feature.name}`,
135
+ to: `packages/backend/convex/${feature.name}`,
136
+ });
137
+ console.log(` ✓ Copied Convex backend`);
138
+ }
139
+
113
140
  if (copySpecs.length === 0) {
114
141
  console.log(` ⚠️ No files found for ${feature.name}, skipping...`);
115
142
  return null;
@@ -130,6 +157,11 @@ async function createRecipe(feature) {
130
157
  target: 'native',
131
158
  };
132
159
 
160
+ // Add dependencies if defined
161
+ if (feature.dependencies) {
162
+ manifest.dependencies = feature.dependencies;
163
+ }
164
+
133
165
  await writeFile(
134
166
  join(recipeDir, 'recipe.json'),
135
167
  JSON.stringify(manifest, null, 2)
@@ -92,8 +92,6 @@ export const addCommand = new Command('add')
92
92
  const error = response.error || 'Unknown error';
93
93
  const message = response.message || '';
94
94
 
95
- log.plain('');
96
- log.error('Failed to fetch recipe');
97
95
  log.plain('');
98
96
 
99
97
  // User-friendly error messages
@@ -34,11 +34,9 @@ export const devicesCommand = new Command('devices')
34
34
  } catch (error: any) {
35
35
  const errorMsg = error.message || '';
36
36
 
37
- log.plain('');
38
- log.error('Failed to manage devices');
39
37
  log.plain('');
40
38
 
41
- // Better error messages
39
+ // Better error messages - http.ts already provides clean messages
42
40
  if (errorMsg.includes('license_key not found') || errorMsg.includes('Invalid') || errorMsg.includes('token')) {
43
41
  log.plain('❌ Invalid or expired license key');
44
42
  log.plain('');
@@ -41,11 +41,9 @@ export const listCommand = new Command('list')
41
41
  } catch (error: any) {
42
42
  const errorMsg = error.message || '';
43
43
 
44
- log.plain('');
45
- log.error('Failed to list recipes');
46
44
  log.plain('');
47
45
 
48
- // Better error messages
46
+ // Better error messages - http.ts already provides clean messages
49
47
  if (errorMsg.includes('license_key not found') || errorMsg.includes('Invalid') || errorMsg.includes('token')) {
50
48
  log.plain('❌ Invalid or expired license key');
51
49
  log.plain('');
package/src/core/http.ts CHANGED
@@ -103,55 +103,81 @@ export async function listRecipes(token: string): Promise<any> {
103
103
  } catch {
104
104
  // ignore JSON parse errors
105
105
  }
106
- throw new Error(`Failed to fetch recipes: ${message}`);
106
+ // Just throw the actual error message, no wrapping
107
+ throw new Error(message);
107
108
  }
108
109
 
109
110
  return response.json();
110
111
  } catch (err: any) {
111
- throw new Error(`Failed to connect to ${WORKER_URL}: ${err.message}`);
112
+ // If it's already our error, just rethrow
113
+ if (err.message && !err.message.includes('fetch')) {
114
+ throw err;
115
+ }
116
+ // Network error
117
+ throw new Error(`Network error: ${err.message}`);
112
118
  }
113
119
  }
114
120
 
115
121
  export async function listDevices(token: string): Promise<any> {
116
- const response = await fetch(`${WORKER_URL}/api/devices/list`, {
117
- method: 'GET',
118
- headers: {
119
- 'Authorization': `Bearer ${token}`,
120
- },
121
- });
122
-
123
- if (!response.ok) {
124
- let message = response.statusText;
125
- try {
126
- const body = (await response.json()) as { error?: string; message?: string };
127
- message = body?.error || body?.message || message;
128
- } catch {
129
- // ignore
122
+ try {
123
+ const response = await fetch(`${WORKER_URL}/api/devices/list`, {
124
+ method: 'GET',
125
+ headers: {
126
+ 'Authorization': `Bearer ${token}`,
127
+ },
128
+ });
129
+
130
+ if (!response.ok) {
131
+ let message = response.statusText;
132
+ try {
133
+ const body = (await response.json()) as { error?: string; message?: string };
134
+ message = body?.error || body?.message || message;
135
+ } catch {
136
+ // ignore
137
+ }
138
+ // Just throw the actual error message
139
+ throw new Error(message);
130
140
  }
131
- throw new Error(`Failed to fetch devices: ${message}`);
132
- }
133
141
 
134
- return response.json();
142
+ return response.json();
143
+ } catch (err: any) {
144
+ // If it's already our error, just rethrow
145
+ if (err.message && !err.message.includes('fetch')) {
146
+ throw err;
147
+ }
148
+ // Network error
149
+ throw new Error(`Network error: ${err.message}`);
150
+ }
135
151
  }
136
152
 
137
153
  export async function deactivateDevice(token: string, deviceId: string): Promise<void> {
138
- const response = await fetch(`${WORKER_URL}/api/devices/deactivate`, {
139
- method: 'POST',
140
- headers: {
141
- 'Authorization': `Bearer ${token}`,
142
- 'Content-Type': 'application/json',
143
- },
144
- body: JSON.stringify({ deviceId }),
145
- });
146
-
147
- if (!response.ok) {
148
- let message = response.statusText;
149
- try {
150
- const body = (await response.json()) as { error?: string; message?: string };
151
- message = body?.error || body?.message || message;
152
- } catch {
153
- // ignore
154
+ try {
155
+ const response = await fetch(`${WORKER_URL}/api/devices/deactivate`, {
156
+ method: 'POST',
157
+ headers: {
158
+ 'Authorization': `Bearer ${token}`,
159
+ 'Content-Type': 'application/json',
160
+ },
161
+ body: JSON.stringify({ deviceId }),
162
+ });
163
+
164
+ if (!response.ok) {
165
+ let message = response.statusText;
166
+ try {
167
+ const body = (await response.json()) as { error?: string; message?: string };
168
+ message = body?.error || body?.message || message;
169
+ } catch {
170
+ // ignore
171
+ }
172
+ // Just throw the actual error message
173
+ throw new Error(message);
174
+ }
175
+ } catch (err: any) {
176
+ // If it's already our error, just rethrow
177
+ if (err.message && !err.message.includes('fetch')) {
178
+ throw err;
154
179
  }
155
- throw new Error(`Failed to deactivate device: ${message}`);
180
+ // Network error
181
+ throw new Error(`Network error: ${err.message}`);
156
182
  }
157
183
  }