fix: move NO_PORTALS_ERROR to types and re-import
This commit is contained in:
parent
623bbf3235
commit
2c6b8438e1
|
@ -6,8 +6,7 @@ import {
|
||||||
} from "binconv";
|
} from "binconv";
|
||||||
import { equalBytes } from "@noble/curves/abstract/utils";
|
import { equalBytes } from "@noble/curves/abstract/utils";
|
||||||
import { blake3 } from "@noble/hashes/blake3";
|
import { blake3 } from "@noble/hashes/blake3";
|
||||||
|
import { NO_PORTALS_ERROR } from "#types.js";
|
||||||
const NO_PORTALS_ERROR = new Error("no active portals");
|
|
||||||
|
|
||||||
export async function downloadObject(cid: string): Promise<ReadableStream> {
|
export async function downloadObject(cid: string): Promise<ReadableStream> {
|
||||||
const activePortals = getActivePortals();
|
const activePortals = getActivePortals();
|
||||||
|
|
|
@ -3,4 +3,7 @@ interface Portal {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
export { Portal };
|
|
||||||
|
const NO_PORTALS_ERROR = new Error("no active portals");
|
||||||
|
|
||||||
|
export { Portal, NO_PORTALS_ERROR };
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { ErrTuple } from "#types.js";
|
import { ErrTuple, NO_PORTALS_ERROR } from "#types.js";
|
||||||
import { getActivePortals } from "#portal.js";
|
import { getActivePortals } from "#portal.js";
|
||||||
import { NO_PORTALS_ERROR } from "#err.js";
|
|
||||||
|
|
||||||
export async function uploadObject(
|
export async function uploadObject(
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in New Issue