@form8ion/javascript 13.0.0-alpha.1 → 13.0.0-alpha.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/README.md +8 -4
- package/example.js +8 -4
- package/lib/index.js +4 -16
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +4 -16
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -127,7 +127,7 @@ var coveragePlugin = /*#__PURE__*/Object.freeze({
|
|
|
127
127
|
test: tester$4
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
-
const unitTestFrameworksSchema = joi.object().
|
|
130
|
+
const unitTestFrameworksSchema = joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({});
|
|
131
131
|
|
|
132
132
|
async function chooseFramework ({frameworks, decisions}) {
|
|
133
133
|
if (!Object.keys(frameworks).length) return 'Other';
|
|
@@ -1205,16 +1205,6 @@ function validate(options) {
|
|
|
1205
1205
|
remark: joi.string()
|
|
1206
1206
|
}).default({})
|
|
1207
1207
|
})
|
|
1208
|
-
.keys({
|
|
1209
|
-
overrides: joi.object({
|
|
1210
|
-
npmAccount: joi.string(),
|
|
1211
|
-
author: joi.object({
|
|
1212
|
-
name: joi.string().required(),
|
|
1213
|
-
email: joi.string().email(),
|
|
1214
|
-
url: joi.string().uri()
|
|
1215
|
-
})
|
|
1216
|
-
}).default({})
|
|
1217
|
-
})
|
|
1218
1208
|
.keys({
|
|
1219
1209
|
ciServices: joi.object().pattern(/^/, joi.object({
|
|
1220
1210
|
scaffolder: joi.func().arity(1).required(),
|
|
@@ -1320,7 +1310,6 @@ function authorQuestions({name, email, url}) {
|
|
|
1320
1310
|
}
|
|
1321
1311
|
|
|
1322
1312
|
async function prompt(
|
|
1323
|
-
{npmAccount, author},
|
|
1324
1313
|
ciServices,
|
|
1325
1314
|
hosts,
|
|
1326
1315
|
visibility,
|
|
@@ -1397,9 +1386,9 @@ async function prompt(
|
|
|
1397
1386
|
message: 'What is the scope?',
|
|
1398
1387
|
when: scopePromptShouldBePresentedFactory(visibility),
|
|
1399
1388
|
validate: scope(visibility),
|
|
1400
|
-
default:
|
|
1389
|
+
default: maybeLoggedInNpmUsername
|
|
1401
1390
|
},
|
|
1402
|
-
...authorQuestions(
|
|
1391
|
+
...authorQuestions({
|
|
1403
1392
|
name: npmConf$1.get('init.author.name'),
|
|
1404
1393
|
email: npmConf$1.get('init.author.email'),
|
|
1405
1394
|
url: npmConf$1.get('init.author.url')
|
|
@@ -1670,7 +1659,6 @@ async function scaffolder (options) {
|
|
|
1670
1659
|
vcs,
|
|
1671
1660
|
description,
|
|
1672
1661
|
configs,
|
|
1673
|
-
overrides,
|
|
1674
1662
|
ciServices,
|
|
1675
1663
|
hosts,
|
|
1676
1664
|
decisions,
|
|
@@ -1697,7 +1685,7 @@ async function scaffolder (options) {
|
|
|
1697
1685
|
provideExample,
|
|
1698
1686
|
packageManager,
|
|
1699
1687
|
dialect
|
|
1700
|
-
} = await prompt(
|
|
1688
|
+
} = await prompt(ciServices, hosts, visibility, vcs, decisions, configs, pathWithinParent);
|
|
1701
1689
|
|
|
1702
1690
|
info('Writing project files', {level: 'secondary'});
|
|
1703
1691
|
|