Compare commits

...

5 Commits

Author SHA1 Message Date
semantic-release-bot fe26f681d8 chore(release): 0.1.0-develop.10 [skip ci]
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-10-09)

### Bug Fixes

* explicitly define subscribeToUpdates return type ([c7dcb27](c7dcb2786a))

### Features

* add subscribeToUpdates method ([dc51de2](dc51de20a7))
2023-10-09 03:43:54 +00:00
Derrick Hammer 0f3d57cda9
dep: update module hash 2023-10-08 23:42:33 -04:00
Derrick Hammer c7dcb2786a
fix: explicitly define subscribeToUpdates return type 2023-10-08 23:42:20 -04:00
Derrick Hammer e3eb1b35f9
dep: update libkernel 2023-10-08 23:40:21 -04:00
Derrick Hammer dc51de20a7
feat: add subscribeToUpdates method 2023-10-08 23:39:12 -04:00
4 changed files with 54 additions and 27 deletions

View File

@ -1,3 +1,15 @@
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-10-09)
### Bug Fixes
* explicitly define subscribeToUpdates return type ([c7dcb27](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/commit/c7dcb2786a32df094a39ac9614ab6c723af74585))
### Features
* add subscribeToUpdates method ([dc51de2](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/commit/dc51de20a7b6003085b97ff72d5a1c9e868210ba))
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-09-09) # [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-09-09)
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-09-09) # [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/kernel-network-registry-client/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-09-09)

57
npm-shrinkwrap.json generated
View File

