git-coco 0.7.3 → 0.7.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/dist/index.d.ts +1 -1
- package/dist/index.esm.mjs +27 -16
- package/dist/index.js +27 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.esm.mjs
CHANGED
|
@@ -1696,22 +1696,26 @@ async function createProjectFileAndReturnPath(fileName, contents) {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
|
|
1698
1698
|
const handler = async (argv, logger) => {
|
|
1699
|
+
const options = loadConfig(argv);
|
|
1699
1700
|
logger.log(LOGO);
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1701
|
+
let level = options?.level;
|
|
1702
|
+
if (!level) {
|
|
1703
|
+
level = await select({
|
|
1704
|
+
message: 'configure coco at the system or project level:',
|
|
1705
|
+
choices: [
|
|
1706
|
+
{
|
|
1707
|
+
name: 'system',
|
|
1708
|
+
value: 'system',
|
|
1709
|
+
description: 'add coco config to your global git config',
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
name: 'project',
|
|
1713
|
+
value: 'project',
|
|
1714
|
+
description: 'add coco config to existing git project',
|
|
1715
|
+
},
|
|
1716
|
+
],
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1715
1719
|
let configFilePath = '';
|
|
1716
1720
|
switch (level) {
|
|
1717
1721
|
case 'project':
|
|
@@ -1853,7 +1857,14 @@ const handler = async (argv, logger) => {
|
|
|
1853
1857
|
/**
|
|
1854
1858
|
* Command line options via yargs
|
|
1855
1859
|
*/
|
|
1856
|
-
const options = {
|
|
1860
|
+
const options = {
|
|
1861
|
+
level: {
|
|
1862
|
+
type: 'string',
|
|
1863
|
+
alias: 'l',
|
|
1864
|
+
description: 'Configure coco at the system or project level',
|
|
1865
|
+
choices: ['system', 'project'],
|
|
1866
|
+
},
|
|
1867
|
+
};
|
|
1857
1868
|
const builder = (yargs) => {
|
|
1858
1869
|
return yargs.options(options);
|
|
1859
1870
|
};
|
package/dist/index.js
CHANGED
|
@@ -1717,22 +1717,26 @@ async function createProjectFileAndReturnPath(fileName, contents) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
|
|
1719
1719
|
const handler = async (argv, logger) => {
|
|
1720
|
+
const options = loadConfig(argv);
|
|
1720
1721
|
logger.log(LOGO);
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1722
|
+
let level = options?.level;
|
|
1723
|
+
if (!level) {
|
|
1724
|
+
level = await prompts$1.select({
|
|
1725
|
+
message: 'configure coco at the system or project level:',
|
|
1726
|
+
choices: [
|
|
1727
|
+
{
|
|
1728
|
+
name: 'system',
|
|
1729
|
+
value: 'system',
|
|
1730
|
+
description: 'add coco config to your global git config',
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
name: 'project',
|
|
1734
|
+
value: 'project',
|
|
1735
|
+
description: 'add coco config to existing git project',
|
|
1736
|
+
},
|
|
1737
|
+
],
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1736
1740
|
let configFilePath = '';
|
|
1737
1741
|
switch (level) {
|
|
1738
1742
|
case 'project':
|
|
@@ -1874,7 +1878,14 @@ const handler = async (argv, logger) => {
|
|
|
1874
1878
|
/**
|
|
1875
1879
|
* Command line options via yargs
|
|
1876
1880
|
*/
|
|
1877
|
-
const options = {
|
|
1881
|
+
const options = {
|
|
1882
|
+
level: {
|
|
1883
|
+
type: 'string',
|
|
1884
|
+
alias: 'l',
|
|
1885
|
+
description: 'Configure coco at the system or project level',
|
|
1886
|
+
choices: ['system', 'project'],
|
|
1887
|
+
},
|
|
1888
|
+
};
|
|
1878
1889
|
const builder = (yargs) => {
|
|
1879
1890
|
return yargs.options(options);
|
|
1880
1891
|
};
|