backtest-kit 2.2.11 → 2.2.12

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/build/index.cjs CHANGED
@@ -31992,6 +31992,9 @@ class StorageAdapter {
31992
31992
  */
31993
31993
  this.findSignalById = async (id) => {
31994
31994
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_FIND_SIGNAL_BY_ID, { id });
31995
+ if (!this.enable.hasValue()) {
31996
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
31997
+ }
31995
31998
  let result = null;
31996
31999
  if ((result = await this._signalBacktestUtils.findById(id))) {
31997
32000
  return result;
@@ -32008,6 +32011,9 @@ class StorageAdapter {
32008
32011
  */
32009
32012
  this.listSignalBacktest = async () => {
32010
32013
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_LIST_SIGNAL_BACKTEST);
32014
+ if (!this.enable.hasValue()) {
32015
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
32016
+ }
32011
32017
  return await this._signalBacktestUtils.list();
32012
32018
  };
32013
32019
  /**
@@ -32017,6 +32023,9 @@ class StorageAdapter {
32017
32023
  */
32018
32024
  this.listSignalLive = async () => {
32019
32025
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_LIST_SIGNAL_LIVE);
32026
+ if (!this.enable.hasValue()) {
32027
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
32028
+ }
32020
32029
  return await this._signalLiveUtils.list();
32021
32030
  };
32022
32031
  }
package/build/index.mjs CHANGED
@@ -31972,6 +31972,9 @@ class StorageAdapter {
31972
31972
  */
31973
31973
  this.findSignalById = async (id) => {
31974
31974
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_FIND_SIGNAL_BY_ID, { id });
31975
+ if (!this.enable.hasValue()) {
31976
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
31977
+ }
31975
31978
  let result = null;
31976
31979
  if ((result = await this._signalBacktestUtils.findById(id))) {
31977
31980
  return result;
@@ -31988,6 +31991,9 @@ class StorageAdapter {
31988
31991
  */
31989
31992
  this.listSignalBacktest = async () => {
31990
31993
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_LIST_SIGNAL_BACKTEST);
31994
+ if (!this.enable.hasValue()) {
31995
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
31996
+ }
31991
31997
  return await this._signalBacktestUtils.list();
31992
31998
  };
31993
31999
  /**
@@ -31997,6 +32003,9 @@ class StorageAdapter {
31997
32003
  */
31998
32004
  this.listSignalLive = async () => {
31999
32005
  bt.loggerService.info(STORAGE_ADAPTER_METHOD_NAME_LIST_SIGNAL_LIVE);
32006
+ if (!this.enable.hasValue()) {
32007
+ throw new Error("StorageAdapter is not enabled. Call enable() first.");
32008
+ }
32000
32009
  return await this._signalLiveUtils.list();
32001
32010
  };
32002
32011
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "2.2.11",
3
+ "version": "2.2.12",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",