kepler-companion
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -5,6 +5,6 @@ export declare type KeplerCompanionConfiguration = { | ||
ssl?: boolean; | ||
trackingPath?: string; | ||
telemetryPath?: string; | ||
enabled?: boolean; | ||
}; | ||
export declare type TrackingOpts = { | ||
export declare type TelemetryOpts = { | ||
action: string; | ||
@@ -24,4 +24,4 @@ product: string; | ||
turnOff(): void; | ||
track(opts: TrackingOpts, timeout?: number): Promise<unknown> | void; | ||
private _track; | ||
add(opts: TelemetryOpts): Promise<unknown> | void; | ||
private _add; | ||
} |
@@ -55,3 +55,3 @@ "use strict"; | ||
} | ||
track(opts, timeout = 1000) { | ||
add(opts) { | ||
if (!this.config.enabled) { | ||
@@ -64,8 +64,5 @@ return; | ||
} | ||
return Promise.race([ | ||
this._track(opts).catch(() => { }), | ||
new Promise((resolve) => setTimeout(resolve, timeout)) | ||
]); | ||
this._add(opts).catch(() => { }); | ||
} | ||
async _track(opts) { | ||
async _add(opts) { | ||
const user = this.getUserId(opts.product); | ||
@@ -72,0 +69,0 @@ try { |
{ | ||
"name": "kepler-companion", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Kepler analytics toolkit for client side", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5218
118