Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fixed error with import

unknownd7481867d37b
diff --git a/src/analytics/analytics.controller.ts b/src/analytics/analytics.controller.ts
index 9bc908bbf..d1df2adfd 100644
--- a/src/analytics/analytics.controller.ts
+++ b/src/analytics/analytics.controller.ts
@@ -39,7 +39,7 @@ import {
import { TaskManagerService } from '../task-manager/task-manager.service'
import { CurrentUserId } from '../common/decorators/current-user-id.decorator'
import { DEFAULT_TIMEZONE } from '../user/entities/user.entity'
-import { RolesGuard } from 'src/common/guards/roles.guard'
+import { RolesGuard } from '../common/guards/roles.guard'
import { PageviewsDTO } from './dto/pageviews.dto'
import { EventsDTO } from './dto/events.dto'
import { AnalyticsGET_DTO } from './dto/getData.dto'
@@ -55,8 +55,8 @@ import {
REDIS_PAGEVIEWS_COUNT_KEY,
REDIS_SESSION_SALT_KEY,
} from '../common/constants'
-import { BotDetection } from 'src/common/decorators/bot-detection.decorator'
-import { BotDetectionGuard } from 'src/common/guards/bot-detection.guard'
+import { BotDetection } from '../common/decorators/bot-detection.decorator'
+import { BotDetectionGuard } from '../common/guards/bot-detection.guard'
dayjs.extend(utc)
dayjs.extend(timezone)
diff --git a/src/app.module.ts b/src/app.module.ts
index 9ef544dcd..6479446d2 100644
--- a/src/app.module.ts
+++ b/src/app.module.ts
@@ -23,14 +23,6 @@ import { MarketplaceModule } from './marketplace/marketplace.module'
import { Category } from './marketplace/categories/category.entity'
import { Extension } from './marketplace/extensions/extension.entity'
-const entities = []
-
-if (process.env.ACTIVATE_MARKETPLACE) {
- entities.push(User, ActionToken, Project, ProjectShare, Extension, Category)
-} else {
- entities.push(User, ActionToken, Project, ProjectShare)
-}
-
const modules = [
ConfigModule.forRoot({ envFilePath: '.env' }),
TypeOrmModule.forRoot({
@@ -41,7 +33,9 @@ const modules = [
password: process.env.MYSQL_ROOT_PASSWORD,
database: process.env.MYSQL_DATABASE,
synchronize: process.env.NODE_ENV === 'development',
- entities,
+ entities: process.env.ACTIVATE_MARKETPLACE
+ ? [User, ActionToken, Project, ProjectShare, Extension, Category]
+ : [User, ActionToken, Project, ProjectShare],
}),
ScheduleModule.forRoot(),
TaskManagerModule,
diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts
index 573126381..9b34b35fa 100644
--- a/src/auth/auth.controller.ts
+++ b/src/auth/auth.controller.ts
@@ -22,7 +22,7 @@ import { MailerService } from '../mailer/mailer.service'
import { ActionTokensService } from '../action-tokens/action-tokens.service'
import { ActionTokenType } from '../action-tokens/action-token.entity'
import { User, UserType } from '../user/entities/user.entity'
-import { ProjectService } from 'src/project/project.service'
+import { ProjectService } from '../project/project.service'
import { PasswordChangeDTO } from './dto/password-change.dto'
import { RequestPasswordChangeDTO } from './dto/request-pass-change.dto'
import { RolesGuard } from '../common/guards/roles.guard'
@@ -37,7 +37,7 @@ import {
SELFHOSTED_EMAIL,
SELFHOSTED_PASSWORD,
SELFHOSTED_UUID,
-} from 'src/common/constants'
+} from '../common/constants'
import * as _pick from 'lodash/pick'
// TODO: Add logout endpoint to invalidate the token
diff --git a/src/common/guards/bot-detection.guard.ts b/src/common/guards/bot-detection.guard.ts
index 1e0064324..68dac9ce8 100644
--- a/src/common/guards/bot-detection.guard.ts
+++ b/src/common/guards/bot-detection.guard.ts
@@ -6,7 +6,7 @@ import {
} from '@nestjs/common'
import { Reflector } from '@nestjs/core'
import * as isbot from 'isbot'
-import { IS_BOT_DETECTION_ENABLED } from 'src/common/decorators/bot-detection.decorator'
+import { IS_BOT_DETECTION_ENABLED } from '../../common/decorators/bot-detection.decorator'
@Injectable()
export class BotDetectionGuard implements CanActivate {
diff --git a/src/common/utils.ts b/src/common/utils.ts
index 727343714..9474ade95 100644
--- a/src/common/utils.ts
+++ b/src/common/utils.ts
@@ -16,7 +16,7 @@ import * as utc from 'dayjs/plugin/utc'
import * as _map from 'lodash/map'
import { redis } from './constants'
import { clickhouse } from './constants'
-import { Project } from 'src/project/entity/project.entity'
+import { Project } from '../project/entity/project.entity'
dayjs.extend(utc)
diff --git a/src/mailer/mailer.module.ts b/src/mailer/mailer.module.ts
index e6ac47b24..606610607 100644
--- a/src/mailer/mailer.module.ts
+++ b/src/mailer/mailer.module.ts
@@ -1,5 +1,5 @@
import { Module } from '@nestjs/common'
-import { AppLoggerModule } from 'src/logger/logger.module'
+import { AppLoggerModule } from '../logger/logger.module'
import { MailerService } from './mailer.service'
@Module({
diff --git a/src/mailer/mailer.service.ts b/src/mailer/mailer.service.ts
index 4abf6b769..2e30621b0 100644
--- a/src/mailer/mailer.service.ts
+++ b/src/mailer/mailer.service.ts
@@ -4,8 +4,8 @@ import handlebars from 'handlebars'
import { LetterTemplate } from './letter'
import fs = require('fs')
import path = require('path')
-import { AppLoggerService } from 'src/logger/logger.service'
-import { SEND_WARNING_AT_PERC } from 'src/common/constants'
+import { AppLoggerService } from '../logger/logger.service'
+import { SEND_WARNING_AT_PERC } from '../common/constants'
const TEMPLATES_PATH = path.join(__dirname, '..', 'common', 'templates')
const metaInfoJson = {
diff --git a/src/project/project.controller.ts b/src/project/project.controller.ts
index 8233a1c68..9d9b2f521 100644
--- a/src/project/project.controller.ts
+++ b/src/project/project.controller.ts
@@ -30,7 +30,7 @@ import { ActionTokensService } from '../action-tokens/action-tokens.service'
import { MailerService } from '../mailer/mailer.service'
import { LetterTemplate } from '../mailer/letter'
import { Roles } from '../common/decorators/roles.decorator'
-import { SelfhostedGuard } from 'src/common/guards/selfhosted.guard'
+import { SelfhostedGuard } from '../common/guards/selfhosted.guard'
import { RolesGuard } from '../common/guards/roles.guard'
import { Pagination } from '../common/pagination/pagination'
import { Project } from './entity/project.entity'
diff --git a/src/task-manager/task-manager.module.ts b/src/task-manager/task-manager.module.ts
index e5b54b383..ace411d4e 100644
--- a/src/task-manager/task-manager.module.ts
+++ b/src/task-manager/task-manager.module.ts
@@ -4,7 +4,7 @@ import { MailerModule } from '../mailer/mailer.module'
import { UserModule } from '../user/user.module'
import { ProjectModule } from '../project/project.module'
import { AnalyticsModule } from '../analytics/analytics.module'
-import { ActionTokensModule } from 'src/action-tokens/action-tokens.module'
+import { ActionTokensModule } from '../action-tokens/action-tokens.module'
@Module({
imports: [
diff --git a/src/task-manager/task-manager.service.ts b/src/task-manager/task-manager.service.ts
index 96a6e9755..a72fee555 100644
--- a/src/task-manager/task-manager.service.ts
+++ b/src/task-manager/task-manager.service.ts
@@ -13,8 +13,8 @@ import * as _map from 'lodash/map'
import { MailerService } from '../mailer/mailer.service'
import { UserService } from '../user/user.service'
import { ProjectService } from '../project/project.service'
-import { ActionTokensService } from 'src/action-tokens/action-tokens.service'
-import { ActionTokenType } from 'src/action-tokens/action-token.entity'
+import { ActionTokensService } from '../action-tokens/action-tokens.service'
+import { ActionTokenType } from '../action-tokens/action-token.entity'
import { LetterTemplate } from '../mailer/letter'
import { AnalyticsService } from '../analytics/analytics.service'
import { ReportFrequency, ACCOUNT_PLANS } from '../user/entities/user.entity'
diff --git a/src/tg-integration/tg.update.ts b/src/tg-integration/tg.update.ts
index b2736f0d9..e85427bf6 100644
--- a/src/tg-integration/tg.update.ts
+++ b/src/tg-integration/tg.update.ts
@@ -1,7 +1,7 @@
import { Command, Ctx, Hears, Start, Update, Sender } from 'nestjs-telegraf'
import { UpdateType as TelegrafUpdateType } from 'telegraf/typings/telegram-types'
-import { Context } from 'src/common/interfaces/context.interface'
-import { UpdateType } from 'src/common/decorators/update-type.decorator'
+import { Context } from '../common/interfaces/context.interface'
+import { UpdateType } from '../common/decorators/update-type.decorator'
const HELLO_SCENE_ID = 'HELLO_SCENE_ID'
diff --git a/src/twoFactorAuth/twoFactorAuth.controller.ts b/src/twoFactorAuth/twoFactorAuth.controller.ts
index 383c4eb92..e58142fba 100644
--- a/src/twoFactorAuth/twoFactorAuth.controller.ts
+++ b/src/twoFactorAuth/twoFactorAuth.controller.ts
@@ -12,18 +12,18 @@ import { ApiTags } from '@nestjs/swagger'
import { TwoFactorAuthService } from './twoFactorAuth.service'
import { UserService } from '../user/user.service'
-import { AuthService } from 'src/auth/auth.service'
+import { AuthService } from '../auth/auth.service'
import { UserType } from '../user/entities/user.entity'
import { AppLoggerService } from '../logger/logger.service'
import { MailerService } from '../mailer/mailer.service'
import { LetterTemplate } from '../mailer/letter'
-import { CurrentUserId } from 'src/common/decorators/current-user-id.decorator'
+import { CurrentUserId } from '../common/decorators/current-user-id.decorator'
import { SelfhostedGuard } from '../common/guards/selfhosted.guard'
import { Roles } from '../common/decorators/roles.decorator'
import { TwoFaNotRequired } from '../common/decorators/2fa-disabled.decorator'
-import { RolesGuard } from 'src/common/guards/roles.guard'
+import { RolesGuard } from '../common/guards/roles.guard'
import { TwoFactorAuthDTO } from './dto/2fa-auth.dto'
-import { generateRecoveryCode, checkRateLimit } from 'src/common/utils'
+import { generateRecoveryCode, checkRateLimit } from '../common/utils'
@ApiTags('2fa')
@Controller('2fa')
diff --git a/src/twoFactorAuth/twoFactorAuth.module.ts b/src/twoFactorAuth/twoFactorAuth.module.ts
index 27b7bd516..ab13390ec 100644
--- a/src/twoFactorAuth/twoFactorAuth.module.ts
+++ b/src/twoFactorAuth/twoFactorAuth.module.ts
@@ -1,7 +1,7 @@
import { Module } from '@nestjs/common'
import { TwoFactorAuthService } from './twoFactorAuth.service'
import { UserModule } from '../user/user.module'
-import { AuthModule } from 'src/auth/auth.module'
+import { AuthModule } from '../auth/auth.module'
import { TwoFactorAuthController } from './twoFactorAuth.controller'
import { AppLoggerModule } from '../logger/logger.module'
import { MailerModule } from '../mailer/mailer.module'
diff --git a/src/user/entities/user.entity.ts b/src/user/entities/user.entity.ts
index 2b014aedd..52ca1510f 100644
--- a/src/user/entities/user.entity.ts
+++ b/src/user/entities/user.entity.ts
@@ -5,9 +5,9 @@ import {
OneToMany,
BeforeUpdate,
} from 'typeorm'
-import { ActionToken } from 'src/action-tokens/action-token.entity'
-import { Project } from 'src/project/entity/project.entity'
-import { ProjectShare } from 'src/project/entity/project-share.entity'
+import { ActionToken } from '../../action-tokens/action-token.entity'
+import { Project } from '../../project/entity/project.entity'
+import { ProjectShare } from '../../project/entity/project-share.entity'
export enum PlanCode {
free = 'free',
diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts
index af9316151..c7e204567 100644
--- a/src/user/user.controller.ts
+++ b/src/user/user.controller.ts
@@ -40,19 +40,19 @@ import {
import { Roles } from '../common/decorators/roles.decorator'
import { Pagination } from '../common/pagination/pagination'
import { GDPR_EXPORT_TIMEFRAME, clickhouse } from '../common/constants'
-import { RolesGuard } from 'src/common/guards/roles.guard'
+import { RolesGuard } from '../common/guards/roles.guard'
import { SelfhostedGuard } from '../common/guards/selfhosted.guard'
import { UpdateUserProfileDTO } from './dto/update-user.dto'
import { AdminUpdateUserProfileDTO } from './dto/admin-update-user.dto'
-import { CurrentUserId } from 'src/common/decorators/current-user-id.decorator'
+import { CurrentUserId } from '../common/decorators/current-user-id.decorator'
import { ActionTokensService } from '../action-tokens/action-tokens.service'
import { MailerService } from '../mailer/mailer.service'
import { ActionTokenType } from '../action-tokens/action-token.entity'
import { AuthService } from '../auth/auth.service'
-import { LetterTemplate } from 'src/mailer/letter'
-import { AppLoggerService } from 'src/logger/logger.service'
+import { LetterTemplate } from '../mailer/letter'
+import { AppLoggerService } from '../logger/logger.service'
import { UserProfileDTO } from './dto/user.dto'
-import { checkRateLimit } from 'src/common/utils'
+import { checkRateLimit } from '../common/utils'
dayjs.extend(utc)
diff --git a/src/user/user.module.ts b/src/user/user.module.ts
index e31e20872..bac4f81f7 100644
--- a/src/user/user.module.ts
+++ b/src/user/user.module.ts
@@ -4,7 +4,7 @@ import { TypeOrmModule } from '@nestjs/typeorm'
import { UserController } from './user.controller'
import { UserService } from './user.service'
import { User } from './entities/user.entity'
-import { ActionTokensModule } from 'src/action-tokens/action-tokens.module'
+import { ActionTokensModule } from '../action-tokens/action-tokens.module'
import { MailerModule } from '../mailer/mailer.module'
import { AuthModule } from '../auth/auth.module'
import { AppLoggerModule } from '../logger/logger.module'
diff --git a/test/app.e2e-spec.ts b/test/app.e2e-spec.ts
index bbdc02890..b3098d520 100644
--- a/test/app.e2e-spec.ts
+++ b/test/app.e2e-spec.ts
@@ -1,7 +1,7 @@
import { Test, TestingModule } from '@nestjs/testing'
import { INestApplication } from '@nestjs/common'
import * as request from 'supertest'
-import { AppModule } from './../src/app.module'
+import { AppModule } from '../src/app.module'
describe('AppController (e2e)', () => {
let app: INestApplication