feat(pages): import deployment packages from URL

Add upload-from-url so admins can paste an HTTP(S) link and let the control
plane download the archive with browser-like headers. Private/LAN hosts and
insecure TLS certificates are allowed for internal artifact stores; package
size and format checks reuse the existing local-upload pipeline.
This commit is contained in:
ryan
2026-07-17 17:55:12 +08:00
parent ce736e2de4
commit 79820b33eb
15 changed files with 1196 additions and 103 deletions
@@ -8,6 +8,7 @@ import { OpenFlareBaseService } from './base.service';
import type {
PagesDeployment,
PagesDeploymentFile,
PagesDeploymentUploadFromURLPayload,
PagesDeploymentUploadPayload,
PagesProject,
PagesProjectPayload,
@@ -67,6 +68,16 @@ export class PagesService extends OpenFlareBaseService {
);
}
static uploadDeploymentFromURL(
projectId: number,
payload: PagesDeploymentUploadFromURLPayload,
): Promise<PagesDeployment> {
return this.post<PagesDeployment>(
`/${projectId}/deployments/upload-from-url`,
payload,
);
}
static activateDeployment(
projectId: number,
deploymentId: number,
+4
View File
@@ -469,6 +469,10 @@ export interface PagesDeploymentUploadPayload {
onProgress?: (percent: number) => void;
}
export interface PagesDeploymentUploadFromURLPayload {
url: string;
}
// ==================== Origins ====================
export interface OriginItem {