@helia/car 3.2.1-23e62e1 → 3.2.1-2f88fc8
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/README.md +4 -3
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -3
- package/dist/src/index.js.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +5 -4
package/README.md
CHANGED
|
@@ -46,13 +46,13 @@ import { CarWriter } from '@ipld/car'
|
|
|
46
46
|
import { Readable } from 'node:stream'
|
|
47
47
|
import nodeFs from 'node:fs'
|
|
48
48
|
|
|
49
|
-
const helia = createHelia({
|
|
49
|
+
const helia = await createHelia({
|
|
50
50
|
// ... helia config
|
|
51
51
|
})
|
|
52
52
|
const fs = unixfs(helia)
|
|
53
53
|
|
|
54
54
|
// add some UnixFS data
|
|
55
|
-
const cid = await fs.addBytes(
|
|
55
|
+
const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3, 4]))
|
|
56
56
|
|
|
57
57
|
// export it as a Car
|
|
58
58
|
const c = car(helia)
|
|
@@ -75,7 +75,7 @@ import { CarReader } from '@ipld/car'
|
|
|
75
75
|
import { Readable } from 'node:stream'
|
|
76
76
|
import nodeFs from 'node:fs'
|
|
77
77
|
|
|
78
|
-
const helia = createHelia({
|
|
78
|
+
const helia = await createHelia({
|
|
79
79
|
// ... helia config
|
|
80
80
|
})
|
|
81
81
|
|
|
@@ -83,6 +83,7 @@ const helia = createHelia({
|
|
|
83
83
|
const inStream = nodeFs.createReadStream('example.car')
|
|
84
84
|
const reader = await CarReader.fromIterable(inStream)
|
|
85
85
|
|
|
86
|
+
const c = car(helia)
|
|
86
87
|
await c.import(reader)
|
|
87
88
|
```
|
|
88
89
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* import { Readable } from 'node:stream'
|
|
18
18
|
* import nodeFs from 'node:fs'
|
|
19
19
|
*
|
|
20
|
-
* const helia = createHelia({
|
|
20
|
+
* const helia = await createHelia({
|
|
21
21
|
* // ... helia config
|
|
22
22
|
* })
|
|
23
23
|
* const fs = unixfs(helia)
|
|
24
24
|
*
|
|
25
25
|
* // add some UnixFS data
|
|
26
|
-
* const cid = await fs.addBytes(
|
|
26
|
+
* const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3, 4]))
|
|
27
27
|
*
|
|
28
28
|
* // export it as a Car
|
|
29
29
|
* const c = car(helia)
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* import { Readable } from 'node:stream'
|
|
47
47
|
* import nodeFs from 'node:fs'
|
|
48
48
|
*
|
|
49
|
-
* const helia = createHelia({
|
|
49
|
+
* const helia = await createHelia({
|
|
50
50
|
* // ... helia config
|
|
51
51
|
* })
|
|
52
52
|
*
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* const inStream = nodeFs.createReadStream('example.car')
|
|
55
55
|
* const reader = await CarReader.fromIterable(inStream)
|
|
56
56
|
*
|
|
57
|
+
* const c = car(helia)
|
|
57
58
|
* await c.import(reader)
|
|
58
59
|
* ```
|
|
59
60
|
*/
|
|
@@ -70,7 +71,7 @@ export interface CarComponents {
|
|
|
70
71
|
blockstore: Blockstore;
|
|
71
72
|
getCodec: CodecLoader;
|
|
72
73
|
}
|
|
73
|
-
interface ExportCarOptions extends AbortOptions, ProgressOptions<GetBlockProgressEvents> {
|
|
74
|
+
export interface ExportCarOptions extends AbortOptions, ProgressOptions<GetBlockProgressEvents> {
|
|
74
75
|
/**
|
|
75
76
|
* If a filter is passed it will be used to deduplicate blocks exported in the car file
|
|
76
77
|
*/
|
|
@@ -155,5 +156,4 @@ export interface Car {
|
|
|
155
156
|
* Create a {@link Car} instance for use with {@link https://github.com/ipfs/helia Helia}
|
|
156
157
|
*/
|
|
157
158
|
export declare function car(helia: CarComponents, init?: any): Car;
|
|
158
|
-
export {};
|
|
159
159
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAMrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,WAAW,CAAA;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY,EAAE,eAAe,CAAC,sBAAsB,CAAC;IAC7F;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAC,2BAA2B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/H;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CAAC,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,CAAA;IAE9G;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAC,sBAAsB,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;CACxH;AA2FD;;GAEG;AACH,wBAAgB,GAAG,CAAE,KAAK,EAAE,aAAa,EAAE,IAAI,GAAE,GAAQ,GAAG,GAAG,CAE9D"}
|
package/dist/src/index.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* import { Readable } from 'node:stream'
|
|
18
18
|
* import nodeFs from 'node:fs'
|
|
19
19
|
*
|
|
20
|
-
* const helia = createHelia({
|
|
20
|
+
* const helia = await createHelia({
|
|
21
21
|
* // ... helia config
|
|
22
22
|
* })
|
|
23
23
|
* const fs = unixfs(helia)
|
|
24
24
|
*
|
|
25
25
|
* // add some UnixFS data
|
|
26
|
-
* const cid = await fs.addBytes(
|
|
26
|
+
* const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3, 4]))
|
|
27
27
|
*
|
|
28
28
|
* // export it as a Car
|
|
29
29
|
* const c = car(helia)
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* import { Readable } from 'node:stream'
|
|
47
47
|
* import nodeFs from 'node:fs'
|
|
48
48
|
*
|
|
49
|
-
* const helia = createHelia({
|
|
49
|
+
* const helia = await createHelia({
|
|
50
50
|
* // ... helia config
|
|
51
51
|
* })
|
|
52
52
|
*
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* const inStream = nodeFs.createReadStream('example.car')
|
|
55
55
|
* const reader = await CarReader.fromIterable(inStream)
|
|
56
56
|
*
|
|
57
|
+
* const c = car(helia)
|
|
57
58
|
* await c.import(reader)
|
|
58
59
|
* ```
|
|
59
60
|
*/
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,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;AAoG5B,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAEpC,MAAM,UAAU;IACG,UAAU,CAAe;IAE1C,YAAa,UAAyB,EAAE,IAAS;QAC/C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,MAAiC,EAAE,OAAqE;QACpH,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAC5C,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,EACjE,OAAO,CACR,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,IAAiB,EAAE,MAAwC,EAAE,OAA0B;QACnG,MAAM,QA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AC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAE,KAAoB,EAAE,OAAY,EAAE;IACvD,OAAO,IAAI,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/car",
|
|
3
|
-
"version": "3.2.1-
|
|
3
|
+
"version": "3.2.1-2f88fc8",
|
|
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",
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"clean": "aegir clean",
|
|
129
129
|
"lint": "aegir lint",
|
|
130
130
|
"dep-check": "aegir dep-check",
|
|
131
|
+
"doc-check": "aegir doc-check",
|
|
131
132
|
"build": "aegir build",
|
|
132
133
|
"test": "aegir test",
|
|
133
134
|
"test:chrome": "aegir test -t browser --cov",
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
"release": "aegir release"
|
|
140
141
|
},
|
|
141
142
|
"dependencies": {
|
|
142
|
-
"@helia/interface": "4.3.1-
|
|
143
|
+
"@helia/interface": "4.3.1-2f88fc8",
|
|
143
144
|
"@ipld/car": "^5.3.0",
|
|
144
145
|
"@libp2p/interface": "^2.0.0",
|
|
145
146
|
"@libp2p/utils": "^6.0.0",
|
|
@@ -152,8 +153,8 @@
|
|
|
152
153
|
"progress-events": "^1.0.0"
|
|
153
154
|
},
|
|
154
155
|
"devDependencies": {
|
|
155
|
-
"@helia/mfs": "3.0.8-
|
|
156
|
-
"@helia/unixfs": "3.0.7-
|
|
156
|
+
"@helia/mfs": "3.0.8-2f88fc8",
|
|
157
|
+
"@helia/unixfs": "3.0.7-2f88fc8",
|
|
157
158
|
"@ipld/dag-pb": "^4.1.0",
|
|
158
159
|
"aegir": "^44.0.1",
|
|
159
160
|
"blockstore-core": "^5.0.0",
|
package/src/index.ts
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* import { Readable } from 'node:stream'
|
|
18
18
|
* import nodeFs from 'node:fs'
|
|
19
19
|
*
|
|
20
|
-
* const helia = createHelia({
|
|
20
|
+
* const helia = await createHelia({
|
|
21
21
|
* // ... helia config
|
|
22
22
|
* })
|
|
23
23
|
* const fs = unixfs(helia)
|
|
24
24
|
*
|
|
25
25
|
* // add some UnixFS data
|
|
26
|
-
* const cid = await fs.addBytes(
|
|
26
|
+
* const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3, 4]))
|
|
27
27
|
*
|
|
28
28
|
* // export it as a Car
|
|
29
29
|
* const c = car(helia)
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* import { Readable } from 'node:stream'
|
|
47
47
|
* import nodeFs from 'node:fs'
|
|
48
48
|
*
|
|
49
|
-
* const helia = createHelia({
|
|
49
|
+
* const helia = await createHelia({
|
|
50
50
|
* // ... helia config
|
|
51
51
|
* })
|
|
52
52
|
*
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* const inStream = nodeFs.createReadStream('example.car')
|
|
55
55
|
* const reader = await CarReader.fromIterable(inStream)
|
|
56
56
|
*
|
|
57
|
+
* const c = car(helia)
|
|
57
58
|
* await c.import(reader)
|
|
58
59
|
* ```
|
|
59
60
|
*/
|
|
@@ -78,7 +79,7 @@ export interface CarComponents {
|
|
|
78
79
|
getCodec: CodecLoader
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
interface ExportCarOptions extends AbortOptions, ProgressOptions<GetBlockProgressEvents> {
|
|
82
|
+
export interface ExportCarOptions extends AbortOptions, ProgressOptions<GetBlockProgressEvents> {
|
|
82
83
|
/**
|
|
83
84
|
* If a filter is passed it will be used to deduplicate blocks exported in the car file
|
|
84
85
|
*/
|