vargai 0.4.0-alpha40 → 0.4.0-alpha42

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.
package/package.json CHANGED
@@ -68,7 +68,7 @@
68
68
  "sharp": "^0.34.5",
69
69
  "zod": "^4.2.1"
70
70
  },
71
- "version": "0.4.0-alpha40",
71
+ "version": "0.4.0-alpha42",
72
72
  "exports": {
73
73
  ".": "./src/index.ts",
74
74
  "./ai": "./src/ai-sdk/index.ts",
@@ -22,10 +22,12 @@ interface PendingRequest {
22
22
 
23
23
  const pendingStorage = fileCache({ dir: ".cache/fal-pending" });
24
24
 
25
- const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
26
- const FAL_TIMEOUT_MS = process.env.FAL_TIMEOUT_MS
27
- ? Number.parseInt(process.env.FAL_TIMEOUT_MS, 10)
28
- : DEFAULT_TIMEOUT_MS;
25
+ const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
26
+ const FAL_TIMEOUT_MS = (() => {
27
+ if (!process.env.FAL_TIMEOUT_MS) return DEFAULT_TIMEOUT_MS;
28
+ const parsed = Number.parseInt(process.env.FAL_TIMEOUT_MS, 10);
29
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_TIMEOUT_MS;
30
+ })();
29
31
 
30
32
  const VIDEO_MODELS: Record<string, { t2v: string; i2v: string }> = {
31
33
  // Kling v2.6 - latest with native audio generation