Commit 01c844d
feat: image cdn support (#232)
* feat: initial image cdn handling
* chore: fix lint
* chore: format
* chore: TODO note about serverAddress
* feat: warn about invalid remote patterns
* test: add tests for remote images
* test: add tests for images endpoint and request method
* post-merge fixes
* adjust feature support matrix
* test: adjust assertions for added feature
* chore: fix lint
* test: adjust to not use .bytes(), match mocked response, not response text
* fix: use originServerAddress
* chore: remove not existign server.d.ts from package.json#files
* test: use mock logger from dev-utils
* test: add first local image test
* test: add tests for resizing
* test: test image cdn handling in vite
* chore: add jsdoc for generateImage
* chore: no need to supress n/no-unsupported-features/node-builtins
* docs: fix shield url for netlify/images
* fix: drop node 18
* chore: add images to .release-please-manifest.json
* fix: spin up server when images are enabled and there is no origin server provided
* chore: fix lint
* Update packages/images/src/main.ts
Co-authored-by: Eduardo Bouças <[email protected]>
* chore: http.createServer -> HTTPServer
* fix: early bail to limit nesting
* refactor: create helper function for HTTPServer handler that serves random images
* test: use own http server for testing remote images instead of unsplash
* fix: move image matching to before function matching
* fix: handle image cdn rewrites
* fix: log error when image generation for tests fails
---------
Co-authored-by: Eduardo Bouças <[email protected]>1 parent d546c22 commit 01c844d
File tree
23 files changed
+2412
-97
lines changed- .github/workflows
- packages
- dev-utils
- src
- test
- dev
- src
- images
- src
- vite-plugin/src
23 files changed
+2412
-97
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| |||
0 commit comments