From 1afd956e335dd450a30b6a1afdf610e27fa77b39 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 13:36:10 +0300 Subject: [PATCH 1/7] only show A record if subdomain --- .../components/CustomDomainDialog/VerifyStep.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 3b0e40df19a..dbdd7a7bf62 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -54,6 +54,14 @@ const VerifyStep = ({ return []; }; + const isSubdomain = (domain: string): boolean => { + domain = domain.replace(/^https?:\/\//, ''); + domain = domain.split('/')[0] ?? ''; + if (!domain) return false; + const parts: string[] = domain.split('.'); + return parts.length > 2; + } + const recommendedAValues = getRecommendedAValues(); // Check if DNS records are already correctly configured @@ -63,8 +71,7 @@ const VerifyStep = ({ const cnameConfigured = recommendedCnames.length > 0 && recommendedCnames.some((rec) => currentCnames.includes(rec.value)); - - const showARecord = recommendedARecord && !aRecordConfigured; + const showARecord = recommendedARecord && !aRecordConfigured && !isSubdomain(domain); const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; @@ -124,7 +131,7 @@ const VerifyStep = ({ ) : ( !isVerified && domainConfig && ( -
+
{/* TXT Record Configuration for Verification */} {showTXTRecord && (
From c05d9a2b2ded3b39200f0c43763d4d890ffc18cf Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:06:41 +0300 Subject: [PATCH 2/7] Update VerifyStep.tsx --- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index dbdd7a7bf62..22e29d9102b 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -131,7 +131,7 @@ const VerifyStep = ({ ) : ( !isVerified && domainConfig && ( -
+
{/* TXT Record Configuration for Verification */} {showTXTRecord && (
From 62202114f479af5ed91b09e6efbaec0906cbfc32 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:16:35 +0300 Subject: [PATCH 3/7] Update VerifyStep.tsx --- .../components/CustomDomainDialog/VerifyStep.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 22e29d9102b..c004b9ad433 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -55,12 +55,13 @@ const VerifyStep = ({ }; const isSubdomain = (domain: string): boolean => { - domain = domain.replace(/^https?:\/\//, ''); - domain = domain.split('/')[0] ?? ''; + domain = domain.replace(/^https?:\/\//, ""); + domain = domain.split("/")[0] ?? ""; if (!domain) return false; - const parts: string[] = domain.split('.'); + const parts: string[] = domain.split("."); return parts.length > 2; } + }; const recommendedAValues = getRecommendedAValues(); @@ -71,7 +72,8 @@ const VerifyStep = ({ const cnameConfigured = recommendedCnames.length > 0 && recommendedCnames.some((rec) => currentCnames.includes(rec.value)); - const showARecord = recommendedARecord && !aRecordConfigured && !isSubdomain(domain); + const showARecord = + recommendedARecord && !aRecordConfigured && !isSubdomain(domain); const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; From 2346c5bc52eb0369a21ee32b1438287b7e79d2af Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:16:55 +0300 Subject: [PATCH 4/7] Update VerifyStep.tsx --- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index c004b9ad433..7d5601df89d 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -60,7 +60,6 @@ const VerifyStep = ({ if (!domain) return false; const parts: string[] = domain.split("."); return parts.length > 2; - } }; const recommendedAValues = getRecommendedAValues(); From 67438ff139b0052eec36f9689fa20c6368701ac4 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:23:16 +0300 Subject: [PATCH 5/7] use tldts for domain extraction --- .../CustomDomainDialog/VerifyStep.tsx | 28 +++++++++---- apps/web/package.json | 1 + pnpm-lock.yaml | 40 +++++++++++++------ 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 7d5601df89d..b395ad09a37 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from "react"; import { toast } from "sonner"; import { useDashboardContext } from "@/app/(org)/dashboard/Contexts"; import type { DomainConfig, DomainVerification } from "./types"; +import { parse } from "tldts"; interface VerifyStepProps { domain: string; @@ -54,14 +55,25 @@ const VerifyStep = ({ return []; }; - const isSubdomain = (domain: string): boolean => { - domain = domain.replace(/^https?:\/\//, ""); - domain = domain.split("/")[0] ?? ""; - if (!domain) return false; - const parts: string[] = domain.split("."); - return parts.length > 2; + const isSubdomain = (raw: string): boolean => { + // Normalize and extract host (no scheme, path, port, or trailing dot) + const input = + raw + .trim() + .replace(/^https?:\/\//i, "") + .split("/")[0] ?? ""; + if (!input) return false; + const host = (input.replace(/\.$/, "").split(":")[0] || "").toLowerCase(); + try { + // Prefer PSL-backed parsing for correctness (e.g., co.uk, com.au) + const { subdomain } = parse(host); + return Boolean(subdomain); + } catch { + // Fallback: conservative heuristic + const parts = host.split("."); + return parts.length > 2; + } }; - const recommendedAValues = getRecommendedAValues(); // Check if DNS records are already correctly configured @@ -72,7 +84,7 @@ const VerifyStep = ({ recommendedCnames.length > 0 && recommendedCnames.some((rec) => currentCnames.includes(rec.value)); const showARecord = - recommendedARecord && !aRecordConfigured && !isSubdomain(domain); + recommendedAValues.length > 0 && !aRecordConfigured && !isSubdomain(domain); const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; diff --git a/apps/web/package.json b/apps/web/package.json index f0f9c754a67..56307e69a34 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -113,6 +113,7 @@ "subtitles-parser-vtt": "^0.1.0", "tailwind-merge": "^2.6.0", "tailwindcss-animate": "^1.0.7", + "tldts": "^7.0.11", "uuid": "^9.0.1", "zod": "^3.25.76" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d886fd36b07..6a8feac0558 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -726,6 +726,9 @@ importers: tailwindcss-animate: specifier: ^1.0.7 version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.17.43)(typescript@5.8.3))) + tldts: + specifier: ^7.0.11 + version: 7.0.11 uuid: specifier: ^9.0.1 version: 9.0.1 @@ -12713,10 +12716,17 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} + tldts-core@7.0.11: + resolution: {integrity: sha512-65eeOpBwWBabh0XqT+zB0vEllq/V3XcrF2fhgMXWWFfNw1yxEjeYg9Vv/B/UNozd0CTR/TohO1ubfn6O6mBW3w==} + tldts@6.1.86: resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true + tldts@7.0.11: + resolution: {integrity: sha512-7k7JV/LZpGhFUu2t+YDaMZ1wdPPRNpaCYNQ0NQbSLY3Rbgy+XbCdkXyqRiS9TLXiYAsrv0yiA0OvnxmgRFCdNA==} + hasBin: true + tmp-promise@3.0.3: resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} @@ -22224,8 +22234,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3) eslint: 9.30.1(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@9.30.1(jiti@2.4.2)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.30.1(jiti@2.4.2)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.30.1(jiti@2.4.2)) eslint-plugin-react: 7.37.5(eslint@9.30.1(jiti@2.4.2)) eslint-plugin-react-hooks: 4.6.2(eslint@9.30.1(jiti@2.4.2)) @@ -22253,33 +22263,33 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.0(supports-color@5.5.0) - eslint: 9.30.1(jiti@2.4.2) + eslint: 8.57.1 get-tsconfig: 4.10.0 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.13 unrs-resolver: 1.7.2 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@9.30.1(jiti@2.4.2)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.0(supports-color@5.5.0) - eslint: 8.57.1 + eslint: 9.30.1(jiti@2.4.2) get-tsconfig: 4.10.0 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.13 unrs-resolver: 1.7.2 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.30.1(jiti@2.4.2)) transitivePeerDependencies: - supports-color @@ -22294,14 +22304,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.30.1(jiti@2.4.2)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3) eslint: 9.30.1(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@9.30.1(jiti@2.4.2)) transitivePeerDependencies: - supports-color @@ -22345,7 +22355,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.30.1(jiti@2.4.2)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -22356,7 +22366,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.30.1(jiti@2.4.2) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)))(eslint@9.30.1(jiti@2.4.2)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@9.30.1(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.30.1(jiti@2.4.2)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -27848,10 +27858,16 @@ snapshots: tldts-core@6.1.86: {} + tldts-core@7.0.11: {} + tldts@6.1.86: dependencies: tldts-core: 6.1.86 + tldts@7.0.11: + dependencies: + tldts-core: 7.0.11 + tmp-promise@3.0.3: dependencies: tmp: 0.2.3 From f82baf8fe80ce5aa9cc49e2e306062b373a07711 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:30:06 +0300 Subject: [PATCH 6/7] biome formatting --- .../CustomDomainDialog/VerifyStep.tsx | 2 +- apps/web/app/api/playlist/route.ts | 10 +++--- apps/web/app/api/video/delete/route.ts | 3 +- packages/web-backend/src/S3Buckets/index.ts | 36 +++++++++---------- packages/web-backend/src/Videos/index.ts | 12 ++++--- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index b395ad09a37..33a5101ba94 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -3,9 +3,9 @@ import clsx from "clsx"; import { Check, Copy } from "lucide-react"; import { useEffect, useState } from "react"; import { toast } from "sonner"; +import { parse } from "tldts"; import { useDashboardContext } from "@/app/(org)/dashboard/Contexts"; import type { DomainConfig, DomainVerification } from "./types"; -import { parse } from "tldts"; interface VerifyStepProps { domain: string; diff --git a/apps/web/app/api/playlist/route.ts b/apps/web/app/api/playlist/route.ts index 59fd563efd4..b9330229afc 100644 --- a/apps/web/app/api/playlist/route.ts +++ b/apps/web/app/api/playlist/route.ts @@ -41,7 +41,7 @@ class Api extends HttpApi.make("CapWebApi").add( .addError(HttpApiError.InternalServerError) .addError(HttpApiError.NotFound), ), -) { } +) {} const ApiLive = HttpApiBuilder.api(Api).pipe( Layer.provide( @@ -198,11 +198,13 @@ const getPlaylistResponse = ( const generatedPlaylist = generateMasterPlaylist( videoMetadata?.Metadata?.resolution ?? "", videoMetadata?.Metadata?.bandwidth ?? "", - `${serverEnv().WEB_URL}/api/playlist?userId=${video.ownerId + `${serverEnv().WEB_URL}/api/playlist?userId=${ + video.ownerId }&videoId=${video.id}&videoType=video`, audioMetadata - ? `${serverEnv().WEB_URL}/api/playlist?userId=${video.ownerId - }&videoId=${video.id}&videoType=audio` + ? `${serverEnv().WEB_URL}/api/playlist?userId=${ + video.ownerId + }&videoId=${video.id}&videoType=audio` : null, ); diff --git a/apps/web/app/api/video/delete/route.ts b/apps/web/app/api/video/delete/route.ts index f4e3657ea47..b2bde7d11ee 100644 --- a/apps/web/app/api/video/delete/route.ts +++ b/apps/web/app/api/video/delete/route.ts @@ -6,7 +6,6 @@ import { HttpApiEndpoint, HttpApiError, HttpApiGroup, - HttpServerResponse, } from "@effect/platform"; import { Effect, Layer, Schema } from "effect"; import { apiToHandler } from "@/lib/server"; @@ -19,7 +18,7 @@ class Api extends HttpApi.make("Api").add( .addError(HttpApiError.Forbidden) .addError(HttpApiError.NotFound), ), -) { } +) {} const ApiLive = HttpApiBuilder.api(Api).pipe( Layer.provide( diff --git a/packages/web-backend/src/S3Buckets/index.ts b/packages/web-backend/src/S3Buckets/index.ts index 9a74178aab8..0d4507d8e30 100644 --- a/packages/web-backend/src/S3Buckets/index.ts +++ b/packages/web-backend/src/S3Buckets/index.ts @@ -13,28 +13,26 @@ export class S3Buckets extends Effect.Service()("S3Buckets", { const repo = yield* S3BucketsRepo; const defaultConfigs = { - publicEndpoint: - yield* Config.string("S3_PUBLIC_ENDPOINT").pipe( - Config.orElse(() => Config.string("CAP_AWS_ENDPOINT")), - Config.option, - Effect.flatten, - Effect.catchTag("NoSuchElementException", () => - Effect.dieMessage( - "Neither S3_PUBLIC_ENDPOINT nor CAP_AWS_ENDPOINT provided", - ), + publicEndpoint: yield* Config.string("S3_PUBLIC_ENDPOINT").pipe( + Config.orElse(() => Config.string("CAP_AWS_ENDPOINT")), + Config.option, + Effect.flatten, + Effect.catchTag("NoSuchElementException", () => + Effect.dieMessage( + "Neither S3_PUBLIC_ENDPOINT nor CAP_AWS_ENDPOINT provided", ), ), - internalEndpoint: - yield* Config.string("S3_INTERNAL_ENDPOINT").pipe( - Config.orElse(() => Config.string("CAP_AWS_ENDPOINT")), - Config.option, - Effect.flatten, - Effect.catchTag("NoSuchElementException", () => - Effect.dieMessage( - "Neither S3_INTERNAL_ENDPOINT nor CAP_AWS_ENDPOINT provided", - ), + ), + internalEndpoint: yield* Config.string("S3_INTERNAL_ENDPOINT").pipe( + Config.orElse(() => Config.string("CAP_AWS_ENDPOINT")), + Config.option, + Effect.flatten, + Effect.catchTag("NoSuchElementException", () => + Effect.dieMessage( + "Neither S3_INTERNAL_ENDPOINT nor CAP_AWS_ENDPOINT provided", ), ), + ), region: yield* Config.string("CAP_AWS_REGION"), accessKey: yield* Config.string("CAP_AWS_ACCESS_KEY"), secretKey: yield* Config.string("CAP_AWS_SECRET_KEY"), @@ -181,4 +179,4 @@ export class S3Buckets extends Effect.Service()("S3Buckets", { }; }), dependencies: [S3BucketsRepo.Default], -}) { } +}) {} diff --git a/packages/web-backend/src/Videos/index.ts b/packages/web-backend/src/Videos/index.ts index 44fe2e62259..81d8bc0314f 100644 --- a/packages/web-backend/src/Videos/index.ts +++ b/packages/web-backend/src/Videos/index.ts @@ -18,10 +18,12 @@ export class Videos extends Effect.Service()("Videos", { // This is only for external use since it does an access check, // internal use should prefer the repo directly getById: (id: Video.VideoId) => - repo.getById(id).pipe( - Policy.withPublicPolicy(policy.canView(id)), - Effect.withSpan("Videos.getById"), - ), + repo + .getById(id) + .pipe( + Policy.withPublicPolicy(policy.canView(id)), + Effect.withSpan("Videos.getById"), + ), /* * Delete a video. Will fail if the user does not have access. @@ -104,4 +106,4 @@ export class Videos extends Effect.Service()("Videos", { }; }), dependencies: [VideosPolicy.Default, VideosRepo.Default, S3Buckets.Default], -}) { } +}) {} From f186f9e9075325c182dd3119cc011d838f2d0a1d Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Fri, 15 Aug 2025 14:35:38 +0300 Subject: [PATCH 7/7] style update --- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 33a5101ba94..defcb5cf7d4 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -144,7 +144,7 @@ const VerifyStep = ({ ) : ( !isVerified && domainConfig && ( -
+
{/* TXT Record Configuration for Verification */} {showTXTRecord && (