File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/knip/src/plugins/aws-cdk Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependenc
1414
1515const config : string [ ] = [ "cdk.json" ] ;
1616
17- const resolveConfig : ResolveConfig < AwsCdkConfig > = async config => {
17+ const resolveConfig : ResolveConfig < AwsCdkConfig > = async ( config , options ) => {
1818 if ( ! config ) return [ ] ;
1919
20- const app = config . app . split ( " " ) [ 0 ] ;
20+ const app = options . getInputsFromScripts ( config . app , { knownBinsOnly : true } ) ;
2121 const watch = config . watch ?. include ?? [ ] ;
2222 const context = Object . keys ( config . context ?? { } ) . map ( key => key . split ( "/" ) [ 0 ] ) ?? [ ] ;
23- return compact ( [ app , ...watch , ...context ] ) . map ( id => toDependency ( id ) ) ;
23+ return compact ( [ ... app , ...watch , ...context ] ) . map ( id => ( typeof id === 'string' ? toDependency ( id ) : id ) ) ;
2424} ;
2525
2626const production : string [ ] = [
You can’t perform that action at this time.
0 commit comments