Skip to content

Commit a960014

Browse files
committed
add feature to handle warn actions from settings configuration
1 parent 4cfe9ee commit a960014

18 files changed

+2253
-891
lines changed

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"prettier-config-x-standard"

lib/commands/login/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export const login = {
4343
if (!isInteractive()) {
4444
throw new InputError('cannot prompt for credentials in a non-interactive shell')
4545
}
46+
/**
47+
* @type {{ apiKey: string }}
48+
*/
4649
const result = await prompts({
4750
type: 'password',
4851
name: 'apiKey',

lib/commands/npm/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const npm = {
1515
if (signal) {
1616
process.kill(process.pid, signal)
1717
} else if (code !== null) {
18+
console.log(wrapperPath, ...argv)
1819
process.exit(code)
1920
}
2021
})

lib/commands/report/create.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ async function setupCommand (name, description, argv, importMeta) {
185185
.then(res => {
186186
if (!res.success) handleUnsuccessfulApiResponse('getReportSupportedFiles', res, ora())
187187
return res.data
188-
}).catch(cause => {
189-
throw new ErrorWithCause('Failed getting supported files for report', { cause })
190-
})
188+
}).catch(
189+
/** @type {(cause: Error) => never} */
190+
(cause) => {
191+
throw new ErrorWithCause('Failed getting supported files for report', { cause })
192+
})
191193

192194
const packagePaths = await getPackageFiles(cwd, cli.input, config, supportedFiles, debugLog)
193195

0 commit comments

Comments
 (0)