@@ -49,7 +54,9 @@ export const SecurityAudit = ({ serverId }: Props) => {
Setup Security Suggestions
- Check the security suggestions
+
+ Check the security suggestions
+
);
-};
\ No newline at end of file
+};
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index 7d40866c..22649f92 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -84,7 +84,7 @@
"@trpc/client": "^10.43.6",
"@trpc/next": "^10.43.6",
"@trpc/react-query": "^10.43.6",
- "@trpc/server": "^10.45.2",
+ "@trpc/server": "^10.43.6",
"@uiw/codemirror-theme-github": "^4.22.1",
"@uiw/react-codemirror": "^4.22.1",
"@xterm/addon-attach": "0.10.0",
@@ -120,7 +120,6 @@
"next": "^15.0.1",
"next-i18next": "^15.3.1",
"next-themes": "^0.2.1",
- "node-fetch": "^3.3.2",
"node-os-utils": "1.3.7",
"node-pty": "1.0.0",
"node-schedule": "2.1.1",
@@ -162,7 +161,7 @@
"@types/js-yaml": "4.0.9",
"@types/lodash": "4.17.4",
"@types/micromatch": "4.0.9",
- "@types/node": "^18.19.42",
+ "@types/node": "^18.17.0",
"@types/node-os-utils": "1.3.4",
"@types/node-schedule": "2.1.6",
"@types/nodemailer": "^6.4.15",
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 1a0723cb..6695756c 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -2,16 +2,16 @@ import type { IncomingMessage } from "node:http";
import * as bcrypt from "bcrypt";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
-import { APIError } from "better-auth/api";
-import { apiKey, organization, twoFactor } from "better-auth/plugins";
+import { organization, twoFactor, apiKey } from "better-auth/plugins";
import { and, desc, eq } from "drizzle-orm";
-import { IS_CLOUD } from "../constants";
import { db } from "../db";
import * as schema from "../db/schema";
-import { getUserByToken } from "../services/admin";
-import { updateUser } from "../services/user";
import { sendEmail } from "../verification/send-verification-email";
+import { IS_CLOUD } from "../constants";
import { getPublicIpWithFallback } from "../wss/utils";
+import { updateUser } from "../services/user";
+import { getUserByToken } from "../services/admin";
+import { APIError } from "better-auth/api";
const { handler, api } = betterAuth({
database: drizzleAdapter(db, {
@@ -32,26 +32,26 @@ const { handler, api } = betterAuth({
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
- // ...(!IS_CLOUD && {
- // async trustedOrigins() {
- // const admin = await db.query.member.findFirst({
- // where: eq(schema.member.role, "owner"),
- // with: {
- // user: true,
- // },
- // });
+ ...(!IS_CLOUD && {
+ async trustedOrigins() {
+ const admin = await db.query.member.findFirst({
+ where: eq(schema.member.role, "owner"),
+ with: {
+ user: true,
+ },
+ });
- // if (admin) {
- // return [
- // ...(admin.user.serverIp
- // ? [`http://${admin.user.serverIp}:3000`]
- // : []),
- // ...(admin.user.host ? [`https://${admin.user.host}`] : []),
- // ];
- // }
- // return [];
- // },
- // }),
+ if (admin) {
+ return [
+ ...(admin.user.serverIp
+ ? [`http://${admin.user.serverIp}:3000`]
+ : []),
+ ...(admin.user.host ? [`https://${admin.user.host}`] : []),
+ ];
+ }
+ return [];
+ },
+ }),
emailVerification: {
sendOnSignUp: true,
autoSignInAfterVerification: true,
diff --git a/packages/server/src/setup/server-audit.ts b/packages/server/src/setup/server-audit.ts
index fed65c12..21d61cc8 100644
--- a/packages/server/src/setup/server-audit.ts
+++ b/packages/server/src/setup/server-audit.ts
@@ -148,4 +148,4 @@ export const serverAudit = async (serverId: string) => {
privateKey: server.sshKey?.privateKey,
});
});
-};
\ No newline at end of file
+};
diff --git a/packages/server/src/utils/providers/gitea.ts b/packages/server/src/utils/providers/gitea.ts
index 7b22e490..d05ab8d9 100644
--- a/packages/server/src/utils/providers/gitea.ts
+++ b/packages/server/src/utils/providers/gitea.ts
@@ -1,17 +1,17 @@
import { createWriteStream } from "node:fs";
import { join } from "node:path";
import { paths } from "@dokploy/server/constants";
+import type { Compose } from "@dokploy/server/services/compose";
import {
- findGiteaById,
type Gitea,
+ findGiteaById,
updateGitea,
} from "@dokploy/server/services/gitea";
+import type { InferResultType } from "@dokploy/server/types/with";
import { TRPCError } from "@trpc/server";
import { recreateDirectory } from "../filesystem/directory";
import { execAsyncRemote } from "../process/execAsync";
import { spawnAsync } from "../process/spawnAsync";
-import type { Compose } from "@dokploy/server/services/compose";
-import type { InferResultType } from "@dokploy/server/types/with";
export const getErrorCloneRequirements = (entity: {
giteaRepository?: string | null;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 23ff3b0d..9ddbc702 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -242,7 +242,7 @@ importers:
specifier: ^10.43.6
version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@trpc/server':
- specifier: ^10.45.2
+ specifier: ^10.43.6
version: 10.45.2
'@uiw/codemirror-theme-github':
specifier: ^4.22.1
@@ -349,9 +349,6 @@ importers:
next-themes:
specifier: ^0.2.1
version: 0.2.1(next@15.0.1(@opentelemetry/api@1.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
- node-fetch:
- specifier: ^3.3.2
- version: 3.3.2
node-os-utils:
specifier: 1.3.7
version: 1.3.7
@@ -471,7 +468,7 @@ importers:
specifier: 4.0.9
version: 4.0.9
'@types/node':
- specifier: ^18.19.42
+ specifier: ^18.17.0
version: 18.19.42
'@types/node-os-utils':
specifier: 1.3.4
@@ -4474,10 +4471,6 @@ packages:
resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==}
engines: {node: '>=12'}
- data-uri-to-buffer@4.0.1:
- resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
- engines: {node: '>= 12'}
-
date-fns@3.6.0:
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
@@ -4928,10 +4921,6 @@ packages:
fault@1.0.4:
resolution: {integrity: sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==}
- fetch-blob@3.2.0:
- resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
- engines: {node: ^12.20 || >= 14.13}
-
file-uri-to-path@1.0.0:
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
@@ -4972,10 +4961,6 @@ packages:
resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==}
engines: {node: '>=0.4.x'}
- formdata-polyfill@4.0.10:
- resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
- engines: {node: '>=12.20.0'}
-
fraction.js@4.3.7:
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
@@ -6073,10 +6058,6 @@ packages:
encoding:
optional: true
- node-fetch@3.3.2:
- resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
node-gyp-build-optional-packages@5.2.2:
resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==}
hasBin: true
@@ -11412,8 +11393,6 @@ snapshots:
dargs@8.1.0: {}
- data-uri-to-buffer@4.0.1: {}
-
date-fns@3.6.0: {}
dateformat@4.6.3: {}
@@ -11820,11 +11799,6 @@ snapshots:
dependencies:
format: 0.2.2
- fetch-blob@3.2.0:
- dependencies:
- node-domexception: 1.0.0
- web-streams-polyfill: 3.3.3
-
file-uri-to-path@1.0.0:
optional: true
@@ -11860,10 +11834,6 @@ snapshots:
format@0.2.2: {}
- formdata-polyfill@4.0.10:
- dependencies:
- fetch-blob: 3.2.0
-
fraction.js@4.3.7: {}
fresh@0.5.2: {}
@@ -13165,12 +13135,6 @@ snapshots:
optionalDependencies:
encoding: 0.1.13
- node-fetch@3.3.2:
- dependencies:
- data-uri-to-buffer: 4.0.1
- fetch-blob: 3.2.0
- formdata-polyfill: 4.0.10
-
node-gyp-build-optional-packages@5.2.2:
dependencies:
detect-libc: 2.0.3