@snapcommit/cli 3.6.0 → 3.7.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/github-connect.js +8 -7
- package/dist/lib/auth.js +4 -3
- package/dist/repl.js +5 -9
- package/package.json +1 -1
|
@@ -117,20 +117,21 @@ function clearGitHubToken() {
|
|
|
117
117
|
*/
|
|
118
118
|
async function githubConnectCommand(tokenArg) {
|
|
119
119
|
console.log(chalk_1.default.bold.cyan('\n╔════════════════════════════════════════╗'));
|
|
120
|
-
console.log(chalk_1.default.bold.cyan('║
|
|
120
|
+
console.log(chalk_1.default.bold.cyan('║ 🐙 Connect GitHub CLI (Optional) ║'));
|
|
121
121
|
console.log(chalk_1.default.bold.cyan('╚════════════════════════════════════════╝\n'));
|
|
122
|
-
console.log(chalk_1.default.
|
|
122
|
+
console.log(chalk_1.default.green('✅ Your GitHub account is already connected via snapcommit.dev!\n'));
|
|
123
|
+
console.log(chalk_1.default.gray('This CLI token enables GitHub features in your terminal:\n'));
|
|
123
124
|
console.log(chalk_1.default.white(' • Create pull requests'));
|
|
124
125
|
console.log(chalk_1.default.white(' • Check CI/workflow status'));
|
|
125
|
-
console.log(chalk_1.default.white(' •
|
|
126
|
+
console.log(chalk_1.default.white(' • Manage issues and PRs'));
|
|
126
127
|
console.log(chalk_1.default.white(' • All with natural language!\n'));
|
|
127
128
|
console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
128
|
-
console.log(chalk_1.default.bold.white('
|
|
129
|
+
console.log(chalk_1.default.bold.white('Quick Setup (2 minutes):\n'));
|
|
129
130
|
console.log(chalk_1.default.gray(' 1. Go to: ') + chalk_1.default.cyan('https://github.com/settings/tokens'));
|
|
130
131
|
console.log(chalk_1.default.gray(' 2. Click "Generate new token (classic)"'));
|
|
131
|
-
console.log(chalk_1.default.gray(' 3.
|
|
132
|
-
console.log(chalk_1.default.gray(' 4.
|
|
133
|
-
console.log(chalk_1.default.gray(' 5.
|
|
132
|
+
console.log(chalk_1.default.gray(' 3. Name: ') + chalk_1.default.white('"SnapCommit CLI"'));
|
|
133
|
+
console.log(chalk_1.default.gray(' 4. Scopes: ') + chalk_1.default.white('repo, workflow, read:user'));
|
|
134
|
+
console.log(chalk_1.default.gray(' 5. Generate & copy the token\n'));
|
|
134
135
|
console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
135
136
|
let token = tokenArg;
|
|
136
137
|
if (!token) {
|
package/dist/lib/auth.js
CHANGED
|
@@ -101,11 +101,12 @@ async function promptAuth() {
|
|
|
101
101
|
console.log(chalk_1.default.bold.cyan('╚════════════════════════════════════════╝\n'));
|
|
102
102
|
console.log(chalk_1.default.gray('SnapCommit needs authentication to provide AI-powered features.\n'));
|
|
103
103
|
console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
104
|
-
console.log(chalk_1.default.bold.white('Step 1: ') + chalk_1.default.gray('Sign
|
|
104
|
+
console.log(chalk_1.default.bold.white('Step 1: ') + chalk_1.default.gray('Sign in with GitHub (one-click!)'));
|
|
105
105
|
console.log(chalk_1.default.cyan(' 👉 https://snapcommit.dev/login\n'));
|
|
106
|
-
console.log(chalk_1.default.bold.white('Step 2: ') + chalk_1.default.gray('
|
|
106
|
+
console.log(chalk_1.default.bold.white('Step 2: ') + chalk_1.default.gray('Subscribe ($9.99/mo or $100/year)'));
|
|
107
|
+
console.log(chalk_1.default.cyan(' 👉 Choose your plan on the dashboard\n'));
|
|
108
|
+
console.log(chalk_1.default.bold.white('Step 3: ') + chalk_1.default.gray('Generate & paste your CLI token'));
|
|
107
109
|
console.log(chalk_1.default.cyan(' 👉 https://snapcommit.dev/dashboard\n'));
|
|
108
|
-
console.log(chalk_1.default.bold.white('Step 3: ') + chalk_1.default.gray('Copy the token and paste it below\n'));
|
|
109
110
|
console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
110
111
|
const token = await askQuestion(chalk_1.default.yellow('🔑 Paste your authentication token: '));
|
|
111
112
|
if (!token || token.trim().length === 0) {
|
package/dist/repl.js
CHANGED
|
@@ -90,18 +90,14 @@ async function startREPL() {
|
|
|
90
90
|
console.log(chalk_1.default.gray(' ') + chalk_1.default.cyan('"check CI status"'));
|
|
91
91
|
}
|
|
92
92
|
console.log(chalk_1.default.gray(' Other: ') + chalk_1.default.cyan('stats') + chalk_1.default.gray(' • ') + chalk_1.default.cyan('cd <path>') + chalk_1.default.gray(' • ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' • ') + chalk_1.default.cyan('help') + chalk_1.default.gray(' • ') + chalk_1.default.cyan('update\n'));
|
|
93
|
-
// Show GitHub setup reminder if not connected
|
|
93
|
+
// Show GitHub setup reminder if not connected (UPDATED FOR OAUTH)
|
|
94
94
|
if (!githubConnected) {
|
|
95
95
|
console.log(chalk_1.default.yellow.bold('┌─────────────────────────────────────────┐'));
|
|
96
|
-
console.log(chalk_1.default.yellow.bold('│
|
|
96
|
+
console.log(chalk_1.default.yellow.bold('│ 🐙 GITHUB FEATURES (OPTIONAL) │'));
|
|
97
97
|
console.log(chalk_1.default.yellow.bold('└─────────────────────────────────────────┘\n'));
|
|
98
|
-
console.log(chalk_1.default.white('
|
|
99
|
-
console.log(chalk_1.default.
|
|
100
|
-
console.log(chalk_1.default.gray('
|
|
101
|
-
console.log(chalk_1.default.gray(' 2. Get token: ') + chalk_1.default.cyan('https://github.com/settings/tokens'));
|
|
102
|
-
console.log(chalk_1.default.gray(' 3. Scopes needed: ') + chalk_1.default.white('repo, workflow, read:user'));
|
|
103
|
-
console.log(chalk_1.default.gray(' 4. Paste token when prompted'));
|
|
104
|
-
console.log(chalk_1.default.gray(' 💡 Tip: Set no expiration!\n'));
|
|
98
|
+
console.log(chalk_1.default.white(' Your GitHub account is already connected via snapcommit.dev!\n'));
|
|
99
|
+
console.log(chalk_1.default.gray(' To use GitHub features in this CLI, run: ') + chalk_1.default.cyan('snap github connect'));
|
|
100
|
+
console.log(chalk_1.default.gray(' This creates a CLI token for terminal GitHub API access.\n'));
|
|
105
101
|
}
|
|
106
102
|
console.log(chalk_1.default.gray('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
107
103
|
console.log(chalk_1.default.bold.yellow('🎯 Try it now! Type what you want to do:\n'));
|