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