mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
move typings into a separate directory
This commit is contained in:
parent
33f7d2bad5
commit
c62ed62752
56 changed files with 87 additions and 78 deletions
|
|
@ -4,7 +4,7 @@ import {_import, getDefaultConfig} from './config/import';
|
|||
import _openConfig from './config/open';
|
||||
import {cfgPath, cfgDir} from './config/paths';
|
||||
import {getColorMap} from './utils/colors';
|
||||
import type {parsedConfig, configOptions} from '../lib/config';
|
||||
import type {parsedConfig, configOptions} from '../typings/config';
|
||||
import {app} from 'electron';
|
||||
|
||||
const watchers: Function[] = [];
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {readFileSync, mkdirpSync} from 'fs-extra';
|
|||
import {defaultCfg, cfgPath, plugs, defaultPlatformKeyPath} from './paths';
|
||||
import {_init} from './init';
|
||||
import notify from '../notify';
|
||||
import type {rawConfig} from '../../lib/config';
|
||||
import type {rawConfig} from '../../typings/config';
|
||||
import {migrateHyper3Config} from './migrate';
|
||||
|
||||
let defaultConfig: rawConfig;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import vm from 'vm';
|
||||
import notify from '../notify';
|
||||
import mapKeys from '../utils/map-keys';
|
||||
import type {parsedConfig, rawConfig, configOptions} from '../../lib/config';
|
||||
import type {parsedConfig, rawConfig, configOptions} from '../../typings/config';
|
||||
import merge from 'lodash/merge';
|
||||
|
||||
const _extract = (script?: vm.Script): Record<string, any> => {
|
||||
|
|
|
|||
1
app/index.d.ts
vendored
1
app/index.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
// Dummy file, required by tsc
|
||||
|
|
@ -15,10 +15,10 @@ import {availableExtensions} from './plugins/extensions';
|
|||
import {install} from './plugins/install';
|
||||
import {plugs} from './config/paths';
|
||||
import mapKeys from './utils/map-keys';
|
||||
import type {configOptions} from '../lib/config';
|
||||
import type {configOptions} from '../typings/config';
|
||||
import {promisify} from 'util';
|
||||
import {exec, execFile} from 'child_process';
|
||||
import type {IpcMainWithCommands} from '../common';
|
||||
import type {IpcMainWithCommands} from '../typings/common';
|
||||
|
||||
// local storage
|
||||
const cache = new Config();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {EventEmitter} from 'events';
|
|||
import type {BrowserWindow, IpcMainEvent} from 'electron';
|
||||
import {ipcMain} from 'electron';
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import type {TypedEmitter, MainEvents, RendererEvents, FilterNever} from '../common';
|
||||
import type {TypedEmitter, MainEvents, RendererEvents, FilterNever} from '../typings/common';
|
||||
|
||||
export class Server {
|
||||
emitter: TypedEmitter<MainEvents>;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
},
|
||||
"include": [
|
||||
"./**/*",
|
||||
"./package.json"
|
||||
"./package.json",
|
||||
"../typings/extend-electron.d.ts",
|
||||
"../typings/ext-modules.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ import {execCommand} from '../commands';
|
|||
import {setRendererType, unsetRendererType} from '../utils/renderer-utils';
|
||||
import {decorateSessionOptions, decorateSessionClass} from '../plugins';
|
||||
import {enable as remoteEnable} from '@electron/remote/main';
|
||||
import type {configOptions} from '../../lib/config';
|
||||
import type {configOptions} from '../../typings/config';
|
||||
import {getWorkingDirectoryFromPID} from 'native-process-working-directory';
|
||||
import {existsSync} from 'fs';
|
||||
import type {sessionExtraOptions} from '../../common';
|
||||
import type {sessionExtraOptions} from '../../typings/common';
|
||||
import {getDefaultProfile} from '../config';
|
||||
|
||||
export function newWindow(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {CONFIG_LOAD, CONFIG_RELOAD} from '../constants/config';
|
||||
import type {HyperActions} from '../hyper';
|
||||
import type {configOptions} from '../config';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
import type {configOptions} from '../../typings/config';
|
||||
|
||||
export function loadConfig(config: configOptions): HyperActions {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
} from '../constants/ui';
|
||||
import rpc from '../rpc';
|
||||
import {userExitTermGroup, setActiveGroup} from './term-groups';
|
||||
import type {HyperDispatch} from '../hyper';
|
||||
import type {HyperDispatch} from '../../typings/hyper';
|
||||
|
||||
export function closeTab(uid: string) {
|
||||
return (dispatch: HyperDispatch) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import rpc from '../rpc';
|
||||
import {INIT} from '../constants';
|
||||
import type {HyperDispatch} from '../hyper';
|
||||
import type {HyperDispatch} from '../../typings/hyper';
|
||||
|
||||
export default function init() {
|
||||
return (dispatch: HyperDispatch) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
||||
import type {HyperActions} from '../hyper';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
|
||||
export function dismissNotification(id: string): HyperActions {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import {
|
|||
SESSION_SET_XTERM_TITLE,
|
||||
SESSION_SEARCH
|
||||
} from '../constants/sessions';
|
||||
import type {HyperState, HyperDispatch, HyperActions} from '../hyper';
|
||||
import type {Session} from '../../common';
|
||||
import type {HyperState, HyperDispatch, HyperActions} from '../../typings/hyper';
|
||||
import type {Session} from '../../typings/common';
|
||||
|
||||
export function addSession({uid, shell, pid, cols = null, rows = null, splitDirection, activeUid, profile}: Session) {
|
||||
return (dispatch: HyperDispatch, getState: () => HyperState) => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {SESSION_REQUEST} from '../constants/sessions';
|
|||
import findBySession from '../utils/term-groups';
|
||||
import {getRootGroups} from '../selectors';
|
||||
import {setActiveSession, ptyExitSession, userExitSession} from './sessions';
|
||||
import type {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../hyper';
|
||||
import type {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../../typings/hyper';
|
||||
|
||||
function requestSplit(direction: 'VERTICAL' | 'HORIZONTAL') {
|
||||
return (_activeUid: string | undefined, _profile: string | undefined) =>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import {
|
|||
|
||||
import {setActiveGroup} from './term-groups';
|
||||
import type parseUrl from 'parse-url';
|
||||
import type {HyperState, HyperDispatch, HyperActions, ITermGroups} from '../hyper';
|
||||
import type {HyperState, HyperDispatch, HyperActions, ITermGroups} from '../../typings/hyper';
|
||||
import type {Stats} from 'fs';
|
||||
import {stat} from 'fs';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {UPDATE_INSTALL, UPDATE_AVAILABLE} from '../constants/updater';
|
||||
import rpc from '../rpc';
|
||||
import type {HyperActions} from '../hyper';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
|
||||
export function installUpdate(): HyperActions {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {ipcRenderer} from './utils/ipc';
|
||||
import type {HyperDispatch} from './hyper';
|
||||
import type {HyperDispatch} from '../typings/hyper';
|
||||
import {closeSearch} from './actions/sessions';
|
||||
|
||||
let commands: Record<string, (event: any, dispatch: HyperDispatch) => void> = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import {decorate, getTabsProps} from '../utils/plugins';
|
||||
|
||||
import Tabs_ from './tabs';
|
||||
import type {HeaderProps} from '../hyper';
|
||||
import type {HeaderProps} from '../../typings/hyper';
|
||||
|
||||
const Tabs = decorate(Tabs_, 'Tabs');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, {useRef, useState} from 'react';
|
||||
import {VscChevronDown} from '@react-icons/all-files/vsc/VscChevronDown';
|
||||
import type {configOptions} from '../config';
|
||||
import type {configOptions} from '../../typings/config';
|
||||
import useClickAway from 'react-use/lib/useClickAway';
|
||||
|
||||
interface Props {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {forwardRef, useEffect, useRef, useState} from 'react';
|
||||
import type {NotificationProps} from '../hyper';
|
||||
import type {NotificationProps} from '../../typings/hyper';
|
||||
|
||||
const Notification = forwardRef<HTMLDivElement, React.PropsWithChildren<NotificationProps>>((props, ref) => {
|
||||
const dismissTimer = useRef<NodeJS.Timeout | undefined>(undefined);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React, {forwardRef} from 'react';
|
|||
import {decorate} from '../utils/plugins';
|
||||
|
||||
import Notification_ from './notification';
|
||||
import type {NotificationsProps} from '../hyper';
|
||||
import type {NotificationsProps} from '../../typings/hyper';
|
||||
|
||||
const Notification = decorate(Notification_, 'Notification');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {useCallback, useRef, useEffect, forwardRef} from 'react';
|
||||
import type {SearchBoxProps} from '../hyper';
|
||||
import type {SearchBoxProps} from '../../typings/hyper';
|
||||
import {VscArrowUp} from '@react-icons/all-files/vsc/VscArrowUp';
|
||||
import {VscArrowDown} from '@react-icons/all-files/vsc/VscArrowDown';
|
||||
import {VscClose} from '@react-icons/all-files/vsc/VscClose';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import sum from 'lodash/sum';
|
||||
import type {SplitPaneProps} from '../hyper';
|
||||
import type {SplitPaneProps} from '../../typings/hyper';
|
||||
|
||||
export default class SplitPane extends React.PureComponent<
|
||||
React.PropsWithChildren<SplitPaneProps>,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {forwardRef} from 'react';
|
||||
import type {StyleSheetProps} from '../hyper';
|
||||
import type {StyleSheetProps} from '../../typings/hyper';
|
||||
|
||||
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
|
||||
const {borderColor} = props;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {forwardRef} from 'react';
|
||||
import type {TabProps} from '../hyper';
|
||||
import type {TabProps} from '../../typings/hyper';
|
||||
|
||||
const Tab = forwardRef<HTMLLIElement, TabProps>((props, ref) => {
|
||||
const handleClick = (event: React.MouseEvent) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React, {forwardRef} from 'react';
|
|||
import {decorate, getTabProps} from '../utils/plugins';
|
||||
|
||||
import Tab_ from './tab';
|
||||
import type {TabsProps} from '../hyper';
|
||||
import type {TabsProps} from '../../typings/hyper';
|
||||
import DropdownButton from './new-tab';
|
||||
|
||||
const Tab = decorate(Tab_, 'Tab');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {decorate, getTermProps, getTermGroupProps} from '../utils/plugins';
|
|||
import {resizeTermGroup} from '../actions/term-groups';
|
||||
import Term_ from './term';
|
||||
import SplitPane_ from './split-pane';
|
||||
import type {HyperState, HyperDispatch, TermGroupProps, TermGroupOwnProps} from '../hyper';
|
||||
import type {HyperState, HyperDispatch, TermGroupProps, TermGroupOwnProps} from '../../typings/hyper';
|
||||
|
||||
const Term = decorate(Term_, 'Term');
|
||||
const SplitPane = decorate(SplitPane_, 'SplitPane');
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import Color from 'color';
|
|||
import terms from '../terms';
|
||||
import processClipboard from '../utils/paste';
|
||||
import _SearchBox from './searchBox';
|
||||
import type {TermProps} from '../hyper';
|
||||
import type {TermProps} from '../../typings/hyper';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import {decorate} from '../utils/plugins';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {decorate, getTermGroupProps} from '../utils/plugins';
|
|||
import {registerCommandHandlers} from '../command-registry';
|
||||
import TermGroup_ from './term-group';
|
||||
import StyleSheet_ from './style-sheet';
|
||||
import type {TermsProps, HyperDispatch} from '../hyper';
|
||||
import type {TermsProps, HyperDispatch} from '../../typings/hyper';
|
||||
import type Term from './term';
|
||||
import {ObjectTypedKeys} from '../utils/object';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type {configOptions} from '../config';
|
||||
import type {configOptions} from '../../typings/config';
|
||||
|
||||
export const CONFIG_LOAD = 'CONFIG_LOAD';
|
||||
export const CONFIG_RELOAD = 'CONFIG_RELOAD';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Header from '../components/header';
|
|||
import {closeTab, changeTab, maximize, openHamburgerMenu, unmaximize, minimize, close} from '../actions/header';
|
||||
import {connect} from '../utils/plugins';
|
||||
import {getRootGroups} from '../selectors';
|
||||
import type {HyperState, HyperDispatch, ITab} from '../hyper';
|
||||
import type {HyperState, HyperDispatch, ITab} from '../../typings/hyper';
|
||||
import {requestTermGroup} from '../actions/term-groups';
|
||||
|
||||
const isMac = /Mac/.test(navigator.userAgent);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import stylis from 'stylis';
|
|||
import {HeaderContainer} from './header';
|
||||
import TermsContainer from './terms';
|
||||
import NotificationsContainer from './notifications';
|
||||
import type {HyperState, HyperProps, HyperDispatch} from '../hyper';
|
||||
import type {HyperState, HyperProps, HyperDispatch} from '../../typings/hyper';
|
||||
import type Terms from '../components/terms';
|
||||
|
||||
const isMac = /Mac/.test(navigator.userAgent);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import Notifications from '../components/notifications';
|
|||
import {installUpdate} from '../actions/updater';
|
||||
import {connect} from '../utils/plugins';
|
||||
import {dismissNotification} from '../actions/notifications';
|
||||
import type {HyperState, HyperDispatch} from '../hyper';
|
||||
import type {HyperState, HyperDispatch} from '../../typings/hyper';
|
||||
|
||||
const mapStateToProps = (state: HyperState) => {
|
||||
const {ui} = state;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
|
||||
import {openContextMenu} from '../actions/ui';
|
||||
import {getRootGroups} from '../selectors';
|
||||
import type {HyperState, HyperDispatch} from '../hyper';
|
||||
import type {HyperState, HyperDispatch} from '../../typings/hyper';
|
||||
|
||||
const mapStateToProps = (state: HyperState) => {
|
||||
const {sessions} = state.sessions;
|
||||
|
|
|
|||
3
lib/ext-modules.d.ts
vendored
3
lib/ext-modules.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
|||
declare module 'php-escape-shell' {
|
||||
export function php_escapeshellcmd(path: string): string;
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ import {addNotificationMessage} from './actions/notifications';
|
|||
import {loadConfig, reloadConfig} from './actions/config';
|
||||
import HyperContainer from './containers/hyper';
|
||||
import configureStore from './store/configure-store';
|
||||
import type {configOptions} from './config';
|
||||
import type {configOptions} from '../typings/config';
|
||||
|
||||
// On Linux, the default zoom was somehow changed with Electron 3 (or maybe 2).
|
||||
// Setting zoom factor to 1.2 brings back the normal default size
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {combineReducers} from 'redux';
|
|||
import ui from './ui';
|
||||
import sessions from './sessions';
|
||||
import termGroups from './term-groups';
|
||||
import type {HyperActions, HyperState} from '../hyper';
|
||||
import type {HyperActions, HyperState} from '../../typings/hyper';
|
||||
|
||||
export default combineReducers({
|
||||
ui,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
SESSION_SET_CWD,
|
||||
SESSION_SEARCH
|
||||
} from '../constants/sessions';
|
||||
import type {sessionState, session, Mutable, ISessionReducer} from '../hyper';
|
||||
import type {sessionState, session, Mutable, ISessionReducer} from '../../typings/hyper';
|
||||
|
||||
const initialState: sessionState = Immutable<Mutable<sessionState>>({
|
||||
sessions: {},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type {SessionAddAction} from '../constants/sessions';
|
|||
import {SESSION_ADD, SESSION_SET_ACTIVE} from '../constants/sessions';
|
||||
import findBySession from '../utils/term-groups';
|
||||
import {decorateTermGroupsReducer} from '../utils/plugins';
|
||||
import type {ITermGroup, ITermState, ITermGroups, ITermGroupReducer, Mutable} from '../hyper';
|
||||
import type {ITermGroup, ITermState, ITermGroups, ITermGroupReducer, Mutable} from '../../typings/hyper';
|
||||
|
||||
const MIN_SIZE = 0.05;
|
||||
const initialState: ITermState = Immutable<Mutable<ITermState>>({
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import {
|
|||
SESSION_SET_CWD
|
||||
} from '../constants/sessions';
|
||||
import {UPDATE_AVAILABLE} from '../constants/updater';
|
||||
import type {uiState, Mutable, IUiReducer} from '../hyper';
|
||||
import type {uiState, Mutable, IUiReducer} from '../../typings/hyper';
|
||||
import {release} from 'os';
|
||||
|
||||
const isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].includes(navigator.platform) || process.platform === 'win32';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {createSelector} from 'reselect';
|
||||
import type {HyperState} from './hyper';
|
||||
import type {HyperState} from '../typings/hyper';
|
||||
|
||||
const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups;
|
||||
export const getRootGroups = createSelector(getTermGroups, (termGroups) =>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import effects from '../utils/effects';
|
|||
import * as plugins from '../utils/plugins';
|
||||
import writeMiddleware from './write-middleware';
|
||||
import {composeWithDevTools} from '@redux-devtools/extension';
|
||||
import type {HyperState, HyperActions} from '../hyper';
|
||||
import type {HyperState, HyperActions} from '../../typings/hyper';
|
||||
const thunk: ThunkMiddleware<HyperState, HyperActions> = _thunk;
|
||||
|
||||
export default () => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import rootReducer from '../reducers/index';
|
|||
import effects from '../utils/effects';
|
||||
import * as plugins from '../utils/plugins';
|
||||
import writeMiddleware from './write-middleware';
|
||||
import type {HyperState, HyperActions} from '../hyper';
|
||||
import type {HyperState, HyperActions} from '../../typings/hyper';
|
||||
const thunk: ThunkMiddleware<HyperState, HyperActions> = _thunk;
|
||||
|
||||
export default () =>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type {HyperActions, HyperState} from '../hyper';
|
||||
import type {HyperActions, HyperState} from '../../typings/hyper';
|
||||
import terms from '../terms';
|
||||
import type {Dispatch, Middleware} from 'redux';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type {Dispatch, Middleware} from 'redux';
|
||||
import type {HyperActions, HyperState} from '../hyper';
|
||||
import type {HyperActions, HyperState} from '../../typings/hyper';
|
||||
/**
|
||||
* Simple redux middleware that executes
|
||||
* the `effect` field if provided in an action
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {ipcRenderer as _ipc} from 'electron';
|
||||
import type {IpcRendererWithCommands} from '../../common';
|
||||
import type {IpcRendererWithCommands} from '../../typings/common';
|
||||
|
||||
export const ipcRenderer = _ipc as IpcRendererWithCommands;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import type {
|
|||
TermProps,
|
||||
Assignable,
|
||||
HyperActions
|
||||
} from '../hyper';
|
||||
} from '../../typings/hyper';
|
||||
import type {Dispatch, Middleware} from 'redux';
|
||||
import {ObjectTypedKeys} from './object';
|
||||
import IPCChildProcess from './ipc-child-process';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
import {EventEmitter} from 'events';
|
||||
import type {IpcRendererEvent} from 'electron';
|
||||
import type {FilterNever, IpcRendererWithCommands, MainEvents, RendererEvents, TypedEmitter} from '../../common';
|
||||
import type {
|
||||
FilterNever,
|
||||
IpcRendererWithCommands,
|
||||
MainEvents,
|
||||
RendererEvents,
|
||||
TypedEmitter
|
||||
} from '../../typings/common';
|
||||
import {ipcRenderer} from './ipc';
|
||||
|
||||
export default class Client {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type {ITermState} from '../hyper';
|
||||
import type {ITermState} from '../../typings/hyper';
|
||||
|
||||
export default function findBySession(termGroupState: ITermState, sessionUid: string) {
|
||||
const {termGroups} = termGroupState;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"v8-snapshot:arch": "yarn run mk-snapshot && yarn run cp-snapshot",
|
||||
"mk-snapshot": "cross-env ELECTRON_CUSTOM_VERSION=$npm_package_devDependencies_electron node node_modules/electron-mksnapshot/download-mksnapshot.js && node bin/mk-snapshot.js",
|
||||
"cp-snapshot": "node bin/cp-snapshot.js",
|
||||
"generate-schema": "typescript-json-schema ./lib/config.d.ts rawConfig -o ./app/config/schema.json --required"
|
||||
"generate-schema": "typescript-json-schema ./typings/config.d.ts rawConfig -o ./app/config/schema.json --required"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
"./app/",
|
||||
"./lib/",
|
||||
"./test/",
|
||||
"./cli/"
|
||||
"./cli/",
|
||||
"./typings"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
2
common.d.ts → typings/common.d.ts
vendored
2
common.d.ts → typings/common.d.ts
vendored
|
|
@ -1,7 +1,7 @@
|
|||
import type parseUrl from 'parse-url';
|
||||
import type {IpcMain, IpcRenderer} from 'electron';
|
||||
import type {ExecFileOptions, ExecOptions} from 'child_process';
|
||||
import type {configOptions} from './lib/config';
|
||||
import type {configOptions} from './config';
|
||||
|
||||
export type Session = {
|
||||
uid: string;
|
||||
0
lib/config.d.ts → typings/config.d.ts
vendored
0
lib/config.d.ts → typings/config.d.ts
vendored
|
|
@ -1,3 +1,7 @@
|
|||
declare module 'php-escape-shell' {
|
||||
export function php_escapeshellcmd(path: string): string;
|
||||
}
|
||||
|
||||
declare module 'git-describe' {
|
||||
export function gitDescribe(...args: any[]): void;
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import type {Server} from './rpc';
|
||||
import type {Server} from '../app/rpc';
|
||||
|
||||
declare global {
|
||||
namespace Electron {
|
||||
interface App {
|
||||
config: typeof import('./config');
|
||||
plugins: typeof import('./plugins');
|
||||
config: typeof import('../app/config');
|
||||
plugins: typeof import('../app/plugins');
|
||||
getWindows: () => Set<BrowserWindow>;
|
||||
getLastFocusedWindow: () => BrowserWindow | null;
|
||||
windowCallback?: (win: BrowserWindow) => void;
|
||||
34
lib/hyper.d.ts → typings/hyper.d.ts
vendored
34
lib/hyper.d.ts → typings/hyper.d.ts
vendored
|
|
@ -1,5 +1,5 @@
|
|||
import type {Immutable} from 'seamless-immutable';
|
||||
import type Client from './utils/rpc';
|
||||
import type Client from '../lib/utils/rpc';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
|
@ -167,14 +167,14 @@ export type HyperState = {
|
|||
termGroups: ITermState;
|
||||
};
|
||||
|
||||
import type {UIActions} from './constants/ui';
|
||||
import type {ConfigActions} from './constants/config';
|
||||
import type {SessionActions} from './constants/sessions';
|
||||
import type {NotificationActions} from './constants/notifications';
|
||||
import type {UpdateActions} from './constants/updater';
|
||||
import type {TermGroupActions} from './constants/term-groups';
|
||||
import type {InitActions} from './constants';
|
||||
import type {TabActions} from './constants/tabs';
|
||||
import type {UIActions} from '../lib/constants/ui';
|
||||
import type {ConfigActions} from '../lib/constants/config';
|
||||
import type {SessionActions} from '../lib/constants/sessions';
|
||||
import type {NotificationActions} from '../lib/constants/notifications';
|
||||
import type {UpdateActions} from '../lib/constants/updater';
|
||||
import type {TermGroupActions} from '../lib/constants/term-groups';
|
||||
import type {InitActions} from '../lib/constants';
|
||||
import type {TabActions} from '../lib/constants/tabs';
|
||||
|
||||
export type HyperActions = (
|
||||
| UIActions
|
||||
|
|
@ -187,7 +187,7 @@ export type HyperActions = (
|
|||
| TabActions
|
||||
) & {effect?: () => void};
|
||||
|
||||
import type configureStore from './store/configure-store';
|
||||
import type configureStore from '../lib/store/configure-store';
|
||||
export type HyperDispatch = ReturnType<typeof configureStore>['dispatch'];
|
||||
|
||||
import type {ReactChild} from 'react';
|
||||
|
|
@ -198,17 +198,17 @@ type extensionProps = Partial<{
|
|||
customInnerChildren: ReactChild | ReactChild[];
|
||||
}>;
|
||||
|
||||
import type {HeaderConnectedProps} from './containers/header';
|
||||
import type {HeaderConnectedProps} from '../lib/containers/header';
|
||||
export type HeaderProps = HeaderConnectedProps & extensionProps;
|
||||
|
||||
import type {HyperConnectedProps} from './containers/hyper';
|
||||
import type {HyperConnectedProps} from '../lib/containers/hyper';
|
||||
export type HyperProps = HyperConnectedProps & extensionProps;
|
||||
|
||||
import type {NotificationsConnectedProps} from './containers/notifications';
|
||||
import type {NotificationsConnectedProps} from '../lib/containers/notifications';
|
||||
export type NotificationsProps = NotificationsConnectedProps & extensionProps;
|
||||
|
||||
import type Terms from './components/terms';
|
||||
import type {TermsConnectedProps} from './containers/terms';
|
||||
import type Terms from '../lib/components/terms';
|
||||
import type {TermsConnectedProps} from '../lib/containers/terms';
|
||||
export type TermsProps = TermsConnectedProps & extensionProps & {ref_: (terms: Terms | null) => void};
|
||||
|
||||
export type StyleSheetProps = {
|
||||
|
|
@ -266,7 +266,7 @@ export type SplitPaneProps = {
|
|||
sizes?: Immutable<number[]> | null;
|
||||
};
|
||||
|
||||
import type Term from './components/term';
|
||||
import type Term from '../lib/components/term';
|
||||
|
||||
export type TermGroupOwnProps = {
|
||||
cursorAccentColor?: string;
|
||||
|
|
@ -318,7 +318,7 @@ export type TermGroupOwnProps = {
|
|||
| 'imageSupport'
|
||||
>;
|
||||
|
||||
import type {TermGroupConnectedProps} from './components/term-group';
|
||||
import type {TermGroupConnectedProps} from '../lib/components/term-group';
|
||||
export type TermGroupProps = TermGroupConnectedProps & TermGroupOwnProps;
|
||||
|
||||
export type SearchBoxProps = {
|
||||
Loading…
Reference in a new issue