Skip to content

Commit 8f2a737

Browse files
Add type to boolean properties (#386)
* add boolean type * add parser config + remove config from package json * bump version
1 parent 89ec207 commit 8f2a737

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

lib/interface/cli/commad-line-interface.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ async function startCommandLine() {
6363
global: false,
6464
})
6565
.demandCommand(1, 'You need at least one command before moving on')
66+
.parserConfiguration({
67+
'boolean-negation': false,
68+
})
6669
.wrap(null)
6770
.version(false)
6871
.help('help')

lib/interface/cli/commands/helm/release/test-release.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const install = new Command({
3535
})
3636
.option('cleanup', {
3737
description: 'delete test pods upon completion (default false)',
38-
default: 'false',
38+
default: false,
3939
type: 'boolean',
4040
});
4141
},

lib/interface/cli/commands/image/get.cmd.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const command = new Command({
3434
alias: 'a',
3535
describe: 'Return images from all possible registries (by default only r.cfcr.io images will be returned)',
3636
default: false,
37+
type: 'boolean',
3738
})
3839
.option('label', {
3940
describe: 'Filter by a list of annotated labels',

lib/interface/cli/commands/pipeline/run.cmd.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const run = new Command({
6161
describe: 'Ignore cached images',
6262
alias: 'nc',
6363
default: false,
64+
type: 'boolean',
6465
})
6566
.option('annotation', {
6667
describe: 'Add annotations to created build',
@@ -72,11 +73,13 @@ const run = new Command({
7273
describe: 'Report notifications about pipeline execution',
7374
alias: 'en',
7475
default: false,
76+
type: 'boolean',
7577
})
7678
.option('reset-volume', {
7779
describe: 'Reset pipeline cached volume',
7880
alias: 'rv',
7981
default: false,
82+
type: 'boolean',
8083
})
8184
.option('variable', {
8285
describe: 'Set build variables',
@@ -95,7 +98,7 @@ const run = new Command({
9598
})
9699
.option('local', {
97100
describe: 'Run pipeline on your local docker machine',
98-
type: Boolean,
101+
type: 'boolean',
99102
default: false,
100103
})
101104
.option('local-volume', {
@@ -106,6 +109,7 @@ const run = new Command({
106109
describe: 'Ignore Codefresh cache optimizations',
107110
alias: 'ncfc',
108111
default: false,
112+
type: 'boolean',
109113
})
110114
.option('only', {
111115
describe: 'run only specifc steps',

lib/interface/cli/commands/root/get.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const get = new Command({
3737
.option('watch', {
3838
describe: 'Watching updates to a particular resource',
3939
alias: 'w',
40-
type: Boolean,
40+
type: 'boolean',
4141
default: false,
4242
group: 'Output Options',
4343
})

lib/interface/cli/commands/team/synchronize.cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const command = new Command({
3737
describe: 'Disable email notifications for users',
3838
alias: 'no-notify',
3939
required: false,
40-
type: Boolean,
41-
default: false
40+
type: 'boolean',
41+
default: false,
4242
})
4343
.example('codefresh synchronize teams [client-name] -t [client-type] -tk [accessToken]', 'Synchronize team with group');
4444
},

lib/interface/cli/commands/trigger/event/create.cmd.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const command = new Command({
2727
.option('public', {
2828
describe: 'wether trigger-event is public (system-wide): can be linked to any pipeline in any account',
2929
default: false,
30+
type: 'boolean',
3031
})
3132
.option('secret', {
3233
describe: 'trigger-event secret (omit to auto-generate)',

lib/interface/cli/commands/trigger/event/get.cmd.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const command = new Command({
3636
.option('public', {
3737
describe: 'get public trigger-event(s)',
3838
default: true,
39+
type: 'boolean',
3940
})
4041
.example('codefresh get trigger-event registry:dockerhub:codefresh:fortune:push', 'Get DockerHub codefresh/fortune push `trigger-event`')
4142
.example('codefresh get trigger-event --type registry --kind dockerhub --filter *codefresh', 'Get all DockerHub codefresh/* push `trigger-events`');

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.39.6",
3+
"version": "0.40.0",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,
@@ -94,8 +94,5 @@
9494
"setupFiles": [
9595
"./test-setup.js"
9696
]
97-
},
98-
"yargs": {
99-
"boolean-negation": false
10097
}
10198
}

0 commit comments

Comments
 (0)