mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-08 18:08:33 +00:00
Avoid deleting the workspace when it's still in use.
- From now on, NSFW service disposes after last reference is removed. No more 10sec delay. - Moved the temp workspace deletion to a startup task. - Can set initial task for the window from electron-main. - Removed the `browser-app`. Closes #39 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import * as yargs from '@theia/core/shared/yargs';
|
||||
import { JsonRpcProxyFactory } from '@theia/core';
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user