Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf!: Move frontend & backend to apps folder #385

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/codegen.ts → apps/backend/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as dotenv from "dotenv";

if (process.env.NODE_ENV === "production") {
dotenv.config({
path: join(process.cwd(), "..", ".env")
path: join(process.cwd(), "..", "..", ".env")
});
}

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/package.json → apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@types/nodemailer": "^6.4.15",
"@types/pg": "^8.11.6",
"@types/react": "^18.3.3",
"@vitnode/backend": "workspace:*",
"vitnode-backend": "workspace:*",
"@vitnode/shared": "workspace:*",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions backend/src/app.module.ts → apps/backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { GraphQLModule } from "@nestjs/graphql";
import { ApolloDriver, ApolloDriverConfig } from "@nestjs/apollo";
import { ApolloServerPluginLandingPageLocalDefault } from "@apollo/server/plugin/landingPage/default";
import { ServeStaticModule } from "@nestjs/serve-static";
import { Ctx } from "@vitnode/backend";
import { Ctx } from "vitnode-backend";

import { DatabaseModule } from "./database/database.module";
import { PluginsModule } from "./plugins/plugins.module";
Expand All @@ -19,7 +19,7 @@ import { ABSOLUTE_PATHS, configForAppModule } from "./config";
ConfigModule.forRoot({
isGlobal: true,
load: [configForAppModule],
envFilePath: join(process.cwd(), "..", ".env")
envFilePath: join(process.cwd(), "..", "..", ".env")
}),
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as dotenv from "dotenv";
import { schemaDatabase } from "./schema";

dotenv.config({
path: join(process.cwd(), "..", ".env")
path: join(process.cwd(), "..", "..", ".env")
});

export const DATABASE_ENVS = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Global, Module } from "@nestjs/common";
import { registerEnumType } from "@nestjs/graphql";
import { SortDirectionEnum } from "@vitnode/backend";
import { SortDirectionEnum } from "vitnode-backend";

import { DatabaseService } from "./database.service";

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from "fs";

import { CustomError } from "@vitnode/backend";
import { CustomError } from "vitnode-backend";

import { ConfigType, configPath, getConfigFile } from "@/config";

Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.ts → apps/backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { NestFactory } from "@nestjs/core";
import cookieParser from "cookie-parser";
import { ValidationPipe } from "@nestjs/common";
import { graphqlUploadExpress } from "@vitnode/backend";
import { graphqlUploadExpress } from "vitnode-backend";

import { AppModule } from "./app.module";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
IsTextLanguageInput,
TextLanguageInput,
TransformTextLanguageInput
} from "@vitnode/backend";
} from "vitnode-backend";

@InputType()
class GroupsPermissionsCreatePluginCategories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArgsType } from "@nestjs/graphql";
import { PaginationArgs } from "@vitnode/backend";
import { PaginationArgs } from "vitnode-backend";

@ArgsType()
export class ShowBlogCategoriesArgs extends PaginationArgs {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Field, Int, ObjectType } from "@nestjs/graphql";
import { PageInfo, TextLanguage } from "@vitnode/backend";
import { PageInfo, TextLanguage } from "vitnode-backend";

@ObjectType()
export class ShowBlogCategories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
inputPaginationCursor,
outputPagination,
SortDirectionEnum
} from "@vitnode/backend";
} from "vitnode-backend";

import { ShowBlogCategoriesArgs } from "./dto/show.args";
import { ShowBlogCategoriesObj } from "./dto/show.obj";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ArgsType, Field } from "@nestjs/graphql";
import { Transform } from "class-transformer";
import { IsEmail } from "class-validator";
import { TransformString } from "@vitnode/backend";
import { TransformString } from "vitnode-backend";

@ArgsType()
export class TestAdminEmailSettingsServiceArgs {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Field, ObjectType } from "@nestjs/graphql";
import { PageInfo, User } from "@vitnode/backend";
import { PageInfo, User } from "vitnode-backend";

import { ShowCoreFiles } from "@/plugins/core/files/show/dto/show.obj";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
inputPaginationCursor,
outputPagination,
SortDirectionEnum
} from "@vitnode/backend";
} from "vitnode-backend";

import { ShowAdminFilesArgs } from "./dto/show.args";
import { ShowAdminFilesObj } from "./dto/show.obj";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
IsTextLanguageInput,
TextLanguageInput,
TransformTextLanguageInput
} from "@vitnode/backend";
} from "vitnode-backend";

@InputType()
export class ContentCreateAdminGroups {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { count, eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { EditAdminGroupsArgs } from "./dto/edit.args";
import { ShowAdminGroups } from "../show/dto/show.obj";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
PaginationArgs,
SortDirectionEnum,
TransformString
} from "@vitnode/backend";
} from "vitnode-backend";

enum ShowAdminGroupsSortingColumnEnum {
created = "created",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Field, Int, ObjectType } from "@nestjs/graphql";
import { PageInfo, TextLanguage } from "@vitnode/backend";
import { PageInfo, TextLanguage } from "vitnode-backend";

@ObjectType()
export class ContentShowAdminGroups {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
inputPaginationCursor,
outputPagination,
SortDirectionEnum
} from "@vitnode/backend";
} from "vitnode-backend";

import { ShowAdminGroupsArgs } from "./dto/show.args";
import { ShowAdminGroupsObj } from "./dto/show.obj";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { count } from "drizzle-orm";
import { CustomError } from "@vitnode/backend";
import { CustomError } from "vitnode-backend";

