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: getPath with carScope #8

Merged
merged 11 commits into from
May 1, 2023
Merged

feat: getPath with carScope #8

merged 11 commits into from
May 1, 2023

Commits on Apr 17, 2023

  1. feat: getPath with carScope

    add getPath method as a generator that returns blocks for the targeted dag and all blocks traversed while resolving a cid+path string
    
    supports carScope to specify what blocks to return for the resolved dag
    - 'all': return the entire dag starting at path. (default)
    - 'block': return the block identified by the path.
    - 'file': Mimic gateway semantics: Return All blocks for a multi-block file or just enough blocks to enumerate a dir/map but not the dir contents.
    
    see: storacha/freeway#33
    see: storacha/freeway#34
    
    TODO:
    - [] find out how to identify the boundaries of a unixfs hamt (unixfs-exported seems to define it as "not having an empty or null Link.Name after the first 2 chars are stripped, which seems risky... what happens if the actual dir listing has 2 char long link names? see: https://github.com/ipfs/js-ipfs-unixfs/blob/e853049bd63d6773442e1540ae49b6a443ca8672/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts#L20-L42
    
    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    6235baf View commit details
    Browse the repository at this point in the history
  2. chore: fix doc

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    b7898ee View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. chore: simplify tests

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    3b75841 View commit details
    Browse the repository at this point in the history
  2. chore: always use encode. remove uint8arrays dep

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    2efdcf9 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. feat: car-scope for hamt-sharded-directory

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    59c666b View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. chore: add test for hamt-sharded-dir

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    3acbe11 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    cdd530d View commit details
    Browse the repository at this point in the history
  2. chore: fix hamt traversal

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    2769c69 View commit details
    Browse the repository at this point in the history
  3. chore: lint

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    e942e82 View commit details
    Browse the repository at this point in the history
  4. chore: typos

    License: MIT
    Signed-off-by: Oli Evans <oli@protocol.ai>
    olizilla committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    4aed254 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. Apply suggestions from code review

    Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
    olizilla and Alan Shaw authored May 1, 2023
    Configuration menu
    Copy the full SHA
    26f019a View commit details
    Browse the repository at this point in the history