1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2026-03-21 18:05:20 +00:00

Compare commits

..

No commits in common. "f0b902e9aded0c559cf34542189cba3ecdbee755" and "88d5062638ba3fd4d5d09d94145e6a42fa5fed89" have entirely different histories.

8 changed files with 40 additions and 39 deletions

View File

@ -10,7 +10,6 @@ on:
env:
REGISTRY: ghcr.io
DOCKERHUB_USERNAME: zerocatdev
OWNER: zerocatdev
PROJECT_NAME: classworks
concurrency:
@ -39,20 +38,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
${{ vars.DOCKERHUB_USERNAME }}/${{ env.PROJECT_NAME }}
images: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PROJECT_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr

View File

@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = {
"clientVersion": "7.3.0",
"engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735",
"activeProvider": "postgresql",
"inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Account {\n id String @id(map: \"idx_18303_PRIMARY\") @default(cuid()) @db.VarChar(191)\n provider String @db.VarChar(191)\n providerId String @db.VarChar(191)\n email String? @db.VarChar(191)\n name String? @db.VarChar(191)\n avatarUrl String? @db.VarChar(191)\n providerData Json? @db.Json\n accessToken String?\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n refreshToken String?\n refreshTokenExpiry DateTime? @db.Timestamptz(6)\n tokenVersion Int @default(1)\n\n devices Device[]\n\n @@unique([provider, providerId], map: \"idx_18303_Account_provider_providerId_key\")\n}\n\nmodel AppInstall {\n id String @id(map: \"idx_18310_PRIMARY\") @default(cuid()) @db.VarChar(191)\n deviceId Int\n appId String @db.VarChar(191)\n token String @unique(map: \"idx_18310_AppInstall_token_key\") @db.VarChar(191)\n note String? @db.VarChar(191)\n installedAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n deviceType String? @db.VarChar(191)\n isReadOnly Boolean @default(false)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@index([deviceId], map: \"idx_18310_AppInstall_deviceId_fkey\")\n}\n\nmodel AutoAuth {\n id String @id(map: \"idx_18317_PRIMARY\") @default(cuid()) @db.VarChar(191)\n deviceId Int\n password String? @db.VarChar(191)\n deviceType String? @db.VarChar(191)\n isReadOnly Boolean @default(false)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@unique([deviceId, password], map: \"idx_18317_AutoAuth_deviceId_password_key\")\n}\n\nmodel Device {\n id Int @id(map: \"idx_18324_PRIMARY\") @default(autoincrement())\n uuid String @unique(map: \"idx_18324_Device_uuid_key\") @db.VarChar(191)\n name String? @db.VarChar(191)\n accountId String? @db.VarChar(191)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n password String? @db.VarChar(191)\n passwordHint String? @db.VarChar(191)\n namespace String? @unique(map: \"idx_18324_Device_namespace_key\") @db.VarChar(191)\n\n // 关联关系\n account Account? @relation(fields: [accountId], references: [id], onDelete: SetNull)\n appInstalls AppInstall[]\n kvStore KVStore[] // 设备相关的KV存储\n autoAuths AutoAuth[] // 自动授权配置\n\n @@index([accountId], map: \"idx_18324_Device_accountId_fkey\")\n}\n\nmodel KVStore {\n deviceId Int\n key String @db.VarChar(191)\n value Json @db.Json\n creatorIp String? @default(\"\") @db.VarChar(191)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@id([deviceId, key], map: \"idx_18330_PRIMARY\")\n}\n",
"inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Account {\n id String @id(map: \"idx_18303_PRIMARY\") @db.VarChar(191)\n provider String @db.VarChar(191)\n providerId String @db.VarChar(191)\n email String? @db.VarChar(191)\n name String? @db.VarChar(191)\n avatarUrl String? @db.VarChar(191)\n providerData Json? @db.Json\n accessToken String?\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n refreshToken String?\n refreshTokenExpiry DateTime? @db.Timestamptz(6)\n tokenVersion Int @default(1)\n\n devices Device[]\n\n @@unique([provider, providerId], map: \"idx_18303_Account_provider_providerId_key\")\n}\n\nmodel AppInstall {\n id String @id(map: \"idx_18310_PRIMARY\") @db.VarChar(191)\n deviceId Int\n appId String @db.VarChar(191)\n token String @unique(map: \"idx_18310_AppInstall_token_key\") @db.VarChar(191)\n note String? @db.VarChar(191)\n installedAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n deviceType String? @db.VarChar(191)\n isReadOnly Boolean @default(false)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@index([deviceId], map: \"idx_18310_AppInstall_deviceId_fkey\")\n}\n\nmodel AutoAuth {\n id String @id(map: \"idx_18317_PRIMARY\") @db.VarChar(191)\n deviceId Int\n password String? @db.VarChar(191)\n deviceType String? @db.VarChar(191)\n isReadOnly Boolean @default(false)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@unique([deviceId, password], map: \"idx_18317_AutoAuth_deviceId_password_key\")\n}\n\nmodel Device {\n id Int @id(map: \"idx_18324_PRIMARY\")\n uuid String @unique(map: \"idx_18324_Device_uuid_key\") @db.VarChar(191)\n name String? @db.VarChar(191)\n accountId String? @db.VarChar(191)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n password String? @db.VarChar(191)\n passwordHint String? @db.VarChar(191)\n namespace String? @unique(map: \"idx_18324_Device_namespace_key\") @db.VarChar(191)\n\n // 关联关系\n account Account? @relation(fields: [accountId], references: [id], onDelete: SetNull)\n appInstalls AppInstall[]\n kvStore KVStore[] // 设备相关的KV存储\n autoAuths AutoAuth[] // 自动授权配置\n\n @@index([accountId], map: \"idx_18324_Device_accountId_fkey\")\n}\n\nmodel KVStore {\n deviceId Int\n key String @db.VarChar(191)\n value Json @db.Json\n creatorIp String? @default(\"\") @db.VarChar(191)\n createdAt DateTime @default(now()) @db.Timestamptz(6)\n updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz(6)\n\n device Device @relation(fields: [deviceId], references: [id], onDelete: Cascade)\n\n @@id([deviceId, key], map: \"idx_18330_PRIMARY\")\n}\n",
"runtimeDataModel": {
"models": {},
"enums": {},

View File

@ -358,7 +358,7 @@ export type AccountScalarWhereWithAggregatesInput = {
}
export type AccountCreateInput = {
id?: string
id: string
provider: string
providerId: string
email?: string | null
@ -375,7 +375,7 @@ export type AccountCreateInput = {
}
export type AccountUncheckedCreateInput = {
id?: string
id: string
provider: string
providerId: string
email?: string | null
@ -426,7 +426,7 @@ export type AccountUncheckedUpdateInput = {
}
export type AccountCreateManyInput = {
id?: string
id: string
provider: string
providerId: string
email?: string | null
@ -578,7 +578,7 @@ export type AccountUpdateOneWithoutDevicesNestedInput = {
}
export type AccountCreateWithoutDevicesInput = {
id?: string
id: string
provider: string
providerId: string
email?: string | null
@ -594,7 +594,7 @@ export type AccountCreateWithoutDevicesInput = {
}
export type AccountUncheckedCreateWithoutDevicesInput = {
id?: string
id: string
provider: string
providerId: string
email?: string | null

View File

@ -313,7 +313,7 @@ export type AppInstallScalarWhereWithAggregatesInput = {
}
export type AppInstallCreateInput = {
id?: string
id: string
appId: string
token: string
note?: string | null
@ -325,7 +325,7 @@ export type AppInstallCreateInput = {
}
export type AppInstallUncheckedCreateInput = {
id?: string
id: string
deviceId: number
appId: string
token: string
@ -361,7 +361,7 @@ export type AppInstallUncheckedUpdateInput = {
}
export type AppInstallCreateManyInput = {
id?: string
id: string
deviceId: number
appId: string
token: string
@ -496,7 +496,7 @@ export type AppInstallUncheckedUpdateManyWithoutDeviceNestedInput = {
}
export type AppInstallCreateWithoutDeviceInput = {
id?: string
id: string
appId: string
token: string
note?: string | null
@ -507,7 +507,7 @@ export type AppInstallCreateWithoutDeviceInput = {
}
export type AppInstallUncheckedCreateWithoutDeviceInput = {
id?: string
id: string
appId: string
token: string
note?: string | null
@ -559,7 +559,7 @@ export type AppInstallScalarWhereInput = {
}
export type AppInstallCreateManyDeviceInput = {
id?: string
id: string
appId: string
token: string
note?: string | null

View File

@ -290,7 +290,7 @@ export type AutoAuthScalarWhereWithAggregatesInput = {
}
export type AutoAuthCreateInput = {
id?: string
id: string
password?: string | null
deviceType?: string | null
isReadOnly?: boolean
@ -300,7 +300,7 @@ export type AutoAuthCreateInput = {
}
export type AutoAuthUncheckedCreateInput = {
id?: string
id: string
deviceId: number
password?: string | null
deviceType?: string | null
@ -330,7 +330,7 @@ export type AutoAuthUncheckedUpdateInput = {
}
export type AutoAuthCreateManyInput = {
id?: string
id: string
deviceId: number
password?: string | null
deviceType?: string | null
@ -454,7 +454,7 @@ export type AutoAuthUncheckedUpdateManyWithoutDeviceNestedInput = {
}
export type AutoAuthCreateWithoutDeviceInput = {
id?: string
id: string
password?: string | null
deviceType?: string | null
isReadOnly?: boolean
@ -463,7 +463,7 @@ export type AutoAuthCreateWithoutDeviceInput = {
}
export type AutoAuthUncheckedCreateWithoutDeviceInput = {
id?: string
id: string
password?: string | null
deviceType?: string | null
isReadOnly?: boolean
@ -511,7 +511,7 @@ export type AutoAuthScalarWhereInput = {
}
export type AutoAuthCreateManyDeviceInput = {
id?: string
id: string
password?: string | null
deviceType?: string | null
isReadOnly?: boolean

View File

@ -322,6 +322,7 @@ export type DeviceScalarWhereWithAggregatesInput = {
}
export type DeviceCreateInput = {
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -336,7 +337,7 @@ export type DeviceCreateInput = {
}
export type DeviceUncheckedCreateInput = {
id?: number
id: number
uuid: string
name?: string | null
accountId?: string | null
@ -351,6 +352,7 @@ export type DeviceUncheckedCreateInput = {
}
export type DeviceUpdateInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@ -380,7 +382,7 @@ export type DeviceUncheckedUpdateInput = {
}
export type DeviceCreateManyInput = {
id?: number
id: number
uuid: string
name?: string | null
accountId?: string | null
@ -392,6 +394,7 @@ export type DeviceCreateManyInput = {
}
export type DeviceUpdateManyMutationInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@ -557,6 +560,7 @@ export type DeviceUpdateOneRequiredWithoutKvStoreNestedInput = {
}
export type DeviceCreateWithoutAccountInput = {
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -570,7 +574,7 @@ export type DeviceCreateWithoutAccountInput = {
}
export type DeviceUncheckedCreateWithoutAccountInput = {
id?: number
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -625,6 +629,7 @@ export type DeviceScalarWhereInput = {
}
export type DeviceCreateWithoutAppInstallsInput = {
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -638,7 +643,7 @@ export type DeviceCreateWithoutAppInstallsInput = {
}
export type DeviceUncheckedCreateWithoutAppInstallsInput = {
id?: number
id: number
uuid: string
name?: string | null
accountId?: string | null
@ -668,6 +673,7 @@ export type DeviceUpdateToOneWithWhereWithoutAppInstallsInput = {
}
export type DeviceUpdateWithoutAppInstallsInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@ -695,6 +701,7 @@ export type DeviceUncheckedUpdateWithoutAppInstallsInput = {
}
export type DeviceCreateWithoutAutoAuthsInput = {
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -708,7 +715,7 @@ export type DeviceCreateWithoutAutoAuthsInput = {
}
export type DeviceUncheckedCreateWithoutAutoAuthsInput = {
id?: number
id: number
uuid: string
name?: string | null
accountId?: string | null
@ -738,6 +745,7 @@ export type DeviceUpdateToOneWithWhereWithoutAutoAuthsInput = {
}
export type DeviceUpdateWithoutAutoAuthsInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@ -765,6 +773,7 @@ export type DeviceUncheckedUpdateWithoutAutoAuthsInput = {
}
export type DeviceCreateWithoutKvStoreInput = {
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -778,7 +787,7 @@ export type DeviceCreateWithoutKvStoreInput = {
}
export type DeviceUncheckedCreateWithoutKvStoreInput = {
id?: number
id: number
uuid: string
name?: string | null
accountId?: string | null
@ -808,6 +817,7 @@ export type DeviceUpdateToOneWithWhereWithoutKvStoreInput = {
}
export type DeviceUpdateWithoutKvStoreInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@ -835,7 +845,7 @@ export type DeviceUncheckedUpdateWithoutKvStoreInput = {
}
export type DeviceCreateManyAccountInput = {
id?: number
id: number
uuid: string
name?: string | null
createdAt?: Date | string
@ -846,6 +856,7 @@ export type DeviceCreateManyAccountInput = {
}
export type DeviceUpdateWithoutAccountInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
uuid?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "ClassworksKV",
"version": "1.3.16",
"version": "1.3.15",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ClassworksKV",
"version": "1.3.16",
"version": "1.3.15",
"dependencies": {
"@opentelemetry/auto-instrumentations-node": "^0.59.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.205.0",

View File

@ -1,6 +1,6 @@
{
"name": "ClassworksKV",
"version": "1.3.16",
"version": "1.3.15",
"private": true,
"scripts": {
"start": "node ./bin/www",