async function upload(input) {
    if (fs.lstatSync(input).isDirectory()) {
        const sarifFiles = fs.readdirSync(input)
            .filter(f => f.endsWith(".sarif"))
            .map(f => path.resolve(input, f));
        if (sarifFiles.length === 0) {
            core.setFailed("No SARIF files found to upload in \"" + input + "\".");
            return false;
        }
        return await uploadFiles(sarifFiles);
    }
    else {
        return await uploadFiles([input]);
    }
}
// Returns true iff the upload occurred and succeeded
Returns true iff the upload occurred and succeeded
Returns true iff the upload occurred and succeeded
async function upload(input) {
    if (fs.lstatSync(input).isDirectory()) {
        const sarifFiles = fs.readdirSync(input)
            .filter(f => f.endsWith(".sarif"))
            .map(f => path.resolve(input, f));
        if (sarifFiles.length === 0) {
            core.setFailed("No SARIF files found to upload in \"" + input + "\".");
            return false;
        }
        return await uploadFiles(sarifFiles);
    }
    else {
        return await uploadFiles([input]);
    }
}
async function upload ( input ) { if ( fs . lstatSync ( input ) . isDirectory ( ) ) { const sarifFiles = fs . readdirSync ( input ) . filter ( f => f . endsWith ( ".sarif" ) ) . map ( f => path . resolve ( input , f ) ) ; if ( sarifFiles . length === 0 ) { core . setFailed ( "No SARIF files found to upload in \"" + input + "\"." ) ; return false ; } return await uploadFiles ( sarifFiles ) ; } else { return await uploadFiles ( [ input ] ) ; } }
Returns true iff the upload occurred and succeeded
Returns true iff the upload occurred and succeeded