@contentful/app-scripts 1.20.0 → 1.21.0

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.
@@ -6,8 +6,15 @@ const get_upload_settings_args_1 = require("./get-upload-settings-args");
6
6
  const create_app_bundle_1 = require("./create-app-bundle");
7
7
  const build_upload_settings_1 = require("./build-upload-settings");
8
8
  const feedback_1 = require("../feedback/feedback");
9
+ function uploadSettingsHaveAppEventFunction(settings) {
10
+ return (settings.functions &&
11
+ settings.functions.some((fn) => fn.accepts.some((fnType) => fnType.startsWith('appevent'))));
12
+ }
9
13
  async function uploadAndActivate(settings) {
10
14
  const bundle = await (0, create_app_bundle_1.createAppBundleFromSettings)(settings);
15
+ if (uploadSettingsHaveAppEventFunction(settings)) {
16
+ console.log('Remember that in order to be invoked, your App Event function(s) must be linked to your App Event subscription using the CMA or the Events tab of the App Details page.');
17
+ }
11
18
  if (!settings.skipActivation && bundle) {
12
19
  await (0, activate_bundle_1.activateBundle)({ ...settings, bundleId: bundle.sys.id });
13
20
  (0, feedback_1.logFeedbackNudge)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/app-scripts",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "A collection of scripts for building Contentful Apps",
5
5
  "author": "Contentful GmbH",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "prettier": "prettier **/*.js --write --ignore-path .gitignore",
29
29
  "lint": "eslint ./src",
30
30
  "lint:fix": "npm run lint -- --fix",
31
- "test": "mocha \"./{,!(node_modules)/**/}*.test.js\" --exit",
31
+ "test": "ts-mocha \"./{,!(node_modules)/**/}*.test.ts\"",
32
32
  "test:watch": "npm t -- --watch",
33
33
  "pre-commit": "lint-staged",
34
34
  "build": "rm -rf lib && tsc"
@@ -51,8 +51,8 @@
51
51
  "adm-zip": "0.5.12",
52
52
  "bottleneck": "2.19.5",
53
53
  "chalk": "4.1.2",
54
- "commander": "12.0.0",
55
- "contentful-management": "11.25.3",
54
+ "commander": "12.1.0",
55
+ "contentful-management": "11.26.2",
56
56
  "dotenv": "16.4.5",
57
57
  "ignore": "5.3.1",
58
58
  "inquirer": "8.2.6",
@@ -60,17 +60,19 @@
60
60
  "open": "8.4.2",
61
61
  "ora": "5.4.1"
62
62
  },
63
- "gitHead": "fe7b2a39c4add8779bf7af7184adbede5dc9fda4",
63
+ "gitHead": "81cc3ea1a7090350e4791112816a82b243c3fc14",
64
64
  "devDependencies": {
65
65
  "@tsconfig/node18": "18.2.4",
66
66
  "@types/adm-zip": "0.5.5",
67
67
  "@types/analytics-node": "3.1.14",
68
68
  "@types/inquirer": "8.2.1",
69
- "@types/lodash": "4.17.1",
69
+ "@types/lodash": "4.17.4",
70
+ "@types/mocha": "10.0.6",
70
71
  "@types/proxyquire": "1.3.31",
71
72
  "@types/sinon": "17.0.3",
72
73
  "proxyquire": "2.1.3",
73
- "sinon": "17.0.2",
74
+ "sinon": "18.0.0",
75
+ "ts-mocha": "10.0.0",
74
76
  "ts-node": "10.9.2"
75
77
  }
76
78
  }