mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-18 18:39:55 +00:00
commit
8632f1eedf
33
.travis.yml
33
.travis.yml
@ -2,10 +2,40 @@ language: node_js
|
|||||||
node_js: 11
|
node_js: 11
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- Docs
|
- Build
|
||||||
|
- name: Docs
|
||||||
|
if: branch = master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
- stage: 'Build'
|
||||||
|
os: linux
|
||||||
|
before_install:
|
||||||
|
- set -e
|
||||||
|
- rm app/node_modules/.yarn-integrity || true
|
||||||
|
- yarn
|
||||||
|
script:
|
||||||
|
- set -e
|
||||||
|
- scripts/build-native.js
|
||||||
|
- yarn run build:typings
|
||||||
|
- yarn run build
|
||||||
|
- scripts/prepackage-plugins.js
|
||||||
|
- travis_wait scripts/build-linux.js
|
||||||
|
|
||||||
|
- stage: 'Build'
|
||||||
|
os: osx
|
||||||
|
before_install:
|
||||||
|
- set -e
|
||||||
|
- rm app/node_modules/.yarn-integrity || true
|
||||||
|
- yarn
|
||||||
|
script:
|
||||||
|
- set -e
|
||||||
|
- scripts/build-native.js
|
||||||
|
- yarn run build:typings
|
||||||
|
- yarn run build
|
||||||
|
- scripts/prepackage-plugins.js
|
||||||
|
- travis_wait scripts/build-macos.js
|
||||||
|
|
||||||
- stage: 'Docs'
|
- stage: 'Docs'
|
||||||
os: linux
|
os: linux
|
||||||
if: branch = master
|
if: branch = master
|
||||||
@ -32,6 +62,7 @@ addons:
|
|||||||
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
|
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
|
||||||
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
|
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
|
||||||
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- 'terminus-*/node_modules'
|
- 'terminus-*/node_modules'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Subject, Observable } from 'rxjs'
|
import { Subject, Observable } from 'rxjs'
|
||||||
import { debounceTime } from 'rxjs/operators'
|
import { debounceTime } from 'rxjs/operators'
|
||||||
import { BrowserWindow, app, ipcMain, Rectangle } from 'electron'
|
import { BrowserWindow, app, ipcMain, Rectangle, screen } from 'electron'
|
||||||
import ElectronConfig = require('electron-config')
|
import ElectronConfig = require('electron-config')
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
|
|
||||||
@ -53,6 +53,16 @@ export class Window {
|
|||||||
}
|
}
|
||||||
Object.assign(bwOptions, this.windowBounds)
|
Object.assign(bwOptions, this.windowBounds)
|
||||||
|
|
||||||
|
const closestDisplay = screen.getDisplayNearestPoint( {x: this.windowBounds.x, y: this.windowBounds.y} )
|
||||||
|
|
||||||
|
const [left1, top1, right1, bottom1] = [this.windowBounds.x, this.windowBounds.y, this.windowBounds.x + this.windowBounds.width, this.windowBounds.y + this.windowBounds.height];
|
||||||
|
const [left2, top2, right2, bottom2] = [closestDisplay.bounds.x, closestDisplay.bounds.y, closestDisplay.bounds.x + closestDisplay.bounds.width, closestDisplay.bounds.y + closestDisplay.bounds.height];
|
||||||
|
|
||||||
|
if ((left2 > right1 || right2 < left1 || top2 > bottom1 || bottom2 < top1) && !maximized) {
|
||||||
|
bwOptions.x = closestDisplay.bounds.width / 2 - bwOptions.width / 2;
|
||||||
|
bwOptions.y = closestDisplay.bounds.height / 2 - bwOptions.height / 2;
|
||||||
|
}
|
||||||
|
|
||||||
if ((configData.appearance || {}).frame === 'native') {
|
if ((configData.appearance || {}).frame === 'native') {
|
||||||
bwOptions.frame = true
|
bwOptions.frame = true
|
||||||
} else {
|
} else {
|
||||||
@ -82,6 +92,7 @@ export class Window {
|
|||||||
this.window.focus()
|
this.window.focus()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html?${this.window.id}`, { extraHeaders: 'pragma: no-cache\n' })
|
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html?${this.window.id}`, { extraHeaders: 'pragma: no-cache\n' })
|
||||||
|
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
|
@ -14,7 +14,6 @@ install:
|
|||||||
- node scripts/build-native.js
|
- node scripts/build-native.js
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- yarn run build:typings
|
|
||||||
- yarn run build
|
- yarn run build
|
||||||
- node scripts/prepackage-plugins.js
|
- node scripts/prepackage-plugins.js
|
||||||
- node scripts/build-windows.js
|
- node scripts/build-windows.js
|
||||||
|
@ -15,15 +15,12 @@ jobs:
|
|||||||
versionSpec: '10.x'
|
versionSpec: '10.x'
|
||||||
displayName: 'Install Node.js'
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
- script: yarn
|
- script: yarn --network-timeout 100000
|
||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
- script: node scripts/build-native.js
|
- script: node scripts/build-native.js
|
||||||
displayName: 'Rebuild native dependencies'
|
displayName: 'Rebuild native dependencies'
|
||||||
|
|
||||||
- script: yarn run build:typings
|
|
||||||
displayName: 'Build typings'
|
|
||||||
|
|
||||||
- script: yarn run build
|
- script: yarn run build
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
|
|
||||||
@ -37,6 +34,7 @@ jobs:
|
|||||||
WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
|
WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
|
||||||
BT_TOKEN: $(BT_TOKEN)
|
BT_TOKEN: $(BT_TOKEN)
|
||||||
GH_TOKEN: $(GH_TOKEN)
|
GH_TOKEN: $(GH_TOKEN)
|
||||||
|
DEBUG: electron-builder
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
inputs:
|
inputs:
|
||||||
@ -80,9 +78,6 @@ jobs:
|
|||||||
- script: node scripts/build-native.js
|
- script: node scripts/build-native.js
|
||||||
displayName: 'Rebuild native dependencies'
|
displayName: 'Rebuild native dependencies'
|
||||||
|
|
||||||
- script: yarn run build:typings
|
|
||||||
displayName: 'Build typings'
|
|
||||||
|
|
||||||
- script: yarn run build
|
- script: yarn run build
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
|
|
||||||
@ -163,9 +158,6 @@ jobs:
|
|||||||
- script: node scripts/build-native.js
|
- script: node scripts/build-native.js
|
||||||
displayName: 'Rebuild native dependencies'
|
displayName: 'Rebuild native dependencies'
|
||||||
|
|
||||||
- script: yarn run build:typings
|
|
||||||
displayName: 'Build typings'
|
|
||||||
|
|
||||||
- script: yarn run build
|
- script: yarn run build
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
|
|
||||||
@ -181,6 +173,7 @@ jobs:
|
|||||||
GH_TOKEN: $(GH_TOKEN)
|
GH_TOKEN: $(GH_TOKEN)
|
||||||
APPSTORE_USERNAME: $(APPSTORE_USERNAME)
|
APPSTORE_USERNAME: $(APPSTORE_USERNAME)
|
||||||
APPSTORE_PASSWORD: $(APPSTORE_PASSWORD)
|
APPSTORE_PASSWORD: $(APPSTORE_PASSWORD)
|
||||||
|
DEBUG: electron-builder
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
|
"build": "npm run build:typings && 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-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",
|
"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",
|
"watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch",
|
||||||
"start": "cross-env TERMINUS_DEV=1 electron app --debug",
|
"start": "cross-env TERMINUS_DEV=1 electron app --debug",
|
||||||
|
@ -191,9 +191,9 @@ isarray@~1.0.0:
|
|||||||
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||||
|
|
||||||
keytar@^4.7.0:
|
keytar@^4.7.0:
|
||||||
version "4.10.0"
|
version "4.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.10.0.tgz#03897398b22d6e60dbd0b381c088b2495ff32ce5"
|
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.11.0.tgz#891569045b287a0dabe69320e2381e059b02363f"
|
||||||
integrity sha512-oL6dF4FMX8G80zL5e1CPIUEKwZCe9XZw6JZI5YesNstamzJbyZduj7NMUEX2l72BLyWQibyZOvipmof0QbsbRQ==
|
integrity sha512-cGn2xd4NY0yCBrU5zQ/lwIagP1UBOhUEemi6iSJU2gshN1RHkxHekSdLUji9IWNo5B1Va/iwXXWzGD2p8ziqfQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
nan "2.14.0"
|
nan "2.14.0"
|
||||||
prebuild-install "5.3.0"
|
prebuild-install "5.3.0"
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
"runes": "^0.4.2",
|
"runes": "^0.4.2",
|
||||||
"slug": "^1.1.0",
|
"slug": "^1.1.0",
|
||||||
"uuid": "^3.3.2",
|
"uuid": "^3.3.2",
|
||||||
"xterm": "3.15.0-beta58",
|
"xterm": "3.15.0-beta61",
|
||||||
"xterm-addon-fit": "^0.1.0-beta3",
|
"xterm-addon-fit": "^0.1.0-beta3",
|
||||||
"xterm-addon-ligatures": "^0.1.0-beta-2",
|
"xterm-addon-ligatures": "^0.1.0-beta-2",
|
||||||
"xterm-addon-search": "^0.1.0-beta6",
|
"xterm-addon-search": "^0.1.0-beta6",
|
||||||
"xterm-addon-webgl": "^0.1.0-beta2"
|
"xterm-addon-webgl": "^0.2.0-beta1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": "4.0.1",
|
"@angular/common": "4.0.1",
|
||||||
|
@ -28,6 +28,7 @@ export interface ChildProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const windowsDirectoryRegex = /([a-zA-Z]:[^\:\[\]\?\"\<\>\|]+)/mi
|
const windowsDirectoryRegex = /([a-zA-Z]:[^\:\[\]\?\"\<\>\|]+)/mi
|
||||||
|
const catalinaDataVolumePrefix = '/System/Volumes/Data'
|
||||||
const OSC1337Prefix = '\x1b]1337;'
|
const OSC1337Prefix = '\x1b]1337;'
|
||||||
const OSC1337Suffix = '\x07'
|
const OSC1337Suffix = '\x07'
|
||||||
|
|
||||||
@ -282,11 +283,11 @@ export class Session extends BaseSession {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
if (lines[1] === 'fcwd') {
|
let cwd = lines[(lines[1] === 'fcwd') ? 2 : 1].substring(1)
|
||||||
return lines[2].substring(1)
|
if (cwd.startsWith(catalinaDataVolumePrefix)) {
|
||||||
} else {
|
cwd = cwd.substring(catalinaDataVolumePrefix.length)
|
||||||
return lines[1].substring(1)
|
|
||||||
}
|
}
|
||||||
|
return cwd
|
||||||
}
|
}
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
return fs.readlink(`/proc/${this.truePID}/cwd`)
|
return fs.readlink(`/proc/${this.truePID}/cwd`)
|
||||||
|
@ -264,15 +264,15 @@ xterm-addon-search@^0.1.0-beta6:
|
|||||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.1.0-beta6.tgz#e2a2b441f8f7b0245c63731d0b2af32c7d4e6747"
|
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.1.0-beta6.tgz#e2a2b441f8f7b0245c63731d0b2af32c7d4e6747"
|
||||||
integrity sha512-XKxdfO48HkCJW2m1wXW0PK/BOk00WEaN+W2LgDQqCBwwUjyBzWc9HaV8gzLXhSCDAYesWvtQa3RfqHfSp9qsbQ==
|
integrity sha512-XKxdfO48HkCJW2m1wXW0PK/BOk00WEaN+W2LgDQqCBwwUjyBzWc9HaV8gzLXhSCDAYesWvtQa3RfqHfSp9qsbQ==
|
||||||
|
|
||||||
xterm-addon-webgl@^0.1.0-beta2:
|
xterm-addon-webgl@^0.2.0-beta1:
|
||||||
version "0.1.0"
|
version "0.2.0-beta1"
|
||||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.1.0.tgz#885450d5bedc65708a15ff39dce9c24db7fff19e"
|
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.2.0-beta1.tgz#c688e4b26bbd01a8a0cd9143362bbe040fc98ef9"
|
||||||
integrity sha512-/F6jia0Cwg3TIe0+5ARqtX46VmwHshwfwhrF2QLl31dh1Z/DrukQAQhaHb+g9khAaJ+NQiNLkPR5GWK7tL1ujQ==
|
integrity sha512-arDNdOyiGs0BCFUaQ0jEa1UgybqMsMRZwV9+/xc0D4vJi5STWtH8lRtTUAgvDxaTJQBo1frz56JkYpDddHDSXw==
|
||||||
|
|
||||||
xterm@3.15.0-beta58:
|
xterm@3.15.0-beta61:
|
||||||
version "3.15.0-beta58"
|
version "3.15.0-beta61"
|
||||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta58.tgz#8260e2403766c16d833cc65c9ec1d721c4e818b0"
|
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta61.tgz#44f3b1959c955013d0661b7008c33a913f900329"
|
||||||
integrity sha512-UtI7p7ukvLwhx/pMq/JTNFwZnPWIB3H9HOf0HeUYW1OL4hCSPDo3P0/TyoqL7pFvN90kYklQihhH2ZviEPk9Cw==
|
integrity sha512-nPr9DQCUnAnC8COoL5QfZqdFADj6nD+03xsqfu+6DLJAY0BPF0Tdhm+VzWlB4GGEhjA/DEuTD5vq70+j3gE/bw==
|
||||||
|
|
||||||
yallist@^2.1.2:
|
yallist@^2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user