Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace HTTPS with HTTP protocol for butler download URL #213

Merged
merged 1 commit into from
Dec 16, 2024
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
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions src/__snapshots__/utils.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ exports[`getBinaryPath when platform is "linux" returns CLI path 1`] = `"directo

exports[`getBinaryPath when platform is "win32" returns CLI path 1`] = `"directory/name.exe"`;

exports[`getDownloadUrl when platform is "darwin" and arch is "arm" returns download object 1`] = `"https://broth.itch.ovh/butler/darwin-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "darwin" and arch is "arm" returns download object 1`] = `"http://broth.itch.ovh/butler/darwin-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "darwin" and arch is "arm64" returns download object 1`] = `"https://broth.itch.ovh/butler/darwin-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "darwin" and arch is "arm64" returns download object 1`] = `"http://broth.itch.ovh/butler/darwin-amd64/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "darwin" and arch is "x32" returns download object 1`] = `"https://broth.itch.ovh/butler/darwin-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "darwin" and arch is "x32" returns download object 1`] = `"http://broth.itch.ovh/butler/darwin-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "darwin" and arch is "x64" returns download object 1`] = `"https://broth.itch.ovh/butler/darwin-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "darwin" and arch is "x64" returns download object 1`] = `"http://broth.itch.ovh/butler/darwin-amd64/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "linux" and arch is "arm" returns download object 1`] = `"https://broth.itch.ovh/butler/linux-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "linux" and arch is "arm" returns download object 1`] = `"http://broth.itch.ovh/butler/linux-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "linux" and arch is "arm64" returns download object 1`] = `"https://broth.itch.ovh/butler/linux-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "linux" and arch is "arm64" returns download object 1`] = `"http://broth.itch.ovh/butler/linux-amd64/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "linux" and arch is "x32" returns download object 1`] = `"https://broth.itch.ovh/butler/linux-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "linux" and arch is "x32" returns download object 1`] = `"http://broth.itch.ovh/butler/linux-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "linux" and arch is "x64" returns download object 1`] = `"https://broth.itch.ovh/butler/linux-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "linux" and arch is "x64" returns download object 1`] = `"http://broth.itch.ovh/butler/linux-amd64/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "win32" and arch is "arm" returns download object 1`] = `"https://broth.itch.ovh/butler/windows-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "win32" and arch is "arm" returns download object 1`] = `"http://broth.itch.ovh/butler/windows-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "win32" and arch is "arm64" returns download object 1`] = `"https://broth.itch.ovh/butler/windows-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "win32" and arch is "arm64" returns download object 1`] = `"http://broth.itch.ovh/butler/windows-amd64/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "win32" and arch is "x32" returns download object 1`] = `"https://broth.itch.ovh/butler/windows-386/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "win32" and arch is "x32" returns download object 1`] = `"http://broth.itch.ovh/butler/windows-386/1.2.3/archive/default"`;

exports[`getDownloadUrl when platform is "win32" and arch is "x64" returns download object 1`] = `"https://broth.itch.ovh/butler/windows-amd64/1.2.3/archive/default"`;
exports[`getDownloadUrl when platform is "win32" and arch is "x64" returns download object 1`] = `"http://broth.itch.ovh/butler/windows-amd64/1.2.3/archive/default"`;
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe.each(platforms)('platform is %p', (platform) => {
expect(mockedTc.downloadTool).toHaveBeenCalledWith(
expect.stringMatching(
new RegExp(
`https://broth.itch.ovh/butler/[a-zA-Z0-9-]+/${version}/archive/default`,
`http://broth.itch.ovh/butler/[a-zA-Z0-9-]+/${version}/archive/default`,
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function getPlatform() {
* @returns - Download URL
*/
export function getDownloadUrl(version: string) {
return `https://broth.itch.ovh/butler/${getPlatform()}-${getArch()}/${version}/archive/default`;
return `http://broth.itch.ovh/butler/${getPlatform()}-${getArch()}/${version}/archive/default`;
}

/**
Expand Down
Loading