import { core_languages } from "@/plugins/core/admin/database/schema/languages";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { count } from "drizzle-orm";
import { AccessDeniedError } from "@vitnode/backend";
import { AccessDeniedError } from "vitnode-backend";

import {
LayoutAdminInstallEnum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from "fs";
import { join } from "path";

import { Injectable } from "@nestjs/common";
import { CustomError } from "@vitnode/backend";
import { CustomError } from "vitnode-backend";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ArgsType, Field } from "@nestjs/graphql";
import { Transform } from "class-transformer";
import { IsNotEmpty } from "class-validator";
import { TransformString } from "@vitnode/backend";
import { TransformString } from "vitnode-backend";

@ArgsType()
export class CreateCoreAdminLanguagesArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { unlinkSync } from "fs";

import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError, CustomError } from "@vitnode/backend";
import { NotFoundError, CustomError } from "vitnode-backend";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Args, Mutation, Resolver } from "@nestjs/graphql";
import { UseGuards } from "@nestjs/common";
import { CurrentUser, User } from "@vitnode/backend";
import { CurrentUser, User } from "vitnode-backend";

import { DownloadAdminCoreLanguageService } from "./download.service";
import { DownloadCoreAdminLanguagesArgs } from "./dto/download.args";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
generateRandomString,
removeSpecialCharacters
} from "@vitnode/shared";
import { NotFoundError, CustomError, User } from "@vitnode/backend";
import { NotFoundError, CustomError, User } from "vitnode-backend";

import { DownloadCoreAdminLanguagesArgs } from "./dto/download.args";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { EditCoreAdminLanguagesArgs } from "./dto/edit.args";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArgsType, Field } from "@nestjs/graphql";
import { FileUpload, GraphQLUpload } from "@vitnode/backend";
import { FileUpload, GraphQLUpload } from "vitnode-backend";

@ArgsType()
export class UpdateCoreAdminLanguagesArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Injectable } from "@nestjs/common";
import * as tar from "tar";
import { eq } from "drizzle-orm";
import { currentUnixDate, generateRandomString } from "@vitnode/shared";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { UpdateCoreAdminLanguagesArgs } from "./dto/update.args";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError, AccessDeniedError } from "@vitnode/backend";
import { NotFoundError, AccessDeniedError } from "vitnode-backend";

import { EditAdminMembersArgs } from "./dto/edit.args";
import { EditAdminMembersObj } from "./dto/edit.obj";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
PaginationArgs,
SortDirectionEnum,
TransformString
} from "@vitnode/backend";
} from "vitnode-backend";

export enum ShowAdminMembersSortingColumnEnum {
name = "name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Field, ObjectType } from "@nestjs/graphql";
import { PageInfo } from "@vitnode/backend";
import { PageInfo } from "vitnode-backend";

import { ShowCoreMembers } from "@/plugins/core/members/show/dto/show.obj";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
inputPaginationCursor,
outputPagination,
SortDirectionEnum
} from "@vitnode/backend";
} from "vitnode-backend";

import { ShowAdminMembersObj } from "./dto/show.obj";
import { ShowAdminMembersArgs } from "./dto/show.args";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { join } from "path";
import * as fs from "fs";

import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { ShowAdminManifestMetadataObj } from "./show/dto/show.obj";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { ChangePositionAdminNavArgs } from "./dto/change_position.args";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TextLanguageInput,
TransformString,
TransformTextLanguageInput
} from "@vitnode/backend";
} from "vitnode-backend";

@ArgsType()
export class CreateAdminNavArgs {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { DeleteAdminNavArgs } from "./dto/delete.args";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { NotFoundError } from "@vitnode/backend";
import { NotFoundError } from "vitnode-backend";

import { EditAdminNavArgs } from "./dto/edit.args";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { join } from "path";
import * as fs from "fs";

import { Injectable } from "@nestjs/common";
import { CustomError } from "@vitnode/backend";
import { CustomError } from "vitnode-backend";

import { CreateAdminPluginsArgs } from "./dto/create.args";
import { ShowAdminPlugins } from "../show/dto/show.obj";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
MaxLength,
MinLength
} from "class-validator";
import { TransformString } from "@vitnode/backend";
import { TransformString } from "vitnode-backend";

@ArgsType()
export class CreateAdminPluginsArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from "fs";

import { Injectable } from "@nestjs/common";
import { eq, sql } from "drizzle-orm";
import { NotFoundError, CustomError } from "@vitnode/backend";
import { NotFoundError, CustomError } from "vitnode-backend";

import { DeleteAdminPluginsArgs } from "./dto/delete.args";
import { ChangeFilesAdminPluginsService } from "../helpers/files/change/change.service";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Args, Mutation, Resolver } from "@nestjs/graphql";
import { UseGuards } from "@nestjs/common";
import { CurrentUser, User } from "@vitnode/backend";
import { CurrentUser, User } from "vitnode-backend";

import { DownloadAdminPluginsService } from "./download.service";
import { DownloadAdminPluginsArgs } from "./dto/download.args";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
CustomError,
execShellCommand,
User
} from "@vitnode/backend";
} from "vitnode-backend";

import { DownloadAdminPluginsArgs } from "./dto/download.args";
import { PluginInfoJSONType } from "../helpers/files/create/contents";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from "fs";

import { Injectable } from "@nestjs/common";
import { eq, ne } from "drizzle-orm";
import { NotFoundError, CustomError } from "@vitnode/backend";
import { NotFoundError, CustomError } from "vitnode-backend";

import { ShowAdminPlugins } from "../show/dto/show.obj";
import { EditAdminPluginsArgs } from "./dto/edit.args";
Expand Down
Loading
Loading