mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
build fixes
This commit is contained in:
@@ -8,5 +8,5 @@ import { TabHeaderComponent } from '../components/tabHeader.component'
|
|||||||
export abstract class TabContextMenuItemProvider {
|
export abstract class TabContextMenuItemProvider {
|
||||||
weight = 0
|
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
|
* @param recoveryToken a recovery token found in the saved tabs list
|
||||||
* @returns [[boolean]] whether this [[TabRecoveryProvider]] can recover a tab from this token
|
* @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
|
* @param recoveryToken a recovery token found in the saved tabs list
|
||||||
* @returns [[RecoveredTab]] descriptor containing tab type and component inputs
|
* @returns [[RecoveredTab]] descriptor containing tab type and component inputs
|
||||||
* or `null` if this token is from a different tab type or is not supported
|
* 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
|
* @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 'perfect-scrollbar/css/perfect-scrollbar.css'
|
||||||
import 'ng2-dnd/bundles/style.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 = [
|
const PROVIDERS = [
|
||||||
{ provide: HotkeyProvider, useClass: AppHotkeyProvider, multi: true },
|
{ provide: HotkeyProvider, useClass: AppHotkeyProvider, multi: true },
|
||||||
{ provide: Theme, useClass: StandardTheme, 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 () => {
|
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 op = argv._[0]
|
||||||
const opAsPath = op ? path.resolve(cwd, op) : null
|
const opAsPath = op ? path.resolve(cwd, op) : null
|
||||||
if (op === 'open') {
|
if (op === 'open') {
|
||||||
|
@@ -78,7 +78,7 @@ export class SerialSession extends BaseSession {
|
|||||||
this.emitOutput(Buffer.from(data))
|
this.emitOutput(Buffer.from(data))
|
||||||
})
|
})
|
||||||
this.inputReadline.on('line', line => {
|
this.inputReadline.on('line', line => {
|
||||||
this.onInput(new Buffer(line + '\n'))
|
this.onInput(Buffer.from(line + '\n'))
|
||||||
this.resetInputPrompt()
|
this.resetInputPrompt()
|
||||||
})
|
})
|
||||||
this.output$.pipe(debounce(() => interval(500))).subscribe(() => this.onOutputSettled())
|
this.output$.pipe(debounce(() => interval(500))).subscribe(() => this.onOutputSettled())
|
||||||
@@ -184,7 +184,7 @@ export class SerialSession extends BaseSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private resetInputPrompt () {
|
private resetInputPrompt () {
|
||||||
this.emitOutput(new Buffer('\r\n'))
|
this.emitOutput(Buffer.from('\r\n'))
|
||||||
this.inputReadline.prompt(true)
|
this.inputReadline.prompt(true)
|
||||||
this.inputPromptVisible = true
|
this.inputPromptVisible = true
|
||||||
}
|
}
|
||||||
@@ -203,14 +203,14 @@ export class SerialSession extends BaseSession {
|
|||||||
|
|
||||||
if (this.connection.outputMode === 'hex') {
|
if (this.connection.outputMode === 'hex') {
|
||||||
this.emitOutput(Buffer.concat([
|
this.emitOutput(Buffer.concat([
|
||||||
new Buffer('\r\n'),
|
Buffer.from('\r\n'),
|
||||||
Buffer.from(hexdump(data, {
|
Buffer.from(hexdump(data, {
|
||||||
group: 1,
|
group: 1,
|
||||||
gutter: 4,
|
gutter: 4,
|
||||||
divide: colors.gray(' | '),
|
divide: colors.gray(' | '),
|
||||||
emptyHuman: colors.gray('╳'),
|
emptyHuman: colors.gray('╳'),
|
||||||
}).replace(/\n/g, '\r\n')),
|
}).replace(/\n/g, '\r\n')),
|
||||||
new Buffer('\r\n\n'),
|
Buffer.from('\r\n\n'),
|
||||||
]))
|
]))
|
||||||
} else {
|
} else {
|
||||||
this.emitOutput(data)
|
this.emitOutput(data)
|
||||||
|
Reference in New Issue
Block a user