@contentful/create-contentful-app 1.3.2 → 1.3.6

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/template.js +2 -6
  2. package/package.json +4 -4
package/lib/template.js CHANGED
@@ -22,7 +22,7 @@ const logger_1 = require("./logger");
22
22
  const utils_1 = require("./utils");
23
23
  const EXAMPLES_PATH = 'contentful/apps/examples/';
24
24
  function isContentfulTemplate(url) {
25
- return Object.values(types_1.ContentfulExample).some(t => url.includes(EXAMPLES_PATH + t));
25
+ return Object.values(types_1.ContentfulExample).some((t) => url.includes(EXAMPLES_PATH + t));
26
26
  }
27
27
  function makeContentfulExampleSource(options) {
28
28
  if (options.example) {
@@ -64,16 +64,12 @@ function validate(destination) {
64
64
  if (!(0, fs_1.existsSync)(packageJSONLocation)) {
65
65
  throw new Error(`Invalid template: missing "${packageJSONLocation}".`);
66
66
  }
67
- let packageJSON;
68
67
  try {
69
- packageJSON = JSON.parse((0, fs_1.readFileSync)(packageJSONLocation, 'utf-8'));
68
+ JSON.parse((0, fs_1.readFileSync)(packageJSONLocation, 'utf-8'));
70
69
  }
71
70
  catch (e) {
72
71
  throw new Error(`Invalid template: invalid "${packageJSONLocation}".`);
73
72
  }
74
- if (!Object.keys(packageJSON.dependencies).includes('@contentful/app-sdk')) {
75
- throw new Error(`Invalid template: missing "@contentful/app-sdk" in "${packageJSONLocation}".`);
76
- }
77
73
  }
78
74
  function cleanUp(destination) {
79
75
  (0, utils_1.rmIfExists)((0, path_1.resolve)(destination, 'package-lock.json'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.3.2",
3
+ "version": "1.3.6",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -35,7 +35,7 @@
35
35
  "build": "tsc"
36
36
  },
37
37
  "dependencies": {
38
- "@contentful/app-scripts": "^1.1.0",
38
+ "@contentful/app-scripts": "1.1.2",
39
39
  "chalk": "^4.1.0",
40
40
  "commander": "^9.0.0",
41
41
  "degit": "2.8.4",
@@ -62,7 +62,7 @@
62
62
  "@types/node": "^14.14.31",
63
63
  "@types/rimraf": "^3.0.2",
64
64
  "@types/tildify": "^2.0.2",
65
- "@types/validate-npm-package-name": "^3.0.3"
65
+ "@types/validate-npm-package-name": "^4.0.0"
66
66
  },
67
- "gitHead": "257b55c95bf7ec19f5d998fad0ed7d7367a3beb4"
67
+ "gitHead": "2134d499765ee49100894c987dfd48c8d4235b08"
68
68
  }