Support for Apple Silicon via node 15, electron 11.1 update

This commit is contained in:
pinpins 2020-12-23 22:45:47 +02:00
parent 56be0a1085
commit e87f6e7af0
34 changed files with 10050 additions and 9526 deletions

View file

@ -11,11 +11,11 @@ jobs:
- name: Installing Node
uses: actions/setup-node@v1
with:
node-version: 11
node-version: 15
- name: Install deps
run: |
sudo npm i -g yarn@1.19.1
sudo npm i -g yarn@1.22.1
cd app
yarn
cd ..

3
.gitignore vendored
View file

@ -13,6 +13,9 @@ dist
*.xcuserstate
*.wixpdb
.DS_Store
.DS_Store?
coverage
.nyc_output
npm-debug.log

View file

@ -1,5 +1,5 @@
language: node_js
node_js: 10
node_js: 15
stages:
- Build

View file

@ -1,4 +1,4 @@
const { init } = process.type === 'main' ? require('@sentry/electron/dist/main') : require('@sentry/electron/dist/renderer')
const { init } = String(process.type) === 'main' ? require('@sentry/electron/dist/main') : require('@sentry/electron/dist/renderer')
import * as isDev from 'electron-is-dev'

View file

@ -51,11 +51,12 @@ export class Window {
height: 600,
title: 'Terminus',
minWidth: 400,
minHeight: 300,
minHeight: 300,
webPreferences: {
nodeIntegration: true,
preload: path.join(__dirname, 'sentry.js'),
backgroundThrottling: false,
enableRemoteModule: true,
},
frame: false,
show: false,

View file

@ -13,43 +13,49 @@
"watch": "webpack --progress --color --watch"
},
"dependencies": {
"@angular/animations": "9.1.9",
"@angular/common": "9.1.11",
"@angular/compiler": "9.1.9",
"@angular/core": "9.1.9",
"@angular/forms": "9.1.11",
"@angular/platform-browser": "9.1.9",
"@angular/platform-browser-dynamic": "9.1.9",
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/compiler": "^9.1.9",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.9",
"@angular/platform-browser-dynamic": "^9.1.9",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@terminus-term/node-pty": "0.10.0-beta9",
"devtron": "1.4.0",
"electron-config": "2.0.0",
"electron-debug": "^3.0.1",
"electron-is-dev": "1.1.0",
"fontmanager-redux": "0.4.0",
"glasstron": "sentialx/Glasstron#n-api",
"fontmanager-redux": "1.0.0",
"glasstron": "AryToNeX/Glasstron#dependabot/npm_and_yarn/electron-11.1.0",
"js-yaml": "3.14.0",
"keytar": "^6.0.1",
"keytar": "^7.2.0",
"macos-native-processlist": "^2.0.0",
"mz": "^2.7.0",
"ngx-toastr": "^12.0.1",
"@terminus-term/node-pty": "0.10.0-beta9",
"npm": "6.9.0",
"node-gyp": "^7.1.2",
"npm": "7.0.15",
"path": "0.12.7",
"rxjs": "^6.5.5",
"rxjs-compat": "^6.6.0",
"serialport": "^9.0.4",
"windows-blurbehind": "^1.0.1",
"windows-native-registry": "^3.0.0",
"windows-process-tree": "^0.2.4",
"yargs": "^15.4.1",
"zone.js": "^0.10.3"
"zone.js": "^0.11.3"
},
"optionalDependencies": {
"macos-native-processlist": "^2.0.0",
"serialport": "^9.0.0",
"serialport": "^9.0.4",
"windows-blurbehind": "^1.0.1",
"windows-native-registry": "^3.0.0",
"windows-process-tree": "^0.2.4"
},
"devDependencies": {
"@types/mz": "0.0.32",
"@types/node": "12.7.12",
"node-abi": "^2.18.0"
"@types/node": "14.14.14",
"node-abi": "github:lgeiger/node-abi"
},
"peerDependencies": {
"terminus-core": "*",

View file

@ -12,7 +12,6 @@
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"lib": [
"dom",

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@ platform:
- x64
environment:
nodejs_version: "10"
nodejs_version: "15"
version: "{build}"

78
binding.gyp_hack Normal file
View file

@ -0,0 +1,78 @@
{
'conditions': [
['OS=="win"', {
'targets': [
{
'target_name': 'conpty',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources' : [
'src/win/conpty.cc',
'src/win/path_util.cc'
],
'libraries': [
'shlwapi.lib'
]
},
{
'target_name': 'conpty_console_list',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources' : [
'src/win/conpty_console_list.cc'
]
},
{
'target_name': 'pty',
'include_dirs' : [
'<!(node -e "require(\'nan\')")',
'deps/winpty/src/include',
],
# Disabled due to winpty
'msvs_disabled_warnings': [ 4506, 4530 ],
'dependencies' : [
'deps/winpty/src/winpty.gyp:winpty-agent',
'deps/winpty/src/winpty.gyp:winpty',
],
'sources' : [
'src/win/winpty.cc',
'src/win/path_util.cc'
],
'libraries': [
'shlwapi.lib'
],
}
]
}, { # OS!="win"
'targets': [{
'target_name': 'pty',
'include_dirs' : [
'<!(node -e "require(\'nan\')")'
],
'sources': [
'src/unix/pty.cc'
],
'libraries': [
'-lutil'
],
'conditions': [
# http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html
# One some systems (at least including Cygwin, Interix,
# OSF/1 4 and 5, and Mac OS X) linking with -lutil is not required.
['OS=="mac" or OS=="solaris"', {
'libraries!': [
'-lutil'
]
}],
['OS=="mac"', {
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}
}]
]
}]
}]
]
}

