@helia/dag-json 3.0.6-9de08ef → 3.0.6-bc64f47

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 CHANGED
@@ -38,11 +38,13 @@ See the DAGJSON interface for all available operations.
38
38
 
39
39
  ```typescript
40
40
  import { createHelia } from 'helia'
41
- import { json } from '@helia/dag-json'
41
+ import { dagJson } from '@helia/dag-json'
42
42
  import { CID } from 'multiformats/cid'
43
43
 
44
- const j = json(helia)
45
- const cid = await j.put({
44
+ const helia = await createHelia()
45
+ const j = dagJson(helia)
46
+
47
+ const cid = await j.add({
46
48
  hello: 'world'
47
49
  })
48
50
  const obj = await j.get(cid)
@@ -9,11 +9,13 @@
9
9
  *
10
10
  * ```typescript
11
11
  * import { createHelia } from 'helia'
12
- * import { json } from '@helia/dag-json'
12
+ * import { dagJson } from '@helia/dag-json'
13
13
  * import { CID } from 'multiformats/cid'
14
14
  *
15
- * const j = json(helia)
16
- * const cid = await j.put({
15
+ * const helia = await createHelia()
16
+ * const j = dagJson(helia)
17
+ *
18
+ * const cid = await j.add({
17
19
  * hello: 'world'
18
20
  * })
19
21
  * const obj = await j.get(cid)
@@ -50,9 +52,12 @@ export interface DAGJSON {
50
52
  * @example
51
53
  *
52
54
  * ```typescript
53
- * import { json } from '@helia/dag-json'
55
+ * import { createHelia } from 'helia'
56
+ * import { dagJson } from '@helia/dag-json'
57
+ *
58
+ * const helia = await createHelia()
59
+ * const j = dagJson(helia)
54
60
  *
55
- * const j = json(helia)
56
61
  * const cid = await str.add({ hello: 'world' })
57
62
  *
58
63
  * console.info(cid)
@@ -67,10 +72,13 @@ export interface DAGJSON {
67
72
  * @example
68
73
  *
69
74
  * ```typescript
70
- * import { json } from '@helia/dag-json'
75
+ * import { createHelia } from 'helia'
76
+ * import { dagJson } from '@helia/dag-json'
71
77
  * import { CID } from 'multiformats/cid'
72
78
  *
73
- * const j = json(helia)
79
+ * const helia = await createHelia()
80
+ * const j = dagJson(helia)
81
+ *
74
82
  * const cid = CID.parse('baguqeerasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea')
75
83
  * const obj = await j.get(cid)
76
84
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY,EAAE,eAAe,CAAC,sBAAsB,CAAC;IACvF,MAAM,EAAE,eAAe,CAAA;CACxB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY,EAAE,eAAe,CAAC,sBAAsB,CAAC;IACvF,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IAE9D;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,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oBG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAC5D;AA0BD;;GAEG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG,OAAO,CAEnE"}
package/dist/src/index.js CHANGED
@@ -9,11 +9,13 @@
9
9
  *
10
10
  * ```typescript
11
11
  * import { createHelia } from 'helia'
12
- * import { json } from '@helia/dag-json'
12
+ * import { dagJson } from '@helia/dag-json'
13
13
  * import { CID } from 'multiformats/cid'
14
14
  *
15
- * const j = json(helia)
16
- * const cid = await j.put({
15
+ * const helia = await createHelia()
16
+ * const j = dagJson(helia)
17
+ *
18
+ * const cid = await j.add({
17
19
  * hello: 'world'
18
20
  * })
19
21
  * const obj = await j.get(cid)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAgEjD,MAAM,cAAc;IACD,UAAU,CAAmB;IAE9C,YAAa,UAA6B;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,GAAG,CAAE,GAAQ,EAAE,UAA+B,EAAE;QACpD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACzD,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KA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I,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QAEvD,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,GAAG,CAAM,GAAQ,EAAE,UAA+B,EAAE;QACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAE9D,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAE,KAAiC;IACxD,OAAO,IAAI,cAAc,CAAC,KAAK,CAAC,CAAA;AAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helia/dag-json",
3
- "version": "3.0.6-9de08ef",
3
+ "version": "3.0.6-bc64f47",
4
4
  "description": "Add/get IPLD blocks containing dag-json with your Helia node",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/ipfs/helia/tree/main/packages/dag-json#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-9de08ef",
143
+ "@helia/interface": "4.3.1-bc64f47",
143
144
  "@ipld/dag-json": "^10.2.0",
144
145
  "@libp2p/interface": "^2.0.0",
145
146
  "interface-blockstore": "^5.2.10",
package/src/index.ts CHANGED
@@ -9,11 +9,13 @@
9
9
  *
10
10
  * ```typescript
11
11
  * import { createHelia } from 'helia'
12
- * import { json } from '@helia/dag-json'
12
+ * import { dagJson } from '@helia/dag-json'
13
13
  * import { CID } from 'multiformats/cid'
14
14
  *
15
- * const j = json(helia)
16
- * const cid = await j.put({
15
+ * const helia = await createHelia()
16
+ * const j = dagJson(helia)
17
+ *
18
+ * const cid = await j.add({
17
19
  * hello: 'world'
18
20
  * })
19
21
  * const obj = await j.get(cid)
@@ -57,9 +59,12 @@ export interface DAGJSON {
57
59
  * @example
58
60
  *
59
61
  * ```typescript
60
- * import { json } from '@helia/dag-json'
62
+ * import { createHelia } from 'helia'
63
+ * import { dagJson } from '@helia/dag-json'
64
+ *
65
+ * const helia = await createHelia()
66
+ * const j = dagJson(helia)
61
67
  *
62
- * const j = json(helia)
63
68
  * const cid = await str.add({ hello: 'world' })
64
69
  *
65
70
  * console.info(cid)
@@ -75,10 +80,13 @@ export interface DAGJSON {
75
80
  * @example
76
81
  *
77
82
  * ```typescript
78
- * import { json } from '@helia/dag-json'
83
+ * import { createHelia } from 'helia'
84
+ * import { dagJson } from '@helia/dag-json'
79
85
  * import { CID } from 'multiformats/cid'
80
86
  *
81
- * const j = json(helia)
87
+ * const helia = await createHelia()
88
+ * const j = dagJson(helia)
89
+ *
82
90
  * const cid = CID.parse('baguqeerasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea')
83
91
  * const obj = await j.get(cid)
84
92
  *