diff --git a/lib/countly-bulk.js b/lib/countly-bulk.js index 035ad32..6bb525a 100644 --- a/lib/countly-bulk.js +++ b/lib/countly-bulk.js @@ -25,7 +25,7 @@ var cc = require("./countly-common"); var BulkUser = require("./countly-bulk-user"); var CountlyStorage = require("./countly-storage"); -const StorageTypes = cc.storageTypeEnums; +CountlyBulk.StorageTypes = cc.storageTypeEnums; /** * @lends module:lib/countly-bulk @@ -76,7 +76,6 @@ function CountlyBulk(conf) { var maxBreadcrumbCount = 100; var maxStackTraceLinesPerThread = 30; var maxStackTraceLineLength = 200; - cc.debugBulk = conf.debug || false; if (!conf.app_key) { cc.log(cc.logLevelEnums.ERROR, "CountlyBulk, 'app_key' is missing."); @@ -108,7 +107,7 @@ function CountlyBulk(conf) { // bulk mode is memory only by default if (typeof conf.storage_type === "undefined" && conf.persist_queue === false) { - conf.storage_type = StorageTypes.MEMORY; + conf.storage_type = CountlyBulk.StorageTypes.MEMORY; } CountlyStorage.initStorage(conf.storage_path, conf.storage_type, true, conf.custom_storage_method); diff --git a/lib/countly.js b/lib/countly.js index 77f935d..4984f7a 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -29,7 +29,7 @@ var Bulk = require("./countly-bulk"); var CountlyStorage = require("./countly-storage"); var Countly = {}; - +Countly.StorageTypes = cc.storageTypeEnums; Countly.Bulk = Bulk; (function() { var SDK_VERSION = "22.06.0"; diff --git a/test/tests_bulk.js b/test/tests_bulk.js index 2d9247a..a6b23df 100644 --- a/test/tests_bulk.js +++ b/test/tests_bulk.js @@ -1,13 +1,11 @@ /* eslint-disable no-console */ /* global runthis */ -var path = require("path"); const assert = require("assert"); const CountlyBulk = require("../lib/countly-bulk"); var hp = require("./helpers/helper_functions"); var storage = require("../lib/countly-storage"); -var cc = require("../lib/countly-common"); -const StorageTypes = cc.storageTypeEnums; +const { StorageTypes } = CountlyBulk; function validateCrash(validator, nonfatal) { assert.ok(validator.crash._os); diff --git a/test/tests_storage.js b/test/tests_storage.js index 7c103d9..6a8350f 100644 --- a/test/tests_storage.js +++ b/test/tests_storage.js @@ -8,7 +8,7 @@ var storage = require("../lib/countly-storage"); var cc = require("../lib/countly-common"); var hp = require("./helpers/helper_functions"); -const StorageTypes = cc.storageTypeEnums; +const { StorageTypes } = Countly; // example event object to use var eventObj = {