View file

@ -1,35 +1,36 @@
{
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
"@sentry/cli": "^1.52.3",
"@sentry/cli": "^1.61.0",
"@sentry/electron": "^2.0.4",
"@types/electron-config": "^3.2.2",
"@types/electron-debug": "^2.1.0",
"@types/fs-extra": "^8.1.1",
"@types/js-yaml": "^3.12.5",
"@types/node": "12.7.12",
"@types/webpack-env": "^1.15.3",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^3.10.1",
"@types/node": "14.14.14",
"@types/webpack-env": "^1.16.0",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"apply-loader": "2.0.0",
"awesome-typescript-loader": "^5.0.0",
"core-js": "^3.7.0",
"awesome-typescript-loader": "^5.2.1",
"core-js": "^3.8.1",
"cross-env": "7.0.2",
"css-loader": "3.4.2",
"electron": "^8.5.2",
"electron-builder": "22.6.1",
"electron": "^11.1.0",
"electron-builder": "22.10.3",
"electron-download": "^4.1.1",
"electron-installer-snap": "^5.1.0",
"electron-notarize": "^1.0.0",
"electron-rebuild": "^1.11.0",
"eslint": "^7.13.0",
"electron-rebuild": "^2.3.4",
"eslint": "^7.16.0",
"eslint-plugin-import": "^2.22.1",
"file-loader": "^5.1.0",
"graceful-fs": "^4.2.4",
"html-loader": "0.5.5",
"json-loader": "0.5.7",
"node-abi": "^2.19.1",
"node-abi": "lgeiger/node-abi#d7a3f00c93cb16b5f4fbb3ae8c106e798cc52042",
"node-gyp": "^7.1.2",
"node-sass": "^4.14.1",
"node-sass": "^5.0.0",
"npmlog": "4.1.2",
"npx": "^10.2.2",
"pug": "^2.0.4",
@ -38,10 +39,12 @@
"pug-loader": "^2.4.0",
"pug-static-loader": "2.0.0",
"raw-loader": "4.0.1",
"sass-loader": "^8.0.2",
"run-script-os": "^1.1.3",
"sass-loader": "^10.1.0",
"shelljs": "0.8.4",
"source-code-pro": "^2.30.2",
"source-sans-pro": "3.6.0",
"ssh2-streams": "^0.4.10",
"style-loader": "^1.3.0",
"svg-inline-loader": "^0.8.2",
"to-string-loader": "1.1.6",
@ -50,14 +53,14 @@
"typescript": "^3.9.7",
"url-loader": "^3.0.0",
"val-loader": "2.1.1",
"webpack": "^5.4.0",
"webpack-cli": "^3.3.12",
"yaml-loader": "0.6.0",
"ssh2-streams": "^0.4.10",
"winston": "^3.3.3"
"webpack": "^5.11.0",
"webpack-cli": "^4.2.0",
"winston": "^3.3.3",
"winston-transport": "winstonjs/winston-transport",
"yaml-loader": "0.6.0"
},
"resolutions": {
"*/node-abi": "^2.14.0",
"*/node-abi": "lgeiger/node-abi",
"**/graceful-fs": "^4.2.4"
},
"scripts": {
@ -76,6 +79,7 @@
"license": "MIT",
"dependencies": {
"ssh2-streams": "^0.4.10",
"winston": "^3.3.3"
"winston": "^3.3.3",
"yarn": "^1.22.10"
}
}

