@helia/car 5.3.2 → 5.3.3-4e19769a

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.
@@ -1 +1 @@
1
- {"version":3,"file":"unixfs-path.d.ts","sourceRoot":"","sources":["../../../src/traversal-strategies/unixfs-path.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,qBAAa,UAAW,YAAW,iBAAiB;IAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAQ;gBAEhB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM;IAoB5B,QAAQ,CAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC;CAShL"}
1
+ {"version":3,"file":"unixfs-path.d.ts","sourceRoot":"","sources":["../../../src/traversal-strategies/unixfs-path.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,qBAAa,UAAW,YAAW,iBAAiB;IAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAQ;gBAEhB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM;IAoB5B,QAAQ,CAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC;CAWhL"}
@@ -1,5 +1,5 @@
1
1
  import * as dagPb from '@ipld/dag-pb';
2
- import { walkPath } from 'ipfs-unixfs-exporter';
2
+ import { exporter, walkPath } from 'ipfs-unixfs-exporter';
3
3
  import { createUnsafe } from 'multiformats/block';
4
4
  /**
5
5
  * Traverses a DAG containing UnixFS directories
@@ -71,9 +71,10 @@ export class UnixFSPath {
71
71
  }
72
72
  async *traverse(root, blockstore, getCodec, options) {
73
73
  for await (const entry of walkPath(`${this.root ?? root}${this.path}`, blockstore, options)) {
74
+ const file = await exporter(entry.cid, blockstore, options);
74
75
  yield createUnsafe({
75
- cid: entry.cid,
76
- bytes: entry.node instanceof Uint8Array ? entry.node : dagPb.encode(entry.node),
76
+ cid: file.cid,
77
+ bytes: file.node instanceof Uint8Array ? file.node : dagPb.encode(file.node),
77
78
  codec: await getCodec(entry.cid.code)
78
79
  });
79
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"unixfs-path.js","sourceRoot":"","sources":["../../../src/traversal-strategies/unixfs-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAQjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,OAAO,UAAU;IACJ,IAAI,CAAM;IACV,IAAI,CAAQ;IAI7B,YAAa,GAAG,IAAW;QACzB,IAAI,IAAI,GAA6B,IAAI,CAAC,CAAC,CAAC,CAAA;QAC5C,IAAI,IAAI,GAAW,IAAI,CAAC,CAAC,CAAC,CAAA;QAE1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAA;YACX,IAAI,GAAG,SAAS,CAAA;QAClB,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;QAC3D,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACnB,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,CAAE,QAAQ,CAAE,IAAS,EAAE,UAAsB,EAAE,QAAqB,EAAE,OAAsB;QAChG,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,IAA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,CAAC;YAC1B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACnB,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,CAAE,QAAQ,CAAE,IAAS,EAAE,UAAsB,EAAE,QAAqB,EAAE,OAAsB;QAChG,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;YAC5F,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;YAE3D,MAAM,YAAY,CAAC;gBACjB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,KAAK,EAAE,IAAI,CAAC,IAAI,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC5E,KAAK,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACtC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helia/car",
3
- "version": "5.3.2",
3
+ "version": "5.3.3-4e19769a",
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",
@@ -47,8 +47,8 @@
47
47
  "test:electron-main": "aegir test -t electron-main"
48
48
  },
49
49
  "dependencies": {
50
- "@helia/interface": "^6.0.2",
51
- "@helia/utils": "^2.3.2",
50
+ "@helia/interface": "6.0.2-4e19769a",
51
+ "@helia/utils": "2.3.3-4e19769a",
52
52
  "@ipld/car": "^5.4.2",
53
53
  "@ipld/dag-pb": "^4.1.5",
54
54
  "@libp2p/interface": "^3.1.0",
@@ -56,7 +56,7 @@
56
56
  "any-signal": "^4.1.1",
57
57
  "interface-blockstore": "^6.0.1",
58
58
  "ipfs-unixfs": "^12.0.0",
59
- "ipfs-unixfs-exporter": "^14.0.1",
59
+ "ipfs-unixfs-exporter": "^15.0.2",
60
60
  "it-drain": "^3.0.10",
61
61
  "it-map": "^3.1.4",
62
62
  "it-to-buffer": "^4.0.10",
@@ -65,8 +65,8 @@
65
65
  "race-signal": "^2.0.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@helia/mfs": "^6.0.4",
69
- "@helia/unixfs": "^6.0.4",
68
+ "@helia/mfs": "6.0.4-4e19769a",
69
+ "@helia/unixfs": "6.0.4-4e19769a",
70
70
  "@ipld/dag-cbor": "^9.2.5",
71
71
  "@libp2p/logger": "^6.0.5",
72
72
  "aegir": "^47.0.22",
@@ -1,5 +1,5 @@
1
1
  import * as dagPb from '@ipld/dag-pb'
2
- import { walkPath } from 'ipfs-unixfs-exporter'
2
+ import { exporter, walkPath } from 'ipfs-unixfs-exporter'
3
3
  import { createUnsafe } from 'multiformats/block'
4
4
  import type { TraversalStrategy } from '../index.js'
5
5
  import type { CodecLoader } from '@helia/interface'
@@ -84,9 +84,11 @@ export class UnixFSPath implements TraversalStrategy {
84
84
 
85
85
  async * traverse (root: CID, blockstore: Blockstore, getCodec: CodecLoader, options?: AbortOptions): AsyncGenerator<BlockView<unknown, number, number, 0 | 1>, void, undefined> {
86
86
  for await (const entry of walkPath(`${this.root ?? root}${this.path}`, blockstore, options)) {
87
+ const file = await exporter(entry.cid, blockstore, options)
88
+
87
89
  yield createUnsafe({
88
- cid: entry.cid,
89
- bytes: entry.node instanceof Uint8Array ? entry.node : dagPb.encode(entry.node),
90
+ cid: file.cid,
91
+ bytes: file.node instanceof Uint8Array ? file.node : dagPb.encode(file.node),
90
92
  codec: await getCodec(entry.cid.code)
91
93
  })
92
94
  }
@@ -1,23 +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
- "GraphSearchOptions": "https://ipfs.github.io/helia/interfaces/_helia_car.GraphSearchOptions.html",
17
- "SubgraphExporterInit": "https://ipfs.github.io/helia/interfaces/_helia_car.SubgraphExporterInit.html",
18
- "TraversalStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.TraversalStrategy.html",
19
- ".:TraversalStrategy": "https://ipfs.github.io/helia/interfaces/_helia_car.TraversalStrategy.html",
20
- "UnixFSExporterOptions": "https://ipfs.github.io/helia/interfaces/_helia_car.UnixFSExporterOptions.html",
21
- "car": "https://ipfs.github.io/helia/functions/_helia_car.car.html",
22
- ".:car": "https://ipfs.github.io/helia/functions/_helia_car.car.html"
23
- }