diff --git a/packages/chronos/chronos.ts b/packages/chronos/chronos.ts index 58ac849826c..e193a25676e 100644 --- a/packages/chronos/chronos.ts +++ b/packages/chronos/chronos.ts @@ -17,8 +17,8 @@ import {CronJob} from 'cron' import getGraphQLExecutor from 'parabol-server/utils/getGraphQLExecutor' -import publishWebhookGQL from 'parabol-server/utils/publishWebhookGQL' import {Logger} from 'parabol-server/utils/Logger' +import publishWebhookGQL from 'parabol-server/utils/publishWebhookGQL' interface PossibleJob { onTick(): void diff --git a/packages/embedder/ai_models/OpenAIGeneration.ts b/packages/embedder/ai_models/OpenAIGeneration.ts index 6e3ece5d30b..a67b328ff69 100644 --- a/packages/embedder/ai_models/OpenAIGeneration.ts +++ b/packages/embedder/ai_models/OpenAIGeneration.ts @@ -1,10 +1,10 @@ import OpenAI from 'openai' +import {Logger} from '../../server/utils/Logger' import { AbstractGenerationModel, GenerationModelParams, GenerationOptions } from './AbstractGenerationModel' -import {Logger} from '../../server/utils/Logger' export type ModelId = 'gpt-3.5-turbo-0125' | 'gpt-4-turbo-preview' diff --git a/packages/embedder/ai_models/TextGenerationInference.ts b/packages/embedder/ai_models/TextGenerationInference.ts index c3b3d8458b2..db0871083c1 100644 --- a/packages/embedder/ai_models/TextGenerationInference.ts +++ b/packages/embedder/ai_models/TextGenerationInference.ts @@ -1,10 +1,10 @@ +import {Logger} from '../../server/utils/Logger' import { AbstractGenerationModel, GenerationModelParams, GenerationOptions } from './AbstractGenerationModel' import fetchWithRetry from './helpers/fetchWithRetry' -import {Logger} from '../../server/utils/Logger' const MAX_REQUEST_TIME_S = 3 * 60 diff --git a/packages/embedder/debug.ts b/packages/embedder/debug.ts index 1db933d98f4..48390d03614 100644 --- a/packages/embedder/debug.ts +++ b/packages/embedder/debug.ts @@ -1,8 +1,8 @@ // call with yarn sucrase-node billing/debug.ts import '../../scripts/webpack/utils/dotenv' import getKysely from '../server/postgres/getKysely' -import {WorkflowOrchestrator} from './WorkflowOrchestrator' import {Logger} from '../server/utils/Logger' +import {WorkflowOrchestrator} from './WorkflowOrchestrator' const debugFailedJob = async () => { const pg = getKysely() diff --git a/packages/server/email/MailManagerDebug.ts b/packages/server/email/MailManagerDebug.ts index 7728c8aee52..0ccccd57cd2 100644 --- a/packages/server/email/MailManagerDebug.ts +++ b/packages/server/email/MailManagerDebug.ts @@ -1,6 +1,6 @@ import fs from 'fs' -import MailManager, {MailManagerOptions} from './MailManager' import {Logger} from '../utils/Logger' +import MailManager, {MailManagerOptions} from './MailManager' export default class MailManagerDebug extends MailManager { async sendEmail(options: MailManagerOptions) { diff --git a/packages/server/fileStorage/LocalFileStoreManager.ts b/packages/server/fileStorage/LocalFileStoreManager.ts index 4ebb8c6c381..8fab6626d9d 100644 --- a/packages/server/fileStorage/LocalFileStoreManager.ts +++ b/packages/server/fileStorage/LocalFileStoreManager.ts @@ -2,8 +2,8 @@ import fs from 'fs' import makeAppURL from 'parabol-client/utils/makeAppURL' import path from 'path' import appOrigin from '../appOrigin' -import FileStoreManager from './FileStoreManager' import {Logger} from '../utils/Logger' +import FileStoreManager from './FileStoreManager' export default class LocalFileStoreManager extends FileStoreManager { baseUrl = makeAppURL(appOrigin, 'self-hosted') diff --git a/packages/server/fileStorage/S3FileStoreManager.ts b/packages/server/fileStorage/S3FileStoreManager.ts index 780a58bbaf4..89c3a4a8957 100644 --- a/packages/server/fileStorage/S3FileStoreManager.ts +++ b/packages/server/fileStorage/S3FileStoreManager.ts @@ -4,8 +4,8 @@ import type {RetryErrorInfo, StandardRetryToken} from '@smithy/types' import {StandardRetryStrategy} from '@smithy/util-retry' import mime from 'mime-types' import path from 'path' -import FileStoreManager, {FileAssetDir} from './FileStoreManager' import {Logger} from '../utils/Logger' +import FileStoreManager, {FileAssetDir} from './FileStoreManager' class CloudflareRetry extends StandardRetryStrategy { public async refreshRetryTokenForRetry( diff --git a/packages/server/graphql/composeResolvers.ts b/packages/server/graphql/composeResolvers.ts index f1e4389392b..43e6f9b6cd0 100644 --- a/packages/server/graphql/composeResolvers.ts +++ b/packages/server/graphql/composeResolvers.ts @@ -13,8 +13,8 @@ import {defaultFieldResolver} from 'graphql' import {allow} from 'graphql-shield' import type {ShieldRule} from 'graphql-shield/dist/types' import hash from 'object-hash' -import {ResolverFn} from './private/resolverTypes' import {Logger} from '../utils/Logger' +import {ResolverFn} from './private/resolverTypes' type Resolver = ResolverFn diff --git a/packages/server/graphql/private/mutations/backupOrganization.ts b/packages/server/graphql/private/mutations/backupOrganization.ts index eada47cb4df..7b6db2d24ac 100644 --- a/packages/server/graphql/private/mutations/backupOrganization.ts +++ b/packages/server/graphql/private/mutations/backupOrganization.ts @@ -6,8 +6,8 @@ import getProjectRoot from '../../../../../scripts/webpack/utils/getProjectRoot' import getKysely from '../../../postgres/getKysely' import getPg from '../../../postgres/getPg' import getPgConfig from '../../../postgres/getPgConfig' -import {MutationResolvers} from '../resolverTypes' import {Logger} from '../../../utils/Logger' +import {MutationResolvers} from '../resolverTypes' const exec = util.promisify(childProcess.exec) diff --git a/packages/server/graphql/private/queries/orgActivities.ts b/packages/server/graphql/private/queries/orgActivities.ts index 63d1fd1f249..e0b1da0d381 100644 --- a/packages/server/graphql/private/queries/orgActivities.ts +++ b/packages/server/graphql/private/queries/orgActivities.ts @@ -1,7 +1,7 @@ import {sql} from 'kysely' import getKysely from '../../../postgres/getKysely' -import {OrgActivityRow, QueryResolvers} from '../resolverTypes' import {Logger} from '../../../utils/Logger' +import {OrgActivityRow, QueryResolvers} from '../resolverTypes' const orgActivities: QueryResolvers['orgActivities'] = async (_source, {startDate, endDate}) => { const pg = getKysely() diff --git a/packages/server/listenHandler.ts b/packages/server/listenHandler.ts index 10f2c5cdba0..2a862ad028b 100644 --- a/packages/server/listenHandler.ts +++ b/packages/server/listenHandler.ts @@ -1,7 +1,7 @@ import {us_listen_socket} from 'uWebSockets.js' import getGraphQLExecutor from './utils/getGraphQLExecutor' -import serverHealthChecker from './utils/serverHealthChecker' import {Logger} from './utils/Logger' +import serverHealthChecker from './utils/serverHealthChecker' const listenHandler = (listenSocket: us_listen_socket) => { const PORT = Number(__PRODUCTION__ ? process.env.PORT : process.env.SOCKET_PORT) diff --git a/packages/server/server.ts b/packages/server/server.ts index c5fbed65e5d..dd938019ecb 100644 --- a/packages/server/server.ts +++ b/packages/server/server.ts @@ -22,8 +22,8 @@ import handleUpgrade from './socketHandlers/handleUpgrade' import SSEConnectionHandler from './sse/SSEConnectionHandler' import SSEPingHandler from './sse/SSEPingHandler' import staticFileHandler from './staticFileHandler' -import SAMLHandler from './utils/SAMLHandler' import {Logger} from './utils/Logger' +import SAMLHandler from './utils/SAMLHandler' tracer.init({ service: `web`, diff --git a/packages/server/staticFileHandler.ts b/packages/server/staticFileHandler.ts index 387b759252a..2acf90b4cf8 100644 --- a/packages/server/staticFileHandler.ts +++ b/packages/server/staticFileHandler.ts @@ -1,7 +1,7 @@ import {HttpRequest, HttpResponse} from 'uWebSockets.js' import acceptsBrotli from './acceptsBrotli' -import serveStatic from './utils/serveStatic' import {Logger} from './utils/Logger' +import serveStatic from './utils/serveStatic' const ROUTE = '/static/' let hasWarned = false diff --git a/packages/server/utils/serverHealthChecker.ts b/packages/server/utils/serverHealthChecker.ts index be90f52ef7e..86211b7b977 100644 --- a/packages/server/utils/serverHealthChecker.ts +++ b/packages/server/utils/serverHealthChecker.ts @@ -2,10 +2,10 @@ import sleep from '../../client/utils/sleep' import ServerAuthToken from '../database/types/ServerAuthToken' import {UserPresence} from '../graphql/private/mutations/connectSocket' import {disconnectQuery} from '../socketHandlers/handleDisconnect' +import {Logger} from './Logger' import RedisInstance from './RedisInstance' import publishInternalGQL from './publishInternalGQL' import sendToSentry from './sendToSentry' -import {Logger} from './Logger' const SERVER_ID = process.env.SERVER_ID! const INSTANCE_ID = `${SERVER_ID}:${process.pid}` diff --git a/packages/server/utils/stripe/StubStripeManager.ts b/packages/server/utils/stripe/StubStripeManager.ts index ed7b84c0d3f..074f2366892 100644 --- a/packages/server/utils/stripe/StubStripeManager.ts +++ b/packages/server/utils/stripe/StubStripeManager.ts @@ -1,7 +1,7 @@ import Stripe from 'stripe' import {toEpochSeconds} from '../epochTime' -import StripeManager from './StripeManager' import {Logger} from '../Logger' +import StripeManager from './StripeManager' // using proxy to start gradual coverage of StripeManager export default function StubStripeManager() {