Skip to content

Commit

Permalink
Address lint and test problems
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder committed Aug 10, 2023
1 parent 3d15045 commit 8f0d37f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function start(port, host, argv = process.argv) {
container.bind(BackendApplicationServer).toConstantValue({ configure: defaultServeStatic });
}
let result = undefined;
await container.get(CliManager).initializeCli(argv,
await container.get(CliManager).initializeCli(argv.slice(2),
() => container.get(BackendApplication).configured,
async () => {
result = container.get(BackendApplication).start(port, host);
Expand Down
5 changes: 2 additions & 3 deletions examples/api-samples/src/node/sample-mock-open-vsx-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import * as http from 'http';
import * as https from 'https';
import { Deferred } from '@theia/core/lib/common/promise-util';


type VersionedId = `${string}.${string}@${string}`;

/**
Expand All @@ -46,7 +45,7 @@ export class SampleMockOpenVsxServer implements BackendApplicationContribution {
version: string;
}, express.Response>>;

private readyDeferred = new Deferred<void>()
private readyDeferred = new Deferred<void>();
private ready = this.readyDeferred.promise;

get mockServerPath(): string {
Expand All @@ -62,7 +61,7 @@ export class SampleMockOpenVsxServer implements BackendApplicationContribution {
const baseUrl = `${selfOrigin}${this.mockServerPath}`;
const pluginsDb = await this.findMockPlugins(this.pluginsDbPath, baseUrl);
this.staticFileHandlers = new Map(Array.from(pluginsDb.entries(), ([key, value]) => [key, express.static(value.path)]));
this.mockClient = new OVSXMockClient(Array.from(pluginsDb.values(), value => value.data))
this.mockClient = new OVSXMockClient(Array.from(pluginsDb.values(), value => value.data));
this.readyDeferred.resolve();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/node/backend-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class BackendApplication {
@inject(Stopwatch)
protected readonly stopwatch: Stopwatch;

private _configured: Promise<void>
private _configured: Promise<void>;

constructor(
@inject(ContributionProvider) @named(BackendApplicationContribution)
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export class CliManager {
.detectLocale(false)
.showHelpOnFail(false, 'Specify --help for available options')
.help('help')
.middleware(async argv => {
.middleware(async args => {
for (const contrib of this.contributionsProvider.getContributions()) {
await contrib.setArguments(argv);
await contrib.setArguments(args);
}
await postSetArguments();
})
.command('$0', false, () => { }, defaultCommand)
.parse(argv.slice(2));
.parse(argv);
}

protected isExit(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class PluginMgmtCliContribution implements CliContribution {
const showVersions = yargs[PluginMgmtCliContribution.SHOW_VERSIONS];
const deployedIds = await this.deployerHandler.getDeployedBackendPlugins();
const pluginType = yargs[PluginMgmtCliContribution.SHOW_BUILTINS] ? PluginType.System : PluginType.User;
process.stdout.write('installed plugins:\n')
process.stdout.write('installed plugins:\n');
deployedIds.filter(plugin => plugin.type === pluginType).forEach(plugin => {
if (showVersions) {
process.stdout.write(`${plugin.metadata.model.id}@${plugin.metadata.model.version}\n`);
Expand Down

0 comments on commit 8f0d37f

Please sign in to comment.