Skip to content

Commit

Permalink
Updated Enum Export
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Rıza Kat committed Oct 14, 2024
1 parent 61554c0 commit f8d3cbb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions lib/countly-bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/countly.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 1 addition & 3 deletions test/tests_bulk.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/tests_storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit f8d3cbb

Please sign in to comment.