Skip to content

Commit

Permalink
chore:fixing sign-in and removed jwt logs (#43)
Browse files Browse the repository at this point in the history
* chore:fixing sign-in and removed jwt logs

Signed-off-by: Aditya-eddy <aditya282003@gmail.com>

* chore:removing semicolons

Signed-off-by: Aditya-eddy <aditya282003@gmail.com>

* chore:correcting lockjson version

Signed-off-by: Aditya-eddy <aditya282003@gmail.com>

---------

Signed-off-by: Aditya-eddy <aditya282003@gmail.com>
  • Loading branch information
Aditya-eddy authored Sep 18, 2024
1 parent 885ef98 commit 933e22e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 317 deletions.
268 changes: 0 additions & 268 deletions install.sh

This file was deleted.

9 changes: 3 additions & 6 deletions src/SignIn.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as vscode from 'vscode';
import * as http from 'http';
import * as fs from 'fs'
import * as fs from 'fs';
import { v4 as uuidv4 } from 'uuid';
const os = require('os');
const { execSync } = require('child_process');
Expand Down Expand Up @@ -290,13 +290,10 @@ export async function getInstallationID(): Promise<string> {
}


export async function ValidateSignInWithOthers(jwtToken: string, serverURL: string): Promise<{}> {
console.log("serverurl " , serverURL);
const url = `${serverURL}/user/connect`;
console.log("url" , url);
export async function ValidateSignInWithOthers(jwtToken: string): Promise<{}> {
try {
// Assuming getInstallationID returns a promise that resolves to a string
console.log("token in the validate other " , jwtToken);
// console.log("token in the validate other " , jwtToken);
const installationID: string = await getInstallationID();

const requestBody = {
Expand Down
8 changes: 4 additions & 4 deletions src/Utg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function Utg(context: vscode.ExtensionContext) {
try {

const token = await context.globalState.get<'string'>('JwtToken');
console.log("token in the utg" , token);
// console.log("token in the utg" , token);
let apiResponse:string = '';
// vscode.window.showInformationMessage('Attempting to trigger API request...');
// if(token){
Expand Down Expand Up @@ -96,7 +96,7 @@ async function Utg(context: vscode.ExtensionContext) {
console.log(testFilePath , "in the go block");
if (!fs.existsSync(testFilePath)) {
vscode.window.showInformationMessage("Test doesn't exist", testFilePath);
const uniqueFuncName = path.basename(sourceFilePath).replace('.go', 'Test')
const uniqueFuncName = path.basename(sourceFilePath).replace('.go', 'Test');
testFileContent = `package main\n\nimport "testing"`;
fs.writeFileSync(testFilePath, testFileContent); }
command = `go test -v ./... -coverprofile=coverage.out && gocov convert coverage.out | gocov-xml > coverage.xml`;
Expand All @@ -117,11 +117,11 @@ async function Utg(context: vscode.ExtensionContext) {

try {
if(token){
console.log("token inside the try block in utg.ts" , token);
// console.log("token inside the try block in utg.ts" , token);
apiResponse = await makeApiRequest(token) || 'no response';
const response = JSON.parse(apiResponse);
await context.globalState.update('apiResponse', apiResponse);
if(response.usedCall == response.totalCall ){
if(response.usedCall === response.totalCall ){
await context.globalState.update('SubscriptionEnded' , true);
}
}else{
Expand Down
Loading

0 comments on commit 933e22e

Please sign in to comment.