mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-08 18:08:33 +00:00
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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { join } from 'node:path';
|
||||
import { interfaces } from '@theia/core/shared/inversify';
|
||||
import {
|
||||
NsfwFileSystemWatcherServiceProcessOptions,
|
||||
NSFW_SINGLE_THREADED,
|
||||
spawnNsfwFileSystemWatcherServiceProcess,
|
||||
} from '@theia/filesystem/lib/node/filesystem-backend-module';
|
||||
import { FileSystemWatcherService } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
||||
import { NsfwFileSystemWatcherServerOptions } from '@theia/filesystem/lib/node/nsfw-watcher/nsfw-filesystem-service';
|
||||
import { FileSystemWatcherServiceDispatcher } from '@theia/filesystem/lib/node/filesystem-watcher-dispatcher';
|
||||
import { NoDelayDisposalTimeoutNsfwFileSystemWatcherService } from './nsfw-watcher/nsfw-filesystem-service';
|
||||
|
||||
export function rebindNsfwFileSystemWatcher(rebind: interfaces.Rebind): void {
|
||||
rebind<NsfwFileSystemWatcherServiceProcessOptions>(
|
||||
NsfwFileSystemWatcherServiceProcessOptions
|
||||
).toConstantValue({
|
||||
entryPoint: join(__dirname, 'nsfw-watcher'),
|
||||
});
|
||||
rebind<FileSystemWatcherService>(FileSystemWatcherService)
|
||||
.toDynamicValue((context) =>
|
||||
NSFW_SINGLE_THREADED
|
||||
? createNsfwFileSystemWatcherService(context)
|
||||
: spawnNsfwFileSystemWatcherServiceProcess(context)
|
||||
)
|
||||
.inSingletonScope();
|
||||
}
|
||||
|
||||
function createNsfwFileSystemWatcherService({
|
||||
container,
|
||||
}: interfaces.Context): FileSystemWatcherService {
|
||||
const options = container.get<NsfwFileSystemWatcherServerOptions>(
|
||||
NsfwFileSystemWatcherServerOptions
|
||||
);
|
||||
const dispatcher = container.get<FileSystemWatcherServiceDispatcher>(
|
||||
FileSystemWatcherServiceDispatcher
|
||||
);
|
||||
const server = new NoDelayDisposalTimeoutNsfwFileSystemWatcherService(
|
||||
options
|
||||
);
|
||||
server.setClient(dispatcher);
|
||||
return server;
|
||||
}
|
||||
Reference in New Issue
Block a user