@amplitude/analytics-node 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/node-client.d.ts.map +1 -1
- package/lib/cjs/node-client.js +3 -6
- package/lib/cjs/node-client.js.map +1 -1
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/node-client.d.ts.map +1 -1
- package/lib/esm/node-client.js +3 -6
- package/lib/esm/node-client.js.map +1 -1
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/esm/version.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-client.d.ts","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA8B,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIjF,qBAAa,aAAc,SAAQ,aAAa,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,MAAM,SAAK,EAAE,OAAO,CAAC,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"node-client.d.ts","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA8B,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIjF,qBAAa,aAAc,SAAQ,aAAa,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,MAAM,SAAK,EAAE,OAAO,CAAC,EAAE,WAAW;CAoB9C;AAED,eAAO,MAAM,cAAc,QAAO,UAejC,CAAC;;AAEF,wBAAgC"}
|
package/lib/cjs/node-client.js
CHANGED
|
@@ -32,12 +32,9 @@ var AmplitudeNode = /** @class */ (function (_super) {
|
|
|
32
32
|
case 3:
|
|
33
33
|
_a.sent();
|
|
34
34
|
this.initializing = false;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (!this.config.optOut) {
|
|
39
|
-
this.timeline.scheduleApply(0);
|
|
40
|
-
}
|
|
35
|
+
return [4 /*yield*/, this.runQueuedFunctions('dispatchQ')];
|
|
36
|
+
case 4:
|
|
37
|
+
_a.sent();
|
|
41
38
|
return [2 /*return*/];
|
|
42
39
|
}
|
|
43
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-client.js","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":";;;AAAA,4DAAsF;AAEtF,6CAA4C;AAC5C,mCAAyC;AAEzC;IAAmC,8CAAyB;IAA5D;;
|
|
1
|
+
{"version":3,"file":"node-client.js","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":";;;AAAA,4DAAsF;AAEtF,6CAA4C;AAC5C,mCAAyC;AAEzC;IAAmC,8CAAyB;IAA5D;;IAqBA,CAAC;IApBO,4BAAI,GAAV,UAAW,MAAW,EAAE,OAAqB;QAAlC,uBAAA,EAAA,WAAW;;;;;;wBACpB,0CAA0C;wBAC1C,IAAI,IAAI,CAAC,YAAY,EAAE;4BACrB,sBAAO;yBACR;wBACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;wBAEnB,WAAW,GAAG,IAAA,sBAAa,EAAC,MAAM,4BACnC,OAAO,EACV,CAAC;wBAEH,qBAAM,iBAAM,KAAK,YAAC,WAAW,CAAC,EAAA;;wBAA9B,SAA8B,CAAC;wBAE/B,qBAAM,IAAI,CAAC,GAAG,CAAC,IAAI,iBAAO,EAAE,CAAC,EAAA;;wBAA7B,SAA6B,CAAC;wBAC9B,qBAAM,IAAI,CAAC,GAAG,CAAC,IAAI,4BAAW,EAAE,CAAC,EAAA;;wBAAjC,SAAiC,CAAC;wBAElC,IAAI,CAAC,YAAY,GAAG,KAAK,CA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,MAAM,CAAC;KACzC,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,cAAc,kBAezB;AAEF,kBAAe,IAAA,sBAAc,GAAE,CAAC","sourcesContent":["import { AmplitudeCore, Destination, returnWrapper } from '@amplitude/analytics-core';\nimport { NodeClient, NodeConfig, NodeOptions } from '@amplitude/analytics-types';\nimport { Context } from './plugins/context';\nimport { useNodeConfig } from './config';\n\nexport class AmplitudeNode extends AmplitudeCore<NodeConfig> {\n async init(apiKey = '', options?: NodeOptions) {\n // Step 0: Block concurrent initialization\n if (this.initializing) {\n return;\n }\n this.initializing = true;\n\n const nodeOptions = useNodeConfig(apiKey, {\n ...options,\n });\n\n await super._init(nodeOptions);\n\n await this.add(new Context());\n await this.add(new Destination());\n\n this.initializing = false;\n\n await this.runQueuedFunctions('dispatchQ');\n }\n}\n\nexport const createInstance = (): NodeClient => {\n const client = new AmplitudeNode();\n return {\n init: returnWrapper(client.init.bind(client)),\n add: returnWrapper(client.add.bind(client)),\n remove: returnWrapper(client.remove.bind(client)),\n track: returnWrapper(client.track.bind(client)),\n logEvent: returnWrapper(client.logEvent.bind(client)),\n identify: returnWrapper(client.identify.bind(client)),\n groupIdentify: returnWrapper(client.groupIdentify.bind(client)),\n setGroup: returnWrapper(client.setGroup.bind(client)),\n revenue: returnWrapper(client.revenue.bind(client)),\n flush: returnWrapper(client.flush.bind(client)),\n setOptOut: client.setOptOut.bind(client),\n };\n};\n\nexport default createInstance();\n"]}
|
package/lib/cjs/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.5.
|
|
1
|
+
export declare const VERSION = "0.5.8";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/cjs/version.js
CHANGED
package/lib/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["export const VERSION = '0.5.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["export const VERSION = '0.5.8';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-client.d.ts","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA8B,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIjF,qBAAa,aAAc,SAAQ,aAAa,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,MAAM,SAAK,EAAE,OAAO,CAAC,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"node-client.d.ts","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA8B,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIjF,qBAAa,aAAc,SAAQ,aAAa,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,MAAM,SAAK,EAAE,OAAO,CAAC,EAAE,WAAW;CAoB9C;AAED,eAAO,MAAM,cAAc,QAAO,UAejC,CAAC;;AAEF,wBAAgC"}
|
package/lib/esm/node-client.js
CHANGED
|
@@ -30,12 +30,9 @@ var AmplitudeNode = /** @class */ (function (_super) {
|
|
|
30
30
|
case 3:
|
|
31
31
|
_a.sent();
|
|
32
32
|
this.initializing = false;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!this.config.optOut) {
|
|
37
|
-
this.timeline.scheduleApply(0);
|
|
38
|
-
}
|
|
33
|
+
return [4 /*yield*/, this.runQueuedFunctions('dispatchQ')];
|
|
34
|
+
case 4:
|
|
35
|
+
_a.sent();
|
|
39
36
|
return [2 /*return*/];
|
|
40
37
|
}
|
|
41
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-client.js","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;IAAmC,iCAAyB;IAA5D;;
|
|
1
|
+
{"version":3,"file":"node-client.js","sourceRoot":"","sources":["../../src/node-client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;IAAmC,iCAAyB;IAA5D;;IAqBA,CAAC;IApBO,4BAAI,GAAV,UAAW,MAAW,EAAE,OAAqB;QAAlC,uBAAA,EAAA,WAAW;;;;;;wBACpB,0CAA0C;wBAC1C,IAAI,IAAI,CAAC,YAAY,EAAE;4BACrB,sBAAO;yBACR;wBACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;wBAEnB,WAAW,GAAG,aAAa,CAAC,MAAM,eACnC,OAAO,EACV,CAAC;wBAEH,qBAAM,iBAAM,KAAK,YAAC,WAAW,CAAC,EAAA;;wBAA9B,SAA8B,CAAC;wBAE/B,qBAAM,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,EAAA;;wBAA7B,SAA6B,CAAC;wBAC9B,qBAAM,IAAI,CAAC,GAAG,CAAC,IAAI,WAAW,EAAE,CAAC,EAAA;;wBAAjC,SAAiC,CAAC;wBAElC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;wBAE1B,qBAAM,IAAI,C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Wrapper } from '@amplitude/analytics-core';\nimport { NodeClient, NodeConfig, NodeOptions } from '@amplitude/analytics-types';\nimport { Context } from './plugins/context';\nimport { useNodeConfig } from './config';\n\nexport class AmplitudeNode extends AmplitudeCore<NodeConfig> {\n async init(apiKey = '', options?: NodeOptions) {\n // Step 0: Block concurrent initialization\n if (this.initializing) {\n return;\n }\n this.initializing = true;\n\n const nodeOptions = useNodeConfig(apiKey, {\n ...options,\n });\n\n await super._init(nodeOptions);\n\n await this.add(new Context());\n await this.add(new Destination());\n\n this.initializing = false;\n\n await this.runQueuedFunctions('dispatchQ');\n }\n}\n\nexport const createInstance = (): NodeClient => {\n const client = new AmplitudeNode();\n return {\n init: returnWrapper(client.init.bind(client)),\n add: returnWrapper(client.add.bind(client)),\n remove: returnWrapper(client.remove.bind(client)),\n track: returnWrapper(client.track.bind(client)),\n logEvent: returnWrapper(client.logEvent.bind(client)),\n identify: returnWrapper(client.identify.bind(client)),\n groupIdentify: returnWrapper(client.groupIdentify.bind(client)),\n setGroup: returnWrapper(client.setGroup.bind(client)),\n revenue: returnWrapper(client.revenue.bind(client)),\n flush: returnWrapper(client.flush.bind(client)),\n setOptOut: client.setOptOut.bind(client),\n };\n};\n\nexport default createInstance();\n"]}
|
package/lib/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.5.
|
|
1
|
+
export declare const VERSION = "0.5.8";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var VERSION = '0.5.
|
|
1
|
+
export var VERSION = '0.5.8';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/lib/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["export const VERSION = '0.5.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["export const VERSION = '0.5.8';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-node",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Official Amplitude SDK for NodeJS",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"url": "https://github.com/amplitude/Amplitude-TypeScript/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@amplitude/analytics-core": "^0.9.
|
|
39
|
+
"@amplitude/analytics-core": "^0.9.7",
|
|
40
40
|
"@amplitude/analytics-types": "^0.11.0",
|
|
41
41
|
"tslib": "^2.3.1"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"lib"
|
|
45
45
|
],
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "7e75f22a1d9a972f627d18ae2e09add8dac2c63f"
|
|
47
47
|
}
|