electerm 1.37.106 → 1.37.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,6 +48,7 @@ Online demo: [https://electerm-demo.html5beta.com](https://electerm-demo.html5be
48
48
 
49
49
  ## Download
50
50
 
51
+ - [Homepage](https://electerm.html5beta.com)
51
52
  - [sourceforge](https://sourceforge.net/projects/electerm.mirror/files/)
52
53
  - [github releases](https://github.com/electerm/electerm/releases)
53
54
 
@@ -166,8 +167,12 @@ npm run test
166
167
  # Build linux only with -l
167
168
  npm i
168
169
  npm run prepare-build
169
- npm run release -l
170
+ ./node_modules/.bin/electron-builder --linux tar.gz
171
+ # or replace tar.gz to rpm/deb/AppImage
170
172
  # check dist/ folder
173
+
174
+ # build for linux arm/
175
+ ./node_modules/.bin/electron-builder --linux --arm64
171
176
  ```
172
177
 
173
178
  ## Use
package/npm/install.js CHANGED
@@ -7,8 +7,13 @@ const { resolve } = require('path')
7
7
  const { exec, rm, mv } = require('shelljs')
8
8
  const rp = require('phin').promisified
9
9
  const download = require('download')
10
- const isWin = os.platform() === 'win32'
11
- const isMac = os.platform() === 'darwin'
10
+ const plat = os.platform()
11
+ const isWin = plat === 'win32'
12
+ const isMac = plat === 'darwin'
13
+ const isLinux = plat === 'linux'
14
+ const arch = os.arch()
15
+ const isArm = arch === 'arm'
16
+ const isArm64 = arch === 'arm64'
12
17
  const { homepage } = require('../package.json')
13
18
  const releaseInfoUrl = `${homepage}/data/electerm-github-release.json?_=${+new Date()}`
14
19
  const versionUrl = `${homepage}/version.html?_=${+new Date()}`
@@ -42,12 +47,12 @@ function getReleaseInfo (filter) {
42
47
  })
43
48
  }
44
49
 
45
- async function runLinux () {
50
+ async function runLinux (name, nameWithExt) {
46
51
  const ver = await getVer()
47
- const target = resolve(__dirname, `../electerm-${ver.replace('v', '')}-linux-x64`)
52
+ const target = resolve(__dirname, `../electerm-${ver.replace('v', '')}-${name}`)
48
53
  const targetNew = resolve(__dirname, '../electerm')
49
54
  exec(`rm -rf ${target} ${targetNew}`)
50
- const releaseInfo = await getReleaseInfo(r => /linux-x64\.tar\.gz/.test(r.name))
55
+ const releaseInfo = await getReleaseInfo(r => r.name.includes(nameWithExt))
51
56
  await down(releaseInfo.browser_download_url)
52
57
  // await down('http://192.168.0.67:7500/electerm-0.16.1.tar.gz')
53
58
  exec(`mv ${target} ${targetNew}`)
@@ -81,6 +86,10 @@ if (isWin) {
81
86
  runWin()
82
87
  } else if (isMac) {
83
88
  runMac()
89
+ } else if (isLinux && isArm) {
90
+ runLinux('linux-armv7l', 'linux-armv7l.tar.gz')
91
+ } else if (isLinux && isArm64) {
92
+ runLinux('linux-arm64', 'linux-arm64.tar.gz')
84
93
  } else {
85
- runLinux()
94
+ throw new Error(`platform: ${plat}, arch: ${arch} not supported`)
86
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electerm",
3
- "version": "1.37.106",
3
+ "version": "1.37.121",
4
4
  "description": "Terminal/ssh/telnet/serialport/sftp client(linux, mac, win)",
5
5
  "main": "app.js",
6
6
  "bin": "npm/electerm",
@@ -17,8 +17,6 @@
17
17
  "postpublish": "node build/bin/postpublish",
18
18
  "prepare-file": "node build/bin/prepare",
19
19
  "prepare-test": "PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -E playwright@1.28.1 --no-save && npm i -E @playwright/test@1.28.1 --no-save",
20
- "output": "./node_modules/.bin/electron-builder",
21
- "release": "npm run pre-test && npm run output",
22
20
  "postinstall": "node build/bin/post-install",
23
21
  "lint": "./node_modules/.bin/standard --verbose",
24
22
  "fix": "./node_modules/.bin/standard --fix",
@@ -57,7 +55,7 @@
57
55
  "devDependencies": {
58
56
  "@ant-design/icons": "5.2.5",
59
57
  "@electerm/electerm-resource": "1.3.7",
60
- "@electron/rebuild": "^3.3.0",
58
+ "@electron/rebuild": "^3.4.1",
61
59
  "@types/node": "20.5.7",
62
60
  "@vitejs/plugin-react": "4.2.1",
63
61
  "antd": "5.12.2",
@@ -66,7 +64,7 @@
66
64
  "cross-env": "7.0.3",
67
65
  "dotenv": "16.3.1",
68
66
  "electron": "26.2.4",
69
- "electron-builder": "24.6.4",
67
+ "electron-builder": "24.9.1",
70
68
  "eventemitter3": "5.0.1",
71
69
  "filesize": "10.0.7",
72
70
  "filesize-parser": "1.5.0",