Bump typescript, fix build errors around catch blocks.
This commit is contained in:
@@ -6,14 +6,14 @@ const fs_1 = require("fs");
|
||||
class Artifact {
|
||||
constructor(path, contentType = "raw") {
|
||||
this.path = path;
|
||||
this.name = path_1.basename(path);
|
||||
this.name = (0, path_1.basename)(path);
|
||||
this.contentType = contentType;
|
||||
}
|
||||
get contentLength() {
|
||||
return fs_1.statSync(this.path).size;
|
||||
return (0, fs_1.statSync)(this.path).size;
|
||||
}
|
||||
readFile() {
|
||||
return fs_1.readFileSync(this.path);
|
||||
return (0, fs_1.readFileSync)(this.path);
|
||||
}
|
||||
}
|
||||
exports.Artifact = Artifact;
|
||||
|
||||
@@ -63,7 +63,7 @@ class FileArtifactGlobber {
|
||||
throw Error(`Artifact pattern :${pattern} did not match any files`);
|
||||
}
|
||||
static expandPath(path) {
|
||||
return untildify_1.default(path);
|
||||
return (0, untildify_1.default)(path);
|
||||
}
|
||||
}
|
||||
exports.FileArtifactGlobber = FileArtifactGlobber;
|
||||
|
||||
@@ -39,7 +39,7 @@ class ArtifactPathValidator {
|
||||
}
|
||||
}
|
||||
verifyNotDirectory(path) {
|
||||
const isDir = fs_1.statSync(path).isDirectory();
|
||||
const isDir = (0, fs_1.statSync)(path).isDirectory();
|
||||
if (isDir) {
|
||||
const message = `Artifact is a directory:${path}. Directories can not be uploaded to a release.`;
|
||||
this.reportError(message);
|
||||
|
||||
@@ -164,7 +164,7 @@ class CoreInputs {
|
||||
return core.getInput('omitNameDuringUpdate') == 'true';
|
||||
}
|
||||
stringFromFile(path) {
|
||||
return fs_1.readFileSync(path, 'utf-8');
|
||||
return (0, fs_1.readFileSync)(path, 'utf-8');
|
||||
}
|
||||
}
|
||||
exports.CoreInputs = CoreInputs;
|
||||
|
||||
@@ -42,7 +42,7 @@ export class Action {
|
||||
let getResponse: ReleaseByTagResponse
|
||||
try {
|
||||
getResponse = await this.releases.getByTag(this.inputs.tag)
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
return await this.checkForMissingReleaseError(error)
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export class GithubArtifactUploader implements ArtifactUploader {
|
||||
artifact.readFile(),
|
||||
artifact.name,
|
||||
releaseId)
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (error.status >= 500 && retry > 0) {
|
||||
core.warning(`Failed to upload artifact ${artifact.name}. ${error.message}. Retrying...`)
|
||||
await this.uploadArtifact(artifact, releaseId, uploadUrl, retry - 1)
|
||||
|
||||
Reference in New Issue
Block a user