@@ -95,8 +95,8 @@ function addParams(client: AnyNanoClient, argv: Partial<mainArgs>) {
95
95
if ( argv . attributes ?. length ) {
96
96
client . dataAttributes = argv . attributes . split ( ',' ) ;
97
97
}
98
- if ( argv [ 'users-with-access' ] ?. length ) {
99
- client . dissems = argv [ 'users-with-access' ] . split ( ',' ) ;
98
+ if ( argv . usersWithAccess ?. length ) {
99
+ client . dissems = argv . usersWithAccess . split ( ',' ) ;
100
100
}
101
101
log ( 'SILLY' , `Built encrypt params dissems: ${ client . dissems } , attrs: ${ client . dataAttributes } ` ) ;
102
102
}
@@ -112,8 +112,8 @@ async function tdf3EncryptParamsFor(argv: Partial<mainArgs>): Promise<EncryptPar
112
112
if ( argv . attributes ?. length ) {
113
113
c . setAttributes ( argv . attributes . split ( ',' ) ) ;
114
114
}
115
- if ( argv [ 'users-with-access' ] ?. length ) {
116
- c . setUsersWithAccess ( argv [ 'users-with-access' ] . split ( ',' ) ) ;
115
+ if ( argv . usersWithAccess ?. length ) {
116
+ c . setUsersWithAccess ( argv . usersWithAccess . split ( ',' ) ) ;
117
117
}
118
118
// use offline mode, we do not have upsert for v2
119
119
c . setOffline ( ) ;
@@ -145,8 +145,8 @@ export const handleArgs = (args: string[]) => {
145
145
. middleware ( ( argv ) => {
146
146
if ( argv . silent ) {
147
147
log . level = 'CRITICAL' ;
148
- } else if ( argv [ 'log-level' ] ) {
149
- const ll = argv [ 'log-level' ] as string ;
148
+ } else if ( argv . logLevel ) {
149
+ const ll = argv . logLevel as string ;
150
150
log . level = ll . toUpperCase ( ) as Level ;
151
151
}
152
152
} )
@@ -230,7 +230,8 @@ export const handleArgs = (args: string[]) => {
230
230
231
231
// POLICY
232
232
. options ( {
233
- 'users-with-access' : {
233
+ usersWithAccess : {
234
+ alias : 'users-with-access' ,
234
235
group : 'Policy Options' ,
235
236
desc : 'Add users to the policy' ,
236
237
type : 'string' ,
@@ -248,7 +249,8 @@ export const handleArgs = (args: string[]) => {
248
249
249
250
// COMMANDS
250
251
. options ( {
251
- 'log-level' : {
252
+ logLevel : {
253
+ alias : 'log-level' ,
252
254
type : 'string' ,
253
255
default : 'info' ,
254
256
desc : 'Set logging level' ,
0 commit comments