-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
111 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,6 @@ | |
"eslint": "^9.14.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-svelte": "2.46.0", | ||
"formsnap": "2.0.0-next.1", | ||
"globals": "^15.12.0", | ||
"lucide-svelte": "^0.452.0", | ||
"postcss": "^8.4.47", | ||
|
@@ -53,13 +52,12 @@ | |
"svelte-check": "4.0.4", | ||
"svelte-eslint-parser": "0.43.0", | ||
"svelte-preprocess": "6.0.3", | ||
"sveltekit-superforms": "^2.21.1", | ||
"tailwindcss": "3.4.13", | ||
"tslib": "2.7.0", | ||
"typescript": "5.6.3", | ||
"typescript-eslint": "^8.13.0", | ||
"vite": "5.4.8", | ||
"zod": "^3.23.8" | ||
"valibot": "1.0.0-beta.9", | ||
"vite": "5.4.8" | ||
}, | ||
"packageManager": "[email protected]+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { z } from 'zod'; | ||
import { object, string, regex, minLength, maxLength, pipe } from 'valibot'; | ||
|
||
export const loginSchema = z.object({ | ||
token: z | ||
.string() | ||
.min(40) // GitHub PATs are at least 40 characters | ||
.max(255) // Setting a reasonable maximum length | ||
.regex(/^ghp_[A-Za-z0-9]{36}$/, "Must be a valid token starting with 'ghp_'"), | ||
hostname: z | ||
.string() | ||
.min(4) // Minimum length for a valid hostname | ||
.max(255) // Maximum length for a hostname | ||
.regex(/^github\.(com|[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+)$/, 'Must be a valid hostname'), | ||
export const loginSchema = object({ | ||
token: pipe( | ||
string(), | ||
minLength(40, 'Token must be at least 40 characters long'), | ||
maxLength(255), | ||
regex(/^ghp_[A-Za-z0-9]{36}$/, "Must be a valid token starting with 'ghp_'") | ||
), | ||
hostname: pipe( | ||
string(), | ||
minLength(4), | ||
maxLength(255), | ||
regex(/^github\.(com|[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+)$/, 'Must be a valid hostname') | ||
), | ||
}); | ||
|
||
export type LoginSchema = typeof loginSchema; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.