Skip to content

Commit

Permalink
npm audit
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Mar 21, 2024
1 parent 46b8e23 commit 0e6a32d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion server/proto/testgen.proto
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ message ProjectContext {
string testDirPath = 3;
string buildDirRelativePath = 4;
string clientProjectPath = 5;
string ithPath = 6;
string itfPath = 6;
}

enum ErrorMode {
Expand Down
28 changes: 16 additions & 12 deletions server/src/ProjectContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion server/src/ProjectContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -30,6 +31,7 @@ class ProjectContext {
const fs::path testDirPath;
const fs::path buildDirRelativePath;
const fs::path clientProjectPath;
const fs::path itfPath;
};
}

Expand Down
10 changes: 5 additions & 5 deletions vscode-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -588,26 +588,26 @@
"@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",
"grpc": "npm:@grpc/[email protected]",
"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"
}
}
4 changes: 2 additions & 2 deletions vscode-plugin/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export class Client {
projectName: string,
projectPath: string,
buildDirRelativePath: string,
ithPath: string,
itfPath: string,
cmakeOptions: Array<string>,
configMode: ConfigMode,
progressKey: utbotUI.ProgressKey,
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions vscode-plugin/src/config/projectConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;

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();
}

Expand Down Expand Up @@ -92,7 +92,7 @@ export class ProjectConfig {
return utbotUI.progresses().withProgress<ProjectConfigResponse>(async (progressKey, token) => {
utbotUI.progresses().report(progressKey, "Check project configuration...");
const responseHandler = new DummyResponseHandler<ProjectConfigResponse>();
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);
});
}

Expand Down

0 comments on commit 0e6a32d

Please sign in to comment.