replicas-cli 0.3.431 → 0.3.432
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.cjs +14 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38498,7 +38498,7 @@ var CLI_VERSION;
|
|
|
38498
38498
|
var init_cli_version = __esm({
|
|
38499
38499
|
"../shared/src/cli-version.ts"() {
|
|
38500
38500
|
"use strict";
|
|
38501
|
-
CLI_VERSION = "0.3.
|
|
38501
|
+
CLI_VERSION = "0.3.432";
|
|
38502
38502
|
}
|
|
38503
38503
|
});
|
|
38504
38504
|
|
|
@@ -51722,6 +51722,15 @@ var init_codex_auth2 = __esm({
|
|
|
51722
51722
|
}
|
|
51723
51723
|
});
|
|
51724
51724
|
|
|
51725
|
+
// ../shared/src/claude-setup-token.ts
|
|
51726
|
+
var CLAUDE_SETUP_TOKEN_LIFETIME_SECONDS;
|
|
51727
|
+
var init_claude_setup_token = __esm({
|
|
51728
|
+
"../shared/src/claude-setup-token.ts"() {
|
|
51729
|
+
"use strict";
|
|
51730
|
+
CLAUDE_SETUP_TOKEN_LIFETIME_SECONDS = 365 * 24 * 60 * 60;
|
|
51731
|
+
}
|
|
51732
|
+
});
|
|
51733
|
+
|
|
51725
51734
|
// src/lib/claude-oauth.ts
|
|
51726
51735
|
function buildAuthorizationUrl2(codeChallenge, state) {
|
|
51727
51736
|
const params = new URLSearchParams({
|
|
@@ -51782,7 +51791,7 @@ async function exchangeCodeForTokens2(code, state, expectedState, codeVerifier)
|
|
|
51782
51791
|
client_id: CLAUDE_CLIENT_ID,
|
|
51783
51792
|
redirect_uri: REDIRECT_URI,
|
|
51784
51793
|
code_verifier: codeVerifier,
|
|
51785
|
-
expires_in:
|
|
51794
|
+
expires_in: CLAUDE_SETUP_TOKEN_LIFETIME_SECONDS
|
|
51786
51795
|
};
|
|
51787
51796
|
const response = await fetch(TOKEN_ENDPOINT2, {
|
|
51788
51797
|
method: "POST",
|
|
@@ -51800,7 +51809,7 @@ async function exchangeCodeForTokens2(code, state, expectedState, codeVerifier)
|
|
|
51800
51809
|
accessToken: data.access_token,
|
|
51801
51810
|
tokenType: data.token_type,
|
|
51802
51811
|
scope: data.scope,
|
|
51803
|
-
expiresAt: new Date(Date.now() + (data.expires_in ??
|
|
51812
|
+
expiresAt: new Date(Date.now() + (data.expires_in ?? CLAUDE_SETUP_TOKEN_LIFETIME_SECONDS) * 1e3).toISOString(),
|
|
51804
51813
|
accountEmail: data.account?.email_address
|
|
51805
51814
|
};
|
|
51806
51815
|
}
|
|
@@ -51821,7 +51830,7 @@ async function runClaudeOAuthFlow(totalSteps) {
|
|
|
51821
51830
|
}
|
|
51822
51831
|
return exchangeCodeForTokens2(code, returnedState, state, pkce.codeVerifier);
|
|
51823
51832
|
}
|
|
51824
|
-
var import_readline, import_chalk15, DEFAULT_CLIENT_ID, CLAUDE_CLIENT_ID, AUTHORIZATION_ENDPOINT2, TOKEN_ENDPOINT2, REDIRECT_URI, SCOPES
|
|
51833
|
+
var import_readline, import_chalk15, DEFAULT_CLIENT_ID, CLAUDE_CLIENT_ID, AUTHORIZATION_ENDPOINT2, TOKEN_ENDPOINT2, REDIRECT_URI, SCOPES;
|
|
51825
51834
|
var init_claude_oauth = __esm({
|
|
51826
51835
|
"src/lib/claude-oauth.ts"() {
|
|
51827
51836
|
"use strict";
|
|
@@ -51830,13 +51839,13 @@ var init_claude_oauth = __esm({
|
|
|
51830
51839
|
init_oauth_flow_ui();
|
|
51831
51840
|
init_output();
|
|
51832
51841
|
init_pkce();
|
|
51842
|
+
init_claude_setup_token();
|
|
51833
51843
|
DEFAULT_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
51834
51844
|
CLAUDE_CLIENT_ID = process.env.CLAUDE_OAUTH_CLIENT_ID || DEFAULT_CLIENT_ID;
|
|
51835
51845
|
AUTHORIZATION_ENDPOINT2 = "https://claude.com/cai/oauth/authorize";
|
|
51836
51846
|
TOKEN_ENDPOINT2 = "https://platform.claude.com/v1/oauth/token";
|
|
51837
51847
|
REDIRECT_URI = "https://platform.claude.com/oauth/code/callback";
|
|
51838
51848
|
SCOPES = "user:inference";
|
|
51839
|
-
TOKEN_LIFETIME_SECONDS = 365 * 24 * 60 * 60;
|
|
51840
51849
|
}
|
|
51841
51850
|
});
|
|
51842
51851
|
|