@contentful/create-contentful-app 1.16.17 → 1.16.18
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/analytics.js +5 -9
- package/package.json +4 -4
package/lib/analytics.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.track = void 0;
|
|
7
|
-
const analytics_node_1 =
|
|
4
|
+
const analytics_node_1 = require("@segment/analytics-node");
|
|
8
5
|
// Public write key scoped to data source
|
|
9
6
|
const SEGMENT_WRITE_KEY = 'IzCq3j4dQlTAgLdMykRW9oBHQKUy1xMm';
|
|
10
7
|
function track(properties) {
|
|
@@ -12,16 +9,15 @@ function track(properties) {
|
|
|
12
9
|
return;
|
|
13
10
|
}
|
|
14
11
|
try {
|
|
15
|
-
const client = new analytics_node_1.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
12
|
+
const client = new analytics_node_1.Analytics({ writeKey: SEGMENT_WRITE_KEY });
|
|
13
|
+
client.on('error', () => {
|
|
14
|
+
// noop
|
|
19
15
|
});
|
|
20
16
|
client.track({
|
|
21
17
|
event: 'app-cli-cca-creation',
|
|
22
18
|
properties,
|
|
23
19
|
timestamp: new Date(),
|
|
24
|
-
anonymousId: Date.now(), // generate a random id
|
|
20
|
+
anonymousId: Date.now().toString(), // generate a random id
|
|
25
21
|
});
|
|
26
22
|
// eslint-disable-next-line no-empty
|
|
27
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/create-contentful-app",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.18",
|
|
4
4
|
"description": "A template for building Contentful Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contentful",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@contentful/app-scripts": "1.27.0",
|
|
40
|
-
"analytics-node": "^
|
|
40
|
+
"@segment/analytics-node": "^2.2.0",
|
|
41
41
|
"chalk": "4.1.2",
|
|
42
42
|
"commander": "12.1.0",
|
|
43
43
|
"inquirer": "8.2.6",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"@types/validate-npm-package-name": "4.0.2",
|
|
75
75
|
"chai": "^4.3.7",
|
|
76
76
|
"chai-as-promised": "^7.1.1",
|
|
77
|
-
"contentful-management": "11.
|
|
77
|
+
"contentful-management": "11.36.0",
|
|
78
78
|
"mocha": "^10.2.0",
|
|
79
79
|
"sinon": "^19.0.0",
|
|
80
80
|
"sinon-chai": "^3.7.0",
|
|
81
81
|
"ts-node": "^10.9.2"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4480501c136a41f8b599e0326321819a11981ada"
|
|
84
84
|
}
|