Edit: /tmp/tsx-0/17887-70db0e62223d4de6ed65b00ab5ea35d85820c3b1 (2841B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/dist/plugins/generic-oauth/providers/hubspot.mjs\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var hubspot_exports={};__export(hubspot_exports,{hubspot:()=>hubspot});module.exports=__toCommonJS(hubspot_exports);var import_fetch=require(\"@better-fetch/fetch\");function hubspot(options){const defaultScopes=[\"oauth\"];const getUserInfo=__name(async tokens=>{const{data:profile,error}=await(0,import_fetch.betterFetch)(`https://api.hubapi.com/oauth/v1/access-tokens/${tokens.accessToken}`,{headers:{\"Content-Type\":\"application/json\"}});if(error||!profile)return null;const id=profile.user_id??profile.signed_access_token?.userId;if(!id)return null;return{id,name:profile.user,email:profile.user,image:void 0,emailVerified:false}},\"getUserInfo\");return{providerId:\"hubspot\",authorizationUrl:\"https://app.hubspot.com/oauth/authorize\",tokenUrl:\"https://api.hubapi.com/oauth/v1/token\",clientId:options.clientId,clientSecret:options.clientSecret,scopes:options.scopes??defaultScopes,redirectURI:options.redirectURI,authentication:\"post\",pkce:options.pkce,disableImplicitSignUp:options.disableImplicitSignUp,disableSignUp:options.disableSignUp,overrideUserInfo:options.overrideUserInfo,getUserInfo}}__name(hubspot,\"hubspot\");0&&(module.exports={hubspot});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,qIAA4B,+BAyB5B,SAAS,QAAQ,QAAS,CACzB,MAAM,cAAgB,CAAC,OAAO,EAC9B,MAAM,YAAc,aAAO,QAAW,CACrC,KAAM,CAAE,KAAM,QAAS,KAAM,EAAI,QAAM,0BAAY,iDAAiD,OAAO,WAAW,GAAI,CAAE,QAAS,CAAE,eAAgB,kBAAmB,CAAE,CAAC,EAC7K,GAAI,OAAS,CAAC,QAAS,OAAO,KAC9B,MAAM,GAAK,QAAQ,SAAW,QAAQ,qBAAqB,OAC3D,GAAI,CAAC,GAAI,OAAO,KAChB,MAAO,CACN,GACA,KAAM,QAAQ,KACd,MAAO,QAAQ,KACf,MAAO,OACP,cAAe,KAChB,CACD,EAZoB,eAapB,MAAO,CACN,WAAY,UACZ,iBAAkB,0CAClB,SAAU,wCACV,SAAU,QAAQ,SAClB,aAAc,QAAQ,aACtB,OAAQ,QAAQ,QAAU,cAC1B,YAAa,QAAQ,YACrB,eAAgB,OAChB,KAAM,QAAQ,KACd,sBAAuB,QAAQ,sBAC/B,cAAe,QAAQ,cACvB,iBAAkB,QAAQ,iBAC1B,WACD,CACD,CA9BS","names":[],"ignoreList":[],"sources":["/opt/canhelp/node_modules/better-auth/dist/plugins/generic-oauth/providers/hubspot.mjs"],"sourcesContent":[null]}}