@contentful/create-contentful-app 2.1.2 → 2.1.4

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/constants.js CHANGED
@@ -12,7 +12,6 @@ exports.IGNORED_EXAMPLE_FOLDERS = [
12
12
  'vite-react',
13
13
  'nextjs',
14
14
  'hosted-app-action-templates',
15
- 'function-templates',
16
15
  ];
17
16
  exports.EXAMPLES_PATH = 'contentful/apps/examples/';
18
17
  exports.CONTENTFUL_APP_MANIFEST = 'contentful-app-manifest.json';
@@ -50,8 +50,7 @@ async function promptExampleSelection() {
50
50
  const availableTemplates = await (0, getGithubFolderNames_1.getGithubFolderNames)();
51
51
  // filter out the ignored ones that are listed as templates instead of examples
52
52
  const filteredTemplates = availableTemplates
53
- .filter((template) => !constants_1.IGNORED_EXAMPLE_FOLDERS.includes(template))
54
- .filter((template) => !template.includes('function'));
53
+ .filter((template) => !constants_1.IGNORED_EXAMPLE_FOLDERS.includes(template));
55
54
  console.log(availableTemplates.length, filteredTemplates.length);
56
55
  // ask user to select a template from the available examples
57
56
  const { example } = await inquirer_1.default.prompt([
package/lib/index.js CHANGED
@@ -112,7 +112,7 @@ async function initProject(appName, options) {
112
112
  .replace(/-([a-z])/g, (match, letter) => letter.toUpperCase());
113
113
  await app_scripts_1.generateFunction.nonInteractive({
114
114
  example: normalizedOptions.function,
115
- language: 'typescript',
115
+ language: normalizedOptions.javascript ? 'javascript' : 'typescript',
116
116
  name: functionName,
117
117
  });
118
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -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.48.1",
77
+ "contentful-management": "11.48.3",
78
78
  "mocha": "^10.2.0",
79
79
  "sinon": "^20.0.0",
80
80
  "sinon-chai": "^3.7.0",
81
81
  "ts-node": "^10.9.2"
82
82
  },
83
- "gitHead": "5569e704260c531e9e33ced31ad5d4820f867b1a"
83
+ "gitHead": "c0820f2aa4db2fe687c4265307c2fc7db6aadf53"
84
84
  }