Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 86e46c4

Browse files
author
Akos Kitta
committed
Updated to the 20210408 CLI.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 0b3f899 commit 86e46c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+10413
-10046
lines changed

‎arduino-ide-extension/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
],
123123
"arduino": {
124124
"cli": {
125-
"version": "20210329"
125+
"version": "20210408"
126126
}
127127
}
128128
}

‎arduino-ide-extension/src/node/board-discovery.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ClientDuplexStream } from '@grpc/grpc-js';
33
import { ILogger } from '@theia/core/lib/common/logger';
44
import { deepClone } from '@theia/core/lib/common/objects';
55
import { CoreClientAware } from './core-client-provider';
6-
import { BoardListWatchReq,BoardListWatchResp } from './cli-protocol/commands/board_pb';
6+
import { BoardListWatchRequest,BoardListWatchResponse } from './cli-protocol/cc/arduino/cli/commands/v1/board_pb';
77
import { Board, Port, NotificationServiceServer, AvailablePorts, AttachedBoardsChangeEvent } from '../common/protocol';
88

99
/**
@@ -21,7 +21,7 @@ export class BoardDiscovery extends CoreClientAware {
2121
@inject(NotificationServiceServer)
2222
protected readonly notificationService: NotificationServiceServer;
2323

24-
protected boardWatchDuplex: ClientDuplexStream<BoardListWatchReq,BoardListWatchResp> | undefined;
24+
protected boardWatchDuplex: ClientDuplexStream<BoardListWatchRequest,BoardListWatchResponse> | undefined;
2525

2626
/**
2727
* Keys are the `address` of the ports. \
@@ -43,10 +43,10 @@ export class BoardDiscovery extends CoreClientAware {
4343
protected async init(): Promise<void> {
4444
const coreClient = await this.coreClient();
4545
const { client, instance } = coreClient;
46-
const req = new BoardListWatchReq();
46+
const req = new BoardListWatchRequest();
4747
req.setInstance(instance);
4848
this.boardWatchDuplex = client.boardListWatch();
49-
this.boardWatchDuplex.on('data', (resp: BoardListWatchResp) => {
49+
this.boardWatchDuplex.on('data', (resp: BoardListWatchResponse) => {
5050
const detectedPort = resp.getPort();
5151
if (detectedPort) {
5252

‎arduino-ide-extension/src/node/boards-service-impl.ts‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
BoardsPackage, Board, Port, BoardDetails, Tool, ConfigOption, ConfigValue, Programmer, OutputService, NotificationServiceServer, AvailablePorts, BoardWithPackage
88
} from '../common/protocol';
99
import {
10-
PlatformSearchReq,PlatformSearchResp,PlatformInstallReq,PlatformInstallResp,PlatformListReq,
11-
PlatformListResp,PlatformUninstallResp,PlatformUninstallReq
12-
} from './cli-protocol/commands/core_pb';
13-
import { Platform } from './cli-protocol/commands/common_pb';
10+
PlatformInstallRequest,PlatformInstallResponse,PlatformListRequest,PlatformListResponse,PlatformSearchRequest,
11+
PlatformSearchResponse,PlatformUninstallRequest,PlatformUninstallResponse
12+
} from './cli-protocol/cc/arduino/cli/commands/v1/core_pb';
13+
import { Platform } from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
1414
import { BoardDiscovery } from './board-discovery';
1515
import { CoreClientAware } from './core-client-provider';
16-
import { BoardDetailsReq,BoardDetailsResp,BoardSearchReq } from './cli-protocol/commands/board_pb';
17-
import { ListProgrammersAvailableForUploadReq,ListProgrammersAvailableForUploadResp } from './cli-protocol/commands/upload_pb';
16+
import { BoardDetailsRequest,BoardDetailsResponse,BoardSearchRequest } from './cli-protocol/cc/arduino/cli/commands/v1/board_pb';
17+
import { ListProgrammersAvailableForUploadRequest,ListProgrammersAvailableForUploadResponse } from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb';
1818

1919
@injectable()
2020
export class BoardsServiceImpl extends CoreClientAware implements BoardsService {
@@ -51,10 +51,10 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
5151
const coreClient = await this.coreClient();
5252
const { client, instance } = coreClient;
5353
const { fqbn } = options;
54-
const detailsReq = new BoardDetailsReq();
54+
const detailsReq = new BoardDetailsRequest();
5555
detailsReq.setInstance(instance);
5656
detailsReq.setFqbn(fqbn);
57-
const detailsResp = await new Promise<BoardDetailsResp | undefined>((resolve, reject) => client.boardDetails(detailsReq, (err, resp) => {
57+
const detailsResp = await new Promise<BoardDetailsResponse | undefined>((resolve, reject) => client.boardDetails(detailsReq, (err, resp) => {
5858
if (err) {
5959
// Required cores are not installed manually: https://github.com/arduino/arduino-cli/issues/954
6060
if ((err.message.indexOf('missing platform release') !== -1 && err.message.indexOf('referenced by board') !== -1)
@@ -75,7 +75,7 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
7575

7676
const debuggingSupported = detailsResp.getDebuggingSupported();
7777

78-
const requiredTools = detailsResp.getToolsdependenciesList().map(t => <Tool>{
78+
const requiredTools = detailsResp.getToolsDependenciesList().map(t => <Tool>{
7979
name: t.getName(),
8080
packager: t.getPackager(),
8181
version: t.getVersion()
@@ -91,10 +91,10 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
9191
})
9292
});
9393

94-
const listReq = new ListProgrammersAvailableForUploadReq();
94+
const listReq = new ListProgrammersAvailableForUploadRequest();
9595
listReq.setInstance(instance);
9696
listReq.setFqbn(fqbn);
97-
const listResp = await new Promise<ListProgrammersAvailableForUploadResp>((resolve, reject) => client.listProgrammersAvailableForUpload(listReq, (err, resp) => {
97+
const listResp = await new Promise<ListProgrammersAvailableForUploadResponse>((resolve, reject) => client.listProgrammersAvailableForUpload(listReq, (err, resp) => {
9898
if (err) {
9999
reject(err);
100100
return;
@@ -110,7 +110,7 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
110110

111111
let VID = 'N/A';
112112
let PID = 'N/A';
113-
const usbId = detailsResp.getIdentificationPrefList().map(item => item.getUsbid()).find(notEmpty);
113+
const usbId = detailsResp.getIdentificationPrefsList().map(item => item.getUsbId()).find(notEmpty);
114114
if (usbId) {
115115
VID = usbId.getVid();
116116
PID = usbId.getPid();
@@ -147,7 +147,7 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
147147

148148
async searchBoards({ query }: { query?: string }): Promise<BoardWithPackage[]> {
149149
const { instance, client } = await this.coreClient();
150-
const req = new BoardSearchReq();
150+
const req = new BoardSearchRequest();
151151
req.setSearchArgs(query || '');
152152
req.setInstance(instance);
153153
const boards = await new Promise<BoardWithPackage[]>((resolve, reject) => {
@@ -178,18 +178,18 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
178178
const coreClient = await this.coreClient();
179179
const { client, instance } = coreClient;
180180

181-
const installedPlatformsReq = new PlatformListReq();
181+
const installedPlatformsReq = new PlatformListRequest();
182182
installedPlatformsReq.setInstance(instance);
183-
const installedPlatformsResp = await new Promise<PlatformListResp>((resolve, reject) =>
183+
const installedPlatformsResp = await new Promise<PlatformListResponse>((resolve, reject) =>
184184
client.platformList(installedPlatformsReq, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp))
185185
);
186-
const installedPlatforms = installedPlatformsResp.getInstalledPlatformList();
186+
const installedPlatforms = installedPlatformsResp.getInstalledPlatformsList();
187187

188-
const req = new PlatformSearchReq();
188+
const req = new PlatformSearchRequest();
189189
req.setSearchArgs(options.query || '');
190190
req.setAllVersions(true);
191191
req.setInstance(instance);
192-
const resp = await new Promise<PlatformSearchResp>((resolve, reject) => client.platformSearch(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
192+
const resp = await new Promise<PlatformSearchResponse>((resolve, reject) => client.platformSearch(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
193193
const packages = new Map<string, BoardsPackage>();
194194
const toPackage = (platform: Platform) => {
195195
let installedVersion: string | undefined;
@@ -262,15 +262,15 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
262262

263263
const [platform, architecture] = item.id.split(':');
264264

265-
const req = new PlatformInstallReq();
265+
const req = new PlatformInstallRequest();
266266
req.setInstance(instance);
267267
req.setArchitecture(architecture);
268268
req.setPlatformPackage(platform);
269269
req.setVersion(version);
270270

271271
console.info('>>> Starting boards package installation...', item);
272272
const resp = client.platformInstall(req);
273-
resp.on('data', (r: PlatformInstallResp) => {
273+
resp.on('data', (r: PlatformInstallResponse) => {
274274
const prog = r.getProgress();
275275
if (prog && prog.getFile()) {
276276
this.outputService.append({ chunk: `downloading ${prog.getFile()}\n` });
@@ -298,15 +298,15 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
298298

299299
const [platform, architecture] = item.id.split(':');
300300

301-
const req = new PlatformUninstallReq();
301+
const req = new PlatformUninstallRequest();
302302
req.setInstance(instance);
303303
req.setArchitecture(architecture);
304304
req.setPlatformPackage(platform);
305305

306306
console.info('>>> Starting boards package uninstallation...', item);
307307
let logged = false;
308308
const resp = client.platformUninstall(req);
309-
resp.on('data', (_: PlatformUninstallResp) => {
309+
resp.on('data', (_: PlatformUninstallResponse) => {
310310
if (!logged) {
311311
this.outputService.append({ chunk: `uninstalling ${item.id}\n` });
312312
logged = true;
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /