Skip to content

Commit

Permalink
refactor(backend): Restore paths
Browse files Browse the repository at this point in the history
  • Loading branch information
aXenDeveloper committed Jun 28, 2024
1 parent fb82db9 commit 0ab072c
Show file tree
Hide file tree
Showing 173 changed files with 388 additions and 7,834 deletions.
7,393 changes: 0 additions & 7,393 deletions apps/backend/pnpm-lock.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/backend/src/core/admin/email/helpers.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Injectable } from '@nestjs/common';

import { ShowAdminEmailSettingsServiceObj } from './settings/show/dto/show.obj';

import { ABSOLUTE_PATHS_BACKEND } from '@/index';
import { ABSOLUTE_PATHS_BACKEND } from '../../..';

export interface ShowAdminEmailSettingsServiceObjWithPassword
extends ShowAdminEmailSettingsServiceObj {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/admin/email/send/send.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Inject, Injectable } from '@nestjs/common';

import { MailService } from '../mail.service';

import { EmailHelpersServiceType } from '@/providers/email/email-helpers.type';
import { EmailHelpersServiceType } from '../../../../providers/email/email-helpers.type';

interface Args {
from: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { EditAdminEmailSettingsService } from './edit.service';
import { EditAdminEmailSettingsServiceArgs } from './dto/edit.args';
import { ShowAdminEmailSettingsServiceObj } from '../show/dto/show.obj';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../../utils';

@Resolver()
export class EditAdminEmailSettingsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import {
HelpersAdminEmailSettingsService,
ShowAdminEmailSettingsServiceObjWithPassword,
} from '../../helpers.service';
import { ConfigType, configPath, getConfigFile } from '@/providers/config';
import {
ConfigType,
configPath,
getConfigFile,
} from '../../../../../providers/config';

@Injectable()
export class EditAdminEmailSettingsService extends HelpersAdminEmailSettingsService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UseGuards } from '@nestjs/common';
import { ShowAdminEmailSettingsServiceObj } from './dto/show.obj';
import { ShowAdminEmailSettingsService } from './show.service';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../../utils';

@Resolver()
export class ShowAdminEmailSettingsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Injectable } from '@nestjs/common';
import { ShowAdminEmailSettingsServiceObj } from './dto/show.obj';

import { HelpersAdminEmailSettingsService } from '../../helpers.service';
import { getConfigFile } from '@/providers/config';
import { getConfigFile } from '../../../../../providers/config';

@Injectable()
export class ShowAdminEmailSettingsService extends HelpersAdminEmailSettingsService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ArgsType, Field } from '@nestjs/graphql';
import { Transform } from 'class-transformer';
import { IsEmail } from 'class-validator';

import { TransformString } from '@/utils';
import { TransformString } from '../../../../../../utils';

@ArgsType()
export class TestAdminEmailSettingsServiceArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UseGuards } from '@nestjs/common';
import { TestAdminEmailSettingsService } from './test.service';
import { TestAdminEmailSettingsServiceArgs } from './dto/test.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../../utils';

@Resolver()
export class TestAdminEmailSettingsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Args, Mutation, Resolver } from '@nestjs/graphql';
import { DeleteAdminFilesService } from './delete.service';
import { DeleteAdminFilesArgs } from './dto/delete.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class DeleteAdminFilesResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { eq } from 'drizzle-orm';

import { DeleteAdminFilesArgs } from './dto/delete.args';

import { DatabaseService } from '@/database';
import { DatabaseService } from '../../../../database';
import { DeleteCoreFilesService } from '../../../files/helpers/delete/delete.service';
import { NotFoundError } from '@/errors';
import { core_files } from '@/templates/core/admin/database/schema/files';
import { NotFoundError } from '../../../../errors';
import { core_files } from '../../../../templates/core/admin/database/schema/files';

@Injectable()
export class DeleteAdminFilesService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { Request, Response } from 'express';

import { InternalAuthorizationCoreSessionsService } from '../../../sessions/authorization/internal/internal_authorization.service';
import { AuthorizationAdminSessionsService } from '../../sessions/authorization/authorization.service';
import { DatabaseService } from '@/database';
import { ABSOLUTE_PATHS_BACKEND } from '@/index';
import { DatabaseService } from '../../../../database';
import { ABSOLUTE_PATHS_BACKEND } from '../../../..';

@Controller('files')
export class DownloadFilesAdminController {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/admin/files/show/dto/show.obj.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Field, ObjectType } from '@nestjs/graphql';

import { ShowCoreFiles } from '../../../../files/show/dto/show.obj';
import { User } from '@/decorators';
import { PageInfo } from '@/utils';
import { User } from '../../../../../decorators';
import { PageInfo } from '../../../../../utils';

@ObjectType()
export class ShowAdminFiles extends ShowCoreFiles {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ShowAdminFilesService } from './show.service';
import { ShowAdminFilesObj } from './dto/show.obj';
import { ShowAdminFilesArgs } from './dto/show.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class ShowAdminFilesResolver {
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/core/admin/files/show/show.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { and, count, eq, ilike, or } from 'drizzle-orm';
import { ShowAdminFilesArgs } from './dto/show.args';
import { ShowAdminFilesObj } from './dto/show.obj';

import { DatabaseService } from '@/database';
import { inputPaginationCursor, outputPagination } from '@/functions';
import { DatabaseService } from '../../../../database';
import { inputPaginationCursor, outputPagination } from '../../../../functions';
import {
core_files,
core_files_using,
} from '@/templates/core/admin/database/schema/files';
import { SortDirectionEnum } from '@/utils';
} from '../../../../templates/core/admin/database/schema/files';
import { SortDirectionEnum } from '../../../../utils';

@Injectable()
export class ShowAdminFilesService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CreateAdminGroupsService } from './create.service';
import { CreateAdminGroupsArgs } from './dto/create.args';
import { ShowAdminGroups } from '../show/dto/show.obj';

import { AdminPermissionGuards } from '@/utils';
import { AdminPermissionGuards } from '../../../../utils';

@Resolver()
export class CreateAdminGroupsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Injectable } from '@nestjs/common';
import { ShowAdminGroups } from '../show/dto/show.obj';
import { CreateAdminGroupsArgs } from './dto/create.args';

import { DatabaseService } from '@/database';
import { DatabaseService } from '../../../../database';
import { ParserTextLanguageCoreHelpersService } from '../../../helpers/text_language/parser/parser.service';
import {
core_groups,
core_groups_names,
} from '@/templates/core/admin/database/schema/groups';
} from '../../../../templates/core/admin/database/schema/groups';

@Injectable()
export class CreateAdminGroupsService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
IsTextLanguageInput,
TextLanguageInput,
TransformTextLanguageInput,
} from '@/utils';
} from '../../../../../utils';

@InputType()
export class ContentCreateAdminGroups {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UseGuards } from '@nestjs/common';
import { DeleteAdminGroupsService } from './delete.service';
import { DeleteAdminGroupsArgs } from './dto/delete.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class DeleteAdminGroupsResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { eq } from 'drizzle-orm';

import { DeleteAdminGroupsArgs } from './dto/delete.args';

import { DatabaseService } from '@/database';
import { NotFoundError } from '@/errors';
import { core_users } from '@/templates/core/admin/database/schema/users';
import { core_groups } from '@/templates/core/admin/database/schema/groups';
import { DatabaseService } from '../../../../database';
import { NotFoundError } from '../../../../errors';
import { core_users } from '../../../../templates/core/admin/database/schema/users';
import { core_groups } from '../../../../templates/core/admin/database/schema/groups';

@Injectable()
export class DeleteAdminGroupsService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ShowAdminGroups } from '../show/dto/show.obj';
import { EditAdminGroupsService } from './edit.service';
import { EditAdminGroupsArgs } from './dto/edit.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class EditAdminGroupsResolver {
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/core/admin/groups/edit/edit.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { count, eq } from 'drizzle-orm';
import { EditAdminGroupsArgs } from './dto/edit.args';
import { ShowAdminGroups } from '../show/dto/show.obj';

import { DatabaseService } from '@/database';
import { DatabaseService } from '../../../../database';
import { ParserTextLanguageCoreHelpersService } from '../../../helpers/text_language/parser/parser.service';
import { NotFoundError } from '@/errors';
import { NotFoundError } from '../../../../errors';
import {
core_groups,
core_groups_names,
} from '@/templates/core/admin/database/schema/groups';
import { core_users } from '@/templates/core/admin/database/schema/users';
} from '../../../../templates/core/admin/database/schema/groups';
import { core_users } from '../../../../templates/core/admin/database/schema/users';

@Injectable()
export class EditAdminGroupsService {
Expand Down
6 changes: 5 additions & 1 deletion packages/backend/src/core/admin/groups/show/dto/show.args.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { ArgsType, Field, InputType, registerEnumType } from '@nestjs/graphql';
import { Transform } from 'class-transformer';

import { PaginationArgs, SortDirectionEnum, TransformString } from '@/utils';
import {
PaginationArgs,
SortDirectionEnum,
TransformString,
} from '../../../../../utils';

enum ShowAdminGroupsSortingColumnEnum {
created = 'created',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Field, Int, ObjectType } from '@nestjs/graphql';

import { PageInfo, TextLanguage } from '@/utils';
import { PageInfo, TextLanguage } from '../../../../../utils';

@ObjectType()
export class ContentShowAdminGroups {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ShowAdminGroupsService } from './show.service';
import { ShowAdminGroupsObj } from './dto/show.obj';
import { ShowAdminGroupsArgs } from './dto/show.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class ShowAdminGroupsResolver {
Expand Down
10 changes: 5 additions & 5 deletions packages/backend/src/core/admin/groups/show/show.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { ShowAdminGroupsObj } from './dto/show.obj';
import {
core_groups,
core_groups_names,
} from '@/templates/core/admin/database/schema/groups';
import { inputPaginationCursor, outputPagination } from '@/functions';
import { core_users } from '@/templates/core/admin/database/schema/users';
import { SortDirectionEnum } from '@/utils';
import { DatabaseService } from '@/database';
} from '../../../../templates/core/admin/database/schema/groups';
import { inputPaginationCursor, outputPagination } from '../../../../functions';
import { core_users } from '../../../../templates/core/admin/database/schema/users';
import { SortDirectionEnum } from '../../../../utils';
import { DatabaseService } from '../../../../database';

@Injectable()
export class ShowAdminGroupsService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Injectable } from '@nestjs/common';
import { count } from 'drizzle-orm';

import { DatabaseService } from '@/database';
import { CustomError } from '@/errors';
import { core_languages } from '@/templates/core/admin/database/schema/languages';
import { DatabaseService } from '../../../../database';
import { CustomError } from '../../../../errors';
import { core_languages } from '../../../../templates/core/admin/database/schema/languages';
import {
core_groups,
core_groups_names,
} from '@/templates/core/admin/database/schema/groups';
import { core_admin_permissions } from '@/templates/core/admin/database/schema/admins';
} from '../../../../templates/core/admin/database/schema/groups';
import { core_admin_permissions } from '../../../../templates/core/admin/database/schema/admins';
import {
core_nav,
core_nav_name,
} from '@/templates/core/admin/database/schema/nav';
import { core_moderators_permissions } from '@/templates/core/admin/database/schema/moderators';
} from '../../../../templates/core/admin/database/schema/nav';
import { core_moderators_permissions } from '../../../../templates/core/admin/database/schema/moderators';

@Injectable()
export class CreateDatabaseAdminInstallService {
Expand Down
12 changes: 6 additions & 6 deletions packages/backend/src/core/admin/install/layout/layout.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
LayoutAdminInstallObj,
} from './dto/layout.obj';

import { DatabaseService } from '@/database';
import { core_users } from '@/templates/core/admin/database/schema/users';
import { core_sessions } from '@/templates/core/admin/database/schema/sessions';
import { core_admin_sessions } from '@/templates/core/admin/database/schema/admins';
import { AccessDeniedError } from '@/errors';
import { core_languages } from '@/templates/core/admin/database/schema/languages';
import { DatabaseService } from '../../../../database';
import { core_users } from '../../../../templates/core/admin/database/schema/users';
import { core_sessions } from '../../../../templates/core/admin/database/schema/sessions';
import { core_admin_sessions } from '../../../../templates/core/admin/database/schema/admins';
import { AccessDeniedError } from '../../../../errors';
import { core_languages } from '../../../../templates/core/admin/database/schema/languages';

@Injectable()
export class LayoutAdminInstallService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CreateAdminCoreLanguageService } from './create.service';
import { CreateCoreAdminLanguagesArgs } from './dto/create.args';

import { ShowCoreLanguages } from '../../../languages/show/dto/show.obj';
import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class CreateAdminCoreLanguagesResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { Injectable } from '@nestjs/common';

import { CreateCoreAdminLanguagesArgs } from './dto/create.args';

import { DatabaseService } from '@/database';
import { ABSOLUTE_PATHS_BACKEND, CustomError } from '@/index';
import { core_languages } from '@/templates/core/admin/database/schema/languages';
import { DatabaseService } from '../../../../database';
import { ABSOLUTE_PATHS_BACKEND, CustomError } from '../../../..';
import { core_languages } from '../../../../templates/core/admin/database/schema/languages';
import { ShowCoreLanguages } from '../../../languages/show/dto/show.obj';
import { setRebuildRequired } from '@/functions/rebuild-required';
import { setRebuildRequired } from '../../../../functions/rebuild-required';

@Injectable()
export class CreateAdminCoreLanguageService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ArgsType, Field } from '@nestjs/graphql';
import { Transform } from 'class-transformer';
import { IsNotEmpty } from 'class-validator';

import { TransformString } from '@/utils';
import { TransformString } from '../../../../../utils';

@ArgsType()
export class CreateCoreAdminLanguagesArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UseGuards } from '@nestjs/common';
import { DeleteAdminCoreLanguageService } from './delete.service';
import { DeleteCoreAdminLanguagesArgs } from './dto/delete.args';

import { AdminAuthGuards } from '@/utils';
import { AdminAuthGuards } from '../../../../utils';

@Resolver()
export class DeleteAdminCoreLanguagesResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { eq } from 'drizzle-orm';

import { DeleteCoreAdminLanguagesArgs } from './dto/delete.args';

import { DatabaseService } from '@/database';
import { CustomError, NotFoundError } from '@/errors';
import { ABSOLUTE_PATHS_BACKEND } from '@/index';
import { core_languages } from '@/templates/core/admin/database/schema/languages';
import { setRebuildRequired } from '@/functions/rebuild-required';
import { DatabaseService } from '../../../../database';
import { CustomError, NotFoundError } from '../../../../errors';
import { ABSOLUTE_PATHS_BACKEND } from '../../../..';
import { core_languages } from '../../../../templates/core/admin/database/schema/languages';
import { setRebuildRequired } from '../../../../functions/rebuild-required';
@Injectable()
export class DeleteAdminCoreLanguageService {
constructor(private readonly databaseService: DatabaseService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { UseGuards } from '@nestjs/common';
import { DownloadAdminCoreLanguageService } from './download.service';
import { DownloadCoreAdminLanguagesArgs } from './dto/download.args';

import { AdminAuthGuards } from '@/utils';
import { CurrentUser, User } from '@/decorators';
import { AdminAuthGuards } from '../../../../utils';
import { CurrentUser, User } from '../../../../decorators';

@Resolver()
export class DownloadAdminCoreLanguagesResolver {
Expand Down
Loading

0 comments on commit 0ab072c

Please sign in to comment.