@helia/strings 3.0.0 → 3.0.1-a64e5de

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
@@ -15,6 +15,21 @@
15
15
 
16
16
  # About
17
17
 
18
+ <!--
19
+
20
+ !IMPORTANT!
21
+
22
+ Everything in this README between "# About" and "# Install" is automatically
23
+ generated and will be overwritten the next time the doc generator is run.
24
+
25
+ To make changes to this section, please update the @packageDocumentation section
26
+ of src/index.js or src/index.ts
27
+
28
+ To experiment with formatting, please run "npm run docs" from the root of this
29
+ repo and examine the changes made.
30
+
31
+ -->
32
+
18
33
  `@helia/strings` makes working with strings Helia simple & straightforward.
19
34
 
20
35
  See the [API docs](https://ipfs.github.io/helia/modules/_helia_strings.html) for all available operations.
@@ -21,13 +21,14 @@
21
21
  * ```
22
22
  */
23
23
  import { CID } from 'multiformats/cid';
24
- import type { Blocks, GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks';
24
+ import type { GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks';
25
25
  import type { AbortOptions } from '@libp2p/interfaces';
26
+ import type { Blockstore } from 'interface-blockstore';
26
27
  import type { BlockCodec } from 'multiformats/codecs/interface';
27
28
  import type { MultihashHasher } from 'multiformats/hashes/interface';
28
29
  import type { ProgressOptions } from 'progress-events';
29
30
  export interface StringsComponents {
30
- blockstore: Blocks;
31
+ blockstore: Blockstore;
31
32
  }
32
33
  export interface AddOptions extends AbortOptions, ProgressOptions<PutBlockProgressEvents> {
33
34
  hasher: MultihashHasher;
@@ -82,6 +83,6 @@ export interface Strings {
82
83
  * Create a {@link Strings} instance for use with {@link https://github.com/ipfs/helia Helia}
83
84
  */
84
85
  export declare function strings(helia: {
85
- blockstore: Blocks;
86
+ blockstore: Blockstore;
86
87
  }): Strings;
87
88
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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CAAC;IAED,KAAK,CAAC,GAAG,CAAE,GAAQ,EAAE,UAA+B,EAAE;QACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAE9D,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAA;IAChC,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/strings",
3
- "version": "3.0.0",
3
+ "version": "3.0.1-a64e5de",
4
4
  "description": "Add/get IPLD blocks containing strings with your Helia node",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/ipfs/helia/tree/main/packages/strings#readme",
@@ -141,15 +141,15 @@
141
141
  "release": "aegir release"
142
142
  },
143
143
  "dependencies": {
144
- "@helia/interface": "^4.0.0",
145
- "@libp2p/interfaces": "^3.3.1",
146
- "multiformats": "^13.0.0",
144
+ "@helia/interface": "4.0.1-a64e5de",
145
+ "@libp2p/interfaces": "^3.3.2",
146
+ "interface-blockstore": "^5.2.10",
147
+ "multiformats": "^13.1.0",
147
148
  "progress-events": "^1.0.0",
148
- "uint8arrays": "^5.0.1"
149
+ "uint8arrays": "^5.0.2"
149
150
  },
150
151
  "devDependencies": {
151
- "aegir": "^42.1.0",
152
- "blockstore-core": "^4.3.10",
153
- "interface-blockstore": "^5.2.9"
152
+ "aegir": "^42.2.5",
153
+ "blockstore-core": "^4.4.0"
154
154
  }
155
155
  }
package/src/index.ts CHANGED
@@ -26,14 +26,15 @@ import * as raw from 'multiformats/codecs/raw'
26
26
  import { sha256 } from 'multiformats/hashes/sha2'
27
27
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
28
28
  import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
29
- import type { Blocks, GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks'
29
+ import type { GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks'
30
30
  import type { AbortOptions } from '@libp2p/interfaces'
31
+ import type { Blockstore } from 'interface-blockstore'
31
32
  import type { BlockCodec } from 'multiformats/codecs/interface'
32
33
  import type { MultihashHasher } from 'multiformats/hashes/interface'
33
34
  import type { ProgressOptions } from 'progress-events'
34
35
 
35
36
  export interface StringsComponents {
36
- blockstore: Blocks
37
+ blockstore: Blockstore
37
38
  }
38
39
 
39
40
  export interface AddOptions extends AbortOptions, ProgressOptions<PutBlockProgressEvents> {
@@ -117,6 +118,6 @@ class DefaultStrings implements Strings {
117
118
  /**
118
119
  * Create a {@link Strings} instance for use with {@link https://github.com/ipfs/helia Helia}
119
120
  */
120
- export function strings (helia: { blockstore: Blocks }): Strings {
121
+ export function strings (helia: { blockstore: Blockstore }): Strings {
121
122
  return new DefaultStrings(helia)
122
123
  }
@@ -1,12 +0,0 @@
1
- {
2
- "AddOptions": "https://ipfs.github.io/helia/interfaces/_helia_strings.AddOptions.html",
3
- ".:AddOptions": "https://ipfs.github.io/helia/interfaces/_helia_strings.AddOptions.html",
4
- "GetOptions": "https://ipfs.github.io/helia/interfaces/_helia_strings.GetOptions.html",
5
- ".:GetOptions": "https://ipfs.github.io/helia/interfaces/_helia_strings.GetOptions.html",
6
- "Strings": "https://ipfs.github.io/helia/interfaces/_helia_strings.Strings.html",
7
- ".:Strings": "https://ipfs.github.io/helia/interfaces/_helia_strings.Strings.html",
8
- "StringsComponents": "https://ipfs.github.io/helia/interfaces/_helia_strings.StringsComponents.html",
9
- ".:StringsComponents": "https://ipfs.github.io/helia/interfaces/_helia_strings.StringsComponents.html",
10
- "strings": "https://ipfs.github.io/helia/functions/_helia_strings.strings-1.html",
11
- ".:strings": "https://ipfs.github.io/helia/functions/_helia_strings.strings-1.html"
12
- }