novu
Advanced tools
Comparing version 0.22.0 to 0.23.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AnalyticService = exports.ANALYTICS_SOURCE = exports.AnalyticsEventEnum = void 0; | ||
const Analytics = require("analytics-node"); | ||
const analytics_node_1 = require("@segment/analytics-node"); | ||
const constants_1 = require("../constants"); | ||
@@ -27,3 +27,5 @@ var AnalyticsEventEnum; | ||
if (this._analyticsEnabled) { | ||
this._analytics = new Analytics(constants_1.SEGMENTS_WRITE_KEY); | ||
this._analytics = new analytics_node_1.Analytics({ | ||
writeKey: constants_1.SEGMENTS_WRITE_KEY, | ||
}); | ||
} | ||
@@ -68,3 +70,3 @@ } | ||
} | ||
await this._analytics.flush(); | ||
await this._analytics.closeAndFlush(); | ||
} | ||
@@ -71,0 +73,0 @@ isAnalyticsEnabled() { |
{ | ||
"name": "novu", | ||
"version": "0.22.0", | ||
"version": "0.23.0", | ||
"description": "On-Boarding Cli", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"start": "pnpm start:dev", | ||
"start:dev": "cross-env NODE_ENV=dev NOVU_EMBED_PATH=http://localhost:4701/embed.umd.min.js NOVU_API_ADDRESS=http://localhost:3000 NOVU_CLIENT_LOGIN=http://localhost:4200/auth/login CLI_SEGMENT_WRITE_KEY=GdQ594CEBj4pU6RFldDOjKJwZjxZOsIj TZ=UTC nodemon init", | ||
"start:dev": "cross-env NODE_ENV=dev NOVU_EMBED_PATH=http://127.0.0.1:4701/embed.umd.min.js NOVU_API_ADDRESS=http://127.0.0.1:3000 NOVU_CLIENT_LOGIN=http://127.0.0.1:4200/auth/login CLI_SEGMENT_WRITE_KEY=GdQ594CEBj4pU6RFldDOjKJwZjxZOsIj TZ=UTC nodemon init", | ||
"start:test": "cross-env NODE_ENV=test PORT=1336 TZ=UTC nodemon init", | ||
@@ -26,3 +26,2 @@ "start:debug": "cross-env TZ=UTC nodemon --config nodemon-debug.json", | ||
"devDependencies": { | ||
"@types/analytics-node": "^3.1.9", | ||
"@types/configstore": "^5.0.1", | ||
@@ -36,4 +35,4 @@ "@types/inquirer": "^8.2.0", | ||
"dependencies": { | ||
"@novu/shared": "^0.22.0", | ||
"analytics-node": "^6.2.0", | ||
"@novu/shared": "^0.23.0", | ||
"@segment/analytics-node": "^1.1.4", | ||
"axios": "^1.6.2", | ||
@@ -53,3 +52,3 @@ "chalk": "4.1.2", | ||
}, | ||
"gitHead": "c8bec33862b7cbefacb94badf6b11bf25607a913" | ||
"gitHead": "fa8b86080f039734c8c8abf794dd0f0b57235904" | ||
} |
@@ -1,2 +0,2 @@ | ||
import Analytics = require('analytics-node'); | ||
import { Analytics } from '@segment/analytics-node'; | ||
import { IJwtPayload } from '@novu/shared'; | ||
@@ -30,3 +30,5 @@ import { ANALYTICS_ENABLED, SEGMENTS_WRITE_KEY } from '../constants'; | ||
if (this._analyticsEnabled) { | ||
this._analytics = new Analytics(SEGMENTS_WRITE_KEY); | ||
this._analytics = new Analytics({ | ||
writeKey: SEGMENTS_WRITE_KEY, | ||
}); | ||
} | ||
@@ -92,3 +94,3 @@ } | ||
await this._analytics.flush(); | ||
await this._analytics.closeAndFlush(); | ||
} | ||
@@ -95,0 +97,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
168407
6
2107
+ Added@lukeed/csprng@1.1.0(transitive)
+ Added@lukeed/uuid@2.0.1(transitive)
+ Added@novu/shared@0.23.1(transitive)
+ Added@segment/analytics-core@1.4.1(transitive)
+ Added@segment/analytics-generic-utils@1.1.1(transitive)
+ Added@segment/analytics-node@1.3.0(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addeddset@3.1.3(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedanalytics-node@^6.2.0
- Removed@novu/shared@0.22.0(transitive)
- Removed@segment/loosely-validate-event@2.0.0(transitive)
- Removedanalytics-node@6.2.0(transitive)
- Removedaxios@0.27.2(transitive)
- Removedaxios-retry@3.2.0(transitive)
- Removedcharenc@0.0.2(transitive)
- Removedcomponent-type@1.2.2(transitive)
- Removedcrypt@0.0.2(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-retry-allowed@1.2.0(transitive)
- Removedjoin-component@1.1.0(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedmd5@2.3.0(transitive)
- Removedms@2.1.3(transitive)
- Removedremove-trailing-slash@0.1.1(transitive)
- Removeduuid@8.3.2(transitive)
Updated@novu/shared@^0.23.0