@peerbit/program
Advanced tools
Comparing version 5.1.1 to 5.1.2-03f5b18
@@ -267,10 +267,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
async waitFor(other, options) { | ||
const ids = Array.isArray(other) ? other : [other]; | ||
const expectedHashes = new Set(ids.map((x) => typeof x === "string" | ||
const expectedHashes = new Set((Array.isArray(other) ? other : [other]) | ||
.map((x) => typeof x === "string" | ||
? x | ||
: x instanceof PublicSignKey | ||
? x.hashcode() | ||
: getPublicKeyFromPeerId(x).hashcode())); | ||
: getPublicKeyFromPeerId(x).hashcode()) | ||
.filter((x) => x !== this.node.identity.publicKey.hashcode())); | ||
// make sure nodes are reachable | ||
await Promise.all(ids.map((x) => this.node.services.pubsub.waitFor(x, { signal: options?.signal }))); | ||
await Promise.all([...expectedHashes].map((x) => this.node.services.pubsub.waitFor(x, { signal: options?.signal }))); | ||
// wait for subscribing to topics | ||
@@ -277,0 +278,0 @@ return new Promise((resolve, reject) => { |
132
package.json
{ | ||
"name": "@peerbit/program", | ||
"version": "5.1.1", | ||
"description": "Program interface", | ||
"sideEffects": false, | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
], | ||
"src/*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"src", | ||
"dist", | ||
"!dist/e2e", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./dist/src/index.js" | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "peerbit", | ||
"parserOptions": { | ||
"project": true, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": [ | ||
"!.aegir.js", | ||
"test/ts-use", | ||
"*.d.ts" | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"clean": "aegir clean", | ||
"build": "aegir build --no-bundle", | ||
"test": "aegir test", | ||
"lint": "aegir lint" | ||
}, | ||
"author": "dao.xyz", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@dao-xyz/borsh": "^5.2.3", | ||
"@peerbit/crypto": "2.3.3", | ||
"@peerbit/keychain": "^1.0.21", | ||
"@peerbit/blocks-interface": "^1.3.9", | ||
"@peerbit/pubsub-interface": "^3.1.2", | ||
"@peerbit/any-store-interface": "^1.0.0" | ||
} | ||
"name": "@peerbit/program", | ||
"version": "5.1.2-03f5b18", | ||
"description": "Program interface", | ||
"sideEffects": false, | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
], | ||
"src/*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"src", | ||
"dist", | ||
"!dist/e2e", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./dist/src/index.js" | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "peerbit", | ||
"parserOptions": { | ||
"project": true, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": [ | ||
"!.aegir.js", | ||
"test/ts-use", | ||
"*.d.ts" | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"clean": "aegir clean", | ||
"build": "aegir build --no-bundle", | ||
"test": "aegir test", | ||
"lint": "aegir lint" | ||
}, | ||
"author": "dao.xyz", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@dao-xyz/borsh": "^5.2.3", | ||
"@peerbit/crypto": "2.3.3-03f5b18", | ||
"@peerbit/keychain": "1.0.21-03f5b18", | ||
"@peerbit/blocks-interface": "1.3.9-03f5b18", | ||
"@peerbit/pubsub-interface": "3.1.2-03f5b18", | ||
"@peerbit/any-store-interface": "1.0.0-03f5b18" | ||
} | ||
} |
@@ -381,11 +381,12 @@ import { type Constructor, getSchema, variant } from "@dao-xyz/borsh"; | ||
): Promise<void> { | ||
const ids = Array.isArray(other) ? other : [other]; | ||
const expectedHashes = new Set( | ||
ids.map((x) => | ||
typeof x === "string" | ||
? x | ||
: x instanceof PublicSignKey | ||
? x.hashcode() | ||
: getPublicKeyFromPeerId(x).hashcode(), | ||
), | ||
(Array.isArray(other) ? other : [other]) | ||
.map((x) => | ||
typeof x === "string" | ||
? x | ||
: x instanceof PublicSignKey | ||
? x.hashcode() | ||
: getPublicKeyFromPeerId(x).hashcode(), | ||
) | ||
.filter((x) => x !== this.node.identity.publicKey.hashcode()), | ||
); | ||
@@ -395,3 +396,3 @@ | ||
await Promise.all( | ||
ids.map((x) => | ||
[...expectedHashes].map((x) => | ||
this.node.services.pubsub.waitFor(x, { signal: options?.signal }), | ||
@@ -398,0 +399,0 @@ ), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
88242
1638
2
+ Added@peerbit/any-store@2.1.3-03f5b18(transitive)
+ Added@peerbit/any-store-interface@1.0.0-03f5b18(transitive)
+ Added@peerbit/any-store-opfs@1.0.3-03f5b18(transitive)
+ Added@peerbit/blocks-interface@1.3.9-03f5b18(transitive)
+ Added@peerbit/cache@2.1.1-03f5b18(transitive)
+ Added@peerbit/crypto@2.3.3-03f5b18(transitive)
+ Added@peerbit/keychain@1.0.21-03f5b18(transitive)
+ Added@peerbit/logger@1.0.3-03f5b18(transitive)
+ Added@peerbit/pubsub-interface@3.1.2-03f5b18(transitive)
+ Added@peerbit/stream-interface@5.1.2-03f5b18(transitive)
+ Added@peerbit/time@2.0.7-03f5b18(transitive)
- Removed@peerbit/any-store@2.1.5(transitive)
- Removed@peerbit/any-store-interface@1.0.0(transitive)
- Removed@peerbit/any-store-opfs@1.0.5(transitive)
- Removed@peerbit/blocks-interface@1.3.12(transitive)
- Removed@peerbit/cache@2.1.2(transitive)
- Removed@peerbit/crypto@2.3.32.3.5(transitive)
- Removed@peerbit/keychain@1.0.23(transitive)
- Removed@peerbit/logger@1.0.3(transitive)
- Removed@peerbit/pubsub-interface@3.1.4(transitive)
- Removed@peerbit/stream-interface@5.1.4(transitive)
- Removed@peerbit/time@2.0.8(transitive)