File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ import { optionals } from "swift:../swift";
44
55export default function Command ( ) {
66 const { isLoading, data, error } = usePromise ( async ( ) => {
7- const inputs = [ undefined , "value" ] ;
8- const promises = inputs . map ( ( input ) => optionals ( input ) ) ;
7+ const inputs = [ undefined , null , "value" ] ;
8+ const promises = inputs . map ( ( input ) => optionals ( input ) ) . concat ( optionals ( ) ) ;
99 const results = await Promise . all ( promises ) ;
1010 const formattedResults = results
1111 . map ( ( result , index ) => {
12- return `${ inputs [ index ] } -> ${ result } ` ;
12+ const inputLabel = index < inputs . length ? inputs [ index ] : "no argument" ;
13+ return `${ inputLabel } -> ${ result } ` ;
1314 } )
1415 . join ( "\n\r" ) ;
1516 return formattedResults ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ let package = Package(
77 name: " SwiftAPI " ,
88 platforms: [ . macOS( . v12) ] ,
99 dependencies: [
10- . package ( url: " https://github.com/raycast/extensions-swift-tools.git " , from: " 1.0.0 " ) ,
10+ . package ( url: " https://github.com/raycast/extensions-swift-tools.git " , from: " 1.0.1 " ) ,
1111 ] ,
1212 targets: [
1313 . executableTarget(
You can’t perform that action at this time.
0 commit comments