Compare commits

...

3 Commits

Author SHA1 Message Date
Eugene Pankov
33514cb073 bumped ng-bootstrap 2017-08-30 11:47:49 +02:00
Eugene Pankov
4d2be9ec89 handle Hyper plugin crashes (fixes #71) 2017-08-30 11:23:51 +02:00
Eugene Pankov
1b2236eb90 fixed #187, fixed #188 2017-08-30 11:12:04 +02:00
5 changed files with 40 additions and 33 deletions

View File

@@ -19,7 +19,7 @@
"@angular/forms": "4.3.0",
"@angular/platform-browser": "4.3.0",
"@angular/platform-browser-dynamic": "4.3.0",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.28",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.2",
"devtron": "1.4.0",
"electron-config": "0.2.1",
"electron-debug": "^1.0.1",

View File

@@ -44,9 +44,9 @@
dependencies:
tslib "^1.7.1"
"@ng-bootstrap/ng-bootstrap@^1.0.0-alpha.28":
version "1.0.0-alpha.28"
resolved "https://registry.yarnpkg.com/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-1.0.0-alpha.28.tgz#30a6503bf7f94f9d3187591fb3267b59cc0cdaad"
"@ng-bootstrap/ng-bootstrap@^1.0.0-beta.2":
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-1.0.0-beta.2.tgz#3d4b567b0334a9ee631b73c72156cd3a9d3cd29f"
"@types/mz@0.0.31":
version "0.0.31"

View File

@@ -53,7 +53,7 @@ const PROVIDERS = [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
NgbModule,
NgbModule.forRoot(),
PerfectScrollbarModule.forRoot({
suppressScrollX: true,
}),

View File

@@ -13,35 +13,39 @@ export class HyperColorSchemes extends TerminalColorSchemeProvider {
let themes: ITerminalColorScheme[] = []
plugins.forEach(plugin => {
let module = (global as any).require(path.join(pluginsPath, plugin))
if (module.decorateConfig) {
let config = module.decorateConfig({})
if (config.colors) {
themes.push({
name: plugin,
foreground: config.foregroundColor,
background: config.backgroundColor,
cursor: config.cursorColor,
colors: config.colors.black ? [
config.colors.black,
config.colors.red,
config.colors.green,
config.colors.yellow,
config.colors.blue,
config.colors.magenta,
config.colors.cyan,
config.colors.white,
config.colors.lightBlack,
config.colors.lightRed,
config.colors.lightGreen,
config.colors.lightYellow,
config.colors.lightBlue,
config.colors.lightMagenta,
config.colors.lightCyan,
config.colors.lightWhite,
] : config.colors,
})
try {
let module = (global as any).require(path.join(pluginsPath, plugin))
if (module.decorateConfig) {
let config = module.decorateConfig({})
if (config.colors) {
themes.push({
name: plugin,
foreground: config.foregroundColor,
background: config.backgroundColor,
cursor: config.cursorColor,
colors: config.colors.black ? [
config.colors.black,
config.colors.red,
config.colors.green,
config.colors.yellow,
config.colors.blue,
config.colors.magenta,
config.colors.cyan,
config.colors.white,
config.colors.lightBlack,
config.colors.lightRed,
config.colors.lightGreen,
config.colors.lightYellow,
config.colors.lightBlue,
config.colors.lightMagenta,
config.colors.lightCyan,
config.colors.lightWhite,
] : config.colors,
})
}
}
} catch (err) {
console.debug('Skipping Hyper plugin', plugin, err)
}
})

View File

@@ -156,6 +156,9 @@ export class Session {
}
async getWorkingDirectory (): Promise<string> {
if (!this.truePID) {
return null
}
if (process.platform === 'darwin') {
let lines = (await exec(`lsof -p ${this.truePID} -Fn`))[0].toString().split('\n')
if (lines[1] === 'fcwd') {