@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.
- package/dist/datafeed/DatafeedConnector.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.js +18 -3
- package/dist/internal.js.map +1 -1
- package/dist/react/index.js +18 -3
- package/dist/react/index.js.map +1 -1
- package/dist/react/internal.js +18 -3
- package/dist/react/internal.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -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 !== uid || this._destroyed) return;
|
|
10450
10453
|
void this._datafeed.getHistoricalBars(symbol, timeframe, fromTime, toTime).then(({ bars: filled }) => {
|
|
10451
|
-
if (this._activeUID !== uid
|
|
10452
|
-
engine.backfillGap(filled);
|
|
10454
|
+
if (this._activeUID !== uid) 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);
|
|
@@ -18074,7 +18089,7 @@ var DEMONSTRATION_STROKE = "rgba(255, 200, 50, 0.7)";
|
|
|
18074
18089
|
var DEMONSTRATION_COLOR = "var(--crosshair-overlay, rgba(255,255,255,0.75))";
|
|
18075
18090
|
|
|
18076
18091
|
// src/version.ts
|
|
18077
|
-
var FORGECHARTS_VERSION = "1.5.
|
|
18092
|
+
var FORGECHARTS_VERSION = "1.5.64" ;
|
|
18078
18093
|
function applyRuntimeConfig(caps, config) {
|
|
18079
18094
|
if (!config) return caps;
|
|
18080
18095
|
const orderEntry = config.enableOrderEntry === false ? false : caps.orderEntry;
|