@contentful/create-contentful-app 1.4.0 → 1.4.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/index.js CHANGED
@@ -87,7 +87,7 @@ function initProject(appName, options) {
87
87
  yield (0, template_1.cloneTemplateIn)(fullAppFolder, normalizedOptions);
88
88
  updatePackageName(fullAppFolder);
89
89
  const useYarn = normalizedOptions.yarn || (0, utils_1.detectManager)() === 'yarn';
90
- (0, logger_1.wrapInBlanks)((0, logger_1.highlight)(`---- Installing the dependencies for your app (Using ${chalk_1.default.cyan(useYarn ? 'yarn' : 'npm')})...`));
90
+ (0, logger_1.wrapInBlanks)((0, logger_1.highlight)(`---- Installing the dependencies for your app (using ${chalk_1.default.cyan(useYarn ? 'yarn' : 'npm')})...`));
91
91
  if (useYarn) {
92
92
  yield (0, utils_1.exec)('yarn', [], { cwd: fullAppFolder });
93
93
  }
package/lib/template.js CHANGED
@@ -32,7 +32,8 @@ function getGithubFolderNames(username, repo, path) {
32
32
  const url = `https://api.github.com/repos/${username}/${repo}/contents/${path}`;
33
33
  const response = yield (0, node_fetch_1.default)(url);
34
34
  const contents = yield response.json();
35
- return contents.filter((content) => content.type === "dir")
35
+ return contents
36
+ .filter((content) => content.type === 'dir')
36
37
  .map((content) => content.name);
37
38
  });
38
39
  }
@@ -43,20 +44,23 @@ function promptExampleSelection() {
43
44
  const { starter } = yield inquirer_1.default.prompt([
44
45
  {
45
46
  name: 'starter',
46
- message: 'Do you want to start with an example template or use one of the blank templates?',
47
+ message: 'Do you want to start with a blank template or use one of our examples?',
47
48
  type: 'list',
48
49
  choices: ['blank', 'example'],
49
50
  default: 'blank',
50
51
  },
51
52
  ]);
52
53
  // if the user chose to use an blank template, ask which language they prefer
53
- if (starter === "blank") {
54
+ if (starter === 'blank') {
54
55
  const { language } = yield inquirer_1.default.prompt([
55
56
  {
56
57
  name: 'language',
57
- message: 'Do you prefer Typescript or Javascript',
58
+ message: 'Do you prefer TypeScript or JavaScript',
58
59
  type: 'list',
59
- choices: ['typescript', 'javascript'],
60
+ choices: [
61
+ { name: 'TypeScript', value: 'typescript' },
62
+ { name: 'JavaScript', value: 'javascript' },
63
+ ],
60
64
  default: 'typescript',
61
65
  },
62
66
  ]);
@@ -64,7 +68,7 @@ function promptExampleSelection() {
64
68
  }
65
69
  else {
66
70
  // get available templates from examples
67
- const availableTemplates = yield getGithubFolderNames("contentful", "apps", "examples");
71
+ const availableTemplates = yield getGithubFolderNames('contentful', 'apps', 'examples');
68
72
  // ask user to select a template from the available examples
69
73
  const { example } = yield inquirer_1.default.prompt([
70
74
  {
@@ -101,7 +105,7 @@ function makeContentfulExampleSource(options) {
101
105
  function getTemplateSource(options) {
102
106
  var _a;
103
107
  return __awaiter(this, void 0, void 0, function* () {
104
- const source = (_a = options.source) !== null && _a !== void 0 ? _a : yield makeContentfulExampleSource(options);
108
+ const source = (_a = options.source) !== null && _a !== void 0 ? _a : (yield makeContentfulExampleSource(options));
105
109
  if (options.source && !isContentfulTemplate(source)) {
106
110
  (0, logger_1.warn)(`Template at ${(0, logger_1.highlight)(source)} is not an official Contentful app template!`);
107
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
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.5.5",
38
+ "@contentful/app-scripts": "1.5.6",
39
39
  "chalk": "4.1.2",
40
40
  "commander": "9.4.1",
41
41
  "degit": "2.8.4",
@@ -66,5 +66,5 @@
66
66
  "@types/tildify": "2.0.2",
67
67
  "@types/validate-npm-package-name": "4.0.0"
68
68
  },
69
- "gitHead": "00e9dff6579274c1cb492e329161cc7bac8445e0"
69
+ "gitHead": "e20f959d311e6916097dfe432c351b3d24663a2a"
70
70
  }