From e7bc93a5e201cdad054dfc101ee55fa3e99575db Mon Sep 17 00:00:00 2001 From: Austin Warren Date: Thu, 27 Jun 2019 19:46:47 -0700 Subject: [PATCH 01/16] Added check to see if configured window bounds are within one of the current displays on launch --- app/lib/window.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/lib/window.ts b/app/lib/window.ts index 94687af7..d3fdb179 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -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') { From 0cfbdf368f5e3f98179b2c269bf9b5a031d6a564 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2019 04:27:28 +0000 Subject: [PATCH 02/16] Bump xterm-addon-webgl from 0.1.0 to 0.2.0-beta1 in /terminus-terminal Bumps xterm-addon-webgl from 0.1.0 to 0.2.0-beta1. Signed-off-by: dependabot-preview[bot] --- terminus-terminal/package.json | 2 +- terminus-terminal/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terminus-terminal/package.json b/terminus-terminal/package.json index 433b59ee..b0aa3016 100644 --- a/terminus-terminal/package.json +++ b/terminus-terminal/package.json @@ -35,7 +35,7 @@ "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", diff --git a/terminus-terminal/yarn.lock b/terminus-terminal/yarn.lock index bc4830c7..55db1c34 100644 --- a/terminus-terminal/yarn.lock +++ b/terminus-terminal/yarn.lock @@ -264,10 +264,10 @@ 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" From 7b3426d2f9ef53c19bf0dd421a85f9631db65cff Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2019 04:28:10 +0000 Subject: [PATCH 03/16] Bump keytar from 4.10.0 to 4.11.0 in /terminus-ssh Bumps [keytar](https://github.com/atom/node-keytar) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/atom/node-keytar/releases) - [Commits](https://github.com/atom/node-keytar/compare/v4.10.0...v4.11.0) Signed-off-by: dependabot-preview[bot] --- terminus-ssh/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terminus-ssh/yarn.lock b/terminus-ssh/yarn.lock index f6423d71..86553794 100644 --- a/terminus-ssh/yarn.lock +++ b/terminus-ssh/yarn.lock @@ -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" From dce6df77833788d4fc08bb694e541594d7d0cbea Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:14:32 +0200 Subject: [PATCH 04/16] disable docs builds for PRs --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index bbb5a58d..9016c898 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ node_js: 11 stages: - Docs +if: branch = master + jobs: include: - stage: 'Docs' From 8f3ab68705cc3af409032f054d91db749dd1444b Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:14:40 +0200 Subject: [PATCH 05/16] auto-build typings --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c53ff818..910f6333 100644 --- a/package.json +++ b/package.json @@ -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", From 3f8ee9b4fcf9d723e277647cc67be771d50bd5ca Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2019 08:21:50 +0000 Subject: [PATCH 06/16] Bump xterm from 3.15.0-beta58 to 3.15.0-beta61 in /terminus-terminal Bumps [xterm](https://github.com/xtermjs/xterm.js) from 3.15.0-beta58 to 3.15.0-beta61. - [Release notes](https://github.com/xtermjs/xterm.js/releases) - [Commits](https://github.com/xtermjs/xterm.js/commits) Signed-off-by: dependabot-preview[bot] --- terminus-terminal/package.json | 2 +- terminus-terminal/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terminus-terminal/package.json b/terminus-terminal/package.json index b0aa3016..1b771e33 100644 --- a/terminus-terminal/package.json +++ b/terminus-terminal/package.json @@ -31,7 +31,7 @@ "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", diff --git a/terminus-terminal/yarn.lock b/terminus-terminal/yarn.lock index 55db1c34..e9dd7af9 100644 --- a/terminus-terminal/yarn.lock +++ b/terminus-terminal/yarn.lock @@ -269,10 +269,10 @@ xterm-addon-webgl@^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" From a1c38295729ea0b1ea75b4d4d23692bd36ee7c53 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:23:47 +0200 Subject: [PATCH 07/16] enable electron-builder debug output --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b2edded0..634f77c6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -37,6 +37,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: @@ -181,6 +182,7 @@ jobs: GH_TOKEN: $(GH_TOKEN) APPSTORE_USERNAME: $(APPSTORE_USERNAME) APPSTORE_PASSWORD: $(APPSTORE_PASSWORD) + DEBUG: electron-builder - task: CopyFiles@2 inputs: From cc68ad492ae3c728941ce6f4096d1ff50c386825 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:26:55 +0200 Subject: [PATCH 08/16] removed build:typings as separate ci step --- azure-pipelines.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 634f77c6..d91a5e93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,9 +21,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' @@ -81,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' @@ -164,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' From eb52a37f7762d0f5cffe5c7e3d98ae67cd64b09e Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:29:56 +0200 Subject: [PATCH 09/16] strip data-volume prefix from CWD on Catalina --- terminus-terminal/src/services/sessions.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terminus-terminal/src/services/sessions.service.ts b/terminus-terminal/src/services/sessions.service.ts index f8a4ec1a..16ad0381 100644 --- a/terminus-terminal/src/services/sessions.service.ts +++ b/terminus-terminal/src/services/sessions.service.ts @@ -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`) From fc9389ab30ba3a5a2ff0df69308ad1dcc852ccd8 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 10:55:34 +0200 Subject: [PATCH 10/16] Update appveyor.yml --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 84c2bdfb..c67fc192 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 From 336cac78c7e7db06ed117f8316a4ef0fb7dc2835 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 11:03:08 +0200 Subject: [PATCH 11/16] Update azure-pipelines.yml --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d91a5e93..5528eee3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ variables: jobs: - job: Windows pool: - vmImage: 'vs2017-win2016' + vmImage: 'vs2015-win2012r2' steps: - task: NodeTool@0 @@ -144,7 +144,7 @@ jobs: - job: macOS pool: - vmImage: 'macOS-10.14' + vmImage: 'macOS-10.13' steps: - task: NodeTool@0 From a0a4346cc41706126841bedb553decdcb81488d8 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 12:30:55 +0200 Subject: [PATCH 12/16] Revert "Update azure-pipelines.yml" This reverts commit 336cac78c7e7db06ed117f8316a4ef0fb7dc2835. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5528eee3..d91a5e93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ variables: jobs: - job: Windows pool: - vmImage: 'vs2015-win2012r2' + vmImage: 'vs2017-win2016' steps: - task: NodeTool@0 @@ -144,7 +144,7 @@ jobs: - job: macOS pool: - vmImage: 'macOS-10.13' + vmImage: 'macOS-10.14' steps: - task: NodeTool@0 From ebdc2e41053064147d694c370b1790a99bc4a30a Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 12:38:57 +0200 Subject: [PATCH 13/16] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d91a5e93..33bbd268 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,7 +15,7 @@ jobs: versionSpec: '10.x' displayName: 'Install Node.js' - - script: yarn + - script: yarn --network-timeout 100000 displayName: 'Install dependencies' - script: node scripts/build-native.js From c0804b69400e169106dfc3a39ffbc62f34f5479c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 13:02:52 +0200 Subject: [PATCH 14/16] Update azure-pipelines.yml --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33bbd268..28358840 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -167,8 +167,8 @@ jobs: - script: node scripts/build-macos.js displayName: 'Package' env: - CSC_LINK: $(CSC_LINK) - CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) + _CSC_LINK: $(CSC_LINK) + _CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) BT_TOKEN: $(BT_TOKEN) GH_TOKEN: $(GH_TOKEN) APPSTORE_USERNAME: $(APPSTORE_USERNAME) From a08df2fd126e25ab009bb74c1b9d9b9b42e7f6ad Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 16:35:20 +0200 Subject: [PATCH 15/16] Revert "Update azure-pipelines.yml" This reverts commit c0804b69400e169106dfc3a39ffbc62f34f5479c. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28358840..33bbd268 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -167,8 +167,8 @@ jobs: - script: node scripts/build-macos.js displayName: 'Package' env: - _CSC_LINK: $(CSC_LINK) - _CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) + CSC_LINK: $(CSC_LINK) + CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) BT_TOKEN: $(BT_TOKEN) GH_TOKEN: $(GH_TOKEN) APPSTORE_USERNAME: $(APPSTORE_USERNAME) From 944c7b072ba0b4fde8391b2dc0a35d9b65e9404b Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jun 2019 17:07:58 +0200 Subject: [PATCH 16/16] restored travis config --- .travis.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9016c898..3875add5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,40 @@ language: node_js node_js: 11 stages: - - Docs - -if: branch = master + - 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 @@ -34,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'