@amplitude/analytics-core
Advanced tools
Comparing version 2.2.5 to 2.2.6
import { BaseEvent, Config, CoreClient, Event, EventOptions, Identify, Plugin, Result, Revenue } from '@amplitude/analytics-types'; | ||
import { Timeline } from './timeline'; | ||
import { returnWrapper } from './utils/return-wrapper'; | ||
export declare class AmplitudeCore implements CoreClient { | ||
@@ -8,4 +9,4 @@ protected initializing: boolean; | ||
timeline: Timeline; | ||
protected q: CallableFunction[]; | ||
protected dispatchQ: CallableFunction[]; | ||
protected q: Array<CallableFunction | typeof returnWrapper>; | ||
protected dispatchQ: Array<CallableFunction>; | ||
constructor(name?: string); | ||
@@ -12,0 +13,0 @@ protected _init(config: Config): Promise<void>; |
@@ -36,3 +36,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, e_1_1; | ||
var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, val, e_1_1; | ||
var e_1, _a; | ||
@@ -46,21 +46,27 @@ return tslib_1.__generator(this, function (_b) { | ||
case 1: | ||
_b.trys.push([1, 6, 7, 8]); | ||
_b.trys.push([1, 8, 9, 10]); | ||
queuedFunctions_1 = tslib_1.__values(queuedFunctions), queuedFunctions_1_1 = queuedFunctions_1.next(); | ||
_b.label = 2; | ||
case 2: | ||
if (!!queuedFunctions_1_1.done) return [3 /*break*/, 5]; | ||
if (!!queuedFunctions_1_1.done) return [3 /*break*/, 7]; | ||
queuedFunction = queuedFunctions_1_1.value; | ||
return [4 /*yield*/, queuedFunction()]; | ||
val = queuedFunction(); | ||
if (!(val && 'promise' in val)) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, val.promise]; | ||
case 3: | ||
_b.sent(); | ||
_b.label = 4; | ||
case 4: | ||
return [3 /*break*/, 6]; | ||
case 4: return [4 /*yield*/, val]; | ||
case 5: | ||
_b.sent(); | ||
_b.label = 6; | ||
case 6: | ||
queuedFunctions_1_1 = queuedFunctions_1.next(); | ||
return [3 /*break*/, 2]; | ||
case 5: return [3 /*break*/, 8]; | ||
case 6: | ||
case 7: return [3 /*break*/, 10]; | ||
case 8: | ||
e_1_1 = _b.sent(); | ||
e_1 = { error: e_1_1 }; | ||
return [3 /*break*/, 8]; | ||
case 7: | ||
return [3 /*break*/, 10]; | ||
case 9: | ||
try { | ||
@@ -71,3 +77,3 @@ if (queuedFunctions_1_1 && !queuedFunctions_1_1.done && (_a = queuedFunctions_1.return)) _a.call(queuedFunctions_1); | ||
return [7 /*endfinally*/]; | ||
case 8: return [2 /*return*/]; | ||
case 10: return [2 /*return*/]; | ||
} | ||
@@ -74,0 +80,0 @@ }); |
import { BaseEvent, Config, CoreClient, Event, EventOptions, Identify, Plugin, Result, Revenue } from '@amplitude/analytics-types'; | ||
import { Timeline } from './timeline'; | ||
import { returnWrapper } from './utils/return-wrapper'; | ||
export declare class AmplitudeCore implements CoreClient { | ||
@@ -8,4 +9,4 @@ protected initializing: boolean; | ||
timeline: Timeline; | ||
protected q: CallableFunction[]; | ||
protected dispatchQ: CallableFunction[]; | ||
protected q: Array<CallableFunction | typeof returnWrapper>; | ||
protected dispatchQ: Array<CallableFunction>; | ||
constructor(name?: string); | ||
@@ -12,0 +13,0 @@ protected _init(config: Config): Promise<void>; |
@@ -34,3 +34,3 @@ import { __awaiter, __generator, __values } from "tslib"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, e_1_1; | ||
var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, val, e_1_1; | ||
var e_1, _a; | ||
@@ -44,21 +44,27 @@ return __generator(this, function (_b) { | ||
case 1: | ||
_b.trys.push([1, 6, 7, 8]); | ||
_b.trys.push([1, 8, 9, 10]); | ||
queuedFunctions_1 = __values(queuedFunctions), queuedFunctions_1_1 = queuedFunctions_1.next(); | ||
_b.label = 2; | ||
case 2: | ||
if (!!queuedFunctions_1_1.done) return [3 /*break*/, 5]; | ||
if (!!queuedFunctions_1_1.done) return [3 /*break*/, 7]; | ||
queuedFunction = queuedFunctions_1_1.value; | ||
return [4 /*yield*/, queuedFunction()]; | ||
val = queuedFunction(); | ||
if (!(val && 'promise' in val)) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, val.promise]; | ||
case 3: | ||
_b.sent(); | ||
_b.label = 4; | ||
case 4: | ||
return [3 /*break*/, 6]; | ||
case 4: return [4 /*yield*/, val]; | ||
case 5: | ||
_b.sent(); | ||
_b.label = 6; | ||
case 6: | ||
queuedFunctions_1_1 = queuedFunctions_1.next(); | ||
return [3 /*break*/, 2]; | ||
case 5: return [3 /*break*/, 8]; | ||
case 6: | ||
case 7: return [3 /*break*/, 10]; | ||
case 8: | ||
e_1_1 = _b.sent(); | ||
e_1 = { error: e_1_1 }; | ||
return [3 /*break*/, 8]; | ||
case 7: | ||
return [3 /*break*/, 10]; | ||
case 9: | ||
try { | ||
@@ -69,3 +75,3 @@ if (queuedFunctions_1_1 && !queuedFunctions_1_1.done && (_a = queuedFunctions_1.return)) _a.call(queuedFunctions_1); | ||
return [7 /*endfinally*/]; | ||
case 8: return [2 /*return*/]; | ||
case 10: return [2 /*return*/]; | ||
} | ||
@@ -72,0 +78,0 @@ }); |
{ | ||
"name": "@amplitude/analytics-core", | ||
"version": "2.2.5", | ||
"version": "2.2.6", | ||
"description": "", | ||
@@ -44,3 +44,3 @@ "author": "Amplitude Inc", | ||
], | ||
"gitHead": "0d45355bf21cf9f39f34d79ff16477662d54887a" | ||
"gitHead": "62e8e4aa56193545588e67ad5c431dabb4945e39" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
377419
3675