@helia/strings 2.0.1 → 3.0.0-1ee6a4a
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/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +7 -7
- package/src/index.ts +4 -3
- package/dist/typedoc-urls.json +0 -12
package/dist/src/index.d.ts
CHANGED
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
import { CID } from 'multiformats/cid';
|
|
24
|
-
import type {
|
|
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:
|
|
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:
|
|
86
|
+
blockstore: Blockstore;
|
|
86
87
|
}): Strings;
|
|
87
88
|
//# 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;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,GAA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U,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC9D;AA2BD;;GAEG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG,OAAO,CAEnE"}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAiEtE,MAAM,cAAc;IACD,UAAU,CAAmB;IAE9C,YAAa,UAA6B;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,GAAG,CAAE,MAAc,EAAE,UAA+B,EAAE;QAC1D,MAAM,GAAG,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;QACxC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACzD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,GAAG,CAAA;QAClC,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAE1C,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QAEvD,OAAO,GAAG,CAAA;IACZ,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
|
+
"version": "3.0.0-1ee6a4a",
|
|
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": "
|
|
145
|
-
"@libp2p/interfaces": "^3.3.
|
|
146
|
-
"
|
|
144
|
+
"@helia/interface": "4.0.0-1ee6a4a",
|
|
145
|
+
"@libp2p/interfaces": "^3.3.2",
|
|
146
|
+
"interface-blockstore": "^5.2.9",
|
|
147
|
+
"multiformats": "^13.0.1",
|
|
147
148
|
"progress-events": "^1.0.0",
|
|
148
149
|
"uint8arrays": "^5.0.1"
|
|
149
150
|
},
|
|
150
151
|
"devDependencies": {
|
|
151
|
-
"aegir": "^42.
|
|
152
|
-
"blockstore-core": "^4.
|
|
153
|
-
"interface-blockstore": "^5.2.9"
|
|
152
|
+
"aegir": "^42.2.2",
|
|
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 {
|
|
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:
|
|
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:
|
|
121
|
+
export function strings (helia: { blockstore: Blockstore }): Strings {
|
|
121
122
|
return new DefaultStrings(helia)
|
|
122
123
|
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -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
|
-
}
|