@contentful/create-contentful-app 1.16.0 → 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.
Files changed (2) hide show
  1. package/lib/index.js +6 -1
  2. package/package.json +3 -3
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.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -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.5",
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": "42e054adc754dae0657882b09f1ab7adcc9adecf"
84
+ "gitHead": "a4a02a44a4231bfe52c093625a356889f53e5859"
85
85
  }