From 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 22 Mar 2024 02:33:33 +0530 Subject: Upgrade node modules --- src/stores/AppStore.ts | 32 ++++++++++++++++---------------- src/stores/FeaturesStore.ts | 18 +++++++++--------- src/stores/GlobalErrorStore.ts | 10 +++++----- src/stores/RecipePreviewsStore.ts | 10 +++++----- src/stores/RecipesStore.ts | 14 +++++++------- src/stores/RequestStore.ts | 8 ++++---- src/stores/ServicesStore.ts | 32 ++++++++++++++++---------------- src/stores/SettingsStore.ts | 8 ++++---- src/stores/UIStore.ts | 10 +++++----- src/stores/UserStore.ts | 14 +++++++------- src/stores/index.ts | 24 ++++++++++++------------ src/stores/lib/CachedRequest.ts | 2 +- src/stores/lib/Reaction.ts | 2 +- src/stores/lib/Request.ts | 2 +- src/stores/lib/TypedStore.ts | 8 ++++---- 15 files changed, 97 insertions(+), 97 deletions(-) (limited to 'src/stores') diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts index b8356bd56..b0a925411 100644 --- a/src/stores/AppStore.ts +++ b/src/stores/AppStore.ts @@ -1,46 +1,46 @@ import { URL } from 'node:url'; -import { ipcRenderer } from 'electron'; import { app, - screen, - powerMonitor, - nativeTheme, getCurrentWindow, + nativeTheme, + powerMonitor, process as remoteProcess, + screen, } from '@electron/remote'; +import AutoLaunch from 'auto-launch'; +import { ipcRenderer } from 'electron'; +import { readJsonSync } from 'fs-extra'; import { action, computed, makeObservable, observable } from 'mobx'; import moment from 'moment'; -import AutoLaunch from 'auto-launch'; import ms from 'ms'; -import { readJsonSync } from 'fs-extra'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; -import TypedStore from './lib/TypedStore'; -import Request from './lib/Request'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; -import { cleanseJSObject } from '../jsUtils'; import { + electronVersion, isMac, isWinPortable, - electronVersion, osRelease, } from '../environment'; import { + ferdiumLocale, ferdiumVersion, userDataPath, - ferdiumLocale, } from '../environment-remote'; -import generatedTranslations from '../i18n/translations'; import { getLocale } from '../helpers/i18n-helpers'; +import generatedTranslations from '../i18n/translations'; +import { cleanseJSObject } from '../jsUtils'; +import Request from './lib/Request'; +import TypedStore from './lib/TypedStore'; +import sleep from '../helpers/async-helpers'; import { getServiceIdsFromPartitions, removeServicePartitionDirectory, } from '../helpers/service-helpers'; import { openExternalUrl } from '../helpers/url-helpers'; -import sleep from '../helpers/async-helpers'; const debug = require('../preload-safe-debug')('Ferdium:AppStore'); diff --git a/src/stores/FeaturesStore.ts b/src/stores/FeaturesStore.ts index 8584b6060..6167d0e22 100644 --- a/src/stores/FeaturesStore.ts +++ b/src/stores/FeaturesStore.ts @@ -5,18 +5,18 @@ import { observable, runInAction, } from 'mobx'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; -import CachedRequest from './lib/CachedRequest'; -import serviceProxy from '../features/serviceProxy'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import appearance from '../features/appearance'; import basicAuth from '../features/basicAuth'; -import workspaces from '../features/workspaces'; -import quickSwitch from '../features/quickSwitch'; -import publishDebugInfo from '../features/publishDebugInfo'; import communityRecipes from '../features/communityRecipes'; +import publishDebugInfo from '../features/publishDebugInfo'; +import quickSwitch from '../features/quickSwitch'; +import serviceProxy from '../features/serviceProxy'; import todos from '../features/todos'; -import appearance from '../features/appearance'; +import workspaces from '../features/workspaces'; +import CachedRequest from './lib/CachedRequest'; import TypedStore from './lib/TypedStore'; export default class FeaturesStore extends TypedStore { diff --git a/src/stores/GlobalErrorStore.ts b/src/stores/GlobalErrorStore.ts index 74a43100b..1da81eaa3 100644 --- a/src/stores/GlobalErrorStore.ts +++ b/src/stores/GlobalErrorStore.ts @@ -1,8 +1,8 @@ -import { observable, action, makeObservable } from 'mobx'; -import { Response } from 'electron'; -import { Actions } from '../actions/lib/actions'; -import { ApiInterface } from '../api'; -import { Stores } from '../@types/stores.types'; +import type { Response } from 'electron'; +import { action, makeObservable, observable } from 'mobx'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; import Request from './lib/Request'; import TypedStore from './lib/TypedStore'; diff --git a/src/stores/RecipePreviewsStore.ts b/src/stores/RecipePreviewsStore.ts index 1c95e6b54..f851f3203 100644 --- a/src/stores/RecipePreviewsStore.ts +++ b/src/stores/RecipePreviewsStore.ts @@ -1,14 +1,14 @@ import { action, computed, makeObservable, observable } from 'mobx'; -import { Actions } from '../actions/lib/actions'; -import { ApiInterface } from '../api'; -import Recipe from '../models/Recipe'; -import { Stores } from '../@types/stores.types'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import type Recipe from '../models/Recipe'; +import type RecipePreview from '../models/RecipePreview'; import CachedRequest from './lib/CachedRequest'; import Request from './lib/Request'; import TypedStore from './lib/TypedStore'; -import RecipePreview from '../models/RecipePreview'; export default class RecipePreviewsStore extends TypedStore { @observable allRecipePreviewsRequest = new CachedRequest( diff --git a/src/stores/RecipesStore.ts b/src/stores/RecipesStore.ts index 9b5565dcf..3cd81807a 100644 --- a/src/stores/RecipesStore.ts +++ b/src/stores/RecipesStore.ts @@ -1,15 +1,15 @@ -import { action, computed, makeObservable, observable } from 'mobx'; import { readJSONSync } from 'fs-extra'; +import { action, computed, makeObservable, observable } from 'mobx'; import semver from 'semver'; -import Recipe from '../models/Recipe'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import { asarRecipesPath } from '../helpers/asar-helpers'; +import matchRoute from '../helpers/routing-helpers'; +import type Recipe from '../models/Recipe'; import CachedRequest from './lib/CachedRequest'; import Request from './lib/Request'; -import matchRoute from '../helpers/routing-helpers'; -import { asarRecipesPath } from '../helpers/asar-helpers'; import TypedStore from './lib/TypedStore'; const debug = require('../preload-safe-debug')('Ferdium:RecipeStore'); diff --git a/src/stores/RequestStore.ts b/src/stores/RequestStore.ts index 807f2d126..bad9f39ea 100644 --- a/src/stores/RequestStore.ts +++ b/src/stores/RequestStore.ts @@ -2,11 +2,11 @@ import { ipcRenderer } from 'electron'; import { action, computed, makeObservable, observable } from 'mobx'; import ms from 'ms'; -import { Actions } from '../actions/lib/actions'; -import { ApiInterface } from '../api'; -import { Stores } from '../@types/stores.types'; -import CachedRequest from './lib/CachedRequest'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; import { LOCAL_HOSTNAME, LOCAL_PORT } from '../config'; +import type CachedRequest from './lib/CachedRequest'; import TypedStore from './lib/TypedStore'; diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts index d7804a3fe..8105aa084 100644 --- a/src/stores/ServicesStore.ts +++ b/src/stores/ServicesStore.ts @@ -1,29 +1,29 @@ import { join } from 'node:path'; import { clipboard, ipcRenderer, shell } from 'electron'; -import { action, reaction, computed, observable, makeObservable } from 'mobx'; +import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; import { debounce, remove } from 'lodash'; +import { action, computed, makeObservable, observable, reaction } from 'mobx'; import ms from 'ms'; -import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; -import Request from './lib/Request'; -import CachedRequest from './lib/CachedRequest'; -import matchRoute from '../helpers/routing-helpers'; -import { isInTimeframe } from '../helpers/schedule-helpers'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; +import { ferdiumVersion } from '../environment-remote'; +import { workspaceStore } from '../features/workspaces'; import { - getRecipeDirectory, getDevRecipeDirectory, + getRecipeDirectory, } from '../helpers/recipe-helpers'; -import Service from '../models/Service'; -import { workspaceStore } from '../features/workspaces'; -import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; -import { cleanseJSObject } from '../jsUtils'; +import matchRoute from '../helpers/routing-helpers'; +import { isInTimeframe } from '../helpers/schedule-helpers'; import { SPELLCHECKER_LOCALES } from '../i18n/languages'; -import { ferdiumVersion } from '../environment-remote'; -import TypedStore from './lib/TypedStore'; +import { cleanseJSObject } from '../jsUtils'; import type { UnreadServices } from '../lib/dbus/Ferdium'; +import type Service from '../models/Service'; +import CachedRequest from './lib/CachedRequest'; +import Request from './lib/Request'; +import TypedStore from './lib/TypedStore'; const debug = require('../preload-safe-debug')('Ferdium:ServiceStore'); diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts index 010290a4a..72d6331cb 100644 --- a/src/stores/SettingsStore.ts +++ b/src/stores/SettingsStore.ts @@ -1,10 +1,10 @@ -import { ipcRenderer } from 'electron'; import { getCurrentWindow } from '@electron/remote'; +import { ipcRenderer } from 'electron'; import { action, computed, makeObservable, observable, reaction } from 'mobx'; import localStorage from 'mobx-localstorage'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts index a3330c2e6..614c16763 100644 --- a/src/stores/UIStore.ts +++ b/src/stores/UIStore.ts @@ -1,10 +1,10 @@ -import { action, observable, computed, reaction, makeObservable } from 'mobx'; import { nativeTheme } from '@electron/remote'; +import { action, computed, makeObservable, observable, reaction } from 'mobx'; -import { Stores } from '../@types/stores.types'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; -import { Theme, theme, ThemeType } from '../themes'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import { type Theme, ThemeType, theme } from '../themes'; import TypedStore from './lib/TypedStore'; export default class UIStore extends TypedStore { diff --git a/src/stores/UserStore.ts b/src/stores/UserStore.ts index 9c3fcd3b9..ade68e4d4 100644 --- a/src/stores/UserStore.ts +++ b/src/stores/UserStore.ts @@ -1,16 +1,16 @@ -import { observable, computed, action, makeObservable } from 'mobx'; -import moment from 'moment'; +import { ipcRenderer } from 'electron'; import jwt from 'jsonwebtoken'; +import { action, computed, makeObservable, observable } from 'mobx'; import localStorage from 'mobx-localstorage'; -import { ipcRenderer } from 'electron'; +import moment from 'moment'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; -import { Stores } from '../@types/stores.types'; +import type { Stores } from '../@types/stores.types'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; import { TODOS_PARTITION_ID } from '../config'; import { isDevMode } from '../environment-remote'; -import Request from './lib/Request'; import CachedRequest from './lib/CachedRequest'; +import Request from './lib/Request'; import TypedStore from './lib/TypedStore'; const debug = require('../preload-safe-debug')('Ferdium:UserStore'); diff --git a/src/stores/index.ts b/src/stores/index.ts index f9927d9a3..5b96e6efb 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -1,19 +1,19 @@ -import { RouterStore } from '@superwf/mobx-react-router'; -import { ApiInterface } from '../api'; -import { Actions } from '../actions/lib/actions'; +import type { RouterStore } from '@superwf/mobx-react-router'; +import type { Actions } from '../actions/lib/actions'; +import type { ApiInterface } from '../api'; +import { communityRecipesStore } from '../features/communityRecipes'; +import { todosStore } from '../features/todos'; +import { workspaceStore } from '../features/workspaces'; import AppStore from './AppStore'; -import UserStore from './UserStore'; import FeaturesStore from './FeaturesStore'; -import SettingsStore from './SettingsStore'; -import ServicesStore from './ServicesStore'; -import RecipesStore from './RecipesStore'; +import GlobalErrorStore from './GlobalErrorStore'; import RecipePreviewsStore from './RecipePreviewsStore'; -import UIStore from './UIStore'; +import RecipesStore from './RecipesStore'; import RequestStore from './RequestStore'; -import GlobalErrorStore from './GlobalErrorStore'; -import { workspaceStore } from '../features/workspaces'; -import { communityRecipesStore } from '../features/communityRecipes'; -import { todosStore } from '../features/todos'; +import ServicesStore from './ServicesStore'; +import SettingsStore from './SettingsStore'; +import UIStore from './UIStore'; +import UserStore from './UserStore'; export interface RealStores { router: RouterStore; diff --git a/src/stores/lib/CachedRequest.ts b/src/stores/lib/CachedRequest.ts index b24336fe6..3b15fcf3f 100644 --- a/src/stores/lib/CachedRequest.ts +++ b/src/stores/lib/CachedRequest.ts @@ -1,5 +1,5 @@ -import { action } from 'mobx'; import { isEqual } from 'lodash'; +import { action } from 'mobx'; import Request from './Request'; export default class CachedRequest extends Request { diff --git a/src/stores/lib/Reaction.ts b/src/stores/lib/Reaction.ts index 3966c8073..d418d8db8 100644 --- a/src/stores/lib/Reaction.ts +++ b/src/stores/lib/Reaction.ts @@ -1,4 +1,4 @@ -import { autorun, IReactionDisposer, IReactionPublic } from 'mobx'; +import { type IReactionDisposer, type IReactionPublic, autorun } from 'mobx'; export default class Reaction { public reaction: (r: IReactionPublic) => any; diff --git a/src/stores/lib/Request.ts b/src/stores/lib/Request.ts index 587af87d7..e7739bba1 100644 --- a/src/stores/lib/Request.ts +++ b/src/stores/lib/Request.ts @@ -1,4 +1,4 @@ -import { observable, action, computed, makeObservable } from 'mobx'; +import { action, computed, makeObservable, observable } from 'mobx'; // eslint-disable-next-line no-use-before-define type Hook = (request: Request) => void; diff --git a/src/stores/lib/TypedStore.ts b/src/stores/lib/TypedStore.ts index 8bae529ba..6d499b637 100644 --- a/src/stores/lib/TypedStore.ts +++ b/src/stores/lib/TypedStore.ts @@ -1,13 +1,13 @@ import { + type IReactionPublic, action, computed, - IReactionPublic, makeObservable, observable, } from 'mobx'; -import { Actions } from '../../actions/lib/actions'; -import { ApiInterface } from '../../api'; -import { Stores } from '../../@types/stores.types'; +import type { Stores } from '../../@types/stores.types'; +import type { Actions } from '../../actions/lib/actions'; +import type { ApiInterface } from '../../api'; import Reaction from './Reaction'; export default abstract class TypedStore { -- cgit v1.2.3-70-g09d2