mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 16:19:27 +00:00
chore: promote beta v5.1.1-beta.1 to main (#28)
* fix(cliproxy): use double-dash flags for cliproxyapi auth (#24)
CLIProxyAPI updated from single-dash to double-dash CLI flags.
Changed -login to --login, -codex-login to --codex-login,
-antigravity-login to --antigravity-login, -config to --config,
and -no-browser to --no-browser.
* chore(release): 5.1.1-beta.1 [skip ci]
## [5.1.1-beta.1](https://github.com/kaitranntt/ccs/compare/v5.1.0...v5.1.1-beta.1) (2025-12-01)
### Bug Fixes
* **cliproxy:** use double-dash flags for cliproxyapi auth ([#24](https://github.com/kaitranntt/ccs/issues/24)) ([4c81f28](https://github.com/kaitranntt/ccs/commit/4c81f28f0b67ef92cf74d0f5c13a5943ff0a7f00))
---------
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
This commit is contained in:
co-authored by
semantic-release-bot
parent
211215adcf
commit
5665b4a0aa
@@ -1,3 +1,10 @@
|
||||
## [5.1.1-beta.1](https://github.com/kaitranntt/ccs/compare/v5.1.0...v5.1.1-beta.1) (2025-12-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cliproxy:** use double-dash flags for cliproxyapi auth ([#24](https://github.com/kaitranntt/ccs/issues/24)) ([4c81f28](https://github.com/kaitranntt/ccs/commit/4c81f28f0b67ef92cf74d0f5c13a5943ff0a7f00))
|
||||
|
||||
# [5.1.0](https://github.com/kaitranntt/ccs/compare/v5.0.2...v5.1.0) (2025-12-01)
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ $InstallMethod = if ($ScriptDir -and ((Test-Path "$ScriptDir\lib\ccs.ps1") -or (
|
||||
# IMPORTANT: Update this version when releasing new versions!
|
||||
# This hardcoded version is used for standalone installations (irm | iex)
|
||||
# For git installations, VERSION file is read if available
|
||||
$CcsVersion = "5.1.0"
|
||||
$CcsVersion = "5.1.1-beta.1"
|
||||
|
||||
# Try to read VERSION file for git installations
|
||||
if ($ScriptDir) {
|
||||
|
||||
@@ -84,7 +84,7 @@ fi
|
||||
# IMPORTANT: Update this version when releasing new versions!
|
||||
# This hardcoded version is used for standalone installations (curl | bash)
|
||||
# For git installations, VERSION file is read if available
|
||||
CCS_VERSION="5.1.0"
|
||||
CCS_VERSION="5.1.1-beta.1"
|
||||
|
||||
# Try to read VERSION file for git installations
|
||||
if [[ -f "$SCRIPT_DIR/VERSION" ]]; then
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kaitranntt/ccs",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.1-beta.1",
|
||||
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* 1. Check if auth exists (token files in CCS auth directory)
|
||||
* 2. Trigger OAuth flow by spawning binary with auth flag
|
||||
* 3. Auto-detect headless environments (SSH, no DISPLAY)
|
||||
* 4. Use -no-browser flag for headless, display OAuth URL for manual auth
|
||||
* 4. Use --no-browser flag for headless, display OAuth URL for manual auth
|
||||
*
|
||||
* Token storage: ~/.ccs/cliproxy/auth/<provider>/
|
||||
* Each provider has its own directory to avoid conflicts.
|
||||
@@ -84,21 +84,21 @@ const OAUTH_CONFIGS: Record<CLIProxyProvider, ProviderOAuthConfig> = {
|
||||
displayName: 'Google Gemini',
|
||||
authUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
|
||||
scopes: ['https://www.googleapis.com/auth/generative-language'],
|
||||
authFlag: '-login',
|
||||
authFlag: '--login',
|
||||
},
|
||||
codex: {
|
||||
provider: 'codex',
|
||||
displayName: 'Codex',
|
||||
authUrl: 'https://auth.openai.com/authorize',
|
||||
scopes: ['openid', 'profile'],
|
||||
authFlag: '-codex-login',
|
||||
authFlag: '--codex-login',
|
||||
},
|
||||
agy: {
|
||||
provider: 'agy',
|
||||
displayName: 'Antigravity',
|
||||
authUrl: 'https://antigravity.ai/oauth/authorize',
|
||||
scopes: ['api'],
|
||||
authFlag: '-antigravity-login',
|
||||
authFlag: '--antigravity-login',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -284,7 +284,7 @@ export function clearAuth(provider: CLIProxyProvider): boolean {
|
||||
|
||||
/**
|
||||
* Trigger OAuth flow for provider
|
||||
* Auto-detects headless environment and uses -no-browser flag accordingly
|
||||
* Auto-detects headless environment and uses --no-browser flag accordingly
|
||||
*/
|
||||
export async function triggerOAuth(
|
||||
provider: CLIProxyProvider,
|
||||
@@ -319,10 +319,10 @@ export async function triggerOAuth(
|
||||
const configPath = generateConfig(provider);
|
||||
log(`Config generated: ${configPath}`);
|
||||
|
||||
// Build args: config + auth flag + optional -no-browser for headless
|
||||
const args = ['-config', configPath, oauthConfig.authFlag];
|
||||
// Build args: config + auth flag + optional --no-browser for headless
|
||||
const args = ['--config', configPath, oauthConfig.authFlag];
|
||||
if (headless) {
|
||||
args.push('-no-browser');
|
||||
args.push('--no-browser');
|
||||
}
|
||||
|
||||
// Show appropriate message
|
||||
@@ -343,7 +343,7 @@ export async function triggerOAuth(
|
||||
}
|
||||
|
||||
return new Promise<boolean>((resolve) => {
|
||||
// Spawn CLIProxyAPI with auth flag (and -no-browser if headless)
|
||||
// Spawn CLIProxyAPI with auth flag (and --no-browser if headless)
|
||||
const authProcess = spawn(binaryPath, args, {
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
env: {
|
||||
|
||||
Reference in New Issue
Block a user