Skip to content

Instantly share code, notes, and snippets.

@SgtPooki
Created April 16, 2025 17:18
Show Gist options
  • Save SgtPooki/05669a90dcc4b5be2dceea1bd27ab2b6 to your computer and use it in GitHub Desktop.
Save SgtPooki/05669a90dcc4b5be2dceea1bd27ab2b6 to your computer and use it in GitHub Desktop.
helia verified fetch confirmation

please note the ordering of "helia:verified-fetch:trace Invoking plugin:"

> DEBUG="helia*,helia*:trace" npm run test -- -g 'should return html directory listing if index file is not found and dir-index-html plugin is used'
> @helia/[email protected] test
> aegir test -g should return html directory listing if index file is not found and dir-index-html plugin is used
build
> @helia/[email protected] build
> aegir build
[12:17:12] tsc [started]
[12:17:14] tsc [completed]
[12:17:14] esbuild [started]
[12:17:14] esbuild [completed]
test node.js
Warning: Cannot find any files matching pattern "test/node.{js,cjs,mjs}"
Warning: Cannot find any files matching pattern "test/**/*.spec.{js,cjs,mjs}"
Warning: Cannot find any files matching pattern "dist/test/node.{js,cjs,mjs}"
@helia/verifed-fetch
implicit format
helia:verified-fetch:trace created VerifiedFetch instance +0ms
helia:verified-fetch:trace created VerifiedFetch instance +0ms
helia:unixfs:stat stat bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch fetch bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch:get-resolved-accept-header no explicit IPLD content-type requested, returning incoming accept header undefined +0ms
helia:verified-fetch output type undefined +0ms
helia:verified-fetch:trace finding handler for cid code "112" and response content type "application/octet-stream" +5ms
helia:verified-fetch Starting pipeline pass #1 +0ms
helia:verified-fetch:dag-walk-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:ipns-record-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:car-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:raw-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:tar-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:json-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-cbor-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-pb-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:trace Plugins ready to handle request: DagWalkPlugin +1ms
helia:verified-fetch:trace Invoking plugin: DagWalkPlugin +0ms
helia:verified-fetch Starting pipeline pass #2 +1ms
helia:verified-fetch:ipns-record-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:car-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:raw-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:tar-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:json-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-cbor-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-pb-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:trace Plugins ready to handle request: DagPbPlugin, DirIndexHtmlPlugin +0ms
helia:verified-fetch:trace Invoking plugin: DagPbPlugin +0ms
helia:verified-fetch:helia:verified-fetch:byte-range-context:trace no range request detected +0ms
helia:verified-fetch:dag-pb-plugin:trace directory url normalization spec requires redirect... +0ms
helia:verified-fetch:dag-pb-plugin following redirect to bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/ +1ms
helia:verified-fetch:dag-pb-plugin:trace found directory at bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/, looking for index.html +0ms
helia:verified-fetch:dag-pb-plugin:error error loading path bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/index.html NotFoundError: file does not exist
at unixFsResolver (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.ts:67:13)
at walkPath (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/index.ts:396:20)
at file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/it-last/src/index.ts:49:24
at exporter (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/index.ts:443:18)
at DagPbPlugin.handle (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/plugins/plugin-handle-dag-pb.ts:93:23)
at VerifiedFetch.runPluginPipeline (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/verified-fetch.ts:243:33)
at VerifiedFetch.fetch (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/verified-fetch.ts:342:22)
at Context.<anonymous> (file:///Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/test/verified-fetch.spec.ts:369:20) {
code: 'ERR_NOT_FOUND'
} +0ms
helia:verified-fetch:dag-pb-plugin:trace attempting to get directory entries because index.html was not found +13ms
helia:verified-fetch:trace Invoking plugin: DirIndexHtmlPlugin +16ms
helia:verified-fetch:dir-index-html-plugin loading directory html for bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch:trace checking for content disposition +0ms
helia:verified-fetch:trace download not requested +0ms
helia:verified-fetch:trace no filename specified in query +0ms
helia:verified-fetch:trace no content disposition specified +0ms
✔ should return html directory listing if index file is not found and dir-index-html plugin is used
1 passing (30ms)
test browser
ℹ Browser "chromium" setup complete.
@helia/verifed-fetch
implicit format
helia:verified-fetch:trace created VerifiedFetch instance +0ms
helia:verified-fetch:trace created VerifiedFetch instance +0ms
helia:unixfs:stat stat bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch fetch bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch:get-resolved-accept-header no explicit IPLD content-type requested, returning incoming accept header undefined +0ms
helia:verified-fetch output type undefined +0ms
helia:verified-fetch:trace finding handler for cid code "112" and response content type "application/octet-stream" +4ms
helia:verified-fetch Starting pipeline pass #1 +1ms
helia:verified-fetch:dag-walk-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:ipns-record-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:car-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:raw-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:tar-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:json-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-cbor-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:dag-pb-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +0ms
helia:verified-fetch:trace Plugins ready to handle request: +0ms DagWalkPlugin
helia:verified-fetch:trace Invoking plugin: +0ms DagWalkPlugin
helia:verified-fetch Starting pipeline pass #2 +1ms
helia:verified-fetch:ipns-record-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:car-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:raw-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:tar-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:json-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:dag-cbor-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:dag-pb-plugin checking if we can handle bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 with accept undefined +1ms
helia:verified-fetch:trace Plugins ready to handle request: +1ms DagPbPlugin, DirIndexHtmlPlugin
helia:verified-fetch:trace Invoking plugin: +0ms DagPbPlugin
helia:verified-fetch:helia:verified-fetch:byte-range-context:trace no range request detected +0ms
helia:verified-fetch:dag-pb-plugin:trace directory url normalization spec requires redirect... +0ms
helia:verified-fetch:dag-pb-plugin following redirect to bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/ +1ms
helia:verified-fetch:dag-pb-plugin:trace found directory at bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/, looking for index.html +0ms
helia:verified-fetch:dag-pb-plugin:trace attempting to get directory entries because index.html was not found +639ms
helia:verified-fetch:trace Invoking plugin: +642ms DirIndexHtmlPlugin
helia:verified-fetch:dir-index-html-plugin loading directory html for bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4 +0ms
helia:verified-fetch:trace checking for content disposition +0ms
helia:verified-fetch:trace download not requested +0ms
helia:verified-fetch:trace no filename specified in query +0ms
helia:verified-fetch:trace no content disposition specified +0ms
helia:verified-fetch:dag-pb-plugin:error error loading path bafybeicz5phtulumgh5wwqavvt6jkmhtc4dfmviawrtvzaocwqwwxbbqk4/index.html +0ms Error [NotFoundError]: file does not exist
at unixFsResolver (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.ts:67:13)
at walkPath (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/index.ts:396:20)
at /Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/it-last/src/index.ts:49:24
at exporter (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/node_modules/ipfs-unixfs-exporter/src/index.ts:443:18)
at DagPbPlugin.handle (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/plugins/plugin-handle-dag-pb.ts:93:23)
at VerifiedFetch.runPluginPipeline (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/verified-fetch.ts:243:33)
at VerifiedFetch.fetch (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/src/verified-fetch.ts:342:22)
at Context2.<anonymous> (/Users/sgtpooki/code/work/ipshipyard/ipfs/helia-verified-fetch/packages/verified-fetch/test/verified-fetch.spec.ts:369:20)
✅ should return html directory listing if index file is not found and dir-index-html plugin is used (666ms)
1 passing (679ms)
✔ Tests passed.
test webworker
ℹ Browser "chromium" setup complete.
@helia/verifed-fetch
implicit format
✅ should return html directory listing if index file is not found and dir-index-html plugin is used
1 passing (18ms)
✔ Tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment