From 085a99c22494cabd4d6f29cbbd8fb6490376918c Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 6 Jul 2022 14:32:35 +0200 Subject: [PATCH] Ormconfig --- packages/dashboard/src/generated/graphql.tsx | 548 ++++++++++-------- .../modules/Apps/components/AppActions.tsx | 7 +- .../modules/Apps/containers/AppDetails.tsx | 11 +- packages/system-api/ormconfig.json | 10 + packages/system-api/src/config/config.ts | 2 + .../src/core/middlewares/sessionMiddleware.ts | 2 +- .../src/modules/apps/apps.service.ts | 23 +- packages/system-api/src/server.ts | 24 +- pnpm-lock.yaml | 272 ++++++--- 9 files changed, 550 insertions(+), 349 deletions(-) create mode 100644 packages/system-api/ormconfig.json diff --git a/packages/dashboard/src/generated/graphql.tsx b/packages/dashboard/src/generated/graphql.tsx index e525c501..d3f4a7b5 100644 --- a/packages/dashboard/src/generated/graphql.tsx +++ b/packages/dashboard/src/generated/graphql.tsx @@ -42,7 +42,7 @@ export enum AppCategoriesEnum { Photography = 'PHOTOGRAPHY', Security = 'SECURITY', Social = 'SOCIAL', - Utilities = 'UTILITIES' + Utilities = 'UTILITIES', } export type AppInfo = { @@ -75,7 +75,7 @@ export enum AppStatusEnum { Starting = 'STARTING', Stopped = 'STOPPED', Stopping = 'STOPPING', - Uninstalling = 'UNINSTALLING' + Uninstalling = 'UNINSTALLING', } export type Cpu = { @@ -98,7 +98,7 @@ export enum FieldTypesEnum { Number = 'number', Password = 'password', Text = 'text', - Url = 'url' + Url = 'url', } export type FormField = { @@ -130,37 +130,30 @@ export type Mutation = { updateAppConfig: App; }; - export type MutationInstallAppArgs = { input: AppInputType; }; - export type MutationLoginArgs = { input: UsernamePasswordInput; }; - export type MutationRegisterArgs = { input: UsernamePasswordInput; }; - export type MutationStartAppArgs = { id: Scalars['String']; }; - export type MutationStopAppArgs = { id: Scalars['String']; }; - export type MutationUninstallAppArgs = { id: Scalars['String']; }; - export type MutationUpdateAppConfigArgs = { input: AppInputType; }; @@ -176,7 +169,6 @@ export type Query = { version: VersionResponse; }; - export type QueryGetAppArgs = { id: Scalars['String']; }; @@ -216,103 +208,155 @@ export type InstallAppMutationVariables = Exact<{ input: AppInputType; }>; - -export type InstallAppMutation = { __typename?: 'Mutation', installApp: { __typename: 'App', id: string, status: AppStatusEnum } }; +export type InstallAppMutation = { __typename?: 'Mutation'; installApp: { __typename: 'App'; id: string; status: AppStatusEnum } }; export type LoginMutationVariables = Exact<{ input: UsernamePasswordInput; }>; +export type LoginMutation = { __typename?: 'Mutation'; login: { __typename?: 'UserResponse'; user?: { __typename?: 'User'; id: string } | null } }; -export type LoginMutation = { __typename?: 'Mutation', login: { __typename?: 'UserResponse', user?: { __typename?: 'User', id: string } | null } }; +export type LogoutMutationVariables = Exact<{ [key: string]: never }>; -export type LogoutMutationVariables = Exact<{ [key: string]: never; }>; - - -export type LogoutMutation = { __typename?: 'Mutation', logout: boolean }; +export type LogoutMutation = { __typename?: 'Mutation'; logout: boolean }; export type RegisterMutationVariables = Exact<{ input: UsernamePasswordInput; }>; - -export type RegisterMutation = { __typename?: 'Mutation', register: { __typename?: 'UserResponse', user?: { __typename?: 'User', id: string } | null } }; +export type RegisterMutation = { __typename?: 'Mutation'; register: { __typename?: 'UserResponse'; user?: { __typename?: 'User'; id: string } | null } }; export type StartAppMutationVariables = Exact<{ id: Scalars['String']; }>; - -export type StartAppMutation = { __typename?: 'Mutation', startApp: { __typename: 'App', id: string, status: AppStatusEnum } }; +export type StartAppMutation = { __typename?: 'Mutation'; startApp: { __typename: 'App'; id: string; status: AppStatusEnum } }; export type StopAppMutationVariables = Exact<{ id: Scalars['String']; }>; - -export type StopAppMutation = { __typename?: 'Mutation', stopApp: { __typename: 'App', id: string, status: AppStatusEnum } }; +export type StopAppMutation = { __typename?: 'Mutation'; stopApp: { __typename: 'App'; id: string; status: AppStatusEnum } }; export type UninstallAppMutationVariables = Exact<{ id: Scalars['String']; }>; - -export type UninstallAppMutation = { __typename?: 'Mutation', uninstallApp: { __typename: 'App', id: string, status: AppStatusEnum } }; +export type UninstallAppMutation = { __typename?: 'Mutation'; uninstallApp: { __typename: 'App'; id: string; status: AppStatusEnum } }; export type UpdateAppConfigMutationVariables = Exact<{ input: AppInputType; }>; - -export type UpdateAppConfigMutation = { __typename?: 'Mutation', updateAppConfig: { __typename: 'App', id: string, status: AppStatusEnum } }; +export type UpdateAppConfigMutation = { __typename?: 'Mutation'; updateAppConfig: { __typename: 'App'; id: string; status: AppStatusEnum } }; export type GetAppQueryVariables = Exact<{ appId: Scalars['String']; }>; +export type GetAppQuery = { + __typename?: 'Query'; + getApp: { + __typename?: 'App'; + id: string; + status: AppStatusEnum; + config: any; + info: { + __typename?: 'AppInfo'; + id: string; + port: number; + name: string; + description: string; + available: boolean; + version?: string | null; + image: string; + short_desc: string; + author: string; + source: string; + categories: Array; + url_suffix?: string | null; + form_fields: Array<{ + __typename?: 'FormField'; + type: FieldTypesEnum; + label: string; + max?: number | null; + min?: number | null; + hint?: string | null; + required?: boolean | null; + env_variable: string; + }>; + }; + }; +}; -export type GetAppQuery = { __typename?: 'Query', getApp: { __typename?: 'App', id: string, status: AppStatusEnum, config: any, info: { __typename?: 'AppInfo', id: string, port: number, name: string, description: string, available: boolean, version?: string | null, image: string, short_desc: string, author: string, source: string, categories: Array, url_suffix?: string | null, form_fields: Array<{ __typename?: 'FormField', type: FieldTypesEnum, label: string, max?: number | null, min?: number | null, hint?: string | null, required?: boolean | null, env_variable: string }> } } }; +export type InstalledAppsQueryVariables = Exact<{ [key: string]: never }>; -export type InstalledAppsQueryVariables = Exact<{ [key: string]: never; }>; +export type InstalledAppsQuery = { + __typename?: 'Query'; + installedApps: Array<{ + __typename?: 'App'; + id: string; + status: AppStatusEnum; + config: any; + info: { __typename?: 'AppInfo'; id: string; name: string; description: string; image: string; short_desc: string }; + }>; +}; +export type ConfiguredQueryVariables = Exact<{ [key: string]: never }>; -export type InstalledAppsQuery = { __typename?: 'Query', installedApps: Array<{ __typename?: 'App', id: string, status: AppStatusEnum, config: any, info: { __typename?: 'AppInfo', id: string, name: string, description: string, image: string, short_desc: string } }> }; +export type ConfiguredQuery = { __typename?: 'Query'; isConfigured: boolean }; -export type ConfiguredQueryVariables = Exact<{ [key: string]: never; }>; +export type ListAppsQueryVariables = Exact<{ [key: string]: never }>; +export type ListAppsQuery = { + __typename?: 'Query'; + listAppsInfo: { + __typename?: 'ListAppsResonse'; + total: number; + apps: Array<{ + __typename?: 'AppInfo'; + id: string; + available: boolean; + image: string; + port: number; + name: string; + version?: string | null; + short_desc: string; + author: string; + categories: Array; + }>; + }; +}; -export type ConfiguredQuery = { __typename?: 'Query', isConfigured: boolean }; +export type MeQueryVariables = Exact<{ [key: string]: never }>; -export type ListAppsQueryVariables = Exact<{ [key: string]: never; }>; +export type MeQuery = { __typename?: 'Query'; me?: { __typename?: 'User'; id: string } | null }; +export type SystemInfoQueryVariables = Exact<{ [key: string]: never }>; -export type ListAppsQuery = { __typename?: 'Query', listAppsInfo: { __typename?: 'ListAppsResonse', total: number, apps: Array<{ __typename?: 'AppInfo', id: string, available: boolean, image: string, port: number, name: string, version?: string | null, short_desc: string, author: string, categories: Array }> } }; +export type SystemInfoQuery = { + __typename?: 'Query'; + systemInfo?: { + __typename?: 'SystemInfoResponse'; + cpu: { __typename?: 'Cpu'; load: number }; + disk: { __typename?: 'DiskMemory'; available: number; used: number; total: number }; + memory: { __typename?: 'DiskMemory'; available: number; used: number; total: number }; + } | null; +}; -export type MeQueryVariables = Exact<{ [key: string]: never; }>; - - -export type MeQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string } | null }; - -export type SystemInfoQueryVariables = Exact<{ [key: string]: never; }>; - - -export type SystemInfoQuery = { __typename?: 'Query', systemInfo?: { __typename?: 'SystemInfoResponse', cpu: { __typename?: 'Cpu', load: number }, disk: { __typename?: 'DiskMemory', available: number, used: number, total: number }, memory: { __typename?: 'DiskMemory', available: number, used: number, total: number } } | null }; - -export type VersionQueryVariables = Exact<{ [key: string]: never; }>; - - -export type VersionQuery = { __typename?: 'Query', version: { __typename?: 'VersionResponse', current: string, latest?: string | null } }; +export type VersionQueryVariables = Exact<{ [key: string]: never }>; +export type VersionQuery = { __typename?: 'Query'; version: { __typename?: 'VersionResponse'; current: string; latest?: string | null } }; export const InstallAppDocument = gql` - mutation InstallApp($input: AppInputType!) { - installApp(input: $input) { - id - status - __typename + mutation InstallApp($input: AppInputType!) { + installApp(input: $input) { + id + status + __typename + } } -} - `; +`; export type InstallAppMutationFn = Apollo.MutationFunction; /** @@ -333,21 +377,21 @@ export type InstallAppMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(InstallAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(InstallAppDocument, options); +} export type InstallAppMutationHookResult = ReturnType; export type InstallAppMutationResult = Apollo.MutationResult; export type InstallAppMutationOptions = Apollo.BaseMutationOptions; export const LoginDocument = gql` - mutation Login($input: UsernamePasswordInput!) { - login(input: $input) { - user { - id + mutation Login($input: UsernamePasswordInput!) { + login(input: $input) { + user { + id + } } } -} - `; +`; export type LoginMutationFn = Apollo.MutationFunction; /** @@ -368,17 +412,17 @@ export type LoginMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(LoginDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(LoginDocument, options); +} export type LoginMutationHookResult = ReturnType; export type LoginMutationResult = Apollo.MutationResult; export type LoginMutationOptions = Apollo.BaseMutationOptions; export const LogoutDocument = gql` - mutation Logout { - logout -} - `; + mutation Logout { + logout + } +`; export type LogoutMutationFn = Apollo.MutationFunction; /** @@ -398,21 +442,21 @@ export type LogoutMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(LogoutDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(LogoutDocument, options); +} export type LogoutMutationHookResult = ReturnType; export type LogoutMutationResult = Apollo.MutationResult; export type LogoutMutationOptions = Apollo.BaseMutationOptions; export const RegisterDocument = gql` - mutation Register($input: UsernamePasswordInput!) { - register(input: $input) { - user { - id + mutation Register($input: UsernamePasswordInput!) { + register(input: $input) { + user { + id + } } } -} - `; +`; export type RegisterMutationFn = Apollo.MutationFunction; /** @@ -433,21 +477,21 @@ export type RegisterMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(RegisterDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(RegisterDocument, options); +} export type RegisterMutationHookResult = ReturnType; export type RegisterMutationResult = Apollo.MutationResult; export type RegisterMutationOptions = Apollo.BaseMutationOptions; export const StartAppDocument = gql` - mutation StartApp($id: String!) { - startApp(id: $id) { - id - status - __typename + mutation StartApp($id: String!) { + startApp(id: $id) { + id + status + __typename + } } -} - `; +`; export type StartAppMutationFn = Apollo.MutationFunction; /** @@ -468,21 +512,21 @@ export type StartAppMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(StartAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(StartAppDocument, options); +} export type StartAppMutationHookResult = ReturnType; export type StartAppMutationResult = Apollo.MutationResult; export type StartAppMutationOptions = Apollo.BaseMutationOptions; export const StopAppDocument = gql` - mutation StopApp($id: String!) { - stopApp(id: $id) { - id - status - __typename + mutation StopApp($id: String!) { + stopApp(id: $id) { + id + status + __typename + } } -} - `; +`; export type StopAppMutationFn = Apollo.MutationFunction; /** @@ -503,21 +547,21 @@ export type StopAppMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(StopAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(StopAppDocument, options); +} export type StopAppMutationHookResult = ReturnType; export type StopAppMutationResult = Apollo.MutationResult; export type StopAppMutationOptions = Apollo.BaseMutationOptions; export const UninstallAppDocument = gql` - mutation UninstallApp($id: String!) { - uninstallApp(id: $id) { - id - status - __typename + mutation UninstallApp($id: String!) { + uninstallApp(id: $id) { + id + status + __typename + } } -} - `; +`; export type UninstallAppMutationFn = Apollo.MutationFunction; /** @@ -538,21 +582,21 @@ export type UninstallAppMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UninstallAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(UninstallAppDocument, options); +} export type UninstallAppMutationHookResult = ReturnType; export type UninstallAppMutationResult = Apollo.MutationResult; export type UninstallAppMutationOptions = Apollo.BaseMutationOptions; export const UpdateAppConfigDocument = gql` - mutation UpdateAppConfig($input: AppInputType!) { - updateAppConfig(input: $input) { - id - status - __typename + mutation UpdateAppConfig($input: AppInputType!) { + updateAppConfig(input: $input) { + id + status + __typename + } } -} - `; +`; export type UpdateAppConfigMutationFn = Apollo.MutationFunction; /** @@ -573,44 +617,44 @@ export type UpdateAppConfigMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateAppConfigDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation(UpdateAppConfigDocument, options); +} export type UpdateAppConfigMutationHookResult = ReturnType; export type UpdateAppConfigMutationResult = Apollo.MutationResult; export type UpdateAppConfigMutationOptions = Apollo.BaseMutationOptions; export const GetAppDocument = gql` - query GetApp($appId: String!) { - getApp(id: $appId) { - id - status - config - info { + query GetApp($appId: String!) { + getApp(id: $appId) { id - port - name - description - available - version - image - short_desc - author - source - categories - url_suffix - form_fields { - type - label - max - min - hint - required - env_variable + status + config + info { + id + port + name + description + available + version + image + short_desc + author + source + categories + url_suffix + form_fields { + type + label + max + min + hint + required + env_variable + } } } } -} - `; +`; /** * __useGetAppQuery__ @@ -629,32 +673,32 @@ export const GetAppDocument = gql` * }); */ export function useGetAppQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(GetAppDocument, options); +} export function useGetAppLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetAppDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(GetAppDocument, options); +} export type GetAppQueryHookResult = ReturnType; export type GetAppLazyQueryHookResult = ReturnType; export type GetAppQueryResult = Apollo.QueryResult; export const InstalledAppsDocument = gql` - query InstalledApps { - installedApps { - id - status - config - info { + query InstalledApps { + installedApps { id - name - description - image - short_desc + status + config + info { + id + name + description + image + short_desc + } } } -} - `; +`; /** * __useInstalledAppsQuery__ @@ -672,21 +716,21 @@ export const InstalledAppsDocument = gql` * }); */ export function useInstalledAppsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(InstalledAppsDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(InstalledAppsDocument, options); +} export function useInstalledAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(InstalledAppsDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(InstalledAppsDocument, options); +} export type InstalledAppsQueryHookResult = ReturnType; export type InstalledAppsLazyQueryHookResult = ReturnType; export type InstalledAppsQueryResult = Apollo.QueryResult; export const ConfiguredDocument = gql` - query Configured { - isConfigured -} - `; + query Configured { + isConfigured + } +`; /** * __useConfiguredQuery__ @@ -704,34 +748,34 @@ export const ConfiguredDocument = gql` * }); */ export function useConfiguredQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ConfiguredDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(ConfiguredDocument, options); +} export function useConfiguredLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ConfiguredDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(ConfiguredDocument, options); +} export type ConfiguredQueryHookResult = ReturnType; export type ConfiguredLazyQueryHookResult = ReturnType; export type ConfiguredQueryResult = Apollo.QueryResult; export const ListAppsDocument = gql` - query ListApps { - listAppsInfo { - apps { - id - available - image - port - name - version - short_desc - author - categories + query ListApps { + listAppsInfo { + apps { + id + available + image + port + name + version + short_desc + author + categories + } + total } - total } -} - `; +`; /** * __useListAppsQuery__ @@ -749,23 +793,23 @@ export const ListAppsDocument = gql` * }); */ export function useListAppsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ListAppsDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(ListAppsDocument, options); +} export function useListAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ListAppsDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(ListAppsDocument, options); +} export type ListAppsQueryHookResult = ReturnType; export type ListAppsLazyQueryHookResult = ReturnType; export type ListAppsQueryResult = Apollo.QueryResult; export const MeDocument = gql` - query Me { - me { - id + query Me { + me { + id + } } -} - `; +`; /** * __useMeQuery__ @@ -783,35 +827,35 @@ export const MeDocument = gql` * }); */ export function useMeQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(MeDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(MeDocument, options); +} export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(MeDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(MeDocument, options); +} export type MeQueryHookResult = ReturnType; export type MeLazyQueryHookResult = ReturnType; export type MeQueryResult = Apollo.QueryResult; export const SystemInfoDocument = gql` - query SystemInfo { - systemInfo { - cpu { - load - } - disk { - available - used - total - } - memory { - available - used - total + query SystemInfo { + systemInfo { + cpu { + load + } + disk { + available + used + total + } + memory { + available + used + total + } } } -} - `; +`; /** * __useSystemInfoQuery__ @@ -829,24 +873,24 @@ export const SystemInfoDocument = gql` * }); */ export function useSystemInfoQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(SystemInfoDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(SystemInfoDocument, options); +} export function useSystemInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(SystemInfoDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(SystemInfoDocument, options); +} export type SystemInfoQueryHookResult = ReturnType; export type SystemInfoLazyQueryHookResult = ReturnType; export type SystemInfoQueryResult = Apollo.QueryResult; export const VersionDocument = gql` - query Version { - version { - current - latest + query Version { + version { + current + latest + } } -} - `; +`; /** * __useVersionQuery__ @@ -864,13 +908,13 @@ export const VersionDocument = gql` * }); */ export function useVersionQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(VersionDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery(VersionDocument, options); +} export function useVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(VersionDocument, options); - } + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery(VersionDocument, options); +} export type VersionQueryHookResult = ReturnType; export type VersionLazyQueryHookResult = ReturnType; -export type VersionQueryResult = Apollo.QueryResult; \ No newline at end of file +export type VersionQueryResult = Apollo.QueryResult; diff --git a/packages/dashboard/src/modules/Apps/components/AppActions.tsx b/packages/dashboard/src/modules/Apps/components/AppActions.tsx index 3d9220cb..533031e5 100644 --- a/packages/dashboard/src/modules/Apps/components/AppActions.tsx +++ b/packages/dashboard/src/modules/Apps/components/AppActions.tsx @@ -1,6 +1,7 @@ import { Button } from '@chakra-ui/react'; import React from 'react'; import { FiExternalLink, FiPause, FiPlay, FiSettings, FiTrash2 } from 'react-icons/fi'; +import { TiCancel } from 'react-icons/ti'; import { AppInfo, AppStatusEnum } from '../../../generated/graphql'; interface IProps { @@ -12,9 +13,10 @@ interface IProps { onStop: () => void; onOpen: () => void; onUpdate: () => void; + onCancel: () => void; } -const AppActions: React.FC = ({ app, status, onInstall, onUninstall, onStart, onStop, onOpen, onUpdate }) => { +const AppActions: React.FC = ({ app, status, onInstall, onUninstall, onStart, onStop, onOpen, onUpdate, onCancel }) => { const hasSettings = Object.keys(app.form_fields).length > 0; if (status === AppStatusEnum.Stopped) { @@ -56,6 +58,9 @@ const AppActions: React.FC = ({ app, status, onInstall, onUninstall, onS Install + {`App is ${status.toLowerCase()} please wait and don't refresh page...`} ); diff --git a/packages/dashboard/src/modules/Apps/containers/AppDetails.tsx b/packages/dashboard/src/modules/Apps/containers/AppDetails.tsx index a286c835..5932adc7 100644 --- a/packages/dashboard/src/modules/Apps/containers/AppDetails.tsx +++ b/packages/dashboard/src/modules/Apps/containers/AppDetails.tsx @@ -14,6 +14,7 @@ import { AppInfo, AppStatusEnum, GetAppDocument, + InstalledAppsDocument, useInstallAppMutation, useStartAppMutation, useStopAppMutation, @@ -34,8 +35,8 @@ const AppDetails: React.FC = ({ app, info }) => { const updateDisclosure = useDisclosure(); // Mutations - const [install] = useInstallAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }] }); - const [uninstall] = useUninstallAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }] }); + const [install] = useInstallAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }, { query: InstalledAppsDocument }] }); + const [uninstall] = useUninstallAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }, { query: InstalledAppsDocument }] }); const [stop] = useStopAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }] }); const [start] = useStartAppMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }] }); const [update] = useUpdateAppConfigMutation({ refetchQueries: [{ query: GetAppDocument, variables: { appId: info.id } }] }); @@ -57,7 +58,10 @@ const AppDetails: React.FC = ({ app, info }) => { const handleInstallSubmit = async (values: Record) => { installDisclosure.onClose(); try { - await install({ variables: { input: { form: values, id: info.id } }, optimisticResponse: { installApp: { id: info.id, status: AppStatusEnum.Installing, __typename: 'App' } } }); + await install({ + variables: { input: { form: values, id: info.id } }, + optimisticResponse: { installApp: { id: info.id, status: AppStatusEnum.Installing, __typename: 'App' } }, + }); } catch (error) { handleError(error); } @@ -133,6 +137,7 @@ const AppDetails: React.FC = ({ app, info }) => { onOpen={handleOpen} onStart={handleStartSubmit} onStop={stopDisclosure.onOpen} + onCancel={stopDisclosure.onOpen} onUninstall={uninstallDisclosure.onOpen} onInstall={installDisclosure.onOpen} app={info} diff --git a/packages/system-api/ormconfig.json b/packages/system-api/ormconfig.json new file mode 100644 index 00000000..96f8f099 --- /dev/null +++ b/packages/system-api/ormconfig.json @@ -0,0 +1,10 @@ +{ + "type": "postgres", + "host": "localhost", + "port": 5432, + "username": "postgres", + "password": "postgres", + "database": "test-db", + "entities": ["src/modules/**/*.entity.ts"], + "migrations": ["src/config/migrations/*.ts"] +} diff --git a/packages/system-api/src/config/config.ts b/packages/system-api/src/config/config.ts index 75daec10..9de07e62 100644 --- a/packages/system-api/src/config/config.ts +++ b/packages/system-api/src/config/config.ts @@ -1,4 +1,5 @@ import * as dotenv from 'dotenv'; +import path from 'path'; import { DataSourceOptions } from 'typeorm'; import App from '../modules/apps/app.entity'; import User from '../modules/auth/user.entity'; @@ -57,6 +58,7 @@ const config: IConfig = { logging: !__prod__, synchronize: !__prod__, entities: [App, User], + migrations: [path.join(__dirname, './migrations/*')], }, NODE_ENV, ROOT_FOLDER: '/tipi', diff --git a/packages/system-api/src/core/middlewares/sessionMiddleware.ts b/packages/system-api/src/core/middlewares/sessionMiddleware.ts index ae98c236..78742cdf 100644 --- a/packages/system-api/src/core/middlewares/sessionMiddleware.ts +++ b/packages/system-api/src/core/middlewares/sessionMiddleware.ts @@ -3,7 +3,7 @@ import config from '../../config'; import SessionFileStore from 'session-file-store'; import { COOKIE_MAX_AGE, __prod__ } from '../../config/constants/constants'; -const getSessionMiddleware = async (): Promise => { +const getSessionMiddleware = () => { const FileStore = SessionFileStore(session); return session({ diff --git a/packages/system-api/src/modules/apps/apps.service.ts b/packages/system-api/src/modules/apps/apps.service.ts index c88c5cd3..7888b177 100644 --- a/packages/system-api/src/modules/apps/apps.service.ts +++ b/packages/system-api/src/modules/apps/apps.service.ts @@ -18,11 +18,9 @@ const startApp = async (appName: string): Promise => { await App.update({ id: appName }, { status: AppStatusEnum.STARTING }); // Run script await runAppScript(['start', appName]); - await App.update({ id: appName }, { status: AppStatusEnum.RUNNING }); + const result = await App.update({ id: appName }, { status: AppStatusEnum.RUNNING }); - app = (await App.findOne({ where: { id: appName } })) as App; - - return app; + return result.raw[0]; }; const installApp = async (id: string, form: Record): Promise => { @@ -49,9 +47,9 @@ const installApp = async (id: string, form: Record): Promise => { @@ -80,11 +78,9 @@ const updateAppConfig = async (id: string, form: Record): Promis } generateEnvFile(id, form); - await App.update({ id }, { config: form }); + const result = await App.update({ id }, { config: form }); - app = (await App.findOne({ where: { id } })) as App; - - return app; + return result.raw[0]; }; const stopApp = async (id: string): Promise => { @@ -97,10 +93,9 @@ const stopApp = async (id: string): Promise => { // Run script await App.update({ id }, { status: AppStatusEnum.STOPPING }); await runAppScript(['stop', id]); - await App.update({ id }, { status: AppStatusEnum.STOPPED }); - app = (await App.findOne({ where: { id } })) as App; + const result = await App.update({ id }, { status: AppStatusEnum.STOPPED }); - return app; + return result.raw[0]; }; const uninstallApp = async (id: string): Promise => { diff --git a/packages/system-api/src/server.ts b/packages/system-api/src/server.ts index 0f679b59..4384706d 100644 --- a/packages/system-api/src/server.ts +++ b/packages/system-api/src/server.ts @@ -11,18 +11,38 @@ import logger from './config/logger/logger'; import getSessionMiddleware from './core/middlewares/sessionMiddleware'; import { MyContext } from './types'; import { __prod__ } from './config/constants/constants'; +import cors from 'cors'; const main = async () => { try { const app = express(); const port = 3001; - const sessionMiddleware = await getSessionMiddleware(); - app.use(sessionMiddleware); + app.use( + cors({ + credentials: true, + origin: function (origin, callback) { + // allow requests with no origin + if (!origin) return callback(null, true); + + if (config.CLIENT_URLS.indexOf(origin) === -1) { + const message = "The CORS policy for this origin doesn't allow access from the particular origin."; + return callback(new Error(message), false); + } + + return callback(null, true); + }, + }), + ); + app.use(getSessionMiddleware()); const AppDataSource = new DataSource(config.typeorm); await AppDataSource.initialize(); + if (__prod__) { + await AppDataSource.runMigrations(); + } + const schema = await createSchema(); const httpServer = createServer(app); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 921a4571..8662d031 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,6 +136,7 @@ importers: '@types/jest': ^27.5.0 '@types/jsonwebtoken': ^8.5.8 '@types/mock-fs': ^4.13.1 + '@types/node': 17.0.31 '@types/pg': ^8.6.5 '@types/session-file-store': ^1.2.2 '@types/tcp-port-used': ^1.0.1 @@ -180,6 +181,7 @@ importers: systeminformation: ^5.11.9 tcp-port-used: ^1.0.2 ts-jest: ^28.0.2 + ts-node: ^10.8.2 type-graphql: ^1.1.1 typeorm: ^0.3.6 typescript: 4.6.4 @@ -212,7 +214,7 @@ importers: systeminformation: 5.11.14 tcp-port-used: 1.0.2 type-graphql: 1.1.1_v2revtygxcm7xrdg2oz3ssohfu - typeorm: 0.3.6_pg@8.7.3 + typeorm: 0.3.6_pg@8.7.3+ts-node@10.8.2 winston: 3.7.2 devDependencies: '@faker-js/faker': 7.3.0 @@ -224,6 +226,7 @@ importers: '@types/jest': 27.5.0 '@types/jsonwebtoken': 8.5.8 '@types/mock-fs': 4.13.1 + '@types/node': 17.0.31 '@types/pg': 8.6.5 '@types/session-file-store': 1.2.2 '@types/tcp-port-used': 1.0.1 @@ -237,11 +240,12 @@ importers: eslint-config-prettier: 8.5.0_eslint@8.15.0 eslint-plugin-import: 2.26.0_6nacgdzqm4zbhelsxkmd2vkvxy eslint-plugin-prettier: 4.0.0_iqftbjqlxzn3ny5nablrkczhqi - jest: 28.1.0 + jest: 28.1.0_qxft4nzwxz7jey57xog52j3doy nodemon: 2.0.16 prettier: 2.6.2 rimraf: 3.0.2 ts-jest: 28.0.2_k4xvjffwcpckmnpd5fcvxvnd24 + ts-node: 10.8.2_l47be6km5p57gglrggidw5gsgm typescript: 4.6.4 packages: @@ -1954,6 +1958,13 @@ packages: engines: {node: '>=0.1.90'} dev: false + /@cspotcode/source-map-support/0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + /@ctrl/tinycolor/3.4.1: resolution: {integrity: sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==} engines: {node: '>=10'} @@ -2692,6 +2703,49 @@ packages: - ts-node dev: true + /@jest/core/28.1.0_ts-node@10.8.2: + resolution: {integrity: sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/console': 28.1.0 + '@jest/reporters': 28.1.0 + '@jest/test-result': 28.1.0 + '@jest/transform': 28.1.0 + '@jest/types': 28.1.0 + '@types/node': 17.0.31 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.3.0 + exit: 0.1.2 + graceful-fs: 4.2.10 + jest-changed-files: 28.0.2 + jest-config: 28.1.0_qxft4nzwxz7jey57xog52j3doy + jest-haste-map: 28.1.0 + jest-message-util: 28.1.0 + jest-regex-util: 28.0.2 + jest-resolve: 28.1.0 + jest-resolve-dependencies: 28.1.0 + jest-runner: 28.1.0 + jest-runtime: 28.1.0 + jest-snapshot: 28.1.0 + jest-util: 28.1.0 + jest-validate: 28.1.0 + jest-watcher: 28.1.0 + micromatch: 4.0.5 + pretty-format: 28.1.0 + rimraf: 3.0.2 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /@jest/environment/28.1.0: resolution: {integrity: sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -2892,6 +2946,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.13 dev: true + /@jridgewell/trace-mapping/0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.0.7 + '@jridgewell/sourcemap-codec': 1.4.13 + dev: true + /@leichtgewicht/ip-codec/2.0.3: resolution: {integrity: sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg==} dev: false @@ -3184,6 +3245,22 @@ packages: engines: {node: '>= 10'} dev: true + /@tsconfig/node10/1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12/1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14/1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16/1.0.3: + resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} + dev: true + /@types/accepts/1.3.5: resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==} dependencies: @@ -3871,6 +3948,11 @@ packages: engines: {node: '>=0.4.0'} dev: true + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -5950,7 +6032,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.22.0_uhoeudlwl7kc47h4kncsfowede + '@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -7642,34 +7724,6 @@ packages: - supports-color dev: true - /jest-cli/28.1.0: - resolution: {integrity: sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 28.1.0 - '@jest/test-result': 28.1.0 - '@jest/types': 28.1.0 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.10 - import-local: 3.1.0 - jest-config: 28.1.0 - jest-util: 28.1.0 - jest-validate: 28.1.0 - prompts: 2.4.2 - yargs: 17.4.1 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node - dev: true - /jest-cli/28.1.0_@types+node@17.0.31: resolution: {integrity: sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -7698,42 +7752,32 @@ packages: - ts-node dev: true - /jest-config/28.1.0: - resolution: {integrity: sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==} + /jest-cli/28.1.0_qxft4nzwxz7jey57xog52j3doy: + resolution: {integrity: sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + hasBin: true peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: - '@types/node': - optional: true - ts-node: + node-notifier: optional: true dependencies: - '@babel/core': 7.17.10 - '@jest/test-sequencer': 28.1.0 + '@jest/core': 28.1.0_ts-node@10.8.2 + '@jest/test-result': 28.1.0 '@jest/types': 28.1.0 - babel-jest: 28.1.0_@babel+core@7.17.10 chalk: 4.1.2 - ci-info: 3.3.0 - deepmerge: 4.2.2 - glob: 7.2.0 + exit: 0.1.2 graceful-fs: 4.2.10 - jest-circus: 28.1.0 - jest-environment-node: 28.1.0 - jest-get-type: 28.0.2 - jest-regex-util: 28.0.2 - jest-resolve: 28.1.0 - jest-runner: 28.1.0 + import-local: 3.1.0 + jest-config: 28.1.0_qxft4nzwxz7jey57xog52j3doy jest-util: 28.1.0 jest-validate: 28.1.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 28.1.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 + prompts: 2.4.2 + yargs: 17.4.1 transitivePeerDependencies: + - '@types/node' - supports-color + - ts-node dev: true /jest-config/28.1.0_@types+node@17.0.31: @@ -7775,6 +7819,46 @@ packages: - supports-color dev: true + /jest-config/28.1.0_qxft4nzwxz7jey57xog52j3doy: + resolution: {integrity: sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.17.10 + '@jest/test-sequencer': 28.1.0 + '@jest/types': 28.1.0 + '@types/node': 17.0.31 + babel-jest: 28.1.0_@babel+core@7.17.10 + chalk: 4.1.2 + ci-info: 3.3.0 + deepmerge: 4.2.2 + glob: 7.2.0 + graceful-fs: 4.2.10 + jest-circus: 28.1.0 + jest-environment-node: 28.1.0 + jest-get-type: 28.0.2 + jest-regex-util: 28.0.2 + jest-resolve: 28.1.0 + jest-runner: 28.1.0 + jest-util: 28.1.0 + jest-validate: 28.1.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 28.1.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.8.2_l47be6km5p57gglrggidw5gsgm + transitivePeerDependencies: + - supports-color + dev: true + /jest-diff/27.5.1: resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -8084,25 +8168,6 @@ packages: supports-color: 8.1.1 dev: true - /jest/28.1.0: - resolution: {integrity: sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 28.1.0 - import-local: 3.1.0 - jest-cli: 28.1.0 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node - dev: true - /jest/28.1.0_@types+node@17.0.31: resolution: {integrity: sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -8122,6 +8187,25 @@ packages: - ts-node dev: true + /jest/28.1.0_qxft4nzwxz7jey57xog52j3doy: + resolution: {integrity: sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==} + engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 28.1.0_ts-node@10.8.2 + import-local: 3.1.0 + jest-cli: 28.1.0_qxft4nzwxz7jey57xog52j3doy + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node + dev: true + /js-cookie/3.0.1: resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==} engines: {node: '>=12'} @@ -11174,7 +11258,7 @@ packages: bs-logger: 0.2.6 esbuild: 0.14.38 fast-json-stable-stringify: 2.1.0 - jest: 28.1.0 + jest: 28.1.0_qxft4nzwxz7jey57xog52j3doy jest-util: 28.1.0 json5: 2.2.1 lodash.memoize: 4.1.2 @@ -11222,6 +11306,37 @@ packages: resolution: {integrity: sha512-DEQrfv6l7IvN2jlzc/VTdZJYsWUnQNCsueYjMkC/iXoEoi5fNan6MjeDqkvhfzbmHgdz9UxDUluX3V5HdjTydQ==} dev: true + /ts-node/10.8.2_l47be6km5p57gglrggidw5gsgm: + resolution: {integrity: sha512-LYdGnoGddf1D6v8REPtIH+5iq/gTDuZqv2/UJUU7tKjuEU8xVZorBM+buCGNjj+pGEud+sOoM4CX3/YzINpENA==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 17.0.31 + acorn: 8.7.1 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.6.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /ts-node/9.1.1_typescript@4.6.4: resolution: {integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==} engines: {node: '>=10.0.0'} @@ -11322,7 +11437,7 @@ packages: dependencies: is-typedarray: 1.0.0 - /typeorm/0.3.6_pg@8.7.3: + /typeorm/0.3.6_pg@8.7.3+ts-node@10.8.2: resolution: {integrity: sha512-DRqgfqcelMiGgWSMbBmVoJNFN2nPNA3EeY2gC324ndr2DZoGRTb9ILtp2oGVGnlA+cu5zgQ6it5oqKFNkte7Aw==} engines: {node: '>= 12.9.0'} hasBin: true @@ -11394,6 +11509,7 @@ packages: pg: 8.7.3 reflect-metadata: 0.1.13 sha.js: 2.4.11 + ts-node: 10.8.2_l47be6km5p57gglrggidw5gsgm tslib: 2.4.0 uuid: 8.3.2 xml2js: 0.4.23 @@ -11647,6 +11763,10 @@ packages: sade: 1.8.1 dev: false + /v8-compile-cache-lib/3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true + /v8-compile-cache/2.3.0: resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} dev: true