@picsart/ai-sdk 1.135.0 → 1.136.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/_cli.js +1 -1
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/_cli.js CHANGED
@@ -583,7 +583,7 @@ function validateDescriptor(key, d, val, required) {
583
583
  }
584
584
  break;
585
585
  case "file":
586
- if (d.accept === "image") {
586
+ if (d.accept === "image" && d.max > 1) {
587
587
  if (!Array.isArray(val)) throw new Error(`"${key}" must be an array of URLs`);
588
588
  } else {
589
589
  if (typeof val !== "string") throw new Error(`"${key}" must be a string URL`);
package/index.js CHANGED
@@ -176,7 +176,7 @@ function validateDescriptor(key, d, val, required) {
176
176
  }
177
177
  break;
178
178
  case "file":
179
- if (d.accept === "image") {
179
+ if (d.accept === "image" && d.max > 1) {
180
180
  if (!Array.isArray(val)) throw new Error(`"${key}" must be an array of URLs`);
181
181
  } else {
182
182
  if (typeof val !== "string") throw new Error(`"${key}" must be a string URL`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "1.135.0",
3
+ "version": "1.136.1",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, and audio generation with Picsart",
6
6
  "license": "MIT",