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:
Meier Lukas
2024-01-02 14:18:37 +01:00
committed by GitHub
parent a082f70470
commit fa19966fcc
67 changed files with 562 additions and 304 deletions

View File

@@ -1 +1,2 @@
export * from "./src";
export * from "zod";

View File

@@ -1,5 +1,5 @@
{
"name": "@alparr/validation",
"name": "@homarr/validation",
"private": true,
"version": "0.1.0",
"exports": {
@@ -20,18 +20,18 @@
"typecheck": "tsc --noEmit"
},
"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",
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": [
"@alparr/eslint-config/base"
"@homarr/eslint-config/base"
]
},
"prettier": "@alparr/prettier-config",
"prettier": "@homarr/prettier-config",
"dependencies": {
"zod": "^3.22.2"
}

View File

@@ -1 +1,5 @@
export * from "./user";
import { userSchemas } from "./user";
export const validation = {
user: userSchemas,
};

View File

@@ -3,7 +3,7 @@ import { z } from "zod";
const usernameSchema = z.string().min(3).max(255);
const passwordSchema = z.string().min(8).max(255);
export const initUserSchema = z
const initUserSchema = z
.object({
username: usernameSchema,
password: passwordSchema,
@@ -14,7 +14,12 @@ export const initUserSchema = z
message: "Passwords do not match",
});
export const signInSchema = z.object({
const signInSchema = z.object({
name: z.string(),
password: z.string(),
});
export const userSchemas = {
signIn: signInSchema,
init: initUserSchema,
};

View File

@@ -1,5 +1,5 @@
{
"extends": "@alparr/tsconfig/base.json",
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},