-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes, refactorings for jrpc + usig older theia version
- Loading branch information
Jonah Iden
committed
Aug 30, 2022
1 parent
ed5a561
commit 283c5f0
Showing
10 changed files
with
417 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
typefox-test/src/browser/dependency-version-checker-client.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
typefox-test/src/common/dependency-version-checker-protocoll.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import { JsonRpcServer } from "@theia/core" | ||
|
||
export const servicePath = "/services/dependencyVersionChecker"; | ||
|
||
export const IDependencyVersionCheckServer = Symbol.for("DependencyVersionCheckerServer") | ||
export interface IDependencyVersionCheckServer extends JsonRpcServer<IDependencyVersionCheckerClient> { | ||
export interface IDependencyVersionCheckServer { | ||
analyzeDependencies(): Promise<string[]>; | ||
} | ||
|
||
export const IDependencyVersionCheckerClient = Symbol.for("DependencyVersionCheckerClient") | ||
export interface IDependencyVersionCheckerClient { | ||
showDependencyMismatches(mismatches: string[]): Promise<void>; | ||
} |
21 changes: 6 additions & 15 deletions
21
typefox-test/src/node/dependency-version-checker-server.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,23 @@ | ||
import { JsonRpcServer, logger, Logger } from "@theia/core"; | ||
import { injectable } from "@theia/core/shared/inversify"; | ||
import { IDependencyVersionCheckerClient, IDependencyVersionCheckServer } from "../common/dependency-version-checker-protocoll"; | ||
import { FileSearchService } from "@theia/file-search/lib/common/file-search-service"; | ||
import { inject, injectable } from "@theia/core/shared/inversify"; | ||
import { IDependencyVersionCheckServer } from "../common/dependency-version-checker-protocoll"; | ||
|
||
|
||
@injectable() | ||
export class DependencyVersionCheckerServer implements IDependencyVersionCheckServer { | ||
private client: IDependencyVersionCheckerClient | undefined; | ||
|
||
constructor() {} | ||
constructor(@inject(FileSearchService) private fileSearchService: FileSearchService) {} | ||
|
||
/** | ||
* analyzes the dependencies from the cargo.toml and returns a list of mismatches | ||
*/ | ||
async analyzeDependencies(): Promise<string[]> { | ||
console.log("called analyze dependencies") | ||
//const cargoTomlFiles: string[] = await this.fileSearch.find("cargo.toml", {}); | ||
//console.log(cargoTomlFiles); | ||
const cargoTomlFiles: string[] = await this.fileSearchService.find("cargo.toml", {}); | ||
console.log(cargoTomlFiles); | ||
|
||
return ["test 1", "test 2"]; | ||
} | ||
|
||
dispose(): void {} | ||
|
||
setClient(client: IDependencyVersionCheckerClient | undefined): void { | ||
this.client = client | ||
|
||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.