From 53887cd6b3d803f9dc27f9d5be33d9af4adf02aa Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:02:35 -0400 Subject: [PATCH 1/2] docs: add Mrinank-Bhowmick as a contributor for code (#222) Adds @Mrinank-Bhowmick as a contributor for code. This was requested by colbyfayock [in this comment](https://github.com/cloudinary-community/cloudinary-util/pull/218#issuecomment-2429161096) [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 2c970fb..5e6d363 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -114,6 +114,15 @@ "contributions": [ "code" ] + }, + { + "login": "Mrinank-Bhowmick", + "name": "Mrinank Bhowmick", + "avatar_url": "https://avatars.githubusercontent.com/u/77621953?v=4", + "profile": "https://www.mrinank.me", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 61c1579..f59dc91 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-) @@ -86,6 +86,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Soumyadip Moni
Soumyadip Moni

💻 NOORAS FATIMA ANSARI
NOORAS FATIMA ANSARI

💻 Ayan Joshi
Ayan Joshi

💻 + Mrinank Bhowmick
Mrinank Bhowmick

💻 From 0ecd331e1bfe9244bedc82fc8d61e228bdc00d4c Mon Sep 17 00:00:00 2001 From: Saai Syvendra <157691467+saai-syvendra@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:33:58 +0530 Subject: [PATCH 2/2] fix: Add enum for format parameter (#220) # Description Add a list of allowable strings as an enum type for the format parameter. ## Issue Ticket Number Fixes #142 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Fix or improve the documentation - [ ] This change requires a documentation update # Checklist - [x] I have followed the contributing guidelines of this project as mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md) - [x] I have created an [issue](https://github.com/colbyfayock/cloudinary-util/issues) ticket for this PR - [x] I have checked to ensure there aren't other open [Pull Requests](https://github.com/colbyfayock/cloudinary-util/pulls) for the same update/change? - [x] I have performed a self-review of my own code - [ ] I have run tests locally to ensure they all pass - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes needed to the documentation --- packages/url-loader/src/types/asset.ts | 31 +++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/url-loader/src/types/asset.ts b/packages/url-loader/src/types/asset.ts index 420474f..53a27a6 100644 --- a/packages/url-loader/src/types/asset.ts +++ b/packages/url-loader/src/types/asset.ts @@ -45,7 +45,36 @@ export const assetOptionsSchema = z.object({ ) .optional(), format: z - .string() + .enum([ + "auto", + "auto:image", + "auto:animated", + "gif", + "png", + "jpg", + "bmp", + "ico", + "pdf", + "tiff", + "eps", + "jpc", + "jp2", + "psd", + "webp", + "zip", + "svg", + "webm", + "wdp", + "hpx", + "djvu", + "ai", + "flif", + "bpg", + "miff", + "tga", + "heic", + "default" // library specific feature to turn off automatic optimization + ]) .default("auto") .describe( JSON.stringify({