vibehub-cli 1.0.43 → 1.1.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/dist/commands/clone.d.ts.map +1 -1
- package/dist/commands/clone.js +24 -2
- package/dist/commands/clone.js.map +1 -1
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +71 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +92 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/profiles.d.ts +3 -0
- package/dist/commands/profiles.d.ts.map +1 -0
- package/dist/commands/profiles.js +77 -0
- package/dist/commands/profiles.js.map +1 -0
- package/dist/commands/use.d.ts +3 -0
- package/dist/commands/use.d.ts.map +1 -0
- package/dist/commands/use.js +83 -0
- package/dist/commands/use.js.map +1 -0
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +105 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/auth-helper.d.ts +14 -3
- package/dist/lib/auth-helper.d.ts.map +1 -1
- package/dist/lib/auth-helper.js +111 -35
- package/dist/lib/auth-helper.js.map +1 -1
- package/dist/lib/profile-manager.d.ts +116 -0
- package/dist/lib/profile-manager.d.ts.map +1 -0
- package/dist/lib/profile-manager.js +351 -0
- package/dist/lib/profile-manager.js.map +1 -0
- package/dist/lib/supabase-auth.d.ts +42 -0
- package/dist/lib/supabase-auth.d.ts.map +1 -0
- package/dist/lib/supabase-auth.js +398 -0
- package/dist/lib/supabase-auth.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import http from 'http';
|
|
2
|
+
import { URL } from 'url';
|
|
3
|
+
import crypto from 'crypto';
|
|
4
|
+
import { createClient } from '@supabase/supabase-js';
|
|
5
|
+
// Supabase configuration
|
|
6
|
+
const SUPABASE_URL = 'https://keogzaeakmndknpgrjif.supabase.co';
|
|
7
|
+
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imtlb2d6YWVha21uZGtucGdyamlmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTc0MTYzMjQsImV4cCI6MjA3Mjk5MjMyNH0.38TymM-WiTS3ONu2KirEGbQT3XwRqSC5UBhZCQnlwO0';
|
|
8
|
+
// Callback server configuration
|
|
9
|
+
const CALLBACK_PORT = 54321;
|
|
10
|
+
const CALLBACK_HOST = 'localhost';
|
|
11
|
+
/**
|
|
12
|
+
* Generate a cryptographically secure random string for PKCE
|
|
13
|
+
*/
|
|
14
|
+
function generateCodeVerifier() {
|
|
15
|
+
return crypto.randomBytes(32).toString('base64url');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generate code challenge from verifier (SHA256 hash, base64url encoded)
|
|
19
|
+
*/
|
|
20
|
+
function generateCodeChallenge(verifier) {
|
|
21
|
+
return crypto.createHash('sha256').update(verifier).digest('base64url');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generate a random state parameter for OAuth security
|
|
25
|
+
*/
|
|
26
|
+
function generateState() {
|
|
27
|
+
return crypto.randomBytes(16).toString('hex');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* SupabaseAuth handles browser-based Google OAuth authentication for CLI.
|
|
31
|
+
*
|
|
32
|
+
* Flow:
|
|
33
|
+
* 1. Start local HTTP server on localhost:54321
|
|
34
|
+
* 2. Generate PKCE code verifier and challenge
|
|
35
|
+
* 3. Open browser to Supabase OAuth URL with Google provider
|
|
36
|
+
* 4. User authenticates with Google
|
|
37
|
+
* 5. Supabase redirects to localhost:54321/callback with code
|
|
38
|
+
* 6. CLI exchanges code for session tokens
|
|
39
|
+
* 7. Return tokens to caller
|
|
40
|
+
*/
|
|
41
|
+
export class SupabaseAuth {
|
|
42
|
+
constructor() {
|
|
43
|
+
this.supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Initiate Google OAuth login flow via browser
|
|
47
|
+
*/
|
|
48
|
+
async loginWithGoogle() {
|
|
49
|
+
return new Promise(async (resolve, reject) => {
|
|
50
|
+
const codeVerifier = generateCodeVerifier();
|
|
51
|
+
const codeChallenge = generateCodeChallenge(codeVerifier);
|
|
52
|
+
const state = generateState();
|
|
53
|
+
// Create callback server
|
|
54
|
+
const server = http.createServer(async (req, res) => {
|
|
55
|
+
try {
|
|
56
|
+
const reqUrl = new URL(req.url || '', `http://${CALLBACK_HOST}:${CALLBACK_PORT}`);
|
|
57
|
+
// Handle the OAuth callback
|
|
58
|
+
if (reqUrl.pathname === '/callback' || reqUrl.pathname === '/') {
|
|
59
|
+
const code = reqUrl.searchParams.get('code');
|
|
60
|
+
const returnedState = reqUrl.searchParams.get('state');
|
|
61
|
+
const error = reqUrl.searchParams.get('error');
|
|
62
|
+
const errorDescription = reqUrl.searchParams.get('error_description');
|
|
63
|
+
// Send response to browser immediately
|
|
64
|
+
if (error) {
|
|
65
|
+
res.writeHead(400, { 'Content-Type': 'text/html' });
|
|
66
|
+
res.end(this.getErrorHtml(errorDescription || error));
|
|
67
|
+
server.close();
|
|
68
|
+
reject(new Error(errorDescription || error));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!code) {
|
|
72
|
+
res.writeHead(400, { 'Content-Type': 'text/html' });
|
|
73
|
+
res.end(this.getErrorHtml('No authorization code received'));
|
|
74
|
+
server.close();
|
|
75
|
+
reject(new Error('No authorization code received'));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// Verify state matches (CSRF protection)
|
|
79
|
+
if (returnedState !== state) {
|
|
80
|
+
res.writeHead(400, { 'Content-Type': 'text/html' });
|
|
81
|
+
res.end(this.getErrorHtml('State mismatch - possible CSRF attack'));
|
|
82
|
+
server.close();
|
|
83
|
+
reject(new Error('State mismatch - possible CSRF attack'));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
// Send success page to browser
|
|
87
|
+
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
88
|
+
res.end(this.getSuccessHtml());
|
|
89
|
+
// Exchange code for session
|
|
90
|
+
try {
|
|
91
|
+
const { data, error: exchangeError } = await this.supabase.auth.exchangeCodeForSession(code);
|
|
92
|
+
if (exchangeError || !data.session) {
|
|
93
|
+
server.close();
|
|
94
|
+
reject(new Error(exchangeError?.message || 'Failed to exchange code for session'));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const session = data.session;
|
|
98
|
+
const user = data.user;
|
|
99
|
+
// Create profile data
|
|
100
|
+
const profileData = {
|
|
101
|
+
email: user.email || '',
|
|
102
|
+
userId: user.id,
|
|
103
|
+
accessToken: session.access_token,
|
|
104
|
+
refreshToken: session.refresh_token || '',
|
|
105
|
+
tokenExpiresAt: new Date(session.expires_at * 1000).toISOString(),
|
|
106
|
+
createdAt: new Date().toISOString(),
|
|
107
|
+
lastUsedAt: new Date().toISOString()
|
|
108
|
+
};
|
|
109
|
+
server.close();
|
|
110
|
+
resolve(profileData);
|
|
111
|
+
}
|
|
112
|
+
catch (exchangeErr) {
|
|
113
|
+
server.close();
|
|
114
|
+
reject(exchangeErr);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Handle other paths
|
|
119
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
120
|
+
res.end('Not found');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
res.writeHead(500, { 'Content-Type': 'text/plain' });
|
|
125
|
+
res.end('Internal server error');
|
|
126
|
+
server.close();
|
|
127
|
+
reject(err);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
// Handle server errors
|
|
131
|
+
server.on('error', (err) => {
|
|
132
|
+
if (err.code === 'EADDRINUSE') {
|
|
133
|
+
reject(new Error(`Port ${CALLBACK_PORT} is already in use. Please close any applications using this port and try again.`));
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
reject(err);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
// Start server
|
|
140
|
+
server.listen(CALLBACK_PORT, CALLBACK_HOST, async () => {
|
|
141
|
+
try {
|
|
142
|
+
// Build OAuth URL with PKCE
|
|
143
|
+
const redirectUri = `http://${CALLBACK_HOST}:${CALLBACK_PORT}/callback`;
|
|
144
|
+
const { data, error } = await this.supabase.auth.signInWithOAuth({
|
|
145
|
+
provider: 'google',
|
|
146
|
+
options: {
|
|
147
|
+
redirectTo: redirectUri,
|
|
148
|
+
queryParams: {
|
|
149
|
+
code_challenge: codeChallenge,
|
|
150
|
+
code_challenge_method: 'S256',
|
|
151
|
+
state: state
|
|
152
|
+
},
|
|
153
|
+
skipBrowserRedirect: true
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
if (error || !data.url) {
|
|
157
|
+
server.close();
|
|
158
|
+
reject(new Error(error?.message || 'Failed to generate OAuth URL'));
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
// Open browser
|
|
162
|
+
const { default: open } = await import('open');
|
|
163
|
+
await open(data.url);
|
|
164
|
+
// Set timeout for authentication (5 minutes)
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
server.close();
|
|
167
|
+
reject(new Error('Authentication timed out. Please try again.'));
|
|
168
|
+
}, 5 * 60 * 1000);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
server.close();
|
|
172
|
+
reject(err);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Refresh an existing session using refresh token
|
|
179
|
+
*/
|
|
180
|
+
async refreshSession(refreshToken) {
|
|
181
|
+
const { data, error } = await this.supabase.auth.refreshSession({
|
|
182
|
+
refresh_token: refreshToken
|
|
183
|
+
});
|
|
184
|
+
if (error || !data.session) {
|
|
185
|
+
throw new Error(error?.message || 'Failed to refresh session');
|
|
186
|
+
}
|
|
187
|
+
const session = data.session;
|
|
188
|
+
const user = data.user;
|
|
189
|
+
return {
|
|
190
|
+
email: user?.email || '',
|
|
191
|
+
userId: user?.id || '',
|
|
192
|
+
accessToken: session.access_token,
|
|
193
|
+
refreshToken: session.refresh_token || refreshToken,
|
|
194
|
+
tokenExpiresAt: new Date(session.expires_at * 1000).toISOString(),
|
|
195
|
+
createdAt: new Date().toISOString(),
|
|
196
|
+
lastUsedAt: new Date().toISOString()
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Sign out from Supabase (invalidate tokens)
|
|
201
|
+
*/
|
|
202
|
+
async signOut() {
|
|
203
|
+
await this.supabase.auth.signOut();
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Get success HTML page for browser
|
|
207
|
+
*/
|
|
208
|
+
getSuccessHtml() {
|
|
209
|
+
return `
|
|
210
|
+
<!DOCTYPE html>
|
|
211
|
+
<html lang="en">
|
|
212
|
+
<head>
|
|
213
|
+
<meta charset="UTF-8">
|
|
214
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
215
|
+
<title>VibeHub - Authentication Successful</title>
|
|
216
|
+
<style>
|
|
217
|
+
* {
|
|
218
|
+
margin: 0;
|
|
219
|
+
padding: 0;
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
}
|
|
222
|
+
body {
|
|
223
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
224
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
225
|
+
min-height: 100vh;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
padding: 20px;
|
|
230
|
+
}
|
|
231
|
+
.container {
|
|
232
|
+
background: white;
|
|
233
|
+
border-radius: 16px;
|
|
234
|
+
padding: 48px;
|
|
235
|
+
text-align: center;
|
|
236
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
237
|
+
max-width: 480px;
|
|
238
|
+
width: 100%;
|
|
239
|
+
}
|
|
240
|
+
.success-icon {
|
|
241
|
+
width: 80px;
|
|
242
|
+
height: 80px;
|
|
243
|
+
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
|
|
244
|
+
border-radius: 50%;
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
margin: 0 auto 24px;
|
|
249
|
+
}
|
|
250
|
+
.success-icon svg {
|
|
251
|
+
width: 40px;
|
|
252
|
+
height: 40px;
|
|
253
|
+
color: white;
|
|
254
|
+
}
|
|
255
|
+
h1 {
|
|
256
|
+
color: #1f2937;
|
|
257
|
+
font-size: 28px;
|
|
258
|
+
margin-bottom: 12px;
|
|
259
|
+
}
|
|
260
|
+
p {
|
|
261
|
+
color: #6b7280;
|
|
262
|
+
font-size: 16px;
|
|
263
|
+
line-height: 1.6;
|
|
264
|
+
margin-bottom: 24px;
|
|
265
|
+
}
|
|
266
|
+
.hint {
|
|
267
|
+
background: #f3f4f6;
|
|
268
|
+
border-radius: 8px;
|
|
269
|
+
padding: 16px;
|
|
270
|
+
font-size: 14px;
|
|
271
|
+
color: #4b5563;
|
|
272
|
+
}
|
|
273
|
+
.hint code {
|
|
274
|
+
background: #e5e7eb;
|
|
275
|
+
padding: 2px 6px;
|
|
276
|
+
border-radius: 4px;
|
|
277
|
+
font-family: 'SF Mono', Monaco, monospace;
|
|
278
|
+
}
|
|
279
|
+
</style>
|
|
280
|
+
</head>
|
|
281
|
+
<body>
|
|
282
|
+
<div class="container">
|
|
283
|
+
<div class="success-icon">
|
|
284
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
285
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
|
286
|
+
</svg>
|
|
287
|
+
</div>
|
|
288
|
+
<h1>Authentication Successful!</h1>
|
|
289
|
+
<p>You have successfully signed in to VibeHub CLI. You can close this window and return to your terminal.</p>
|
|
290
|
+
<div class="hint">
|
|
291
|
+
Run <code>vibe whoami</code> to verify your login status.
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
<script>
|
|
295
|
+
// Auto-close after 3 seconds
|
|
296
|
+
setTimeout(() => window.close(), 3000);
|
|
297
|
+
</script>
|
|
298
|
+
</body>
|
|
299
|
+
</html>
|
|
300
|
+
`;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Get error HTML page for browser
|
|
304
|
+
*/
|
|
305
|
+
getErrorHtml(errorMessage) {
|
|
306
|
+
return `
|
|
307
|
+
<!DOCTYPE html>
|
|
308
|
+
<html lang="en">
|
|
309
|
+
<head>
|
|
310
|
+
<meta charset="UTF-8">
|
|
311
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
312
|
+
<title>VibeHub - Authentication Failed</title>
|
|
313
|
+
<style>
|
|
314
|
+
* {
|
|
315
|
+
margin: 0;
|
|
316
|
+
padding: 0;
|
|
317
|
+
box-sizing: border-box;
|
|
318
|
+
}
|
|
319
|
+
body {
|
|
320
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
321
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
322
|
+
min-height: 100vh;
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
justify-content: center;
|
|
326
|
+
padding: 20px;
|
|
327
|
+
}
|
|
328
|
+
.container {
|
|
329
|
+
background: white;
|
|
330
|
+
border-radius: 16px;
|
|
331
|
+
padding: 48px;
|
|
332
|
+
text-align: center;
|
|
333
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
334
|
+
max-width: 480px;
|
|
335
|
+
width: 100%;
|
|
336
|
+
}
|
|
337
|
+
.error-icon {
|
|
338
|
+
width: 80px;
|
|
339
|
+
height: 80px;
|
|
340
|
+
background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
|
|
341
|
+
border-radius: 50%;
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
justify-content: center;
|
|
345
|
+
margin: 0 auto 24px;
|
|
346
|
+
}
|
|
347
|
+
.error-icon svg {
|
|
348
|
+
width: 40px;
|
|
349
|
+
height: 40px;
|
|
350
|
+
color: white;
|
|
351
|
+
}
|
|
352
|
+
h1 {
|
|
353
|
+
color: #1f2937;
|
|
354
|
+
font-size: 28px;
|
|
355
|
+
margin-bottom: 12px;
|
|
356
|
+
}
|
|
357
|
+
p {
|
|
358
|
+
color: #6b7280;
|
|
359
|
+
font-size: 16px;
|
|
360
|
+
line-height: 1.6;
|
|
361
|
+
margin-bottom: 24px;
|
|
362
|
+
}
|
|
363
|
+
.error-message {
|
|
364
|
+
background: #fef2f2;
|
|
365
|
+
border: 1px solid #fecaca;
|
|
366
|
+
border-radius: 8px;
|
|
367
|
+
padding: 16px;
|
|
368
|
+
font-size: 14px;
|
|
369
|
+
color: #991b1b;
|
|
370
|
+
}
|
|
371
|
+
</style>
|
|
372
|
+
</head>
|
|
373
|
+
<body>
|
|
374
|
+
<div class="container">
|
|
375
|
+
<div class="error-icon">
|
|
376
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
377
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
378
|
+
</svg>
|
|
379
|
+
</div>
|
|
380
|
+
<h1>Authentication Failed</h1>
|
|
381
|
+
<p>There was a problem signing in to VibeHub CLI. Please try again.</p>
|
|
382
|
+
<div class="error-message">
|
|
383
|
+
${errorMessage}
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
</body>
|
|
387
|
+
</html>
|
|
388
|
+
`;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Get the OAuth URL for manual browser opening (fallback)
|
|
393
|
+
*/
|
|
394
|
+
export function getOAuthUrl() {
|
|
395
|
+
const redirectUri = `http://${CALLBACK_HOST}:${CALLBACK_PORT}/callback`;
|
|
396
|
+
return `${SUPABASE_URL}/auth/v1/authorize?provider=google&redirect_to=${encodeURIComponent(redirectUri)}`;
|
|
397
|
+
}
|
|
398
|
+
//# sourceMappingURL=supabase-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supabase-auth.js","sourceRoot":"","sources":["../../src/lib/supabase-auth.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AAGrE,yBAAyB;AACzB,MAAM,YAAY,GAAG,0CAA0C,CAAC;AAChE,MAAM,iBAAiB,GAAG,kNAAkN,CAAC;AAE7O,gCAAgC;AAChC,MAAM,aAAa,GAAG,KAAK,CAAC;AAC5B,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC;;GAEG;AACH,SAAS,oBAAoB;IAC3B,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,SAAS,aAAa;IACpB,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE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ACnD,cAAc,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAW,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;YAClE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACK,cAAc;QACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FV,CAAC;IACA,CAAC;IAED;;OAEG;IACK,YAAY,CAAC,YAAoB;QACvC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6EH,YAAY;;;;;CAKnB,CAAC;IACA,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,WAAW,GAAG,UAAU,aAAa,IAAI,aAAa,WAAW,CAAC;IACxE,OAAO,GAAG,YAAY,kDAAkD,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;AAC5G,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibehub-cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "VibeHub CLI - Command line interface for VibeHub",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
"author": "Anandakumar",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@supabase/supabase-js": "^2.90.1",
|
|
31
32
|
"axios": "^1.6.0",
|
|
32
33
|
"better-sqlite3": "^12.2.0",
|
|
33
34
|
"chalk": "^5.3.0",
|
|
34
35
|
"commander": "^11.1.0",
|
|
35
|
-
"firebase": "^10.14.1",
|
|
36
36
|
"fs-extra": "^11.2.0",
|
|
37
|
-
"inquirer": "^9.2.12"
|
|
37
|
+
"inquirer": "^9.2.12",
|
|
38
|
+
"open": "^10.0.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/better-sqlite3": "^7.6.8",
|