cob-cli 2.19.1 → 2.20.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/bin/cob-cli.js +1 -0
- package/lib/commands/customize.js +4 -4
- package/lib/commands/init.js +5 -1
- package/package.json +1 -1
package/bin/cob-cli.js
CHANGED
|
@@ -36,6 +36,7 @@ program
|
|
|
36
36
|
program
|
|
37
37
|
.command('customize')
|
|
38
38
|
.arguments('[name]', "Name of the customization", "interactive menu")
|
|
39
|
+
.option('-f --force', 'skips comparisons')
|
|
39
40
|
.description('Interactive prompt to customize an aspect of the server')
|
|
40
41
|
.action( customize );
|
|
41
42
|
|
|
@@ -6,11 +6,11 @@ const { checkWorkingCopyCleanliness } = require("../task_lists/common_helpers");
|
|
|
6
6
|
const { checkVersion } = require("./upgradeRepo");
|
|
7
7
|
|
|
8
8
|
/* ************************************************************************ */
|
|
9
|
-
async function customize(args) {
|
|
9
|
+
async function customize(customization,args) {
|
|
10
10
|
try {
|
|
11
11
|
checkVersion()
|
|
12
12
|
console.log('Customize...');
|
|
13
|
-
await checkWorkingCopyCleanliness()
|
|
13
|
+
if(!args.force) await checkWorkingCopyCleanliness()
|
|
14
14
|
|
|
15
15
|
let defaultInteractiveOption = {
|
|
16
16
|
followUp: [ {
|
|
@@ -28,9 +28,9 @@ async function customize(args) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
let initialOption
|
|
31
|
-
if(
|
|
31
|
+
if(customization) {
|
|
32
32
|
try {
|
|
33
|
-
initialOption = require("../../customizations/"+
|
|
33
|
+
initialOption = require("../../customizations/"+customization.toLowerCase()).option
|
|
34
34
|
}
|
|
35
35
|
catch{
|
|
36
36
|
console.log("\nWarn".yellow, "unexisting customization file, defaulting to interactive menu...\n")
|
package/lib/commands/init.js
CHANGED
|
@@ -49,7 +49,11 @@ function projectPathOkFor(projectName) {
|
|
|
49
49
|
|
|
50
50
|
/* ************************************ */
|
|
51
51
|
async function notInsideGitRepo() {
|
|
52
|
-
let isRepo =
|
|
52
|
+
let isRepo = false
|
|
53
|
+
try {
|
|
54
|
+
isRepo = await git().checkIsRepo()
|
|
55
|
+
} catch {}
|
|
56
|
+
|
|
53
57
|
if(!isRepo) return true
|
|
54
58
|
console.log("\nError:".red,"current directory is part of a repository git.\n");
|
|
55
59
|
}
|
package/package.json
CHANGED