js-url-gen
js-url-gen copied to clipboard
`cloudName` required unnecessarily
In https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/assets/CloudinaryFile.ts#L182-L193 a cloudName setting is explicitly required. However, in https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/internal/url/cloudinaryURL.ts#L20-L51 the cloudName isn't actually even utilized if using a secureDistribution and privateCDN.
The check for cloudName should be moved into getUrlPrefix and we should only throw when omitting the cloud name for branches where it's actually utilized.