Let baseDomain be configured for Cloudflare and Deno Deploy

This commit is contained in:
Alex Gleason committed 2025-12-04 00:17:11 -06:00
1 parent bbb4a2534b
commit 2096c83b3c
9 files changed
+64 -7

No files matched your search

@@ -27,6 +27,7 @@ interface CloudflareDeployFormProps {
apiKey: string;
accountId: string;
baseURL?: string;
baseDomain?: string;
projectId: string;
projectName?: string;
savedProjectName?: string;
@@ -38,6 +39,7 @@ export function CloudflareDeployForm({
apiKey,
accountId,
baseURL = 'https://api.cloudflare.com/client/v4',
baseDomain = 'workers.dev',
projectId,
projectName,
savedProjectName,
@@ -136,9 +138,9 @@ export function CloudflareDeployForm({
// Construct the URL preview
const getWorkerUrl = (scriptName: string) => {
if (workersSubdomain) {
return `https://${scriptName}.${workersSubdomain}.workers.dev`;
return `https://${scriptName}.${workersSubdomain}.${baseDomain}`;
}
return `https://${scriptName}.<subdomain>.workers.dev`;
return `https://${scriptName}.<subdomain>.${baseDomain}`;
};
return (
+3 -1
View File
@@ -25,6 +25,7 @@ interface DenoDeployFormProps {
apiKey: string;
organizationId: string;
baseURL?: string;
baseDomain?: string;
projectId: string;
projectName?: string;
savedProjectName?: string;
@@ -36,6 +37,7 @@ export function DenoDeployForm({
apiKey,
organizationId,
baseURL = 'https://api.deno.com/v1',
baseDomain = 'deno.dev',
projectId,
projectName,
savedProjectName,
@@ -117,7 +119,7 @@ export function DenoDeployForm({
// Construct the URL preview
const getProjectUrl = (name: string) => {
return `https://${name}.deno.dev`;
return `https://${name}.${baseDomain}`;
};
return (