Skip to content

Commit 4ce9827

Browse files
committed
fix report create
1 parent deb8924 commit 4ce9827

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/commands/report/create.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,17 @@ async function setupCommand (name, description, argv, importMeta) {
181181
}
182182
})
183183

184-
const packagePaths = await getPackageFiles(cwd, cli.input, config, debugLog)
184+
// TODO: setupSdk(getDefaultKey() || FREE_API_KEY)
185+
const socketSdk = await setupSdk()
186+
const supportedFiles = await socketSdk.getReportSupportedFiles()
187+
.then(res => {
188+
if (!res.success) handleUnsuccessfulApiResponse('getReportSupportedFiles', res, ora())
189+
return res.data
190+
}).catch(cause => {
191+
throw new ErrorWithCause('Failed getting supported files for report', { cause })
192+
})
193+
194+
const packagePaths = await getPackageFiles(cwd, cli.input, config, supportedFiles, debugLog)
185195

186196
return {
187197
config,

0 commit comments

Comments
 (0)