tardis-machine
Advanced tools
Comparing version 3.3.7 to 3.3.8
@@ -125,9 +125,9 @@ "use strict"; | ||
} | ||
const values = dataType.replace('book_snapshot_', ''); | ||
const depthString = values.slice(0, values.indexOf('_')); | ||
const depth = Number(depthString); | ||
const parts = dataType.split('_'); | ||
const depthString = parts[2]; | ||
const depth = Number(parts[2]); | ||
if (depth === NaN) { | ||
throw new Error(`invalid depth: ${depthString}, data type: ${dataType}`); | ||
} | ||
const intervalString = values.slice(values.indexOf('_') + 1).replace(suffix, ''); | ||
const intervalString = parts[parts.length - 1].replace(suffix, ''); | ||
const interval = Number(intervalString); | ||
@@ -137,4 +137,14 @@ if (interval === NaN) { | ||
} | ||
const isGrouped = parts.length === 5; | ||
let grouping; | ||
if (isGrouped) { | ||
const groupingString = parts[3].replace('grouped', ''); | ||
grouping = Number(groupingString); | ||
if (grouping === NaN) { | ||
throw new Error(`invalid interval: ${groupingString}, data type: ${dataType}`); | ||
} | ||
} | ||
return tardis_dev_1.computeBookSnapshots({ | ||
interval: bookSnapshotsToIntervalMultiplierMap[suffix].multiplier * interval, | ||
grouping, | ||
depth, | ||
@@ -141,0 +151,0 @@ name: dataType |
{ | ||
"name": "tardis-machine", | ||
"version": "3.3.7", | ||
"version": "3.3.8", | ||
"engines": { | ||
@@ -61,3 +61,3 @@ "node": ">=12" | ||
"is-docker": "^2.1.1", | ||
"tardis-dev": "^12.4.15", | ||
"tardis-dev": "^12.4.17", | ||
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v18.8.0", | ||
@@ -64,0 +64,0 @@ "yargs": "^16.1.1" |
@@ -170,11 +170,12 @@ import { | ||
} | ||
const values = dataType.replace('book_snapshot_', '') | ||
const depthString = values.slice(0, values.indexOf('_')) | ||
const depth = Number(depthString) | ||
const parts = dataType.split('_') | ||
const depthString = parts[2] | ||
const depth = Number(parts[2]) | ||
if (depth === NaN) { | ||
throw new Error(`invalid depth: ${depthString}, data type: ${dataType}`) | ||
} | ||
const intervalString = parts[parts.length - 1].replace(suffix, '') | ||
const intervalString = values.slice(values.indexOf('_') + 1).replace(suffix, '') | ||
const interval = Number(intervalString) | ||
@@ -185,4 +186,17 @@ if (interval === NaN) { | ||
const isGrouped = parts.length === 5 | ||
let grouping | ||
if (isGrouped) { | ||
const groupingString = parts[3].replace('grouped', '') | ||
grouping = Number(groupingString) | ||
if (grouping === NaN) { | ||
throw new Error(`invalid interval: ${groupingString}, data type: ${dataType}`) | ||
} | ||
} | ||
return computeBookSnapshots({ | ||
interval: bookSnapshotsToIntervalMultiplierMap[suffix].multiplier * interval, | ||
grouping, | ||
depth, | ||
@@ -189,0 +203,0 @@ name: dataType |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
160230
2686
Updatedtardis-dev@^12.4.17