fix: several bugs about type

This commit is contained in:
alikia2x (寒寒) 2025-06-10 14:46:28 +08:00
parent 0bd1771f35
commit 39ca394a56
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
6 changed files with 11 additions and 12 deletions

View File

@ -8,7 +8,7 @@ export interface BiliUserType {
export interface VideoSnapshotType {
id: number;
created_at: string;
created_at: Date;
views: number;
coins: number;
likes: number;
@ -35,9 +35,9 @@ export interface SnapshotScheduleType {
id: number;
aid: number;
type?: string;
created_at: string;
started_at?: string;
finished_at?: string;
created_at: Date;
started_at?: Date;
finished_at?: Date;
status: string;
}

View File

@ -1,7 +1,7 @@
{
"name": "@cvsa/core",
"private": false,
"version": "0.0.7",
"version": "0.0.9",
"scripts": {
"test": "bun --env-file=.env.test run vitest",
"build": "bun build ./index.ts --target node --outdir ./dist"

View File

@ -6,6 +6,7 @@ import { LogoutButton } from "./LogoutButton";
import { numeric } from "yup-numeric";
import { getTranslations } from "next-intl/server";
import HeaderServer from "@/components/shell/HeaderServer";
import { DateTime } from "luxon";
const uidSchema = numeric().integer().min(0);
@ -17,9 +18,7 @@ const SignupTime: React.FC<SignupTimeProps> = ({ user }: SignupTimeProps) => {
return (
<p className="mt-4">
&nbsp;
{format(new Date(user.createdAt), "yyyy-MM-dd HH:mm:ss", {
locale: zhCN
})}
{DateTime.fromJSDate(user.createdAt).toFormat("yyyy-MM-dd HH:mm:ss")}
&nbsp;
</p>
);

View File

@ -5,7 +5,7 @@
"name": "next",
"dependencies": {
"@cvsa/backend": "^0.5.3",
"@cvsa/core": "^0.0.7",
"@cvsa/core": "^0.0.8",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^15.3.3",
@ -49,7 +49,7 @@
"@cvsa/backend": ["@cvsa/backend@0.5.3", "", { "dependencies": { "@rabbit-company/argon2id": "^2.1.0", "hono": "^4.7.8", "hono-rate-limiter": "^0.4.2", "ioredis": "^5.6.1", "limiter": "^3.0.0", "postgres": "^3.4.5", "rate-limit-redis": "^4.2.0", "yup": "^1.6.1", "zod": "^3.24.3" } }, "sha512-RzGjarU2TOzD6/d6qikE4xd/ZqNQl3jOYtgfJg5kbWFuiXnOgEC9QBTi+adzjmaWFrcpuYck6ooWpg4eT3s43g=="],
"@cvsa/core": ["@cvsa/core@0.0.7", "", { "dependencies": { "@koshnic/ratelimit": "^1.0.3", "chalk": "^5.4.1", "ioredis": "^5.6.1", "logform": "^2.7.0", "postgres": "^3.4.5", "winston": "^3.17.0" } }, "sha512-j2Ksg+ZquHqKPew1JZxw0Q9yckFnzdd8y+DnmVT+OW18j+pKcduB9j0qqBywQGHxGuDYVOGLiPlf+IBXfqQWTg=="],
"@cvsa/core": ["@cvsa/core@0.0.8", "", { "dependencies": { "@koshnic/ratelimit": "^1.0.3", "chalk": "^5.4.1", "ioredis": "^5.6.1", "logform": "^2.7.0", "postgres": "^3.4.5", "winston": "^3.17.0" } }, "sha512-mnYKilaNnXFBw/8w9q55n5+UtA2aAXZfiy30qmmbgwiL2fJkDxjL2WLe8rt5SrLD4Tj7DYLZXc/TMAJULdGqjg=="],
"@dabh/diagnostics": ["@dabh/diagnostics@2.0.3", "", { "dependencies": { "colorspace": "1.1.x", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA=="],

View File

@ -6,7 +6,7 @@ export interface User {
username: string;
nickname: string | null;
role: string;
createdAt: string;
createdAt: Date;
}
export interface UserProfile extends User {

View File

@ -11,7 +11,7 @@
},
"dependencies": {
"@cvsa/backend": "^0.5.3",
"@cvsa/core": "^0.0.7",
"@cvsa/core": "^0.0.8",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^15.3.3",