New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@amplitude/analytics-node

Package Overview
Dependencies
Maintainers
20
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-node - npm Package Compare versions

Comparing version

to
1.1.0-beta.0

8

lib/cjs/node-client.d.ts
import { AmplitudeCore } from '@amplitude/analytics-core';
import { NodeClient, NodeConfig, NodeOptions } from '@amplitude/analytics-types';
export declare class AmplitudeNode extends AmplitudeCore<NodeConfig> {
init(apiKey?: string, options?: NodeOptions): Promise<void>;
export declare class AmplitudeNode extends AmplitudeCore {
config: NodeConfig;
init(apiKey?: string, options?: NodeOptions): import("@amplitude/analytics-types").AmplitudeReturn<void>;
protected _init(options: NodeOptions & {
apiKey: string;
}): Promise<void>;
}

@@ -6,0 +10,0 @@ export declare const createInstance: () => NodeClient;

@@ -14,2 +14,5 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (apiKey === void 0) { apiKey = ''; }
return (0, analytics_core_1.returnWrapper)(this._init(tslib_1.__assign(tslib_1.__assign({}, options), { apiKey: apiKey })));
};
AmplitudeNode.prototype._init = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {

@@ -25,10 +28,10 @@ var nodeOptions;

this.initializing = true;
nodeOptions = (0, config_1.useNodeConfig)(apiKey, tslib_1.__assign({}, options));
nodeOptions = (0, config_1.useNodeConfig)(options.apiKey, tslib_1.__assign({}, options));
return [4 /*yield*/, _super.prototype._init.call(this, nodeOptions)];
case 1:
_a.sent();
return [4 /*yield*/, this.add(new context_1.Context())];
return [4 /*yield*/, this.add(new analytics_core_1.Destination()).promise];
case 2:
_a.sent();
return [4 /*yield*/, this.add(new analytics_core_1.Destination())];
return [4 /*yield*/, this.add(new context_1.Context()).promise];
case 3:

@@ -51,12 +54,12 @@ _a.sent();

return {
init: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.init.bind(client)), 'init', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config'])),
add: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.add.bind(client)), 'add', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.plugins'])),
remove: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.remove.bind(client)), 'remove', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.plugins'])),
track: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.track.bind(client)), 'track', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
logEvent: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.logEvent.bind(client)), 'logEvent', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
identify: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.identify.bind(client)), 'identify', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
groupIdentify: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.groupIdentify.bind(client)), 'groupIdentify', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
setGroup: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.setGroup.bind(client)), 'setGroup', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
revenue: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.revenue.bind(client)), 'revenue', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
flush: (0, analytics_core_1.debugWrapper)((0, analytics_core_1.returnWrapper)(client.flush.bind(client)), 'flush', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
init: (0, analytics_core_1.debugWrapper)(client.init.bind(client), 'init', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config'])),
add: (0, analytics_core_1.debugWrapper)(client.add.bind(client), 'add', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.plugins'])),
remove: (0, analytics_core_1.debugWrapper)(client.remove.bind(client), 'remove', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.plugins'])),
track: (0, analytics_core_1.debugWrapper)(client.track.bind(client), 'track', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
logEvent: (0, analytics_core_1.debugWrapper)(client.logEvent.bind(client), 'logEvent', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
identify: (0, analytics_core_1.debugWrapper)(client.identify.bind(client), 'identify', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
groupIdentify: (0, analytics_core_1.debugWrapper)(client.groupIdentify.bind(client), 'groupIdentify', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
setGroup: (0, analytics_core_1.debugWrapper)(client.setGroup.bind(client), 'setGroup', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
revenue: (0, analytics_core_1.debugWrapper)(client.revenue.bind(client), 'revenue', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
flush: (0, analytics_core_1.debugWrapper)(client.flush.bind(client), 'flush', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config.apiKey', 'timeline.queue.length'])),
setOptOut: (0, analytics_core_1.debugWrapper)(client.setOptOut.bind(client), 'setOptOut', (0, analytics_core_1.getClientLogConfig)(client), (0, analytics_core_1.getClientStates)(client, ['config'])),

@@ -63,0 +66,0 @@ };

@@ -1,2 +0,2 @@

export declare const VERSION = "1.0.5";
export declare const VERSION = "1.1.0-beta.0";
//# sourceMappingURL=version.d.ts.map
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '1.0.5';
exports.VERSION = '1.1.0-beta.0';
//# sourceMappingURL=version.js.map
import { AmplitudeCore } from '@amplitude/analytics-core';
import { NodeClient, NodeConfig, NodeOptions } from '@amplitude/analytics-types';
export declare class AmplitudeNode extends AmplitudeCore<NodeConfig> {
init(apiKey?: string, options?: NodeOptions): Promise<void>;
export declare class AmplitudeNode extends AmplitudeCore {
config: NodeConfig;
init(apiKey?: string, options?: NodeOptions): import("@amplitude/analytics-types").AmplitudeReturn<void>;
protected _init(options: NodeOptions & {
apiKey: string;
}): Promise<void>;
}

@@ -6,0 +10,0 @@ export declare const createInstance: () => NodeClient;

@@ -12,2 +12,5 @@ import { __assign, __awaiter, __extends, __generator } from "tslib";

if (apiKey === void 0) { apiKey = ''; }
return returnWrapper(this._init(__assign(__assign({}, options), { apiKey: apiKey })));
};
AmplitudeNode.prototype._init = function (options) {
return __awaiter(this, void 0, void 0, function () {

@@ -23,10 +26,10 @@ var nodeOptions;

this.initializing = true;
nodeOptions = useNodeConfig(apiKey, __assign({}, options));
nodeOptions = useNodeConfig(options.apiKey, __assign({}, options));
return [4 /*yield*/, _super.prototype._init.call(this, nodeOptions)];
case 1:
_a.sent();
return [4 /*yield*/, this.add(new Context())];
return [4 /*yield*/, this.add(new Destination()).promise];
case 2:
_a.sent();
return [4 /*yield*/, this.add(new Destination())];
return [4 /*yield*/, this.add(new Context()).promise];
case 3:

@@ -49,12 +52,12 @@ _a.sent();

return {
init: debugWrapper(returnWrapper(client.init.bind(client)), 'init', getClientLogConfig(client), getClientStates(client, ['config'])),
add: debugWrapper(returnWrapper(client.add.bind(client)), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),
remove: debugWrapper(returnWrapper(client.remove.bind(client)), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),
track: debugWrapper(returnWrapper(client.track.bind(client)), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
logEvent: debugWrapper(returnWrapper(client.logEvent.bind(client)), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
identify: debugWrapper(returnWrapper(client.identify.bind(client)), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
groupIdentify: debugWrapper(returnWrapper(client.groupIdentify.bind(client)), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
setGroup: debugWrapper(returnWrapper(client.setGroup.bind(client)), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
revenue: debugWrapper(returnWrapper(client.revenue.bind(client)), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
flush: debugWrapper(returnWrapper(client.flush.bind(client)), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
init: debugWrapper(client.init.bind(client), 'init', getClientLogConfig(client), getClientStates(client, ['config'])),
add: debugWrapper(client.add.bind(client), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),
remove: debugWrapper(client.remove.bind(client), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),
track: debugWrapper(client.track.bind(client), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
logEvent: debugWrapper(client.logEvent.bind(client), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
identify: debugWrapper(client.identify.bind(client), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
groupIdentify: debugWrapper(client.groupIdentify.bind(client), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
setGroup: debugWrapper(client.setGroup.bind(client), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
revenue: debugWrapper(client.revenue.bind(client), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
flush: debugWrapper(client.flush.bind(client), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),
setOptOut: debugWrapper(client.setOptOut.bind(client), 'setOptOut', getClientLogConfig(client), getClientStates(client, ['config'])),

@@ -61,0 +64,0 @@ };

@@ -1,2 +0,2 @@

export declare const VERSION = "1.0.5";
export declare const VERSION = "1.1.0-beta.0";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export var VERSION = '1.0.5';
export var VERSION = '1.1.0-beta.0';
//# sourceMappingURL=version.js.map
{
"name": "@amplitude/analytics-node",
"version": "1.0.5",
"version": "1.1.0-beta.0",
"description": "Official Amplitude SDK for NodeJS",

@@ -39,4 +39,4 @@ "author": "Amplitude Inc",

"dependencies": {
"@amplitude/analytics-core": "^0.11.4",
"@amplitude/analytics-types": "^0.16.0",
"@amplitude/analytics-core": "^0.12.0-beta.0",
"@amplitude/analytics-types": "^0.17.0-beta.0",
"tslib": "^2.4.1"

@@ -47,3 +47,3 @@ },

],
"gitHead": "e9b73ad53882d499ca14e3d53e8885825554d0d9"
"gitHead": "5590f7d77d93362d2f3db6d47116ca502afd1fc4"
}

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

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