@form8ion/javascript 6.0.4 → 6.0.7

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.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
  import { questionNames as questionNames$2, questions } from '@travi/language-scaffolder-prompts';
2
2
  import deepmerge from 'deepmerge';
3
3
  import { validateOptions, scaffoldChoice, dialects, projectTypes, writePackageJson, installDependencies, PROD_DEPENDENCY_TYPE, DEV_DEPENDENCY_TYPE, packageManagers, mergeIntoExistingPackageJson } from '@form8ion/javascript-core';
4
- import * as joi from 'joi';
5
- import inquirer from 'inquirer';
6
- import { prompt as prompt$1 } from '@form8ion/overridable-prompts';
4
+ import joi from 'joi';
5
+ import { prompt as prompt$1, Separator } from '@form8ion/overridable-prompts';
7
6
  import { scaffold, lift as lift$3 } from '@form8ion/codecov';
8
7
  import { promises } from 'fs';
9
8
  import { fileExists, applyEnhancers, fileTypes } from '@form8ion/core';
@@ -205,9 +204,6 @@ const unitTestFrameworksSchema = joi.object().required().pattern(/^/, joi.object
205
204
  scaffolder: joi.func().arity(1).required()
206
205
  }));
207
206
 
208
- const {
209
- Separator: Separator$3
210
- } = inquirer;
211
207
  async function chooseFramework ({
212
208
  frameworks,
213
209
  decisions
@@ -217,7 +213,7 @@ async function chooseFramework ({
217
213
  name: questionNames$1.UNIT_TEST_FRAMEWORK,
218
214
  type: 'list',
219
215
  message: 'Which type of unit testing framework should be used?',
220
- choices: [...Object.keys(frameworks), new Separator$3(), 'Other']
216
+ choices: [...Object.keys(frameworks), new Separator(), 'Other']
221
217
  }], decisions);
222
218
  return answers[questionNames$1.UNIT_TEST_FRAMEWORK];
223
219
  }
@@ -627,10 +623,6 @@ function scope(visibility) {
627
623
  };
628
624
  }
629
625
 
630
- const {
631
- Separator: Separator$2
632
- } = inquirer;
633
-
634
626
  function authorQuestions({
635
627
  name,
636
628
  email,
@@ -702,7 +694,7 @@ async function prompt({
702
694
  name: questionNames$1.PROJECT_TYPE,
703
695
  message: 'What type of JavaScript project is this?',
704
696
  type: 'list',
705
- choices: [...Object.values(projectTypes), new Separator$2(), 'Other'],
697
+ choices: [...Object.values(projectTypes), new Separator(), 'Other'],
706
698
  default: projectTypes.PACKAGE
707
699
  }, ...('Private' === visibility ? [] : [{
708
700
  name: questionNames$1.SHOULD_BE_SCOPED,
@@ -735,7 +727,7 @@ async function prompt({
735
727
  type: 'list',
736
728
  message: 'Where will the application be hosted?',
737
729
  when: projectIsApplication,
738
- choices: [...Object.keys(hosts), new Separator$2(), 'Other']
730
+ choices: [...Object.keys(hosts), new Separator(), 'Other']
739
731
  }], decisions);
740
732
  return {
741
733
  tests: {
@@ -955,9 +947,6 @@ function buildPackageName (projectName, scope) {
955
947
  throw new Error(`The package name ${name} is invalid:${EOL}\t* ${errors.join(`${EOL}\t* `)}`);
956
948
  }
957
949
 
958
- const {
959
- Separator: Separator$1
960
- } = inquirer;
961
950
  async function chooseApplicationType ({
962
951
  types,
963
952
  projectType,
@@ -968,7 +957,7 @@ async function chooseApplicationType ({
968
957
  name: questionNames$1.PROJECT_TYPE_CHOICE,
969
958
  type: 'list',
970
959
  message: `What type of ${projectType} is this?`,
971
- choices: [...Object.keys(types), new Separator$1(), 'Other']
960
+ choices: [...Object.keys(types), new Separator(), 'Other']
972
961
  }], decisions);
973
962
  return answers[questionNames$1.PROJECT_TYPE_CHOICE];
974
963
  }
@@ -1014,9 +1003,6 @@ function defineBadges (packageName, visibility) {
1014
1003
  };
1015
1004
  }
1016
1005
 
1017
- const {
1018
- Separator
1019
- } = inquirer;
1020
1006
  async function chooseBundler ({
1021
1007
  bundlers,
1022
1008
  decisions