@contentful/create-contentful-app 1.1.0-alpha.9 → 1.2.2

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/template.js CHANGED
@@ -28,7 +28,7 @@ function makeContentfulExampleSource(options) {
28
28
  if (options.example) {
29
29
  return EXAMPLES_PATH + options.example;
30
30
  }
31
- if (options.Js) {
31
+ if (options.javascript) {
32
32
  return EXAMPLES_PATH + types_1.ContentfulExample.Javascript;
33
33
  }
34
34
  return EXAMPLES_PATH + types_1.ContentfulExample.Typescript;
package/lib/utils.js CHANGED
@@ -5,7 +5,7 @@ const child_process_1 = require("child_process");
5
5
  const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
7
  const logger_1 = require("./logger");
8
- const MUTUALLY_EXCLUSIVE_OPTIONS = ['source', 'example', 'Js', 'Ts'];
8
+ const MUTUALLY_EXCLUSIVE_OPTIONS = ['source', 'example', 'javascript', 'typescript'];
9
9
  function exec(command, args, options) {
10
10
  return new Promise((resolve, reject) => {
11
11
  const process = (0, child_process_1.spawn)(command, args, Object.assign({ stdio: 'inherit' }, options));
@@ -47,25 +47,24 @@ function normalizeOptions(options) {
47
47
  normalizedOptions.npm = true;
48
48
  }
49
49
  let fallbackOption = '--typescript';
50
- const currentMutuallyExclusiveOptions = MUTUALLY_EXCLUSIVE_OPTIONS
51
- .filter((option) => normalizedOptions[option]);
50
+ const currentMutuallyExclusiveOptions = MUTUALLY_EXCLUSIVE_OPTIONS.filter((option) => normalizedOptions[option]);
52
51
  if (normalizedOptions.source) {
53
52
  fallbackOption = '--source';
54
53
  delete normalizedOptions.example;
55
- delete normalizedOptions.Ts;
56
- delete normalizedOptions.Js;
54
+ delete normalizedOptions.typescript;
55
+ delete normalizedOptions.javascript;
57
56
  }
58
57
  if (normalizedOptions.example) {
59
58
  fallbackOption = '--example';
60
- delete normalizedOptions.Ts;
61
- delete normalizedOptions.Js;
59
+ delete normalizedOptions.typescript;
60
+ delete normalizedOptions.javascript;
62
61
  }
63
- if (normalizedOptions.Ts) {
62
+ if (normalizedOptions.typescript) {
64
63
  fallbackOption = '--typescript';
65
- delete normalizedOptions.Js;
64
+ delete normalizedOptions.javascript;
66
65
  }
67
- if (!normalizedOptions.Js) {
68
- normalizedOptions.Ts = true;
66
+ if (!normalizedOptions.javascript) {
67
+ normalizedOptions.typescript = true;
69
68
  }
70
69
  if (currentMutuallyExclusiveOptions.length > 1) {
71
70
  (0, logger_1.warn)(`Options ${(0, logger_1.highlight)('--source')}, ${(0, logger_1.highlight)('--example')}, ${(0, logger_1.highlight)('--typescript')} and ${(0, logger_1.highlight)('--javascript')} are mutually exclusive, using ${(0, logger_1.choice)(fallbackOption)}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.1.0-alpha.9",
3
+ "version": "1.2.2",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -32,18 +32,17 @@
32
32
  "lint": "eslint ./src",
33
33
  "lint:fix": "npm run lint -- --fix",
34
34
  "pre-commit": "lint-staged",
35
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
36
35
  "build": "tsc"
37
36
  },
38
37
  "dependencies": {
39
- "@contentful/app-scripts": "^0.16.0-alpha.2",
38
+ "@contentful/app-scripts": "^1.0.2",
40
39
  "chalk": "^4.1.0",
41
40
  "commander": "^9.0.0",
42
41
  "degit": "2.8.4",
43
42
  "inquirer": "^8.2.1",
44
43
  "rimraf": "^3.0.2",
45
44
  "tildify": "^2.0.0",
46
- "validate-npm-package-name": "^3.0.0"
45
+ "validate-npm-package-name": "^4.0.0"
47
46
  },
48
47
  "bugs": {
49
48
  "url": "https://github.com/contentful/create-contentful-app/issues"
@@ -65,5 +64,5 @@
65
64
  "@types/tildify": "^2.0.2",
66
65
  "@types/validate-npm-package-name": "^3.0.3"
67
66
  },
68
- "gitHead": "c2e26ece746ca718b1fe38bf7c933ed8b1cd102a"
67
+ "gitHead": "1984bfe83b80a3f291ae753d7c37cc9dd734e5e0"
69
68
  }