@startanaicompany/cli 1.4.4 → 1.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startanaicompany/cli",
3
- "version": "1.4.4",
3
+ "version": "1.4.7",
4
4
  "description": "Official CLI for StartAnAiCompany.com - Deploy AI recruitment sites with ease",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -66,7 +66,11 @@ async function status() {
66
66
 
67
67
  // Show account info
68
68
  logger.field('User ID', userData.id);
69
- logger.field('Git Username', userData.git_username || 'Not set');
69
+ if (userData.git_username) {
70
+ logger.field('Git Username', userData.git_username);
71
+ } else {
72
+ logger.field('Git Connection', 'Not connected (use OAuth to connect)');
73
+ }
70
74
  logger.field('Applications', `${userData.application_count} / ${userData.max_applications}`);
71
75
 
72
76
  logger.newline();
@@ -64,13 +64,17 @@ async function verify(code) {
64
64
 
65
65
  logger.newline();
66
66
  logger.success('Your account is now verified!');
67
- logger.info('You can now create and deploy applications.');
68
67
 
69
68
  // Show API key if provided (FULL key, not truncated)
70
69
  if (result.api_key) {
71
70
  logger.newline();
72
71
  logger.field('API Key', result.api_key);
73
72
  logger.warn('Save your API key securely. It will not be shown again.');
73
+ logger.newline();
74
+ logger.info('Next step: Login with your API key');
75
+ logger.log(` saac login -e ${user.email} -k ${result.api_key}`);
76
+ logger.newline();
77
+ logger.info('After login, you can create and deploy applications.');
74
78
  }
75
79
 
76
80
  // Show expiration if session token was updated
package/src/lib/oauth.js CHANGED
@@ -47,7 +47,7 @@ async function connectGitAccount(gitHost, apiKey) {
47
47
 
48
48
  // Build authorization URL
49
49
  const baseUrl = getApiUrl().replace('/api/v1', ''); // Remove /api/v1 suffix
50
- const authUrl = `${baseUrl}/oauth/authorize?git_host=${encodeURIComponent(gitHost)}&session_id=${sessionId}`;
50
+ const authUrl = `${baseUrl}/oauth/authorize?git_host=${encodeURIComponent(gitHost)}&session_id=${sessionId}&token=${encodeURIComponent(apiKey)}`;
51
51
 
52
52
  logger.info('Opening browser for authentication...');
53
53
  logger.newline();
@@ -90,6 +90,9 @@ async function pollForCompletion(sessionId, apiKey) {
90
90
 
91
91
  const baseUrl = getApiUrl().replace('/api/v1', ''); // Remove /api/v1 suffix
92
92
 
93
+ // Give user time to complete OAuth flow in browser (5 seconds)
94
+ await sleep(5000);
95
+
93
96
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
94
97
  await sleep(pollInterval);
95
98