@xyo-network/bridge-pub-sub 2.91.2 → 2.92.0-rc.2
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/browser/AsyncQueryBus/AsyncQueryBusBase.d.cts +4 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.mts +4 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.ts +4 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.cts +1 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.mts +1 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.ts +1 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.cts +2 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.mts +2 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.ts +2 -2
- package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.cts +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.mts +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.ts +1 -1
- package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts +2 -2
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts +2 -2
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts +2 -2
- package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/index.d.cts +1 -2
- package/dist/browser/AsyncQueryBus/index.d.cts.map +1 -1
- package/dist/browser/AsyncQueryBus/index.d.mts +1 -2
- package/dist/browser/AsyncQueryBus/index.d.mts.map +1 -1
- package/dist/browser/AsyncQueryBus/index.d.ts +1 -2
- package/dist/browser/AsyncQueryBus/index.d.ts.map +1 -1
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.cts +14 -0
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.mts +14 -0
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.ts +14 -0
- package/dist/browser/AsyncQueryBus/model/BaseConfig.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.cts +9 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.mts +9 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.ts +9 -0
- package/dist/browser/AsyncQueryBus/model/ClientConfig.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.cts +13 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.mts +13 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.ts +13 -0
- package/dist/browser/AsyncQueryBus/model/HostConfig.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.cts +12 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.mts +12 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.ts +12 -0
- package/dist/browser/AsyncQueryBus/model/IntersectConfig.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/{Params.d.cts → model/Params.d.cts} +3 -1
- package/dist/browser/AsyncQueryBus/model/Params.d.cts.map +1 -0
- package/dist/{node/AsyncQueryBus → browser/AsyncQueryBus/model}/Params.d.mts +3 -1
- package/dist/browser/AsyncQueryBus/model/Params.d.mts.map +1 -0
- package/dist/{node/AsyncQueryBus → browser/AsyncQueryBus/model}/Params.d.ts +3 -1
- package/dist/browser/AsyncQueryBus/model/Params.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.cts +3 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.mts +3 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.ts +3 -0
- package/dist/browser/AsyncQueryBus/model/QueryStatus.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.cts +15 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.mts +15 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.ts +15 -0
- package/dist/browser/AsyncQueryBus/model/SearchableStorage.d.ts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/index.d.cts +8 -0
- package/dist/browser/AsyncQueryBus/model/index.d.cts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/index.d.mts +8 -0
- package/dist/browser/AsyncQueryBus/model/index.d.mts.map +1 -0
- package/dist/browser/AsyncQueryBus/model/index.d.ts +8 -0
- package/dist/browser/AsyncQueryBus/model/index.d.ts.map +1 -0
- package/dist/browser/PubSubBridge.d.cts +9 -24
- package/dist/browser/PubSubBridge.d.cts.map +1 -1
- package/dist/browser/PubSubBridge.d.mts +9 -24
- package/dist/browser/PubSubBridge.d.mts.map +1 -1
- package/dist/browser/PubSubBridge.d.ts +9 -24
- package/dist/browser/PubSubBridge.d.ts.map +1 -1
- package/dist/browser/index.cjs +89 -282
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +1 -1
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +84 -277
- package/dist/browser/index.js.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.cts +4 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.mts +4 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.ts +4 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.cts +1 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.mts +1 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.ts +1 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.cts +2 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.mts +2 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.ts +2 -2
- package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.cts +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.mts +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.ts +1 -1
- package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts +2 -2
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts +2 -2
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts +2 -2
- package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/index.d.cts +1 -2
- package/dist/node/AsyncQueryBus/index.d.cts.map +1 -1
- package/dist/node/AsyncQueryBus/index.d.mts +1 -2
- package/dist/node/AsyncQueryBus/index.d.mts.map +1 -1
- package/dist/node/AsyncQueryBus/index.d.ts +1 -2
- package/dist/node/AsyncQueryBus/index.d.ts.map +1 -1
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.cts +14 -0
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.mts +14 -0
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.ts +14 -0
- package/dist/node/AsyncQueryBus/model/BaseConfig.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.cts +9 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.mts +9 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.ts +9 -0
- package/dist/node/AsyncQueryBus/model/ClientConfig.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.cts +13 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.mts +13 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.ts +13 -0
- package/dist/node/AsyncQueryBus/model/HostConfig.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.cts +12 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.mts +12 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.ts +12 -0
- package/dist/node/AsyncQueryBus/model/IntersectConfig.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/{Params.d.cts → model/Params.d.cts} +3 -1
- package/dist/node/AsyncQueryBus/model/Params.d.cts.map +1 -0
- package/dist/{browser/AsyncQueryBus → node/AsyncQueryBus/model}/Params.d.mts +3 -1
- package/dist/node/AsyncQueryBus/model/Params.d.mts.map +1 -0
- package/dist/{browser/AsyncQueryBus → node/AsyncQueryBus/model}/Params.d.ts +3 -1
- package/dist/node/AsyncQueryBus/model/Params.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.cts +3 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.mts +3 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.ts +3 -0
- package/dist/node/AsyncQueryBus/model/QueryStatus.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.cts +15 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.mts +15 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.ts +15 -0
- package/dist/node/AsyncQueryBus/model/SearchableStorage.d.ts.map +1 -0
- package/dist/node/AsyncQueryBus/model/index.d.cts +8 -0
- package/dist/node/AsyncQueryBus/model/index.d.cts.map +1 -0
- package/dist/node/AsyncQueryBus/model/index.d.mts +8 -0
- package/dist/node/AsyncQueryBus/model/index.d.mts.map +1 -0
- package/dist/node/AsyncQueryBus/model/index.d.ts +8 -0
- package/dist/node/AsyncQueryBus/model/index.d.ts.map +1 -0
- package/dist/node/PubSubBridge.d.cts +9 -24
- package/dist/node/PubSubBridge.d.cts.map +1 -1
- package/dist/node/PubSubBridge.d.mts +9 -24
- package/dist/node/PubSubBridge.d.mts.map +1 -1
- package/dist/node/PubSubBridge.d.ts +9 -24
- package/dist/node/PubSubBridge.d.ts.map +1 -1
- package/dist/node/index.cjs +97 -288
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +91 -282
- package/dist/node/index.js.map +1 -1
- package/package.json +18 -23
- package/src/AsyncQueryBus/AsyncQueryBusBase.ts +20 -9
- package/src/AsyncQueryBus/AsyncQueryBusClient.ts +1 -2
- package/src/AsyncQueryBus/AsyncQueryBusHost.ts +20 -20
- package/src/AsyncQueryBus/ModuleHost/ModuleHost.ts +1 -1
- package/src/AsyncQueryBus/ModuleProxy/ModuleProxy.ts +3 -3
- package/src/AsyncQueryBus/index.ts +1 -2
- package/src/AsyncQueryBus/model/BaseConfig.ts +16 -0
- package/src/AsyncQueryBus/model/ClientConfig.ts +10 -0
- package/src/AsyncQueryBus/model/HostConfig.ts +15 -0
- package/src/AsyncQueryBus/model/IntersectConfig.ts +13 -0
- package/src/AsyncQueryBus/{Params.ts → model/Params.ts} +3 -1
- package/src/AsyncQueryBus/model/QueryStatus.ts +2 -0
- package/src/AsyncQueryBus/model/SearchableStorage.ts +15 -0
- package/src/AsyncQueryBus/model/index.ts +7 -0
- package/src/PubSubBridge.ts +36 -154
- package/src/index.ts +1 -1
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.cts +0 -90
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.cts.map +0 -1
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.mts +0 -90
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.mts.map +0 -1
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.ts +0 -90
- package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.ts.map +0 -1
- package/dist/browser/AbstractModuleProxy/index.d.cts +0 -2
- package/dist/browser/AbstractModuleProxy/index.d.cts.map +0 -1
- package/dist/browser/AbstractModuleProxy/index.d.mts +0 -2
- package/dist/browser/AbstractModuleProxy/index.d.mts.map +0 -1
- package/dist/browser/AbstractModuleProxy/index.d.ts +0 -2
- package/dist/browser/AbstractModuleProxy/index.d.ts.map +0 -1
- package/dist/browser/AsyncQueryBus/Config.d.cts +0 -53
- package/dist/browser/AsyncQueryBus/Config.d.cts.map +0 -1
- package/dist/browser/AsyncQueryBus/Config.d.mts +0 -53
- package/dist/browser/AsyncQueryBus/Config.d.mts.map +0 -1
- package/dist/browser/AsyncQueryBus/Config.d.ts +0 -53
- package/dist/browser/AsyncQueryBus/Config.d.ts.map +0 -1
- package/dist/browser/AsyncQueryBus/Params.d.cts.map +0 -1
- package/dist/browser/AsyncQueryBus/Params.d.mts.map +0 -1
- package/dist/browser/AsyncQueryBus/Params.d.ts.map +0 -1
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.cts +0 -90
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.cts.map +0 -1
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.mts +0 -90
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.mts.map +0 -1
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.ts +0 -90
- package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.ts.map +0 -1
- package/dist/node/AbstractModuleProxy/index.d.cts +0 -2
- package/dist/node/AbstractModuleProxy/index.d.cts.map +0 -1
- package/dist/node/AbstractModuleProxy/index.d.mts +0 -2
- package/dist/node/AbstractModuleProxy/index.d.mts.map +0 -1
- package/dist/node/AbstractModuleProxy/index.d.ts +0 -2
- package/dist/node/AbstractModuleProxy/index.d.ts.map +0 -1
- package/dist/node/AsyncQueryBus/Config.d.cts +0 -53
- package/dist/node/AsyncQueryBus/Config.d.cts.map +0 -1
- package/dist/node/AsyncQueryBus/Config.d.mts +0 -53
- package/dist/node/AsyncQueryBus/Config.d.mts.map +0 -1
- package/dist/node/AsyncQueryBus/Config.d.ts +0 -53
- package/dist/node/AsyncQueryBus/Config.d.ts.map +0 -1
- package/dist/node/AsyncQueryBus/Params.d.cts.map +0 -1
- package/dist/node/AsyncQueryBus/Params.d.mts.map +0 -1
- package/dist/node/AsyncQueryBus/Params.d.ts.map +0 -1
- package/src/AbstractModuleProxy/AbstractModuleProxy.ts +0 -239
- package/src/AbstractModuleProxy/index.ts +0 -1
- package/src/AsyncQueryBus/Config.ts +0 -62
package/dist/browser/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var src_exports = {};
|
|
23
23
|
__export(src_exports, {
|
|
24
|
-
|
|
24
|
+
AbstractModuleHost: () => AbstractModuleHost,
|
|
25
25
|
AsyncQueryBusClient: () => AsyncQueryBusClient,
|
|
26
26
|
AsyncQueryBusHost: () => AsyncQueryBusHost,
|
|
27
27
|
AsyncQueryBusModuleHost: () => AsyncQueryBusModuleHost,
|
|
@@ -33,162 +33,11 @@ __export(src_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(src_exports);
|
|
35
35
|
|
|
36
|
-
// src/
|
|
37
|
-
var import_assert = require("@xylabs/assert");
|
|
38
|
-
var import_lodash = require("@xylabs/lodash");
|
|
36
|
+
// src/AbstractModuleHost/AbstractModuleHost.ts
|
|
39
37
|
var import_object = require("@xylabs/object");
|
|
40
|
-
var
|
|
41
|
-
var import_boundwitness_builder = require("@xyo-network/boundwitness-builder");
|
|
42
|
-
var import_boundwitness_wrapper = require("@xyo-network/boundwitness-wrapper");
|
|
43
|
-
var import_module_model = require("@xyo-network/module-model");
|
|
44
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
|
45
|
-
var AbstractModuleProxy = class extends import_object.Base {
|
|
38
|
+
var AbstractModuleHost = class extends import_object.Base {
|
|
46
39
|
static {
|
|
47
|
-
__name(this, "
|
|
48
|
-
}
|
|
49
|
-
static requiredQueries = [
|
|
50
|
-
import_module_model.ModuleDiscoverQuerySchema
|
|
51
|
-
];
|
|
52
|
-
eventData = {};
|
|
53
|
-
proxyParams;
|
|
54
|
-
constructor(params) {
|
|
55
|
-
super({
|
|
56
|
-
config: {
|
|
57
|
-
schema: import_module_model.ModuleConfigSchema
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
this.proxyParams = params;
|
|
61
|
-
}
|
|
62
|
-
get account() {
|
|
63
|
-
return this.proxyParams.account;
|
|
64
|
-
}
|
|
65
|
-
get address() {
|
|
66
|
-
return this.proxyParams.moduleAddress;
|
|
67
|
-
}
|
|
68
|
-
get config() {
|
|
69
|
-
return this.params.config;
|
|
70
|
-
}
|
|
71
|
-
get downResolver() {
|
|
72
|
-
throw new Error("Unsupported");
|
|
73
|
-
}
|
|
74
|
-
get id() {
|
|
75
|
-
return this.proxyParams.moduleAddress;
|
|
76
|
-
}
|
|
77
|
-
get queries() {
|
|
78
|
-
return this.proxyParams.queries;
|
|
79
|
-
}
|
|
80
|
-
get upResolver() {
|
|
81
|
-
throw new Error("Unsupported");
|
|
82
|
-
}
|
|
83
|
-
static hasRequiredQueries(module2) {
|
|
84
|
-
return this.missingRequiredQueries(module2).length === 0;
|
|
85
|
-
}
|
|
86
|
-
static missingRequiredQueries(module2) {
|
|
87
|
-
const moduleQueries = module2.queries;
|
|
88
|
-
return (0, import_lodash.compact)(this.requiredQueries.map((query) => {
|
|
89
|
-
return moduleQueries.includes(query) ? null : query;
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
async addressPreviousHash() {
|
|
93
|
-
const queryPayload = {
|
|
94
|
-
schema: import_module_model.ModuleAddressQuerySchema
|
|
95
|
-
};
|
|
96
|
-
return (0, import_assert.assertEx)((await this.sendQuery(queryPayload)).find((payload) => payload.schema === import_module_model.AddressPreviousHashSchema), "Result did not include correct payload");
|
|
97
|
-
}
|
|
98
|
-
clearListeners(_eventNames) {
|
|
99
|
-
throw new Error("Unsupported");
|
|
100
|
-
}
|
|
101
|
-
//TODO: Make ModuleDescription into real payload
|
|
102
|
-
async describe() {
|
|
103
|
-
const queryPayload = {
|
|
104
|
-
schema: import_module_model.ModuleDescribeQuerySchema
|
|
105
|
-
};
|
|
106
|
-
return (await this.sendQuery(queryPayload))[0];
|
|
107
|
-
}
|
|
108
|
-
async discover() {
|
|
109
|
-
const queryPayload = {
|
|
110
|
-
schema: import_module_model.ModuleDiscoverQuerySchema
|
|
111
|
-
};
|
|
112
|
-
return await this.sendQuery(queryPayload);
|
|
113
|
-
}
|
|
114
|
-
emit(_eventName, _eventArgs) {
|
|
115
|
-
throw new Error("Unsupported");
|
|
116
|
-
}
|
|
117
|
-
emitSerial(_eventName, _eventArgs) {
|
|
118
|
-
throw new Error("Unsupported");
|
|
119
|
-
}
|
|
120
|
-
listenerCount(_eventNames) {
|
|
121
|
-
throw new Error("Unsupported");
|
|
122
|
-
}
|
|
123
|
-
async manifest(maxDepth) {
|
|
124
|
-
const queryPayload = {
|
|
125
|
-
schema: import_module_model.ModuleManifestQuerySchema,
|
|
126
|
-
...maxDepth === void 0 ? {} : {
|
|
127
|
-
maxDepth
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
return (await this.sendQuery(queryPayload))[0];
|
|
131
|
-
}
|
|
132
|
-
async moduleAddress() {
|
|
133
|
-
const queryPayload = {
|
|
134
|
-
schema: import_module_model.ModuleAddressQuerySchema
|
|
135
|
-
};
|
|
136
|
-
return await this.sendQuery(queryPayload);
|
|
137
|
-
}
|
|
138
|
-
off(_eventNames, _listener) {
|
|
139
|
-
throw new Error("Unsupported");
|
|
140
|
-
}
|
|
141
|
-
offAny(_listener) {
|
|
142
|
-
throw new Error("Unsupported");
|
|
143
|
-
}
|
|
144
|
-
on(_eventNames, _listener) {
|
|
145
|
-
throw new Error("Unsupported");
|
|
146
|
-
}
|
|
147
|
-
onAny(_listener) {
|
|
148
|
-
throw new Error("Unsupported");
|
|
149
|
-
}
|
|
150
|
-
once(_eventName, _listener) {
|
|
151
|
-
throw new Error("Unsupported");
|
|
152
|
-
}
|
|
153
|
-
async previousHash() {
|
|
154
|
-
const queryPayload = {
|
|
155
|
-
schema: import_module_model.ModuleAddressQuerySchema
|
|
156
|
-
};
|
|
157
|
-
return (await this.sendQuery(queryPayload)).pop().previousHash;
|
|
158
|
-
}
|
|
159
|
-
queryable(_query, _payloads) {
|
|
160
|
-
return true;
|
|
161
|
-
}
|
|
162
|
-
resolve(nameOrAddressOrFilter, _options) {
|
|
163
|
-
return typeof nameOrAddressOrFilter === "string" ? void 0 : [];
|
|
164
|
-
}
|
|
165
|
-
state() {
|
|
166
|
-
return [];
|
|
167
|
-
}
|
|
168
|
-
bindQuery(query, payloads, account = this.account) {
|
|
169
|
-
const promise = new import_promise.PromiseEx(async (resolve) => {
|
|
170
|
-
const result = await this.bindQueryInternal(query, payloads, account);
|
|
171
|
-
resolve?.(result);
|
|
172
|
-
return result;
|
|
173
|
-
}, account);
|
|
174
|
-
return promise;
|
|
175
|
-
}
|
|
176
|
-
async bindQueryInternal(query, payloads, account = this.account) {
|
|
177
|
-
const builder = await new import_boundwitness_builder.QueryBoundWitnessBuilder().payloads(payloads).query(query);
|
|
178
|
-
const result = await (account ? builder.witness(account) : builder).build();
|
|
179
|
-
return result;
|
|
180
|
-
}
|
|
181
|
-
async filterErrors(result) {
|
|
182
|
-
const wrapper = await import_boundwitness_wrapper.BoundWitnessWrapper.wrap(result[0], result[1]);
|
|
183
|
-
return wrapper.payloadsBySchema(import_payload_model.ModuleErrorSchema);
|
|
184
|
-
}
|
|
185
|
-
async sendQuery(queryPayload, payloads) {
|
|
186
|
-
const query = await this.bindQuery(queryPayload, payloads);
|
|
187
|
-
const [, resultPayloads, errors] = await this.query(query[0], query[1]);
|
|
188
|
-
if (errors && errors.length > 0) {
|
|
189
|
-
throw errors[0];
|
|
190
|
-
}
|
|
191
|
-
return resultPayloads;
|
|
40
|
+
__name(this, "AbstractModuleHost");
|
|
192
41
|
}
|
|
193
42
|
};
|
|
194
43
|
|
|
@@ -202,7 +51,7 @@ var import_payload_builder = require("@xyo-network/payload-builder");
|
|
|
202
51
|
var import_lru_cache2 = require("lru-cache");
|
|
203
52
|
|
|
204
53
|
// src/AsyncQueryBus/AsyncQueryBusBase.ts
|
|
205
|
-
var
|
|
54
|
+
var import_assert = require("@xylabs/assert");
|
|
206
55
|
var import_object2 = require("@xylabs/object");
|
|
207
56
|
var import_archivist_model = require("@xyo-network/archivist-model");
|
|
208
57
|
var import_diviner_model = require("@xyo-network/diviner-model");
|
|
@@ -211,6 +60,7 @@ var AsyncQueryBusBase = class extends import_object2.Base {
|
|
|
211
60
|
static {
|
|
212
61
|
__name(this, "AsyncQueryBusBase");
|
|
213
62
|
}
|
|
63
|
+
_exposedAddresses = /* @__PURE__ */ new Set();
|
|
214
64
|
_lastState;
|
|
215
65
|
_targetConfigs = {};
|
|
216
66
|
_targetQueries = {};
|
|
@@ -237,17 +87,25 @@ var AsyncQueryBusBase = class extends import_object2.Base {
|
|
|
237
87
|
this._lastState = this._lastState ?? new import_lru_cache.LRUCache(requiredConfig);
|
|
238
88
|
return this._lastState;
|
|
239
89
|
}
|
|
90
|
+
expose(address, validate = true) {
|
|
91
|
+
(0, import_assert.assertEx)(!validate || !this._exposedAddresses.has(address), () => `Address already exposed [${address}]`);
|
|
92
|
+
this._exposedAddresses.add(address);
|
|
93
|
+
}
|
|
240
94
|
async queriesArchivist() {
|
|
241
|
-
return (0,
|
|
95
|
+
return (0, import_assert.assertEx)((0, import_archivist_model.asArchivistInstance)(await this.resolver.resolve(this.config?.intersect?.queries?.archivist)), () => `Unable to resolve queriesArchivist [${this.config?.intersect?.queries?.archivist}]`);
|
|
242
96
|
}
|
|
243
97
|
async queriesDiviner() {
|
|
244
|
-
return (0,
|
|
98
|
+
return (0, import_assert.assertEx)((0, import_diviner_model.asDivinerInstance)(await this.resolver.resolve(this.config?.intersect?.queries?.boundWitnessDiviner)), () => `Unable to resolve queriesDiviner [${this.config?.intersect?.queries?.boundWitnessDiviner}]`);
|
|
245
99
|
}
|
|
246
100
|
async responsesArchivist() {
|
|
247
|
-
return (0,
|
|
101
|
+
return (0, import_assert.assertEx)((0, import_archivist_model.asArchivistInstance)(await this.resolver.resolve(this.config?.intersect?.responses?.archivist)), () => `Unable to resolve responsesArchivist [${this.config?.intersect?.responses?.archivist}]`);
|
|
248
102
|
}
|
|
249
103
|
async responsesDiviner() {
|
|
250
|
-
return (0,
|
|
104
|
+
return (0, import_assert.assertEx)((0, import_diviner_model.asDivinerInstance)(await this.resolver.resolve(this.config?.intersect?.responses?.boundWitnessDiviner)), () => `Unable to resolve responsesDiviner [${this.config?.intersect?.responses?.boundWitnessDiviner}]`);
|
|
105
|
+
}
|
|
106
|
+
unexpose(address, validate = true) {
|
|
107
|
+
(0, import_assert.assertEx)(!validate || this._exposedAddresses.has(address), () => `Address not exposed [${address}]`);
|
|
108
|
+
this._exposedAddresses.delete(address);
|
|
251
109
|
}
|
|
252
110
|
/**
|
|
253
111
|
* Commit the internal state of the process. This is similar
|
|
@@ -281,7 +139,7 @@ var AsyncQueryBusBase = class extends import_object2.Base {
|
|
|
281
139
|
}
|
|
282
140
|
};
|
|
283
141
|
|
|
284
|
-
// src/AsyncQueryBus/
|
|
142
|
+
// src/AsyncQueryBus/model/QueryStatus.ts
|
|
285
143
|
var Pending = "pending";
|
|
286
144
|
|
|
287
145
|
// src/AsyncQueryBus/AsyncQueryBusClient.ts
|
|
@@ -466,11 +324,11 @@ var AsyncQueryBusClient = class extends AsyncQueryBusBase {
|
|
|
466
324
|
|
|
467
325
|
// src/AsyncQueryBus/AsyncQueryBusHost.ts
|
|
468
326
|
var import_array = require("@xylabs/array");
|
|
469
|
-
var
|
|
327
|
+
var import_assert2 = require("@xylabs/assert");
|
|
470
328
|
var import_timer2 = require("@xylabs/timer");
|
|
471
329
|
var import_boundwitness_model2 = require("@xyo-network/boundwitness-model");
|
|
472
330
|
var import_diviner_boundwitness_model2 = require("@xyo-network/diviner-boundwitness-model");
|
|
473
|
-
var
|
|
331
|
+
var import_module_model = require("@xyo-network/module-model");
|
|
474
332
|
var import_payload_builder2 = require("@xyo-network/payload-builder");
|
|
475
333
|
var AsyncQueryBusHost = class extends AsyncQueryBusBase {
|
|
476
334
|
static {
|
|
@@ -487,7 +345,7 @@ var AsyncQueryBusHost = class extends AsyncQueryBusBase {
|
|
|
487
345
|
return !!this._pollId;
|
|
488
346
|
}
|
|
489
347
|
async listeningModules() {
|
|
490
|
-
const mods = this.config?.listeningModules ? await Promise.all(this.config.listeningModules.map(async (listeningModule) => (0,
|
|
348
|
+
const mods = this.config?.listeningModules ? await Promise.all(this.config.listeningModules.map(async (listeningModule) => (0, import_assert2.assertEx)((0, import_module_model.asModuleInstance)(await this.resolver.resolve(listeningModule)), () => `Unable to resolve listeningModule [${listeningModule}]`))) : await this.resolver.resolve(void 0, {
|
|
491
349
|
direction: "down"
|
|
492
350
|
});
|
|
493
351
|
return mods;
|
|
@@ -510,38 +368,39 @@ var AsyncQueryBusHost = class extends AsyncQueryBusBase {
|
|
|
510
368
|
const localModuleName = localModule.config.name ?? localModule.address;
|
|
511
369
|
const queryArchivist = await this.queriesArchivist();
|
|
512
370
|
const responseArchivist = await this.responsesArchivist();
|
|
513
|
-
const
|
|
514
|
-
if (
|
|
371
|
+
const queryDestination = query.$meta?.destination;
|
|
372
|
+
if (queryDestination && queryDestination?.includes(localModule.address)) {
|
|
515
373
|
const queryIndex = query.payload_hashes.indexOf(query.query);
|
|
516
374
|
if (queryIndex !== -1) {
|
|
517
375
|
const querySchema = query.payload_schemas[queryIndex];
|
|
518
376
|
if (localModule.queries.includes(querySchema)) {
|
|
519
|
-
const
|
|
520
|
-
const
|
|
521
|
-
const
|
|
522
|
-
if (!(0, import_array.containsAll)(Object.keys(
|
|
523
|
-
this.logger?.error(`Error processing command ${
|
|
377
|
+
const queryPayloads = await queryArchivist.get(query.payload_hashes);
|
|
378
|
+
const queryPayloadsDict = await import_payload_builder2.PayloadBuilder.toAllHashMap(queryPayloads);
|
|
379
|
+
const queryHash = (await import_payload_builder2.PayloadBuilder.build(query)).$hash;
|
|
380
|
+
if (!(0, import_array.containsAll)(Object.keys(queryPayloadsDict), query.payload_hashes)) {
|
|
381
|
+
this.logger?.error(`Error processing command ${queryHash} for module ${localModuleName}, missing payloads`);
|
|
524
382
|
return;
|
|
525
383
|
}
|
|
526
384
|
try {
|
|
527
|
-
const
|
|
528
|
-
this.logger?.debug(`Issuing
|
|
529
|
-
const response = await localModule.query(query,
|
|
385
|
+
const querySchema2 = queryPayloadsDict[query.query].schema;
|
|
386
|
+
this.logger?.debug(`Issuing query ${querySchema2} (${queryHash}) addressed to module: ${localModuleName}`);
|
|
387
|
+
const response = await localModule.query(query, queryPayloads);
|
|
530
388
|
const [bw, payloads, errors] = response;
|
|
531
|
-
this.logger?.debug(`Replying to
|
|
389
|
+
this.logger?.debug(`Replying to query ${queryHash} addressed to module: ${localModuleName}`);
|
|
532
390
|
const insertResult = await responseArchivist.insert([
|
|
533
391
|
bw,
|
|
534
392
|
...payloads,
|
|
535
393
|
...errors
|
|
536
394
|
]);
|
|
537
395
|
if (insertResult.length === 0) {
|
|
538
|
-
this.logger?.error(`Error replying to
|
|
396
|
+
this.logger?.error(`Error replying to query ${queryHash} addressed to module: ${localModuleName}`);
|
|
539
397
|
}
|
|
540
398
|
if (query?.timestamp) {
|
|
541
399
|
await this.commitState(localModule.address, query.timestamp);
|
|
542
400
|
}
|
|
543
401
|
} catch (error) {
|
|
544
|
-
this.logger?.error(`Error processing
|
|
402
|
+
this.logger?.error(`Error processing query ${queryHash} for module ${localModuleName}: ${error}`);
|
|
403
|
+
console.error(`Error processing query ${queryHash} for module ${localModuleName}: ${error}`);
|
|
545
404
|
}
|
|
546
405
|
}
|
|
547
406
|
}
|
|
@@ -592,37 +451,29 @@ var AsyncQueryBusHost = class extends AsyncQueryBusBase {
|
|
|
592
451
|
}, this.pollFrequencyConfig);
|
|
593
452
|
}
|
|
594
453
|
/**
|
|
595
|
-
* Background process for checking for inbound
|
|
454
|
+
* Background process for checking for inbound queries
|
|
596
455
|
*/
|
|
597
456
|
processIncomingQueries = async () => {
|
|
598
|
-
this.logger?.debug("Checking for inbound
|
|
457
|
+
this.logger?.debug("Checking for inbound queries");
|
|
599
458
|
const localModules = await this.listeningModules();
|
|
600
459
|
await Promise.allSettled(localModules.map(async (localModule) => {
|
|
601
460
|
try {
|
|
602
461
|
const localModuleName = localModule.config.name ?? localModule.address;
|
|
603
|
-
this.logger?.debug(`Checking for inbound
|
|
462
|
+
this.logger?.debug(`Checking for inbound queries to ${localModuleName}`);
|
|
604
463
|
const queries = await this.findQueriesToAddress(localModule.address);
|
|
605
464
|
if (queries.length === 0)
|
|
606
465
|
return;
|
|
607
|
-
this.logger?.debug(`Found
|
|
466
|
+
this.logger?.debug(`Found queries addressed to local module: ${localModuleName}`);
|
|
608
467
|
for (const query of queries) {
|
|
609
468
|
await this.callLocalModule(localModule, query);
|
|
610
469
|
}
|
|
611
470
|
} catch (error) {
|
|
612
|
-
this.logger?.error(`Error processing
|
|
471
|
+
this.logger?.error(`Error processing queries for address ${localModule.address}: ${error}`);
|
|
613
472
|
}
|
|
614
473
|
}));
|
|
615
474
|
};
|
|
616
475
|
};
|
|
617
476
|
|
|
618
|
-
// src/AbstractModuleHost/AbstractModuleHost.ts
|
|
619
|
-
var import_object3 = require("@xylabs/object");
|
|
620
|
-
var AbstractModuleHost = class extends import_object3.Base {
|
|
621
|
-
static {
|
|
622
|
-
__name(this, "AbstractModuleHost");
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
|
|
626
477
|
// src/AsyncQueryBus/ModuleHost/ModuleHost.ts
|
|
627
478
|
var AsyncQueryBusModuleHost = class extends AbstractModuleHost {
|
|
628
479
|
static {
|
|
@@ -652,12 +503,13 @@ var AsyncQueryBusModuleHost = class extends AbstractModuleHost {
|
|
|
652
503
|
};
|
|
653
504
|
|
|
654
505
|
// src/AsyncQueryBus/ModuleProxy/ModuleProxy.ts
|
|
655
|
-
var
|
|
506
|
+
var import_abstract_bridge = require("@xyo-network/abstract-bridge");
|
|
507
|
+
var AsyncQueryBusModuleProxy = class extends import_abstract_bridge.AbstractModuleProxy {
|
|
656
508
|
static {
|
|
657
509
|
__name(this, "AsyncQueryBusModuleProxy");
|
|
658
510
|
}
|
|
659
511
|
async query(query, payloads) {
|
|
660
|
-
return await this.proxyParams.
|
|
512
|
+
return await this.proxyParams.busClient.send(this.address, query, payloads);
|
|
661
513
|
}
|
|
662
514
|
};
|
|
663
515
|
|
|
@@ -668,12 +520,10 @@ var PubSubBridgeSchema = "network.xyo.bridge.pubsub";
|
|
|
668
520
|
var PubSubBridgeConfigSchema = `${PubSubBridgeSchema}.config`;
|
|
669
521
|
|
|
670
522
|
// src/PubSubBridge.ts
|
|
671
|
-
var
|
|
672
|
-
var
|
|
673
|
-
var
|
|
674
|
-
var
|
|
675
|
-
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
676
|
-
var import_lru_cache3 = require("lru-cache");
|
|
523
|
+
var import_assert3 = require("@xylabs/assert");
|
|
524
|
+
var import_abstract_bridge2 = require("@xyo-network/abstract-bridge");
|
|
525
|
+
var import_account = require("@xyo-network/account");
|
|
526
|
+
var import_module_model2 = require("@xyo-network/module-model");
|
|
677
527
|
function _ts_decorate(decorators, target, key, desc) {
|
|
678
528
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
679
529
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -686,7 +536,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
686
536
|
}
|
|
687
537
|
__name(_ts_decorate, "_ts_decorate");
|
|
688
538
|
var moduleName = "PubSubBridge";
|
|
689
|
-
var PubSubBridge = class extends
|
|
539
|
+
var PubSubBridge = class extends import_abstract_bridge2.AbstractBridge {
|
|
690
540
|
static {
|
|
691
541
|
__name(this, "PubSubBridge");
|
|
692
542
|
}
|
|
@@ -696,94 +546,52 @@ var PubSubBridge = class extends import_abstract_bridge.AbstractBridge {
|
|
|
696
546
|
_configRootAddress = "";
|
|
697
547
|
_configStateStoreArchivist = "";
|
|
698
548
|
_configStateStoreBoundWitnessDiviner = "";
|
|
699
|
-
|
|
549
|
+
_exposedAddresses = [];
|
|
700
550
|
_lastState;
|
|
701
|
-
_targetConfigs = {};
|
|
702
|
-
_targetQueries = {};
|
|
703
551
|
_busClient;
|
|
704
552
|
_busHost;
|
|
705
|
-
get discoverCache() {
|
|
706
|
-
const config = this.discoverCacheConfig;
|
|
707
|
-
this._discoverCache = this._discoverCache ?? new import_lru_cache3.LRUCache({
|
|
708
|
-
ttlAutopurge: true,
|
|
709
|
-
...config
|
|
710
|
-
});
|
|
711
|
-
return this._discoverCache;
|
|
712
|
-
}
|
|
713
|
-
get discoverCacheConfig() {
|
|
714
|
-
const discoverCacheConfig = this.config.discoverCache === true ? {} : this.config.discoverCache;
|
|
715
|
-
return {
|
|
716
|
-
max: 100,
|
|
717
|
-
ttl: 1e3 * 60 * 5,
|
|
718
|
-
...discoverCacheConfig
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
553
|
get moduleName() {
|
|
722
554
|
return `${this.config.name ?? moduleName}`;
|
|
723
555
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
return true;
|
|
736
|
-
}
|
|
737
|
-
async disconnect() {
|
|
738
|
-
await Promise.resolve();
|
|
739
|
-
this.connected = false;
|
|
740
|
-
return true;
|
|
741
|
-
}
|
|
742
|
-
getRootAddress() {
|
|
743
|
-
return this.rootAddress;
|
|
744
|
-
}
|
|
745
|
-
targetConfig(address) {
|
|
746
|
-
return (0, import_assert4.assertEx)(this._targetConfigs[address], () => `targetConfig not set [${address}]`);
|
|
747
|
-
}
|
|
748
|
-
async targetDiscover(address, _maxDepth) {
|
|
749
|
-
if (!this.connected)
|
|
750
|
-
throw new Error("Not connected");
|
|
751
|
-
const cachedResult = this.discoverCache?.get(address ?? "root ");
|
|
752
|
-
if (cachedResult) {
|
|
753
|
-
return cachedResult;
|
|
556
|
+
async exposeHandler(id, options) {
|
|
557
|
+
const filterOptions = {
|
|
558
|
+
direction: options?.direction
|
|
559
|
+
};
|
|
560
|
+
const module2 = await super.resolve(id, filterOptions);
|
|
561
|
+
if (module2) {
|
|
562
|
+
const host = (0, import_assert3.assertEx)(this.busHost(), "Not configured as a host");
|
|
563
|
+
host.expose(module2.address);
|
|
564
|
+
return [
|
|
565
|
+
module2.address
|
|
566
|
+
];
|
|
754
567
|
}
|
|
755
|
-
await this.started("throw");
|
|
756
|
-
const addressToDiscover = address ?? await this.getRootAddress();
|
|
757
|
-
this.logger?.debug(`${this.moduleName}: Begin issuing targetDiscover to: ${addressToDiscover}`);
|
|
758
568
|
return [];
|
|
759
569
|
}
|
|
760
|
-
|
|
761
|
-
const
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
|
|
570
|
+
resolveHandler(id, _options) {
|
|
571
|
+
const account = import_account.Account.randomSync();
|
|
572
|
+
const params = {
|
|
573
|
+
account,
|
|
574
|
+
busClient: (0, import_assert3.assertEx)(this.busClient(), "Bus client not initialized"),
|
|
575
|
+
moduleAddress: id
|
|
765
576
|
};
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
return
|
|
781
|
-
}
|
|
782
|
-
targetQueryable(_address, _query, _payloads, _queryConfig) {
|
|
783
|
-
return true;
|
|
577
|
+
return new AsyncQueryBusModuleProxy(params);
|
|
578
|
+
}
|
|
579
|
+
async unexposeHandler(id, options) {
|
|
580
|
+
const filterOptions = {
|
|
581
|
+
direction: options?.direction
|
|
582
|
+
};
|
|
583
|
+
const module2 = await super.resolve(id, filterOptions);
|
|
584
|
+
if (module2) {
|
|
585
|
+
const host = (0, import_assert3.assertEx)(this.busHost(), "Not configured as a host");
|
|
586
|
+
host.unexpose(module2.address);
|
|
587
|
+
return [
|
|
588
|
+
module2.address
|
|
589
|
+
];
|
|
590
|
+
}
|
|
591
|
+
return [];
|
|
784
592
|
}
|
|
785
593
|
busClient() {
|
|
786
|
-
if (!this._busClient) {
|
|
594
|
+
if (!this._busClient && this.config.client) {
|
|
787
595
|
this._busClient = new AsyncQueryBusClient({
|
|
788
596
|
config: this.config.client,
|
|
789
597
|
logger: this.logger,
|
|
@@ -793,7 +601,7 @@ var PubSubBridge = class extends import_abstract_bridge.AbstractBridge {
|
|
|
793
601
|
return this._busClient;
|
|
794
602
|
}
|
|
795
603
|
busHost() {
|
|
796
|
-
if (!this._busHost) {
|
|
604
|
+
if (!this._busHost && this.config.host) {
|
|
797
605
|
this._busHost = new AsyncQueryBusHost({
|
|
798
606
|
config: this.config.host,
|
|
799
607
|
logger: this.logger,
|
|
@@ -802,17 +610,16 @@ var PubSubBridge = class extends import_abstract_bridge.AbstractBridge {
|
|
|
802
610
|
}
|
|
803
611
|
return this._busHost;
|
|
804
612
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
return true;
|
|
613
|
+
startHandler() {
|
|
614
|
+
this.busHost()?.start();
|
|
615
|
+
return Promise.resolve(true);
|
|
809
616
|
}
|
|
810
617
|
stopHandler(_timeout) {
|
|
811
|
-
this.busHost()
|
|
618
|
+
this.busHost()?.stop();
|
|
812
619
|
return true;
|
|
813
620
|
}
|
|
814
621
|
};
|
|
815
622
|
PubSubBridge = _ts_decorate([
|
|
816
|
-
(0,
|
|
623
|
+
(0, import_module_model2.creatableModule)()
|
|
817
624
|
], PubSubBridge);
|
|
818
625
|
//# sourceMappingURL=index.cjs.map
|