From 01b8ff039f0bda59d2e48acf21ec5a5a1ea17b97 Mon Sep 17 00:00:00 2001 From: Zisu Zhang Date: Mon, 23 Dec 2024 22:08:25 +0800 Subject: [PATCH] chore: update server rule schema (#115) * chore: update server rule schema * chore: fix env * chore: bump versions --- .yarn/versions/0c101d43.yml | 3 +++ apps/frontend/src/utils/vaptcha.ts | 2 +- apps/server/src/schemas/common.ts | 10 +++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .yarn/versions/0c101d43.yml diff --git a/.yarn/versions/0c101d43.yml b/.yarn/versions/0c101d43.yml new file mode 100644 index 00000000..85ee0e5f --- /dev/null +++ b/.yarn/versions/0c101d43.yml @@ -0,0 +1,3 @@ +releases: + "@aoi-js/frontend": patch + "@aoi-js/server": patch diff --git a/apps/frontend/src/utils/vaptcha.ts b/apps/frontend/src/utils/vaptcha.ts index 4b3c67c3..aba98c23 100644 --- a/apps/frontend/src/utils/vaptcha.ts +++ b/apps/frontend/src/utils/vaptcha.ts @@ -27,7 +27,7 @@ export const useVaptcha = ({ onPass }: { onPass?: (token: string) => void } = {} onMounted(() => { const config = { - vid: import.meta.env.VAPTCHA_VID, + vid: import.meta.env.VITE_VAPTCHA_VID, mode: 'click', scene: 0, container: document.getElementById('vaptcha'), diff --git a/apps/server/src/schemas/common.ts b/apps/server/src/schemas/common.ts index 18444a9d..23111fbf 100644 --- a/apps/server/src/schemas/common.ts +++ b/apps/server/src/schemas/common.ts @@ -69,7 +69,15 @@ export class ServerTypeBuilder extends JavaScriptTypeBuilder { $in: this.Optional(this.Array(this.Any())), $nin: this.Optional(this.Array(this.Any())), $startsWith: this.Optional(this.String()), - $endsWith: this.Optional(this.String()) + $notStartsWith: this.Optional(this.String()), + $endsWith: this.Optional(this.String()), + $notEndsWith: this.Optional(this.String()), + $includes: this.Optional(this.Any()), + $notIncludes: this.Optional(this.Any()), + $includesEach: this.Optional(this.Array(this.Any())), + $notIncludesEach: this.Optional(this.Array(this.Any())), + $includesSome: this.Optional(this.Array(this.Any())), + $notIncludesSome: this.Optional(this.Array(this.Any())) }) }