@contentful/app-scripts 1.13.0 → 1.13.2

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
  /**
@@ -19,18 +16,17 @@ function track({ command, ci }) {
19
16
  return;
20
17
  }
21
18
  try {
22
- const client = new analytics_node_1.default(SEGMENT_WRITE_KEY, {
23
- errorHandler: () => {
24
- // noop
25
- },
19
+ const client = new analytics_node_1.Analytics({
20
+ writeKey: SEGMENT_WRITE_KEY,
26
21
  });
22
+ client.on('error', (err) => { });
27
23
  client.track({
28
24
  event: 'app-cli-app-scripts',
29
25
  properties: {
30
26
  command,
31
27
  ci: String(ci),
32
28
  },
33
- anonymousId: Date.now(),
29
+ anonymousId: Date.now().toString(),
34
30
  timestamp: new Date(),
35
31
  });
36
32
  // eslint-disable-next-line no-empty
@@ -23,6 +23,7 @@ async function selectOrganization(client) {
23
23
  const orgSpinner = (0, ora_1.default)('Fetching your organizations...').start();
24
24
  try {
25
25
  const organizations = await fetchOrganizations(client);
26
+ orgSpinner.stop();
26
27
  return await (0, utils_1.selectFromList)(organizations, 'Select an organization:', constants_1.ORG_ID_ENV_KEY);
27
28
  }
28
29
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/app-scripts",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "A collection of scripts for building Contentful Apps",
5
5
  "author": "Contentful GmbH",
6
6
  "license": "MIT",
@@ -47,31 +47,31 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
+ "@segment/analytics-node": "^1.1.3",
50
51
  "adm-zip": "0.5.10",
51
- "analytics-node": "^6.2.0",
52
52
  "bottleneck": "2.19.5",
53
53
  "chalk": "4.1.2",
54
- "commander": "11.0.0",
55
- "contentful-management": "10.40.1",
54
+ "commander": "11.1.0",
55
+ "contentful-management": "11.6.0",
56
56
  "dotenv": "16.3.1",
57
- "ignore": "5.2.4",
57
+ "ignore": "5.3.0",
58
58
  "inquirer": "8.2.6",
59
59
  "lodash": "4.17.21",
60
60
  "open": "8.4.2",
61
61
  "ora": "5.4.1"
62
62
  },
63
- "gitHead": "5a27e22426802834834960e7b43090bd269de505",
63
+ "gitHead": "e0c554ceaabe98a027a255c9d87dce594c7db10b",
64
64
  "devDependencies": {
65
65
  "@tsconfig/node14": "14.1.0",
66
- "@types/adm-zip": "0.5.0",
67
- "@types/analytics-node": "3.1.11",
66
+ "@types/adm-zip": "0.5.5",
67
+ "@types/analytics-node": "3.1.14",
68
68
  "@types/inquirer": "8.2.1",
69
- "@types/lodash": "4.14.197",
70
- "@types/mocha": "10.0.1",
71
- "@types/proxyquire": "1.3.28",
72
- "@types/sinon": "10.0.16",
69
+ "@types/lodash": "4.14.202",
70
+ "@types/mocha": "10.0.6",
71
+ "@types/proxyquire": "1.3.31",
72
+ "@types/sinon": "17.0.2",
73
73
  "proxyquire": "2.1.3",
74
- "sinon": "15.2.0",
74
+ "sinon": "17.0.1",
75
75
  "ts-node": "10.9.1"
76
76
  }
77
77
  }