@helia/utils 2.5.2-1361bfa5 → 2.5.2-16d805e1
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/index.min.js +1 -22
- package/dist/index.min.js.map +4 -4
- package/dist/src/index.d.ts +5 -171
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -162
- package/dist/src/index.js.map +1 -1
- package/dist/src/is-cid.d.ts.map +1 -0
- package/dist/src/is-cid.js.map +1 -0
- package/dist/src/is-promise.d.ts.map +1 -0
- package/dist/src/is-promise.js.map +1 -0
- package/package.json +7 -24
- package/src/index.ts +5 -368
- package/dist/src/pins.d.ts +0 -21
- package/dist/src/pins.d.ts.map +0 -1
- package/dist/src/pins.js +0 -141
- package/dist/src/pins.js.map +0 -1
- package/dist/src/routing.d.ts +0 -51
- package/dist/src/routing.d.ts.map +0 -1
- package/dist/src/routing.js +0 -311
- package/dist/src/routing.js.map +0 -1
- package/dist/src/storage.d.ts +0 -62
- package/dist/src/storage.d.ts.map +0 -1
- package/dist/src/storage.js +0 -159
- package/dist/src/storage.js.map +0 -1
- package/dist/src/utils/constants.d.ts +0 -4
- package/dist/src/utils/constants.d.ts.map +0 -1
- package/dist/src/utils/constants.js +0 -4
- package/dist/src/utils/constants.js.map +0 -1
- package/dist/src/utils/datastore-version.d.ts +0 -3
- package/dist/src/utils/datastore-version.d.ts.map +0 -1
- package/dist/src/utils/datastore-version.js +0 -20
- package/dist/src/utils/datastore-version.js.map +0 -1
- package/dist/src/utils/get-codec.d.ts +0 -4
- package/dist/src/utils/get-codec.d.ts.map +0 -1
- package/dist/src/utils/get-codec.js +0 -37
- package/dist/src/utils/get-codec.js.map +0 -1
- package/dist/src/utils/get-crypto.d.ts +0 -4
- package/dist/src/utils/get-crypto.d.ts.map +0 -1
- package/dist/src/utils/get-crypto.js +0 -35
- package/dist/src/utils/get-crypto.js.map +0 -1
- package/dist/src/utils/get-hasher.d.ts +0 -4
- package/dist/src/utils/get-hasher.d.ts.map +0 -1
- package/dist/src/utils/get-hasher.js +0 -32
- package/dist/src/utils/get-hasher.js.map +0 -1
- package/dist/src/utils/is-cid.d.ts.map +0 -1
- package/dist/src/utils/is-cid.js.map +0 -1
- package/dist/src/utils/is-promise.d.ts.map +0 -1
- package/dist/src/utils/is-promise.js.map +0 -1
- package/dist/src/utils/networked-storage.d.ts +0 -28
- package/dist/src/utils/networked-storage.d.ts.map +0 -1
- package/dist/src/utils/networked-storage.js +0 -52
- package/dist/src/utils/networked-storage.js.map +0 -1
- package/dist/src/utils/session-storage.d.ts +0 -47
- package/dist/src/utils/session-storage.d.ts.map +0 -1
- package/dist/src/utils/session-storage.js +0 -148
- package/dist/src/utils/session-storage.js.map +0 -1
- package/dist/src/utils/storage.d.ts +0 -55
- package/dist/src/utils/storage.d.ts.map +0 -1
- package/dist/src/utils/storage.js +0 -225
- package/dist/src/utils/storage.js.map +0 -1
- package/src/pins.ts +0 -209
- package/src/routing.ts +0 -389
- package/src/storage.ts +0 -194
- package/src/utils/constants.ts +0 -3
- package/src/utils/datastore-version.ts +0 -25
- package/src/utils/get-codec.ts +0 -45
- package/src/utils/get-crypto.ts +0 -44
- package/src/utils/get-hasher.ts +0 -40
- package/src/utils/networked-storage.ts +0 -74
- package/src/utils/session-storage.ts +0 -174
- package/src/utils/storage.ts +0 -294
- /package/dist/src/{utils/is-cid.d.ts → is-cid.d.ts} +0 -0
- /package/dist/src/{utils/is-cid.js → is-cid.js} +0 -0
- /package/dist/src/{utils/is-promise.d.ts → is-promise.d.ts} +0 -0
- /package/dist/src/{utils/is-promise.js → is-promise.js} +0 -0
- /package/src/{utils/is-cid.ts → is-cid.ts} +0 -0
- /package/src/{utils/is-promise.ts → is-promise.ts} +0 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,172 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
import { TypedEventEmitter } from '@libp2p/interface';
|
|
8
|
-
import { Routing as RoutingClass } from './routing.ts';
|
|
9
|
-
import { BlockStorage } from './storage.ts';
|
|
10
|
-
import type { BlockStorageInit } from './storage.ts';
|
|
11
|
-
import type { CodecLoader, GCOptions, HasherLoader, Helia as HeliaInterface, HeliaEvents, CryptoLoader, Crypto, NodeInfo, Router, HeliaMixin } from '@helia/interface';
|
|
12
|
-
import type { BlockBroker } from '@helia/interface';
|
|
13
|
-
import type { Pins } from '@helia/interface';
|
|
14
|
-
import type { Keychain, KeychainInit } from '@ipshipyard/keychain';
|
|
15
|
-
import type { ComponentLogger, Metrics } from '@libp2p/interface';
|
|
16
|
-
import type { DNS } from '@multiformats/dns';
|
|
17
|
-
import type { Blockstore } from 'interface-blockstore';
|
|
18
|
-
import type { Datastore } from 'interface-datastore';
|
|
19
|
-
import type { BlockCodec } from 'multiformats';
|
|
20
|
-
import type { MultihashHasher } from 'multiformats/hashes/interface';
|
|
21
|
-
export { AbstractSession } from './abstract-session.ts';
|
|
22
|
-
export type { AbstractCreateSessionOptions, BlockstoreSessionEvents, AbstractSessionComponents } from './abstract-session.ts';
|
|
23
|
-
export { isCID } from './utils/is-cid.ts';
|
|
24
|
-
export type { BlockStorage, BlockStorageInit };
|
|
25
|
-
export { breadthFirstWalker, depthFirstWalker, naturalOrderWalker } from './graph-walker.ts';
|
|
26
|
-
export type { GraphWalkerComponents, GraphWalkerInit, GraphNode, GraphWalker } from './graph-walker.ts';
|
|
27
|
-
/**
|
|
28
|
-
* Options used to create a Helia node.
|
|
29
|
-
*/
|
|
30
|
-
export interface HeliaInit {
|
|
31
|
-
/**
|
|
32
|
-
* By default Helia stores the node's PeerId in an encrypted form in a
|
|
33
|
-
* libp2p keystore. These options control how that keystore is configured.
|
|
34
|
-
*/
|
|
35
|
-
keychain?: KeychainInit;
|
|
36
|
-
/**
|
|
37
|
-
* The blockstore is where blocks are stored
|
|
38
|
-
*/
|
|
39
|
-
blockstore?: Blockstore;
|
|
40
|
-
/**
|
|
41
|
-
* The datastore is where data is stored
|
|
42
|
-
*/
|
|
43
|
-
datastore?: Datastore;
|
|
44
|
-
/**
|
|
45
|
-
* By default sha256, sha512 and identity hashes are supported for
|
|
46
|
-
* bitswap operations. To bitswap blocks with CIDs using other hashes
|
|
47
|
-
* pass appropriate MultihashHashers here.
|
|
48
|
-
*/
|
|
49
|
-
hashers?: MultihashHasher[];
|
|
50
|
-
/**
|
|
51
|
-
* An optional function that can load a MultihashHasher on demand. May return
|
|
52
|
-
* a promise.
|
|
53
|
-
*/
|
|
54
|
-
loadHasher?(code: number): MultihashHasher | Promise<MultihashHasher>;
|
|
55
|
-
/**
|
|
56
|
-
* In order to pin CIDs that correspond to a DAG, it's necessary to know
|
|
57
|
-
* how to traverse that DAG. DAGWalkers take a block and yield any CIDs
|
|
58
|
-
* encoded within that block.
|
|
59
|
-
*/
|
|
60
|
-
codecs?: Array<BlockCodec<any, any>>;
|
|
61
|
-
/**
|
|
62
|
-
* An optional function that can load a BlockCodec on demand. May return a
|
|
63
|
-
* promise.
|
|
64
|
-
*/
|
|
65
|
-
loadCodec?(code: number): BlockCodec<any, any> | Promise<BlockCodec<any, any>>;
|
|
66
|
-
/**
|
|
67
|
-
* A list of pre-supported public/private key implementations
|
|
68
|
-
*/
|
|
69
|
-
cryptos?: Array<Crypto>;
|
|
70
|
-
/**
|
|
71
|
-
* Dynamically load a cryptography implementation
|
|
72
|
-
*/
|
|
73
|
-
loadCrypto?: CryptoLoader;
|
|
74
|
-
/**
|
|
75
|
-
* Garbage collection requires preventing blockstore writes during searches
|
|
76
|
-
* for unpinned blocks as DAGs are typically pinned after they've been
|
|
77
|
-
* imported - without locking this could lead to the deletion of blocks while
|
|
78
|
-
* they are being added to the blockstore.
|
|
79
|
-
*
|
|
80
|
-
* By default this lock is held on the current process and other processes
|
|
81
|
-
* will contact this process for access.
|
|
82
|
-
*
|
|
83
|
-
* If Helia is being run in multiple processes, one process must hold the GC
|
|
84
|
-
* lock so use this option to control which process that is.
|
|
85
|
-
*
|
|
86
|
-
* @default true
|
|
87
|
-
*/
|
|
88
|
-
holdGcLock?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* An optional logging component to pass to libp2p. If not specified the
|
|
91
|
-
* default implementation from libp2p will be used.
|
|
92
|
-
*/
|
|
93
|
-
logger?: ComponentLogger;
|
|
94
|
-
/**
|
|
95
|
-
* A list of strategies used to fetch blocks when they are not present in
|
|
96
|
-
* the local blockstore
|
|
97
|
-
*/
|
|
98
|
-
blockBrokers?: Array<BlockBroker | ((components: any) => BlockBroker)>;
|
|
99
|
-
/**
|
|
100
|
-
* Routers perform operations such as looking up content providers,
|
|
101
|
-
* information about network peers or getting/putting records.
|
|
102
|
-
*/
|
|
103
|
-
routers?: Array<Router | ((components: any) => Router)>;
|
|
104
|
-
/**
|
|
105
|
-
* During provider lookups, peers can be returned from routing implementations
|
|
106
|
-
* with no multiaddrs.
|
|
107
|
-
*
|
|
108
|
-
* This can happen when they've been retrieved from network peers that only
|
|
109
|
-
* store multiaddrs for a limited amount of time.
|
|
110
|
-
*
|
|
111
|
-
* When this happens the peer's info has to be looked up with a further query.
|
|
112
|
-
*
|
|
113
|
-
* To not have this query block the yielding of other providers returned with
|
|
114
|
-
* multiaddrs, a separate queue is used to perform this lookup.
|
|
115
|
-
*
|
|
116
|
-
* This config value controls the concurrency of that queue.
|
|
117
|
-
*
|
|
118
|
-
* @default 5
|
|
119
|
-
*/
|
|
120
|
-
providerLookupConcurrency?: number;
|
|
121
|
-
/**
|
|
122
|
-
* Components used by subclasses
|
|
123
|
-
*/
|
|
124
|
-
components?: Record<string, any>;
|
|
125
|
-
/**
|
|
126
|
-
* An optional DNS implementation used to perform queries for DNS records.
|
|
127
|
-
*/
|
|
128
|
-
dns?: DNS;
|
|
129
|
-
/**
|
|
130
|
-
* A metrics object that can be used to collected arbitrary stats about node
|
|
131
|
-
* usage.
|
|
132
|
-
*/
|
|
133
|
-
metrics?: Metrics;
|
|
134
|
-
/**
|
|
135
|
-
* Limit the maximum supported size of identity hash digests to this value
|
|
136
|
-
*
|
|
137
|
-
* @default 128
|
|
138
|
-
*/
|
|
139
|
-
maxIdentityHashDigestLength?: number;
|
|
140
|
-
}
|
|
141
|
-
export declare class Helia implements HeliaInterface {
|
|
142
|
-
info: NodeInfo;
|
|
143
|
-
blockstore: BlockStorage;
|
|
144
|
-
datastore: Datastore;
|
|
145
|
-
events: TypedEventEmitter<HeliaEvents<this>>;
|
|
146
|
-
pins: Pins;
|
|
147
|
-
logger: ComponentLogger;
|
|
148
|
-
routing: RoutingClass;
|
|
149
|
-
getCodec: CodecLoader;
|
|
150
|
-
getHasher: HasherLoader;
|
|
151
|
-
getCrypto: CryptoLoader;
|
|
152
|
-
dns: DNS;
|
|
153
|
-
keychain: Keychain;
|
|
154
|
-
metrics?: Metrics;
|
|
155
|
-
status: 'stopped' | 'stopping' | 'starting' | 'started';
|
|
156
|
-
private readonly log;
|
|
157
|
-
private readonly blockBrokers;
|
|
158
|
-
private readonly mixins;
|
|
159
|
-
constructor(init: HeliaInit & {
|
|
160
|
-
name: string;
|
|
161
|
-
version: string;
|
|
162
|
-
});
|
|
163
|
-
hasRouter(name: string): boolean;
|
|
164
|
-
addRouter(router: Router): void;
|
|
165
|
-
hasBlockBroker(name: string): boolean;
|
|
166
|
-
addBlockBroker(blockBroker: BlockBroker): void;
|
|
167
|
-
addMixin(mixin: HeliaMixin): void;
|
|
168
|
-
start(): Promise<this>;
|
|
169
|
-
stop(): Promise<this>;
|
|
170
|
-
gc(options?: GCOptions): Promise<void>;
|
|
171
|
-
}
|
|
1
|
+
export * from './abstract-session.ts';
|
|
2
|
+
export * from './errors.ts';
|
|
3
|
+
export * from './graph-walker.ts';
|
|
4
|
+
export * from './is-cid.ts';
|
|
5
|
+
export * from './is-promise.ts';
|
|
172
6
|
//# 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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,163 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
import { keychain } from '@ipshipyard/keychain';
|
|
8
|
-
import { start, stop, TypedEventEmitter } from '@libp2p/interface';
|
|
9
|
-
import { dns } from '@multiformats/dns';
|
|
10
|
-
import { defaultLogger } from 'birnam';
|
|
11
|
-
import { MemoryBlockstore } from 'blockstore-core';
|
|
12
|
-
import { MemoryDatastore } from 'datastore-core';
|
|
13
|
-
import drain from 'it-drain';
|
|
14
|
-
import { CustomProgressEvent } from 'progress-events';
|
|
15
|
-
import { PinsImpl } from "./pins.js";
|
|
16
|
-
import { Routing as RoutingClass } from "./routing.js";
|
|
17
|
-
import { BlockStorage } from "./storage.js";
|
|
18
|
-
import { assertDatastoreVersionIsCurrent } from "./utils/datastore-version.js";
|
|
19
|
-
import { getCodec } from "./utils/get-codec.js";
|
|
20
|
-
import { getCrypto } from "./utils/get-crypto.js";
|
|
21
|
-
import { getHasher } from "./utils/get-hasher.js";
|
|
22
|
-
import { NetworkedStorage } from "./utils/networked-storage.js";
|
|
23
|
-
export { AbstractSession } from "./abstract-session.js";
|
|
24
|
-
export { isCID } from "./utils/is-cid.js";
|
|
25
|
-
export { breadthFirstWalker, depthFirstWalker, naturalOrderWalker } from "./graph-walker.js";
|
|
26
|
-
export class Helia {
|
|
27
|
-
info;
|
|
28
|
-
blockstore;
|
|
29
|
-
datastore;
|
|
30
|
-
events;
|
|
31
|
-
pins;
|
|
32
|
-
logger;
|
|
33
|
-
routing;
|
|
34
|
-
getCodec;
|
|
35
|
-
getHasher;
|
|
36
|
-
getCrypto;
|
|
37
|
-
dns;
|
|
38
|
-
keychain;
|
|
39
|
-
metrics;
|
|
40
|
-
status;
|
|
41
|
-
log;
|
|
42
|
-
blockBrokers;
|
|
43
|
-
mixins;
|
|
44
|
-
constructor(init) {
|
|
45
|
-
this.info = {
|
|
46
|
-
name: init.name,
|
|
47
|
-
version: init.version
|
|
48
|
-
};
|
|
49
|
-
this.logger = init.logger ?? defaultLogger();
|
|
50
|
-
this.log = this.logger.forComponent('helia');
|
|
51
|
-
this.getHasher = getHasher(init.hashers, init.loadHasher);
|
|
52
|
-
this.getCodec = getCodec(init.codecs, init.loadCodec);
|
|
53
|
-
this.getCrypto = getCrypto(init.cryptos, init.loadCrypto);
|
|
54
|
-
this.dns = init.dns ?? dns();
|
|
55
|
-
this.metrics = init.metrics;
|
|
56
|
-
this.events = new TypedEventEmitter();
|
|
57
|
-
this.status = 'stopped';
|
|
58
|
-
this.mixins = [];
|
|
59
|
-
// @ts-expect-error routing and keychain are not set
|
|
60
|
-
const components = {
|
|
61
|
-
blockstore: init.blockstore ?? new MemoryBlockstore(),
|
|
62
|
-
datastore: init.datastore ?? new MemoryDatastore(),
|
|
63
|
-
logger: this.logger,
|
|
64
|
-
blockBrokers: [],
|
|
65
|
-
getHasher: this.getHasher,
|
|
66
|
-
getCodec: this.getCodec,
|
|
67
|
-
getCrypto: this.getCrypto,
|
|
68
|
-
dns: this.dns,
|
|
69
|
-
metrics: this.metrics,
|
|
70
|
-
...(init.components ?? {})
|
|
71
|
-
};
|
|
72
|
-
this.keychain = components.keychain = keychain()(components);
|
|
73
|
-
this.routing = components.routing = new RoutingClass(components, {
|
|
74
|
-
routers: (init.routers ?? []).flatMap((router) => {
|
|
75
|
-
if (typeof router === 'function') {
|
|
76
|
-
router = router(components);
|
|
77
|
-
}
|
|
78
|
-
// if the router itself is a router
|
|
79
|
-
const routers = [
|
|
80
|
-
router
|
|
81
|
-
];
|
|
82
|
-
return routers;
|
|
83
|
-
}),
|
|
84
|
-
providerLookupConcurrency: init.providerLookupConcurrency
|
|
85
|
-
});
|
|
86
|
-
this.blockBrokers = components.blockBrokers = (init.blockBrokers ?? []).map((broker) => {
|
|
87
|
-
if (typeof broker === 'function') {
|
|
88
|
-
broker = broker(components);
|
|
89
|
-
}
|
|
90
|
-
return broker;
|
|
91
|
-
});
|
|
92
|
-
const networkedStorage = new NetworkedStorage(components, init);
|
|
93
|
-
this.pins = new PinsImpl(components.datastore, networkedStorage, this.getCodec);
|
|
94
|
-
this.blockstore = new BlockStorage(networkedStorage, this.pins, this.routing, {
|
|
95
|
-
holdGcLock: init.holdGcLock ?? true
|
|
96
|
-
});
|
|
97
|
-
this.datastore = components.datastore;
|
|
98
|
-
}
|
|
99
|
-
hasRouter(name) {
|
|
100
|
-
return this.routing.hasRouter(name);
|
|
101
|
-
}
|
|
102
|
-
addRouter(router) {
|
|
103
|
-
this.routing.addRouter(router);
|
|
104
|
-
}
|
|
105
|
-
hasBlockBroker(name) {
|
|
106
|
-
return this.blockBrokers.findIndex(b => b.name === name) !== -1;
|
|
107
|
-
}
|
|
108
|
-
addBlockBroker(blockBroker) {
|
|
109
|
-
this.blockBrokers.push(blockBroker);
|
|
110
|
-
}
|
|
111
|
-
addMixin(mixin) {
|
|
112
|
-
this.mixins.push(mixin);
|
|
113
|
-
}
|
|
114
|
-
async start() {
|
|
115
|
-
this.status = 'starting';
|
|
116
|
-
await assertDatastoreVersionIsCurrent(this.datastore);
|
|
117
|
-
await start(this.blockstore, this.datastore, this.routing, ...this.blockBrokers);
|
|
118
|
-
for (const mixin of this.mixins) {
|
|
119
|
-
await mixin.start?.(this);
|
|
120
|
-
}
|
|
121
|
-
this.status = 'started';
|
|
122
|
-
this.events.dispatchEvent(new CustomEvent('start', { detail: this }));
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
async stop() {
|
|
126
|
-
this.status = 'stopping';
|
|
127
|
-
for (const mixin of this.mixins) {
|
|
128
|
-
await mixin.stop?.(this);
|
|
129
|
-
}
|
|
130
|
-
await stop(this.blockstore, this.datastore, this.routing, ...this.blockBrokers);
|
|
131
|
-
this.status = 'stopped';
|
|
132
|
-
this.events.dispatchEvent(new CustomEvent('stop', { detail: this }));
|
|
133
|
-
return this;
|
|
134
|
-
}
|
|
135
|
-
async gc(options = {}) {
|
|
136
|
-
const releaseLock = await this.blockstore.lock.writeLock();
|
|
137
|
-
try {
|
|
138
|
-
const helia = this;
|
|
139
|
-
const blockstore = this.blockstore.unwrap();
|
|
140
|
-
this.log('gc start');
|
|
141
|
-
await drain(blockstore.deleteMany((async function* () {
|
|
142
|
-
for await (const { cid } of blockstore.getAll()) {
|
|
143
|
-
try {
|
|
144
|
-
if (await helia.pins.isPinned(cid, options)) {
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
yield cid;
|
|
148
|
-
options.onProgress?.(new CustomProgressEvent('helia:gc:deleted', cid));
|
|
149
|
-
}
|
|
150
|
-
catch (err) {
|
|
151
|
-
helia.log.error('error during gc - %e', err);
|
|
152
|
-
options.onProgress?.(new CustomProgressEvent('helia:gc:error', err));
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}())));
|
|
156
|
-
}
|
|
157
|
-
finally {
|
|
158
|
-
releaseLock();
|
|
159
|
-
}
|
|
160
|
-
this.log('gc finished');
|
|
161
|
-
}
|
|
162
|
-
}
|
|
1
|
+
export * from "./abstract-session.js";
|
|
2
|
+
export * from "./errors.js";
|
|
3
|
+
export * from "./graph-walker.js";
|
|
4
|
+
export * from "./is-cid.js";
|
|
5
|
+
export * from "./is-promise.js";
|
|
163
6
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-cid.d.ts","sourceRoot":"","sources":["../../src/is-cid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,wBAAgB,KAAK,CAAE,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,CAM5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-cid.js","sourceRoot":"","sources":["../../src/is-cid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,MAAM,UAAU,KAAK,CAAE,GAAS;IAC9B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-promise.d.ts","sourceRoot":"","sources":["../../src/is-promise.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAE,CAAC,EAAG,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-promise.js","sourceRoot":"","sources":["../../src/is-promise.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAM,CAAO;IACpC,OAAO,CAAC,EAAE,IAAI,IAAI,IAAI,CAAA;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/utils",
|
|
3
|
-
"version": "2.5.2-
|
|
3
|
+
"version": "2.5.2-16d805e1",
|
|
4
4
|
"description": "Shared code that implements the Helia API",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/utils#readme",
|
|
@@ -48,47 +48,30 @@
|
|
|
48
48
|
"test:electron-main": "aegir test -t electron-main"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@helia/interface": "6.2.1-
|
|
52
|
-
"@ipld/dag-cbor": "^10.0.1",
|
|
53
|
-
"@ipld/dag-json": "^11.0.0",
|
|
54
|
-
"@ipld/dag-pb": "^4.1.7",
|
|
55
|
-
"@ipshipyard/crypto": "^1.1.0",
|
|
56
|
-
"@ipshipyard/keychain": "^1.0.2",
|
|
51
|
+
"@helia/interface": "6.2.1-16d805e1",
|
|
57
52
|
"@libp2p/interface": "^3.2.3",
|
|
58
53
|
"@libp2p/utils": "^7.2.2",
|
|
59
|
-
"@multiformats/dns": "^1.0.13",
|
|
60
54
|
"@multiformats/multiaddr": "^13.0.3",
|
|
61
|
-
"abort-error": "^1.0.2",
|
|
62
|
-
"any-signal": "^4.2.0",
|
|
63
|
-
"birnam": "^1.0.0",
|
|
64
|
-
"blockstore-core": "^7.0.1",
|
|
65
|
-
"cborg": "^5.1.1",
|
|
66
|
-
"datastore-core": "^12.0.1",
|
|
67
|
-
"interface-blockstore": "^7.0.1",
|
|
68
|
-
"interface-datastore": "^10.0.1",
|
|
69
|
-
"it-drain": "^3.0.12",
|
|
70
55
|
"it-filter": "^3.1.6",
|
|
71
|
-
"it-foreach": "^2.1.7",
|
|
72
|
-
"it-merge": "^3.0.14",
|
|
73
56
|
"it-to-buffer": "^5.0.0",
|
|
74
|
-
"mortice": "^3.3.1",
|
|
75
57
|
"multiformats": "^14.0.0",
|
|
76
58
|
"p-defer": "^4.0.1",
|
|
77
59
|
"progress-events": "^1.1.0",
|
|
78
|
-
"race-signal": "^2.0.0"
|
|
79
|
-
"uint8arrays": "^6.1.1"
|
|
60
|
+
"race-signal": "^2.0.0"
|
|
80
61
|
},
|
|
81
62
|
"devDependencies": {
|
|
63
|
+
"@ipld/dag-cbor": "^10.0.1",
|
|
82
64
|
"@libp2p/crypto": "^5.1.19",
|
|
83
65
|
"@libp2p/logger": "^6.2.8",
|
|
84
66
|
"@libp2p/peer-id": "^6.0.10",
|
|
85
67
|
"@types/sinon": "^21.0.1",
|
|
86
68
|
"aegir": "^48.0.11",
|
|
69
|
+
"blockstore-core": "^7.0.1",
|
|
87
70
|
"delay": "^7.0.0",
|
|
71
|
+
"interface-blockstore": "^7.0.1",
|
|
88
72
|
"it-all": "^3.0.11",
|
|
89
73
|
"it-map": "^3.1.6",
|
|
90
|
-
"sinon": "^22.0.0"
|
|
91
|
-
"sinon-ts": "^2.0.0"
|
|
74
|
+
"sinon": "^22.0.0"
|
|
92
75
|
},
|
|
93
76
|
"sideEffects": false
|
|
94
77
|
}
|