@devcycle/nodejs-server-sdk
Advanced tools
Comparing version 1.17.1 to 1.18.0
{ | ||
"name": "@devcycle/nodejs-server-sdk", | ||
"version": "1.17.1", | ||
"version": "1.18.0", | ||
"description": "The DevCycle NodeJS Server SDK used for feature management.", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@devcycle/bucketing-assembly-script": "^1.10.1", | ||
"@devcycle/js-cloud-server-sdk": "^1.2.1", | ||
"@devcycle/types": "^1.3.1", | ||
"@devcycle/bucketing-assembly-script": "^1.11.0", | ||
"@devcycle/js-cloud-server-sdk": "^1.3.0", | ||
"@devcycle/types": "^1.4.0", | ||
"cross-fetch": "^3.1.8", | ||
@@ -11,0 +11,0 @@ "fetch-retry": "^5.0.3" |
@@ -9,3 +9,4 @@ import { DevCycleServerSDKOptions, VariableTypeAlias } from '@devcycle/types'; | ||
private logger; | ||
private initialized; | ||
private _isInitialized; | ||
get isInitialized(): boolean; | ||
constructor(sdkKey: string, options?: DevCycleServerSDKOptions); | ||
@@ -12,0 +13,0 @@ /** |
@@ -47,4 +47,7 @@ "use strict"; | ||
class DevCycleClient { | ||
get isInitialized() { | ||
return this._isInitialized; | ||
} | ||
constructor(sdkKey, options) { | ||
this.initialized = false; | ||
this._isInitialized = false; | ||
this.sdkKey = sdkKey; | ||
@@ -82,3 +85,3 @@ this.logger = | ||
this.logger.info('DevCycle initialized'); | ||
this.initialized = true; | ||
this._isInitialized = true; | ||
return this; | ||
@@ -117,3 +120,3 @@ }) | ||
const populatedUser = (0, populatedUserHelpers_1.DVCPopulatedUserFromDevCycleUser)(incomingUser); | ||
if (!this.initialized) { | ||
if (!this._isInitialized) { | ||
this.logger.warn('variable called before DevCycleClient initialized, returning default value'); | ||
@@ -152,3 +155,3 @@ (_a = this.eventQueue) === null || _a === void 0 ? void 0 : _a.queueAggregateEvent(populatedUser, { | ||
const incomingUser = castIncomingUser(user); | ||
if (!this.initialized) { | ||
if (!this._isInitialized) { | ||
this.logger.warn('allVariables called before DevCycleClient initialized'); | ||
@@ -163,3 +166,3 @@ return {}; | ||
const incomingUser = castIncomingUser(user); | ||
if (!this.initialized) { | ||
if (!this._isInitialized) { | ||
this.logger.warn('allFeatures called before DevCycleClient initialized'); | ||
@@ -174,3 +177,3 @@ return {}; | ||
const incomingUser = castIncomingUser(user); | ||
if (!this.initialized) { | ||
if (!this._isInitialized) { | ||
this.logger.warn('track called before DevCycleClient initialized, event will not be tracked'); | ||
@@ -177,0 +180,0 @@ return; |
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
184287
1777