Fix Cloudflare config persistence

This commit is contained in:
Alex Gleason committed 2025-12-03 21:21:30 -06:00
1 parent 9017c5c382
commit cc8a02a564
4 files changed
+71 -60

No files matched your search

+4 -8
View File
@@ -77,14 +77,9 @@ export class CloudflareAdapter implements DeployAdapter {
// Construct the production URL
// The subdomain from the API response already includes the full domain
// e.g., "error-button.pages.dev" not just "error-button"
let productionUrl: string;
if (project.subdomain.includes('.')) {
// Subdomain already includes the domain
productionUrl = `https://${project.subdomain}`;
} else {
// Subdomain is just the name, append .pages.dev
productionUrl = `https://${project.subdomain}.pages.dev`;
}
const productionUrl = project.subdomain.includes('.')
? `https://${project.subdomain}`
: `https://${project.subdomain}.pages.dev`;
return {
url: deployment.url,
@@ -92,6 +87,7 @@ export class CloudflareAdapter implements DeployAdapter {
deploymentId: deployment.id,
projectId: project.id,
projectName: project.name,
productionUrl,
provider: 'cloudflare',
environment: deployment.environment,
},