Merge pull request #2 from Eugeny/master

Back up to date
This commit is contained in:
Austin Warren 2019-06-28 12:17:26 -07:00 committed by GitHub
commit 8632f1eedf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 31 deletions

View file

@ -2,10 +2,40 @@ language: node_js
node_js: 11
stages:
- Docs
- Build
- name: Docs
if: branch = master
jobs:
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'
os: linux
if: branch = master
@ -32,6 +62,7 @@ addons:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
cache:
directories:
- 'terminus-*/node_modules'

View file

@ -1,6 +1,6 @@
import { Subject, Observable } from 'rxjs'
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 * as os from 'os'
@ -53,6 +53,16 @@ export class Window {
}
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') {
bwOptions.frame = true
} else {
@ -82,6 +92,7 @@ export class Window {
this.window.focus()
}
})
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html?${this.window.id}`, { extraHeaders: 'pragma: no-cache\n' })
if (process.platform !== 'darwin') {

View file

@ -14,7 +14,6 @@ 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

View file

@ -15,15 +15,12 @@ jobs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: yarn
- script: yarn --network-timeout 100000
displayName: 'Install dependencies'
- script: node scripts/build-native.js
displayName: 'Rebuild native dependencies'
- script: yarn run build:typings
displayName: 'Build typings'
- script: yarn run build
displayName: 'Build'
@ -37,6 +34,7 @@ jobs:
WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
BT_TOKEN: $(BT_TOKEN)
GH_TOKEN: $(GH_TOKEN)
DEBUG: electron-builder
- task: CopyFiles@2
inputs:
@ -80,9 +78,6 @@ jobs:
- script: node scripts/build-native.js
displayName: 'Rebuild native dependencies'
- script: yarn run build:typings
displayName: 'Build typings'
- script: yarn run build
displayName: 'Build'
@ -163,9 +158,6 @@ jobs:
- script: node scripts/build-native.js
displayName: 'Rebuild native dependencies'
- script: yarn run build:typings
displayName: 'Build typings'
- script: yarn run build
displayName: 'Build'
@ -181,6 +173,7 @@ jobs:
GH_TOKEN: $(GH_TOKEN)
APPSTORE_USERNAME: $(APPSTORE_USERNAME)
APPSTORE_PASSWORD: $(APPSTORE_PASSWORD)
DEBUG: electron-builder
- task: CopyFiles@2
inputs:

View file

@ -129,7 +129,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-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",
"watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch",
"start": "cross-env TERMINUS_DEV=1 electron app --debug",

View file

@ -191,9 +191,9 @@ isarray@~1.0.0:
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
keytar@^4.7.0:
version "4.10.0"
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.10.0.tgz#03897398b22d6e60dbd0b381c088b2495ff32ce5"
integrity sha512-oL6dF4FMX8G80zL5e1CPIUEKwZCe9XZw6JZI5YesNstamzJbyZduj7NMUEX2l72BLyWQibyZOvipmof0QbsbRQ==
version "4.11.0"
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.11.0.tgz#891569045b287a0dabe69320e2381e059b02363f"
integrity sha512-cGn2xd4NY0yCBrU5zQ/lwIagP1UBOhUEemi6iSJU2gshN1RHkxHekSdLUji9IWNo5B1Va/iwXXWzGD2p8ziqfQ==
dependencies:
nan "2.14.0"
prebuild-install "5.3.0"

View file

@ -31,11 +31,11 @@
"runes": "^0.4.2",
"slug": "^1.1.0",
"uuid": "^3.3.2",
"xterm": "3.15.0-beta58",
"xterm": "3.15.0-beta61",
"xterm-addon-fit": "^0.1.0-beta3",
"xterm-addon-ligatures": "^0.1.0-beta-2",
"xterm-addon-search": "^0.1.0-beta6",
"xterm-addon-webgl": "^0.1.0-beta2"
"xterm-addon-webgl": "^0.2.0-beta1"
},
"peerDependencies": {
"@angular/common": "4.0.1",

View file

@ -28,6 +28,7 @@ export interface ChildProcess {
}
const windowsDirectoryRegex = /([a-zA-Z]:[^\:\[\]\?\"\<\>\|]+)/mi
const catalinaDataVolumePrefix = '/System/Volumes/Data'
const OSC1337Prefix = '\x1b]1337;'
const OSC1337Suffix = '\x07'
@ -282,11 +283,11 @@ export class Session extends BaseSession {
} catch (e) {
return null
}
if (lines[1] === 'fcwd') {
return lines[2].substring(1)
} else {
return lines[1].substring(1)
let cwd = lines[(lines[1] === 'fcwd') ? 2 : 1].substring(1)
if (cwd.startsWith(catalinaDataVolumePrefix)) {
cwd = cwd.substring(catalinaDataVolumePrefix.length)
}
return cwd
}
if (process.platform === 'linux') {
return fs.readlink(`/proc/${this.truePID}/cwd`)

View file

@ -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"
integrity sha512-XKxdfO48HkCJW2m1wXW0PK/BOk00WEaN+W2LgDQqCBwwUjyBzWc9HaV8gzLXhSCDAYesWvtQa3RfqHfSp9qsbQ==
xterm-addon-webgl@^0.1.0-beta2:
version "0.1.0"
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.1.0.tgz#885450d5bedc65708a15ff39dce9c24db7fff19e"
integrity sha512-/F6jia0Cwg3TIe0+5ARqtX46VmwHshwfwhrF2QLl31dh1Z/DrukQAQhaHb+g9khAaJ+NQiNLkPR5GWK7tL1ujQ==
xterm-addon-webgl@^0.2.0-beta1:
version "0.2.0-beta1"
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.2.0-beta1.tgz#c688e4b26bbd01a8a0cd9143362bbe040fc98ef9"
integrity sha512-arDNdOyiGs0BCFUaQ0jEa1UgybqMsMRZwV9+/xc0D4vJi5STWtH8lRtTUAgvDxaTJQBo1frz56JkYpDddHDSXw==
xterm@3.15.0-beta58:
version "3.15.0-beta58"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta58.tgz#8260e2403766c16d833cc65c9ec1d721c4e818b0"
integrity sha512-UtI7p7ukvLwhx/pMq/JTNFwZnPWIB3H9HOf0HeUYW1OL4hCSPDo3P0/TyoqL7pFvN90kYklQihhH2ZviEPk9Cw==
xterm@3.15.0-beta61:
version "3.15.0-beta61"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta61.tgz#44f3b1959c955013d0661b7008c33a913f900329"
integrity sha512-nPr9DQCUnAnC8COoL5QfZqdFADj6nD+03xsqfu+6DLJAY0BPF0Tdhm+VzWlB4GGEhjA/DEuTD5vq70+j3gE/bw==
yallist@^2.1.2:
version "2.1.2"