@form8ion/javascript 11.6.0 → 11.6.1
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 +11 -15
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +11 -15
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -512,13 +512,11 @@ async function liftPublishable ({projectRoot}) {
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
function liftPackage$1 ({projectRoot}) {
|
|
516
|
-
return liftPublishable({projectRoot});
|
|
515
|
+
function liftPackage$1 ({projectRoot, packageDetails}) {
|
|
516
|
+
return liftPublishable({projectRoot, packageDetails});
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
async function isPackage ({
|
|
520
|
-
const {exports, publishConfig, bin} = JSON.parse(await node_fs.promises.readFile(`${projectRoot}/package.json`, 'utf-8'));
|
|
521
|
-
|
|
519
|
+
async function isPackage ({packageDetails: {exports, publishConfig, bin}}) {
|
|
522
520
|
return !!exports || (!!publishConfig && !bin);
|
|
523
521
|
}
|
|
524
522
|
|
|
@@ -596,14 +594,12 @@ async function scaffoldCliType ({packageName, visibility, projectRoot, dialect,
|
|
|
596
594
|
);
|
|
597
595
|
}
|
|
598
596
|
|
|
599
|
-
async function isCli ({
|
|
600
|
-
const {bin} = JSON.parse(await node_fs.promises.readFile(`${projectRoot}/package.json`, 'utf-8'));
|
|
601
|
-
|
|
597
|
+
async function isCli ({packageDetails: {bin}}) {
|
|
602
598
|
return !!bin;
|
|
603
599
|
}
|
|
604
600
|
|
|
605
|
-
function liftCli ({projectRoot}) {
|
|
606
|
-
return liftPublishable({projectRoot});
|
|
601
|
+
function liftCli ({projectRoot, packageDetails}) {
|
|
602
|
+
return liftPublishable({projectRoot, packageDetails});
|
|
607
603
|
}
|
|
608
604
|
|
|
609
605
|
async function scaffoldProjectType ({
|
|
@@ -651,14 +647,14 @@ async function scaffoldProjectType ({
|
|
|
651
647
|
}
|
|
652
648
|
|
|
653
649
|
async function lifter$1 ({projectRoot, packageDetails}) {
|
|
654
|
-
if (await isPackage({projectRoot})) return liftPackage$1({projectRoot, packageDetails});
|
|
655
|
-
if (await isCli({projectRoot})) return liftCli({projectRoot, packageDetails});
|
|
650
|
+
if (await isPackage({projectRoot, packageDetails})) return liftPackage$1({projectRoot, packageDetails});
|
|
651
|
+
if (await isCli({projectRoot, packageDetails})) return liftCli({projectRoot, packageDetails});
|
|
656
652
|
|
|
657
653
|
return {};
|
|
658
654
|
}
|
|
659
655
|
|
|
660
|
-
async function tester$1 ({projectRoot}) {
|
|
661
|
-
return await isPackage({projectRoot}) || isCli({projectRoot});
|
|
656
|
+
async function tester$1 ({projectRoot, packageDetails}) {
|
|
657
|
+
return await isPackage({projectRoot, packageDetails}) || isCli({projectRoot, packageDetails});
|
|
662
658
|
}
|
|
663
659
|
|
|
664
660
|
var projectTypes = /*#__PURE__*/Object.freeze({
|
|
@@ -1018,7 +1014,7 @@ async function lift ({projectRoot, vcs, results}) {
|
|
|
1018
1014
|
}
|
|
1019
1015
|
|
|
1020
1016
|
const pluginSchema = joi__default["default"].object({scaffolder: joi__default["default"].func().arity(1).required()});
|
|
1021
|
-
const pluginMapSchema = joi__default["default"].object().pattern(
|
|
1017
|
+
const pluginMapSchema = joi__default["default"].object().pattern(joi__default["default"].string(), pluginSchema);
|
|
1022
1018
|
|
|
1023
1019
|
const packageBundlersSchema = pluginMapSchema.default({});
|
|
1024
1020
|
|