Files
arduino-ide/arduino-ide-extension/src/node/theia/filesystem/nsfw-watcher/index.ts
Akos Kitta 9a6a457bc4 chore(deps): Updated to Theia 1.39.0 (#2144)
- update Theia to `1.39.0`,
 - remove the application packager and fix the security vulnerabilities,
 - bundle the backed application with `webpack`, and
 - enhance the developer docs.

Co-authored-by: Akos Kitta <a.kitta@arduino.cc>
Co-authored-by: per1234 <accounts@perglass.com>

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-08-14 12:12:05 +02:00

32 lines
1.0 KiB
TypeScript

import * as yargs from '@theia/core/shared/yargs';
import { JsonRpcProxyFactory } from '@theia/core/lib/common/messaging/proxy-factory';
import { NoDelayDisposalTimeoutNsfwFileSystemWatcherService } from './nsfw-filesystem-service';
import type { IPCEntryPoint } from '@theia/core/lib/node/messaging/ipc-protocol';
import type { FileSystemWatcherServiceClient } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
const options: {
verbose: boolean;
} = yargs
.option('verbose', {
default: false,
alias: 'v',
type: 'boolean',
})
.option('nsfwOptions', {
alias: 'o',
type: 'string',
coerce: JSON.parse,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}).argv as any;
export default <IPCEntryPoint>((connection) => {
const server = new NoDelayDisposalTimeoutNsfwFileSystemWatcherService(
options
);
const factory = new JsonRpcProxyFactory<FileSystemWatcherServiceClient>(
server
);
server.setClient(factory.createProxy());
factory.listen(connection);
});