diff options
author | 2024-03-22 02:33:33 +0530 | |
---|---|---|
committer | 2024-03-21 21:24:35 +0000 | |
commit | 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d (patch) | |
tree | d919bda212744493a7b66c2e91a75455421d62cc /src/api | |
parent | Upgrade electron to '29.1.5' (diff) | |
download | ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.gz ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.zst ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.zip |
Upgrade node modules
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/UserApi.ts | 2 | ||||
-rw-r--r-- | src/api/apiBase.ts | 10 | ||||
-rw-r--r-- | src/api/index.ts | 6 | ||||
-rw-r--r-- | src/api/server/LocalApi.ts | 2 | ||||
-rw-r--r-- | src/api/server/ServerApi.ts | 18 | ||||
-rw-r--r-- | src/api/utils/auth.ts | 4 |
6 files changed, 22 insertions, 20 deletions
diff --git a/src/api/UserApi.ts b/src/api/UserApi.ts index 38f489131..b70d3b345 100644 --- a/src/api/UserApi.ts +++ b/src/api/UserApi.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { BinaryLike } from 'node:crypto'; | 1 | import type { BinaryLike } from 'node:crypto'; |
2 | import { hash } from '../helpers/password-helpers'; | 2 | import { hash } from '../helpers/password-helpers'; |
3 | 3 | ||
4 | export default class UserApi { | 4 | export default class UserApi { |
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts index 649895fbc..522891fa0 100644 --- a/src/api/apiBase.ts +++ b/src/api/apiBase.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | /** | ||
2 | * Get API base URL from store | ||
3 | */ | ||
4 | import { API_VERSION } from '../environment-remote'; | ||
5 | import { | 1 | import { |
6 | DEV_API_FRANZ_WEBSITE, | 2 | DEV_API_FRANZ_WEBSITE, |
7 | LIVE_FRANZ_API, | ||
8 | LIVE_FERDIUM_API, | 3 | LIVE_FERDIUM_API, |
4 | LIVE_FRANZ_API, | ||
9 | LOCAL_HOSTNAME, | 5 | LOCAL_HOSTNAME, |
10 | LOCAL_SERVER, | 6 | LOCAL_SERVER, |
11 | SERVER_NOT_LOADED, | 7 | SERVER_NOT_LOADED, |
12 | } from '../config'; | 8 | } from '../config'; |
9 | /** | ||
10 | * Get API base URL from store | ||
11 | */ | ||
12 | import { API_VERSION } from '../environment-remote'; | ||
13 | import { fixUrl } from '../helpers/url-helpers'; | 13 | import { fixUrl } from '../helpers/url-helpers'; |
14 | 14 | ||
15 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window | 15 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window |
diff --git a/src/api/index.ts b/src/api/index.ts index 5ca6ba132..f0f396edc 100644 --- a/src/api/index.ts +++ b/src/api/index.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import AppApi from './AppApi'; | 1 | import AppApi from './AppApi'; |
2 | import ServicesApi from './ServicesApi'; | 2 | import FeaturesApi from './FeaturesApi'; |
3 | import LocalApi from './LocalApi'; | ||
3 | import RecipePreviewsApi from './RecipePreviewsApi'; | 4 | import RecipePreviewsApi from './RecipePreviewsApi'; |
4 | import RecipesApi from './RecipesApi'; | 5 | import RecipesApi from './RecipesApi'; |
6 | import ServicesApi from './ServicesApi'; | ||
5 | import UserApi from './UserApi'; | 7 | import UserApi from './UserApi'; |
6 | import LocalApi from './LocalApi'; | ||
7 | import FeaturesApi from './FeaturesApi'; | ||
8 | 8 | ||
9 | export interface ApiInterface { | 9 | export interface ApiInterface { |
10 | app: AppApi; | 10 | app: AppApi; |
diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index 6764816f9..56fa5cc8f 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ExecException } from 'node:child_process'; | 1 | import type { ExecException } from 'node:child_process'; |
2 | import { ipcRenderer } from 'electron'; | 2 | import { ipcRenderer } from 'electron'; |
3 | import fastFolderSize from 'fast-folder-size'; | 3 | import fastFolderSize from 'fast-folder-size'; |
4 | 4 | ||
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index 9e7582e1e..58c6845ac 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts | |||
@@ -1,22 +1,24 @@ | |||
1 | /* eslint-disable import/no-import-module-exports */ | 1 | /* eslint-disable import/no-import-module-exports */ |
2 | /* eslint-disable global-require */ | 2 | /* eslint-disable global-require */ |
3 | import { join } from 'node:path'; | 3 | import { join } from 'node:path'; |
4 | import tar from 'tar'; | ||
5 | import { | 4 | import { |
6 | readdirSync, | 5 | type PathOrFileDescriptor, |
7 | statSync, | ||
8 | writeFileSync, | ||
9 | copySync, | 6 | copySync, |
10 | ensureDirSync, | 7 | ensureDirSync, |
11 | pathExistsSync, | 8 | pathExistsSync, |
12 | readJsonSync, | 9 | readJsonSync, |
10 | readdirSync, | ||
13 | removeSync, | 11 | removeSync, |
14 | PathOrFileDescriptor, | 12 | statSync, |
13 | writeFileSync, | ||
15 | } from 'fs-extra'; | 14 | } from 'fs-extra'; |
15 | import tar from 'tar'; | ||
16 | 16 | ||
17 | import RecipeModel, { type IRecipe } from '../../models/Recipe'; | ||
18 | import RecipePreviewModel, { | ||
19 | type IRecipePreview, | ||
20 | } from '../../models/RecipePreview'; | ||
17 | import ServiceModel from '../../models/Service'; | 21 | import ServiceModel from '../../models/Service'; |
18 | import RecipePreviewModel, { IRecipePreview } from '../../models/RecipePreview'; | ||
19 | import RecipeModel, { IRecipe } from '../../models/Recipe'; | ||
20 | import UserModel from '../../models/User'; | 22 | import UserModel from '../../models/User'; |
21 | 23 | ||
22 | import sleep from '../../helpers/async-helpers'; | 24 | import sleep from '../../helpers/async-helpers'; |
@@ -32,8 +34,8 @@ import { | |||
32 | } from '../utils/auth'; | 34 | } from '../utils/auth'; |
33 | 35 | ||
34 | import { | 36 | import { |
35 | getRecipeDirectory, | ||
36 | getDevRecipeDirectory, | 37 | getDevRecipeDirectory, |
38 | getRecipeDirectory, | ||
37 | loadRecipeConfig, | 39 | loadRecipeConfig, |
38 | } from '../../helpers/recipe-helpers'; | 40 | } from '../../helpers/recipe-helpers'; |
39 | 41 | ||
diff --git a/src/api/utils/auth.ts b/src/api/utils/auth.ts index 1f694a781..ce30e0132 100644 --- a/src/api/utils/auth.ts +++ b/src/api/utils/auth.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import localStorage from 'mobx-localstorage'; | ||
2 | import { when } from 'mobx'; | 1 | import { when } from 'mobx'; |
3 | import { localServerToken, needsToken } from '../apiBase'; | 2 | import localStorage from 'mobx-localstorage'; |
4 | import { ferdiumLocale, ferdiumVersion } from '../../environment-remote'; | 3 | import { ferdiumLocale, ferdiumVersion } from '../../environment-remote'; |
4 | import { localServerToken, needsToken } from '../apiBase'; | ||
5 | 5 | ||
6 | export const prepareAuthRequest = ( | 6 | export const prepareAuthRequest = ( |
7 | // eslint-disable-next-line unicorn/no-object-as-default-parameter | 7 | // eslint-disable-next-line unicorn/no-object-as-default-parameter |