22
scripts/build-macos-arm64.js Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env node
const builder = require('electron-builder').build
const vars = require('./vars')
const fs = require('fs')
const signHook = require('../build/mac/afterSignHook')
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
builder({
dir: true,
mac: ['pkg', 'zip'],
arm64: true,
config: {
extraMetadata: {
version: vars.version,
},
},
publish: isTag ? 'always' : 'onTag',
}).catch(e => {
console.error(e)
process.exit(1)
})

View file

@ -10,16 +10,18 @@ const npx = `${localBinPath}/npx`;
log.info('deps', 'app')
sh.cd('app')
sh.exec(`${npx} yarn install`)
sh.exec(`${npx} yarn install --force`)
sh.cd('..')
vars.builtinPlugins.forEach(plugin => {
log.info('deps', plugin)
sh.cd(plugin)
sh.exec(`${npx} yarn install`)
sh.exec(`${npx} yarn install --force`)
sh.cd('..')
})
sh.cp('binding.gyp_hack', "app/node_modules/@terminus-term/node-pty/binding.gyp")
if (['darwin', 'linux'].includes(process.platform)) {
sh.cd('node_modules')
for (let x of vars.builtinPlugins) {

View file

@ -1,8 +1,7 @@
#This script creates local release for macos
./scripts/install-deps.js
./scripts/build-native.js
yarn run build
./scripts/prepackage-plugins.js
npm run build
./scripts/build-macos.js
./scripts/build-macos-arm64.js

View file

@ -6,6 +6,9 @@ const fs = require('fs')
const vars = require('./vars')
const log = require('npmlog')
const localBinPath = path.resolve(__dirname, '../node_modules/.bin');
const npx = `${localBinPath}/npx`;
let target = path.resolve(__dirname, '../builtin-plugins')
sh.mkdir('-p', target)
fs.writeFileSync(path.join(target, 'package.json'), '{}')
@ -15,7 +18,10 @@ vars.builtinPlugins.forEach(plugin => {
sh.cp('-r', path.join('..', plugin), '.')
sh.rm('-rf', path.join(plugin, 'node_modules'))
sh.cd(plugin)
sh.exec(`npm install --only=prod`)
//sh.exec(`npm install --only=prod`)
sh.exec(`${npx} yarn install --force`)
log.info('rebuild', 'native')
if (fs.existsSync('node_modules')) {
rebuild(path.resolve('.'), vars.electronVersion, process.arch, [], true)

View file

@ -17,7 +17,7 @@
"author": "Eugene Pankov",
"license": "MIT",
"peerDependencies": {
"@angular/core": "^7",
"@angular/core": "^9.1.9",
"terminus-core": "*",
"terminus-terminal": "*"
}

View file

@ -29,17 +29,19 @@
"mixpanel": "^0.10.2",
"ng2-dnd": "^5.0.2",
"ngx-perfect-scrollbar": "^8.0.0",
"readable-stream": "^2.3.7",
"shell-escape": "^0.2.0",
"uuid": "^8.0.0",
"winston": "^3.2.1"
"winston": "^3.3.3",
"winston-transport": "winstonjs/winston-transport"
},
"peerDependencies": {
"@angular/animations": "^7",
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@angular/platform-browser": "^7",
"@angular/platform-browser-dynamic": "^7",
"rxjs": "^5"
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@angular/platform-browser-dynamic": "^9.1.11",
"rxjs": "^6.6.3"
}
}

View file

@ -92,6 +92,8 @@ $side-tab-width: 200px;
color: #aaa;
border: none;
border-radius: 0;
align-items: center;
&.dropdown-toggle::after {
display: none;

View file

@ -12,7 +12,8 @@ button {
padding: 0;
line-height: 0;
text-align: center;
align-items: center;
&:not(:hover):not(:active) {
background: transparent;
}

View file

@ -7,7 +7,7 @@ app-root {
.btn-tab-bar {
line-height: 29px !important;
height: 27px !important;
align-items: center;
svg {
height: 14px;
}

View file

@ -137,7 +137,7 @@ app-root {
.btn-tab-bar {
background: transparent;
line-height: 42px;
align-items: center;
svg, path {
fill: $black;
fill-opacity: 0.75;

View file

@ -358,6 +358,7 @@ search-panel {
.btn-secondary:not(:disabled):not(.disabled) {
&.active, &:active {
background: #191e23;
align-items: center;
}
}

View file

@ -470,7 +470,15 @@ winston-transport@^4.4.0:
readable-stream "^2.3.7"
triple-beam "^1.2.0"
winston@*, winston@^3.2.1:
winston-transport@winstonjs/winston-transport:
version "4.4.0"
resolved "https://codeload.github.com/winstonjs/winston-transport/tar.gz/6a3bf79175288328d37c6cf4121d6b39eb68f19f"
dependencies:
logform "^2.2.0"
readable-stream "^3.4.0"
triple-beam "^1.2.0"
winston@*, winston@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.3.3.tgz#ae6172042cafb29786afa3d09c8ff833ab7c9170"
integrity sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==

View file

@ -15,20 +15,20 @@
"dist"
],
"author": "Eugene Pankov",
"license": "MIT",
"license": "MIT",
"devDependencies": {
"@types/semver": "^7.1.0",
"axios": "^0.19.0",
"mz": "^2.6.0",
"semver": "^7.1.1"
},
"peerDependencies": {
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@angular/platform-browser": "^7",
"@ng-bootstrap/ng-bootstrap": "^1",
"rxjs": "^5",
"peerDependencies": {
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"rxjs": "^6.5.5",
"terminus-core": "*",
"terminus-settings": "*"
}

View file

@ -55,7 +55,7 @@ export class PluginsSettingsTabComponent {
}
openPluginsFolder (): void {
this.electron.shell.openItem(this.pluginManager.userPluginsPath)
this.electron.shell.openPath(this.pluginManager.userPluginsPath)
}
searchAvailable (query: string) {

View file

@ -15,21 +15,23 @@
"dist"
],
"author": "Eugene Pankov",
"license": "MIT",
"license": "MIT",
"devDependencies": {
"@types/node": "12.7.3",
"@types/node": "14.14.14",
"@types/ssh2": "^0.5.35",
"ansi-colors": "^4.1.1",
"cli-spinner": "^0.2.10",
"electron-rebuild": "^1.10.0",
"terminus-terminal": "^1.0.98-nightly.0"
"electron-rebuild": "^2.3.4"
},
"peerDependencies": {
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@ng-bootstrap/ng-bootstrap": "^1",
"rxjs": "^5",
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@angular/platform-browser-dynamic": "^9.1.11",
"@ng-bootstrap/ng-bootstrap": "^6.2.0",
"rxjs": "^6.6.3",
"terminus-core": "*",
"terminus-settings": "*",
"terminus-terminal": "*"

File diff suppressed because it is too large Load diff

View file

@ -20,12 +20,13 @@
"@types/deep-equal": "1.0.1"
},
"peerDependencies": {
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@angular/platform-browser": "^7",
"@ng-bootstrap/ng-bootstrap": "^1",
"rxjs": "^5",
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"rxjs": "^6.5.5",
"terminus-core": "*"
}
}

View file

@ -21,7 +21,7 @@
"author": "Eugene Pankov",
"license": "MIT",
"devDependencies": {
"@types/node": "12.7.3",
"@types/node": "14.14.14",
"@types/ssh2": "^0.5.35",
"ansi-colors": "^4.1.1",
"cli-spinner": "^0.2.10",
@ -31,15 +31,16 @@
"ssh2-streams": "Eugeny/ssh2-streams#75f6d3425d071ac73a18fd46e2f5e738bfe897c5",
"sshpk": "^1.16.1",
"strip-ansi": "^6.0.0",
"temp": "^0.9.1",
"terminus-terminal": "^1.0.98-nightly.0"
"temp": "^0.9.1"
},
"peerDependencies": {
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@ng-bootstrap/ng-bootstrap": "^1",
"rxjs": "^5",
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"rxjs": "^6.5.5",
"terminus-core": "*",
"terminus-settings": "*",
"terminus-terminal": "*"

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.7.tgz#8ea1e8f8eae2430cf440564b98c6dfce1ec5945d"
integrity sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg==
"@types/node@12.7.3":
version "12.7.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.3.tgz#27b3f40addaf2f580459fdb405222685542f907a"
integrity sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==
"@types/node@14.14.14":
version "14.14.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.14.tgz#f7fd5f3cc8521301119f63910f0fb965c7d761ae"
integrity sha512-UHnOPWVWV1z+VV8k6L1HhG7UbGBgIdghqF3l9Ny9ApPghbjICXkUJSd/b9gOgQfjM1r+37cipdw/HJ3F6ICEnQ==
"@types/ssh2-streams@*":
version "0.1.7"
@ -320,11 +320,6 @@ temp@^0.9.1:
mkdirp "^0.5.1"
rimraf "~2.6.2"
terminus-terminal@^1.0.98-nightly.0:
version "1.0.98-nightly.0"
resolved "https://registry.yarnpkg.com/terminus-terminal/-/terminus-terminal-1.0.98-nightly.0.tgz#10df71b0a81adf76a076fb21a91c859dd2f8bef7"
integrity sha512-JLxkeoQkORcfe6cRW6BJF5ZPSbvKA8IWUAb7fzBONVmNfRKj2Mq/uYPy76UXsdmb9F1n+rYIg+DShNp57asMKA==
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"

View file

@ -36,13 +36,13 @@
"zmodem.js": "^0.1.9"
},
"peerDependencies": {
"@angular/animations": "^7",
"@angular/common": "^7",
"@angular/core": "^7",
"@angular/forms": "^7",
"@angular/platform-browser": "^7",
"@ng-bootstrap/ng-bootstrap": "^1",
"rxjs": "^5",
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.11",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.11",
"@angular/platform-browser": "^9.1.11",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"rxjs": "^6.5.5",
"terminus-core": "*",
"terminus-settings": "*"
}

View file

@ -14,7 +14,7 @@ export class TerminalSettingsTabComponent {
) { }
openWSLVolumeMixer (): void {
this.electron.shell.openItem('sndvol.exe')
this.electron.shell.openPath('sndvol.exe')
this.terminal.openTab({
name: '',
sessionOptions: {

View file

@ -16,7 +16,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
"strictNullChecks": true,
"strictNullChecks": false,
"lib": [
"dom",
"es5",

14790
yarn.lock

File diff suppressed because it is too large Load diff