@helia/interface 4.2.0 → 4.3.0-011fa92

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.
@@ -16,7 +16,7 @@
16
16
  import type { Blocks } from './blocks.js';
17
17
  import type { Pins } from './pins.js';
18
18
  import type { Routing } from './routing.js';
19
- import type { AbortOptions, ComponentLogger } from '@libp2p/interface';
19
+ import type { AbortOptions, ComponentLogger, Metrics } from '@libp2p/interface';
20
20
  import type { DNS } from '@multiformats/dns';
21
21
  import type { Datastore } from 'interface-datastore';
22
22
  import type { MultihashHasher } from 'multiformats';
@@ -63,6 +63,11 @@ export interface Helia {
63
63
  * will use a resolver appropriate to the current platform.
64
64
  */
65
65
  dns: DNS;
66
+ /**
67
+ * A metrics object that can be used to collected arbitrary stats about node
68
+ * usage.
69
+ */
70
+ metrics?: Metrics;
66
71
  /**
67
72
  * Starts the Helia node
68
73
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAErE,YAAY,EAAE,KAA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EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,MAAM,MAAM,QAAQ,GAClB,aAAa,CAAC,kBAAkB,EAAE,GAAG,CAAC,GACtC,aAAa,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAA;AAExC,MAAM,WAAW,SAAU,SAAQ,YAAY,EAAE,eAAe,CAAC,QAAQ,CAAC;CAEzE;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;CACzD;AAED,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA8FH,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAoGH,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helia/interface",
3
- "version": "4.2.0",
3
+ "version": "4.3.0-011fa92",
4
4
  "description": "The Helia API",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/ipfs/helia/tree/main/packages/interface#readme",
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@
17
17
  import type { Blocks } from './blocks.js'
18
18
  import type { Pins } from './pins.js'
19
19
  import type { Routing } from './routing.js'
20
- import type { AbortOptions, ComponentLogger } from '@libp2p/interface'
20
+ import type { AbortOptions, ComponentLogger, Metrics } from '@libp2p/interface'
21
21
  import type { DNS } from '@multiformats/dns'
22
22
  import type { Datastore } from 'interface-datastore'
23
23
  import type { MultihashHasher } from 'multiformats'
@@ -74,6 +74,12 @@ export interface Helia {
74
74
  */
75
75
  dns: DNS
76
76
 
77
+ /**
78
+ * A metrics object that can be used to collected arbitrary stats about node
79
+ * usage.
80
+ */
81
+ metrics?: Metrics
82
+
77
83
  /**
78
84
  * Starts the Helia node
79
85
  */
@@ -1,65 +0,0 @@
1
- {
2
- "AddOptions": "https://ipfs.github.io/helia/interfaces/helia.AddOptions.html",
3
- "./pins:AddOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.AddOptions.html",
4
- "BlockAnnounceOptions": "https://ipfs.github.io/helia/interfaces/helia.BlockAnnounceOptions.html",
5
- "./blocks:BlockAnnounceOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.BlockAnnounceOptions.html",
6
- "BlockBroker": "https://ipfs.github.io/helia/interfaces/helia.BlockBroker.html",
7
- "./blocks:BlockBroker": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.BlockBroker.html",
8
- "BlockRetrievalOptions": "https://ipfs.github.io/helia/interfaces/helia.BlockRetrievalOptions.html",
9
- "./blocks:BlockRetrievalOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.BlockRetrievalOptions.html",
10
- "Blocks": "https://ipfs.github.io/helia/interfaces/helia.Blocks.html",
11
- "./blocks:Blocks": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.Blocks.html",
12
- "CreateSessionOptions": "https://ipfs.github.io/helia/interfaces/helia.CreateSessionOptions.html",
13
- "./blocks:CreateSessionOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.CreateSessionOptions.html",
14
- "GCOptions": "https://ipfs.github.io/helia/interfaces/helia.GCOptions.html",
15
- ".:GCOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.index.GCOptions.html",
16
- "GetOfflineOptions": "https://ipfs.github.io/helia/interfaces/helia.GetOfflineOptions.html",
17
- "./blocks:GetOfflineOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.GetOfflineOptions.html",
18
- "Helia": "https://ipfs.github.io/helia/interfaces/helia.Helia.html",
19
- ".:Helia": "https://ipfs.github.io/helia/interfaces/_helia_interface.index.Helia.html",
20
- "IsPinnedOptions": "https://ipfs.github.io/helia/interfaces/helia.IsPinnedOptions.html",
21
- "./pins:IsPinnedOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.IsPinnedOptions.html",
22
- "LsOptions": "https://ipfs.github.io/helia/interfaces/helia.LsOptions.html",
23
- "./pins:LsOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.LsOptions.html",
24
- "Pair": "https://ipfs.github.io/helia/interfaces/helia.Pair.html",
25
- "./blocks:Pair": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.Pair.html",
26
- "Pin": "https://ipfs.github.io/helia/interfaces/helia.Pin.html",
27
- "./pins:Pin": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.Pin.html",
28
- "Pins": "https://ipfs.github.io/helia/interfaces/helia.Pins.html",
29
- "./pins:Pins": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.Pins.html",
30
- "Provider": "https://ipfs.github.io/helia/interfaces/helia.Provider.html",
31
- "RmOptions": "https://ipfs.github.io/helia/interfaces/helia.RmOptions.html",
32
- "./pins:RmOptions": "https://ipfs.github.io/helia/interfaces/_helia_interface.pins.RmOptions.html",
33
- "Routing": "https://ipfs.github.io/helia/interfaces/helia.Routing.html",
34
- "RoutingOptions": "https://ipfs.github.io/helia/interfaces/helia.RoutingOptions.html",
35
- "SessionBlockstore": "https://ipfs.github.io/helia/interfaces/helia.SessionBlockstore.html",
36
- "./blocks:SessionBlockstore": "https://ipfs.github.io/helia/interfaces/_helia_interface.blocks.SessionBlockstore.html",
37
- "AddPinEvents": "https://ipfs.github.io/helia/types/helia.AddPinEvents.html",
38
- "./pins:AddPinEvents": "https://ipfs.github.io/helia/types/_helia_interface.pins.AddPinEvents.html",
39
- "DeleteBlockProgressEvents": "https://ipfs.github.io/helia/types/helia.DeleteBlockProgressEvents.html",
40
- "./blocks:DeleteBlockProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.DeleteBlockProgressEvents.html",
41
- "DeleteManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/helia.DeleteManyBlocksProgressEvents.html",
42
- "./blocks:DeleteManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.DeleteManyBlocksProgressEvents.html",
43
- "GcEvents": "https://ipfs.github.io/helia/types/helia.GcEvents.html",
44
- ".:GcEvents": "https://ipfs.github.io/helia/types/_helia_interface.index.GcEvents.html",
45
- "GetAllBlocksProgressEvents": "https://ipfs.github.io/helia/types/helia.GetAllBlocksProgressEvents.html",
46
- "./blocks:GetAllBlocksProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.GetAllBlocksProgressEvents.html",
47
- "GetBlockProgressEvents": "https://ipfs.github.io/helia/types/helia.GetBlockProgressEvents.html",
48
- "./blocks:GetBlockProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.GetBlockProgressEvents.html",
49
- "GetManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/helia.GetManyBlocksProgressEvents.html",
50
- "./blocks:GetManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.GetManyBlocksProgressEvents.html",
51
- "HasBlockProgressEvents": "https://ipfs.github.io/helia/types/helia.HasBlockProgressEvents.html",
52
- "./blocks:HasBlockProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.HasBlockProgressEvents.html",
53
- "PinType": "https://ipfs.github.io/helia/types/helia.PinType.html",
54
- "./pins:PinType": "https://ipfs.github.io/helia/types/_helia_interface.pins.PinType.html",
55
- "PutBlockProgressEvents": "https://ipfs.github.io/helia/types/helia.PutBlockProgressEvents.html",
56
- "./blocks:PutBlockProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.PutBlockProgressEvents.html",
57
- "PutManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/helia.PutManyBlocksProgressEvents.html",
58
- "./blocks:PutManyBlocksProgressEvents": "https://ipfs.github.io/helia/types/_helia_interface.blocks.PutManyBlocksProgressEvents.html",
59
- "DEFAULT_SESSION_MAX_PROVIDERS": "https://ipfs.github.io/helia/variables/helia.DEFAULT_SESSION_MAX_PROVIDERS.html",
60
- "./blocks:DEFAULT_SESSION_MAX_PROVIDERS": "https://ipfs.github.io/helia/variables/_helia_interface.blocks.DEFAULT_SESSION_MAX_PROVIDERS.html",
61
- "DEFAULT_SESSION_MIN_PROVIDERS": "https://ipfs.github.io/helia/variables/helia.DEFAULT_SESSION_MIN_PROVIDERS.html",
62
- "./blocks:DEFAULT_SESSION_MIN_PROVIDERS": "https://ipfs.github.io/helia/variables/_helia_interface.blocks.DEFAULT_SESSION_MIN_PROVIDERS.html",
63
- "DAGWalker": "https://ipfs.github.io/helia/interfaces/_helia_http.DAGWalker.html",
64
- ".:DAGWalker": "https://ipfs.github.io/helia/interfaces/_helia_interface.index.DAGWalker.html"
65
- }