feat: add configurable VPS provider API URLs for emulator testing
- Add LINODE_API_URL and VULTR_API_URL environment variables - Update LinodeProvider and VultrProvider to accept optional baseUrl - Update ProvisioningService to pass API URLs to providers - Add source_provider and source_region_code to PricingWithProvider type - Use source_provider (linode/vultr) instead of provider_name (Anvil) - Improve error handling for non-JSON responses in LinodeProvider Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,10 +36,12 @@ interface VultrError {
|
||||
}
|
||||
|
||||
export class VultrProvider extends VPSProviderBase {
|
||||
constructor(apiKey: string, timeout: number = 30000) {
|
||||
static readonly DEFAULT_BASE_URL = 'https://api.vultr.com/v2';
|
||||
|
||||
constructor(apiKey: string, baseUrl?: string, timeout: number = 30000) {
|
||||
super({
|
||||
apiKey,
|
||||
baseUrl: 'https://api.vultr.com/v2',
|
||||
baseUrl: baseUrl || VultrProvider.DEFAULT_BASE_URL,
|
||||
timeout,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user