From b539e8e6413b190feca6908936caa607a385faf5 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 8 Jan 2020 15:19:25 -0600 Subject: [PATCH 01/10] CentOS 8 support --- CHANGELOG.md | 3 +++ create_dist.sh | 2 +- package.json | 2 +- public/detect_linux.sh | 3 +++ releases.json | 7 +++++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49e570f..747e78b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## 1.1.3 +* CentOS 8 support + ## 1.1.2 * Style changes diff --git a/create_dist.sh b/create_dist.sh index aa98e53..98a6b08 100755 --- a/create_dist.sh +++ b/create_dist.sh @@ -19,7 +19,7 @@ if beginsWith darwin "$OSTYPE"; then JQ_EXEC=jq-osx-amd64 SHA256_EXEC="shasum -a 256 -b" else - DISTRO_LIST="arch centos7 debian9 debian10 fedora28 fedora29 fedora30 fedora31 opensuse15 opensuse15.1 solus tumbleweed ubuntu18.04 ubuntu18.10 ubuntu19.04 ubuntu19.10" + DISTRO_LIST="arch centos7 centos8 debian9 debian10 fedora28 fedora29 fedora30 fedora31 opensuse15 opensuse15.1 solus tumbleweed ubuntu18.04 ubuntu18.10 ubuntu19.04 ubuntu19.10" OUT_FILE=repertory-ui_${APP_VER}_linux_x86_64.AppImage BASE64_EXEC="base64 -w0" JQ_EXEC=jq-linux64 diff --git a/package.json b/package.json index e59e0ff..542a303 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "repertory-ui", - "version": "1.1.2", + "version": "1.1.3", "private": true, "author": "scott.e.graves@protonmail.com", "description": "GUI for Repertory - Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions via FUSE on Linux/OS X or via WinFSP on Windows.", diff --git a/public/detect_linux.sh b/public/detect_linux.sh index 51f51f7..095e9ea 100644 --- a/public/detect_linux.sh +++ b/public/detect_linux.sh @@ -13,6 +13,9 @@ if [ -f /etc/centos-release ]; then if [ "$VERSION_ID" = "7" ]; then DISTNAME=centos DISTVER=7 + elif [ "$VERSION_ID" = "8" ]; then + DISTNAME=centos + DISTVER=8 else resetDistVer fi diff --git a/releases.json b/releases.json index d30edbf..be4e6dd 100644 --- a/releases.json +++ b/releases.json @@ -20,6 +20,13 @@ ] } }, + "centos8": { + "1.1.3": { + "sha256": "", + "sig": "", + "urls": [] + } + }, "darwin": { "1.1.2": { "sha256": "0c9c4de2006ecc4ecc6166af979cc5e0b66212472d21c542d4198013e354e275", From d7ba169cc3fc335424f0c5f76e60e97459dc98e9 Mon Sep 17 00:00:00 2001 From: Scott Graves Date: Fri, 10 Jan 2020 03:32:59 +0000 Subject: [PATCH 02/10] README.md edited online with Bitbucket --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 56c8b55..81d41a1 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions vi * Arch Linux * Bodhi 5.0.0 * CentOS 7 + * CentOS 8 * Debian 9 * Debian 10 * Elementary OS 5.0 From 617d7f1c42a00d8bae054666130a250f82fa2795 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 10 Jan 2020 15:19:07 -0600 Subject: [PATCH 03/10] Support remote send and receive timeouts --- CHANGELOG.md | 1 + src/containers/Configuration/Configuration.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 747e78b..7a86c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## 1.1.3 * CentOS 8 support +* Support remote send and receive timeouts ## 1.1.2 * Style changes diff --git a/src/containers/Configuration/Configuration.js b/src/containers/Configuration/Configuration.js index 30b1239..2136f49 100644 --- a/src/containers/Configuration/Configuration.js +++ b/src/containers/Configuration/Configuration.js @@ -235,7 +235,7 @@ class Configuration extends IPCContainer { JSON.parse(itemList.find(s => s.label === 'EnableRemoteMount').value); return (item.label === 'RemoteHostNameOrIp') || (item.label === 'RemoteMaxConnections') ? isRemoteMount : - (item.label === 'RemotePort') || (item.label === 'RemoteToken') ? + (item.label === 'RemoteReceiveTimeoutSeconds') || (item.label === 'RemoteSendTimeoutSeconds') || (item.label === 'RemotePort') || (item.label === 'RemoteToken') ? isRemoteMount || enableRemoteMount : (item.label === 'EnableRemoteMount') ? !isRemoteMount : @@ -342,4 +342,4 @@ const mapDispatchToProps = dispatch => { } }; -export default connect(mapStateToProps, mapDispatchToProps)(Configuration); \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(Configuration); From 4655741fab930c1429f46316eb71bfc534013bb3 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 23 Jan 2020 14:42:59 -0600 Subject: [PATCH 04/10] [Support remote send and receive timeouts] [Support WinFSP mount manager] --- CHANGELOG.md | 1 + README.md | 6 +++--- src/assets/settings.json | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a86c37..c91e0da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.1.3 * CentOS 8 support * Support remote send and receive timeouts +* Support WinFSP mount manager ## 1.1.2 * Style changes diff --git a/README.md b/README.md index 2c53163..5e91f0a 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions vi * ScPrime >=1.4.1.2 ## Downloads -* **Repertory UI v1.1.2 Linux 64-bit** [](https://pixeldrain.com/u/5i1mA1gb) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_linux_x86_64.AppImage) +* **Repertory UI v1.1.3 Linux 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_linux_x86_64.AppImage) * NOTE: Linux distributions require `fuse` and `libfuse` to be installed. -* **Repertory UI v1.1.2 OS X 64-bit** [](https://pixeldrain.com/u/jEWmNDRX) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_mac.dmg) -* **Repertory UI v1.1.2 Windows 64-bit** [](https://pixeldrain.com/u/TkQn25Bm) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_win.exe) +* **Repertory UI v1.1.3 OS X 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_mac.dmg) +* **Repertory UI v1.1.3 Windows 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_win.exe) ## Supported Platforms * OS X 64-bit diff --git a/src/assets/settings.json b/src/assets/settings.json index 66affa1..2bbe313 100644 --- a/src/assets/settings.json +++ b/src/assets/settings.json @@ -12,6 +12,8 @@ "RemoteHostNameOrIp": "Host name or IP of host to connect to for remote mounting.", "RemoteMaxConnections": "Maximum number of TCP connections to use when communicating with remote instances.", "RemotePort": "TCP port used for remote mounting.", + "RemoteReceiveTimeoutSeconds": "Number of seconds to wait for a response before failing.", + "RemoteSendTimeoutSeconds": "Number of seconds to wait for a request to be written before failing.", "RemoteToken": "Encryption token used for remote mounts. This value must be the same on local and remote systems." }, "Settings": { @@ -23,6 +25,7 @@ "EnableChunkDownloaderTimeout": "This setting applies to full allocation downloads. When set to true, downloads will timeout after ChunkDownloaderTimeoutSeconds if the file has no more open handles. If set to false, the entire file will always download.", "EnableDriveEvents": "When set to true, additional logging for FUSE on UNIX or WinFSP on Windows will occur. It's best to leave this value set to 'false' unless troubleshooting an issue as enabling it may have an adverse affect on performance.", "EnableMaxCacheSize": "If set to true, files will begin to be removed from the local cache as soon as MaxCacheSizeBytes and MinimumRedundancy have been met. This does not mean further attempts to write will fail when MaxCacheSizeBytes is reached. Writes will continue as long as there is enough local drive space to accommodate the operation.\n\nIf set to false, files will begin to be removed from the local cache as soon as MinimumRedundancy has been met.\n\nIn both cases, files that do not have any open handles will be chosen by oldest modification date for removal.", + "EnableMountManager": "[EXPERIMENTAL]\n\nEnabling this setting will allow all users and background services to have access to the mounted location. By default, only the user executing the mount has access to the drive.\n\nNOTE:Requires UAC Administrator elevation.", "EventLevel": "Internally, events are fired during certain operations. This setting determines which events should be logged to repertory.log. Valid values are Error, Warn, Normal, Debug, and Verbose.", "EvictionDelaySeconds": "Number of seconds to wait after all file handles are closed before allowing file to be evicted from cache.", "EvictionDelayMinutes": "Number of minutes to wait after all file handles are closed before allowing file to be evicted from cache.", @@ -34,4 +37,4 @@ "ReadAheadCount": "This value specifies the number of read-ahead chunks to use when downloading a file. This is a per-open file setting and will result in the creation of an equal number of threads.", "RingBufferFileSize": "The size of the ring buffer file in MiB. Default is 512. Valid values are: 64, 128, 256, 512, 1024." } -} \ No newline at end of file +} From 6095186ffcaad57b00730add4b9a56ce5563ec1c Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 23 Jan 2020 14:56:54 -0600 Subject: [PATCH 05/10] Additional text --- src/assets/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/settings.json b/src/assets/settings.json index 2bbe313..d889e31 100644 --- a/src/assets/settings.json +++ b/src/assets/settings.json @@ -23,6 +23,7 @@ "ChunkDownloaderTimeoutSeconds": "Files that are not cached locally will download data in ChunkSize chunks when a read or write operation occurs. This timeout value specifies the amount of time chunks should continue downloading after the last file handle has been closed.", "ChunkSize": "This is the minimum data size (converted to KiB - value of 8 means 8KiB) used for downloads. This value cannot be less than 8 and should also be a multiple of 8.", "EnableChunkDownloaderTimeout": "This setting applies to full allocation downloads. When set to true, downloads will timeout after ChunkDownloaderTimeoutSeconds if the file has no more open handles. If set to false, the entire file will always download.", + "EnableCommDurationEvents": "Debug setting. Enable this to log API call durations.", "EnableDriveEvents": "When set to true, additional logging for FUSE on UNIX or WinFSP on Windows will occur. It's best to leave this value set to 'false' unless troubleshooting an issue as enabling it may have an adverse affect on performance.", "EnableMaxCacheSize": "If set to true, files will begin to be removed from the local cache as soon as MaxCacheSizeBytes and MinimumRedundancy have been met. This does not mean further attempts to write will fail when MaxCacheSizeBytes is reached. Writes will continue as long as there is enough local drive space to accommodate the operation.\n\nIf set to false, files will begin to be removed from the local cache as soon as MinimumRedundancy has been met.\n\nIn both cases, files that do not have any open handles will be chosen by oldest modification date for removal.", "EnableMountManager": "[EXPERIMENTAL]\n\nEnabling this setting will allow all users and background services to have access to the mounted location. By default, only the user executing the mount has access to the drive.\n\nNOTE:Requires UAC Administrator elevation.", From c7ca05d43c6aae74774c0ed607a0051d6dfa43af Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 4 Feb 2020 12:59:58 -0600 Subject: [PATCH 06/10] Package upgrades --- package.json | 33 ++++++++++--------- src/redux/actions/common_actions.js | 4 +-- src/redux/actions/download_actions.js | 4 +-- src/redux/actions/install_actions.js | 2 +- src/redux/actions/mount_actions.js | 4 +-- src/redux/actions/release_version_actions.js | 4 +-- src/redux/reducers/common_reducer.js | 4 +-- src/redux/reducers/download_reducer.js | 4 +-- src/redux/reducers/error_reducer.js | 4 +-- src/redux/reducers/install_reducer.js | 4 +-- src/redux/reducers/mount_reducer.js | 4 +-- src/redux/reducers/release_version_reducer.js | 4 +-- src/redux/store/createAppStore.js | 4 +-- 13 files changed, 41 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 542a303..d5c35db 100644 --- a/package.json +++ b/package.json @@ -5,34 +5,37 @@ "author": "scott.e.graves@protonmail.com", "description": "GUI for Repertory - Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions via FUSE on Linux/OS X or via WinFSP on Windows.", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^1.2.25", - "@fortawesome/free-solid-svg-icons": "^5.11.2", - "@fortawesome/react-fontawesome": "^0.1.7", + "@fortawesome/fontawesome-svg-core": "^1.2.26", + "@fortawesome/free-solid-svg-icons": "^5.12.0", + "@fortawesome/react-fontawesome": "^0.1.8", + "@reduxjs/toolkit": "^1.2.3", "auto-launch": "^5.0.5", - "axios": "^0.19.0", + "axios": "^0.19.2", "devtron": "^1.4.0", "electron-debug": "^3.0.1", "font-awesome": "^4.7.0", "node-schedule": "^1.3.2", "randomstring": "^1.1.5", - "react": "^16.11.0", - "react-dom": "^16.11.0", - "react-loader-spinner": "^3.1.4", + "react": "^16.12.0", + "react-dom": "^16.12.0", + "react-loader-spinner": "^3.1.5", "react-redux": "^7.1.3", - "react-scripts": "3.2.0", - "react-tooltip": "^3.11.1", - "redux": "^4.0.4", - "redux-starter-kit": "^1.0.1", + "react-scripts": "3.3.1", + "react-tooltip": "^3.11.4", + "redux": "^4.0.5", "redux-thunk": "^2.3.0", - "unzipper": "^0.10.5", + "unzipper": "^0.10.7", "winreg": "^1.2.4" }, "devDependencies": { - "cross-env": "^6.0.3", - "electron": "^5.0.12", + "cross-env": "^7.0.0", + "electron": "^5.0.13", "electron-builder": "^20.44.4", "extract-text-webpack-plugin": "^3.0.2", - "typescript": "^3.7.2", + "fibers": "^4.0.2", + "node-sass": "^4.13.1", + "sass": "^1.25.0", + "typescript": "^3.7.5", "webpack-browser-plugin": "^1.0.20" }, "scripts": { diff --git a/src/redux/actions/common_actions.js b/src/redux/actions/common_actions.js index f1219b8..91f0f71 100644 --- a/src/redux/actions/common_actions.js +++ b/src/redux/actions/common_actions.js @@ -1,5 +1,5 @@ import * as Constants from '../../constants'; -import {createAction} from 'redux-starter-kit'; +import {createAction} from '@reduxjs/toolkit'; import {getIPCRenderer} from '../../utils'; const ipcRenderer = getIPCRenderer(); @@ -126,4 +126,4 @@ export const shutdownApplication = () => { ipcRenderer.send(Constants.IPC_Shutdown); } }; -}; \ No newline at end of file +}; diff --git a/src/redux/actions/download_actions.js b/src/redux/actions/download_actions.js index 8d35fc8..1cbb3a8 100644 --- a/src/redux/actions/download_actions.js +++ b/src/redux/actions/download_actions.js @@ -1,5 +1,5 @@ import * as Constants from '../../constants'; -import {createAction} from 'redux-starter-kit'; +import {createAction} from '@reduxjs/toolkit'; import {getIPCRenderer} from '../../utils'; import {notifyError} from './error_actions'; import { @@ -96,4 +96,4 @@ export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatfor }; downloadAtIndex(0); }; -}; \ No newline at end of file +}; diff --git a/src/redux/actions/install_actions.js b/src/redux/actions/install_actions.js index ae44dec..b8eaf77 100644 --- a/src/redux/actions/install_actions.js +++ b/src/redux/actions/install_actions.js @@ -1,5 +1,5 @@ import * as Constants from '../../constants'; -import {createAction} from 'redux-starter-kit'; +import {createAction} from '@reduxjs/toolkit'; import { getIPCRenderer, getSelectedVersionFromState diff --git a/src/redux/actions/mount_actions.js b/src/redux/actions/mount_actions.js index e618779..bf7d422 100644 --- a/src/redux/actions/mount_actions.js +++ b/src/redux/actions/mount_actions.js @@ -1,5 +1,5 @@ import * as Constants from '../../constants'; -import {createAction} from 'redux-starter-kit'; +import {createAction} from '@reduxjs/toolkit'; import {getIPCRenderer} from '../../utils'; import { confirmYesNo, @@ -156,4 +156,4 @@ export const unmountAll = completedCallback => { ipcRenderer.once(Constants.IPC_Unmount_All_Drives_Reply, unmountedCallback); ipcRenderer.send(Constants.IPC_Unmount_All_Drives); } -}; \ No newline at end of file +}; diff --git a/src/redux/actions/release_version_actions.js b/src/redux/actions/release_version_actions.js index 672f8a6..89e168e 100644 --- a/src/redux/actions/release_version_actions.js +++ b/src/redux/actions/release_version_actions.js @@ -1,6 +1,6 @@ import axios from 'axios'; import * as Constants from '../../constants'; -import {createAction} from 'redux-starter-kit'; +import {createAction} from '@reduxjs/toolkit'; import {notifyError} from './error_actions'; import { saveState, @@ -181,4 +181,4 @@ export const setUIUpgradeData = (upgradeData, version) => { version: version, } } -}; \ No newline at end of file +}; diff --git a/src/redux/reducers/common_reducer.js b/src/redux/reducers/common_reducer.js index 173db4b..f431d59 100644 --- a/src/redux/reducers/common_reducer.js +++ b/src/redux/reducers/common_reducer.js @@ -1,4 +1,4 @@ -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import { DISPLAY_CONFIRM_YES_NO, notifyRebootRequired, @@ -58,4 +58,4 @@ export const createCommonReducer = (platformInfo, version) => { }; }, }); -}; \ No newline at end of file +}; diff --git a/src/redux/reducers/download_reducer.js b/src/redux/reducers/download_reducer.js index 29c41a6..4177ff5 100644 --- a/src/redux/reducers/download_reducer.js +++ b/src/redux/reducers/download_reducer.js @@ -1,4 +1,4 @@ -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import { setAllowDownload, SET_DOWNLOAD_BEGIN, @@ -50,4 +50,4 @@ export const downloadReducer = createReducer({ DownloadProgress: action.payload, } } -}); \ No newline at end of file +}); diff --git a/src/redux/reducers/error_reducer.js b/src/redux/reducers/error_reducer.js index 0bb20d2..e780dee 100644 --- a/src/redux/reducers/error_reducer.js +++ b/src/redux/reducers/error_reducer.js @@ -1,4 +1,4 @@ -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import { CLEAR_ERROR, CLEAR_INFO, @@ -49,4 +49,4 @@ export const errorReducer = createReducer({ InfoStack: infoStack, } } -}); \ No newline at end of file +}); diff --git a/src/redux/reducers/install_reducer.js b/src/redux/reducers/install_reducer.js index 78c7b95..cdcca1a 100644 --- a/src/redux/reducers/install_reducer.js +++ b/src/redux/reducers/install_reducer.js @@ -1,4 +1,4 @@ -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import { setDismissDependencies, setInstallActive, @@ -49,4 +49,4 @@ export const installReducer = createReducer({ MissingDependencies: action.payload, } } -}); \ No newline at end of file +}); diff --git a/src/redux/reducers/mount_reducer.js b/src/redux/reducers/mount_reducer.js index 4499e11..10bb0a1 100644 --- a/src/redux/reducers/mount_reducer.js +++ b/src/redux/reducers/mount_reducer.js @@ -1,5 +1,5 @@ import * as Constants from '../../constants'; -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import { addRemoteMount2, DISPLAY_CONFIGURATION, @@ -191,4 +191,4 @@ export const createMountReducer = state => { }; } }); -}; \ No newline at end of file +}; diff --git a/src/redux/reducers/release_version_reducer.js b/src/redux/reducers/release_version_reducer.js index 1214b42..56278ac 100644 --- a/src/redux/reducers/release_version_reducer.js +++ b/src/redux/reducers/release_version_reducer.js @@ -1,4 +1,4 @@ -import {createReducer} from 'redux-starter-kit'; +import {createReducer} from '@reduxjs/toolkit'; import * as Actions from '../actions/release_version_actions'; import * as Constants from '../../constants'; @@ -83,4 +83,4 @@ export const releaseVersionReducer = createReducer({ UpgradeDismissed: false, }; } -}); \ No newline at end of file +}); diff --git a/src/redux/store/createAppStore.js b/src/redux/store/createAppStore.js index bbb84de..24fee23 100644 --- a/src/redux/store/createAppStore.js +++ b/src/redux/store/createAppStore.js @@ -1,4 +1,4 @@ -import {configureStore, getDefaultMiddleware} from 'redux-starter-kit'; +import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit'; import {createCommonReducer} from '../reducers/common_reducer'; import {downloadReducer} from '../reducers/download_reducer'; import {errorReducer} from '../reducers/error_reducer'; @@ -23,4 +23,4 @@ export default function createAppStore(platformInfo, version, state) { middleware, devTools: process.env.NODE_ENV !== 'production' }); -} \ No newline at end of file +} From bd17c1429d73836cd466496f513048e1aa2c2f06 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 11 Feb 2020 17:19:30 -0600 Subject: [PATCH 07/10] Fix `spawn()` failure on Windows when paths contain spaces --- CHANGELOG.md | 1 + package.json | 11 ++++--- src/helpers.js | 82 ++++++++++++++++++++++++++++++++------------------ 3 files changed, 59 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c91e0da..e6ff94f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * CentOS 8 support * Support remote send and receive timeouts * Support WinFSP mount manager +* Fix `spawn()` failure on Windows when paths contain spaces ## 1.1.2 * Style changes diff --git a/package.json b/package.json index d5c35db..d21a639 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,15 @@ "author": "scott.e.graves@protonmail.com", "description": "GUI for Repertory - Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions via FUSE on Linux/OS X or via WinFSP on Windows.", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^1.2.26", - "@fortawesome/free-solid-svg-icons": "^5.12.0", + "@fortawesome/fontawesome-svg-core": "^1.2.27", + "@fortawesome/free-solid-svg-icons": "^5.12.1", "@fortawesome/react-fontawesome": "^0.1.8", - "@reduxjs/toolkit": "^1.2.3", + "@reduxjs/toolkit": "^1.2.4", "auto-launch": "^5.0.5", "axios": "^0.19.2", "devtron": "^1.4.0", "electron-debug": "^3.0.1", + "electron-log": "^4.0.6", "font-awesome": "^4.7.0", "node-schedule": "^1.3.2", "randomstring": "^1.1.5", @@ -21,10 +22,10 @@ "react-loader-spinner": "^3.1.5", "react-redux": "^7.1.3", "react-scripts": "3.3.1", - "react-tooltip": "^3.11.4", + "react-tooltip": "^4.0.3", "redux": "^4.0.5", "redux-thunk": "^2.3.0", - "unzipper": "^0.10.7", + "unzipper": "^0.10.8", "winreg": "^1.2.4" }, "devDependencies": { diff --git a/src/helpers.js b/src/helpers.js index 697993a..6bc2392 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -8,12 +8,15 @@ const spawn = require('child_process').spawn; const Constants = require('./constants'); const RandomString = require('randomstring'); -const _executeProcess = (command, args=[]) => { +const _executeProcess = (command, working, args=[]) => { return new Promise((resolve, reject) => { - const processOptions = { + let processOptions = { detached: true, shell: false, }; + if (working) { + processOptions.cwd = working; + } const process = new spawn(command, args, processOptions); const pid = process.pid; @@ -30,12 +33,16 @@ const _executeProcess = (command, args=[]) => { }); }; -const _execProcessGetOutput = (cmd, args) => { +const _execProcessGetOutput = (cmd, working, args) => { return new Promise((resolve, reject) => { - const proc = spawn(cmd, args, { + let processOptions = { env: process.env, stdio: ['ignore', 'pipe', 'pipe'] - }); + }; + if (working) { + processOptions.cwd = working; + } + const proc = spawn(cmd, args, processOptions); let output; proc.stdout.on('data', data => { @@ -74,7 +81,10 @@ const _getDefaultRepertoryArgs = (provider, remote) => { }; const _getRepertoryExec = version => { - return path.join(_getDataDirectory(), version, (os.platform() === 'win32') ? 'repertory.exe' : 'repertory'); + return { + cmd: (os.platform() === 'win32') ? 'repertory.exe' : 'repertory', + working: path.join(_getDataDirectory(), version), + }; }; const _resolvePath = str => { @@ -97,17 +107,17 @@ const _tryParse = (j, def) => { module.exports.checkDaemonVersion = (version, provider) => { return new Promise((resolve, reject) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: false, windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, false); args.push('-cv'); - - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); process.on('error', err => { reject(err); @@ -159,17 +169,18 @@ module.exports.detectRepertoryMounts = (version, providerList) => { resolve(mountState); } else { const provider = providerList[index]; + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: false, windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, !Constants.PROVIDER_LIST.includes(provider)); args.push('-status'); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); let result = ''; process.on('error', (err) => { @@ -277,10 +288,15 @@ module.exports.executeAndWait = (command, ignoreResult) => { module.exports.executeAsync = (command, args=[]) => { return new Promise((resolve, reject) => { const launchProcess = (count, timeout) => { - const processOptions = { + const working = path.dirname(command); + command = path.basename(command); + let processOptions = { detached: true, shell: false, }; + if (working) { + processOptions.cwd = working; + } const process = new spawn(command, args, processOptions); const pid = process.pid; @@ -345,13 +361,14 @@ module.exports.executeScript = script => { module.exports.executeMount = (version, provider, remote, location, noConsoleSupported, exitCallback) => { return new Promise((resolve) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: false, shell: os.platform() !== 'darwin', stdio: 'ignore', }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); if ((os.platform() === 'linux') || (os.platform() === 'darwin')) { @@ -366,7 +383,7 @@ module.exports.executeMount = (version, provider, remote, location, noConsoleSup } args.push(location); - let process = new spawn(command, args, processOptions); + let process = new spawn(repertoryExec.cmd, args, processOptions); const pid = process.pid; const timeout = setTimeout(() => { @@ -387,17 +404,18 @@ module.exports.executeMount = (version, provider, remote, location, noConsoleSup module.exports.getConfig = (version, provider, remote) => { return new Promise((resolve, reject) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: false, windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); args.push('-dc'); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); let result = ''; process.on('error', (err) => { @@ -430,17 +448,18 @@ module.exports.getConfig = (version, provider, remote) => { module.exports.getConfigTemplate = (version, provider, remote) => { return new Promise((resolve, reject) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: false, windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); args.push('-gt'); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); let result = ''; process.on('error', (err) => { @@ -579,7 +598,7 @@ module.exports.performWindowsUninstall = names => { } else { const cmd = path.join(process.env.windir, 'system32', 'reg.exe'); const args = ["QUERY", "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"]; - _execProcessGetOutput(cmd, args) + _execProcessGetOutput(cmd, null, args) .then(lines => { const parseLine = index => { if (index < lines.length) { @@ -591,13 +610,13 @@ module.exports.performWindowsUninstall = names => { args2.push('DisplayName'); args2.push('/t'); args2.push('REG_SZ'); - _execProcessGetOutput(cmd, args2) + _execProcessGetOutput(cmd, null, args2) .then(lines => { const value = lines[2].trim().substr(args2[3].length).trim().substr(6).trim(); if (names.includes(value)) { const items = line.split('\\'); const productCode = items[items.length - 1]; - _executeProcess('msiexec.exe', ['/x', productCode, '/norestart']) + _executeProcess('msiexec.exe', null,['/x', productCode, '/norestart']) .then(code => { if ((code === 0) || (code === 3010) || (code === 1641)) { resolve(true); @@ -651,19 +670,20 @@ module.exports.resolvePath = _resolvePath; module.exports.setConfigValue = (name, value, provider, remote, version) => { return new Promise((resolve, reject) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: false, windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); args.push('-set'); args.push(name); args.push(value); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); process.on('error', (err) => { reject(err); @@ -679,17 +699,18 @@ module.exports.setConfigValue = (name, value, provider, remote, version) => { module.exports.stopMountProcess = (version, provider, remote) => { return new Promise((resolve, reject) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: os.platform() === 'darwin', shell: os.platform() !== 'darwin', windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); args.push('-unmount'); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); const pid = process.pid; process.on('error', (err) => { reject(err); @@ -708,24 +729,25 @@ module.exports.stopMountProcess = (version, provider, remote) => { }; module.exports.stopMountProcessSync = (version, provider, remote) => { + const repertoryExec = _getRepertoryExec(version); const processOptions = { + cwd: repertoryExec.working, detached: true, shell: os.platform() !== 'darwin', windowsHide: true, }; - const command = _getRepertoryExec(version); const args = _getDefaultRepertoryArgs(provider, remote); args.push('-unmount'); - const process = new spawn(command, args, processOptions); + const process = new spawn(repertoryExec.cmd, args, processOptions); process.unref(); }; module.exports.testRepertoryBinary = version => { return new Promise((resolve, reject) => { - const command = _getRepertoryExec(version); - _executeProcess(command, ['-dc']) + const repertoryExec = _getRepertoryExec(version); + _executeProcess(repertoryExec.cmd, repertoryExec.working, ['-dc']) .then(code => { if (code === 0) { resolve(); @@ -809,4 +831,4 @@ module.exports.verifySignature = (file, signatureFile, publicKeyFile) => { reject(Error('Platform not supported: ' + os.platform())) } }); -}; \ No newline at end of file +}; From e9a5db5aa38e9ea92a7ef17f37f5244834e5da83 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 11 Feb 2020 17:21:58 -0600 Subject: [PATCH 08/10] Prepare release --- README.md | 4 ++-- releases.json | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5e91f0a..845ad54 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions vi * ScPrime >=1.4.1.2 ## Downloads -* **Repertory UI v1.1.3 Linux 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_linux_x86_64.AppImage) +* **Repertory UI v1.1.2 Linux 64-bit** [](https://pixeldrain.com/u/5i1mA1gb) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_linux_x86_64.AppImage) * NOTE: Linux distributions require `fuse` and `libfuse` to be installed. -* **Repertory UI v1.1.3 OS X 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_mac.dmg) +* **Repertory UI v1.1.2 OS X 64-bit** [](https://pixeldrain.com/u/jEWmNDRX) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_mac.dmg) * **Repertory UI v1.1.3 Windows 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_win.exe) ## Supported Platforms diff --git a/releases.json b/releases.json index be4e6dd..eb159dd 100644 --- a/releases.json +++ b/releases.json @@ -178,13 +178,10 @@ } }, "win32": { - "1.1.2": { - "sha256": "2534a2aa350d4ed1786c4b1cd298ccc987fae226850a1a8bd6d54a8fac39295c", - "sig": "Azsov3SYmN/+I3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b2gNWxo60w9O8C4+GUJrexisjQCZFzL7d/PbKCvHZp1MpliNEEIV43rniY7KUcXUmvLnMrKywj1aYVTRpLDJrtjGEGZ7OeVrxKPR/wPIpV9DD05xyOpYNyamIs5uJyBoBESXUGM+6kWhc5ZO+EJvueVU7OvuqQG8l5YQAbZvLI03jgJLTCyWxvu0zdpsSUtH560zXumuVlbCqJj2XWizP+aCQbqSnvtv1hFxJYv7a9yIgvLc=", - "urls": [ - "https://pixeldrain.com/api/file/TkQn25Bm", - "https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_win.exe" - ] + "1.1.3": { + "sha256": "", + "sig": "", + "urls": [] } } }, @@ -247,7 +244,7 @@ "unavailable" ], "win32": [ - "1.1.2" + "1.1.3" ] } } From d7807ace38138aaa49b7be0f0d564b30ac14b583 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 11 Feb 2020 17:31:54 -0600 Subject: [PATCH 09/10] Fix command / working directory extraction --- src/helpers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index 6bc2392..d0a5ae0 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -288,8 +288,8 @@ module.exports.executeAndWait = (command, ignoreResult) => { module.exports.executeAsync = (command, args=[]) => { return new Promise((resolve, reject) => { const launchProcess = (count, timeout) => { - const working = path.dirname(command); - command = path.basename(command); + const cmd = path.basename(command); + const working = cmd.length === command.length ? null : command.substr(0, command.length - cmd.length); let processOptions = { detached: true, shell: false, @@ -298,10 +298,10 @@ module.exports.executeAsync = (command, args=[]) => { processOptions.cwd = working; } - const process = new spawn(command, args, processOptions); + const process = new spawn(cmd, args, processOptions); const pid = process.pid; - process.on('error', (err) => { + process.on('error', err => { if (++count === 5) { reject(err, pid); } else { From 7e99b6464084cc4043bade2d1f0adf6cd277353d Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 11 Feb 2020 17:45:11 -0600 Subject: [PATCH 10/10] Windows release --- README.md | 2 +- releases.json | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 845ad54..590091d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Repertory allows you to mount Sia and/or ScPrime blockchain storage solutions vi * **Repertory UI v1.1.2 Linux 64-bit** [](https://pixeldrain.com/u/5i1mA1gb) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_linux_x86_64.AppImage) * NOTE: Linux distributions require `fuse` and `libfuse` to be installed. * **Repertory UI v1.1.2 OS X 64-bit** [](https://pixeldrain.com/u/jEWmNDRX) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.2_mac.dmg) -* **Repertory UI v1.1.3 Windows 64-bit** []() [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_win.exe) +* **Repertory UI v1.1.3 Windows 64-bit** [](https://pixeldrain.com/u/xyfCGfcM) [](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_win.exe) ## Supported Platforms * OS X 64-bit diff --git a/releases.json b/releases.json index eb159dd..c15f15e 100644 --- a/releases.json +++ b/releases.json @@ -178,11 +178,12 @@ } }, "win32": { - "1.1.3": { - "sha256": "", - "sig": "", - "urls": [] - } + "sha256": "7fd80d416da1b8ba1fdf29dd317d2939a08ff94b6555f34c0bbbccc0c0bf5c69", + "sig": "A82EF0Ejt98Dwwpp5S32LNIRE6rycHgpwrdqPQae/LtpO7fyuD0RR0YZQkUDGbSbrCgrO/CleI4STjBx48aIv0UKGSyZtO0bfAuMc2gj0zWTBPHRI2mtZGo+tZSrg9lmIJQ8X0xeSH/18cuwOGHmd031+eOKAJ920kz4gN0TYpr77nnJNVRW4+X2T5BNtDETntuIwH5bt8cZfSRB9pHHpOOMdIuJOAMIttwIY6G8Bz1YteyD1U7KU0GdGcMZHldO1v3b55vw2HAWElOJ1d9XK3gVK8jAQerFsuBx6hfzYxqtKpO1u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"https://pixeldrain.com/api/file/xyfCGfcM", + "https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.1.3_win.exe" + ] } }, "Versions": {