diff --git a/src/update-vscode/update-vscode.ts b/src/update-vscode/update-vscode.ts index d8690c1..378083d 100644 --- a/src/update-vscode/update-vscode.ts +++ b/src/update-vscode/update-vscode.ts @@ -25,11 +25,8 @@ export async function updateVsCode(context: vscode.ExtensionContext, isProductio setWorkspaceState(context, accessToken, refreshToken, userId, orgId, isInProgress); if(isInProgress) { if(selectedProjects) { - for(let selectedProject of selectedProjects) { - const vsCodeInstanceId = createVSCodeIdToken(userId, orgId, selectedProject.versionControlParams, selectedProject.packageJsonParams, selectedProject.folderName); - await updatePrivateDirectoriesInVSCodeAuthentication(accessToken, isProduction, userId, orgId, selectedProjects); - await subscribeToGenerateVsCodeDownloadCodeSub({ vsCodeInstanceId, context, isProduction, selectedProjects }); - } + await subscribeToGenerateVsCodeDownloadCodeSub({ context, isProduction, selectedProjects }); + await updatePrivateDirectoriesInVSCodeAuthentication(accessToken, isProduction, userId, orgId, selectedProjects); } vscode.window.showInformationMessage('User successfully authenticated with Razroo.'); if(projectsProvider) { diff --git a/src/utils/graphql.utils.ts b/src/utils/graphql.utils.ts index d10ba63..d06a255 100644 --- a/src/utils/graphql.utils.ts +++ b/src/utils/graphql.utils.ts @@ -90,7 +90,6 @@ export const subscribeToGenerateVsCodeDownloadCodeSub = async ({ // enable root path even if no version control params const path = selectedProject?.versionControlParams ? versionControlParamsPath : selectedProject?.rootPath; await saveFiles(data?.data?.generateVsCodeDownloadCodeSub, context, isProduction, path); - // await updatePrivateDirectoriesPostCodeGeneration(context, isProduction, selectedProjects); }); }; @@ -124,13 +123,6 @@ async function fallback(content) { console.log(content); } -async function updatePrivateDirectoriesPostCodeGeneration(context, isProduction: boolean, allPackageJsons) { - const userId = context.globalState.get(MEMENTO_RAZROO_USER_ID); - const accessToken = context.globalState.get(MEMENTO_RAZROO_ACCESS_TOKEN); - const orgId = context.globalState.get(MEMENTO_RAZROO_ORG_ID); - await updatePrivateDirectoriesInVSCodeAuthentication(accessToken, isProduction, userId, orgId, allPackageJsons); -} - async function generateVsCodeDownloadCodeSubError(data: any, context, isProduction: boolean, projectsProvider, allPackageJsons) { let accessToken = context.globalState.get(MEMENTO_RAZROO_ACCESS_TOKEN); @@ -210,7 +202,7 @@ export const updatePrivateDirectoriesRequest = async ({ }); return response?.data; } catch (error) { - console.log('error updatePrivateDirectoriesRequest', error); + console.log('error updateVSCodeAuthentication', error); return error; } };