Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/spotty-showers-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@nodesecure/conformance": minor
"@nodesecure/github": minor
"@nodesecure/gitlab": minor
---

chore(httpie): move from @myunisoft/httpie to @openally/httpie
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion workspaces/conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://github.com/NodeSecure/tree/master/workspaces/conformance#readme",
"devDependencies": {
"@myunisoft/httpie": "^5.0.1",
"@openally/httpie": "^1.0.0",
"@types/spdx-expression-parse": "^3.0.5",
"node-estree": "^4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion workspaces/conformance/scripts/fetchSpdxLicenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import fs from "node:fs";

// Import Third-party Dependencies
import httpie from "@myunisoft/httpie";
import * as httpie from "@openally/httpie";
import * as astring from "astring";
import { ESTree, Helpers, VarDeclaration } from "node-estree";

Expand Down
2 changes: 1 addition & 1 deletion workspaces/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://github.com/NodeSecure/scanner/tree/master/workspaces/github#readme",
"dependencies": {
"@myunisoft/httpie": "^5.0.0",
"@openally/httpie": "^1.0.0",
"tar-fs": "^3.0.5"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions workspaces/github/src/functions/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import * as path from "node:path";
import { createWriteStream } from "node:fs";

// Import Third-party Dependencies
import httpie from "@myunisoft/httpie";
import * as httpie from "@openally/httpie";

// CONSTANTS
const kGithubURL = new URL("https://github.com/");
const kDefaultBranch = "main";

const agent = new httpie.Agent().compose(httpie.interceptors.redirect({ maxRedirections: 1 }));

export interface DownloadOptions {
/**
* The destination (location) to extract the tar.gz
Expand Down Expand Up @@ -71,7 +73,7 @@ export async function download(
"Accept-Encoding": "gzip, deflate",
Authorization: typeof token === "string" ? `token ${token}` : void 0
},
maxRedirections: 1
agent
});
await writableCallback(() => createWriteStream(location));

Expand Down
2 changes: 1 addition & 1 deletion workspaces/gitlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/NodeSecure/scanner/tree/master/workspaces/gitlab#readme",
"dependencies": {
"@myunisoft/httpie": "^5.0.0",
"@openally/httpie": "^1.0.0",
"tar-fs": "^3.0.6"
},
"devDependencies": {
Expand Down
8 changes: 5 additions & 3 deletions workspaces/gitlab/src/functions/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "node:fs";

// Import Third-party Dependencies
import httpie from "@myunisoft/httpie";
import * as httpie from "@openally/httpie";

// Import Internal Dependencies
import * as utils from "../utils.js";
Expand Down Expand Up @@ -51,6 +51,8 @@ export interface DownloadResult {
branch: string;
}

const agent = new httpie.Agent().compose(httpie.interceptors.redirect({ maxRedirections: 1 }));

export async function download(
repository: string,
options: DownloadOptions = Object.create(null)
Expand All @@ -73,7 +75,7 @@ export async function download(
const repositoryURL = new URL(utils.getRepositoryPath(repository), gitlab);
const { data: gitlabManifest } = await httpie.get<gitlab.Project>(repositoryURL, {
headers,
maxRedirections: 1
agent
});

const wantedBranch = typeof branch === "string" ? branch : gitlabManifest.default_branch;
Expand All @@ -86,7 +88,7 @@ export async function download(
);
const writableCallback = httpie.stream("GET", archiveURL, {
headers: { ...headers, "Accept-Encoding": "gzip, deflate" },
maxRedirections: 1
agent
});
await writableCallback(() => createWriteStream(location));

Expand Down