mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-08 09:58:34 +00:00
Fixed the electron build.
- Switched from `grpc` to `@grpc/grpc-js`. - Use electron `4.x` due to `@grpc/grpc-js`. - Enabled the build on Azure Pipelines. - From now on, the TS/JS generation is manual. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
committed by
Christian Weichel
parent
ba995e6869
commit
6f584bf5d6
@@ -3,7 +3,7 @@
|
||||
|
||||
/* tslint:disable */
|
||||
|
||||
import * as grpc from "grpc";
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
import * as commands_pb from "./commands_pb";
|
||||
import * as common_pb from "./common_pb";
|
||||
import * as board_pb from "./board_pb";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//
|
||||
//
|
||||
'use strict';
|
||||
var grpc = require('grpc');
|
||||
var grpc = require('@grpc/grpc-js');
|
||||
var commands_pb = require('./commands_pb.js');
|
||||
var common_pb = require('./common_pb.js');
|
||||
var board_pb = require('./board_pb.js');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { inject, injectable } from 'inversify';
|
||||
import * as grpc from 'grpc';
|
||||
import * as grpc from '@grpc/grpc-js';
|
||||
import { ArduinoCoreClient } from './cli-protocol/commands_grpc_pb';
|
||||
import { InitResp, InitReq, Configuration, UpdateIndexReq, UpdateIndexResp } from './cli-protocol/commands_pb';
|
||||
import { WorkspaceServiceExt } from '../browser/workspace-service-ext';
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import * as grpc from "grpc";
|
||||
import * as jspb from "google-protobuf";
|
||||
|
||||
export type GrpcMethod<Req, Resp> = (request: Req, callback: (error: grpc.ServiceError | null, response: Resp) => void) => grpc.ClientUnaryCall
|
||||
|
||||
export function promisify<M extends GrpcMethod<Req, Resp>, Req, Resp extends jspb.Message>(m: M, req: Req): Promise<Resp> {
|
||||
return new Promise<Resp>((resolve, reject) => {
|
||||
m(req, (err, resp) => {
|
||||
if (!!err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(resp);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user