build fixes

This commit is contained in:
Eugene Pankov 2021-05-16 14:41:39 +02:00
parent 3716d52700
commit 952af3f8b8
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
5 changed files with 8 additions and 17 deletions

View File

@ -8,5 +8,5 @@ import { TabHeaderComponent } from '../components/tabHeader.component'
export abstract class TabContextMenuItemProvider {
weight = 0
abstract async getItems (tab: BaseTabComponent, tabHeader?: TabHeaderComponent): Promise<MenuItemConstructorOptions[]>
abstract getItems (tab: BaseTabComponent, tabHeader?: TabHeaderComponent): Promise<MenuItemConstructorOptions[]>
}

View File

@ -40,14 +40,14 @@ export abstract class TabRecoveryProvider {
* @param recoveryToken a recovery token found in the saved tabs list
* @returns [[boolean]] whether this [[TabRecoveryProvider]] can recover a tab from this token
*/
abstract async applicableTo (recoveryToken: RecoveryToken): Promise<boolean>
abstract applicableTo (recoveryToken: RecoveryToken): Promise<boolean>
/**
* @param recoveryToken a recovery token found in the saved tabs list
* @returns [[RecoveredTab]] descriptor containing tab type and component inputs
* or `null` if this token is from a different tab type or is not supported
*/
abstract async recover (recoveryToken: RecoveryToken): Promise<RecoveredTab>
abstract recover (recoveryToken: RecoveryToken): Promise<RecoveredTab>
/**
* @param recoveryToken a recovery token found in the saved tabs list

View File

@ -41,15 +41,6 @@ import { TaskCompletionContextMenu, CommonOptionsContextMenu, TabManagementConte
import 'perfect-scrollbar/css/perfect-scrollbar.css'
import 'ng2-dnd/bundles/style.css'
// PerfectScrollbar fix
import { fromEvent } from 'rxjs/internal/observable/fromEvent'
import { merge } from 'rxjs/internal/observable/merge'
try {
require('rxjs').fromEvent = fromEvent
require('rxjs').merge = merge
} catch {}
const PROVIDERS = [
{ provide: HotkeyProvider, useClass: AppHotkeyProvider, multi: true },
{ provide: Theme, useClass: StandardTheme, multi: true },

View File

@ -158,7 +158,7 @@ export class HostAppService {
})
electron.ipcRenderer.on('cli', (_$event, argv: any, cwd: string, secondInstance: boolean) => this.zone.run(async () => {
this.logger.info('Second instance', argv)
this.logger.info('CLI arguments received:', argv)
const op = argv._[0]
const opAsPath = op ? path.resolve(cwd, op) : null
if (op === 'open') {

View File

@ -78,7 +78,7 @@ export class SerialSession extends BaseSession {
this.emitOutput(Buffer.from(data))
})
this.inputReadline.on('line', line => {
this.onInput(new Buffer(line + '\n'))
this.onInput(Buffer.from(line + '\n'))
this.resetInputPrompt()
})
this.output$.pipe(debounce(() => interval(500))).subscribe(() => this.onOutputSettled())
@ -184,7 +184,7 @@ export class SerialSession extends BaseSession {
}
private resetInputPrompt () {
this.emitOutput(new Buffer('\r\n'))
this.emitOutput(Buffer.from('\r\n'))
this.inputReadline.prompt(true)
this.inputPromptVisible = true
}
@ -203,14 +203,14 @@ export class SerialSession extends BaseSession {
if (this.connection.outputMode === 'hex') {
this.emitOutput(Buffer.concat([
new Buffer('\r\n'),
Buffer.from('\r\n'),
Buffer.from(hexdump(data, {
group: 1,
gutter: 4,
divide: colors.gray(' '),
emptyHuman: colors.gray(''),
}).replace(/\n/g, '\r\n')),
new Buffer('\r\n\n'),
Buffer.from('\r\n\n'),
]))
} else {
this.emitOutput(data)