@ -1,14 +1,14 @@
{ {
"name": "@lumeweb/kernel-network-registry-client", "name": "@lumeweb/kernel-network-registry-client",
"version": "0.1.0-develop.9", "version": "0.1.0-develop.10",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/kernel-network-registry-client", "name": "@lumeweb/kernel-network-registry-client",
"version": "0.1.0-develop.9", "version": "0.1.0-develop.10",
"dependencies": { "dependencies": {
"@lumeweb/libkernel": "^0.1.0-develop.39" "@lumeweb/libkernel": "^0.1.0-develop.64"
}, },
"devDependencies": { "devDependencies": {
"@lumeweb/node-library-preset": "^0.2.7", "@lumeweb/node-library-preset": "^0.2.7",
@ -1678,11 +1678,11 @@
} }
}, },
"node_modules/@lumeweb/libkernel": { "node_modules/@lumeweb/libkernel": {
"version": "0.1.0-develop.39", "version": "0.1.0-develop.64",
"resolved": "https://registry.npmjs.org/@lumeweb/libkernel/-/libkernel-0.1.0-develop.39.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libkernel/-/libkernel-0.1.0-develop.64.tgz",
"integrity": "sha512-KqWf/xFXE/wqevLklY4xTu4OJEoh3emSjZGUa/NP/iroh1upX6+rjEonjXKhAt/3XGCyqUOvRQcJ9dNnkFAKhQ==", "integrity": "sha512-J4SW4sNVy1hwdLa2SQgpol94E+d3on0Mb0d8Cbxt6cbO3q/S8S+Jr9Y7hctn6NXp+SYq3aMHukblQTX2v8mmkg==",
"dependencies": { "dependencies": {
"@lumeweb/libweb": "0.2.0-develop.39", "@lumeweb/libweb": "0.2.0-develop.59",
"emittery": "^1.0.1", "emittery": "^1.0.1",
"p-defer": "^4.0.0" "p-defer": "^4.0.0"
} }
@ -1699,11 +1699,11 @@
} }
}, },
"node_modules/@lumeweb/libportal": { "node_modules/@lumeweb/libportal": {
"version": "0.2.0-develop.21", "version": "0.2.0-develop.39",
"resolved": "https://registry.npmjs.org/@lumeweb/libportal/-/libportal-0.2.0-develop.21.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libportal/-/libportal-0.2.0-develop.39.tgz",
"integrity": "sha512-5KbRQEDntkCoh1YITQkpUqFMzmfkaYQGQRCCn5QeM7DN2eIJMzpo4q+lZXFX/ztqueFaSZYMDrSZ4tzAPP+c6w==", "integrity": "sha512-T7yDdIZ78WAUABVTtE3hb3hl+6cBKzBEnGtkAa7gb9S+2/FPOo9UcmvSucqYi1a/ZB8A8xKBZ9sEja8cKyGYkA==",
"dependencies": { "dependencies": {
"@lumeweb/libs5": "^0.1.0-develop.44", "@lumeweb/libs5": "^0.1.0-develop.60",
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",
"detect-node": "^2.1.0", "detect-node": "^2.1.0",
@ -1716,9 +1716,9 @@
} }
}, },
"node_modules/@lumeweb/libs5": { "node_modules/@lumeweb/libs5": {
"version": "0.1.0-develop.44", "version": "0.1.0-develop.60",
"resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.44.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.60.tgz",
"integrity": "sha512-BR/pII6v9i556tPBSDYUBszhFvSyQq+/Ptuopk7JIoRSqFzSsXWL0RteBi6v0qQzEffft7kOhaI1dLFOGZvWVQ==", "integrity": "sha512-gbfZAs3huJ0r21+n5UBHxBm4xSAt6DdMGLQKDTgvJc2gtiu2OYMQcecgw5vscBVPeTE6ZhtW1sX16MhT1jQ34A==",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",
@ -1730,22 +1730,23 @@
} }
}, },
"node_modules/@lumeweb/libs5/node_modules/multiformats": { "node_modules/@lumeweb/libs5/node_modules/multiformats": {
"version": "12.1.0", "version": "12.1.2",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.0.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.2.tgz",
"integrity": "sha512-/qTOKKnU8nwcVURjRcS+UN0QYgdS5BPZzY10Aiciu2SqncyCVMGV8KtD83EBFmsuJDsSEmT4sGvzcTkCoMw0sQ==", "integrity": "sha512-6mRIsrZXyw5xNPO31IGBMmxgDXBSgCGDsBAtazkZ02ip4hMwZNrQvfxXZtytRoBSWuzSq5f9VmMnXj76fIz5FQ==",
"engines": { "engines": {
"node": ">=16.0.0", "node": ">=16.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/@lumeweb/libweb": { "node_modules/@lumeweb/libweb": {
"version": "0.2.0-develop.39", "version": "0.2.0-develop.59",
"resolved": "https://registry.npmjs.org/@lumeweb/libweb/-/libweb-0.2.0-develop.39.tgz", "resolved": "https://registry.npmjs.org/@lumeweb/libweb/-/libweb-0.2.0-develop.59.tgz",
"integrity": "sha512-0qqBHXUb1eD5HOHhsycL3kev6osW+NNswWNovC+zpH7CtWeXfy4u+Of4uEA9qq4c80nZDB06FAQF1r03EeAwMg==", "integrity": "sha512-KCAjiY6emeUCZEmASBpwwlLUjIY8BdmQNmSp1+iOp4gq+8p0+aR8fpA5fKEIUTfFggx7Cw8E+exID+ahs5nKFg==",
"dependencies": { "dependencies": {
"@lumeweb/community-portals": "^0.1.0-develop.6", "@lumeweb/community-portals": "^0.1.0-develop.6",
"@lumeweb/libportal": "0.2.0-develop.21", "@lumeweb/libportal": "0.2.0-develop.39",
"@lumeweb/node-library-preset": "0.2.7", "@lumeweb/node-library-preset": "0.2.7",
"@noble/ciphers": "^0.3.0",
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",
"binconv": "^0.2.0" "binconv": "^0.2.0"
@ -1763,6 +1764,14 @@
"semantic-release": "^21.0.5" "semantic-release": "^21.0.5"
} }
}, },
"node_modules/@noble/ciphers": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.3.0.tgz",
"integrity": "sha512-ldbrnOjmNRwFdXcTM6uXDcxpMIFrbzAWNnpBPp4oTJTFF0XByGD6vf45WrehZGXRQTRVV+Zm8YP+EgEf+e4cWA==",
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@noble/curves": { "node_modules/@noble/curves": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
@ -18257,9 +18266,9 @@
} }
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "8.13.0", "version": "8.14.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/kernel-network-registry-client", "name": "@lumeweb/kernel-network-registry-client",
"version": "0.1.0-develop.9", "version": "0.1.0-develop.10",
"type": "module", "type": "module",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {
@ -18,7 +18,7 @@
"semantic-release": "semantic-release" "semantic-release": "semantic-release"
}, },
"dependencies": { "dependencies": {
"@lumeweb/libkernel": "^0.1.0-develop.39" "@lumeweb/libkernel": "^0.1.0-develop.64"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -1,6 +1,7 @@
import { Client, factory } from "@lumeweb/libkernel/module"; import { Client, factory } from "@lumeweb/libkernel/module";
import type { DataFn } from "@lumeweb/libkernel";
const MODULE = "zdiVGkiECt8CT7psN5wsQyNHewyRJLjPhAGwYGTRXPyAPXP21bdupzHyaw"; const MODULE = "zrjTCwTcK5Vco1h7cdUQKzs6yzeqm7vC5u5Lo9y1uhTyxnv";
export class NetworkRegistryClient extends Client { export class NetworkRegistryClient extends Client {
public async registerType(name: string) { public async registerType(name: string) {
@ -22,6 +23,11 @@ export class NetworkRegistryClient extends Client {
public async getNetworksByType(type: string) { public async getNetworksByType(type: string) {
return this.callModuleReturn("getNetworksByType", { type }); return this.callModuleReturn("getNetworksByType", { type });
} }
public subscribeToUpdates(cb: () => void): DataFn {
const [stop] = this.connectModule("subscribeToUpdates", undefined, cb);
return stop;
}
} }
export const createClient = factory<NetworkRegistryClient>( export const createClient = factory<NetworkRegistryClient>(