mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-17 17:46:33 +00:00
chore: use theia@1.55.1
This commit is contained in:
parent
e7bd926a2d
commit
b0a32df099
@ -24,29 +24,29 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.8.14",
|
"@grpc/grpc-js": "^1.8.14",
|
||||||
"@theia/application-package": "1.54.0",
|
"@theia/application-package": "1.55.1",
|
||||||
"@theia/core": "1.54.0",
|
"@theia/core": "1.55.1",
|
||||||
"@theia/debug": "1.54.0",
|
"@theia/debug": "1.55.1",
|
||||||
"@theia/editor": "1.54.0",
|
"@theia/editor": "1.55.1",
|
||||||
"@theia/electron": "1.54.0",
|
"@theia/electron": "1.55.1",
|
||||||
"@theia/filesystem": "1.54.0",
|
"@theia/filesystem": "1.55.1",
|
||||||
"@theia/keymaps": "1.54.0",
|
"@theia/keymaps": "1.55.1",
|
||||||
"@theia/markers": "1.54.0",
|
"@theia/markers": "1.55.1",
|
||||||
"@theia/messages": "1.54.0",
|
"@theia/messages": "1.55.1",
|
||||||
"@theia/monaco": "1.54.0",
|
"@theia/monaco": "1.55.1",
|
||||||
"@theia/monaco-editor-core": "1.83.101",
|
"@theia/monaco-editor-core": "1.83.101",
|
||||||
"@theia/navigator": "1.54.0",
|
"@theia/navigator": "1.55.1",
|
||||||
"@theia/outline-view": "1.54.0",
|
"@theia/outline-view": "1.55.1",
|
||||||
"@theia/output": "1.54.0",
|
"@theia/output": "1.55.1",
|
||||||
"@theia/plugin-ext": "1.54.0",
|
"@theia/plugin-ext": "1.55.1",
|
||||||
"@theia/plugin-ext-vscode": "1.54.0",
|
"@theia/plugin-ext-vscode": "1.55.1",
|
||||||
"@theia/preferences": "1.54.0",
|
"@theia/preferences": "1.55.1",
|
||||||
"@theia/scm": "1.54.0",
|
"@theia/scm": "1.55.1",
|
||||||
"@theia/search-in-workspace": "1.54.0",
|
"@theia/search-in-workspace": "1.55.1",
|
||||||
"@theia/terminal": "1.54.0",
|
"@theia/terminal": "1.55.1",
|
||||||
"@theia/test": "1.54.0",
|
"@theia/test": "1.55.1",
|
||||||
"@theia/typehierarchy": "1.54.0",
|
"@theia/typehierarchy": "1.55.1",
|
||||||
"@theia/workspace": "1.54.0",
|
"@theia/workspace": "1.55.1",
|
||||||
"@tippyjs/react": "^4.2.5",
|
"@tippyjs/react": "^4.2.5",
|
||||||
"@types/auth0-js": "^9.21.3",
|
"@types/auth0-js": "^9.21.3",
|
||||||
"@types/btoa": "^1.2.3",
|
"@types/btoa": "^1.2.3",
|
||||||
@ -126,7 +126,7 @@
|
|||||||
"mockdate": "^3.0.5",
|
"mockdate": "^3.0.5",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"rimraf": "^2.6.1"
|
"rimraf": "^5.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@pingghost/protoc": "^1.0.2",
|
"@pingghost/protoc": "^1.0.2",
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
import { injectable } from '@theia/core/shared/inversify';
|
import { injectable } from '@theia/core/shared/inversify';
|
||||||
import { TextEditor } from '@theia/editor/lib/browser';
|
|
||||||
import { EditorContribution as TheiaEditorContribution } from '@theia/editor/lib/browser/editor-contribution';
|
import { EditorContribution as TheiaEditorContribution } from '@theia/editor/lib/browser/editor-contribution';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class EditorContribution extends TheiaEditorContribution {
|
export class EditorContribution extends TheiaEditorContribution {
|
||||||
protected override updateLanguageStatus(
|
protected override updateLanguageStatus(
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
editor: TextEditor | undefined
|
..._: Parameters<TheiaEditorContribution['updateLanguageStatus']>
|
||||||
): void {
|
): void {
|
||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override updateEncodingStatus(
|
protected override updateEncodingStatus(
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
editor: TextEditor | undefined
|
..._: Parameters<TheiaEditorContribution['updateEncodingStatus']>
|
||||||
): void {
|
): void {
|
||||||
// https://github.com/arduino/arduino-ide/issues/1393
|
// https://github.com/arduino/arduino-ide/issues/1393
|
||||||
// NOOP
|
// NOOP
|
||||||
|
@ -38,33 +38,33 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
|
|||||||
this.preferencesService.onPreferenceChanged(
|
this.preferencesService.onPreferenceChanged(
|
||||||
debounce((e) => {
|
debounce((e) => {
|
||||||
if (e.preferenceName === 'window.menuBarVisibility') {
|
if (e.preferenceName === 'window.menuBarVisibility') {
|
||||||
this.setMenuBar();
|
this.doSetMenuBar();
|
||||||
}
|
}
|
||||||
if (this._menu) {
|
if (this.menu) {
|
||||||
for (const cmd of this._toggledCommands) {
|
for (const cmd of this.toggledCommands) {
|
||||||
const menuItem = this.findMenuById(this._menu, cmd);
|
const menuItem = this.findMenuById(this.menu, cmd);
|
||||||
if (menuItem) {
|
if (menuItem) {
|
||||||
menuItem.checked = this.commandRegistry.isToggled(cmd);
|
menuItem.checked = this.commandRegistry.isToggled(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.electronArduino.setMenu(this._menu); // calls the IDE2-specific implementation
|
window.electronArduino.setMenu(this.menu); // calls the IDE2-specific implementation
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
);
|
);
|
||||||
this.keybindingRegistry.onKeybindingsChanged(() => {
|
this.keybindingRegistry.onKeybindingsChanged(() => {
|
||||||
this.setMenuBar();
|
this.doSetMenuBar();
|
||||||
});
|
});
|
||||||
// #endregion Theia `postConstruct`
|
// #endregion Theia `postConstruct`
|
||||||
this.appStateService.reachedState('ready').then(() => {
|
this.appStateService.reachedState('ready').then(() => {
|
||||||
this.appReady = true;
|
this.appReady = true;
|
||||||
if (this.updateWhenReady) {
|
if (this.updateWhenReady) {
|
||||||
this.setMenuBar();
|
this.doSetMenuBar();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
override createElectronMenuBar(): MenuDto[] {
|
override createElectronMenuBar(): MenuDto[] {
|
||||||
this._toggledCommands.clear(); // https://github.com/eclipse-theia/theia/issues/8977
|
this.toggledCommands.clear(); // https://github.com/eclipse-theia/theia/issues/8977
|
||||||
const menuModel = this.menuProvider.getMenu(MAIN_MENU_BAR);
|
const menuModel = this.menuProvider.getMenu(MAIN_MENU_BAR);
|
||||||
const menu = this.fillMenuTemplate([], menuModel, [], {
|
const menu = this.fillMenuTemplate([], menuModel, [], {
|
||||||
rootMenuPath: MAIN_MENU_BAR,
|
rootMenuPath: MAIN_MENU_BAR,
|
||||||
@ -73,11 +73,12 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
|
|||||||
menu.unshift(this.createOSXMenu());
|
menu.unshift(this.createOSXMenu());
|
||||||
}
|
}
|
||||||
const escapedMenu = this.escapeAmpersand(menu);
|
const escapedMenu = this.escapeAmpersand(menu);
|
||||||
this._menu = escapedMenu;
|
this.menu = escapedMenu;
|
||||||
return escapedMenu;
|
return escapedMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
override async setMenuBar(): Promise<void> {
|
// CHECK ME
|
||||||
|
override async doSetMenuBar(): Promise<void> {
|
||||||
// Avoid updating menu items when the app is not ready.
|
// Avoid updating menu items when the app is not ready.
|
||||||
// Getting the current electron window is not free and synchronous.
|
// Getting the current electron window is not free and synchronous.
|
||||||
// Here, we defer all menu update requests, and fire one when the app is ready.
|
// Here, we defer all menu update requests, and fire one when the app is ready.
|
||||||
@ -124,17 +125,17 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
|
|||||||
...args
|
...args
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
this._menu &&
|
this.menu &&
|
||||||
this.menuCommandExecutor.isVisible(menuPath, commandId, ...args)
|
this.menuCommandExecutor.isVisible(menuPath, commandId, ...args)
|
||||||
) {
|
) {
|
||||||
const item = this.findMenuById(this._menu, commandId);
|
const item = this.findMenuById(this.menu, commandId);
|
||||||
if (item) {
|
if (item) {
|
||||||
item.checked = this.menuCommandExecutor.isToggled(
|
item.checked = this.menuCommandExecutor.isToggled(
|
||||||
menuPath,
|
menuPath,
|
||||||
commandId,
|
commandId,
|
||||||
...args
|
...args
|
||||||
);
|
);
|
||||||
window.electronArduino.setMenu(this._menu); // overridden to call the IDE2-specific implementation.
|
window.electronArduino.setMenu(this.menu); // overridden to call the IDE2-specific implementation.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,7 +343,7 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
|
|||||||
parentItems.push(menuItem);
|
parentItems.push(menuItem);
|
||||||
|
|
||||||
if (this.commandRegistry.getToggledHandler(commandId, ...args)) {
|
if (this.commandRegistry.getToggledHandler(commandId, ...args)) {
|
||||||
this._toggledCommands.add(commandId);
|
this.toggledCommands.add(commandId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return parentItems;
|
return parentItems;
|
||||||
|
@ -106,7 +106,6 @@ import { FormatterPath } from '../common/protocol/formatter';
|
|||||||
import { HostedPluginLocalizationService } from './theia/plugin-ext/hosted-plugin-localization-service';
|
import { HostedPluginLocalizationService } from './theia/plugin-ext/hosted-plugin-localization-service';
|
||||||
import { HostedPluginLocalizationService as TheiaHostedPluginLocalizationService } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-localization-service';
|
import { HostedPluginLocalizationService as TheiaHostedPluginLocalizationService } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-localization-service';
|
||||||
import { IsTempSketch } from './is-temp-sketch';
|
import { IsTempSketch } from './is-temp-sketch';
|
||||||
import { rebindNsfwFileSystemWatcher } from './theia/filesystem/nsfw-bindings';
|
|
||||||
import { WebsocketEndpoint } from './theia/core/websocket-endpoint';
|
import { WebsocketEndpoint } from './theia/core/websocket-endpoint';
|
||||||
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
||||||
import { HostedPluginReader } from './theia/plugin-ext/plugin-reader';
|
import { HostedPluginReader } from './theia/plugin-ext/plugin-reader';
|
||||||
@ -121,6 +120,7 @@ import {
|
|||||||
} from './theia/plugin-ext/plugin-deployer';
|
} from './theia/plugin-ext/plugin-deployer';
|
||||||
import { SettingsReader } from './settings-reader';
|
import { SettingsReader } from './settings-reader';
|
||||||
import { VsCodePluginScanner } from './theia/plugin-ext-vscode/scanner-vscode';
|
import { VsCodePluginScanner } from './theia/plugin-ext-vscode/scanner-vscode';
|
||||||
|
import { rebindParcelFileSystemWatcher } from './theia/filesystem/parcel-bindings';
|
||||||
|
|
||||||
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||||
bind(BackendApplication).toSelf().inSingletonScope();
|
bind(BackendApplication).toSelf().inSingletonScope();
|
||||||
@ -300,7 +300,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.inSingletonScope();
|
.inSingletonScope();
|
||||||
rebindNsfwFileSystemWatcher(rebind);
|
rebindParcelFileSystemWatcher(rebind);
|
||||||
|
|
||||||
// Output service per connection.
|
// Output service per connection.
|
||||||
bind(ConnectionContainerModule).toConstantValue(
|
bind(ConnectionContainerModule).toConstantValue(
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
@ -0,0 +1,42 @@
|
|||||||
|
import { join } from 'node:path';
|
||||||
|
import { interfaces } from '@theia/core/shared/inversify';
|
||||||
|
import {
|
||||||
|
FileSystemWatcherServiceProcessOptions,
|
||||||
|
WATCHER_SINGLE_THREADED,
|
||||||
|
spawnParcelFileSystemWatcherServiceProcess,
|
||||||
|
} from '@theia/filesystem/lib/node/filesystem-backend-module';
|
||||||
|
import { FileSystemWatcherService } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
||||||
|
import { ParcelFileSystemWatcherServerOptions } from '@theia/filesystem/lib/node/parcel-watcher/parcel-filesystem-service';
|
||||||
|
import { FileSystemWatcherServiceDispatcher } from '@theia/filesystem/lib/node/filesystem-watcher-dispatcher';
|
||||||
|
import { NoDelayDisposalTimeoutParcelFileSystemWatcherService } from './parcel-watcher/parcel-filesystem-service';
|
||||||
|
|
||||||
|
export function rebindParcelFileSystemWatcher(rebind: interfaces.Rebind): void {
|
||||||
|
rebind<FileSystemWatcherServiceProcessOptions>(
|
||||||
|
FileSystemWatcherServiceProcessOptions
|
||||||
|
).toConstantValue({
|
||||||
|
entryPoint: join(__dirname, 'parcel-watcher'),
|
||||||
|
});
|
||||||
|
rebind<FileSystemWatcherService>(FileSystemWatcherService)
|
||||||
|
.toDynamicValue((context) =>
|
||||||
|
WATCHER_SINGLE_THREADED
|
||||||
|
? createParcelFileSystemWatcherService(context)
|
||||||
|
: spawnParcelFileSystemWatcherServiceProcess(context)
|
||||||
|
)
|
||||||
|
.inSingletonScope();
|
||||||
|
}
|
||||||
|
|
||||||
|
function createParcelFileSystemWatcherService({
|
||||||
|
container,
|
||||||
|
}: interfaces.Context): FileSystemWatcherService {
|
||||||
|
const options = container.get<ParcelFileSystemWatcherServerOptions>(
|
||||||
|
ParcelFileSystemWatcherServerOptions
|
||||||
|
);
|
||||||
|
const dispatcher = container.get<FileSystemWatcherServiceDispatcher>(
|
||||||
|
FileSystemWatcherServiceDispatcher
|
||||||
|
);
|
||||||
|
const server = new NoDelayDisposalTimeoutParcelFileSystemWatcherService(
|
||||||
|
options
|
||||||
|
);
|
||||||
|
server.setClient(dispatcher);
|
||||||
|
return server;
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import * as yargs from '@theia/core/shared/yargs';
|
import * as yargs from '@theia/core/shared/yargs';
|
||||||
import { JsonRpcProxyFactory } from '@theia/core/lib/common/messaging/proxy-factory';
|
import { JsonRpcProxyFactory } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||||
import { NoDelayDisposalTimeoutNsfwFileSystemWatcherService } from './nsfw-filesystem-service';
|
import { NoDelayDisposalTimeoutParcelFileSystemWatcherService } from './parcel-filesystem-service';
|
||||||
import type { IPCEntryPoint } from '@theia/core/lib/node/messaging/ipc-protocol';
|
import type { IPCEntryPoint } from '@theia/core/lib/node/messaging/ipc-protocol';
|
||||||
import type { FileSystemWatcherServiceClient } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
import type { FileSystemWatcherServiceClient } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ const options: {
|
|||||||
}).argv as any;
|
}).argv as any;
|
||||||
|
|
||||||
export default <IPCEntryPoint>((connection) => {
|
export default <IPCEntryPoint>((connection) => {
|
||||||
const server = new NoDelayDisposalTimeoutNsfwFileSystemWatcherService(
|
const server = new NoDelayDisposalTimeoutParcelFileSystemWatcherService(
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
const factory = new JsonRpcProxyFactory<FileSystemWatcherServiceClient>(
|
const factory = new JsonRpcProxyFactory<FileSystemWatcherServiceClient>(
|
@ -1,26 +1,26 @@
|
|||||||
import { Minimatch } from 'minimatch';
|
import { Minimatch } from 'minimatch';
|
||||||
import type { WatchOptions } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
import type { WatchOptions } from '@theia/filesystem/lib/common/filesystem-watcher-protocol';
|
||||||
import {
|
import {
|
||||||
NsfwFileSystemWatcherService,
|
ParcelFileSystemWatcherService,
|
||||||
NsfwWatcher,
|
ParcelWatcher,
|
||||||
} from '@theia/filesystem/lib/node/nsfw-watcher/nsfw-filesystem-service';
|
} from '@theia/filesystem/lib/node/parcel-watcher/parcel-filesystem-service';
|
||||||
|
|
||||||
// Dispose the watcher immediately when the last reference is removed. By default, Theia waits 10 sec.
|
// Dispose the watcher immediately when the last reference is removed. By default, Theia waits 10 sec.
|
||||||
// https://github.com/eclipse-theia/theia/issues/11639#issuecomment-1238980708
|
// https://github.com/eclipse-theia/theia/issues/11639#issuecomment-1238980708
|
||||||
const NoDelay = 0;
|
const NoDelay = 0;
|
||||||
|
|
||||||
export class NoDelayDisposalTimeoutNsfwFileSystemWatcherService extends NsfwFileSystemWatcherService {
|
export class NoDelayDisposalTimeoutParcelFileSystemWatcherService extends ParcelFileSystemWatcherService {
|
||||||
protected override createWatcher(
|
protected override createWatcher(
|
||||||
clientId: number,
|
clientId: number,
|
||||||
fsPath: string,
|
fsPath: string,
|
||||||
options: WatchOptions
|
options: WatchOptions
|
||||||
): NsfwWatcher {
|
): ParcelWatcher {
|
||||||
const watcherOptions = {
|
const watcherOptions = {
|
||||||
ignored: options.ignored.map(
|
ignored: options.ignored.map(
|
||||||
(pattern) => new Minimatch(pattern, { dot: true })
|
(pattern) => new Minimatch(pattern, { dot: true })
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
return new NsfwWatcher(
|
return new ParcelWatcher(
|
||||||
clientId,
|
clientId,
|
||||||
fsPath,
|
fsPath,
|
||||||
watcherOptions,
|
watcherOptions,
|
@ -6,7 +6,7 @@ import { expect } from 'chai';
|
|||||||
import { dump, load } from 'js-yaml';
|
import { dump, load } from 'js-yaml';
|
||||||
import { promises as fs } from 'node:fs';
|
import { promises as fs } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { sync as deleteSync } from 'rimraf';
|
import { rimrafSync } from 'rimraf';
|
||||||
import {
|
import {
|
||||||
BoardsService,
|
BoardsService,
|
||||||
CoreService,
|
CoreService,
|
||||||
@ -65,7 +65,7 @@ describe('core-client-provider', () => {
|
|||||||
it("should recover when the 'directories.data' folder is missing", async function () {
|
it("should recover when the 'directories.data' folder is missing", async function () {
|
||||||
this.timeout(timeout);
|
this.timeout(timeout);
|
||||||
const configDirPath = await prepareTestConfigDir();
|
const configDirPath = await prepareTestConfigDir();
|
||||||
deleteSync(join(configDirPath, 'data'));
|
rimrafSync(join(configDirPath, 'data'));
|
||||||
|
|
||||||
const container = await startCli(configDirPath, toDispose);
|
const container = await startCli(configDirPath, toDispose);
|
||||||
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
||||||
@ -84,7 +84,7 @@ describe('core-client-provider', () => {
|
|||||||
'Arduino15',
|
'Arduino15',
|
||||||
'package_index.json'
|
'package_index.json'
|
||||||
);
|
);
|
||||||
deleteSync(primaryPackageIndexPath);
|
rimrafSync(primaryPackageIndexPath);
|
||||||
|
|
||||||
const container = await startCli(configDirPath, toDispose);
|
const container = await startCli(configDirPath, toDispose);
|
||||||
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
||||||
@ -118,7 +118,7 @@ describe('core-client-provider', () => {
|
|||||||
'tools',
|
'tools',
|
||||||
tool
|
tool
|
||||||
);
|
);
|
||||||
deleteSync(builtinToolsPath);
|
rimrafSync(builtinToolsPath);
|
||||||
|
|
||||||
const container = await startCli(configDirPath, toDispose);
|
const container = await startCli(configDirPath, toDispose);
|
||||||
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
||||||
@ -140,7 +140,7 @@ describe('core-client-provider', () => {
|
|||||||
'Arduino15',
|
'Arduino15',
|
||||||
'library_index.json'
|
'library_index.json'
|
||||||
);
|
);
|
||||||
deleteSync(libraryPackageIndexPath);
|
rimrafSync(libraryPackageIndexPath);
|
||||||
|
|
||||||
const container = await startCli(configDirPath, toDispose);
|
const container = await startCli(configDirPath, toDispose);
|
||||||
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
await assertFunctionalCli(container, ({ coreClientProvider }) => {
|
||||||
@ -176,7 +176,7 @@ describe('core-client-provider', () => {
|
|||||||
'Arduino15',
|
'Arduino15',
|
||||||
'package_teensy_index.json'
|
'package_teensy_index.json'
|
||||||
);
|
);
|
||||||
deleteSync(thirdPartyPackageIndexPath);
|
rimrafSync(thirdPartyPackageIndexPath);
|
||||||
|
|
||||||
const container = await startCli(configDirPath, toDispose);
|
const container = await startCli(configDirPath, toDispose);
|
||||||
await assertFunctionalCli(
|
await assertFunctionalCli(
|
||||||
@ -193,7 +193,7 @@ describe('core-client-provider', () => {
|
|||||||
it("should recover when invalid 3rd package URL is defined in the CLI config and the 'directories.data' folder is missing", async function () {
|
it("should recover when invalid 3rd package URL is defined in the CLI config and the 'directories.data' folder is missing", async function () {
|
||||||
this.timeout(timeout);
|
this.timeout(timeout);
|
||||||
const configDirPath = await prepareTestConfigDir();
|
const configDirPath = await prepareTestConfigDir();
|
||||||
deleteSync(join(configDirPath, 'data'));
|
rimrafSync(join(configDirPath, 'data'));
|
||||||
|
|
||||||
// set an invalid URL so the CLI will try to download it
|
// set an invalid URL so the CLI will try to download it
|
||||||
const cliConfigPath = join(configDirPath, 'arduino-cli.yaml');
|
const cliConfigPath = join(configDirPath, 'arduino-cli.yaml');
|
||||||
|
@ -10,7 +10,7 @@ import { expect } from 'chai';
|
|||||||
import { rejects } from 'node:assert/strict';
|
import { rejects } from 'node:assert/strict';
|
||||||
import { promises as fs } from 'node:fs';
|
import { promises as fs } from 'node:fs';
|
||||||
import path, { basename, join } from 'node:path';
|
import path, { basename, join } from 'node:path';
|
||||||
import { sync as rimrafSync } from 'rimraf';
|
import { rimrafSync } from 'rimraf';
|
||||||
import temp from 'temp';
|
import temp from 'temp';
|
||||||
import { Sketch, SketchesError, SketchesService } from '../../common/protocol';
|
import { Sketch, SketchesError, SketchesService } from '../../common/protocol';
|
||||||
import {
|
import {
|
||||||
@ -574,7 +574,7 @@ function disposeSketch(...sketch: Sketch[]): Disposable {
|
|||||||
function disposeFolder(...paths: string[]): Disposable {
|
function disposeFolder(...paths: string[]): Disposable {
|
||||||
return new DisposableCollection(
|
return new DisposableCollection(
|
||||||
...paths.map((path) =>
|
...paths.map((path) =>
|
||||||
Disposable.create(() => rimrafSync(path, { maxBusyTries: 5 }))
|
Disposable.create(() => rimrafSync(path, { maxRetries: 5 }))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,4 @@
|
|||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"files": ["../node_modules/nsfw/index.d.ts"]
|
|
||||||
}
|
}
|
||||||
|
@ -5,24 +5,24 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"main": "./src-gen/backend/electron-main.js",
|
"main": "./src-gen/backend/electron-main.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@theia/core": "1.54.0",
|
"@theia/core": "1.55.1",
|
||||||
"@theia/debug": "1.54.0",
|
"@theia/debug": "1.55.1",
|
||||||
"@theia/editor": "1.54.0",
|
"@theia/editor": "1.55.1",
|
||||||
"@theia/electron": "1.54.0",
|
"@theia/electron": "1.55.1",
|
||||||
"@theia/filesystem": "1.54.0",
|
"@theia/filesystem": "1.55.1",
|
||||||
"@theia/keymaps": "1.54.0",
|
"@theia/keymaps": "1.55.1",
|
||||||
"@theia/messages": "1.54.0",
|
"@theia/messages": "1.55.1",
|
||||||
"@theia/monaco": "1.54.0",
|
"@theia/monaco": "1.55.1",
|
||||||
"@theia/navigator": "1.54.0",
|
"@theia/navigator": "1.55.1",
|
||||||
"@theia/plugin-ext": "1.54.0",
|
"@theia/plugin-ext": "1.55.1",
|
||||||
"@theia/plugin-ext-vscode": "1.54.0",
|
"@theia/plugin-ext-vscode": "1.55.1",
|
||||||
"@theia/preferences": "1.54.0",
|
"@theia/preferences": "1.55.1",
|
||||||
"@theia/terminal": "1.54.0",
|
"@theia/terminal": "1.55.1",
|
||||||
"@theia/workspace": "1.54.0",
|
"@theia/workspace": "1.55.1",
|
||||||
"arduino-ide-extension": "2.3.5"
|
"arduino-ide-extension": "2.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@theia/cli": "1.54.0",
|
"@theia/cli": "1.55.1",
|
||||||
"7zip-min": "^1.4.4",
|
"7zip-min": "^1.4.4",
|
||||||
"chmodr": "^1.2.0",
|
"chmodr": "^1.2.0",
|
||||||
"compression-webpack-plugin": "^9.0.0",
|
"compression-webpack-plugin": "^9.0.0",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"glob": "^10.3.3",
|
"glob": "^10.3.3",
|
||||||
"is-ci": "^2.0.0",
|
"is-ci": "^2.0.0",
|
||||||
"resolve-package-path": "^4.0.3",
|
"resolve-package-path": "^4.0.3",
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^5.0.0",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"temp": "^0.9.1",
|
"temp": "^0.9.1",
|
||||||
"yaml": "^1.10.2"
|
"yaml": "^1.10.2"
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"prepackage": "rimraf dist",
|
"prepackage": "rimraf dist",
|
||||||
"package": "node ./scripts/package.js",
|
"package": "node ./scripts/package.js",
|
||||||
"postpackage": "node ./scripts/post-package.js",
|
"postpackage": "node ./scripts/post-package.js",
|
||||||
"rebuild": "theia rebuild:browser --cacheRoot ../.. && theia rebuild:electron --cacheRoot ../.."
|
"rebuild": "theia rebuild:browser --cacheRoot .. && theia rebuild:electron --cacheRoot .."
|
||||||
},
|
},
|
||||||
"theia": {
|
"theia": {
|
||||||
"target": "electron",
|
"target": "electron",
|
||||||
|
@ -30,9 +30,9 @@ backend.config.plugins.unshift(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Override the default entry from Theia as IDE2 has a customization of the module.
|
// Override the default entry from Theia as IDE2 has a customization of the module.
|
||||||
backend.config.entry['nsfw-watcher'] = {
|
backend.config.entry['parcel-watcher'] = {
|
||||||
import: require.resolve(
|
import: require.resolve(
|
||||||
'arduino-ide-extension/lib/node/theia/filesystem/nsfw-watcher'
|
'arduino-ide-extension/lib/node/theia/filesystem/parcel-watcher'
|
||||||
),
|
),
|
||||||
library: {
|
library: {
|
||||||
type: 'commonjs2',
|
type: 'commonjs2',
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"nx/axios": "^1.6.7"
|
"nx/axios": "^1.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@theia/cli": "1.54.0",
|
"@theia/cli": "1.55.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
||||||
"@typescript-eslint/parser": "^5.59.0",
|
"@typescript-eslint/parser": "^5.59.0",
|
||||||
"@xhmikosr/downloader": "^13.0.1",
|
"@xhmikosr/downloader": "^13.0.1",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"node-gyp": "^9.3.0",
|
"node-gyp": "^9.3.0",
|
||||||
"prettier": "^2.3.1",
|
"prettier": "^2.3.1",
|
||||||
"reflect-metadata": "^0.1.10",
|
"reflect-metadata": "^0.1.10",
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^5.0.0",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"style-dictionary": "^3.7.0",
|
"style-dictionary": "^3.7.0",
|
||||||
"typescript": "^4.9.3",
|
"typescript": "^4.9.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user