Commit graph

94 commits

Author SHA1 Message Date
Labhansh Agrawal
2b644e1fbb strongly typed rpc 2023-06-25 19:29:00 +05:30
Labhansh Agrawal
e31d72cc31 cleanup and type fixes 2023-06-25 18:17:01 +05:30
Ryan Cavanaugh
8502233c74 Make prettier happy 2022-08-12 02:04:29 +05:30
Ryan Cavanaugh
af4b21cd0e Add missing constraints 2022-08-12 02:04:29 +05:30
Labhansh Agrawal
4c90d7555c Update @electron/remote usage for electron v14 2021-11-23 13:38:12 +05:30
Labhansh Agrawal
832b51e1f3 Use @electron/remote module 2021-11-22 23:22:35 +05:30
Labhansh Agrawal
5ec787806f Redirect exec calls from renderer to main process 2021-08-01 15:31:08 +05:30
Labhansh Agrawal
aa9a50e8f9 Update state and reducer typings 2021-05-10 14:44:11 +05:30
Labhansh Agrawal
e266dd00f2 Fix @typescript-eslint/no-unsafe-return errors 2021-04-07 21:50:32 +05:30
Labhansh Agrawal
c347ce8483 Fix @typescript-eslint/no-unsafe-call errors 2021-04-07 21:50:32 +05:30
Labhansh Agrawal
ae70054e59 Fix @typescript-eslint/no-unnecessary-type-assertion errors 2021-04-07 21:50:32 +05:30
Benjamin Staneck
5692d32f2a
Update eslint and a few ZEIT references to Vercel 2020-07-13 15:05:34 +02:00
Labhansh Agrawal
d0e954def5 typing improvements 2020-06-19 22:12:42 +02:00
Labhansh Agrawal
a86c9c215e Fix ts error 2020-05-29 10:59:42 +02:00
Labhansh Agrawal
6debd1e7f2 add config types 2020-04-27 22:53:49 +02:00
Labhansh Agrawal
41b1ac1852 fix prettier errors 2020-03-25 17:12:51 +01:00
Labhansh Agrawal
78ec88d1e8 port remaining js components to ts 2020-03-18 20:21:30 +01:00
Labhansh Agrawal
57fd125b5c port term-group component to ts 2020-03-16 16:54:17 +01:00
Labhansh Agrawal
5e9fbbb620 typings improvements 2020-03-07 16:42:38 +01:00
Labhansh Agrawal
039b90aa65 Remove unnecessary eslint-disable directives 2020-03-03 00:24:12 +01:00
Labhansh Agrawal
1b70f9e727 add Hyper Dispatch type 2020-01-02 21:11:35 +01:00
Labhansh Agrawal
f40496f127 remove unused code (#4117) 2019-12-28 15:10:33 -05:00
Labhansh Agrawal
58804a2d5b port es5 code to es6 2019-11-29 22:09:10 +01:00
Labhansh Agrawal
4e0fc48ec6 convert manual bind to arrow 2019-11-27 13:49:51 +01:00
Labhansh Agrawal
a1eb84d8a7 port js files in lib and lib/containers to ts (#3957)
* rename files in lib and lib/containers to ts

* add types

* fix ts errors
2019-11-11 16:21:42 +01:00
Benjamin Staneck
03ff483bea add TODO comments for the new Electron async APIs that replace the remote module 2019-10-25 15:34:56 +02:00
Labhansh Agrawal
537c746c75 porting files in lib/ actions, reducers and utils/plugins to ts (#3887)
* add type definitions

* rename files in lib/actions

* rename files from lib/reducers to ts

* renamed plugins.js to ts

* Add hyper types

* Fix ts errors in lib/reducers

* Fix ts errors in lib/actions

* Fix ts errors in plugins.ts
2019-10-19 18:59:56 +02:00
Labhansh Agrawal
d2a318d48b Fix ts errors in lib/utils 2019-10-13 03:39:33 +02:00
Labhansh Agrawal
5af8fa021f rename files from lib/utils to ts 2019-10-13 03:39:33 +02:00
Donald Green
f07963f930 Bug fixes for bell configuration (#3850)
* 1. Restored the ability to turn the "bell" sound on and off using the "bell" config parameter.
2. Restored the ability to change the bell sound by providing a URL. These changes allow for a web url or local absolute file path to an audio file.

The goal with these changes was to fix the issue causing the bell to never sound due to a difference in the underlying terminal emulators configurations from the previous one. While in the area, also decided to make sure that the sound can be changed by supplying a web url to an audio file or an absolute path to an audio file within the local machine

* Code style changes

* Code style changes

* 1. More code style changes

* 1. Spacing changes to try and abide by the linter

* 1. Applied all suggested changes by eslint

* 1. Removed functionality to specify a remote url to set a sound file for the bell sound. The amount of effort for handling when there is no internet connection, queuing and so forth wasn't worth keeping the feature. It is likely that the url could be used to download the file in which the user would be able to specify the file path tho this download file.
2. Created a new property that gets passed down from the terms container all the way to the individual term. We want to be able to evaluate if the bellSoundURL has changed to determine if we really need to read the sound file.
3. Moved logic to read the audio file into the main process. Setup a new action in the 'actions/ui' that will update the bell sound when it is finished and ready. This should prevent blocking the terminal from loading and thus increasing loading times.

* 1. Modified the file reading method to be more generic to increase reusability.
2. Updated the "arrBuf2Base64" method to utilize the node Buffer class which helped to reduce some complexity and seems to run more efficiently.
3. Removed the CONFIG_ASYNC action and reducer in favor of reusing CONFIG_RELOAD when the process is finished reading the file for the bell sound. In order to achieve this, we had to merge the config from "config.getConfig()" method with the "bellSound" property before dispatching to "reloadConfig".

* 1. Removed reference to now removed method

* 1. Removed the arrBuf2Base64 as it seemed unnecessary now that the function would be reduced to a single line. Moved the one-liner into file.js. Removed references to arrBuf2Base64 method.
2. Refactored the logic that handles reloading the config when it has been updated to fix an issue that would set the bell sound back to the default sound when the config is saved without changing the value of "bellSoundURL". Setup now to either read file and reload the config, or reuse the "bellSound" value saved in state and reload the config. This removes an inefficiency with the reloadConfig being dispatched twice when "bellSoundURL" has changed as well.

* 1. Removed a file that contained a single function, referenced in only one place that is performing a fairly simple task.
2. Updated the "getBase64FileData" method to use "Buffer.from()" instead of "Buffer()" due to messages stating that "Buffer()" is deprecated due to security and usability issues.

* Adjustments and regression issues fixed

1. Updated the default config file to better explain the supported options for the "bell" config property.
2. Rearranged the bellSoundURL default property to make it easier to find should one decide to change the bell sound.
3. Typos fixed in comments.
4. Update fetchFileData to utilize the configData provided as function argument. There appeared to be no reason to reference different sources of config data within the same method.

* 1. Removed the "BELL_STYLE" constant since it was only being used in one place.
2. Updated comment block to accurately reflect the current logic and made the comment much more concise.

* 1. Add null safety check on `configInfo.bell` if the config file does not contain this property.
2. Default bellSound to null if the file specified by the filepath in `configInfo.bellSoundUrl` failed to be read. This helps prevent a repeated error being thrown by the xterm instance.
3. Updated `term.js` to use componentDidUpdate in place of the UNSAFE lifcycle method `componentWillReceiveProps`. I found that this unsafe lifecycle was never being fired, which lead to the terminal never responding to configuration changes. Without this change, the custom bell sound was never being loaded into the xterm instance.
2019-10-08 17:13:35 +02:00
Benjamin Staneck
850c66d1b6 run linter 2019-10-03 04:04:43 +02:00
Labhansh Agrawal
b52d8152bf Upgrade eslint to v6 and add TypeScript linting (#3843)
* Upgrade eslint to v6 and add TypeScript linting

* Fix pr checks


Co-authored-by: Benjamin Staneck <Stanzilla@users.noreply.github.com>
2019-10-03 02:56:50 +02:00
Donald Green
5d7142c2df Return of the Bell (#2938)
* 1. Restored the ability to turn the "bell" sound on and off using the "bell" config parameter.
2. Restored the ability to change the bell sound by providing a URL. These changes allow for a web url or local absolute file path to an audio file.

The goal with these changes was to fix the issue causing the bell to never sound due to a difference in the underlying terminal emulators configurations from the previous one. While in the area, also decided to make sure that the sound can be changed by supplying a web url to an audio file or an absolute path to an audio file within the local machine

* Code style changes

* Code style changes

* 1. More code style changes

* 1. Spacing changes to try and abide by the linter

* 1. Applied all suggested changes by eslint

* 1. Removed functionality to specify a remote url to set a sound file for the bell sound. The amount of effort for handling when there is no internet connection, queuing and so forth wasn't worth keeping the feature. It is likely that the url could be used to download the file in which the user would be able to specify the file path tho this download file.
2. Created a new property that gets passed down from the terms container all the way to the individual term. We want to be able to evaluate if the bellSoundURL has changed to determine if we really need to read the sound file.
3. Moved logic to read the audio file into the main process. Setup a new action in the 'actions/ui' that will update the bell sound when it is finished and ready. This should prevent blocking the terminal from loading and thus increasing loading times.

* 1. Modified the file reading method to be more generic to increase reusability.
2. Updated the "arrBuf2Base64" method to utilize the node Buffer class which helped to reduce some complexity and seems to run more efficiently.
3. Removed the CONFIG_ASYNC action and reducer in favor of reusing CONFIG_RELOAD when the process is finished reading the file for the bell sound. In order to achieve this, we had to merge the config from "config.getConfig()" method with the "bellSound" property before dispatching to "reloadConfig".

* 1. Removed reference to now removed method

* 1. Removed the arrBuf2Base64 as it seemed unnecessary now that the function would be reduced to a single line. Moved the one-liner into file.js. Removed references to arrBuf2Base64 method.
2. Refactored the logic that handles reloading the config when it has been updated to fix an issue that would set the bell sound back to the default sound when the config is saved without changing the value of "bellSoundURL". Setup now to either read file and reload the config, or reuse the "bellSound" value saved in state and reload the config. This removes an inefficiency with the reloadConfig being dispatched twice when "bellSoundURL" has changed as well.

* 1. Removed a file that contained a single function, referenced in only one place that is performing a fairly simple task.
2. Updated the "getBase64FileData" method to use "Buffer.from()" instead of "Buffer()" due to messages stating that "Buffer()" is deprecated due to security and usability issues.

* Adjustments and regression issues fixed

1. Updated the default config file to better explain the supported options for the "bell" config property.
2. Rearranged the bellSoundURL default property to make it easier to find should one decide to change the bell sound.
3. Typos fixed in comments.
4. Update fetchFileData to utilize the configData provided as function argument. There appeared to be no reason to reference different sources of config data within the same method.

* 1. Removed the "BELL_STYLE" constant since it was only being used in one place.
2. Updated comment block to accurately reflect the current logic and made the comment much more concise.
2019-10-03 02:08:40 +02:00
Labhansh Agrawal
8524d37f9e Port array.js and file.js to typescript 2019-09-23 17:55:53 +02:00
Philippe Potvin
d0f03f52e5
url are now interpreted by xterm (#3507)
* url are now interpreted by xterm

* no need

* .DS_STORE banished

* remove from reducer
2019-03-03 13:13:50 -05:00
Umberto Lentini
ba93421933 Fixed file paste (#3383)
Fixes #3340
2019-01-06 15:55:16 +01:00
Prashant Andani
436c37e89e Code cleanup (#3131) 2018-10-13 16:35:51 +02:00
CHaBou
bc6101e98f
Fix module hijacking (#3067)
Regression was introduced by #2866. Release version of Hyper failed to start.
2018-06-11 08:43:57 +02:00
Timo Welde
f75895a176 Fix plugin module hijacking on main process (#2866)
Fixes some plugin loading (like hyperline)
2018-05-15 15:58:36 +02:00
Sonny
f64e3e0204 Adding ability to send error object to notify() (#2955) 2018-05-02 10:10:44 +02:00
CHaBou
dc33d4846b
Fix color configuration with an array (#2729)
Fixes #2728
2018-03-21 10:00:29 +01:00
Timothy
20173f0e86 Migrate styling to styled-jsx (#2761)
Fixes #2737
2018-03-17 13:51:36 +01:00
Benjamin Staneck
9df56a7fe0 Update electron to v1.7.10 and other dependencies (#2583)
* Update electron to v1.7.10

Changelog: https://github.com/electron/electron/releases/tag/v1.7.10

* Update yarn-standalone.js to v1.3.2

Changelog: https://github.com/yarnpkg/yarn/releases/tag/v1.3.2

* Update various dependencies

* update electron-builder, electron-rebuild and prettier

* Use the recommended way to install yarn on travis

See https://yarnpkg.com/lang/en/docs/install-ci/#travis-tab
2018-01-21 10:21:41 +01:00
CHaBou
8ce71b9d88
Fix component decoration in renderer (#2454)
* Fix decorateNotification

* Fix typo

* Fix plugin decoration in renderer
2017-11-13 16:02:49 +01:00
CHaBou
3a3ee013f7
Enhance plugin installation (#2440) 2017-11-08 22:24:15 +01:00
Benjamin Staneck
8fc75b15ff Unify wording and spelling in config and other places (#2422) 2017-11-04 23:19:02 +01:00
CHaBou
2af575c3c0 Multiple keymaps and mousetrap (#2412)
* WIP

* WIP

* Wip

* Wip

* wip

* Refactor without normalize and plugin

* Replace extendKeymaps by decorateKeymaps

* WIP

* Add mousetrap

* Add first command over rpc

* More commands

* Add all commands

* Begin to hook commands

* Working multiple keymaps

* Use redux action to trigger command

* Use forked version of Mousetrap to capture key events

* Fix lint

* Add command in redux action to debug purpose

* ExecCommand from menu click

* Remove unused files

* Fix xterm should ignore catched events

* Re-enable IntelliSense checking

* Remove unused runes dep
2017-11-02 19:51:18 -07:00
Derrick Pelletier
280f14e239 Pasting a copied file or dir provides full path to resource (#2364)
* Added a utility for processing clipboard data

* using paste processing utility in term component to expand filepath

* removed linux case

* moved active tab to guard so only process when active

* commenting paste event handler for clarity
2017-10-22 23:16:52 +02:00
Evan
e29651bbe3 Fix typo in comment (#2383)
Pointless typo fix
2017-10-21 21:56:41 +02:00
CHaBou
7f1baff5e1 Fix keyboard event handling (#2331)
Implement Mousetrap-like keyboard handling
2017-10-05 20:40:02 +02:00