@contentful/create-contentful-app 1.15.3 → 1.16.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
@@ -17,7 +17,7 @@ To start developing your first app, run:
17
17
  npx create-contentful-app my-first-app
18
18
  ```
19
19
 
20
- ![Screenshot of `npx create-contentful-app my-app`](https://raw.githubusercontent.com/contentful/create-contentful-app/master/packages/contentful--create-contentful-app/docs/screenshot.png)
20
+ ![Screenshot of `npx create-contentful-app my-app`](https://raw.githubusercontent.com/contentful/create-contentful-app/main/packages/contentful--create-contentful-app/docs/screenshot.png)
21
21
 
22
22
  ## Bootstrap
23
23
 
@@ -100,6 +100,8 @@ Options:
100
100
  -h, --help shows all available CLI options
101
101
  ```
102
102
 
103
+ In order to run the app within Contentful run `npm run create-app-definition` within your app directory to create an app definition.
104
+
103
105
  ### Tracking
104
106
 
105
107
  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:
@@ -24,7 +24,12 @@ const addBuildCommand = (0, package_1.getAddBuildCommandFn)({
24
24
  name: 'build:functions',
25
25
  command: 'node build-functions.js',
26
26
  });
27
- const VALID_FUNCTION_TEMPLATES_DIRS = ['templates', 'appevent-filter'];
27
+ const VALID_FUNCTION_TEMPLATES_DIRS = [
28
+ 'templates',
29
+ 'appevent-filter',
30
+ 'appevent-handler',
31
+ 'appevent-transformation',
32
+ ];
28
33
  function functionTemplateFromName(functionName) {
29
34
  let dirName = functionName;
30
35
  if (functionName === 'external-references')
package/lib/index.js CHANGED
@@ -114,6 +114,11 @@ function initProject(appName, options) {
114
114
  yield (0, includeAppAction_1.cloneAppAction)(fullAppFolder, !!normalizedOptions.javascript);
115
115
  }
116
116
  if (!isInteractive && (0, utils_1.isContentfulTemplate)(templateSource) && normalizedOptions.function) {
117
+ // If function flag is specified, but no function name is provided, we default to external-references
118
+ // for legacy support.
119
+ if (normalizedOptions.function === true) {
120
+ normalizedOptions.function = 'external-references';
121
+ }
117
122
  yield (0, includeFunction_1.cloneFunction)(fullAppFolder, !!normalizedOptions.javascript, normalizedOptions.function);
118
123
  }
119
124
  updatePackageName(fullAppFolder);
@@ -160,7 +165,7 @@ function initProject(appName, options) {
160
165
  `format: URL (HTTPS or SSH) or ${(0, logger_1.code)('vendor:user/repo')} (e.g., ${(0, logger_1.code)('github:user/repo')})`,
161
166
  ].join('\n'))
162
167
  .option('-a, --action', 'include a hosted app action in the ts or js template')
163
- .option('-f, --function <function-template-name>', 'include the specified function template')
168
+ .option('-f, --function [function-template-name]', 'include the specified function template')
164
169
  .action(initProject);
165
170
  yield commander_1.program.parseAsync();
166
171
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.15.3",
3
+ "version": "1.16.1",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -36,7 +36,7 @@
36
36
  "test": "mocha 'test/**/*.spec.{js,ts}'"
37
37
  },
38
38
  "dependencies": {
39
- "@contentful/app-scripts": "1.18.0",
39
+ "@contentful/app-scripts": "1.19.0",
40
40
  "analytics-node": "^6.2.0",
41
41
  "chalk": "4.1.2",
42
42
  "commander": "12.0.0",
@@ -75,11 +75,11 @@
75
75
  "@types/validate-npm-package-name": "4.0.2",
76
76
  "chai": "^4.3.7",
77
77
  "chai-as-promised": "^7.1.1",
78
- "contentful-management": "11.24.3",
78
+ "contentful-management": "11.25.0",
79
79
  "mocha": "^10.2.0",
80
80
  "sinon": "^17.0.0",
81
81
  "sinon-chai": "^3.7.0",
82
82
  "ts-node": "^10.9.1"
83
83
  },
84
- "gitHead": "09f7d0832d813548f7db5e14787675f5278e2a97"
84
+ "gitHead": "a4a02a44a4231bfe52c093625a356889f53e5859"
85
85
  }