File tree 8 files changed +341
-18
lines changed
8 files changed +341
-18
lines changed Original file line number Diff line number Diff line change 17
17
"build" : " tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint" ,
18
18
"watch" : " tsc -w" ,
19
19
"test" : " mocha \" ./lib/test/**/*.test.js\" " ,
20
+ "test:slow" : " mocha \" ./lib/test/**/*.slow-test.js\" " ,
20
21
"test:watch" : " mocha --watch --watch-files lib \" ./lib/test/**/*.test.js\" "
21
22
},
22
23
"dependencies" : {
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ export const BoardsService = Symbol('BoardsService');
141
141
export interface BoardsService
142
142
extends Installable < BoardsPackage > ,
143
143
Searchable < BoardsPackage , BoardSearch > {
144
+ install ( options : {
145
+ item : BoardsPackage ;
146
+ progressId ?: string ;
147
+ version ?: Installable . Version ;
148
+ noOverwrite ?: boolean ;
149
+ /**
150
+ * Only for testing to avoid confirmation dialogs from Windows User Access Control when installing a platform.
151
+ */
152
+ skipPostInstall ?: boolean ;
153
+ } ) : Promise < void > ;
144
154
getState ( ) : Promise < AvailablePorts > ;
145
155
getBoardDetails ( options : { fqbn : string } ) : Promise < BoardDetails | undefined > ;
146
156
getBoardPackage ( options : { id : string } ) : Promise < BoardsPackage | undefined > ;
Original file line number Diff line number Diff line change @@ -434,6 +434,7 @@ export class BoardsServiceImpl
434
434
progressId ?: string ;
435
435
version ?: Installable . Version ;
436
436
noOverwrite ?: boolean ;
437
+ skipPostInstall ?: boolean ;
437
438
} ) : Promise < void > {
438
439
const item = options . item ;
439
440
const version = ! ! options . version
@@ -450,6 +451,9 @@ export class BoardsServiceImpl
450
451
req . setPlatformPackage ( platform ) ;
451
452
req . setVersion ( version ) ;
452
453
req . setNoOverwrite ( Boolean ( options . noOverwrite ) ) ;
454
+ if ( options . skipPostInstall ) {
455
+ req . setSkipPostInstall ( true ) ;
456
+ }
453
457
454
458
console . info ( '>>> Starting boards package installation...' , item ) ;
455
459
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ export class CoreClientProvider {
63
63
new Emitter < CoreClientProvider . Client > ( ) ;
64
64
private readonly onClientReady = this . onClientReadyEmitter . event ;
65
65
66
- private ready = new Deferred < void > ( ) ;
67
66
private pending : Deferred < CoreClientProvider . Client > | undefined ;
68
67
private _client : CoreClientProvider . Client | undefined ;
69
68
@@ -135,14 +134,6 @@ export class CoreClientProvider {
135
134
const client = await this . createClient ( address ) ;
136
135
this . toDisposeOnCloseClient . pushAll ( [
137
136
Disposable . create ( ( ) => client . client . close ( ) ) ,
138
- Disposable . create ( ( ) => {
139
- this . ready . reject (
140
- new Error (
141
- `Disposed. Creating a new gRPC core client on address ${ address } .`
142
- )
143
- ) ;
144
- this . ready = new Deferred ( ) ;
145
- } ) ,
146
137
] ) ;
147
138
await this . initInstanceWithFallback ( client ) ;
148
139
return this . useClient ( client ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
19
19
SketchContainer ,
20
20
SketchesError ,
21
21
} from '../common/protocol/sketches-service' ;
22
- import { NotificationServiceServerImpl } from './notification-service-server ' ;
22
+ import { NotificationServiceServer } from '../common/protocol ' ;
23
23
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables' ;
24
24
import { CoreClientAware } from './core-client-provider' ;
25
25
import {
@@ -77,8 +77,8 @@ export class SketchesServiceImpl
77
77
@inject ( ConfigServiceImpl )
78
78
private readonly configService : ConfigServiceImpl ;
79
79
80
- @inject ( NotificationServiceServerImpl )
81
- private readonly notificationService : NotificationServiceServerImpl ;
80
+ @inject ( NotificationServiceServer )
81
+ private readonly notificationService : NotificationServiceServer ;
82
82
83
83
@inject ( EnvVariablesServer )
84
84
private readonly envVariableServer : EnvVariablesServer ;
You can’t perform that action at this time.
0 commit comments