@constl/utils-tests 2.2.3 → 2.2.4
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/h/303/251lia.d.ts.map +1 -1
- package/dist/h/303/251lia.js +16 -4
- package/dist/h/303/251lia.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/src/h/303/251lia.ts +16 -4
- package/src/version.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hélia.d.ts","sourceRoot":"","sources":["../src/hélia.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hélia.d.ts","sourceRoot":"","sources":["../src/hélia.ts"],"names":[],"mappings":"AASA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAI3B,eAAO,MAAM,eAAe,oBAGzB;IACD,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAG,OAAO,CAAC;IACV,MAAM,EAAE,eAAe,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAC9C,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B,CAiDA,CAAC"}
|
package/dist/h/303/251lia.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
2
|
import { MemoryBlockstore } from "blockstore-core";
|
|
3
|
-
import {
|
|
3
|
+
import { createHeliaLight } from "helia";
|
|
4
|
+
import * as dagCbor from '@ipld/dag-cbor';
|
|
5
|
+
import * as dagJson from '@ipld/dag-json';
|
|
6
|
+
import * as json from 'multiformats/codecs/json';
|
|
7
|
+
import { sha512 } from 'multiformats/hashes/sha2';
|
|
4
8
|
import { IDBBlockstore } from "blockstore-idb";
|
|
5
9
|
import { isBrowser, isElectronMain, isNode } from "wherearewe";
|
|
6
|
-
import {} from "@helia/libp2p";
|
|
10
|
+
import { withLibp2p } from "@helia/libp2p";
|
|
7
11
|
import { sousDossier } from "./utils.js";
|
|
8
12
|
import { OptionsDéfautLibp2pNavigateur, OptionsDéfautLibp2pNode, toutesConnectées, } from "./libp2p/index.js";
|
|
9
13
|
import { obtenirAdresseRelai } from "./relai/index.js";
|
|
14
|
+
import { withBitswap } from "@helia/bitswap";
|
|
10
15
|
export const créerHéliasTest = async ({ n, dossier, }) => {
|
|
11
16
|
const optionsLibp2p = isBrowser
|
|
12
17
|
? OptionsDéfautLibp2pNavigateur()
|
|
@@ -24,9 +29,16 @@ export const créerHéliasTest = async ({ n, dossier, }) => {
|
|
|
24
29
|
stockageBlocs.open?.();
|
|
25
30
|
const optionsHélia = {
|
|
26
31
|
blockstore: stockageBlocs,
|
|
27
|
-
|
|
32
|
+
codecs: [
|
|
33
|
+
dagCbor,
|
|
34
|
+
dagJson,
|
|
35
|
+
json,
|
|
36
|
+
],
|
|
37
|
+
hashers: [
|
|
38
|
+
sha512,
|
|
39
|
+
]
|
|
28
40
|
};
|
|
29
|
-
const hélia = await
|
|
41
|
+
const hélia = await withBitswap(withLibp2p(createHeliaLight(optionsHélia), optionsLibp2p)).start();
|
|
30
42
|
hélias.push(hélia);
|
|
31
43
|
}
|
|
32
44
|
await toutesConnectées(hélias.map((h) => h.libp2p), {
|
package/dist/h/303/251lia.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hélia.js","sourceRoot":"","sources":["../src/hélia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hélia.js","sourceRoot":"","sources":["../src/hélia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MA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
|
|
|
1
|
-
export declare const version = "2.2.
|
|
1
|
+
export declare const version = "2.2.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.2.
|
|
2
|
+
"version": "2.2.4",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"name": "@constl/utils-tests",
|
|
5
5
|
"author": "Julien Jean Malard-Adam",
|
|
@@ -66,7 +66,10 @@
|
|
|
66
66
|
"typescript-eslint": "^8.71.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
+
"@helia/bitswap": "^4.0.20",
|
|
69
70
|
"@helia/libp2p": "^2.1.5",
|
|
71
|
+
"@ipld/dag-cbor": "^10.0.2",
|
|
72
|
+
"@ipld/dag-json": "^11.0.1",
|
|
70
73
|
"@libp2p/gossipsub": "^17.1.2",
|
|
71
74
|
"@libp2p/peer-id": "^6.0.15",
|
|
72
75
|
"@libp2p/ping": "^3.1.13",
|
|
@@ -82,6 +85,7 @@
|
|
|
82
85
|
"genversion": "^3.2.0",
|
|
83
86
|
"helia": "7.1.16",
|
|
84
87
|
"libp2p": "^3.3.11",
|
|
88
|
+
"multiformats": "^14.0.5",
|
|
85
89
|
"os-browserify": "^0.3.0",
|
|
86
90
|
"process": "^0.11.10",
|
|
87
91
|
"rimraf": "^6.1.3",
|
package/src/h/303/251lia.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
2
|
import { MemoryBlockstore } from "blockstore-core";
|
|
3
|
-
import {
|
|
3
|
+
import { createHeliaLight } from "helia";
|
|
4
|
+
import * as dagCbor from '@ipld/dag-cbor'
|
|
5
|
+
import * as dagJson from '@ipld/dag-json'
|
|
6
|
+
import * as json from 'multiformats/codecs/json'
|
|
7
|
+
import { sha512 } from 'multiformats/hashes/sha2'
|
|
4
8
|
import { IDBBlockstore } from "blockstore-idb";
|
|
5
9
|
import { isBrowser, isElectronMain, isNode } from "wherearewe";
|
|
6
|
-
import { type HeliaWithLibp2p } from "@helia/libp2p";
|
|
10
|
+
import { withLibp2p, type HeliaWithLibp2p } from "@helia/libp2p";
|
|
7
11
|
import { sousDossier } from "./utils.js";
|
|
8
12
|
import {
|
|
9
13
|
OptionsDéfautLibp2pNavigateur,
|
|
@@ -12,6 +16,7 @@ import {
|
|
|
12
16
|
type ServicesLibp2pTest,
|
|
13
17
|
} from "./libp2p/index.js";
|
|
14
18
|
import { obtenirAdresseRelai } from "./relai/index.ts";
|
|
19
|
+
import { withBitswap } from "@helia/bitswap";
|
|
15
20
|
|
|
16
21
|
export const créerHéliasTest = async ({
|
|
17
22
|
n,
|
|
@@ -40,9 +45,16 @@ export const créerHéliasTest = async ({
|
|
|
40
45
|
(stockageBlocs as IDBBlockstore).open?.();
|
|
41
46
|
const optionsHélia = {
|
|
42
47
|
blockstore: stockageBlocs,
|
|
43
|
-
|
|
48
|
+
codecs: [
|
|
49
|
+
dagCbor,
|
|
50
|
+
dagJson,
|
|
51
|
+
json,
|
|
52
|
+
],
|
|
53
|
+
hashers: [
|
|
54
|
+
sha512,
|
|
55
|
+
]
|
|
44
56
|
};
|
|
45
|
-
const hélia = await
|
|
57
|
+
const hélia = await withBitswap(withLibp2p(createHeliaLight(optionsHélia), optionsLibp2p)).start();
|
|
46
58
|
hélias.push(hélia);
|
|
47
59
|
}
|
|
48
60
|
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '2.2.
|
|
2
|
+
export const version = '2.2.4';
|