Move proxy to BaseDeployProvider

This commit is contained in:
Alex Gleason committed 2025-10-18 20:48:17 -05:00
1 parent 646a67d19d
commit 1ab86f2009
2 files changed
+2 -6

No files matched your search

+1 -3
View File
@@ -3,26 +3,24 @@ import { createContext } from 'react';
export interface BaseDeployProvider {
id: string;
name: string;
proxy?: boolean;
}
export interface ShakespeareDeployProvider extends BaseDeployProvider {
type: 'shakespeare';
host?: string;
proxy?: boolean;
}
export interface NetlifyProvider extends BaseDeployProvider {
type: 'netlify';
apiKey: string;
baseURL?: string;
proxy?: boolean;
}
export interface VercelProvider extends BaseDeployProvider {
type: 'vercel';
apiKey: string;
baseURL?: string;
proxy?: boolean;
}
export type DeployProvider = ShakespeareDeployProvider | NetlifyProvider | VercelProvider;
+1 -3
View File
@@ -51,26 +51,24 @@ const gitSettingsSchema = z.object({
const baseDeployProviderSchema = z.object({
id: z.string(),
name: z.string(),
proxy: z.boolean().optional(),
});
const shakespeareDeployProviderSchema = baseDeployProviderSchema.extend({
type: z.literal('shakespeare'),
host: z.string().optional(),
proxy: z.boolean().optional(),
});
const netlifyProviderSchema = baseDeployProviderSchema.extend({
type: z.literal('netlify'),
apiKey: z.string(),
baseURL: z.string().optional(),
proxy: z.boolean().optional(),
});
const vercelProviderSchema = baseDeployProviderSchema.extend({
type: z.literal('vercel'),
apiKey: z.string(),
baseURL: z.string().optional(),
proxy: z.boolean().optional(),
});
const deployProviderSchema: z.ZodType<DeployProvider> = z.discriminatedUnion('type', [