@contentful/create-contentful-app 1.16.17 → 1.16.19

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 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 = __importDefault(require("analytics-node"));
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.default(SEGMENT_WRITE_KEY, {
16
- errorHandler: () => {
17
- // noop
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/lib/index.js CHANGED
@@ -101,7 +101,7 @@ async function initProject(appName, options) {
101
101
  }
102
102
  if (!isInteractive && (0, utils_1.isContentfulTemplate)(templateSource) && normalizedOptions.function) {
103
103
  // If function flag is specified, but no function name is provided, we default to external-references
104
- // for legacy support.
104
+ // for legacy support
105
105
  if (normalizedOptions.function === true) {
106
106
  normalizedOptions.function = 'external-references';
107
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.16.17",
3
+ "version": "1.16.19",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -36,8 +36,8 @@
36
36
  "test": "mocha 'test/**/*.spec.{js,ts}'"
37
37
  },
38
38
  "dependencies": {
39
- "@contentful/app-scripts": "1.27.0",
40
- "analytics-node": "^6.2.0",
39
+ "@contentful/app-scripts": "1.30.1",
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.35.1",
77
+ "contentful-management": "11.36.1",
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": "e9c4dd0f79e304fb385b07b9e678e3f41035d9ce"
83
+ "gitHead": "f6ae146850c925538386ada81a5ba384e143b5f8"
84
84
  }