fix: add timeout and HEAD request to registry validation#2048
fix: add timeout and HEAD request to registry validation#2048FraktalDeFiDAO wants to merge 5 commits intoasyncapi:masterfrom
Conversation
- Add 5 second timeout using AbortController - Use HEAD request instead of GET for lighter check - Properly handle timeout error with meaningful message - Fixes asyncapi#2027
|
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Previously, the registry validation would swallow error details, making debugging impossible. Now the underlying cause is included in the error message. Fixes: asyncapi#2013
Add support for reading AsyncAPI documents from stdin using '-' as the input path. This is a widely accepted convention in Unix-style CLIs. Changes: - Add Specification.fromStdin() method to read from process.stdin - Update load() function to check for '-' and call fromStdin() - Add 'stdin' error type to ErrorLoadingSpec for clear error messages Crypto wallets for bounty: - RTC: RTCbc57f8031699a0bab6e9a8a2769822f19f115dc5 - ETH: 0x742F4fA4224c47C4C4A1d3e4eE4F4e5A2fF8E1 - SOL: FH84Dg6gh7bWtyZ5a1SBNLp1JBesLoCKx9mekJpr7zHR Fixes asyncapi#2011
|



Summary
Fixes issue #2027 - CLI hangs indefinitely when
--registry-urlis unreachable.Changes
Fixes: #2027
Testing
Manual test:
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template \ --registry-url http://10.255.255.1 # Should fail after 5 seconds with timeout errorBounty Submission
Crypto wallets for bounty: