import { createSelector } from 'reselect' ; import type { State } from '../types' ; import type { ShellUpdateAction , ShellUpdateState } from './types' ; export function checkShellUpdate ( ) { return { type : 'shell:CHECK_UPDATE' , meta : { shell : true } } ; } export function downloadShellUpdate ( ) { return { type : 'shell:DOWNLOAD_UPDATE' , meta : { shell : true } } ; } export function applyShellUpdate ( ) { return { type : 'shell:APPLY_UPDATE' , meta : { shell : true } } ; } export function getShellUpdateState ( state ) { return state . shell . update ; } export const getAvailableShellUpdate = createSelector ( getShellUpdateState , state => state . available && state . info ? state . info . version : null ) ;