Add DeployDialog

This commit is contained in:
Alex Gleason committed 2025-09-22 02:46:12 -05:00
1 parent cadebaaa0e
commit d52d7b57a6
6 files changed
+292 -74

No files matched your search

+5 -3
View File
@@ -14,6 +14,8 @@ export interface DeployOptions {
projectPath: string;
/** Nostr signer for NIP-98 authentication */
signer: NostrSigner;
/** Custom hostname to use instead of constructing from projectId.deployServer */
customHostname?: string;
}
export interface DeployResult {
@@ -28,10 +30,10 @@ export interface DeployResult {
* to the deployment server using NIP-98 authentication.
*/
export async function deployProject(options: DeployOptions): Promise<DeployResult> {
const { projectId, deployServer, fs, projectPath, signer } = options;
const { projectId, deployServer, fs, projectPath, signer, customHostname } = options;
// Construct hostname and URL
const hostname = `${projectId}.${deployServer}`;
// Use custom hostname if provided, otherwise construct from projectId.deployServer
const hostname = customHostname || `${projectId}.${deployServer}`;
const deployUrl = `https://${deployServer}/deploy`;
const siteUrl = `https://${hostname}`;