@xyo-network/bridge-module-resolver 2.72.8 → 2.73.0
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/index.d.mts +120 -0
- package/dist/index.d.ts +120 -0
- package/dist/index.js +7525 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7499 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +48 -35
- package/src/ModuleResolver.ts +1 -1
- package/src/ProxyModule.ts +1 -1
- package/tsup.config.ts +16 -0
- package/dist/cjs/ModuleResolver.js +0 -206
- package/dist/cjs/ModuleResolver.js.map +0 -1
- package/dist/cjs/ProxyModule.js +0 -124
- package/dist/cjs/ProxyModule.js.map +0 -1
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/index.js.map +0 -1
- package/dist/docs.json +0 -29475
- package/dist/esm/ModuleResolver.js +0 -183
- package/dist/esm/ModuleResolver.js.map +0 -1
- package/dist/esm/ProxyModule.js +0 -106
- package/dist/esm/ProxyModule.js.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/types/ModuleResolver.d.ts +0 -30
- package/dist/types/ModuleResolver.d.ts.map +0 -1
- package/dist/types/ProxyModule.d.ts +0 -84
- package/dist/types/ProxyModule.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -10,55 +10,69 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^2.
|
|
14
|
-
"@xyo-network/account-model": "~2.
|
|
15
|
-
"@xyo-network/address-payload-plugin": "~2.
|
|
16
|
-
"@xyo-network/archivist-model": "~2.
|
|
17
|
-
"@xyo-network/archivist-wrapper": "~2.
|
|
18
|
-
"@xyo-network/boundwitness-builder": "~2.
|
|
19
|
-
"@xyo-network/bridge-model": "~2.
|
|
20
|
-
"@xyo-network/diviner": "~2.
|
|
21
|
-
"@xyo-network/diviner-model": "~2.
|
|
22
|
-
"@xyo-network/error": "~2.
|
|
23
|
-
"@xyo-network/manifest-model": "~2.
|
|
24
|
-
"@xyo-network/module": "~2.
|
|
25
|
-
"@xyo-network/module-model": "~2.
|
|
26
|
-
"@xyo-network/node-model": "~2.
|
|
27
|
-
"@xyo-network/node-wrapper": "~2.
|
|
28
|
-
"@xyo-network/payload-model": "~2.
|
|
29
|
-
"@xyo-network/promise": "~2.
|
|
30
|
-
"@xyo-network/sentinel": "~2.
|
|
31
|
-
"@xyo-network/witness-model": "~2.
|
|
32
|
-
"@xyo-network/witness-wrapper": "~2.
|
|
13
|
+
"@xylabs/assert": "^2.10.7",
|
|
14
|
+
"@xyo-network/account-model": "~2.73.0",
|
|
15
|
+
"@xyo-network/address-payload-plugin": "~2.73.0",
|
|
16
|
+
"@xyo-network/archivist-model": "~2.73.0",
|
|
17
|
+
"@xyo-network/archivist-wrapper": "~2.73.0",
|
|
18
|
+
"@xyo-network/boundwitness-builder": "~2.73.0",
|
|
19
|
+
"@xyo-network/bridge-model": "~2.73.0",
|
|
20
|
+
"@xyo-network/diviner": "~2.73.0",
|
|
21
|
+
"@xyo-network/diviner-model": "~2.73.0",
|
|
22
|
+
"@xyo-network/error": "~2.73.0",
|
|
23
|
+
"@xyo-network/manifest-model": "~2.73.0",
|
|
24
|
+
"@xyo-network/module": "~2.73.0",
|
|
25
|
+
"@xyo-network/module-model": "~2.73.0",
|
|
26
|
+
"@xyo-network/node-model": "~2.73.0",
|
|
27
|
+
"@xyo-network/node-wrapper": "~2.73.0",
|
|
28
|
+
"@xyo-network/payload-model": "~2.73.0",
|
|
29
|
+
"@xyo-network/promise": "~2.73.0",
|
|
30
|
+
"@xyo-network/sentinel": "~2.73.0",
|
|
31
|
+
"@xyo-network/witness-model": "~2.73.0",
|
|
32
|
+
"@xyo-network/witness-wrapper": "~2.73.0",
|
|
33
33
|
"lodash": "^4.17.21"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@xylabs/ts-scripts-yarn3": "^2.19.
|
|
37
|
-
"@xylabs/tsconfig": "^2.19.
|
|
36
|
+
"@xylabs/ts-scripts-yarn3": "^2.19.5",
|
|
37
|
+
"@xylabs/tsconfig": "^2.19.5",
|
|
38
|
+
"publint": "^0.2.2",
|
|
39
|
+
"tsup": "^7.2.0",
|
|
38
40
|
"typescript": "^5.2.2"
|
|
39
41
|
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"package-compile": "tsup && publint",
|
|
44
|
+
"package-recompile": "tsup && publint"
|
|
45
|
+
},
|
|
40
46
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
41
|
-
"browser": "dist/esm/index.js",
|
|
42
47
|
"docs": "dist/docs.json",
|
|
48
|
+
"types": "dist/index.d.ts",
|
|
43
49
|
"exports": {
|
|
44
50
|
".": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
},
|
|
49
|
-
"browser": {
|
|
50
|
-
"import": "./dist/esm/index.js",
|
|
51
|
-
"require": "./dist/cjs/index.js"
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/index.d.ts",
|
|
53
|
+
"default": "./dist/index.js"
|
|
52
54
|
},
|
|
53
|
-
"
|
|
55
|
+
"import": {
|
|
56
|
+
"types": "./dist/index.d.mts",
|
|
57
|
+
"default": "./dist/index.mjs"
|
|
58
|
+
}
|
|
54
59
|
},
|
|
55
60
|
"./dist/docs.json": {
|
|
56
61
|
"default": "./dist/docs.json"
|
|
57
62
|
},
|
|
63
|
+
"./cjs": {
|
|
64
|
+
"default": "./dist/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./docs": {
|
|
67
|
+
"default": "./dist/docs.json"
|
|
68
|
+
},
|
|
69
|
+
"./esm": {
|
|
70
|
+
"default": "./dist/index.mjs"
|
|
71
|
+
},
|
|
58
72
|
"./package.json": "./package.json"
|
|
59
73
|
},
|
|
60
|
-
"main": "dist/
|
|
61
|
-
"module": "dist/
|
|
74
|
+
"main": "dist/index.js",
|
|
75
|
+
"module": "dist/index.mjs",
|
|
62
76
|
"homepage": "https://xyo.network",
|
|
63
77
|
"license": "LGPL-3.0",
|
|
64
78
|
"publishConfig": {
|
|
@@ -69,6 +83,5 @@
|
|
|
69
83
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
70
84
|
},
|
|
71
85
|
"sideEffects": false,
|
|
72
|
-
"
|
|
73
|
-
"version": "2.72.8"
|
|
86
|
+
"version": "2.73.0"
|
|
74
87
|
}
|
package/src/ModuleResolver.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { compact } from '@xylabs/lodash'
|
|
1
2
|
import { AccountInstance } from '@xyo-network/account-model'
|
|
2
3
|
import { AddressPayload, AddressSchema } from '@xyo-network/address-payload-plugin'
|
|
3
4
|
import { isArchivistModule } from '@xyo-network/archivist-model'
|
|
@@ -22,7 +23,6 @@ import { NodeWrapper } from '@xyo-network/node-wrapper'
|
|
|
22
23
|
import { isSentinelModule, SentinelWrapper } from '@xyo-network/sentinel'
|
|
23
24
|
import { isWitnessModule } from '@xyo-network/witness-model'
|
|
24
25
|
import { WitnessWrapper } from '@xyo-network/witness-wrapper'
|
|
25
|
-
import compact from 'lodash/compact'
|
|
26
26
|
|
|
27
27
|
import { ProxyModule, ProxyModuleConfigSchema, ProxyModuleParams } from './ProxyModule'
|
|
28
28
|
|
package/src/ProxyModule.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
|
+
import { compact } from '@xylabs/lodash'
|
|
2
3
|
import { AddressPayload, AddressSchema } from '@xyo-network/address-payload-plugin'
|
|
3
4
|
import { QueryBoundWitness } from '@xyo-network/boundwitness-builder'
|
|
4
5
|
import { BridgeModule } from '@xyo-network/bridge-model'
|
|
@@ -19,7 +20,6 @@ import {
|
|
|
19
20
|
} from '@xyo-network/module'
|
|
20
21
|
import { Payload } from '@xyo-network/payload-model'
|
|
21
22
|
import { Promisable } from '@xyo-network/promise'
|
|
22
|
-
import compact from 'lodash/compact'
|
|
23
23
|
|
|
24
24
|
export type ProxyModuleConfigSchema = 'network.xyo.module.proxy.config'
|
|
25
25
|
export const ProxyModuleConfigSchema: ProxyModuleConfigSchema = 'network.xyo.module.proxy.config'
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup'
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line import/no-default-export
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
bundle: true,
|
|
6
|
+
cjsInterop: true,
|
|
7
|
+
clean: true,
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
11
|
+
entry: ['src/index.ts'],
|
|
12
|
+
format: ['cjs', 'esm'],
|
|
13
|
+
sourcemap: true,
|
|
14
|
+
splitting: false,
|
|
15
|
+
tsconfig: 'tsconfig.json',
|
|
16
|
+
})
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BridgeModuleResolver = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const address_payload_plugin_1 = require("@xyo-network/address-payload-plugin");
|
|
6
|
-
const archivist_model_1 = require("@xyo-network/archivist-model");
|
|
7
|
-
const archivist_wrapper_1 = require("@xyo-network/archivist-wrapper");
|
|
8
|
-
const diviner_1 = require("@xyo-network/diviner");
|
|
9
|
-
const diviner_model_1 = require("@xyo-network/diviner-model");
|
|
10
|
-
const error_1 = require("@xyo-network/error");
|
|
11
|
-
const module_1 = require("@xyo-network/module");
|
|
12
|
-
const node_model_1 = require("@xyo-network/node-model");
|
|
13
|
-
const node_wrapper_1 = require("@xyo-network/node-wrapper");
|
|
14
|
-
const sentinel_1 = require("@xyo-network/sentinel");
|
|
15
|
-
const witness_model_1 = require("@xyo-network/witness-model");
|
|
16
|
-
const witness_wrapper_1 = require("@xyo-network/witness-wrapper");
|
|
17
|
-
const compact_1 = tslib_1.__importDefault(require("lodash/compact"));
|
|
18
|
-
const ProxyModule_1 = require("./ProxyModule");
|
|
19
|
-
class BridgeModuleResolver extends module_1.CompositeModuleResolver {
|
|
20
|
-
// TODO: Allow optional ctor param for supplying address for nested Nodes
|
|
21
|
-
// protected readonly address?: string,
|
|
22
|
-
constructor(bridge, wrapperAccount) {
|
|
23
|
-
super();
|
|
24
|
-
this.bridge = bridge;
|
|
25
|
-
this.wrapperAccount = wrapperAccount;
|
|
26
|
-
this.primed = undefined;
|
|
27
|
-
this.resolvedModules = {};
|
|
28
|
-
}
|
|
29
|
-
get isModuleResolver() {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
add(_module) {
|
|
33
|
-
throw new Error('Method not implemented.');
|
|
34
|
-
}
|
|
35
|
-
currentResolvedModules() {
|
|
36
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const result = {};
|
|
38
|
-
yield Promise.all(Object.entries(this.resolvedModules).map(([key, value]) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
result[key] = (yield value);
|
|
40
|
-
})));
|
|
41
|
-
return result;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getRemoteAddresses() {
|
|
45
|
-
var _a;
|
|
46
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
this.remoteAddresses =
|
|
48
|
-
(_a = this.remoteAddresses) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const discover = yield this.bridge.targetDiscover();
|
|
50
|
-
return (0, compact_1.default)(discover === null || discover === void 0 ? void 0 : discover.map((payload) => {
|
|
51
|
-
if (payload.schema === address_payload_plugin_1.AddressSchema) {
|
|
52
|
-
const schemaPayload = payload;
|
|
53
|
-
return schemaPayload.address;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}))();
|
|
60
|
-
return yield this.remoteAddresses;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
prime() {
|
|
64
|
-
var _a;
|
|
65
|
-
this.primed =
|
|
66
|
-
(_a = this.primed) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
yield this.resolveRemoteModules();
|
|
68
|
-
return true;
|
|
69
|
-
}))();
|
|
70
|
-
return this.primed;
|
|
71
|
-
}
|
|
72
|
-
remove(_address) {
|
|
73
|
-
throw new Error('Method not implemented.');
|
|
74
|
-
}
|
|
75
|
-
reset() {
|
|
76
|
-
this.primed = undefined;
|
|
77
|
-
this.remoteAddresses = undefined;
|
|
78
|
-
this.resolvedModules = {};
|
|
79
|
-
}
|
|
80
|
-
resolve(nameOrAddressOrFilter, options) {
|
|
81
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
const unfiltered = yield (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
var _a, _b;
|
|
84
|
-
const mutatedOptions = Object.assign(Object.assign({}, options), { maxDepth: ((_a = options === null || options === void 0 ? void 0 : options.maxDepth) !== null && _a !== void 0 ? _a : BridgeModuleResolver.defaultMaxDepth) - 1 });
|
|
85
|
-
yield this.prime();
|
|
86
|
-
yield this.resolveRemoteModules();
|
|
87
|
-
if (typeof nameOrAddressOrFilter === 'string') {
|
|
88
|
-
if (mutatedOptions.maxDepth < 0) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
const result = (_b = (yield this.resolveByAddress(nameOrAddressOrFilter))) !== null && _b !== void 0 ? _b : (yield this.resolveByName(nameOrAddressOrFilter));
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
if (mutatedOptions.maxDepth < 0) {
|
|
96
|
-
return [];
|
|
97
|
-
}
|
|
98
|
-
const result = yield this.resolveRemoteModules(nameOrAddressOrFilter);
|
|
99
|
-
return result;
|
|
100
|
-
}
|
|
101
|
-
}))();
|
|
102
|
-
const identity = options === null || options === void 0 ? void 0 : options.identity;
|
|
103
|
-
if (identity) {
|
|
104
|
-
return Array.isArray(unfiltered) ? unfiltered === null || unfiltered === void 0 ? void 0 : unfiltered.filter((module) => identity(module)) : identity(unfiltered) ? unfiltered : undefined;
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
return unfiltered;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
resolveByAddress(targetAddress) {
|
|
112
|
-
var _a;
|
|
113
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
const remoteAddresses = yield this.getRemoteAddresses();
|
|
115
|
-
//check if it is even there
|
|
116
|
-
if (!remoteAddresses.find((address) => address === targetAddress)) {
|
|
117
|
-
//this.logger?.log(`Not in RA: ${targetAddress}`)
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
const cached = this.resolvedModules[targetAddress];
|
|
121
|
-
if (cached)
|
|
122
|
-
return (yield cached);
|
|
123
|
-
this.resolvedModules[targetAddress] =
|
|
124
|
-
(_a = this.resolvedModules[targetAddress]) !== null && _a !== void 0 ? _a : ((address) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
//discover it to set the config in the bridge
|
|
126
|
-
yield this.bridge.targetDiscover(address);
|
|
127
|
-
const mod = new ProxyModule_1.ProxyModule({ address, bridge: this.bridge, config: { schema: ProxyModule_1.ProxyModuleConfigSchema } });
|
|
128
|
-
try {
|
|
129
|
-
if ((0, archivist_model_1.isArchivistModule)(mod)) {
|
|
130
|
-
return archivist_wrapper_1.ArchivistWrapper.wrap(mod, this.wrapperAccount);
|
|
131
|
-
}
|
|
132
|
-
if ((0, diviner_model_1.isDivinerModule)(mod)) {
|
|
133
|
-
return diviner_1.DivinerWrapper.wrap(mod, this.wrapperAccount);
|
|
134
|
-
}
|
|
135
|
-
if ((0, witness_model_1.isWitnessModule)(mod)) {
|
|
136
|
-
return witness_wrapper_1.WitnessWrapper.wrap(mod, this.wrapperAccount);
|
|
137
|
-
}
|
|
138
|
-
if ((0, node_model_1.isNodeModule)(mod)) {
|
|
139
|
-
return node_wrapper_1.NodeWrapper.wrap(mod, this.wrapperAccount);
|
|
140
|
-
}
|
|
141
|
-
if ((0, sentinel_1.isSentinelModule)(mod)) {
|
|
142
|
-
return sentinel_1.SentinelWrapper.wrap(mod, this.wrapperAccount);
|
|
143
|
-
}
|
|
144
|
-
console.warn(`BridgeModuleResolver: Unknown Module Type: [${targetAddress}]`);
|
|
145
|
-
return module_1.ModuleWrapper.wrap(mod, this.wrapperAccount);
|
|
146
|
-
}
|
|
147
|
-
catch (ex) {
|
|
148
|
-
(0, error_1.handleError)(ex, (error) => {
|
|
149
|
-
console.error(`BridgeModuleResolver.resolveByAddress: ${error.message} [${targetAddress}]`);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}))(targetAddress);
|
|
153
|
-
return (yield this.resolvedModules[targetAddress]);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
resolveByName(name) {
|
|
157
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
const modules = yield this.currentResolvedModules();
|
|
159
|
-
return Object.values(modules)
|
|
160
|
-
.filter((module) => module.config.name === name)
|
|
161
|
-
.pop();
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
resolveByQuery(queries) {
|
|
165
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
return Object.values(yield this.currentResolvedModules()).filter((module) => {
|
|
167
|
-
//filter out the requested queries
|
|
168
|
-
const found = module.queries.filter((query) => queries.find((q) => q === query));
|
|
169
|
-
//did we find all the requested queries?
|
|
170
|
-
return queries.length === found.length;
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
resolveRemoteModules(filter) {
|
|
175
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
if (filter === null || filter === void 0 ? void 0 : filter.address) {
|
|
177
|
-
return yield this.resolveRemoteModulesByAddress(filter);
|
|
178
|
-
}
|
|
179
|
-
if (filter === null || filter === void 0 ? void 0 : filter.name) {
|
|
180
|
-
return yield this.resolveRemoteModulesByName(filter);
|
|
181
|
-
}
|
|
182
|
-
if (filter === null || filter === void 0 ? void 0 : filter.query) {
|
|
183
|
-
return yield this.resolveRemoteModulesByQuery(filter);
|
|
184
|
-
}
|
|
185
|
-
//get all of them
|
|
186
|
-
return yield this.resolveRemoteModulesByAddress({ address: yield this.getRemoteAddresses() });
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
resolveRemoteModulesByAddress(filter) {
|
|
190
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
191
|
-
return (0, compact_1.default)(yield Promise.all(filter.address.map((address) => this.resolveByAddress(address))));
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
resolveRemoteModulesByName(filter) {
|
|
195
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
return (0, compact_1.default)(yield Promise.all(filter.name.map((name) => tslib_1.__awaiter(this, void 0, void 0, function* () { return yield this.resolveByName(name); }))));
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
resolveRemoteModulesByQuery(filter) {
|
|
200
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
return (0, compact_1.default)((yield Promise.all(filter.query.map((query) => tslib_1.__awaiter(this, void 0, void 0, function* () { return yield this.resolveByQuery(query); })))).flat());
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
exports.BridgeModuleResolver = BridgeModuleResolver;
|
|
206
|
-
//# sourceMappingURL=ModuleResolver.js.map
|
|
@@ -1 +0,0 @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E,wDAAC,OAAA,MAAM,IAAI,CAAC,cAAc,CAAI,KAAK,CAAC,CAAA,GAAA,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;QACpH,CAAC;KAAA;CACF;AA5MD,oDA4MC"}
|
package/dist/cjs/ProxyModule.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProxyModule = exports.ProxyModuleConfigSchema = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 = require("@xylabs/assert");
|
|
6
|
-
const address_payload_plugin_1 = require("@xyo-network/address-payload-plugin");
|
|
7
|
-
const manifest_model_1 = require("@xyo-network/manifest-model");
|
|
8
|
-
const module_1 = require("@xyo-network/module");
|
|
9
|
-
const compact_1 = tslib_1.__importDefault(require("lodash/compact"));
|
|
10
|
-
exports.ProxyModuleConfigSchema = 'network.xyo.module.proxy.config';
|
|
11
|
-
class ProxyModule extends module_1.BaseEmitter {
|
|
12
|
-
constructor(proxyParams) {
|
|
13
|
-
super({ config: proxyParams.bridge.targetConfig(proxyParams.address) });
|
|
14
|
-
this.proxyParams = proxyParams;
|
|
15
|
-
this.upResolver = new module_1.CompositeModuleResolver();
|
|
16
|
-
this._busyCount = 0;
|
|
17
|
-
}
|
|
18
|
-
get address() {
|
|
19
|
-
return this.proxyParams.address.toLowerCase();
|
|
20
|
-
}
|
|
21
|
-
get bridge() {
|
|
22
|
-
return this.proxyParams.bridge;
|
|
23
|
-
}
|
|
24
|
-
get config() {
|
|
25
|
-
const config = this.bridge.targetConfig(this.address);
|
|
26
|
-
return config;
|
|
27
|
-
}
|
|
28
|
-
get downResolver() {
|
|
29
|
-
return (0, assert_1.assertEx)(this.bridge.targetDownResolver(this.address), 'Unable to get resolver');
|
|
30
|
-
}
|
|
31
|
-
get queries() {
|
|
32
|
-
return this.bridge.targetQueries(this.address);
|
|
33
|
-
}
|
|
34
|
-
addressPreviousHash() {
|
|
35
|
-
throw Error('Not Implemented');
|
|
36
|
-
}
|
|
37
|
-
busy(closure) {
|
|
38
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
if (this._busyCount <= 0) {
|
|
40
|
-
this._busyCount = 0;
|
|
41
|
-
const args = { busy: true, module: this };
|
|
42
|
-
yield this.emit('moduleBusy', args);
|
|
43
|
-
}
|
|
44
|
-
this._busyCount++;
|
|
45
|
-
try {
|
|
46
|
-
return yield closure();
|
|
47
|
-
}
|
|
48
|
-
finally {
|
|
49
|
-
this._busyCount--;
|
|
50
|
-
if (this._busyCount <= 0) {
|
|
51
|
-
this._busyCount = 0;
|
|
52
|
-
const args = { busy: false, module: this };
|
|
53
|
-
yield this.emit('moduleBusy', args);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
describe() {
|
|
59
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
return yield this.busy(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
var _a;
|
|
62
|
-
const description = {
|
|
63
|
-
address: this.address,
|
|
64
|
-
queries: this.queries,
|
|
65
|
-
};
|
|
66
|
-
if (this.config.name) {
|
|
67
|
-
description.name = this.config.name;
|
|
68
|
-
}
|
|
69
|
-
const discover = yield this.discover();
|
|
70
|
-
description.children = (0, compact_1.default)((_a = discover === null || discover === void 0 ? void 0 : discover.map((payload) => {
|
|
71
|
-
const address = payload.schema === address_payload_plugin_1.AddressSchema ? payload.address : undefined;
|
|
72
|
-
return address != this.address ? address : undefined;
|
|
73
|
-
})) !== null && _a !== void 0 ? _a : []);
|
|
74
|
-
return description;
|
|
75
|
-
}));
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
discover() {
|
|
79
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
return yield this.busy(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
return yield this.bridge.targetDiscover();
|
|
82
|
-
}));
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
manifest() {
|
|
86
|
-
var _a;
|
|
87
|
-
const name = (_a = this.config.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
88
|
-
return { config: Object.assign({ name }, this.config), schema: manifest_model_1.ManifestPayloadSchema };
|
|
89
|
-
}
|
|
90
|
-
moduleAddress() {
|
|
91
|
-
throw Error('Not Implemented');
|
|
92
|
-
}
|
|
93
|
-
previousHash() {
|
|
94
|
-
throw Error('Not Implemented');
|
|
95
|
-
}
|
|
96
|
-
query(query, payloads) {
|
|
97
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
return yield this.busy(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const result = (0, assert_1.assertEx)(yield this.bridge.targetQuery(this.address, query, payloads), 'Remote Query Failed');
|
|
100
|
-
yield this.emit('moduleQueried', { module: this, payloads, query, result });
|
|
101
|
-
return result;
|
|
102
|
-
}));
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
queryable(query, payloads, queryConfig) {
|
|
106
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
return yield this.bridge.targetQueryable(this.address, query, payloads, queryConfig);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
resolve(nameOrAddressOrFilter, options) {
|
|
111
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
return yield this.busy(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
if (typeof nameOrAddressOrFilter === 'string') {
|
|
114
|
-
return yield this.bridge.targetResolve(this.address, nameOrAddressOrFilter, options);
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return yield this.bridge.targetResolve(this.address, nameOrAddressOrFilter, options);
|
|
118
|
-
}
|
|
119
|
-
}));
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.ProxyModule = ProxyModule;
|
|
124
|
-
//# sourceMappingURL=ProxyModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProxyModule.js","sourceRoot":"","sources":["../../src/ProxyModule.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,gFAAmF;AAGnF,gEAA0F;AAC1F,gDAa4B;AAG5B,qEAAoC;AAGvB,QAAA,uBAAuB,GAA4B,iCAAiC,CAAA;AAYjG,MAAa,WAAY,SAAQ,oBAA0C;IAKzE,YAAmB,WAA8B;QAC/C,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;QADtD,gBAAW,GAAX,WAAW,CAAmB;QAJxC,eAAU,GAAG,IAAI,gCAAuB,EAAE,CAAA;QAE3C,eAAU,GAAG,CAAC,CAAA;IAItB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,CAAA;IAC/C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAA;IAChC,CAAC;IAED,IAAI,MAAM;QACR,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACrD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAA,iBAAQ,EAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC,CAAA;IACzF,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC;IAED,mBAAmB;QACjB,MAAM,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAChC,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MAAM,CAAA;YACf,CAAC,CAAA,CAAC,CAAA;QACJ,CAAC;KAAA;IAEK,SAAS,CAAC,KAAwB,EAAE,QAAoB,EAAE,WAA0B;;YACxF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QACtF,CAAC;KAAA;IAKK,OAAO,CACX,qBAA6C,EAC7C,OAA6B;;YAE7B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAS,EAAE;gBAChC,IAAI,OAAO,qBAAqB,KAAK,QAAQ,EAAE;oBAC7C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;iBACrF;qBAAM;oBACL,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;iBACrF;YACH,CAAC,CAAA,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AA1HD,kCA0HC"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./ModuleResolver"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./ProxyModule"), exports);
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAgC;AAChC,wDAA6B"}
|