vibekit-auth 1.0.3 → 1.0.4
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/index.js +3 -1
- package/package.json +1 -1
- package/src/index.ts +15 -5
package/dist/index.js
CHANGED
|
@@ -44,7 +44,9 @@ async function main() {
|
|
|
44
44
|
extractSpinner.fail(chalk_1.default.red('Claude credentials have expired'));
|
|
45
45
|
console.log();
|
|
46
46
|
console.log(chalk_1.default.yellow(' Please re-authenticate with Claude Code:'));
|
|
47
|
-
console.log(chalk_1.default.gray(' Run:
|
|
47
|
+
console.log(chalk_1.default.gray(' 1. Run: security delete-generic-password -s "Claude Code-credentials"'));
|
|
48
|
+
console.log(chalk_1.default.gray(' 2. Run: claude'));
|
|
49
|
+
console.log(chalk_1.default.gray(' 3. Complete the login flow in your browser'));
|
|
48
50
|
console.log();
|
|
49
51
|
process.exit(1);
|
|
50
52
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -35,10 +35,12 @@ async function main() {
|
|
|
35
35
|
if (!credentials) {
|
|
36
36
|
extractSpinner.fail(chalk.red('Claude credentials not found'));
|
|
37
37
|
console.log();
|
|
38
|
-
console.log(chalk.yellow('
|
|
38
|
+
console.log(chalk.yellow(' Set up Claude Code with long-lived tokens (recommended):'));
|
|
39
39
|
console.log(chalk.gray(' 1. Install: npm install -g @anthropic-ai/claude-code'));
|
|
40
|
-
console.log(chalk.gray(' 2. Run: claude'));
|
|
41
|
-
console.log(chalk.gray(' 3.
|
|
40
|
+
console.log(chalk.gray(' 2. Run: claude setup-token'));
|
|
41
|
+
console.log(chalk.gray(' 3. Follow the prompts to authenticate'));
|
|
42
|
+
console.log();
|
|
43
|
+
console.log(chalk.gray(' This creates tokens valid for 1 year.'));
|
|
42
44
|
console.log();
|
|
43
45
|
process.exit(1);
|
|
44
46
|
}
|
|
@@ -49,8 +51,12 @@ async function main() {
|
|
|
49
51
|
if (expiry.expired) {
|
|
50
52
|
extractSpinner.fail(chalk.red('Claude credentials have expired'));
|
|
51
53
|
console.log();
|
|
52
|
-
console.log(chalk.yellow('
|
|
53
|
-
console.log(chalk.
|
|
54
|
+
console.log(chalk.yellow(' For long-lived tokens (1 year), run:'));
|
|
55
|
+
console.log(chalk.white(' claude setup-token'));
|
|
56
|
+
console.log();
|
|
57
|
+
console.log(chalk.gray(' Or for short-lived tokens, re-authenticate:'));
|
|
58
|
+
console.log(chalk.gray(' 1. Run: security delete-generic-password -s "Claude Code-credentials"'));
|
|
59
|
+
console.log(chalk.gray(' 2. Run: claude, then /login'));
|
|
54
60
|
console.log();
|
|
55
61
|
process.exit(1);
|
|
56
62
|
}
|
|
@@ -61,6 +67,10 @@ async function main() {
|
|
|
61
67
|
// Show expiry info
|
|
62
68
|
if (expiry.expiringSoon) {
|
|
63
69
|
console.log(chalk.yellow(` ⚠ Expires in ${expiry.daysUntilExpiry} days (${expiry.expiresAt.toLocaleDateString()})`));
|
|
70
|
+
console.log(chalk.gray(' Tip: Run `claude setup-token` for 1-year tokens'));
|
|
71
|
+
} else if (expiry.daysUntilExpiry < 30) {
|
|
72
|
+
console.log(chalk.gray(` Expires: ${expiry.expiresAt.toLocaleDateString()} (${expiry.daysUntilExpiry} days)`));
|
|
73
|
+
console.log(chalk.gray(' Tip: Run `claude setup-token` for 1-year tokens'));
|
|
64
74
|
} else {
|
|
65
75
|
console.log(chalk.gray(` Expires: ${expiry.expiresAt.toLocaleDateString()} (${expiry.daysUntilExpiry} days)`));
|
|
66
76
|
}
|