@computesdk/sandbox0 1.0.22 → 1.0.24

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/dist/index.mjs CHANGED
@@ -22525,10 +22525,11 @@ function normalizeMemory(value) {
22525
22525
  }
22526
22526
  function buildClaimOptions(config, options) {
22527
22527
  const providerOptions = options;
22528
- const ttl = optionalPositiveSeconds("ttl", providerOptions?.ttl ?? config.ttl);
22528
+ const timeoutSeconds = typeof options?.timeout === "number" && Number.isFinite(options.timeout) && options.timeout > 0 ? Math.ceil(options.timeout / 1e3) : void 0;
22529
+ const ttl = optionalPositiveSeconds("ttl", providerOptions?.ttl ?? timeoutSeconds ?? config.ttl);
22529
22530
  const hardTtl = optionalPositiveSeconds(
22530
22531
  "hardTtl",
22531
- providerOptions?.hardTtl ?? config.hardTtl
22532
+ providerOptions?.hardTtl ?? timeoutSeconds ?? config.hardTtl
22532
22533
  );
22533
22534
  const autoResume = providerOptions?.autoResume;
22534
22535
  if (autoResume !== void 0 && typeof autoResume !== "boolean") {