@helia/car 4.1.0 → 4.1.1-60fbbc2
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.
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +3 -3
- package/dist/src/car.d.ts +1 -1
- package/dist/src/car.d.ts.map +1 -1
- package/dist/src/car.js +0 -1
- package/dist/src/car.js.map +1 -1
- package/dist/src/export-strategies/block-exporter.d.ts +2 -2
- package/dist/src/export-strategies/block-exporter.d.ts.map +1 -1
- package/dist/src/export-strategies/block-exporter.js +0 -2
- package/dist/src/export-strategies/block-exporter.js.map +1 -1
- package/dist/src/export-strategies/subgraph-exporter.d.ts +2 -2
- package/dist/src/export-strategies/subgraph-exporter.d.ts.map +1 -1
- package/dist/src/export-strategies/subgraph-exporter.js +1 -3
- package/dist/src/export-strategies/subgraph-exporter.js.map +1 -1
- package/dist/src/export-strategies/unixfs-exporter.js +1 -1
- package/dist/src/export-strategies/unixfs-exporter.js.map +1 -1
- package/dist/src/traversal-strategies/graph-search.js +1 -1
- package/dist/src/traversal-strategies/graph-search.js.map +1 -1
- package/package.json +6 -6
- package/src/car.ts +1 -1
- package/src/export-strategies/block-exporter.ts +2 -2
- package/src/export-strategies/subgraph-exporter.ts +3 -3
- package/src/export-strategies/unixfs-exporter.ts +1 -1
- package/src/traversal-strategies/graph-search.ts +1 -1
- package/dist/typedoc-urls.json +0 -20
package/dist/src/car.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CarWriter } from '@ipld/car';
|
|
2
|
-
import { type CID } from 'multiformats/cid';
|
|
3
2
|
import type { CarComponents, Car as CarInterface, ExportCarOptions } from './index.js';
|
|
4
3
|
import type { PutManyBlocksProgressEvents } from '@helia/interface/blocks';
|
|
5
4
|
import type { CarReader } from '@ipld/car';
|
|
6
5
|
import type { AbortOptions } from '@libp2p/interface';
|
|
6
|
+
import type { CID } from 'multiformats/cid';
|
|
7
7
|
import type { ProgressOptions } from 'progress-events';
|
|
8
8
|
export declare class Car implements CarInterface {
|
|
9
9
|
#private;
|
package/dist/src/car.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"car.d.ts","sourceRoot":"","sources":["../../src/car.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"car.d.ts","sourceRoot":"","sources":["../../src/car.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AASrC,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI,YAAY,EAAE,gBAAgB,EAAqC,MAAM,YAAY,CAAA;AACzH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAU,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AA2BtD,qBAAa,GAAI,YAAW,YAAY;;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;gBAEf,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG;IAK3C,MAAM,CAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAC,2BAA2B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhI,MAAM,CAAE,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoF7G,MAAM,CAAE,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC;CA4E5G"}
|
package/dist/src/car.js
CHANGED
|
@@ -2,7 +2,6 @@ import { CarWriter } from '@ipld/car';
|
|
|
2
2
|
import drain from 'it-drain';
|
|
3
3
|
import map from 'it-map';
|
|
4
4
|
import { createUnsafe } from 'multiformats/block';
|
|
5
|
-
import {} from 'multiformats/cid';
|
|
6
5
|
import defer from 'p-defer';
|
|
7
6
|
import PQueue from 'p-queue';
|
|
8
7
|
import { DAG_WALK_QUEUE_CONCURRENCY } from './constants.js';
|
package/dist/src/car.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"car.js","sourceRoot":"","sources":["../../src/car.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"car.js","sourceRoot":"","sources":["../../src/car.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,wCAA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,SAAS,CAAC,KAAK,CAAC,CAAA;QAE9C,eAAe;QACf,MAAM,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;QAEhC,IAAI,SAAS,EAAE,CAAC;YACd,wCAAwC;YACxC,MAAM,YAAY,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;YAExD,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,CAAC;gBAC/D,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;oBACxB,MAAM,IAAI,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAA;gBAC/E,CAAC,CAAC;qBACC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;oBACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,0CAA0C,EAAE,GAAG,CAAC,CAAA;gBACjE,CAAC,CAAC,CAAA;YACN,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ExportStrategy } from '../index.js';
|
|
1
|
+
import type { ExportStrategy } from '../index.js';
|
|
3
2
|
import type { BlockView } from 'multiformats/block/interface';
|
|
3
|
+
import type { CID } from 'multiformats/cid';
|
|
4
4
|
/**
|
|
5
5
|
* Yields the first block from the first CID and stops
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-exporter.d.ts","sourceRoot":"","sources":["../../../src/export-strategies/block-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"block-exporter.d.ts","sourceRoot":"","sources":["../../../src/export-strategies/block-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;GAEG;AACH,qBAAa,aAAc,YAAW,cAAc;IAC1C,MAAM,CAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC;CAIxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/block-exporter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/block-exporter.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,CAAE,MAAM,CAAE,GAAQ,EAAE,KAAsC;QAC9D,uEAAuE;QACvE,aAAa;IACf,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ExportStrategy } from '../index.js';
|
|
1
|
+
import type { ExportStrategy } from '../index.js';
|
|
3
2
|
import type { BlockView } from 'multiformats/block/interface';
|
|
3
|
+
import type { CID } from 'multiformats/cid';
|
|
4
4
|
/**
|
|
5
5
|
* Traverses the DAG breadth-first starting at the target CID and yields all
|
|
6
6
|
* encountered blocks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph-exporter.d.ts","sourceRoot":"","sources":["../../../src/export-strategies/subgraph-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"subgraph-exporter.d.ts","sourceRoot":"","sources":["../../../src/export-strategies/subgraph-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;;;;;GAMG;AACH,qBAAa,gBAAiB,YAAW,cAAc;IAC7C,MAAM,CAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC;CAKzG"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {} from 'multiformats/cid';
|
|
2
|
-
import {} from '../index.js';
|
|
3
1
|
/**
|
|
4
2
|
* Traverses the DAG breadth-first starting at the target CID and yields all
|
|
5
3
|
* encountered blocks.
|
|
@@ -9,7 +7,7 @@ import {} from '../index.js';
|
|
|
9
7
|
*/
|
|
10
8
|
export class SubgraphExporter {
|
|
11
9
|
async *export(_cid, block) {
|
|
12
|
-
for
|
|
10
|
+
for (const [, linkedCid] of block.links()) {
|
|
13
11
|
yield linkedCid;
|
|
14
12
|
}
|
|
15
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/subgraph-exporter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subgraph-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/subgraph-exporter.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,OAAO,gBAAgB;IAC3B,KAAK,CAAC,CAAE,MAAM,CAAE,IAAS,EAAE,KAAsC;QAC/D,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;YAC1C,MAAM,SAAS,CAAA;QACjB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -10,7 +10,7 @@ export class UnixFSExporter {
|
|
|
10
10
|
throw new NotUnixFSError('Target CID was not UnixFS - use the SubGraphExporter to export arbitrary graphs');
|
|
11
11
|
}
|
|
12
12
|
// yield all the blocks that make up the file or directory
|
|
13
|
-
for
|
|
13
|
+
for (const [, linkedCid] of block.links()) {
|
|
14
14
|
yield linkedCid;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unixfs-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/unixfs-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAK7C;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,CAAE,MAAM,CAAE,GAAQ,EAAE,KAAsC;QAC9D,IAAI,GAAG,CAAC,IAAI,KAAK,iBAAiB,IAAI,GAAG,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACrE,MAAM,IAAI,cAAc,CAAC,iFAAiF,CAAC,CAAA;QAC7G,CAAC;QAED,0DAA0D;QAC1D,
|
|
1
|
+
{"version":3,"file":"unixfs-exporter.js","sourceRoot":"","sources":["../../../src/export-strategies/unixfs-exporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAK7C;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,CAAE,MAAM,CAAE,GAAQ,EAAE,KAAsC;QAC9D,IAAI,GAAG,CAAC,IAAI,KAAK,iBAAiB,IAAI,GAAG,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACrE,MAAM,IAAI,cAAc,CAAC,iFAAiF,CAAC,CAAA;QAC7G,CAAC;QAED,0DAA0D;QAC1D,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;YAC1C,MAAM,SAAS,CAAA;QACjB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-search.js","sourceRoot":"","sources":["../../../src/traversal-strategies/graph-search.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAO,WAAW;IACL,MAAM,CAAK;IAE5B,YAAa,MAAW;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,QAAQ,CAAE,GAAQ;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,CAAE,QAAQ,CAA6C,GAAQ,EAAE,KAAQ;QAC7E,
|
|
1
|
+
{"version":3,"file":"graph-search.js","sourceRoot":"","sources":["../../../src/traversal-strategies/graph-search.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAO,WAAW;IACL,MAAM,CAAK;IAE5B,YAAa,MAAW;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,QAAQ,CAAE,GAAQ;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,CAAE,QAAQ,CAA6C,GAAQ,EAAE,KAAQ;QAC7E,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;YAC1C,MAAM,SAAS,CAAA;QACjB,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/car",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1-60fbbc2",
|
|
4
4
|
"description": "Import/export car files from Helia",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/car#readme",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"test:electron-main": "aegir test -t electron-main"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@helia/interface": "
|
|
57
|
+
"@helia/interface": "5.3.1-60fbbc2",
|
|
58
58
|
"@ipld/car": "^5.3.3",
|
|
59
59
|
"@ipld/dag-pb": "^4.1.3",
|
|
60
60
|
"@libp2p/interface": "^2.2.1",
|
|
@@ -69,18 +69,18 @@
|
|
|
69
69
|
"progress-events": "^1.0.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@helia/mfs": "
|
|
73
|
-
"@helia/unixfs": "
|
|
72
|
+
"@helia/mfs": "5.0.2-60fbbc2",
|
|
73
|
+
"@helia/unixfs": "5.0.2-60fbbc2",
|
|
74
74
|
"@ipld/dag-cbor": "^9.2.2",
|
|
75
75
|
"@libp2p/logger": "^5.1.15",
|
|
76
|
-
"aegir": "^
|
|
76
|
+
"aegir": "^47.0.7",
|
|
77
77
|
"blockstore-core": "^5.0.2",
|
|
78
78
|
"datastore-core": "^10.0.2",
|
|
79
79
|
"ipfs-unixfs-importer": "^15.3.1",
|
|
80
80
|
"it-foreach": "^2.1.2",
|
|
81
81
|
"it-length": "^3.0.7",
|
|
82
82
|
"it-to-buffer": "^4.0.7",
|
|
83
|
-
"sinon": "^
|
|
83
|
+
"sinon": "^20.0.0"
|
|
84
84
|
},
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
package/src/car.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { CarWriter } from '@ipld/car'
|
|
|
2
2
|
import drain from 'it-drain'
|
|
3
3
|
import map from 'it-map'
|
|
4
4
|
import { createUnsafe } from 'multiformats/block'
|
|
5
|
-
import { type CID } from 'multiformats/cid'
|
|
6
5
|
import defer from 'p-defer'
|
|
7
6
|
import PQueue from 'p-queue'
|
|
8
7
|
import { DAG_WALK_QUEUE_CONCURRENCY } from './constants.js'
|
|
@@ -12,6 +11,7 @@ import type { CarComponents, Car as CarInterface, ExportCarOptions, ExportStrate
|
|
|
12
11
|
import type { PutManyBlocksProgressEvents } from '@helia/interface/blocks'
|
|
13
12
|
import type { CarReader } from '@ipld/car'
|
|
14
13
|
import type { AbortOptions, Logger } from '@libp2p/interface'
|
|
14
|
+
import type { CID } from 'multiformats/cid'
|
|
15
15
|
import type { ProgressOptions } from 'progress-events'
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ExportStrategy } from '../index.js'
|
|
1
|
+
import type { ExportStrategy } from '../index.js'
|
|
3
2
|
import type { BlockView } from 'multiformats/block/interface'
|
|
3
|
+
import type { CID } from 'multiformats/cid'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Yields the first block from the first CID and stops
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ExportStrategy } from '../index.js'
|
|
1
|
+
import type { ExportStrategy } from '../index.js'
|
|
3
2
|
import type { BlockView } from 'multiformats/block/interface'
|
|
3
|
+
import type { CID } from 'multiformats/cid'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Traverses the DAG breadth-first starting at the target CID and yields all
|
|
@@ -11,7 +11,7 @@ import type { BlockView } from 'multiformats/block/interface'
|
|
|
11
11
|
*/
|
|
12
12
|
export class SubgraphExporter implements ExportStrategy {
|
|
13
13
|
async * export (_cid: CID, block: BlockView<any, any, any, 0 | 1>): AsyncGenerator<CID, void, undefined> {
|
|
14
|
-
for
|
|
14
|
+
for (const [, linkedCid] of block.links()) {
|
|
15
15
|
yield linkedCid
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -18,7 +18,7 @@ export class GraphSearch implements TraversalStrategy {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async * traverse <T extends BlockView<any, any, any, 0 | 1>>(cid: CID, block: T): AsyncGenerator<CID, void, undefined> {
|
|
21
|
-
for
|
|
21
|
+
for (const [, linkedCid] of block.links()) {
|
|
22
22
|
yield linkedCid
|
|
23
23
|
}
|
|
24
24
|
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"BlockExporter": "https://ipfs.github.io/helia/classes/_helia_car.BlockExporter.html",
|
|
3
|
-
"CIDPath": "https://ipfs.github.io/helia/classes/_helia_car.CIDPath.html",
|
|
4
|
-
"GraphSearch": "https://ipfs.github.io/helia/classes/_helia_car.GraphSearch.html",
|
|
5
|
-
"SubgraphExporter": "https://ipfs.github.io/helia/classes/_helia_car.SubgraphExporter.html",
|
|
6
|
-
"UnixFSExporter": "https://ipfs.github.io/helia/classes/_helia_car.UnixFSExporter.html",
|
|
7
|
-
"UnixFSPath": "https://ipfs.github.io/helia/classes/_helia_car.UnixFSPath.html",
|
|
8
|
-
"Car": "https://ipfs.github.io/helia/interfaces/_helia_car.Car.html",
|
|
9
|
-
".:Car": "https://ipfs.github.io/helia/interfaces/_helia_car.Car.html",
|
|
10
|
-
"CarComponents": "https://ipfs.github.io/helia/interfaces/_helia_car.CarComponents.html",
|
|
11
|
-
".:CarComponents": "https://ipfs.github.io/helia/interfaces/_helia_car.CarComponents.html",
|
|
12
|
-
"ExportCarOptions": "https://ipfs.github.io/helia/interfaces/_helia_car.ExportCarOptions.html",
|
|
13
|
-
".:ExportCarOptions": "https://ipfs.github.io/helia/interfaces/_helia_car.ExportCarOptions.html",
|
|
14
|
-
"ExportStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.ExportStrategy.html",
|
|
15
|
-
".:ExportStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.ExportStrategy.html",
|
|
16
|
-
"TraversalStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.TraversalStrategy.html",
|
|
17
|
-
".:TraversalStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.TraversalStrategy.html",
|
|
18
|
-
"car": "https://ipfs.github.io/helia/functions/_helia_car.car-1.html",
|
|
19
|
-
".:car": "https://ipfs.github.io/helia/functions/_helia_car.car-1.html"
|
|
20
|
-
}
|