mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 🚨 Enable more Biome 2.0 rules
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 4s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 0s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 0s
Nix Build / check (push) Failing after 0s
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 4s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 0s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 0s
Nix Build / check (push) Failing after 0s
This commit is contained in:
parent
963173cdae
commit
1679585c4c
21 changed files with 116 additions and 53 deletions
|
|
@ -63,6 +63,8 @@
|
|||
],
|
||||
"packageManager": "bun@1.2.5",
|
||||
"dependencies": {
|
||||
"@badgateway/oauth2-client": "^2.4.2"
|
||||
"@badgateway/oauth2-client": "^2.4.2",
|
||||
"iso-639-1": "^3.1.5",
|
||||
"zod": "^3.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,11 +151,9 @@ export class BaseClient {
|
|||
if (this.accessToken) {
|
||||
headers.set("Authorization", `Bearer ${this.accessToken}`);
|
||||
}
|
||||
if (body) {
|
||||
if (!(body instanceof FormData)) {
|
||||
headers.set("Content-Type", "application/json; charset=utf-8");
|
||||
} // else: let FormData set the content type, as it knows best (boundary, etc.)
|
||||
}
|
||||
if (body && !(body instanceof FormData)) {
|
||||
headers.set("Content-Type", "application/json; charset=utf-8");
|
||||
} // else: let FormData set the content type, as it knows best (boundary, etc.)
|
||||
|
||||
for (const [key, value] of Object.entries(extra?.headers || {})) {
|
||||
headers.set(key, value);
|
||||
|
|
|
|||
|
|
@ -1229,10 +1229,8 @@ export class Client extends BaseClient {
|
|||
): Promise<Output<z.infer<typeof Account>[]>> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (options) {
|
||||
if (options.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
if (options?.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
|
||||
return this.get<z.infer<typeof Account>[]>(
|
||||
|
|
@ -1449,10 +1447,8 @@ export class Client extends BaseClient {
|
|||
): Promise<Output<z.infer<typeof Tag>[]>> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (options) {
|
||||
if (options.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
if (options?.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
|
||||
return this.get<z.infer<typeof Tag>[]>(`/api/v1/trends?${params}`);
|
||||
|
|
@ -1839,10 +1835,8 @@ export class Client extends BaseClient {
|
|||
params.append("id[]", id);
|
||||
}
|
||||
|
||||
if (options) {
|
||||
if (options.with_suspended) {
|
||||
params.set("with_suspended", "true");
|
||||
}
|
||||
if (options?.with_suspended) {
|
||||
params.set("with_suspended", "true");
|
||||
}
|
||||
|
||||
return this.get<z.infer<typeof Relationship>[]>(
|
||||
|
|
@ -2121,10 +2115,8 @@ export class Client extends BaseClient {
|
|||
): Promise<Output<z.infer<typeof Account>[]>> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (options) {
|
||||
if (options.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
if (options?.limit) {
|
||||
params.set("limit", options.limit.toString());
|
||||
}
|
||||
|
||||
return this.get<z.infer<typeof Account>[]>(
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"drizzle-orm": "^0.41.0",
|
||||
"hono": "^4.7.6",
|
||||
"mitt": "^3.0.1",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.3",
|
||||
|
|
|
|||
|
|
@ -71,5 +71,10 @@
|
|||
"typescript",
|
||||
"sdk"
|
||||
],
|
||||
"packageManager": "bun@1.2.5"
|
||||
"packageManager": "bun@1.2.5",
|
||||
"dependencies": {
|
||||
"magic-regexp": "^0.9.0",
|
||||
"mime-types": "^3.0.1",
|
||||
"zod": "^3.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue