Skip to content

Commit

Permalink
Merge pull request #28 from storacha/build-in-ci
Browse files Browse the repository at this point in the history
build: Actually run the build in CI
  • Loading branch information
Peeja authored Dec 3, 2024
2 parents 9d1f534 + a96fc06 commit 7bf45b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Test
run: pnpm test
6 changes: 4 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export interface ByteRange {
length: number
}

type FetchError = NotFound | Aborted | NetworkError | QueryError

export interface Locator {
/** Retrieves the location of a blob of content. */
locate (digest: MultihashDigest, options?: LocateOptions): Promise<Result<Location, NotFound|Aborted|NetworkError|QueryError>>
locate (digest: MultihashDigest, options?: LocateOptions): Promise<Result<Location, FetchError>>
/**
* Returns a similar locator which only locates content belonging to the given
* Spaces.
Expand All @@ -59,7 +61,7 @@ export interface Locator {

export interface Fetcher {
/** Fetches the bytes that correspond to the passed multihash digest. */
fetch (digest: MultihashDigest, options?: FetchOptions): Promise<Result<Blob, NotFound|Aborted|NetworkError>>
fetch (digest: MultihashDigest, options?: FetchOptions): Promise<Result<Blob, FetchError>>
}

export interface NotFound extends Failure {
Expand Down

0 comments on commit 7bf45b0

Please sign in to comment.