diff --git a/api/src/graphql/client/api/get-api-client.ts b/api/src/graphql/client/api/get-api-client.ts index be92192a2..4850ff2fd 100644 --- a/api/src/graphql/client/api/get-api-client.ts +++ b/api/src/graphql/client/api/get-api-client.ts @@ -1,10 +1,11 @@ +import WebSocket from 'ws'; + import { ApolloClient, HttpLink, InMemoryCache, split } from '@apollo/client/core/index.js'; import { onError } from '@apollo/client/link/error/index.js'; import { GraphQLWsLink } from '@apollo/client/link/subscriptions/index.js'; import { getMainDefinition } from '@apollo/client/utilities/index.js'; import { fetch } from 'cross-fetch'; import { createClient } from 'graphql-ws'; -import WebSocket from 'ws'; import { getInternalApiAddress } from '@app/consts'; import { graphqlLogger } from '@app/core/log'; diff --git a/api/src/index.ts b/api/src/index.ts index 61f5677c0..7339b1cf6 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -6,11 +6,11 @@ import { type NestFastifyApplication } from '@nestjs/platform-fastify'; import { unlinkSync } from 'fs'; import http from 'http'; import https from 'https'; +import { WebSocket } from 'ws'; import type { RawServerDefault } from 'fastify'; import CacheableLookup from 'cacheable-lookup'; import { asyncExitHook, gracefulExit } from 'exit-hook'; -import { WebSocket } from 'ws'; import { logger } from '@app/core/log'; import { fileExistsSync } from '@app/core/utils/files/file-exists'; diff --git a/api/src/mothership/graphql-client.ts b/api/src/mothership/graphql-client.ts index 9ac14538e..83de98d53 100644 --- a/api/src/mothership/graphql-client.ts +++ b/api/src/mothership/graphql-client.ts @@ -1,3 +1,5 @@ +import { WebSocket } from 'ws'; + import type { NormalizedCacheObject } from '@apollo/client/core/index.js'; import type { Client, Event as ClientEvent } from 'graphql-ws'; import { ApolloClient, ApolloLink, InMemoryCache, Observable } from '@apollo/client/core/index.js'; @@ -5,7 +7,6 @@ import { ErrorLink } from '@apollo/client/link/error/index.js'; import { RetryLink } from '@apollo/client/link/retry/index.js'; import { GraphQLWsLink } from '@apollo/client/link/subscriptions/index.js'; import { createClient } from 'graphql-ws'; -import { WebSocket } from 'ws'; import { FIVE_MINUTES_MS } from '@app/consts'; import { minigraphLogger } from '@app/core/log'; diff --git a/api/src/unraid-api/auth/api-key.service.ts b/api/src/unraid-api/auth/api-key.service.ts index 6c0720e2d..20fc7a2ce 100644 --- a/api/src/unraid-api/auth/api-key.service.ts +++ b/api/src/unraid-api/auth/api-key.service.ts @@ -10,13 +10,13 @@ import { AuthActionVerb } from 'nest-authz'; import { v4 as uuidv4 } from 'uuid'; import { ZodError } from 'zod'; +import type { Permission } from '@app/graphql/generated/api/types'; import { environment } from '@app/environment'; import { ApiKeySchema, ApiKeyWithSecretSchema } from '@app/graphql/generated/api/operations'; import { AddPermissionInput, ApiKey, ApiKeyWithSecret, - type Permission, Resource, Role, } from '@app/graphql/generated/api/types'; diff --git a/api/src/unraid-api/cli/apikey/add-api-key.questions.ts b/api/src/unraid-api/cli/apikey/add-api-key.questions.ts index cddf941ff..15be24eb0 100644 --- a/api/src/unraid-api/cli/apikey/add-api-key.questions.ts +++ b/api/src/unraid-api/cli/apikey/add-api-key.questions.ts @@ -1,6 +1,7 @@ import { ChoicesFor, Question, QuestionSet, WhenFor } from 'nest-commander'; -import { type Permission, Role } from '@app/graphql/generated/api/types'; +import type { Permission } from '@app/graphql/generated/api/types'; +import { Role } from '@app/graphql/generated/api/types'; import { ApiKeyService } from '@app/unraid-api/auth/api-key.service'; import { LogService } from '@app/unraid-api/cli/log.service'; diff --git a/api/src/unraid-api/cli/apikey/api-key.command.ts b/api/src/unraid-api/cli/apikey/api-key.command.ts index 8e7c67feb..ac33e23cd 100644 --- a/api/src/unraid-api/cli/apikey/api-key.command.ts +++ b/api/src/unraid-api/cli/apikey/api-key.command.ts @@ -1,7 +1,8 @@ import { AuthActionVerb } from 'nest-authz'; import { Command, CommandRunner, InquirerService, Option } from 'nest-commander'; -import { type Permission, Resource, Role } from '@app/graphql/generated/api/types'; +import type { Permission } from '@app/graphql/generated/api/types'; +import { Resource, Role } from '@app/graphql/generated/api/types'; import { ApiKeyService } from '@app/unraid-api/auth/api-key.service'; import { AddApiKeyQuestionSet } from '@app/unraid-api/cli/apikey/add-api-key.questions'; import { LogService } from '@app/unraid-api/cli/log.service';