Skip to content

Commit f7244d2

Browse files
authored
Merge pull request #442 from shapehq/develop
Deploy to production
2 parents a1ee57c + 7f13873 commit f7244d2

File tree

5 files changed

+97
-72
lines changed

5 files changed

+97
-72
lines changed

package-lock.json

Lines changed: 68 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@fortawesome/react-fontawesome": "^0.2.2",
2626
"@mui/icons-material": "^6.1.6",
2727
"@mui/material": "^6.0.1",
28-
"@octokit/auth-app": "^7.1.1",
28+
"@octokit/auth-app": "^7.1.2",
2929
"@octokit/core": "^6.1.2",
3030
"@octokit/webhooks": "^13.3.0",
3131
"@stoplight/elements": "^8.4.5",
@@ -43,7 +43,7 @@
4343
"react": "^18.3.1",
4444
"react-dom": "^18.3.1",
4545
"redis-semaphore": "^5.6.0",
46-
"redoc": "^2.1.5",
46+
"redoc": "^2.2.0",
4747
"sharp": "^0.33.5",
4848
"styled-components": "^6.1.13",
4949
"swagger-ui-react": "^5.17.14",
@@ -55,14 +55,14 @@
5555
"devDependencies": {
5656
"@auth/pg-adapter": "^1.7.2",
5757
"@types/jest": "^29.5.12",
58-
"@types/node": "^22.8.7",
58+
"@types/node": "^22.9.0",
5959
"@types/nprogress": "^0.2.3",
6060
"@types/pg": "^8.11.10",
6161
"@types/react": "^18.3.12",
6262
"@types/react-dom": "^18.3.0",
6363
"@types/swagger-ui-react": "^4.18.3",
64-
"@typescript-eslint/eslint-plugin": "^8.12.2",
65-
"@typescript-eslint/parser": "^8.12.2",
64+
"@typescript-eslint/eslint-plugin": "^8.13.0",
65+
"@typescript-eslint/parser": "^8.13.0",
6666
"autoprefixer": "^10.4.20",
6767
"eslint": "^8.57.1",
6868
"eslint-config-next": "^14.2.14",

src/app/api/proxy/route.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,20 @@ async function downloadFile(params: {
5555
const { url, maxBytes, timeoutInSeconds } = params
5656
const abortController = new AbortController()
5757
const timeoutSignal = AbortSignal.timeout(timeoutInSeconds * 1000)
58-
const response = await fetch(url, {
58+
const headers: {[key: string]: string} = {}
59+
// Extract basic auth from URL and construct an Authorization header instead.
60+
if ((url.username && url.username.length > 0) || (url.password && url.password.length > 0)) {
61+
const username = decodeURIComponent(url.username)
62+
const password = decodeURIComponent(url.password)
63+
headers["Authorization"] = "Basic " + btoa(`${username}:${password}`)
64+
}
65+
// Make sure basic auth is removed from URL.
66+
const urlWithoutAuth = url
67+
urlWithoutAuth.username = ""
68+
urlWithoutAuth.password = ""
69+
const response = await fetch(urlWithoutAuth, {
70+
method: "GET",
71+
headers,
5972
signal: AbortSignal.any([abortController.signal, timeoutSignal])
6073
})
6174
if (!response.body) {

src/features/sidebar/view/internal/primary/Container.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const PrimaryContainer = ({
1717
}) => {
1818
return (
1919
<>
20-
<_PrimaryContainer
20+
<InnerPrimaryContainer
2121
variant="temporary"
2222
width={width}
2323
isOpen={isOpen}
@@ -26,23 +26,23 @@ const PrimaryContainer = ({
2626
sx={{ display: { xs: "block", sm: "none" } }}
2727
>
2828
{children}
29-
</_PrimaryContainer>
30-
<_PrimaryContainer
29+
</InnerPrimaryContainer>
30+
<InnerPrimaryContainer
3131
variant="persistent"
3232
width={width}
3333
isOpen={isOpen}
3434
keepMounted={false}
3535
sx={{ display: { xs: "none", sm: "block" } }}
3636
>
3737
{children}
38-
</_PrimaryContainer>
38+
</InnerPrimaryContainer>
3939
</>
4040
)
4141
}
4242

4343
export default PrimaryContainer
4444

45-
const _PrimaryContainer = ({
45+
const InnerPrimaryContainer = ({
4646
variant,
4747
width,
4848
isOpen,

src/features/sidebar/view/internal/secondary/Container.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ const SecondaryContainer = ({
1717
const sx = { overflow: "hidden" }
1818
return (
1919
<>
20-
<_SecondaryContainer
20+
<InnerSecondaryContainer
21+
2122
sidebarWidth={isSM ? sidebarWidth : 0}
2223
isSidebarOpen={isSM ? offsetContent: false}
2324
sx={{ ...sx }}
2425
>
2526
{children}
26-
</_SecondaryContainer>
27+
</InnerSecondaryContainer
28+
>
2729
</>
2830
)
2931
}
@@ -52,7 +54,7 @@ const WrapperStack = styled(Stack, {
5254
})
5355
}))
5456

55-
const _SecondaryContainer = ({
57+
const InnerSecondaryContainer = ({
5658
sidebarWidth,
5759
isSidebarOpen,
5860
children,

0 commit comments

Comments
 (0)