keepset 0.41.1 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,100 @@
1
+ import { Et as Snapshot, Ot as Source, i as CategoryTarget, o as CollectionTarget, ut as Entry, z as Dataset } from "./categories-BG8lRjy8.js";
2
+ //#region src/fetch.d.ts
3
+ /** The network port a recipe downloads through: `downloadRaw` by default, which returns the bytes exactly as served, or a stand-in under test. */
4
+ type FetchPort = (url: string, init: {
5
+ readonly signal?: AbortSignal;
6
+ }) => Promise<Response>;
7
+ /** The digest port a provenance record hashes its bytes through: SHA-256 as hex. Node's `crypto` by default, or SubtleCrypto where the platform has no `node:crypto` (the browser entry point's default). */
8
+ type DigestPort = (bytes: Uint8Array) => Promise<string>;
9
+ /** What a fetch takes beyond the dataset: the network port and the digest port every entry point supplies its own of, an abort signal and the clock that dates the provenance record. */
10
+ interface FetchOptions {
11
+ readonly fetch: FetchPort;
12
+ readonly digest: DigestPort;
13
+ readonly signal?: AbortSignal;
14
+ readonly now?: () => Date;
15
+ }
16
+ /** One download a result's bytes came from: the entry's source, the URL actually requested (the snapshot's for a dead source) and exactly which bytes arrived. */
17
+ interface Download {
18
+ readonly source: {
19
+ readonly url: string;
20
+ readonly status: Source["status"];
21
+ readonly snapshot?: Snapshot;
22
+ };
23
+ readonly fetchedUrl: string;
24
+ readonly sha256: string;
25
+ readonly byteLength: number;
26
+ }
27
+ /** What every provenance record says: which entry and catalogue produced the result, its category, and when it was fetched. */
28
+ interface ProvenanceOf {
29
+ readonly entryId: string;
30
+ readonly catalogue: Dataset["catalogue"];
31
+ readonly category: Entry["category"];
32
+ readonly retrievedAt: string;
33
+ }
34
+ /** The provenance of a result read from one download: the download, and the archive member or members it was read from. */
35
+ interface DownloadProvenance extends ProvenanceOf, Download {
36
+ /** The archive member a document was read from. */
37
+ readonly member?: string;
38
+ /** The archive members a collection, or a document read from several files, was read from, in the order they were read. */
39
+ readonly members?: readonly string[];
40
+ }
41
+ /** One file of a collection read file by file: its download, the file's path in the collection, and the instances it gave (the path itself, or the path joined to each archive member it unpacked into). */
42
+ interface FileDownload extends Download {
43
+ readonly path: string;
44
+ readonly instances: readonly string[];
45
+ }
46
+ /** The provenance of a collection read from files downloaded one by one: each file's download, in the order they were read. */
47
+ interface FilesProvenance extends ProvenanceOf {
48
+ readonly files: readonly FileDownload[];
49
+ }
50
+ /** Where a fetched result's bytes came from: enough to say which entry, catalogue and source produced it, which URL was actually requested, when, and exactly which bytes arrived, for the one download a recipe reads or for each file of a collection read file by file (told apart by `files`). */
51
+ type Provenance = DownloadProvenance | FilesProvenance;
52
+ /** Whether decoding a dataset's encoded native document gives the native document back, with the provenance of the bytes it was checked on. */
53
+ type RoundTripReport = {
54
+ readonly holds: true;
55
+ readonly provenance: Provenance;
56
+ } | {
57
+ readonly holds: false;
58
+ readonly path: string;
59
+ readonly message: string;
60
+ readonly provenance: Provenance;
61
+ };
62
+ /**
63
+ * The URL a recipe downloads a source from. A dead source is fetched from its pinned snapshot in the Wayback Machine's `id_` form, which serves the archived bytes as they were captured rather than wrapped in the archive's page chrome.
64
+ * @param source - The source.
65
+ * @returns The URL to request.
66
+ */
67
+ declare function downloadUrl(source: Source): string;
68
+ /** A fetched dataset: the resolved category target (one document, or for a recipe that selects archive members a collection of them), the provenance of the bytes it came from, and any warnings, such as a count that differs from the one the entry records. */
69
+ interface FetchedDataset {
70
+ readonly dataset: Dataset;
71
+ readonly data: CategoryTarget | CollectionTarget;
72
+ readonly provenance: Provenance;
73
+ readonly warnings: readonly string[];
74
+ }
75
+ /**
76
+ * Runs a dataset's recipe: downloads the source (from its pinned snapshot when the source is dead), unpacks the archive, parses the native shape, applies the crossmap crosswalk and validates the result against the category target. The native document the crosswalk receives is the parser's output with `meta` built from the entry.
77
+ * @param dataset - A dataset from any catalogue.
78
+ * @param options - The network port, abort signal and clock.
79
+ * @returns The resolved target with its provenance and any count warnings.
80
+ * @throws RecipeError naming the entry and the failing step, including for a recipe that streams, which `streamEntry` reads; nothing partial or default-shaped is ever returned.
81
+ */
82
+ declare function fetchEntry(dataset: Dataset, options: FetchOptions): Promise<FetchedDataset>;
83
+ /**
84
+ * Fetches a dataset of the bundled catalogue by id and resolves it to its category's target shape, so `fetchDataset("cora")` yields graph/v1 `{ meta, nodes, edges }` directly. Node-only: it downloads with Node's http and https clients and unpacks with Node's zlib.
85
+ * @param id - The entry id.
86
+ * @param options - The network port, abort signal and clock.
87
+ * @returns The resolved target with its provenance and any count warnings.
88
+ * @throws DatasetNotFoundError when no entry has that id, and RecipeError naming the entry and the failing step when the recipe fails.
89
+ */
90
+ declare function fetchDataset(id: string, options: FetchOptions): Promise<FetchedDataset>;
91
+ /**
92
+ * Checks a dataset's crosswalk on its real data: runs the recipe to the native document, then crossmap's `assertRoundTrip`, which encodes it, decodes the result and compares the two over every path the crosswalk promises to preserve. A streamed recipe is checked a page at a time, with the round trip holding on the whole table exactly when it holds on every page, so the table is never held.
93
+ * @param dataset - A dataset from any catalogue.
94
+ * @param options - The network port, abort signal and clock.
95
+ * @returns Whether the round trip holds, and where it first differs when it does not.
96
+ * @throws RecipeError naming the entry and the failing step when the recipe fails before the comparison, or when the crosswalk cannot run.
97
+ */
98
+ declare function roundTripEntry(dataset: Dataset, options: FetchOptions): Promise<RoundTripReport>;
99
+ //#endregion
100
+ export { FetchPort as a, Provenance as c, fetchDataset as d, fetchEntry as f, FetchOptions as i, RoundTripReport as l, Download as n, FetchedDataset as o, roundTripEntry as p, DownloadProvenance as r, FilesProvenance as s, DigestPort as t, downloadUrl as u };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as TaskSchema, A as SourceRecipeSchema, B as groupsOf, C as LicenceSchema, D as RecipeSchema, E as RESERVED_META_KEYS, G as countedKeys, I as readsCollection, J as getStreamedShape, K as getCategory, L as toIssues, M as SubjectSchema, N as WaybackTimestampSchema, O as RelativePathSchema, P as parseEntry, Q as listCategories, R as waybackUrl, S as IdSchema, T as ParserSchema, U as CategoryIdSchema, V as namesOf, W as countTarget, X as isStreamable, Y as getTarget, Z as kindOf, _ as ColumnNameSchema, a as CatalogueIndexSchema, at as GraphV1Schema, b as FilesRecipeSchema, c as ManifestSchema, ct as CatalogueSyntaxError, d as AliasSchema, dt as KeepsetError, et as TasksMetaSchema, f as ArchiveMemberSchema, ft as NativeParseError, g as CollectionFileSchema, h as CollectionArchiveSchema, i as listNamespaces, it as GraphNodeSchema, j as SourceSchema, k as SnapshotSchema, l as SemVerSchema, lt as DatasetAmbiguousError, m as CitationSchema, mt as UnknownCategoryError, n as getManifest, nt as collectionOf, o as createCatalogue, ot as JsonScalarSchema, p as ArchiveSchema, pt as RecipeError, q as getCollectionTarget, r as listDatasets, rt as GraphEdgeSchema, s as LineageSchema, st as ArchiveError, t as getDataset, tt as TasksV1Schema, u as parseManifest, ut as DatasetNotFoundError, v as CrosswalkReferenceSchema, w as NamespaceSchema, x as HttpUrlSchema, y as EntrySchema, z as NAME_SEPARATOR } from "./bundled-B1094k0B.js";
1
+ import { $ as listCategories, A as SnapshotSchema, B as NAME_SEPARATOR, C as IdSchema, D as RESERVED_META_KEYS, E as ParserSchema, F as parseEntry, G as countTarget, H as namesOf, J as getCollectionTarget, K as countedKeys, L as readsCollection, M as SourceSchema, N as SubjectSchema, O as RecipeSchema, P as WaybackTimestampSchema, Q as kindOf, R as toIssues, S as HttpUrlSchema, T as NamespaceSchema, V as groupsOf, W as CategoryIdSchema, X as getTarget, Y as getStreamedShape, Z as isStreamable, _ as CollectionFileSchema, a as listNamespaces, at as GraphNodeSchema, b as EntrySchema, c as LineageSchema, ct as ArchiveError, d as parseManifest, dt as DatasetNotFoundError, et as TaskSchema, f as AliasSchema, ft as KeepsetError, g as CollectionArchiveSchema, h as CitationSchema, ht as UnknownCategoryError, i as listDatasets, it as GraphEdgeSchema, j as SourceRecipeSchema, k as RelativePathSchema, l as ManifestSchema, lt as CatalogueSyntaxError, m as ArchiveSchema, mt as RecipeError, n as getDataset, nt as TasksV1Schema, o as CatalogueIndexSchema, ot as GraphV1Schema, p as ArchiveMemberSchema, pt as NativeParseError, q as getCategory, r as getManifest, rt as collectionOf, s as createCatalogue, st as JsonScalarSchema, tt as TasksMetaSchema, u as SemVerSchema, ut as DatasetAmbiguousError, v as ColumnNameSchema, w as LicenceSchema, x as FilesRecipeSchema, y as CrosswalkReferenceSchema, z as waybackUrl } from "./bundled-OrF_TPDq.js";
2
2
  import { validateCrosswalk } from "crossmap";
3
3
  //#region src/serialise.ts
4
4
  /**
@@ -1,138 +1,92 @@
1
- import { Et as Snapshot, O as JsonScalar, Ot as Source, c as StreamableId, i as CategoryTarget, l as StreamedNodes, o as CollectionTarget, ut as Entry, z as Dataset } from "../categories-BG8lRjy8.js";
2
- //#region src/node/fetch-dataset.d.ts
3
- /** The network port a recipe downloads through: `downloadRaw` by default, which returns the bytes exactly as served, or a stand-in under test. */
4
- export type FetchPort = (url: string, init: {
5
- readonly signal?: AbortSignal;
6
- }) => Promise<Response>;
7
- /** What a fetch may be given beyond the dataset: the network port, an abort signal and the clock that dates the provenance record. */
8
- export interface FetchOptions {
9
- readonly fetch?: FetchPort;
10
- readonly signal?: AbortSignal;
11
- readonly now?: () => Date;
12
- }
13
- /** One download a result's bytes came from: the entry's source, the URL actually requested (the snapshot's for a dead source) and exactly which bytes arrived. */
14
- export interface Download {
15
- readonly source: {
16
- readonly url: string;
17
- readonly status: Source["status"];
18
- readonly snapshot?: Snapshot;
19
- };
20
- readonly fetchedUrl: string;
21
- readonly sha256: string;
22
- readonly byteLength: number;
23
- }
24
- /** What every provenance record says: which entry and catalogue produced the result, its category, and when it was fetched. */
25
- interface ProvenanceOf {
26
- readonly entryId: string;
27
- readonly catalogue: Dataset["catalogue"];
28
- readonly category: Entry["category"];
29
- readonly retrievedAt: string;
30
- }
31
- /** The provenance of a result read from one download: the download, and the archive member or members it was read from. */
32
- export interface DownloadProvenance extends ProvenanceOf, Download {
33
- /** The archive member a document was read from. */
34
- readonly member?: string;
35
- /** The archive members a collection, or a document read from several files, was read from, in the order they were read. */
36
- readonly members?: readonly string[];
37
- }
38
- /** One file of a collection read file by file: its download, the file's path in the collection, and the instances it gave (the path itself, or the path joined to each archive member it unpacked into). */
39
- export interface FileDownload extends Download {
40
- readonly path: string;
41
- readonly instances: readonly string[];
42
- }
43
- /** The provenance of a collection read from files downloaded one by one: each file's download, in the order they were read. */
44
- export interface FilesProvenance extends ProvenanceOf {
45
- readonly files: readonly FileDownload[];
46
- }
47
- /** Where a fetched result's bytes came from: enough to say which entry, catalogue and source produced it, which URL was actually requested, when, and exactly which bytes arrived, for the one download a recipe reads or for each file of a collection read file by file (told apart by `files`). */
48
- export type Provenance = DownloadProvenance | FilesProvenance;
49
- /** Whether decoding a dataset's encoded native document gives the native document back, with the provenance of the bytes it was checked on. */
50
- export type RoundTripReport = {
51
- readonly holds: true;
52
- readonly provenance: Provenance;
53
- } | {
54
- readonly holds: false;
55
- readonly path: string;
56
- readonly message: string;
57
- readonly provenance: Provenance;
58
- };
59
- /** A node a streamed result hands on: a node of a streamable category's target. */
60
- export type StreamedNode = StreamedNodes[StreamableId];
1
+ import { O as JsonScalar, c as StreamableId, l as StreamedNodes, z as Dataset } from "../categories-BG8lRjy8.js";
2
+ import { a as FetchPort, c as Provenance, d as fetchDataset$1, f as fetchEntry$1, i as FetchOptions, l as RoundTripReport, n as Download, o as FetchedDataset, p as roundTripEntry$1, r as DownloadProvenance, s as FilesProvenance, t as DigestPort, u as downloadUrl } from "../fetch-HjZj2roj.js";
3
+ import { Crosswalk } from "crossmap";
4
+ //#region src/node/stream-dataset.d.ts
61
5
  /** Where a streamed result goes: the meta once, before any node, then the nodes a page at a time, each already checked against the category's node shape and for an id no earlier node had. A sink that returns a promise is awaited before the next page is read, so a slow sink holds the stream back rather than letting pages pile up. */
