fix(cloudflare.plugins): Switch to smartrequest namespace export and improve request typing and JSON parsing

This commit is contained in:
2025-11-17 23:22:00 +00:00
parent 0184371635
commit 002ac3ae01
4 changed files with 15 additions and 6 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 2025-11-17 - 6.4.3 - fix(cloudflare.plugins)
Switch to smartrequest namespace export and improve request typing and JSON parsing
- Export smartrequest as a namespace from cloudflare.plugins (replaced named SmartRequest/CoreResponse exports)
- Use plugins.smartrequest.SmartRequest.create() when building HTTP requests
- Type response as InstanceType<typeof plugins.smartrequest.CoreResponse> to match the new smartrequest export shape
- Safer JSON parsing: cast result of response.json() to the expected generic instead of relying on a generic json<T>() call and provide a text fallback when parsing fails
- Adjust imports/usages to align with @push.rocks/smartrequest namespace usage
## 2025-11-17 - 6.4.2 - fix(core)
Switch to SmartRequest fluent API and improve Cloudflare API request handling