From 0e6a32d97ad637499f720513e68e8111fa95f4c6 Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Thu, 21 Mar 2024 17:11:12 +0300 Subject: [PATCH] npm audit --- server/proto/testgen.proto | 2 +- server/src/ProjectContext.cpp | 28 +++++++++++++---------- server/src/ProjectContext.h | 4 +++- vscode-plugin/package.json | 10 ++++---- vscode-plugin/src/client/client.ts | 4 ++-- vscode-plugin/src/config/projectConfig.ts | 6 ++--- 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/server/proto/testgen.proto b/server/proto/testgen.proto index ce3a29d52..de9554456 100644 --- a/server/proto/testgen.proto +++ b/server/proto/testgen.proto @@ -89,7 +89,7 @@ message ProjectContext { string testDirPath = 3; string buildDirRelativePath = 4; string clientProjectPath = 5; - string ithPath = 6; + string itfPath = 6; } enum ErrorMode { diff --git a/server/src/ProjectContext.cpp b/server/src/ProjectContext.cpp index c906844fa..5c26a52d3 100644 --- a/server/src/ProjectContext.cpp +++ b/server/src/ProjectContext.cpp @@ -9,25 +9,29 @@ namespace utbot { fs::path projectPath, fs::path testDirPath, fs::path buildDirRelativePath, - fs::path clientProjectPath) + fs::path clientProjectPath, + fs::path itfPath) : projectName(std::move(projectName)), projectPath(std::move(projectPath)), testDirPath(std::move(testDirPath)), buildDirRelativePath(std::move(buildDirRelativePath)), - clientProjectPath(clientProjectPath) {} + clientProjectPath(clientProjectPath), + itfPath(itfPath) {} ProjectContext::ProjectContext(const testsgen::ProjectContext &projectContext) - : ProjectContext(projectContext.projectname(), - projectContext.projectpath(), - projectContext.testdirpath(), - projectContext.builddirrelativepath(), - projectContext.clientprojectpath()) {} + : ProjectContext(projectContext.projectname(), + projectContext.projectpath(), + projectContext.testdirpath(), + projectContext.builddirrelativepath(), + projectContext.clientprojectpath(), + projectContext.itfpath()) {} ProjectContext::ProjectContext(const testsgen::SnippetRequest &request, fs::path serverBuildDir) - : projectName(request.projectcontext().projectname()), - projectPath(request.projectcontext().projectpath()), - testDirPath(request.projectcontext().testdirpath()), - buildDirRelativePath(request.projectcontext().builddirrelativepath()), - clientProjectPath(request.projectcontext().clientprojectpath()) {} + : projectName(request.projectcontext().projectname()), + projectPath(request.projectcontext().projectpath()), + testDirPath(request.projectcontext().testdirpath()), + buildDirRelativePath(request.projectcontext().builddirrelativepath()), + clientProjectPath(request.projectcontext().clientprojectpath()), + itfPath(request.projectcontext().itfpath()) {} fs::path ProjectContext::buildDir() const { return projectPath / buildDirRelativePath; diff --git a/server/src/ProjectContext.h b/server/src/ProjectContext.h index f3d6233b4..2f3cc7d85 100644 --- a/server/src/ProjectContext.h +++ b/server/src/ProjectContext.h @@ -17,7 +17,8 @@ class ProjectContext { fs::path projectPath, fs::path testDirPath, fs::path buildDirRelativePath, - fs::path serverBuildDir); + fs::path serverBuildDir, + fs::path itfPath); explicit ProjectContext(const testsgen::ProjectContext &projectContext); @@ -30,6 +31,7 @@ class ProjectContext { const fs::path testDirPath; const fs::path buildDirRelativePath; const fs::path clientProjectPath; + const fs::path itfPath; }; } diff --git a/vscode-plugin/package.json b/vscode-plugin/package.json index 7496cc71f..1d9b5e46d 100644 --- a/vscode-plugin/package.json +++ b/vscode-plugin/package.json @@ -588,15 +588,15 @@ "@vscode/test-electron": "2.1.2", "eslint": "6.8.0", "glob": "7.2.0", - "mocha": "9.2.0" + "mocha": "^9.2.2" }, "dependencies": { "@types/google-protobuf": "3.15.5", "@types/node": "15.6.0", "@types/randomstring": "1.1.8", "@types/ssh2": "1.11.6", - "@types/vscode": "1.64.0", "@types/ssh2-streams": "0.1.9", + "@types/vscode": "1.64.0", "emittery": "0.10.1", "filepath": "1.1.0", "google-protobuf": "3.12.4", @@ -604,10 +604,10 @@ "grpc_tools_node_protoc_ts": "5.3.2", "grpc-tools": "1.11.2", "log4js": "6.5.2", + "node-ssh": "^13.0.0", "randomstring": "1.2.2", - "ssh2-streams": "0.4.10", "source-map-support": "0.5.21", - "typescript": "3.9.4", - "node-ssh": "^13.0.0" + "ssh2-streams": "0.4.10", + "typescript": "3.9.4" } } diff --git a/vscode-plugin/src/client/client.ts b/vscode-plugin/src/client/client.ts index 025bafc60..b92480f75 100644 --- a/vscode-plugin/src/client/client.ts +++ b/vscode-plugin/src/client/client.ts @@ -385,7 +385,7 @@ export class Client { projectName: string, projectPath: string, buildDirRelativePath: string, - ithPath: string, + itfPath: string, cmakeOptions: Array, configMode: ConfigMode, progressKey: utbotUI.ProgressKey, @@ -397,7 +397,7 @@ export class Client { projectContext.setProjectpath(projectPath); projectContext.setBuilddirrelativepath(buildDirRelativePath); projectContext.setClientprojectpath(vsUtils.getProjectDirByOpenedFile().fsPath); - projectContext.setIthpath(ithPath); + projectContext.setItfpath(itfPath); const projectConfigRequest = new ProjectConfigRequest(); projectConfigRequest.setProjectcontext(projectContext); projectConfigRequest.setConfigmode(configMode); diff --git a/vscode-plugin/src/config/projectConfig.ts b/vscode-plugin/src/config/projectConfig.ts index 4b352c785..feddc9a5a 100644 --- a/vscode-plugin/src/config/projectConfig.ts +++ b/vscode-plugin/src/config/projectConfig.ts @@ -16,13 +16,13 @@ export class ProjectConfig { private readonly projectName: string; private readonly projectPath: string; private readonly buildDirRelativePath: string; - private readonly ithPath: string; + private readonly itfPath: string; private readonly cmakeOptions: Array; constructor(private readonly client: Client) { this.projectName = Prefs.getProjectName(); [this.projectPath, this.buildDirRelativePath] = Prefs.getBuildDirPath(); - this.ithPath = Prefs.getITFPath(); + this.itfPath = Prefs.getITFPath(); this.cmakeOptions = Prefs.getCmakeOptions(); } @@ -92,7 +92,7 @@ export class ProjectConfig { return utbotUI.progresses().withProgress(async (progressKey, token) => { utbotUI.progresses().report(progressKey, "Check project configuration..."); const responseHandler = new DummyResponseHandler(); - return this.client.checkProjectConfigurationRequest(this.projectName, this.projectPath, this.buildDirRelativePath, this.ithPath, this.cmakeOptions, configMode, progressKey, token, responseHandler); + return this.client.checkProjectConfigurationRequest(this.projectName, this.projectPath, this.buildDirRelativePath, this.itfPath, this.cmakeOptions, configMode, progressKey, token, responseHandler); }); }