@@ -5,8 +5,6 @@ import spawn from '@npmcli/promise-spawn'
5
5
import chalk from 'chalk'
6
6
import yargsParse from 'yargs-parser'
7
7
8
- import { objectEntries } from '@socketsecurity/registry/lib/objects'
9
-
10
8
import type { CliSubcommand } from '../utils/meow-with-subcommands'
11
9
12
10
const distPath = __dirname
@@ -131,18 +129,18 @@ function argvToArray(argv: {
131
129
} ) : string [ ] {
132
130
if ( argv [ 'help' ] ) return [ '--help' ]
133
131
const result = [ ]
134
- for ( const { 0 : key , 1 : value } of objectEntries ( argv ) ) {
132
+ for ( const { 0 : key , 1 : value } of Object . entries ( argv ) ) {
135
133
if ( key === '_' || key === '--' ) continue
136
134
if ( key === 'babel' || key === 'install-deps' || key === 'validate' ) {
137
135
// cdxgen documents no-babel, no-install-deps, and no-validate flags so
138
136
// use them when relevant.
139
137
result . push ( `--${ value ? key : `no-${ key } ` } ` )
140
138
} else if ( value === true ) {
141
- result . push ( `--${ String ( key ) } ` )
139
+ result . push ( `--${ key } ` )
142
140
} else if ( typeof value === 'string' ) {
143
- result . push ( `--${ String ( key ) } ` , String ( value ) )
141
+ result . push ( `--${ key } ` , String ( value ) )
144
142
} else if ( Array . isArray ( value ) ) {
145
- result . push ( `--${ String ( key ) } ` , ...value . map ( String ) )
143
+ result . push ( `--${ key } ` , ...value . map ( String ) )
146
144
}
147
145
}
148
146
if ( argv [ '--' ] ) {
0 commit comments