Skip to content

Commit

Permalink
Support .vsix
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Aug 29, 2024
1 parent 3bd833c commit 6924fcb
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ export const getArtifactForWorkflowRun = async ({

const files = zip.files;
const fileNames = Object.keys(files);
const tgzFileName = fileNames.find((fileName) => fileName.endsWith(".tgz"));
if (tgzFileName === undefined) {
const downloadableFileName = fileNames.find(
(fileName) => fileName.endsWith(".tgz") || fileName.endsWith(".vsix")
);
if (downloadableFileName === undefined) {
return Response.json({ fileNames }, { status: 404 });
}

const tgzBlob = await files[tgzFileName].async("blob");
const response = new Response(tgzBlob, {
const downloadableBlob = await files[downloadableFileName].async("blob");
const response = new Response(downloadableBlob, {
headers: { "Cache-Control": `public, s-maxage=${ONE_WEEK}` },
});

Expand Down

0 comments on commit 6924fcb

Please sign in to comment.