@constl/utils-tests 2.0.2 → 2.0.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/attente.d.ts +1 -1
- package/dist/attente.js +17 -9
- package/dist/attente.js.map +1 -1
- package/dist/h/303/251lia.js +10 -4
- package/dist/h/303/251lia.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +30 -29
- package/src/attente.ts +18 -11
- package/src/h/303/251lia.ts +10 -6
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.0.
|
|
1
|
+
export declare const version = "2.0.4";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.4",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"name": "@constl/utils-tests",
|
|
5
5
|
"author": "Julien Jean Malard-Adam",
|
|
@@ -20,43 +20,43 @@
|
|
|
20
20
|
"postbuild": "./dist/**/*"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@chainsafe/libp2p-noise": "^16.1.
|
|
23
|
+
"@chainsafe/libp2p-noise": "^16.1.5",
|
|
24
24
|
"@chainsafe/libp2p-yamux": "^7.0.4",
|
|
25
|
-
"@constl/bohr-db": "^1.3.
|
|
25
|
+
"@constl/bohr-db": "^1.3.2",
|
|
26
26
|
"@constl/ipa": "1.6.24",
|
|
27
|
-
"@eslint/js": "^9.
|
|
28
|
-
"@libp2p/circuit-relay-v2": "^3.2.
|
|
29
|
-
"@libp2p/crypto": "^5.1.
|
|
30
|
-
"@libp2p/identify": "^3.0.
|
|
31
|
-
"@libp2p/interface": "^2.
|
|
32
|
-
"@libp2p/websockets": "^9.2.
|
|
27
|
+
"@eslint/js": "^9.39.0",
|
|
28
|
+
"@libp2p/circuit-relay-v2": "^3.2.24",
|
|
29
|
+
"@libp2p/crypto": "^5.1.13",
|
|
30
|
+
"@libp2p/identify": "^3.0.39",
|
|
31
|
+
"@libp2p/interface": "^2.11.0",
|
|
32
|
+
"@libp2p/websockets": "^9.2.19",
|
|
33
33
|
"@multiformats/multiaddr": "^12.5.1",
|
|
34
|
-
"@multiformats/multiaddr-matcher": "^3.0.
|
|
35
|
-
"@orbitdb/core-types": "^1.2.
|
|
34
|
+
"@multiformats/multiaddr-matcher": "^3.0.1",
|
|
35
|
+
"@orbitdb/core-types": "^1.2.1",
|
|
36
36
|
"@orbitdb/feed-db": "^1.3.0",
|
|
37
37
|
"@types/crypto-js": "^4.2.2",
|
|
38
38
|
"@types/file-saver": "^2.0.7",
|
|
39
39
|
"@types/mocha": "^10.0.10",
|
|
40
|
-
"@types/node": "^24.
|
|
40
|
+
"@types/node": "^24.10.0",
|
|
41
41
|
"@types/uuid": "^11.0.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
43
|
-
"@typescript-eslint/parser": "^8.
|
|
44
|
-
"aegir": "^47.0.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
43
|
+
"@typescript-eslint/parser": "^8.46.2",
|
|
44
|
+
"aegir": "^47.0.24",
|
|
45
45
|
"ajv": "^8.17.1",
|
|
46
46
|
"buffer": "^6.0.3",
|
|
47
|
-
"core-js": "^3.
|
|
47
|
+
"core-js": "^3.46.0",
|
|
48
48
|
"electron": "^39.0.0",
|
|
49
|
-
"esbuild": "^0.25.
|
|
50
|
-
"eslint": "^9.
|
|
49
|
+
"esbuild": "^0.25.12",
|
|
50
|
+
"eslint": "^9.39.0",
|
|
51
51
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
52
52
|
"eslint-config-prettier": "^10.1.8",
|
|
53
53
|
"eslint-config-standard": "^17.1.0",
|
|
54
54
|
"eslint-plugin-import": "^2.32.0",
|
|
55
|
-
"eslint-plugin-n": "^17.
|
|
55
|
+
"eslint-plugin-n": "^17.23.1",
|
|
56
56
|
"eslint-plugin-promise": "^7.2.1",
|
|
57
57
|
"execa": "^9.6.0",
|
|
58
|
-
"mocha": "^11.7.
|
|
59
|
-
"playwright": "^1.
|
|
58
|
+
"mocha": "^11.7.4",
|
|
59
|
+
"playwright": "^1.56.1",
|
|
60
60
|
"prettier": "^3.6.2",
|
|
61
61
|
"progress-events": "^1.0.1",
|
|
62
62
|
"source-map-support": "^0.5.21",
|
|
@@ -64,31 +64,32 @@
|
|
|
64
64
|
"tsconfig-paths": "^4.2.0",
|
|
65
65
|
"tscpaths": "^0.0.9",
|
|
66
66
|
"typescript": "5.9.3",
|
|
67
|
-
"typescript-eslint": "^8.
|
|
67
|
+
"typescript-eslint": "^8.46.2",
|
|
68
68
|
"typescript-transform-paths": "^3.5.5"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@chainsafe/libp2p-gossipsub": "14.1.2",
|
|
72
|
-
"@helia/block-brokers": "^4.2.
|
|
73
|
-
"@libp2p/peer-id": "^5.1.
|
|
74
|
-
"@libp2p/webrtc": "^5.2.
|
|
72
|
+
"@helia/block-brokers": "^4.2.4",
|
|
73
|
+
"@libp2p/peer-id": "^5.1.9",
|
|
74
|
+
"@libp2p/webrtc": "^5.2.24",
|
|
75
75
|
"@orbitdb/core": "^3.0.2",
|
|
76
76
|
"blockstore-core": "^5.0.4",
|
|
77
|
-
"blockstore-
|
|
77
|
+
"blockstore-fs": "^2.0.5",
|
|
78
|
+
"blockstore-idb": "^2.0.4",
|
|
78
79
|
"browserify-fs": "^1.0.0",
|
|
79
80
|
"chokidar": "^4.0.3",
|
|
80
81
|
"crypto-browserify": "^3.12.1",
|
|
81
82
|
"events": "^3.3.0",
|
|
82
83
|
"genversion": "^3.2.0",
|
|
83
84
|
"helia": "5.5.1",
|
|
84
|
-
"libp2p": "^2.
|
|
85
|
+
"libp2p": "^2.10.0",
|
|
85
86
|
"os-browserify": "^0.3.0",
|
|
86
87
|
"process": "^0.11.10",
|
|
87
88
|
"read-package-up": "^11.0.0",
|
|
88
|
-
"rimraf": "^6.0
|
|
89
|
+
"rimraf": "^6.1.0",
|
|
89
90
|
"stream-browserify": "^3.0.0",
|
|
90
91
|
"uint8arrays": "^5.1.0",
|
|
91
|
-
"url-polyfill": "^1.1.
|
|
92
|
+
"url-polyfill": "^1.1.14",
|
|
92
93
|
"uuid": "^11.1.0",
|
|
93
94
|
"wherearewe": "^2.0.1"
|
|
94
95
|
},
|
package/src/attente.ts
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { isBrowser, isElectronRenderer } from "wherearewe";
|
|
2
2
|
|
|
3
|
-
export const que = async
|
|
4
|
-
f: () =>
|
|
5
|
-
t =
|
|
3
|
+
export const que = async (
|
|
4
|
+
f: () => boolean | Promise<boolean>,
|
|
5
|
+
t = 10,
|
|
6
6
|
): Promise<void> => {
|
|
7
|
-
return new Promise((résoudre) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
return new Promise((résoudre, rejeter) => {
|
|
8
|
+
const fFinale = async () => {
|
|
9
|
+
try {
|
|
10
|
+
if (await f()) {
|
|
11
|
+
clearTimeout(chrono);
|
|
12
|
+
résoudre();
|
|
13
|
+
} else {
|
|
14
|
+
t *= 1.5;
|
|
15
|
+
setTimeout(fFinale, t);
|
|
16
|
+
}
|
|
17
|
+
} catch {
|
|
18
|
+
clearTimeout(chrono);
|
|
19
|
+
rejeter();
|
|
14
20
|
}
|
|
15
21
|
};
|
|
16
|
-
|
|
22
|
+
const chrono = setTimeout(fFinale, t);
|
|
23
|
+
fFinale();
|
|
17
24
|
});
|
|
18
25
|
};
|
|
19
26
|
|
package/src/h/303/251lia.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { bitswap } from "@helia/block-brokers";
|
|
|
5
5
|
import { MemoryBlockstore } from "blockstore-core";
|
|
6
6
|
import { join } from "path";
|
|
7
7
|
import { sousDossier } from "./utils.js";
|
|
8
|
-
import {
|
|
8
|
+
import { IDBBlockstore } from "blockstore-idb";
|
|
9
9
|
import { obtenirAdresseRelai } from "./relai/index.js";
|
|
10
|
+
import { isElectronMain, isNode } from "wherearewe";
|
|
10
11
|
|
|
11
12
|
export const créerHéliasTest = async ({
|
|
12
13
|
n,
|
|
@@ -30,15 +31,18 @@ export const créerHéliasTest = async ({
|
|
|
30
31
|
let i = 0;
|
|
31
32
|
const hélias = await Promise.all(
|
|
32
33
|
libp2ps.map(async (libp2p) => {
|
|
33
|
-
const
|
|
34
|
-
?
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const dossierBlocs = dossier
|
|
35
|
+
? join(sousDossier({ dossier, i }), "hélia", "blocks")
|
|
36
|
+
: undefined;
|
|
37
|
+
const stockageBlocs = dossierBlocs
|
|
38
|
+
? isNode || isElectronMain
|
|
39
|
+
? new (await import("blockstore-fs")).FsBlockstore(dossierBlocs)
|
|
40
|
+
: new IDBBlockstore(dossierBlocs)
|
|
37
41
|
: new MemoryBlockstore();
|
|
38
42
|
i++;
|
|
39
43
|
|
|
40
44
|
const optionsHélia = {
|
|
41
|
-
blockstore,
|
|
45
|
+
blockstore: stockageBlocs,
|
|
42
46
|
libp2p,
|
|
43
47
|
blockBrokers: [bitswap()],
|
|
44
48
|
};
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = "2.0.
|
|
2
|
+
export const version = "2.0.4";
|