mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-30 14:20:18 +08:00
refactoring, build fix
This commit is contained in:
parent
1c23db3b55
commit
39bbe54992
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,6 +6,8 @@ node_modules
|
||||
build/files.wxs
|
||||
dist
|
||||
*/dist
|
||||
*/typings
|
||||
*.tsbuildinfo
|
||||
|
||||
*.xcworkspacedata
|
||||
*.xcuserstate
|
||||
|
@ -16,6 +16,7 @@ jobs:
|
||||
- scripts/install-deps.js
|
||||
script:
|
||||
- scripts/build-native.js
|
||||
- yarn run build:typings
|
||||
- yarn run build
|
||||
- scripts/prepackage-plugins.js
|
||||
- scripts/build-linux.js
|
||||
|
@ -18,6 +18,7 @@ install:
|
||||
- node scripts/build-native.js
|
||||
|
||||
build_script:
|
||||
- yarn run build:typings
|
||||
- yarn run build
|
||||
- node scripts/prepackage-plugins.js
|
||||
- node scripts/build-windows.js
|
||||
|
@ -126,6 +126,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
|
||||
"build:typings": "tsc --project terminus-core/tsconfig.typings.json && tsc --project terminus-settings/tsconfig.typings.json && tsc --project terminus-terminal/tsconfig.typings.json && tsc --project terminus-plugin-manager/tsconfig.typings.json && tsc --project terminus-ssh/tsconfig.typings.json",
|
||||
"watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch",
|
||||
"start": "cross-env TERMINUS_DEV=1 electron app --debug",
|
||||
"prod": "cross-env TERMINUS_DEV=1 electron app",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -2,7 +2,6 @@
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist"
|
||||
"baseUrl": "src"
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color --display-modules",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -91,7 +91,7 @@ export abstract class BaseTabComponent {
|
||||
}
|
||||
this.progressClearTimeout = setTimeout(() => {
|
||||
this.setProgress(null)
|
||||
}, 5000)
|
||||
}, 5000) as any
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ class CompletionObserver {
|
||||
private interval: number
|
||||
|
||||
constructor (private tab: BaseTabComponent) {
|
||||
this.interval = setInterval(() => this.tick(), 1000)
|
||||
this.interval = setInterval(() => this.tick(), 1000) as any
|
||||
this.tab.destroyed$.pipe(takeUntil(this.destroyed$)).subscribe(() => this.stop())
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,5 @@
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist"
|
||||
}
|
||||
}
|
||||
|
14
terminus-core/tsconfig.typings.json
Normal file
14
terminus-core/tsconfig.typings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./typings",
|
||||
"paths": {
|
||||
"terminus-*": ["../../terminus-*"],
|
||||
"*": ["../../app/node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color --display-modules",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -3,6 +3,5 @@
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist"
|
||||
}
|
||||
}
|
||||
|
14
terminus-plugin-manager/tsconfig.typings.json
Normal file
14
terminus-plugin-manager/tsconfig.typings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./typings",
|
||||
"paths": {
|
||||
"terminus-*": ["../../terminus-*"],
|
||||
"*": ["../../app/node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/src/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color --display-modules",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -3,6 +3,5 @@
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist"
|
||||
}
|
||||
}
|
||||
|
14
terminus-settings/tsconfig.typings.json
Normal file
14
terminus-settings/tsconfig.typings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./typings",
|
||||
"paths": {
|
||||
"terminus-*": ["../../terminus-*"],
|
||||
"*": ["../../app/node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -12,7 +12,7 @@ import { SSHConnection, SSHSession } from '../api'
|
||||
class="content"
|
||||
></div>
|
||||
`,
|
||||
styles: [require('./sshTab.component.scss')],
|
||||
styles: [require('./sshTab.component.scss'), ...BaseTerminalTabComponent.styles],
|
||||
animations: BaseTerminalTabComponent.animations,
|
||||
})
|
||||
export class SSHTabComponent extends BaseTerminalTabComponent {
|
||||
|
@ -1,12 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist",
|
||||
"paths": {
|
||||
"terminus-*": ["terminus-*"],
|
||||
"*": ["app/node_modules/*"]
|
||||
}
|
||||
"baseUrl": "src"
|
||||
}
|
||||
}
|
||||
|
15
terminus-ssh/tsconfig.typings.json
Normal file
15
terminus-ssh/tsconfig.typings.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"include": ["src"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./typings",
|
||||
"paths": {
|
||||
"terminus-*": ["../../terminus-*"],
|
||||
"*": ["../../app/node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"terminus-builtin-plugin"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/src/index.d.ts",
|
||||
"typings": "typings/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color --display-modules",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
|
@ -1,93 +0,0 @@
|
||||
import { SafeHtml } from '@angular/platform-browser'
|
||||
import { BaseTerminalTabComponent } from './components/baseTerminalTab.component'
|
||||
|
||||
/**
|
||||
* Extend to automatically run actions on new terminals
|
||||
*/
|
||||
export abstract class TerminalDecorator {
|
||||
/**
|
||||
* Called when a new terminal tab starts
|
||||
*/
|
||||
attach (terminal: BaseTerminalTabComponent): void { } // tslint:disable-line no-empty
|
||||
|
||||
/**
|
||||
* Called before a terminal tab is destroyed
|
||||
*/
|
||||
detach (terminal: BaseTerminalTabComponent): void { } // tslint:disable-line no-empty
|
||||
}
|
||||
|
||||
export interface ResizeEvent {
|
||||
columns: number
|
||||
rows: number
|
||||
}
|
||||
|
||||
export interface SessionOptions {
|
||||
name?: string
|
||||
command: string
|
||||
args: string[]
|
||||
cwd?: string
|
||||
env?: {[id: string]: string}
|
||||
width?: number
|
||||
height?: number
|
||||
pauseAfterExit?: boolean
|
||||
runAsAdministrator?: boolean
|
||||
}
|
||||
|
||||
export interface Profile {
|
||||
name: string,
|
||||
sessionOptions: SessionOptions,
|
||||
isBuiltin?: boolean
|
||||
icon?: SafeHtml
|
||||
}
|
||||
|
||||
export interface ITerminalColorScheme {
|
||||
name: string
|
||||
foreground: string
|
||||
background: string
|
||||
cursor: string
|
||||
colors: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend to add more terminal color schemes
|
||||
*/
|
||||
export abstract class TerminalColorSchemeProvider {
|
||||
abstract async getSchemes (): Promise<ITerminalColorScheme[]>
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend to add more terminal context menu items
|
||||
*/
|
||||
export abstract class TerminalContextMenuItemProvider {
|
||||
weight: number
|
||||
|
||||
abstract async getItems (tab: BaseTerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]>
|
||||
}
|
||||
|
||||
export interface IShell {
|
||||
id: string
|
||||
name?: string
|
||||
command: string
|
||||
args?: string[]
|
||||
env: {[id: string]: string}
|
||||
|
||||
/**
|
||||
* Base path to which shell's internal FS is relative
|
||||
* Currently used for WSL only
|
||||
*/
|
||||
fsBase?: string
|
||||
|
||||
/**
|
||||
* SVG icon
|
||||
*/
|
||||
icon?: SafeHtml
|
||||
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend to add support for more shells
|
||||
*/
|
||||
export abstract class ShellProvider {
|
||||
abstract async provide (): Promise<IShell[]>
|
||||
}
|
@ -2,32 +2,32 @@ import { Observable, Subject, Subscription } from 'rxjs'
|
||||
import { first } from 'rxjs/operators'
|
||||
import { ToastrService } from 'ngx-toastr'
|
||||
import { NgZone, OnInit, OnDestroy, Inject, Injector, Optional, ViewChild, HostBinding, Input, ElementRef } from '@angular/core'
|
||||
import { trigger, transition, style, animate } from '@angular/animations'
|
||||
import { trigger, transition, style, animate, AnimationTriggerMetadata } from '@angular/animations'
|
||||
import { AppService, ConfigService, BaseTabComponent, ElectronService, HostAppService, HotkeysService, Platform, LogService, Logger } from 'terminus-core'
|
||||
|
||||
import { BaseSession, SessionsService } from '../services/sessions.service'
|
||||
import { TerminalFrontendService } from '../services/terminalFrontend.service'
|
||||
|
||||
import { TerminalDecorator, ResizeEvent, TerminalContextMenuItemProvider } from '../api'
|
||||
import { Frontend } from '../frontends/frontend'
|
||||
import { ResizeEvent } from './interfaces'
|
||||
import { TerminalDecorator } from './decorator'
|
||||
import { TerminalContextMenuItemProvider } from './contextMenuProvider'
|
||||
|
||||
/**
|
||||
* A class to base your custom terminal tabs on
|
||||
*/
|
||||
export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit, OnDestroy {
|
||||
static template = require('./baseTerminalTab.component.pug')
|
||||
static styles = [require('./terminalTab.component.scss')]
|
||||
static animations = [
|
||||
trigger('slideInOut', [
|
||||
transition(':enter', [
|
||||
style({ transform: 'translateY(-25%)' }),
|
||||
animate('100ms ease-in-out', style({ transform: 'translateY(0%)' }))
|
||||
]),
|
||||
transition(':leave', [
|
||||
animate('100ms ease-in-out', style({ transform: 'translateY(-25%)' }))
|
||||
])
|
||||
static template = require('../components/baseTerminalTab.component.pug')
|
||||
static styles = [require('../components/terminalTab.component.scss')]
|
||||
static animations: AnimationTriggerMetadata[] = [trigger('slideInOut', [
|
||||
transition(':enter', [
|
||||
style({ transform: 'translateY(-25%)' }),
|
||||
animate('100ms ease-in-out', style({ transform: 'translateY(0%)' }))
|
||||
]),
|
||||
transition(':leave', [
|
||||
animate('100ms ease-in-out', style({ transform: 'translateY(-25%)' }))
|
||||
])
|
||||
]
|
||||
])]
|
||||
|
||||
session: BaseSession
|
||||
@Input() zoom = 0
|
8
terminus-terminal/src/api/colorSchemeProvider.ts
Normal file
8
terminus-terminal/src/api/colorSchemeProvider.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { ITerminalColorScheme } from './interfaces'
|
||||
|
||||
/**
|
||||
* Extend to add more terminal color schemes
|
||||
*/
|
||||
export abstract class TerminalColorSchemeProvider {
|
||||
abstract async getSchemes (): Promise<ITerminalColorScheme[]>
|
||||
}
|
10
terminus-terminal/src/api/contextMenuProvider.ts
Normal file
10
terminus-terminal/src/api/contextMenuProvider.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
||||
|
||||
/**
|
||||
* Extend to add more terminal context menu items
|
||||
*/
|
||||
export abstract class TerminalContextMenuItemProvider {
|
||||
weight: number
|
||||
|
||||
abstract async getItems (tab: BaseTerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]>
|
||||
}
|
16
terminus-terminal/src/api/decorator.ts
Normal file
16
terminus-terminal/src/api/decorator.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
||||
|
||||
/**
|
||||
* Extend to automatically run actions on new terminals
|
||||
*/
|
||||
export abstract class TerminalDecorator {
|
||||
/**
|
||||
* Called when a new terminal tab starts
|
||||
*/
|
||||
attach (terminal: BaseTerminalTabComponent): void { } // tslint:disable-line no-empty
|
||||
|
||||
/**
|
||||
* Called before a terminal tab is destroyed
|
||||
*/
|
||||
detach (terminal: BaseTerminalTabComponent): void { } // tslint:disable-line no-empty
|
||||
}
|
54
terminus-terminal/src/api/interfaces.ts
Normal file
54
terminus-terminal/src/api/interfaces.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { SafeHtml } from '@angular/platform-browser'
|
||||
|
||||
export interface ResizeEvent {
|
||||
columns: number
|
||||
rows: number
|
||||
}
|
||||
|
||||
export interface SessionOptions {
|
||||
name?: string
|
||||
command: string
|
||||
args: string[]
|
||||
cwd?: string
|
||||
env?: {[id: string]: string}
|
||||
width?: number
|
||||
height?: number
|
||||
pauseAfterExit?: boolean
|
||||
runAsAdministrator?: boolean
|
||||
}
|
||||
|
||||
export interface Profile {
|
||||
name: string,
|
||||
sessionOptions: SessionOptions,
|
||||
isBuiltin?: boolean
|
||||
icon?: SafeHtml
|
||||
}
|
||||
|
||||
export interface ITerminalColorScheme {
|
||||
name: string
|
||||
foreground: string
|
||||
background: string
|
||||
cursor: string
|
||||
colors: string[]
|
||||
}
|
||||
|
||||
export interface IShell {
|
||||
id: string
|
||||
name?: string
|
||||
command: string
|
||||
args?: string[]
|
||||
env: {[id: string]: string}
|
||||
|
||||
/**
|
||||
* Base path to which shell's internal FS is relative
|
||||
* Currently used for WSL only
|
||||
*/
|
||||
fsBase?: string
|
||||
|
||||
/**
|
||||
* SVG icon
|
||||
*/
|
||||
icon?: SafeHtml
|
||||
|
||||
hidden?: boolean
|
||||
}
|
8
terminus-terminal/src/api/shellProvider.ts
Normal file
8
terminus-terminal/src/api/shellProvider.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { IShell } from './interfaces'
|
||||
|
||||
/**
|
||||
* Extend to add support for more shells
|
||||
*/
|
||||
export abstract class ShellProvider {
|
||||
abstract async provide (): Promise<IShell[]>
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { TerminalColorSchemeProvider, ITerminalColorScheme } from './api'
|
||||
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
||||
import { ITerminalColorScheme } from './api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -6,7 +6,8 @@ const fontManager = require('fontmanager-redux')
|
||||
|
||||
import { Component, Inject } from '@angular/core'
|
||||
import { ConfigService, HostAppService, Platform, ElectronService } from 'terminus-core'
|
||||
import { TerminalColorSchemeProvider, ITerminalColorScheme } from '../api'
|
||||
import { TerminalColorSchemeProvider } from '../api/colorSchemeProvider'
|
||||
import { ITerminalColorScheme } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Component({
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { UACService } from '../services/uac.service'
|
||||
import { Profile } from '../api'
|
||||
import { Profile } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Component({
|
||||
|
@ -4,7 +4,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { Subscription } from 'rxjs'
|
||||
import { ConfigService, ElectronService, HostAppService, Platform } from 'terminus-core'
|
||||
import { EditProfileModalComponent } from './editProfileModal.component'
|
||||
import { IShell, Profile } from '../api'
|
||||
import { IShell, Profile } from '../api/interfaces'
|
||||
import { TerminalService } from '../services/terminal.service'
|
||||
import { WIN_BUILD_CONPTY_SUPPORTED, WIN_BUILD_CONPTY_STABLE, isWindowsBuild } from '../utils'
|
||||
|
||||
|
@ -2,8 +2,8 @@ import { Component, Input } from '@angular/core'
|
||||
import { Subscription } from 'rxjs'
|
||||
import { first } from 'rxjs/operators'
|
||||
import { BaseTabProcess } from 'terminus-core'
|
||||
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
||||
import { SessionOptions } from '../api'
|
||||
import { BaseTerminalTabComponent } from '../api/baseTerminalTab.component'
|
||||
import { SessionOptions } from '../api/interfaces'
|
||||
import { Session } from '../services/sessions.service'
|
||||
import { WIN_BUILD_CONPTY_SUPPORTED, isWindowsBuild } from '../utils'
|
||||
|
||||
|
@ -3,8 +3,8 @@ import { ToastrService } from 'ngx-toastr'
|
||||
import { ConfigService } from 'terminus-core'
|
||||
import { UACService } from './services/uac.service'
|
||||
import { TerminalService } from './services/terminal.service'
|
||||
import { BaseTerminalTabComponent } from './components/baseTerminalTab.component'
|
||||
import { TerminalContextMenuItemProvider } from './api'
|
||||
import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
||||
import { BaseTerminalTabComponent } from './api/baseTerminalTab.component'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Observable, Subject, AsyncSubject, ReplaySubject, BehaviorSubject } from 'rxjs'
|
||||
import { ResizeEvent } from '../api'
|
||||
import { ResizeEvent } from '../api/interfaces'
|
||||
import { ConfigService, ThemesService, HotkeysService } from 'terminus-core'
|
||||
|
||||
export interface ISearchOptions {
|
||||
|
@ -17,7 +17,6 @@ import { TerminalSettingsTabComponent } from './components/terminalSettingsTab.c
|
||||
import { ColorPickerComponent } from './components/colorPicker.component'
|
||||
import { EditProfileModalComponent } from './components/editProfileModal.component'
|
||||
import { EnvironmentEditorComponent } from './components/environmentEditor.component'
|
||||
import { BaseTerminalTabComponent } from './components/baseTerminalTab.component'
|
||||
import { SearchPanelComponent } from './components/searchPanel.component'
|
||||
|
||||
import { BaseSession } from './services/sessions.service'
|
||||
@ -27,7 +26,10 @@ import { DockMenuService } from './services/dockMenu.service'
|
||||
|
||||
import { ButtonProvider } from './buttonProvider'
|
||||
import { RecoveryProvider } from './recoveryProvider'
|
||||
import { TerminalColorSchemeProvider, TerminalDecorator, ShellProvider, TerminalContextMenuItemProvider } from './api'
|
||||
import { TerminalDecorator } from './api/decorator'
|
||||
import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
||||
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
||||
import { ShellProvider } from './api/shellProvider'
|
||||
import { TerminalSettingsTabProvider, AppearanceSettingsTabProvider, ShellSettingsTabProvider } from './settings'
|
||||
import { PathDropDecorator } from './pathDrop'
|
||||
import { TerminalConfigProvider } from './config'
|
||||
@ -216,6 +218,7 @@ export default class TerminalModule {
|
||||
}
|
||||
}
|
||||
|
||||
export { TerminalService, BaseSession, TerminalTabComponent, TerminalFrontendService, BaseTerminalTabComponent }
|
||||
export { TerminalService, BaseSession, TerminalTabComponent, TerminalFrontendService, TerminalDecorator, TerminalContextMenuItemProvider, TerminalColorSchemeProvider }
|
||||
export { Frontend, XTermFrontend, XTermWebGLFrontend, HTermFrontend }
|
||||
export * from './api'
|
||||
export { BaseTerminalTabComponent } from './api/baseTerminalTab.component'
|
||||
export * from './api/interfaces'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Subscription } from 'rxjs'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { TerminalDecorator } from './api'
|
||||
import { TerminalDecorator } from './api/decorator'
|
||||
import { TerminalTabComponent } from './components/terminalTab.component'
|
||||
|
||||
/** @hidden */
|
||||
|
@ -8,7 +8,7 @@ import { first } from 'rxjs/operators'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { Logger, LogService, ConfigService } from 'terminus-core'
|
||||
import { exec } from 'mz/child_process'
|
||||
import { SessionOptions } from '../api'
|
||||
import { SessionOptions } from '../api/interfaces'
|
||||
import { WIN_BUILD_CONPTY_SUPPORTED, isWindowsBuild } from '../utils'
|
||||
|
||||
try {
|
||||
|
@ -3,7 +3,8 @@ import slug from 'slug'
|
||||
import { Observable, AsyncSubject } from 'rxjs'
|
||||
import { Injectable, Inject } from '@angular/core'
|
||||
import { AppService, Logger, LogService, ConfigService, SplitTabComponent } from 'terminus-core'
|
||||
import { IShell, ShellProvider, SessionOptions, Profile } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell, SessionOptions, Profile } from '../api/interfaces'
|
||||
import { TerminalTabComponent } from '../components/terminalTab.component'
|
||||
import { UACService } from './uac.service'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { ElectronService } from 'terminus-core'
|
||||
import { SessionOptions } from '../api'
|
||||
import { SessionOptions } from '../api/interfaces'
|
||||
|
||||
import { WIN_BUILD_CONPTY_SUPPORTED, isWindowsBuild } from '../utils'
|
||||
|
||||
|
@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { ConfigService } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
try {
|
||||
var wnr = require('windows-native-registry') // tslint:disable-line
|
||||
|
@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
try {
|
||||
var wnr = require('windows-native-registry') // tslint:disable-line
|
||||
|
@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
try {
|
||||
var wnr = require('windows-native-registry') // tslint:disable-line
|
||||
|
@ -2,7 +2,8 @@ import * as fs from 'mz/fs'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform, LogService, Logger } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -2,7 +2,8 @@ import { exec } from 'mz/child_process'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -3,7 +3,8 @@ import slug from 'slug'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
try {
|
||||
var wnr = require('windows-native-registry') // tslint:disable-line
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
import { WSLShellProvider } from './wsl'
|
||||
import { PowerShellCoreShellProvider } from './powershellCore'
|
||||
|
@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform, ElectronService } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
|
@ -4,7 +4,8 @@ import slug from 'slug'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { ShellProvider } from '../api/shellProvider'
|
||||
import { IShell } from '../api/interfaces'
|
||||
import { isWindowsBuild, WIN_BUILD_WSL_EXE_DISTRO_FLAG } from '../utils'
|
||||
|
||||
try {
|
||||
|
@ -1,12 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"declarationDir": "dist",
|
||||
"paths": {
|
||||
"terminus-*": ["terminus-*"],
|
||||
"*": ["app/node_modules/*"]
|
||||
}
|
||||
"baseUrl": "src"
|
||||
}
|
||||
}
|
||||
|
14
terminus-terminal/tsconfig.typings.json
Normal file
14
terminus-terminal/tsconfig.typings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist", "typings"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./typings",
|
||||
"paths": {
|
||||
"terminus-*": ["../../terminus-*"],
|
||||
"*": ["../../app/node_modules/*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,6 @@
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedLocals": true,
|
||||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
Loading…
Reference in New Issue
Block a user