@forgecharts/sdk 1.5.62 → 1.5.64

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.
@@ -10442,14 +10442,29 @@ var DatafeedConnector = class {
10442
10442
  const tfSec = tfSeconds(timeframe);
10443
10443
  let lastSeenBarTime = lastBarTime ?? 0;
10444
10444
  let repairTimer = null;
10445
+ const REPAIR_RETRY_MS = 6e4;
10446
+ const REPAIR_MAX_ATTEMPTS = 15;
10447
+ let repairAttempts = 0;
10445
10448
  const repairGap = (fromTime, toTime) => {
10446
10449
  if (repairTimer) clearTimeout(repairTimer);
10447
10450
  repairTimer = setTimeout(() => {
10448
10451
  repairTimer = null;
10449
10452
  if (this._activeUID !== uid2 || this._destroyed) return;
10450
10453
  void this._datafeed.getHistoricalBars(symbol, timeframe, fromTime, toTime).then(({ bars: filled }) => {
10451
- if (this._activeUID !== uid2 || filled.length === 0) return;
10452
- engine.backfillGap(filled);
10454
+ if (this._activeUID !== uid2) return;
10455
+ if (filled.length > 0) engine.backfillGap(filled);
10456
+ const newest = filled.length > 0 ? filled[filled.length - 1].time : 0;
10457
+ const covered = tfSec > 0 && newest >= toTime - 2 * tfSec;
10458
+ if (!covered && repairAttempts < REPAIR_MAX_ATTEMPTS) {
10459
+ repairAttempts += 1;
10460
+ if (repairTimer) clearTimeout(repairTimer);
10461
+ repairTimer = setTimeout(() => {
10462
+ repairTimer = null;
10463
+ repairGap(fromTime, toTime);
10464
+ }, REPAIR_RETRY_MS);
10465
+ } else if (covered) {
10466
+ repairAttempts = 0;
10467
+ }
10453
10468
  }).catch(() => {
10454
10469
  });
10455
10470
  }, LIVE_GAP_REPAIR_DELAY_MS);
@@ -18297,7 +18312,7 @@ var DEMONSTRATION_STROKE = "rgba(255, 200, 50, 0.7)";
18297
18312
  var DEMONSTRATION_COLOR = "var(--crosshair-overlay, rgba(255,255,255,0.75))";
18298
18313
 
18299
18314
  // src/version.ts
18300
- var FORGECHARTS_VERSION = "1.5.62" ;
18315
+ var FORGECHARTS_VERSION = "1.5.64" ;
18301
18316
  function applyRuntimeConfig(caps, config) {
18302
18317
  if (!config) return caps;
18303
18318
  const orderEntry = config.enableOrderEntry === false ? false : caps.orderEntry;