ultravisor 1.0.12 → 1.0.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultravisor",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Cyclic process execution with ai integration.",
5
5
  "main": "source/Ultravisor.cjs",
6
6
  "bin": {
@@ -215,7 +215,9 @@ module.exports =
215
215
  // Already exists — fine
216
216
  }
217
217
 
218
- pTask.log.info(`File Transfer: downloading ${tmpSourceURL} ${tmpFilename}`);
218
+ let tmpTimeoutMs = parseInt(pResolvedSettings.TimeoutMs, 10) || 300000;
219
+
220
+ pTask.log.info(`File Transfer: downloading ${tmpSourceURL} → ${tmpFilename} (timeout ${Math.round(tmpTimeoutMs / 1000)}s)`);
219
221
 
220
222
  // Validate URL before attempting request
221
223
  if (!tmpSourceURL.startsWith('http://') && !tmpSourceURL.startsWith('https://'))
@@ -269,10 +271,10 @@ module.exports =
269
271
  });
270
272
  });
271
273
 
272
- // Set a 5-minute timeout on the request
273
- tmpRequest.setTimeout(300000, function ()
274
+ // Set timeout on the request (configurable via TimeoutMs setting, default 5 min)
275
+ tmpRequest.setTimeout(tmpTimeoutMs, function ()
274
276
  {
275
- tmpRequest.destroy(new Error('File Transfer: download timed out after 5 minutes'));
277
+ tmpRequest.destroy(new Error(`File Transfer: download timed out after ${Math.round(tmpTimeoutMs / 1000)} seconds`));
276
278
  });
277
279
  }
278
280
  },