oca-proxy 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/bin/oca-proxy.js +1 -1
  2. package/package.json +1 -1
package/bin/oca-proxy.js CHANGED
@@ -701,4 +701,4 @@ data: ${JSON.stringify({type:"message_stop"})}
701
701
 
702
702
  Please visit http://localhost:${fe}/login in your browser to authenticate with Oracle Code Assist.
703
703
 
704
- After logging in, retry your request.`}}):e.status(i.response?.status||500).json({error:{type:"api_error",message:i.message||"Unknown error"}})}});K.use((a,e)=>{_.warn(`404 Not Found: ${a.method} ${a.originalUrl}`),e.status(404).json({error:"Not Found"})});var bS=K.listen(fe,async()=>{let a=Ee.isAuthenticated()?"\u2713 Authenticated":"\u2717 Not authenticated",e=[" OCA Proxy Server"," ",ci("OCA Base URL:",N.base_url),ci("IDCS URL:",N.idcs_url),ci("Client ID:",N.client_id),ci("Auth Status:",a)," ",` \u25B6 Server listening on http://localhost:${fe}`," "," Endpoints:",` OpenAI: http://localhost:${fe}/v1`,` Messages: http://localhost:${fe}/v1/messages`],n=Oh(e,58);for(let i of n)_.raw(i);if(Ee.isAuthenticated())_.success("Authenticated - Server ready to use!"),_.info(`Dashboard: http://localhost:${fe}`);else{_.info(`Login: http://localhost:${fe}/login`);try{let i=(await Promise.resolve().then(()=>(Rg(),Og))).default;setTimeout(()=>{i(`http://localhost:${fe}/login`),_.info("Browser opened for authentication")},1500)}catch{}}});bS.on("error",a=>{a.code==="EADDRINUSE"&&(_.error(`Port ${fe} already in use; exiting`),process.exit(1)),_.error(`Server error: ${String(a)}`),process.exit(1)});
704
+ After logging in, retry your request.`}}):e.status(i.response?.status||500).json({error:{type:"api_error",message:i.message||"Unknown error"}})}});K.use((a,e)=>{_.warn(`404 Not Found: ${a.method} ${a.originalUrl}`),e.status(404).json({error:"Not Found"})});var bS=K.listen(fe,async()=>{let a=Ee.isAuthenticated()?"\u2713 Authenticated":"\u2717 Not authenticated",e=[" OCA Proxy Server"," ",ci("OCA Base URL:",N.base_url),ci("IDCS URL:",N.idcs_url),ci("Client ID:",N.client_id),ci("Auth Status:",a)," ",` \u25B6 Server listening on http://localhost:${fe}`," "," Endpoints:",` OpenAI: http://localhost:${fe}/v1`,` Messages: http://localhost:${fe}/v1/messages`],n=Oh(e,58);for(let i of n)_.raw(i);if(Ee.isAuthenticated())_.success("Authenticated - Server ready to use!"),_.info(`Dashboard: http://localhost:${fe}`);else{_.info(`Login: http://localhost:${fe}/login`);try{let i=(await Promise.resolve().then(()=>(Rg(),Og))).default;setTimeout(()=>{let t=`http://localhost:${fe}/login`;Promise.resolve(i(t)).then(()=>{_.info("Browser opened for authentication")}).catch(o=>{let r=o.message??"unknown error";_.warn(`Failed to auto-open browser: ${r}`),_.info(`Please open this URL manually: ${t}`)})},1500)}catch{}}});bS.on("error",a=>{a.code==="EADDRINUSE"&&(_.error(`Port ${fe} already in use; exiting`),process.exit(1)),_.error(`Server error: ${String(a)}`),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oca-proxy",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "OpenAI-compatible proxy for Oracle Code Assist (OCA)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {