@contentful/create-contentful-app 1.6.0 → 1.6.1

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/README.md CHANGED
@@ -98,3 +98,13 @@ Options:
98
98
  format: URL (HTTPS or SSH) or vendor:user/repo (e.g., github:user/repo)
99
99
  -h, --help shows all available CLI options
100
100
  ```
101
+
102
+ ### Tracking
103
+
104
+ We gather depersonalized usage data of our CLI tools in order to improve experience. If you do not want your data to be gathered, you can opt out by providing an env variable `DISABLE_ANALYTICS` set to any value:
105
+
106
+ > **Example**
107
+ >
108
+ > ```
109
+ > DISABLE_ANALYTICS=true npx create-contentful-app
110
+ > ```
package/lib/analytics.js CHANGED
@@ -11,13 +11,17 @@ function track(properties) {
11
11
  if (process.env.DISABLE_ANALYTICS) {
12
12
  return;
13
13
  }
14
- const client = new analytics_node_1.default(SEGMENT_WRITE_KEY);
15
14
  try {
15
+ const client = new analytics_node_1.default(SEGMENT_WRITE_KEY, {
16
+ errorHandler: () => {
17
+ // noop
18
+ },
19
+ });
16
20
  client.track({
17
21
  event: 'app-cli-cca-creation',
18
22
  properties,
19
23
  timestamp: new Date(),
20
- anonymousId: Date.now() // generate a random id
24
+ anonymousId: Date.now(), // generate a random id
21
25
  });
22
26
  // eslint-disable-next-line no-empty
23
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -68,5 +68,5 @@
68
68
  "@types/tildify": "2.0.2",
69
69
  "@types/validate-npm-package-name": "4.0.0"
70
70
  },
71
- "gitHead": "dcb14be43822fc3c4afc168de83c7207adf64236"
71
+ "gitHead": "a121f69fd88c3cfb3f45b08f42e0f54a33df852c"
72
72
  }