Skip to content

Commit b59b440

Browse files
dependabot[bot]achingbrainSgtPooki
authored
deps(dev): bump aegir from 45.2.0 to 47.0.6 (#725)
* deps(dev): bump aegir from 45.2.0 to 47.0.6 Bumps [aegir](https://github.com/ipfs/aegir) from 45.2.0 to 47.0.6. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/main/CHANGELOG.md) - [Commits](ipfs/aegir@v45.2.0...v47.0.6) --- updated-dependencies: - dependency-name: aegir dependency-version: 47.0.6 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: lockfile * deps: update aegir to the latest * chore: eslint fixes * chore: fix typescript errors --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]> Co-authored-by: Russell Dempsey <[email protected]>
1 parent 66d3298 commit b59b440

40 files changed

+3815
-3749
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@babel/preset-typescript": "^7.26.0",
8787
"@playwright/test": "^1.48.2",
8888
"@types/react": "^19.0.1",
89-
"aegir": "^45.1.3",
89+
"aegir": "^47.0.11",
9090
"concurrently": "^9.1.2",
9191
"cross-env": "^7.0.3",
9292
"esbuild": "^0.25.2",

src/components/About.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import React, { type ReactElement } from 'react'
1+
import React from 'react'
2+
import type { ReactElement } from 'react'
23

34
export default function About (): ReactElement {
45
return (
5-
<aside className='mw7 lb-snow center w-100 lh-copy pa2 e2e-section-about'>
6-
<h1 className='pa0 f3 ma0 mb4 teal tc'>About the IPFS Gateway and Service Worker</h1>
7-
<p>This page runs an IPFS gateway within a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" target="_blank">Service Worker</a>. It uses <a href="https://github.com/ipfs/helia" target="_blank">Helia</a> (IPFS implementation in JS) and the <a href="https://github.com/ipfs/helia-verified-fetch" target="_blank">@helia/verified-fetch</a> library (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API" target="_blank">Fetch API</a> for IPFS) to facilitate direct verified retrieval of <a href="https://docs.ipfs.tech/concepts/content-addressing/" target="_blank">content-addressed</a> data.</p>
8-
<p><strong>Why?</strong> It improves decentralization, offers enhanced security (CID verification happens on end user's machine) and reliability (ability to do retrieval from multiple sources without reliance on a single HTTP server).</p>
9-
<p><strong>How does it work?</strong> A Service Worker is registered on the initial page load, and then intercepts HTTP requests for content stored on <a href="https://docs.ipfs.tech/how-to/address-ipfs-on-web/" target="_blank">IPFS paths</a> such as <code>/ipfs/*</code> (immutable) and <code>/ipns/*</code> (mutable), takes care of IPFS retrieval, verification, UnixFS deserialization, and returns Response objects to the browser.</p>
10-
<p><strong>Is this production ready?</strong> This project is under heavy development and is not yet fully compliant with <a href="https://specs.ipfs.tech/http-gateways/" target="_blank">IPFS Gateway Specfications</a>. Track our efforts <a href="https://github.com/ipfs/service-worker-gateway/milestones" target="_blank">here</a>.</p>
11-
<p><strong>Found a bug?</strong> We welcome you to report it by <a href="https://github.com/ipfs/service-worker-gateway/issues/new" target="_blank">opening an issue</a> with details like an address and a screenshot.</p>
12-
</aside>
6+
<aside className='mw7 lb-snow center w-100 lh-copy pa2 e2e-section-about'>
7+
<h1 className='pa0 f3 ma0 mb4 teal tc'>About the IPFS Gateway and Service Worker</h1>
8+
<p>This page runs an IPFS gateway within a <a href='https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API' target='_blank' rel='noreferrer'>Service Worker</a>. It uses <a href='https://github.com/ipfs/helia' target='_blank' rel='noreferrer'>Helia</a> (IPFS implementation in JS) and the <a href='https://github.com/ipfs/helia-verified-fetch' target='_blank' rel='noreferrer'>@helia/verified-fetch</a> library (<a href='https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API' target='_blank' rel='noreferrer'>Fetch API</a> for IPFS) to facilitate direct verified retrieval of <a href='https://docs.ipfs.tech/concepts/content-addressing/' target='_blank' rel='noreferrer'>content-addressed</a> data.</p>
9+
<p><strong>Why?</strong> It improves decentralization, offers enhanced security (CID verification happens on end user's machine) and reliability (ability to do retrieval from multiple sources without reliance on a single HTTP server).</p>
10+
<p><strong>How does it work?</strong> A Service Worker is registered on the initial page load, and then intercepts HTTP requests for content stored on <a href='https://docs.ipfs.tech/how-to/address-ipfs-on-web/' target='_blank' rel='noreferrer'>IPFS paths</a> such as <code>/ipfs/*</code> (immutable) and <code>/ipns/*</code> (mutable), takes care of IPFS retrieval, verification, UnixFS deserialization, and returns Response objects to the browser.</p>
11+
<p><strong>Is this production ready?</strong> This project is under heavy development and is not yet fully compliant with <a href='https://specs.ipfs.tech/http-gateways/' target='_blank' rel='noreferrer'>IPFS Gateway Specfications</a>. Track our efforts <a href='https://github.com/ipfs/service-worker-gateway/milestones' target='_blank' rel='noreferrer'>here</a>.</p>
12+
<p><strong>Found a bug?</strong> We welcome you to report it by <a href='https://github.com/ipfs/service-worker-gateway/issues/new' target='_blank' rel='noreferrer'>opening an issue</a> with details like an address and a screenshot.</p>
13+
</aside>
1314
)
1415
}

src/components/Form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { type ReactElement } from 'react'
1+
import React from 'react'
2+
import type { ReactElement } from 'react'
23

34
export default ({ handleSubmit, requestPath, setRequestPath }): ReactElement => (
45
<form id='add-file' onSubmit={handleSubmit}>

src/components/Header.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React, { type FunctionComponent } from 'react'
1+
import React from 'react'
22
import ipfsLogo from '../ipfs-logo.svg'
3+
import type { FunctionComponent } from 'react'
34

45
export interface HeaderProps extends React.HTMLProps<HTMLElement> {
56

@@ -9,12 +10,12 @@ export const Header: FunctionComponent<HeaderProps> = () => {
910
return (
1011
<header className='e2e-header flex items-center pa2 bg-navy bb bw3 b--aqua tc justify-between'>
1112
<div>
12-
<a href='https://ipfs.tech' title='IPFS Project' target="_blank" rel="noopener noreferrer" aria-label="Open IPFS Project's website">
13-
<img alt='IPFS logo' src={ipfsLogo} style={{ height: 50 }} className='v-top' />
13+
<a href='https://ipfs.tech' title='IPFS Project' target='_blank' rel='noopener noreferrer' aria-label="Open IPFS Project's website">
14+
<img alt='IPFS logo' src={ipfsLogo} style={{ height: 50 }} className='v-top' />
1415
</a>
1516
</div>
1617
<div className='pb1 ma0 inline-flex items-center'>
17-
<h1 className='e2e-header-title f3 fw2 aqua ttu sans-serif'>Service Worker Gateway <small className="gray">(beta)</small></h1>
18+
<h1 className='e2e-header-title f3 fw2 aqua ttu sans-serif'>Service Worker Gateway <small className='gray'>(beta)</small></h1>
1819
</div>
1920
</header>
2021
)

src/components/collapsible.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { useState, type ReactElement } from 'react'
1+
import React, { useState } from 'react'
2+
import type { ReactElement } from 'react'
23

34
export interface CollapsibleProps {
45
children: React.ReactNode
@@ -12,12 +13,12 @@ export function Collapsible ({ children, collapsedLabel, expandedLabel, collapse
1213
const [isCollapsed, setCollapsed] = useState(collapsed)
1314

1415
return (
15-
<React.Fragment>
16-
<input type="checkbox" className="dn" name="collapsible" id={`collapsible-${cId}`} onClick={() => { setCollapsed(!isCollapsed) }} />
17-
<label htmlFor={`collapsible-${cId}`} className="e2e-collapsible-button collapsible__item-label db pv3 link black hover-blue pointer blue">{isCollapsed ? collapsedLabel : expandedLabel}</label>
16+
<>
17+
<input type='checkbox' className='dn' name='collapsible' id={`collapsible-${cId}`} onClick={() => { setCollapsed(!isCollapsed) }} />
18+
<label htmlFor={`collapsible-${cId}`} className='e2e-collapsible-button collapsible__item-label db pv3 link black hover-blue pointer blue'>{isCollapsed ? collapsedLabel : expandedLabel}</label>
1819
<div className={`${isCollapsed ? 'dn' : ''}`}>
1920
{children}
2021
</div>
21-
</React.Fragment>
22+
</>
2223
)
2324
}

src/components/input-description.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export const InputDescription: React.FC<{ description?: string }> = ({ descripti
55
return null
66
}
77

8-
return (<span className="charcoal f6 fw1 db pt1 lh-copy mb2">{description}</span>)
8+
return (<span className='charcoal f6 fw1 db pt1 lh-copy mb2'>{description}</span>)
99
}

src/components/input-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22

33
export const InputSection: React.FC<{ label: string, children: React.ReactNode[] }> = ({ label, children }) => {
44
return (
5-
<div className="bl bw2 br2 b--teal-muted pl3 mb3">
5+
<div className='bl bw2 br2 b--teal-muted pl3 mb3'>
66
<span className='f3 ma0 teal fw4 db'>{label}</span>
77
{children}
88
</div>

src/components/input-toggle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export const InputToggle: React.FC<LocalStorageToggleProps> = ({
4848
<InputDescription description={description} />
4949

5050
<input
51-
type="checkbox"
51+
type='checkbox'
5252
id={id}
5353
checked={internalValue}
5454
onChange={handleChange}
55-
className="dn"
55+
className='dn'
5656
/>
5757
<label
5858
htmlFor={id}

src/components/input-validator.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { CID } from 'multiformats/cid'
2-
import React, { type ReactElement } from 'react'
3-
import { nativeProtocolRegex, pathRegex, subdomainRegex, type IpfsUriParts } from '../lib/regex.js'
2+
import React from 'react'
3+
import { nativeProtocolRegex, pathRegex, subdomainRegex } from '../lib/regex.js'
4+
import type { IpfsUriParts } from '../lib/regex.js'
5+
import type { ReactElement } from 'react'
46

57
function FormatHelp (): ReactElement {
68
return (
@@ -10,27 +12,27 @@ function FormatHelp (): ReactElement {
1012
<tbody>
1113
<tr>
1214
<td>UNIX-like Content Path</td>
13-
<td><pre className="di pl3">/ipfs/cid/..</pre></td>
15+
<td><pre className='di pl3'>/ipfs/cid/..</pre></td>
1416
</tr>
1517
<tr>
1618
<td>HTTP Gateway URL</td>
17-
<td><pre className="di pl3">https://ipfs.io/ipfs/cid..</pre></td>
19+
<td><pre className='di pl3'>https://ipfs.io/ipfs/cid..</pre></td>
1820
</tr>
1921
<tr>
2022
<td>Native IPFS URL</td>
21-
<td><pre className="di pl3">ipfs://cid/..</pre></td>
23+
<td><pre className='di pl3'>ipfs://cid/..</pre></td>
2224
</tr>
2325
</tbody>
2426
</table>
25-
<p>Learn more at <a target="_blank" href="https://docs.ipfs.tech/how-to/address-ipfs-on-web">Addressing IPFS on the Web</a></p>
27+
<p>Learn more at <a target='_blank' href='https://docs.ipfs.tech/how-to/address-ipfs-on-web' rel='noreferrer'>Addressing IPFS on the Web</a></p>
2628
</>
2729
)
2830
}
2931

3032
function ValidationMessage ({ cidOrPeerIdOrDnslink, requestPath, protocol, children }): ReactElement {
3133
let errorElement: ReactElement | null = null
3234
if (requestPath == null || requestPath === '') {
33-
errorElement = <span><big className="f3"></big> Enter a valid IPFS/IPNS content path.</span>
35+
errorElement = <span><big className='f3'></big> Enter a valid IPFS/IPNS content path.</span>
3436
} else if (protocol !== 'ipfs' && protocol !== 'ipns') {
3537
errorElement = <FormatHelp />
3638
} else if (cidOrPeerIdOrDnslink == null || cidOrPeerIdOrDnslink === '') {
@@ -45,14 +47,16 @@ function ValidationMessage ({ cidOrPeerIdOrDnslink, requestPath, protocol, child
4547
}
4648

4749
if (errorElement == null) {
48-
return <>{ children }</>
50+
return <>{children}</>
4951
}
5052

51-
return <>
52-
<span className="pb3 pa3 db bg-light-yellow">
53-
{ errorElement }
54-
</span>
55-
</>
53+
return (
54+
<>
55+
<span className='pb3 pa3 db bg-light-yellow'>
56+
{errorElement}
57+
</span>
58+
</>
59+
)
5660
}
5761

5862
const parseInput = (uri: string): Partial<IpfsUriParts> => {
@@ -80,8 +84,8 @@ export default function InputValidator ({ requestPath }: { requestPath: string }
8084
return (
8185
<div>
8286
<ValidationMessage protocol={protocol} cidOrPeerIdOrDnslink={cidOrPeerIdOrDnslink} requestPath={requestPath}>
83-
<a className="db" href={swPath}>
84-
<button id="load-directly" className='button-reset pv3 tc bn bg-animate bg-teal-muted hover-bg-navy-muted white pointer f4 w-100'>Load content</button>
87+
<a className='db' href={swPath}>
88+
<button id='load-directly' className='button-reset pv3 tc bn bg-animate bg-teal-muted hover-bg-navy-muted white pointer f4 w-100'>Load content</button>
8589
</a>
8690
</ValidationMessage>
8791
</div>

0 commit comments

Comments
 (0)