mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-30 16:29:53 +00:00
build fixes
This commit is contained in:
parent
3716d52700
commit
952af3f8b8
@ -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[]>
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 },
|
||||
|
@ -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') {
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user