Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause is now `unknown` type. So, we need to cast the `e`, `err`, or `error` variables to type `Error`.
This commit is contained in:
parent
5b28adb7ed
commit
40568daca8
83 changed files with 601 additions and 576 deletions
4
lib/database-upload.js
generated
4
lib/database-upload.js
generated
|
|
@ -40,7 +40,7 @@ async function uploadDatabases(repositoryNwo, config, apiDetails, logger) {
|
|||
logger.debug("Not analyzing default branch. Skipping upload.");
|
||||
return;
|
||||
}
|
||||
const client = api_client_1.getApiClient(apiDetails);
|
||||
const client = (0, api_client_1.getApiClient)(apiDetails);
|
||||
try {
|
||||
await client.request("GET /repos/:owner/:repo/code-scanning/codeql/databases", {
|
||||
owner: repositoryNwo.owner,
|
||||
|
|
@ -57,7 +57,7 @@ async function uploadDatabases(repositoryNwo, config, apiDetails, logger) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
const codeql = await codeql_1.getCodeQL(config.codeQLCmd);
|
||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||
for (const language of config.languages) {
|
||||
// Bundle the database up into a single zip file
|
||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue