@constl/utils-tests 2.1.1 → 2.1.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/.gitignore +11 -0
- package/.npmignore +10 -0
- package/package.json +31 -31
- package/pnpm-workspace.yaml +18 -0
- package/src/attente.ts +1 -1
- package/src/libp2p/config.ts +4 -0
- package/src/libp2p/utils.ts +15 -1
- package/src/version.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/@types.d.ts +0 -6
- package/dist/@types.js +0 -2
- package/dist/@types.js.map +0 -1
- package/dist/attente.d.ts +0 -10
- package/dist/attente.js +0 -113
- package/dist/attente.js.map +0 -1
- package/dist/config.d.ts +0 -7
- package/dist/config.js +0 -84
- package/dist/config.js.map +0 -1
- package/dist/constellation.d.ts +0 -17
- package/dist/constellation.js +0 -32
- package/dist/constellation.js.map +0 -1
- package/dist/dossiers.d.ts +0 -4
- package/dist/dossiers.js +0 -37
- package/dist/dossiers.js.map +0 -1
- package/dist/h/303/251lia.d.ts +0 -11
- package/dist/h/303/251lia.js +0 -45
- package/dist/h/303/251lia.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/libp2p/config.d.ts +0 -25
- package/dist/libp2p/config.js +0 -84
- package/dist/libp2p/config.js.map +0 -1
- package/dist/libp2p/index.d.ts +0 -3
- package/dist/libp2p/index.js +0 -4
- package/dist/libp2p/index.js.map +0 -1
- package/dist/libp2p/libp2p.d.ts +0 -9
- package/dist/libp2p/libp2p.js +0 -21
- package/dist/libp2p/libp2p.js.map +0 -1
- package/dist/libp2p/utils.d.ts +0 -10
- package/dist/libp2p/utils.js +0 -41
- package/dist/libp2p/utils.js.map +0 -1
- package/dist/orbite.d.ts +0 -10
- package/dist/orbite.js +0 -37
- package/dist/orbite.js.map +0 -1
- package/dist/relai/bin.d.ts +0 -1
- package/dist/relai/bin.js +0 -82
- package/dist/relai/bin.js.map +0 -1
- package/dist/relai/consts.d.ts +0 -3
- package/dist/relai/consts.js +0 -4
- package/dist/relai/consts.js.map +0 -1
- package/dist/relai/index.d.ts +0 -3
- package/dist/relai/index.js +0 -4
- package/dist/relai/index.js.map +0 -1
- package/dist/relai/relai.d.ts +0 -5
- package/dist/relai/relai.js +0 -29
- package/dist/relai/relai.js.map +0 -1
- package/dist/relai/utils.d.ts +0 -4
- package/dist/relai/utils.js +0 -6
- package/dist/relai/utils.js.map +0 -1
- package/dist/scripts/node-globals.d.ts +0 -2
- package/dist/scripts/node-globals.js +0 -4
- package/dist/scripts/node-globals.js.map +0 -1
- package/dist/utils.d.ts +0 -4
- package/dist/utils.js +0 -5
- package/dist/utils.js.map +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -3
- package/dist/version.js.map +0 -1
package/.gitignore
ADDED
package/.npmignore
ADDED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.4",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"name": "@constl/utils-tests",
|
|
5
5
|
"author": "Julien Jean Malard-Adam",
|
|
@@ -22,55 +22,55 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
24
24
|
"@chainsafe/libp2p-yamux": "^8.0.1",
|
|
25
|
-
"@constl/bohr-db": "^2.2.
|
|
26
|
-
"@constl/ipa": "1.6.24",
|
|
25
|
+
"@constl/bohr-db": "^2.2.10",
|
|
27
26
|
"@eslint/js": "^10.0.1",
|
|
28
|
-
"@libp2p/circuit-relay-v2": "^4.2.
|
|
29
|
-
"@libp2p/crypto": "^5.1.
|
|
30
|
-
"@libp2p/identify": "^4.1.
|
|
31
|
-
"@libp2p/interface": "^3.
|
|
32
|
-
"@libp2p/websockets": "^10.1.
|
|
33
|
-
"@multiformats/multiaddr": "^13.0.
|
|
27
|
+
"@libp2p/circuit-relay-v2": "^4.2.12",
|
|
28
|
+
"@libp2p/crypto": "^5.1.23",
|
|
29
|
+
"@libp2p/identify": "^4.1.13",
|
|
30
|
+
"@libp2p/interface": "^3.3.0",
|
|
31
|
+
"@libp2p/websockets": "^10.1.20",
|
|
32
|
+
"@multiformats/multiaddr": "^13.0.3",
|
|
34
33
|
"@multiformats/multiaddr-matcher": "^3.0.2",
|
|
35
|
-
"@orbitdb/core-types": "^1.2.
|
|
36
|
-
"@orbitdb/feed-db": "^1.4.
|
|
34
|
+
"@orbitdb/core-types": "^1.2.5",
|
|
35
|
+
"@orbitdb/feed-db": "^1.4.2",
|
|
37
36
|
"@types/crypto-js": "^4.2.2",
|
|
38
37
|
"@types/file-saver": "^2.0.7",
|
|
39
38
|
"@types/mocha": "^10.0.10",
|
|
40
|
-
"@types/node": "^25.
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
42
|
-
"@typescript-eslint/parser": "^8.
|
|
43
|
-
"aegir": "^47.
|
|
44
|
-
"ajv": "^8.
|
|
39
|
+
"@types/node": "^25.9.5",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.67.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.67.0",
|
|
42
|
+
"aegir": "^47.2.0",
|
|
43
|
+
"ajv": "^8.20.0",
|
|
45
44
|
"buffer": "^6.0.3",
|
|
46
|
-
"core-js": "^3.
|
|
47
|
-
"electron": "^41.
|
|
48
|
-
"esbuild": "^0.28.
|
|
49
|
-
"eslint": "^10.
|
|
45
|
+
"core-js": "^3.50.0",
|
|
46
|
+
"electron": "^41.10.6",
|
|
47
|
+
"esbuild": "^0.28.2",
|
|
48
|
+
"eslint": "^10.9.0",
|
|
50
49
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
51
50
|
"eslint-config-prettier": "^10.1.8",
|
|
52
51
|
"eslint-config-standard": "^17.1.0",
|
|
53
52
|
"eslint-plugin-import": "^2.32.0",
|
|
54
53
|
"eslint-plugin-n": "^17.24.0",
|
|
55
|
-
"eslint-plugin-promise": "^7.
|
|
54
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
56
55
|
"execa": "^9.6.1",
|
|
57
|
-
"mocha": "^11.
|
|
58
|
-
"playwright": "^1.
|
|
59
|
-
"prettier": "^3.
|
|
56
|
+
"mocha": "^11.8.0",
|
|
57
|
+
"playwright": "^1.62.1",
|
|
58
|
+
"prettier": "^3.9.6",
|
|
60
59
|
"progress-events": "^1.1.0",
|
|
61
60
|
"source-map-support": "^0.5.21",
|
|
62
|
-
"ts-patch": "^
|
|
61
|
+
"ts-patch": "^4.0.1",
|
|
63
62
|
"tsconfig-paths": "^4.2.0",
|
|
64
63
|
"tscpaths": "^0.0.9",
|
|
65
64
|
"typescript": "6.0.3",
|
|
66
|
-
"typescript-eslint": "^8.
|
|
65
|
+
"typescript-eslint": "^8.67.0",
|
|
67
66
|
"typescript-transform-paths": "^3.5.6"
|
|
68
67
|
},
|
|
69
68
|
"dependencies": {
|
|
70
69
|
"@helia/block-brokers": "^5.2.4",
|
|
71
|
-
"@libp2p/gossipsub": "^15.0.
|
|
72
|
-
"@libp2p/peer-id": "^6.0.
|
|
73
|
-
"@libp2p/
|
|
70
|
+
"@libp2p/gossipsub": "^15.0.23",
|
|
71
|
+
"@libp2p/peer-id": "^6.0.15",
|
|
72
|
+
"@libp2p/ping": "^3.1.12",
|
|
73
|
+
"@libp2p/webrtc": "^6.0.30",
|
|
74
74
|
"@orbitdb/core": "^3.0.2",
|
|
75
75
|
"blockstore-core": "^6.1.3",
|
|
76
76
|
"blockstore-fs": "^3.0.3",
|
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
"events": "^3.3.0",
|
|
82
82
|
"genversion": "^3.2.0",
|
|
83
83
|
"helia": "6.1.4",
|
|
84
|
-
"libp2p": "^3.
|
|
84
|
+
"libp2p": "^3.3.9",
|
|
85
85
|
"os-browserify": "^0.3.0",
|
|
86
86
|
"process": "^0.11.10",
|
|
87
87
|
"rimraf": "^6.1.3",
|
|
88
88
|
"stream-browserify": "^3.0.0",
|
|
89
89
|
"uint8arrays": "^5.1.1",
|
|
90
90
|
"url-polyfill": "^1.1.14",
|
|
91
|
-
"uuid": "^14.0.
|
|
91
|
+
"uuid": "^14.0.2",
|
|
92
92
|
"wherearewe": "^2.0.1"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
allowBuilds:
|
|
2
|
+
'@ipshipyard/node-datachannel': true
|
|
3
|
+
aws-sdk: false
|
|
4
|
+
classic-level: true
|
|
5
|
+
core-js: true
|
|
6
|
+
deno: true
|
|
7
|
+
electron: true
|
|
8
|
+
esbuild: true
|
|
9
|
+
iso-constants@https://codeload.github.com/inverted-capital/iso-constants/tar.gz/2af6fdfb2cacaa03ebd58543703918783e62649f: true
|
|
10
|
+
node-datachannel: true
|
|
11
|
+
unrs-resolver: true
|
|
12
|
+
|
|
13
|
+
overrides:
|
|
14
|
+
xlsx: "@e965/xlsx"
|
|
15
|
+
|
|
16
|
+
blockExoticSubdeps: false
|
|
17
|
+
|
|
18
|
+
packages: []
|
package/src/attente.ts
CHANGED
|
@@ -49,7 +49,7 @@ export const attendreFichierExiste = async ({
|
|
|
49
49
|
|
|
50
50
|
// Actions écouteur de fichiers
|
|
51
51
|
const dossier = path.dirname(fichier);
|
|
52
|
-
const écouteur = chokidar.watch(dossier);
|
|
52
|
+
const écouteur = chokidar.watch(dossier, { awaitWriteFinish: true });
|
|
53
53
|
const fermerÉcouteur = async () => await écouteur.close();
|
|
54
54
|
|
|
55
55
|
const lorsquFichierAjouté = () => {
|
package/src/libp2p/config.ts
CHANGED
|
@@ -35,8 +35,10 @@ import { webSockets } from "@libp2p/websockets";
|
|
|
35
35
|
import { Libp2pOptions } from "libp2p";
|
|
36
36
|
|
|
37
37
|
import { PrivateKey } from "@libp2p/interface";
|
|
38
|
+
import { ping, Ping } from "@libp2p/ping";
|
|
38
39
|
|
|
39
40
|
export type ServicesLibp2pTest = {
|
|
41
|
+
ping: Ping;
|
|
40
42
|
identify: Identify;
|
|
41
43
|
pubsub: GossipSub;
|
|
42
44
|
obtClefPrivée: ServiceClefPrivée;
|
|
@@ -74,6 +76,7 @@ export const OptionsDéfautLibp2pNode: () => Libp2pOptions<ServicesLibp2pTest> =
|
|
|
74
76
|
denyDialMultiaddr: () => false,
|
|
75
77
|
},
|
|
76
78
|
services: {
|
|
79
|
+
ping: ping(),
|
|
77
80
|
identify: identify(),
|
|
78
81
|
pubsub: gossipsub({ allowPublishToZeroTopicPeers: true }) as (
|
|
79
82
|
components: GossipSubComponents,
|
|
@@ -100,6 +103,7 @@ export const OptionsDéfautLibp2pNavigateur: () => Libp2pOptions<ServicesLibp2pT
|
|
|
100
103
|
denyDialMultiaddr: () => false,
|
|
101
104
|
},
|
|
102
105
|
services: {
|
|
106
|
+
ping: ping(),
|
|
103
107
|
identify: identify(),
|
|
104
108
|
pubsub: gossipsub({ allowPublishToZeroTopicPeers: true }) as (
|
|
105
109
|
components: GossipSubComponents,
|
package/src/libp2p/utils.ts
CHANGED
|
@@ -36,7 +36,21 @@ export const connecterPairs = async <
|
|
|
36
36
|
const interval = setInterval(testConnecté, 100);
|
|
37
37
|
testConnecté();
|
|
38
38
|
});
|
|
39
|
-
|
|
39
|
+
libp2p2.dial(adresse1);
|
|
40
|
+
await new Promise((resolve) => {
|
|
41
|
+
const testConnecté = () => {
|
|
42
|
+
const adresse = libp2p1
|
|
43
|
+
.getConnections()
|
|
44
|
+
.filter((c) => c.remotePeer.toString() === libp2p2.peerId.toString())
|
|
45
|
+
.pop();
|
|
46
|
+
if (adresse != null) {
|
|
47
|
+
clearInterval(interval);
|
|
48
|
+
resolve(adresse);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const interval = setInterval(testConnecté, 100);
|
|
52
|
+
testConnecté();
|
|
53
|
+
});
|
|
40
54
|
} else {
|
|
41
55
|
await libp2p2.peerStore.save(libp2p1.peerId, {
|
|
42
56
|
multiaddrs: libp2p1.getMultiaddrs().filter(filtre),
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = "2.1.
|
|
2
|
+
export const version = "2.1.4";
|