62
- export interface NodeSink {
6
+ interface NodeSink {
63
7
  readonly meta: (meta: Readonly<Record<string, JsonScalar>>) => void | Promise<void>;
64
8
  readonly nodes: (nodes: readonly StreamedNode[]) => void | Promise<void>;
65
9
  }
66
10
  /** What a streamed fetch ends with, once every node has been handed on: the meta, the provenance of the bytes, how many nodes there were, and any warnings, such as a count that differs from the one the entry records. */
67
- export interface StreamedDataset {
11
+ interface StreamedDataset {
68
12
  readonly dataset: Dataset;
69
13
  readonly meta: Readonly<Record<string, JsonScalar>>;
70
14
  readonly provenance: DownloadProvenance;
71
15
  readonly counts: ReadonlyMap<string, number>;
72
16
  readonly warnings: readonly string[];
73
17
  }
18
+ /** A node a streamed result hands on: a node of a streamable category's target. */
19
+ type StreamedNode = StreamedNodes[StreamableId];
74
20
  /**
75
- * The URL a recipe downloads a source from. A dead source is fetched from its pinned snapshot in the Wayback Machine's `id_` form, which serves the archived bytes as they were captured rather than wrapped in the archive's page chrome.
76
- * @param source - The source.
77
- * @returns The URL to request.
21
+ * Streams a table, as `streamEntry` describes.
22
+ * @param dataset - A dataset whose recipe streams.
23
+ * @param sink - Where the meta and the nodes go.
24
+ * @param options - The network port, abort signal and clock.
25
+ * @returns The meta, the provenance, the node count and any count warnings, once every node has been handed on.
26
+ * @throws RecipeError naming the entry and the failing step, after which the sink has had the nodes of the pages before the failure and no more; a recipe that does not stream, or a crosswalk that cannot run a page at a time, fails before anything is downloaded.
78
27
  */
79
- export declare function downloadUrl(source: Source): string;
80
- /** A fetched dataset: the resolved category target (one document, or for a recipe that selects archive members a collection of them), the provenance of the bytes it came from, and any warnings, such as a count that differs from the one the entry records. */
81
- export interface FetchedDataset {
82
- readonly dataset: Dataset;
83
- readonly data: CategoryTarget | CollectionTarget;
84
- readonly provenance: Provenance;
85
- readonly warnings: readonly string[];
28
+ export declare function streamTable(dataset: Dataset, sink: NodeSink, options: FetchOptions): Promise<StreamedDataset>;
29
+ //#endregion
30
+ //#region src/node/download.d.ts
31
+ /** How long a connection may send nothing, at any point of a download, before it is given up as dead. A healthy server of the open data portals recipes read sends something every few seconds even while it prepares a large page, and a socket that has gone silent otherwise holds the download for ever, as one did in the middle of a table of millions of rows. */
32
+ export declare const STALL_MILLISECONDS = 120000;
33
+ /** How many times a download is tried when its connection fails, and how long each retry waits for the one before it (the delay times the attempt number), so a network that drops for a few seconds is waited out and not hammered. */
34
+ export declare const DOWNLOAD_ATTEMPTS = 3;
35
+ export declare const RETRY_DELAY_MILLISECONDS = 3000;
36
+ /** Options for one download: the signal that aborts it, how long a silent connection is waited on (`STALL_MILLISECONDS`), and how long a retry waits (`RETRY_DELAY_MILLISECONDS`), the last two only shortened by a test. */
37
+ interface DownloadInit {
38
+ readonly signal?: AbortSignal;
39
+ readonly stallMilliseconds?: number;
40
+ readonly retryDelayMilliseconds?: number;
86
41
  }
87
42
  /**
88
- * Runs a dataset's recipe: downloads the source (from its pinned snapshot when the source is dead), unpacks the archive, parses the native shape, applies the crossmap crosswalk and validates the result against the category target. The native document the crosswalk receives is the parser's output with `meta` built from the entry.
89
- * @param dataset - A dataset from any catalogue.
90
- * @param options - The network port, abort signal and clock.
91
- * @returns The resolved target with its provenance and any count warnings.
92
- * @throws RecipeError naming the entry and the failing step, including for a recipe that streams, which `streamEntry` reads; nothing partial or default-shaped is ever returned.
43
+ * Downloads a URL's bytes exactly as the server sends them, following redirects. Unlike the platform `fetch`, it never undoes a `Content-Encoding`: servers commonly label a `.gz` file `Content-Encoding: gzip`, and a recipe that unpacks gzip needs the file as published, which is also what its SHA-256 is recorded over. No `Accept-Encoding` is sent, so a server that compresses on the fly has no reason to.
44
+ * @param url - An http or https URL.
45
+ * @param init - The request options.
46
+ * @returns A Response holding the raw bytes, with the final status.
47
+ * @throws KeepsetError when a redirect has no location, leaves http and https, or passes the redirect limit; the connection's failure, after the tries, when it keeps failing or sends nothing for longer than the stall time.
93
48
  */
94
- export declare function fetchEntry(dataset: Dataset, options?: FetchOptions): Promise<FetchedDataset>;
49
+ export declare function downloadRaw(url: string, init: DownloadInit): Promise<Response>;
50
+ //#endregion
51
+ //#region src/node/fetch-dataset.d.ts
52
+ /** What a fetch may be given beyond the dataset in Node: every port is optional, with Node's own as the default. */
53
+ export type NodeFetchOptions = Omit<FetchOptions, "fetch" | "digest"> & {
54
+ readonly fetch?: FetchPort;
55
+ readonly digest?: FetchOptions["digest"];
56
+ readonly signal?: AbortSignal;
57
+ readonly now?: () => Date;
58
+ };
95
59
  /**
96
- * Fetches a dataset of the bundled catalogue by id and resolves it to its category's target shape, so `fetchDataset("cora")` yields graph/v1 `{ meta, nodes, edges }` directly. Node-only: it downloads with Node's http and https clients and unpacks with Node's zlib.
60
+ * Fetches a dataset of the bundled catalogue by id, with Node's own downloader and digest. See `../fetch`'s `fetchEntry` for what a fetch does.
97
61
  * @param id - The entry id.
98
- * @param options - The network port, abort signal and clock.
99
- * @returns The resolved target with its provenance and any count warnings.
100
- * @throws DatasetNotFoundError when no entry has that id, and RecipeError naming the entry and the failing step when the recipe fails.
62
+ * @param options - The ports to override, an abort signal and the clock.
63
+ * @returns The fetched dataset.
101
64
  */
102
- export declare function fetchDataset(id: string, options?: FetchOptions): Promise<FetchedDataset>;
65
+ export declare function fetchDataset(id: string, options?: NodeFetchOptions): Promise<Awaited<ReturnType<typeof fetchDataset$1>>>;
103
66
  /**
104
- * Checks a dataset's crosswalk on its real data: runs the recipe to the native document, then crossmap's `assertRoundTrip`, which encodes it, decodes the result and compares the two over every path the crosswalk promises to preserve. A streamed recipe is checked a page at a time, with the round trip holding on the whole table exactly when it holds on every page, so the table is never held.
67
+ * Fetches a dataset object, with Node's own downloader and digest.
105
68
  * @param dataset - A dataset from any catalogue.
106
- * @param options - The network port, abort signal and clock.
107
- * @returns Whether the round trip holds, and where it first differs when it does not.
108
- * @throws RecipeError naming the entry and the failing step when the recipe fails before the comparison, or when the crosswalk cannot run.
69
+ * @param options - The ports to override, an abort signal and the clock.
70
+ * @returns The fetched dataset.
109
71
  */
110
- export declare function roundTripEntry(dataset: Dataset, options?: FetchOptions): Promise<RoundTripReport>;
72
+ export declare function fetchEntry(dataset: Dataset, options?: NodeFetchOptions): Promise<Awaited<ReturnType<typeof fetchEntry$1>>>;
111
73
  /**
112
- * Streams a dataset of the bundled catalogue by id, as `streamEntry` does: for a table too large to hold as one document, whose recipe streams.
113
- * @param id - The entry id.
114
- * @param sink - Where the meta and the nodes go.
115
- * @param options - The network port, abort signal and clock.
116
- * @returns The meta, the provenance, the node count and any count warnings, once every node has been handed on.
117
- * @throws DatasetNotFoundError when no entry has that id, and RecipeError as `streamEntry` does.
118
- */
119
- export declare function streamDataset(id: string, sink: NodeSink, options?: FetchOptions): Promise<StreamedDataset>;
120
- /**
121
- * Streams a dataset whose table is too large to hold as one document: reads its paged source a page at a time, applies the crosswalk to each page's rows under the document's meta, checks the meta once and each node against the category's node shape and for an id no earlier node had, and hands the nodes on to the sink before reading the next page. What it holds at once is one page's bytes and rows and the ids seen so far (as bytes, not strings), never the table, so the result is the category target `{ meta, nodes }` delivered in order rather than held: the same nodes `fetchEntry` would give, checked by the same rules.
122
- * @param dataset - A dataset whose recipe streams.
123
- * @param sink - Where the meta and the nodes go.
124
- * @param options - The network port, abort signal and clock.
125
- * @returns The meta, the provenance, the node count and any count warnings, once every node has been handed on.
126
- * @throws RecipeError naming the entry and the failing step, after which the sink has had the nodes of the pages before the failure and no more; a recipe that does not stream, or a crosswalk that cannot run a page at a time, fails before anything is downloaded.
74
+ * Checks a dataset's crosswalk on its real data, a streamed table a page at a time.
75
+ * @param dataset - A dataset from any catalogue.
76
+ * @param options - The ports to override, an abort signal and the clock.
77
+ * @returns Whether the round trip holds.
127
78
  */
128
- export declare function streamEntry(dataset: Dataset, sink: NodeSink, options?: FetchOptions): Promise<StreamedDataset>;
79
+ export declare function roundTripEntry(dataset: Dataset, options?: NodeFetchOptions): Promise<Awaited<ReturnType<typeof roundTripEntry$1>>>;
129
80
  /**
130
81
  * Runs `roundTripEntry` on a dataset of the bundled catalogue by id.
131
82
  * @param id - The entry id.
132
- * @param options - The network port, abort signal and clock.
83
+ * @param options - The ports to override, an abort signal and the clock.
133
84
  * @returns Whether the round trip holds.
134
- * @throws DatasetNotFoundError when no entry has that id, and RecipeError as `roundTripEntry` does.
135
85
  */
136
- export declare function roundTripDataset(id: string, options?: FetchOptions): Promise<RoundTripReport>;
86
+ export declare function roundTripDataset(id: string, options?: NodeFetchOptions): Promise<Awaited<ReturnType<typeof roundTripEntry$1>>>;
87
+ /** Streams a dataset of the bundled catalogue by id, as `streamEntry` does. */
88
+ export declare function streamDataset(id: string, sink: NodeSink, options?: NodeFetchOptions): Promise<StreamedDataset>;
89
+ /** Streams a dataset whose table is too large to hold as one document, a page at a time, as `streamTable` does. */
90
+ export declare function streamEntry(dataset: Dataset, sink: NodeSink, options?: NodeFetchOptions): Promise<StreamedDataset>;
137
91
  //#endregion
138
- export {};
92
+ export { type DigestPort, type Download, type DownloadInit, type DownloadProvenance, type FetchOptions, type FetchPort, type FetchedDataset, type FilesProvenance, type NodeSink, type Provenance, type RoundTripReport, type StreamedDataset, type StreamedNode, downloadUrl };