* feat: add oauth 2.0 support with login,whoami and logout commands * ci: lockfile * fix: address security and port issues in OAuth flow - Fix XSS vulnerability by escaping HTML in error page messages - Change callback port from 9876 to 52417 (high ephemeral range, less likely to conflict) * refactor: clean up auth code and remove unnecessary comments - Remove obvious comments that duplicate function names - Extract duplicate expiration display logic into printTokenExpiration helper - Simplify logoutCommand (remove async, inline condition) - Remove unused saved_at field from token storage * fix: address auth bugs and remove unused code Bug fixes: - whoami now shows "Session expired" instead of misleading "Logged in" when token is invalid - expires_at calculation preserves existing value instead of overwriting - Login check now allows re-login when tokens are expired with no refresh token Simplifications: - Remove unused getAccessToken and refreshAccessToken functions - Simplify printTokenExpiration (remove unused showExpired parameter) * refactor: improve whoami output formatting - Align labels using padEnd for consistent output - Remove expiration time display from whoami - Show login status first, then fetch user details * chore: add changeset for OAuth feature
65 lines
1.4 KiB
JSON
65 lines
1.4 KiB
JSON
{
|
|
"name": "ctx7",
|
|
"version": "0.1.5",
|
|
"description": "Context7 CLI - Manage AI coding skills and documentation context",
|
|
"type": "module",
|
|
"bin": {
|
|
"ctx7": "./dist/index.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"dev": "tsup --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint src --fix",
|
|
"lint:check": "eslint src",
|
|
"format": "prettier --write src",
|
|
"format:check": "prettier --check src",
|
|
"clean": "rm -rf dist node_modules"
|
|
},
|
|
"dependencies": {
|
|
"@inquirer/prompts": "^8.2.0",
|
|
"commander": "^13.1.0",
|
|
"figlet": "^1.9.4",
|
|
"open": "^10.1.0",
|
|
"ora": "^9.0.0",
|
|
"picocolors": "^1.1.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/figlet": "^1.7.0",
|
|
"@types/node": "^22.19.1",
|
|
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
"@typescript-eslint/parser": "^8.28.0",
|
|
"eslint": "^9.34.0",
|
|
"eslint-plugin-prettier": "^5.2.5",
|
|
"prettier": "^3.6.2",
|
|
"tsup": "^8.5.0",
|
|
"typescript": "^5.8.2",
|
|
"typescript-eslint": "^8.28.0"
|
|
},
|
|
"keywords": [
|
|
"context7",
|
|
"cli",
|
|
"ai",
|
|
"skills",
|
|
"documentation",
|
|
"mcp"
|
|
],
|
|
"author": "Upstash",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/upstash/context7.git",
|
|
"directory": "packages/cli"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/upstash/context7/issues"
|
|
},
|
|
"homepage": "https://context7.com",
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|