@libp2p/logger 1.1.5 → 2.0.1
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 +20 -14
- package/package.json +9 -8
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
# libp2p
|
|
1
|
+
# @libp2p/logger <!-- omit in toc -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](http://libp2p.io/)
|
|
4
|
+
[](http://webchat.freenode.net/?channels=%23libp2p)
|
|
5
|
+
[](https://discuss.libp2p.io)
|
|
6
|
+
[](https://codecov.io/gh/libp2p/js-libp2p-logger)
|
|
7
|
+
[](https://github.com/libp2p/js-libp2p-logger/actions/workflows/js-test-and-release.yml)
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
> A logging component for use in js-libp2p modules
|
|
6
10
|
|
|
11
|
+
## Table of contents <!-- omit in toc -->
|
|
12
|
+
|
|
13
|
+
- [Install](#install)
|
|
7
14
|
- [Description](#description)
|
|
8
|
-
- [Installation](#installation)
|
|
9
15
|
- [Example](#example)
|
|
10
16
|
- [License](#license)
|
|
11
|
-
|
|
17
|
+
- [Contribution](#contribution)
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```console
|
|
22
|
+
$ npm i @libp2p/logger
|
|
23
|
+
```
|
|
12
24
|
|
|
13
25
|
## Description
|
|
14
26
|
|
|
@@ -16,12 +28,6 @@ A map that reports it's size to the libp2p [Metrics](https://github.com/libp2p/j
|
|
|
16
28
|
|
|
17
29
|
If metrics are disabled a regular map is used.
|
|
18
30
|
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```console
|
|
22
|
-
$ npm i @libp2p/logger
|
|
23
|
-
```
|
|
24
|
-
|
|
25
31
|
## Example
|
|
26
32
|
|
|
27
33
|
```JavaScript
|
|
@@ -50,9 +56,9 @@ with this base32: bafyfoo
|
|
|
50
56
|
|
|
51
57
|
Licensed under either of
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
60
|
+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
## Contribution
|
|
57
63
|
|
|
58
64
|
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/logger",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A logging component for use in js-libp2p
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "A logging component for use in js-libp2p modules",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
|
-
"homepage": "https://github.com/libp2p/js-libp2p-
|
|
6
|
+
"homepage": "https://github.com/libp2p/js-libp2p-logger#readme",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/libp2p/js-libp2p-
|
|
9
|
+
"url": "git+https://github.com/libp2p/js-libp2p-logger.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/libp2p/js-libp2p-
|
|
12
|
+
"url": "https://github.com/libp2p/js-libp2p-logger/issues"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"IPFS"
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
31
|
+
"types": "./src/index.d.ts",
|
|
31
32
|
"import": "./dist/src/index.js"
|
|
32
33
|
}
|
|
33
34
|
},
|
|
@@ -133,13 +134,13 @@
|
|
|
133
134
|
"release": "aegir release"
|
|
134
135
|
},
|
|
135
136
|
"dependencies": {
|
|
136
|
-
"@libp2p/
|
|
137
|
+
"@libp2p/interface-peer-id": "^1.0.2",
|
|
137
138
|
"debug": "^4.3.3",
|
|
138
|
-
"interface-datastore": "^
|
|
139
|
+
"interface-datastore": "^7.0.0",
|
|
139
140
|
"multiformats": "^9.6.3"
|
|
140
141
|
},
|
|
141
142
|
"devDependencies": {
|
|
142
143
|
"@types/debug": "^4.1.7",
|
|
143
|
-
"aegir": "^37.0
|
|
144
|
+
"aegir": "^37.2.0"
|
|
144
145
|
}
|
|
145
146
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import debug from 'debug'
|
|
|
2
2
|
import { base58btc } from 'multiformats/bases/base58'
|
|
3
3
|
import { base32 } from 'multiformats/bases/base32'
|
|
4
4
|
import { base64 } from 'multiformats/bases/base64'
|
|
5
|
-
import type { PeerId } from '@libp2p/
|
|
5
|
+
import type { PeerId } from '@libp2p/interface-peer-id'
|
|
6
6
|
import type { CID } from 'multiformats/cid'
|
|
7
7
|
import type { Key } from 'interface-datastore'
|
|
8
8
|
|