Guest User

claude_aur

a guest
May 7th, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 26.03 KB | None | 0 0
  1.  claude
  2. file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:316
  3. `),D.code=W.error.code,D.errors=W.error.errors;else D.message=W.error.message,D.code=W.error.code;else if(G&&G.status>=400)D.message=W,D.status=G.status;return D}}_R2.DefaultTransporter=vi;vi.USER_AGENT=`${jR2}/${u25.version}`});var Tb=A((eg1,xR2)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var UY1=R1("buffer"),Gw=UY1.Buffer;function yR2(Z,G){for(var D in Z)G[D]=Z[D]}if(Gw.from&&Gw.alloc&&Gw.allocUnsafe&&Gw.allocUnsafeSlow)xR2.exports=UY1;else yR2(UY1,eg1),eg1.Buffer=nT;function nT(Z,G,D){return Gw(Z,G,D)}nT.prototype=Object.create(Gw.prototype);yR2(Gw,nT);nT.from=function(Z,G,D){if(typeof Z==="number")throw new TypeError("Argument must not be a number");return Gw(Z,G,D)};nT.alloc=function(Z,G,D){if(typeof Z!=="number")throw new TypeError("Argument must be a number");var W=Gw(Z);if(G!==void 0)if(typeof D==="string")W.fill(G,D);else W.fill(G);else W.fill(0);return W};nT.allocUnsafe=function(Z){if(typeof Z!=="number")throw new TypeError("Argument must be a number");return Gw(Z)};nT.allocUnsafeSlow=function(Z){if(typeof Z!=="number")throw new TypeError("Argument must be a number");return UY1.SlowBuffer(Z)}});var bR2=A((k63,vR2)=>{function Zd1(Z){var G=(Z/8|0)+(Z%8===0?0:1);return G}var m25={ES256:Zd1(256),ES384:Zd1(384),ES512:Zd1(521)};function p25(Z){var G=m25[Z];if(G)return G;throw new Error('Unknown algorithm "'+Z+'"')}vR2.exports=p25});var Gd1=A((y63,mR2)=>{var CY1=Tb().Buffer,hR2=bR2(),NY1=128,gR2=0,c25=32,l25=16,i25=2,dR2=l25|c25|gR2<<6,qY1=i25|gR2<<6;function n25(Z){return Z.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uR2(Z){if(CY1.isBuffer(Z))return Z;else if(typeof Z==="string")return CY1.from(Z,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function a25(Z,G){Z=uR2(Z);var D=hR2(G),W=D+1,Y=Z.length,X=0;if(Z[X++]!==dR2)throw new Error('Could not find expected "seq"');var B=Z[X++];if(B===(NY1|1))B=Z[X++];if(Y-X<B)throw new Error('"seq" specified length of "'+B+'", only "'+(Y-X)+'" remaining');if(Z[X++]!==qY1)throw new Error('Could not find expected "int" for "r"');var V=Z[X++];if(Y-X-2<V)throw new Error('"r" specified length of "'+V+'", only "'+(Y-X-2)+'" available');if(W<V)throw new Error('"r" specified length of "'+V+'", max of "'+W+'" is acceptable');var J=X;if(X+=V,Z[X++]!==qY1)throw new Error('Could not find expected "int" for "s"');var F=Z[X++];if(Y-X!==F)throw new Error('"s" specified length of "'+F+'", expected "'+(Y-X)+'"');if(W<F)throw new Error('"s" specified length of "'+F+'", max of "'+W+'" is acceptable');var I=X;if(X+=F,X!==Y)throw new Error('Expected to consume entire buffer, but "'+(Y-X)+'" bytes remain');var K=D-V,Q=D-F,H=CY1.allocUnsafe(K+V+Q+F);for(X=0;X<K;++X)H[X]=0;Z.copy(H,X,J+Math.max(-K,0),J+V),X=D;for(var z=X;X<z+Q;++X)H[X]=0;return Z.copy(H,X,I+Math.max(-Q,0),I+F),H=H.toString("base64"),H=n25(H),H}function fR2(Z,G,D){var W=0;while(G+W<D&&Z[G+W]===0)++W;var Y=Z[G+W]>=NY1;if(Y)--W;return W}function s25(Z,G){Z=uR2(Z);var D=hR2(G),W=Z.length;if(W!==D*2)throw new TypeError('"'+G+'" signatures must be "'+D*2+'" bytes, saw "'+W+'"');var Y=fR2(Z,0,D),X=fR2(Z,D,Z.length),B=D-Y,V=D-X,J=2+B+1+1+V,F=J<NY1,I=CY1.allocUnsafe((F?2:3)+J),K=0;if(I[K++]=dR2,F)I[K++]=J;else I[K++]=NY1|1,I[K++]=J&255;if(I[K++]=qY1,I[K++]=B,Y<0)I[K++]=0,K+=Z.copy(I,K,0,D);else K+=Z.copy(I,K,Y,D);if(I[K++]=qY1,I[K++]=V,X<0)I[K++]=0,Z.copy(I,K,D);else Z.copy(I,K,D+X);return I}mR2.exports={derToJose:a25,joseToDer:s25}});var pM=A((mM)=>{var XQ=mM&&mM.__classPrivateFieldGet||function(Z,G,D,W){if(D==="a"&&!W)throw new TypeError("Private accessor was defined without a getter");if(typeof G==="function"?Z!==G||!W:!G.has(Z))throw new TypeError("Cannot read private member from an object whose class did not declare it");return D==="m"?W:D==="a"?W.call(Z):W?W.value:G.get(Z)},Pb,wU,Dd1,Wd1;Object.defineProperty(mM,"__esModule",{value:!0});mM.LRUCache=void 0;mM.snakeToCamel=pR2;mM.originalOrCamelOptions=r25;function pR2(Z){return Z.replace(/([_][^_])/g,(G)=>G.slice(1).toUpperCase())}function r25(Z){function G(D){var W;let Y=Z||{};return(W=Y[D])!==null&&W!==void 0?W:Y[pR2(D)]}return{get:G}}class cR2{constructor(Z){Pb.add(this),wU.set(this,new Map),this.capacity=Z.capacity,this.maxAge=Z.maxAge}set(Z,G){XQ(this,Pb,"m",Dd1).call(this,Z,G),XQ(this,Pb,"m",Wd1).call(this)}get(Z){let G=XQ(this,wU,"f").get(Z);if(!G)return;return XQ(this,Pb,"m",Dd1).call(this,Z,G.value),XQ(this,Pb,"m",Wd1).call(this),G.value}}mM.LRUCache=cR2;wU=new WeakMap,Pb=new WeakSet,Dd1=function Z(G,D){XQ(this,wU,"f").delete(G),XQ(this,wU,"f").set(G,{value:D,lastAccessed:Date.now()})},Wd1=function Z(){let G=this.maxAge?Date.now()-this.maxAge:0,D=XQ(this,wU,"f").entries().next();while(!D.done&&(XQ(this,wU,"f").size>this.capacity||D.value[1].lastAccessed<G))XQ(this,wU,"f").delete(D.value[0]),D=XQ(this,wU,"f").entries().next()}});var Dw=A((aR2)=>{Object.defineProperty(aR2,"__esModule",{value:!0});aR2.AuthClient=aR2.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=aR2.DEFAULT_UNIVERSE=void 0;var o25=R1("events"),lR2=WQ(),iR2=bi(),t25=pM();aR2.DEFAULT_UNIVERSE="googleapis.com";aR2.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300000;class nR2 extends o25.EventEmitter{constructor(Z={}){var G,D,W,Y,X;super();this.credentials={},this.eagerRefreshThresholdMillis=aR2.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS,this.forceRefreshOnFailure=!1,this.universeDomain=aR2.DEFAULT_UNIVERSE;let B=t25.originalOrCamelOptions(Z);if(this.apiKey=Z.apiKey,this.projectId=(G=B.get("project_id"))!==null&&G!==void 0?G:null,this.quotaProjectId=B.get("quota_project_id"),this.credentials=(D=B.get("credentials"))!==null&&D!==void 0?D:{},this.universeDomain=(W=B.get("universe_domain"))!==null&&W!==void 0?W:aR2.DEFAULT_UNIVERSE,this.transporter=(Y=Z.transporter)!==null&&Y!==void 0?Y:new iR2.DefaultTransporter,Z.transporterOptions)this.transporter.defaults=Z.transporterOptions;if(Z.eagerRefreshThresholdMillis)this.eagerRefreshThresholdMillis=Z.eagerRefreshThresholdMillis;this.forceRefreshOnFailure=(X=Z.forceRefreshOnFailure)!==null&&X!==void 0?X:!1}get gaxios(){if(this.transporter instanceof lR2.Gaxios)return this.transporter;else if(this.transporter instanceof iR2.DefaultTransporter)return this.transporter.instance;else if("instance"in this.transporter&&this.transporter.instance instanceof lR2.Gaxios)return this.transporter.instance;return null}setCredentials(Z){this.credentials=Z}addSharedMetadataHeaders(Z){if(!Z["x-goog-user-project"]&&this.quotaProjectId)Z["x-goog-user-project"]=this.quotaProjectId;return Z}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}}aR2.AuthClient=nR2});var Xd1=A((tR2)=>{Object.defineProperty(tR2,"__esModule",{value:!0});tR2.LoginTicket=void 0;class oR2{constructor(Z,G){this.envelope=Z,this.payload=G}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let Z=this.getPayload();if(Z&&Z.sub)return Z.sub;return null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}}tR2.LoginTicket=oR2});var aT=A((GT2)=>{Object.defineProperty(GT2,"__esModule",{value:!0});GT2.OAuth2Client=GT2.ClientAuthentication=GT2.CertificateFormat=GT2.CodeChallengeMethod=void 0;var e25=WQ(),Bd1=R1("querystring"),Z65=R1("stream"),G65=Gd1(),Vd1=Ob(),D65=Dw(),W65=Xd1(),ZT2;(function(Z){Z.Plain="plain",Z.S256="S256"})(ZT2||(GT2.CodeChallengeMethod=ZT2={}));var $U;(function(Z){Z.PEM="PEM",Z.JWK="JWK"})($U||(GT2.CertificateFormat=$U={}));var fi;(function(Z){Z.ClientSecretPost="ClientSecretPost",Z.ClientSecretBasic="ClientSecretBasic",Z.None="None"})(fi||(GT2.ClientAuthentication=fi={}));class TX extends D65.AuthClient{constructor(Z,G,D){let W=Z&&typeof Z==="object"?Z:{clientId:Z,clientSecret:G,redirectUri:D};super(W);this.certificateCache={},this.certificateExpiry=null,this.certificateCacheFormat=$U.PEM,this.refreshTokenPromises=new Map,this._clientId=W.clientId,this._clientSecret=W.clientSecret,this.redirectUri=W.redirectUri,this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...W.endpoints},this.clientAuthentication=W.clientAuthentication||fi.ClientSecretPost,this.issuers=W.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}generateAuthUrl(Z={}){if(Z.code_challenge_method&&!Z.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");if(Z.response_type=Z.response_type||"code",Z.client_id=Z.client_id||this._clientId,Z.redirect_uri=Z.redirect_uri||this.redirectUri,Array.isArray(Z.scope))Z.scope=Z.scope.join(" ");return this.endpoints.oauth2AuthBaseUrl.toString()+"?"+Bd1.stringify(Z)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let Z=Vd1.createCrypto(),D=Z.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),Y=(await Z.sha256DigestBase64(D)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:D,codeChallenge:Y}}getToken(Z,G){let D=typeof Z==="string"?{code:Z}:Z;if(G)this.getTokenAsync(D).then((W)=>G(null,W.tokens,W.res),(W)=>G(W,null,W.response));else return this.getTokenAsync(D)}async getTokenAsync(Z){let G=this.endpoints.oauth2TokenUrl.toString(),D={"Content-Type":"application/x-www-form-urlencoded"},W={client_id:Z.client_id||this._clientId,code_verifier:Z.codeVerifier,code:Z.code,grant_type:"authorization_code",redirect_uri:Z.redirect_uri||this.redirectUri};if(this.clientAuthentication===fi.ClientSecretBasic){let B=Buffer.from(`${this._clientId}:${this._clientSecret}`);D.Authorization=`Basic ${B.toString("base64")}`}if(this.clientAuthentication===fi.ClientSecretPost)W.client_secret=this._clientSecret;let Y=await this.transporter.request({...TX.RETRY_CONFIG,method:"POST",url:G,data:Bd1.stringify(W),headers:D}),X=Y.data;if(Y.data&&Y.data.expires_in)X.expiry_date=new Date().getTime()+Y.data.expires_in*1000,delete X.expires_in;return this.emit("tokens",X),{tokens:X,res:Y}}async refreshToken(Z){if(!Z)return this.refreshTokenNoCache(Z);if(this.refreshTokenPromises.has(Z))return this.refreshTokenPromises.get(Z);let G=this.refreshTokenNoCache(Z).then((D)=>{return this.refreshTokenPromises.delete(Z),D},(D)=>{throw this.refreshTokenPromises.delete(Z),D});return this.refreshTokenPromises.set(Z,G),G}async refreshTokenNoCache(Z){var G;if(!Z)throw new Error("No refresh token is set.");let D=this.endpoints.oauth2TokenUrl.toString(),W={refresh_token:Z,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},Y;try{Y=await this.transporter.request({...TX.RETRY_CONFIG,method:"POST",url:D,data:Bd1.stringify(W),headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(B){if(B instanceof e25.GaxiosError&&B.message==="invalid_grant"&&((G=B.response)===null||G===void 0?void 0:G.data)&&/ReAuth/i.test(B.response.data.error_description))B.message=JSON.stringify(B.response.data);throw B}let X=Y.data;if(Y.data&&Y.data.expires_in)X.expiry_date=new Date().getTime()+Y.data.expires_in*1000,delete X.expires_in;return this.emit("tokens",X),{tokens:X,res:Y}}refreshAccessToken(Z){if(Z)this.refreshAccessTokenAsync().then((G)=>Z(null,G.credentials,G.res),Z);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let Z=await this.refreshToken(this.credentials.refresh_token),G=Z.tokens;return G.refresh_token=this.credentials.refresh_token,this.credentials=G,{credentials:this.credentials,res:Z.res}}getAccessToken(Z){if(Z)this.getAccessTokenAsync().then((G)=>Z(null,G.token,G.res),Z);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let D=await this.processAndValidateRefreshHandler();if(D===null||D===void 0?void 0:D.access_token)return this.setCredentials(D),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let G=await this.refreshAccessTokenAsync();if(!G.credentials||G.credentials&&!G.credentials.access_token)throw new Error("Could not refresh access token.");return{token:G.credentials.access_token,res:G.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(Z){return(await this.getRequestMetadataAsync(Z)).headers}async getRequestMetadataAsync(Z){let G=this.credentials;if(!G.access_token&&!G.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(G.access_token&&!this.isTokenExpiring()){G.token_type=G.token_type||"Bearer";let B={Authorization:G.token_type+" "+G.access_token};return{headers:this.addSharedMetadataHeaders(B)}}if(this.refreshHandler){let B=await this.processAndValidateRefreshHandler();if(B===null||B===void 0?void 0:B.access_token){this.setCredentials(B);let V={Authorization:"Bearer "+this.credentials.access_token};return{headers:this.addSharedMetadataHeaders(V)}}}if(this.apiKey)return{headers:{"X-Goog-Api-Key":this.apiKey}};let D=null,W=null;try{D=await this.refreshToken(G.refresh_token),W=D.tokens}catch(B){let V=B;if(V.response&&(V.response.status===403||V.response.status===404))V.message=`Could not refresh access token: ${V.message}`;throw V}let Y=this.credentials;Y.token_type=Y.token_type||"Bearer",W.refresh_token=Y.refresh_token,this.credentials=W;let X={Authorization:Y.token_type+" "+W.access_token};return{headers:this.addSharedMetadataHeaders(X),res:D.res}}static getRevokeTokenUrl(Z){return new TX().getRevokeTokenURL(Z).toString()}getRevokeTokenURL(Z){let G=new URL(this.endpoints.oauth2RevokeUrl);return G.searchParams.append("token",Z),G}revokeToken(Z,G){let D={...TX.RETRY_CONFIG,url:this.getRevokeTokenURL(Z).toString(),method:"POST"};if(G)this.transporter.request(D).then((W)=>G(null,W),G);else return this.transporter.request(D)}revokeCredentials(Z){if(Z)this.revokeCredentialsAsync().then((G)=>Z(null,G),Z);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let Z=this.credentials.access_token;if(this.credentials={},Z)return this.revokeToken(Z);else throw new Error("No access token to revoke.")}request(Z,G){if(G)this.requestAsync(Z).then((D)=>G(null,D),(D)=>{return G(D,D.response)});else return this.requestAsync(Z)}async requestAsync(Z,G=!1){let D;try{let W=await this.getRequestMetadataAsync(Z.url);if(Z.headers=Z.headers||{},W.headers&&W.headers["x-goog-user-project"])Z.headers["x-goog-user-project"]=W.headers["x-goog-user-project"];if(W.headers&&W.headers.Authorization)Z.headers.Authorization=W.headers.Authorization;if(this.apiKey)Z.headers["X-Goog-Api-Key"]=this.apiKey;D=await this.transporter.request(Z)}catch(W){let Y=W.response;if(Y){let X=Y.status,B=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),V=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,J=Y.config.data instanceof Z65.Readable,F=X===401||X===403;if(!G&&F&&!J&&B)return await this.refreshAccessTokenAsync(),this.requestAsync(Z,!0);else if(!G&&F&&!J&&V){let I=await this.processAndValidateRefreshHandler();if(I===null||I===void 0?void 0:I.access_token)this.setCredentials(I);return this.requestAsync(Z,!0)}}throw W}return D}verifyIdToken(Z,G){if(G&&typeof G!=="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(G)this.verifyIdTokenAsync(Z).then((D)=>G(null,D),G);else return this.verifyIdTokenAsync(Z)}async verifyIdTokenAsync(Z){if(!Z.idToken)throw new Error("The verifyIdToken method requires an ID Token");let G=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(Z.idToken,G.certs,Z.audience,this.issuers,Z.maxExpiry)}async getTokenInfo(Z){let{data:G}=await this.transporter.request({...TX.RETRY_CONFIG,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Bearer ${Z}`},url:this.endpoints.tokenInfoUrl.toString()}),D=Object.assign({expiry_date:new Date().getTime()+G.expires_in*1000,scopes:G.scope.split(" ")},G);return delete D.expires_in,delete D.scope,D}getFederatedSignonCerts(Z){if(Z)this.getFederatedSignonCertsAsync().then((G)=>Z(null,G.certs,G.res),Z);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let Z=new Date().getTime(),G=Vd1.hasBrowserCrypto()?$U.JWK:$U.PEM;if(this.certificateExpiry&&Z<this.certificateExpiry.getTime()&&this.certificateCacheFormat===G)return{certs:this.certificateCache,format:G};let D,W;switch(G){case $U.PEM:W=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case $U.JWK:W=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${G}`)}try{D=await this.transporter.request({...TX.RETRY_CONFIG,url:W})}catch(J){if(J instanceof Error)J.message=`Failed to retrieve verification certificates: ${J.message}`;throw J}let Y=D?D.headers["cache-control"]:void 0,X=-1;if(Y){let F=new RegExp("max-age=([0-9]*)").exec(Y);if(F&&F.length===2)X=Number(F[1])*1000}let B={};switch(G){case $U.PEM:B=D.data;break;case $U.JWK:for(let J of D.data.keys)B[J.kid]=J;break;default:throw new Error(`Unsupported certificate format ${G}`)}let V=new Date;return this.certificateExpiry=X===-1?null:new Date(V.getTime()+X),this.certificateCache=B,this.certificateCacheFormat=G,{certs:B,format:G,res:D}}getIapPublicKeys(Z){if(Z)this.getIapPublicKeysAsync().then((G)=>Z(null,G.pubkeys,G.res),Z);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let Z,G=this.endpoints.oauth2IapPublicKeyUrl.toString();try{Z=await this.transporter.request({...TX.RETRY_CONFIG,url:G})}catch(D){if(D instanceof Error)D.message=`Failed to retrieve verification certificates: ${D.message}`;throw D}return{pubkeys:Z.data,res:Z}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(Z,G,D,W,Y){let X=Vd1.createCrypto();if(!Y)Y=TX.DEFAULT_MAX_TOKEN_LIFETIME_SECS_;let B=Z.split(".");if(B.length!==3)throw new Error("Wrong number of segments in token: "+Z);let V=B[0]+"."+B[1],J=B[2],F,I;try{F=JSON.parse(X.decodeBase64StringUtf8(B[0]))}catch(O){if(O instanceof Error)O.message=`Can't parse token envelope: ${B[0]}': ${O.message}`;throw O}if(!F)throw new Error("Can't parse token envelope: "+B[0]);try{I=JSON.parse(X.decodeBase64StringUtf8(B[1]))}catch(O){if(O instanceof Error)O.message=`Can't parse token payload '${B[0]}`;throw O}if(!I)throw new Error("Can't parse token payload: "+B[1]);if(!Object.prototype.hasOwnProperty.call(G,F.kid))throw new Error("No pem found for envelope: "+JSON.stringify(F));let K=G[F.kid];if(F.alg==="ES256")J=G65.joseToDer(J,"ES256").toString("base64");if(!await X.verify(K,V,J))throw new Error("Invalid token signature: "+Z);if(!I.iat)throw new Error("No issue time in token: "+JSON.stringify(I));if(!I.exp)throw new Error("No expiration time in token: "+JSON.stringify(I));let H=Number(I.iat);if(isNaN(H))throw new Error("iat field using invalid format");let z=Number(I.exp);if(isNaN(z))throw new Error("exp field using invalid format");let U=new Date().getTime()/1000;if(z>=U+Y)throw new Error("Expiration time too far in future: "+JSON.stringify(I));let N=H-TX.CLOCK_SKEW_SECS_,R=z+TX.CLOCK_SKEW_SECS_;if(U<N)throw new Error("Token used too early, "+U+" < "+N+": "+JSON.stringify(I));if(U>R)throw new Error("Token used too late, "+U+" > "+R+": "+JSON.stringify(I));if(W&&W.indexOf(I.iss)<0)throw new Error("Invalid issuer, expected one of ["+W+"], but got "+I.iss);if(typeof D!=="undefined"&&D!==null){let O=I.aud,L=!1;if(D.constructor===Array)L=D.indexOf(O)>-1;else L=O===D;if(!L)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new W65.LoginTicket(F,I)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let Z=await this.refreshHandler();if(!Z.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return Z}return}isTokenExpiring(){let Z=this.credentials.expiry_date;return Z?Z<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}}GT2.OAuth2Client=TX;TX.GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";TX.CLOCK_SKEW_SECS_=300;TX.DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400});var Jd1=A((XT2)=>{Object.defineProperty(XT2,"__esModule",{value:!0});XT2.Compute=void 0;var V65=WQ(),WT2=xi(),J65=aT();class YT2 extends J65.OAuth2Client{constructor(Z={}){super(Z);this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=Z.serviceAccountEmail||"default",this.scopes=Array.isArray(Z.scopes)?Z.scopes:Z.scopes?[Z.scopes]:[]}async refreshTokenNoCache(Z){let G=`service-accounts/${this.serviceAccountEmail}/token`,D;try{let Y={property:G};if(this.scopes.length>0)Y.params={scopes:this.scopes.join(",")};D=await WT2.instance(Y)}catch(Y){if(Y instanceof V65.GaxiosError)Y.message=`Could not refresh access token: ${Y.message}`,this.wrapError(Y);throw Y}let W=D;if(D&&D.expires_in)W.expiry_date=new Date().getTime()+D.expires_in*1000,delete W.expires_in;return this.emit("tokens",W),{tokens:W,res:null}}async fetchIdToken(Z){let G=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${Z}`,D;try{let W={property:G};D=await WT2.instance(W)}catch(W){if(W instanceof Error)W.message=`Could not fetch ID token: ${W.message}`;throw W}return D}wrapError(Z){let G=Z.response;if(G&&G.status){if(Z.status=G.status,G.status===403)Z.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+Z.message;else if(G.status===404)Z.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+Z.message}}}XT2.Compute=YT2});var Fd1=A((JT2)=>{Object.defineProperty(JT2,"__esModule",{value:!0});JT2.IdTokenClient=void 0;var F65=aT();class VT2 extends F65.OAuth2Client{constructor(Z){super(Z);this.targetAudience=Z.targetAudience,this.idTokenProvider=Z.idTokenProvider}async getRequestMetadataAsync(Z){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let D=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:D,expiry_date:this.getIdTokenExpiryDate(D)}}return{headers:{Authorization:"Bearer "+this.credentials.id_token}}}getIdTokenExpiryDate(Z){let G=Z.split(".")[1];if(G)return JSON.parse(Buffer.from(G,"base64").toString("ascii")).exp*1000}}JT2.IdTokenClient=VT2});var Id1=A((KT2)=>{Object.defineProperty(KT2,"__esModule",{value:!0});KT2.GCPEnv=void 0;KT2.clear=I65;KT2.getEnv=K65;var IT2=xi(),AU;(function(Z){Z.APP_ENGINE="APP_ENGINE",Z.KUBERNETES_ENGINE="KUBERNETES_ENGINE",Z.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",Z.COMPUTE_ENGINE="COMPUTE_ENGINE",Z.CLOUD_RUN="CLOUD_RUN",Z.NONE="NONE"})(AU||(KT2.GCPEnv=AU={}));var hi;function I65(){hi=void 0}async function K65(){if(hi)return hi;return hi=Q65(),hi}async function Q65(){let Z=AU.NONE;if(H65())Z=AU.APP_ENGINE;else if(z65())Z=AU.CLOUD_FUNCTIONS;else if(await A65())if(await $65())Z=AU.KUBERNETES_ENGINE;else if(w65())Z=AU.CLOUD_RUN;else Z=AU.COMPUTE_ENGINE;else Z=AU.NONE;return Z}function H65(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}function z65(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}function w65(){return!!process.env.K_CONFIGURATION}async function $65(){try{return await IT2.instance("attributes/cluster-name"),!0}catch(Z){return!1}}async function A65(){return IT2.isAvailable()}});var Kd1=A((u63,HT2)=>{var MY1=Tb().Buffer,N65=R1("stream"),q65=R1("util");function LY1(Z){if(this.buffer=null,this.writable=!0,this.readable=!0,!Z)return this.buffer=MY1.alloc(0),this;if(typeof Z.pipe==="function")return this.buffer=MY1.alloc(0),Z.pipe(this),this;if(Z.length||typeof Z==="object")return this.buffer=Z,this.writable=!1,process.nextTick(function(){this.emit("end",Z),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof Z+")")}q65.inherits(LY1,N65);LY1.prototype.write=function Z(G){this.buffer=MY1.concat([this.buffer,MY1.from(G)]),this.emit("data",G)};LY1.prototype.end=function Z(G){if(G)this.write(G);this.emit("end",G),this.emit("close"),this.writable=!1,this.readable=!1};HT2.exports=LY1});var wT2=A((m63,zT2)=>{var gi=R1("buffer").Buffer,Qd1=R1("buffer").SlowBuffer;zT2.exports=EY1;function EY1(Z,G){if(!gi.isBuffer(Z)||!gi.isBuffer(G))return!1;if(Z.length!==G.length)return!1;var D=0;for(var W=0;W<Z.length;W++)D|=Z[W]^G[W];return D===0}EY1.install=function(){gi.prototype.equal=Qd1.prototype.equal=function Z(G){return EY1(this,G)}};var M65=gi.prototype.equal,L65=Qd1.prototype.equal;EY1.restore=function(){gi.prototype.equal=M65,Qd1.prototype.equal=L65}});var wd1=A((p63,ET2)=>{var E65=wT2(),jb=Tb().Buffer,Ww=R1("crypto"),AT2=Gd1(),$T2=R1("util"),O65=`"%s" is not a valid algorithm.
  4.  
  5.  
  6. TypeError: Cannot read properties of undefined (reading 'prototype')
  7.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:316:25482
  8.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:13:402
  9.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:316:25601
  10.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:13:402
  11.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:318:3206
  12.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:13:402
  13.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:318:6228
  14.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:13:402
  15.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:318:7433
  16.     at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:13:402
  17.  
  18. Node.js v24.0.0
Add Comment
Please, Sign In to add comment