Commit 3900330
authored
feat: CDN integration with OSS and API Gateway CDN support (#195)
This pull request introduces support for Alibaba Cloud CDN and OSS
Transfer Acceleration, expands the SDK client layer, and includes
dependency upgrade fixes and code review corrections.
## Major Features
### CDN and Transfer Acceleration Support
- CDN acceleration and OSS Transfer Acceleration for static website
hosting
- Simple (`cdn: true`) and advanced configuration options
- Dual-layer acceleration (CDN + Transfer Acceleration)
- Full CDN lifecycle: domain creation, certificate binding,
cache/compression/protocol/HTTPS redirect configuration
### SDK Client Expansion
- New `cdnOperations` module with domain, certificate, cache, protocol,
compression, and HTTPS redirect management
- CDN SDK client integrated into Aliyun client factory
- DNS operations for CNAME record management
## Bug Fixes & Corrections
### CDN API Fix (Critical)
- `applyProtocolConfig` now uses correct `forward_scheme` feature (not
`range`) for origin protocol configuration
- The `range` feature controls back-to-origin range slicing, not
protocol. Origin protocol requires `forward_scheme` with `enable`
parameter.
### Dependency Upgrade Compatibility
- CDN SDK v9.2.0: `SetDomainServerCertificate` →
`SetCdnDomainSSLCertificate` API migration
- @types/jest v30: tsconfig `types` field for Jest globals
- Flaky test retry logic for ECONNRESET race condition
### Code Quality
- Added `dns` property to `MockAliyunClient` type (was missing from
mock)
- Removed redundant `isCdnEnabled` double-check in OSS www CDN block
- Added 12 tests for `BatchSetCdnDomainConfig` functions
(`applyCacheConfig`, `applyProtocolConfig`, `applyCompression`,
`applyHttpsRedirect`)
## Documentation
- Updated README with CDN/acceleration configuration examples
- Clarified project value proposition in English and Chinese docs
## Test Coverage
- 128 test suites, 2219 tests passed
- 94.31% coverage (above 85% threshold)
## Commits
1. `feat: CDN integration with OSS and API Gateway CDN support` -
Original feature
2. `fix: resolve dependency upgrade compatibility issues` - SDK/API
migration
3. `fix: correct CDN origin protocol API and code review issues` - Bug
fixes and tests1 parent 2163ebb commit 3900330
42 files changed
Lines changed: 6809 additions & 1021 deletions
File tree
- docs/adr
- src
- common
- aliyunClient
- volcengineClient
- lang
- parser
- stack/aliyunStack
- types/domains
- validator
- tests
- service
- unit
- common/aliyunClient
- parser
- stack
- aliyunStack
- localStack
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
347 | 404 | | |
348 | 405 | | |
349 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
Large diffs are not rendered by default.
0 commit comments