@quantiya/codevibe-core 1.0.12 → 1.0.13

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/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -214,7 +214,7 @@ ${r.stack}`)):typeof r=="object"?o+=` ${JSON.stringify(r,ct)}`:o+=` ${r}`),o}log
214
214
  `);try{let n=await K.getStatus();if(n.authenticated&&n.tokens){console.log(`${l.yellow}Already logged in as: ${n.tokens.email}${l.reset}`),console.log(`Token expires: ${new Date(n.tokens.expiresAt).toLocaleString()}`),console.log(`
215
215
  Run '${l.dim}codevibe logout${l.reset}' to sign out first.`),process.exit(0);return}console.log("Opening browser for authentication..."),console.log(`${l.dim}Waiting for callback...${l.reset}
216
216
  `);let e=await K.login();if(e){console.log(`
217
- ${l.green}\u2713 Authentication successful!${l.reset}`),console.log(` User: ${e.email}`),console.log(` User ID: ${e.userId}`),console.log(` Expires: ${new Date(e.expiresAt).toLocaleString()}`);try{let t=await import("https"),r=await import("crypto"),s=await import("os"),i=r.createHash("sha256").update(`${s.hostname()}-${process.getuid?.()??0}`).digest("hex").substring(0,36),o=JSON.stringify({client_id:i,events:[{name:"auth_completed",params:{platform:process.platform,user_id:e.userId}}]});await new Promise(c=>{let d=t.request({hostname:"www.google-analytics.com",path:"/mp/collect?measurement_id=G-GS74YEQTB8&api_secret=lAfOF6OxRzSQ-NsLBRjhAg",method:"POST",headers:{"Content-Type":"application/json"}},()=>c());d.on("error",()=>c()),d.write(o),d.end(),setTimeout(c,2e3)})}catch{}}process.exit(0)}catch(n){console.log(`
217
+ ${l.green}\u2713 Authentication successful!${l.reset}`),console.log(` User: ${e.email}`),console.log(` User ID: ${e.userId}`),console.log(` Expires: ${new Date(e.expiresAt).toLocaleString()}`);try{let t=await import("https"),r=await import("crypto"),s=await import("os"),i=r.createHash("sha256").update(`${s.hostname()}-${process.getuid?.()??0}`).digest("hex").substring(0,36),o=JSON.stringify({client_id:i,events:[{name:"auth_completed",params:{platform:process.platform,user_id:e.userId,source:process.env.CODEVIBE_TELEMETRY_SOURCE||"production"}}]});await new Promise(c=>{let d=t.request({hostname:"www.google-analytics.com",path:"/mp/collect?measurement_id=G-GS74YEQTB8&api_secret=lAfOF6OxRzSQ-NsLBRjhAg",method:"POST",headers:{"Content-Type":"application/json"}},()=>c());d.on("error",()=>c()),d.write(o),d.end(),setTimeout(c,2e3)})}catch{}}process.exit(0)}catch(n){console.log(`
218
218
  ${l.red}\u2717 Authentication failed${l.reset}`),console.log(` Error: ${n.message}`),process.exit(1)}}async function St(){console.log(`${l.cyan}CodeVibe Logout${l.reset}
219
219
  `);try{let n=await K.getStatus();if(!n.authenticated){console.log(`${l.yellow}Not logged in.${l.reset}`),process.exit(0);return}let e=n.tokens?.email;await K.logout()?(console.log(`${l.green}\u2713 Logged out successfully.${l.reset}`),console.log(` Previous user: ${e}`),console.log(`
220
220
  ${l.dim}Clearing browser session...${l.reset}`)):console.log(`${l.red}\u2717 Failed to log out.${l.reset}`),process.exit(0)}catch(n){console.log(`${l.red}\u2717 Logout failed: ${n.message}${l.reset}`),process.exit(1)}}async function wt(){console.log(`${l.cyan}CodeVibe Auth Status${l.reset}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-core",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and auth functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",