chore: restructure packages of the project (#7)
* chore: restructure validation package * chore: move zod only to validation package * chore: rename packages from alparr to homarr * chore: move mantine core, dates and icons library to ui package, move most other mantine packages to seperate packages for further customization and centralization * chore: fix formatting * fix: wrong typecheck command in turbo generator * chore: fix formatting * chore: address pull request feedback * chore: fix ci check issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@alparr/api",
|
||||
"name": "@homarr/api",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"main": "./index.ts",
|
||||
@@ -12,18 +12,17 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alparr/auth": "workspace:^0.1.0",
|
||||
"@alparr/db": "workspace:^0.1.0",
|
||||
"@alparr/validation": "workspace:^0.1.0",
|
||||
"@homarr/auth": "workspace:^0.1.0",
|
||||
"@homarr/db": "workspace:^0.1.0",
|
||||
"@homarr/validation": "workspace:^0.1.0",
|
||||
"@trpc/client": "next",
|
||||
"@trpc/server": "next",
|
||||
"superjson": "2.2.1",
|
||||
"zod": "^3.22.2"
|
||||
"superjson": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alparr/eslint-config": "workspace:^0.2.0",
|
||||
"@alparr/prettier-config": "workspace:^0.1.0",
|
||||
"@alparr/tsconfig": "workspace:^0.1.0",
|
||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||
"eslint": "^8.53.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3"
|
||||
@@ -31,8 +30,8 @@
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"@alparr/eslint-config/base"
|
||||
"@homarr/eslint-config/base"
|
||||
]
|
||||
},
|
||||
"prettier": "@alparr/prettier-config"
|
||||
"prettier": "@homarr/prettier-config"
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@ import "server-only";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import { createSalt, hashPassword } from "@alparr/auth";
|
||||
import { createId, schema } from "@alparr/db";
|
||||
import { initUserSchema } from "@alparr/validation";
|
||||
import { createSalt, hashPassword } from "@homarr/auth";
|
||||
import { createId, schema } from "@homarr/db";
|
||||
import { validation } from "@homarr/validation";
|
||||
|
||||
import { createTRPCRouter, publicProcedure } from "../trpc";
|
||||
|
||||
export const userRouter = createTRPCRouter({
|
||||
initUser: publicProcedure
|
||||
.input(initUserSchema)
|
||||
.input(validation.user.init)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const firstUser = await ctx.db.query.users.findFirst({
|
||||
columns: {
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
*/
|
||||
import { initTRPC, TRPCError } from "@trpc/server";
|
||||
import superjson from "superjson";
|
||||
import { ZodError } from "zod";
|
||||
|
||||
import { auth } from "@alparr/auth";
|
||||
import type { Session } from "@alparr/auth";
|
||||
import { db } from "@alparr/db";
|
||||
import { auth } from "@homarr/auth";
|
||||
import type { Session } from "@homarr/auth";
|
||||
import { db } from "@homarr/db";
|
||||
import { ZodError } from "@homarr/validation";
|
||||
|
||||
/**
|
||||
* 1. CONTEXT
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@alparr/tsconfig/base.json",
|
||||
"extends": "@homarr/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user