mirror of
https://github.com/docmost/docmost.git
synced 2025-11-19 01:31:11 +10:00
restructure directories
* set log level based on env
This commit is contained in:
@ -2,7 +2,7 @@ import { Global, Module } from '@nestjs/common';
|
||||
import { EnvironmentService } from './environment.service';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { validate } from './environment.validation';
|
||||
import { envPath } from '../../helpers';
|
||||
import { envPath } from '../../common/helpers';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
import { ConsoleLogger } from '@nestjs/common';
|
||||
|
||||
export class InternalLogFilter extends ConsoleLogger {
|
||||
static contextsToIgnore = [
|
||||
'InstanceLoader',
|
||||
'RoutesResolver',
|
||||
'RouterExplorer',
|
||||
'WebSocketsController',
|
||||
];
|
||||
|
||||
log(_: any, context?: string): void {
|
||||
if (
|
||||
process.env.NODE_ENV !== 'production' ||
|
||||
!InternalLogFilter.contextsToIgnore.includes(context)
|
||||
) {
|
||||
super.log.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { BullModule } from '@nestjs/bullmq';
|
||||
import { EnvironmentService } from '../environment/environment.service';
|
||||
import { createRetryStrategy, parseRedisUrl } from '../../helpers';
|
||||
import { createRetryStrategy, parseRedisUrl } from '../../common/helpers';
|
||||
import { QueueName } from './constants';
|
||||
|
||||
@Global()
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
import { streamToBuffer } from '../storage.utils';
|
||||
import { Readable } from 'stream';
|
||||
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
||||
import { getMimeType } from '../../../helpers';
|
||||
import { getMimeType } from '../../../common/helpers';
|
||||
|
||||
export class S3Driver implements StorageDriver {
|
||||
private readonly s3Client: S3Client;
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
} from '../interfaces';
|
||||
import { LocalDriver, S3Driver } from '../drivers';
|
||||
import * as process from 'node:process';
|
||||
import { LOCAL_STORAGE_PATH } from '../../../helpers';
|
||||
import { LOCAL_STORAGE_PATH } from '../../../common/helpers';
|
||||
|
||||
function createStorageDriver(disk: StorageConfig): StorageDriver {
|
||||
switch (disk.driver) {
|
||||
|
||||
Reference in New Issue
Block a user