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

feat: dir index html listing #86

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bb50c3e
feat: resolve IPFS_NS_MAP with @multiformats/dns
SgtPooki May 21, 2024
cb724f4
fix: various fixes to gateway conformance
SgtPooki May 21, 2024
b3019ad
fix: gateway-conformance expects 301 to path
SgtPooki May 21, 2024
38839ed
fix: gateway conformance subdomain handling
SgtPooki May 21, 2024
95fff64
fix: more testgatewaysubdomain passing tests
SgtPooki May 21, 2024
bce2239
fix: more testgatewaysubdomain passing tests
SgtPooki May 21, 2024
1b96aa2
fix: some redirect and url parsing
SgtPooki May 22, 2024
cd9db44
test: make sure test constructs proper unixfs data
SgtPooki May 22, 2024
b329b2d
fix: more gwc improvements for testgatewaysubdomains
SgtPooki May 22, 2024
ba5f6a0
test: some adjustments of default tests enabled
SgtPooki May 22, 2024
58d6835
test: adjust total success expectation
SgtPooki May 22, 2024
e3c11bd
test: update latest sucess rates
SgtPooki May 22, 2024
ddd6900
test: update 'all' test success rate and remove reverse proxy
SgtPooki May 22, 2024
39ceb6d
fix: pass datastore and blockstore to helia instance
SgtPooki May 22, 2024
93c1ca5
chore: lint fix and header types
SgtPooki May 22, 2024
8307ec0
deps: update deps
SgtPooki May 22, 2024
d017874
Merge branch 'main' into 84-fix-infinite-querying-bug-reproducible-on…
SgtPooki May 22, 2024
03ac442
chore: modify log prefixes slightly
SgtPooki May 23, 2024
3abd960
chore: cleanup and re-enable tests not timing out
SgtPooki May 23, 2024
d2dbb62
fix: pull out fetch->nodejs header logic
SgtPooki May 23, 2024
a5c2e83
chore: apply suggestions from code review
SgtPooki May 23, 2024
d5c44df
chore: lint fix after gh pr suggestions
SgtPooki May 23, 2024
cc6f4c9
feat: basic dir-index-html implementation
SgtPooki May 23, 2024
406817f
fix: dir-index-html initial link clicking
SgtPooki May 23, 2024
2154715
chore: pr suggestion code comment
SgtPooki May 24, 2024
492da12
test: add handle-redirects tests
SgtPooki May 24, 2024
b2ef0d6
Revert "test: add handle-redirects tests"
SgtPooki May 24, 2024
4302dd7
Merge branch 'main' into feat/dir-index-html
SgtPooki May 24, 2024
156d5dc
Merge branch 'main' into feat/dir-index-html
SgtPooki Nov 4, 2024
9d792dd
chore: fix lint failure
SgtPooki Nov 4, 2024
4fd9c02
chore: adjust dir listing conformance test
SgtPooki Nov 4, 2024
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
18 changes: 13 additions & 5 deletions packages/gateway-conformance/src/conformance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ const tests: TestConfig[] = [
name: 'TestUnixFSDirectoryListing',
run: ['TestUnixFSDirectoryListing'],
skip: [
'TestUnixFSDirectoryListingOnSubdomainGateway',
'TestUnixFSDirectoryListing/.*TODO:_cleanup_Kubo-specifics'
'TestUnixFSDirectoryListingOnSubdomainGateway'
// 'TestUnixFSDirectoryListing/.*TODO:_cleanup_Kubo-specifics'
],
successRate: 50
successRate: 27.27
},
{
name: 'TestTar',
Expand Down Expand Up @@ -355,7 +355,11 @@ describe('@helia/verified-fetch - gateway conformance', function () {
...((skip != null) ? ['-skip', `${skip.join('|')}`] : []),
...((run != null) ? ['-run', `${run.join('|')}`] : [])
]
), { reject: false, cancelSignal: timeout != null ? AbortSignal.timeout(timeout) : undefined })
), {
reject: false,
// fallback to cancel process if it hangs. Mocha timing out doesn't always kill execa execution of gateway-conformance
cancelSignal: timeout != null ? AbortSignal.timeout(timeout) : undefined
})

log(stdout)
log.error(stderr)
Expand All @@ -374,7 +378,11 @@ describe('@helia/verified-fetch - gateway conformance', function () {
this.timeout(200000)
const log = logger.forComponent('output:all')

const { stderr, stdout } = await execa(binaryPath, getConformanceTestArgs('all', [], []), { reject: false, cancelSignal: AbortSignal.timeout(200000) })
const { stderr, stdout } = await execa(binaryPath, getConformanceTestArgs('all', [], []), {
reject: false,
// fallback to cancel process if it hangs. Mocha timing out doesn't always kill execa execution of gateway-conformance
cancelSignal: AbortSignal.timeout(200000)
})

log(stdout)
log.error(stderr)
Expand Down
4 changes: 3 additions & 1 deletion packages/interop/src/unixfs-dir.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ describe('@helia/verified-fetch - unixfs directory', () => {
allowInsecure: true
})
expect(resp).to.be.ok()
expect(resp.status).to.equal(501) // TODO: we should do a directory listing instead
expect(resp.status).to.equal(200)
expect(resp.headers.get('content-type')).to.equal('text/html')
expect(await resp.text()).to.contain('A directory of content-addressed files hosted on IPFS.')
})

it('can return a string for unixfs pathed data', async () => {
Expand Down
Loading
Loading