This commit is contained in:
Labhansh Agrawal 2021-05-10 18:24:21 +05:30
parent b13cea7c6f
commit c9d8692f26
3 changed files with 31 additions and 34 deletions

View file

@ -108,9 +108,7 @@ function getPackageName(plugin: string) {
function existsOnNpm(plugin: string) { function existsOnNpm(plugin: string) {
const name = getPackageName(plugin); const name = getPackageName(plugin);
return got return got.get<any>(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'}).then((res) => {
.get<any>(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'})
.then((res) => {
if (!res.body.versions) { if (!res.body.versions) {
return Promise.reject(res); return Promise.reject(res);
} else { } else {

View file

@ -13,7 +13,8 @@ import {setActiveSession, ptyExitSession, userExitSession} from './sessions';
import {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../hyper'; import {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../hyper';
function requestSplit(direction: 'VERTICAL' | 'HORIZONTAL') { function requestSplit(direction: 'VERTICAL' | 'HORIZONTAL') {
return (activeUid: string) => (dispatch: HyperDispatch, getState: () => HyperState): void => { return (activeUid: string) =>
(dispatch: HyperDispatch, getState: () => HyperState): void => {
dispatch({ dispatch({
type: SESSION_REQUEST, type: SESSION_REQUEST,
effect: () => { effect: () => {

View file

@ -15,8 +15,7 @@ const getActivityMarkers = ({ui}: HyperState) => ui.activityMarkers;
const getTabs = createSelector( const getTabs = createSelector(
[getSessions, getRootGroups, getActiveSessions, getActiveRootGroup, getActivityMarkers], [getSessions, getRootGroups, getActiveSessions, getActiveRootGroup, getActivityMarkers],
(sessions, rootGroups, activeSessions, activeRootGroup, activityMarkers) => (sessions, rootGroups, activeSessions, activeRootGroup, activityMarkers) =>
rootGroups.map( rootGroups.map((t): ITab => {
(t): ITab => {
const activeSessionUid = activeSessions[t.uid]; const activeSessionUid = activeSessions[t.uid];
const session = sessions[activeSessionUid]; const session = sessions[activeSessionUid];
return { return {
@ -25,8 +24,7 @@ const getTabs = createSelector(
isActive: t.uid === activeRootGroup, isActive: t.uid === activeRootGroup,
hasActivity: activityMarkers[session.uid] hasActivity: activityMarkers[session.uid]
}; };
} })
)
); );
const mapStateToProps = (state: HyperState) => { const mapStateToProps = (state: HyperState) => {