@xyo-network/node-view 2.106.0 → 2.107.1
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/ViewNode.d.cts +0 -1
- package/dist/browser/ViewNode.d.cts.map +1 -1
- package/dist/browser/ViewNode.d.mts +0 -1
- package/dist/browser/ViewNode.d.mts.map +1 -1
- package/dist/browser/ViewNode.d.ts +0 -1
- package/dist/browser/ViewNode.d.ts.map +1 -1
- package/dist/browser/index.cjs +1 -145
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -124
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/ViewNode.d.cts +0 -1
- package/dist/neutral/ViewNode.d.cts.map +1 -1
- package/dist/neutral/ViewNode.d.mts +0 -1
- package/dist/neutral/ViewNode.d.mts.map +1 -1
- package/dist/neutral/ViewNode.d.ts +0 -1
- package/dist/neutral/ViewNode.d.ts.map +1 -1
- package/dist/neutral/index.cjs +1 -145
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js +1 -124
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/ViewNode.d.cts +0 -1
- package/dist/node/ViewNode.d.cts.map +1 -1
- package/dist/node/ViewNode.d.mts +0 -1
- package/dist/node/ViewNode.d.mts.map +1 -1
- package/dist/node/ViewNode.d.ts +0 -1
- package/dist/node/ViewNode.d.ts.map +1 -1
- package/dist/node/index.cjs +1 -154
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -128
- package/dist/node/index.js.map +1 -1
- package/package.json +10 -10
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ViewNode.ts"],"sourcesContent":["export * from './ViewNode'\n","import { assertEx } from '@xylabs/assert'\nimport { exists } from '@xylabs/exists'\nimport { Address } from '@xylabs/hex'\nimport { EventListener } from '@xyo-network/module-events'\nimport {\n AnyConfigSchema,\n isAddressModuleFilter,\n isNameModuleFilter,\n ModuleFilter,\n ModuleFilterOptions,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport { SimpleModuleResolver } from '@xyo-network/module-resolver'\nimport { MemoryNode, NodeHelper } from '@xyo-network/node-memory'\nimport {\n asNodeInstance,\n AttachableNodeInstance,\n isNodeModule,\n NodeAttachQuerySchema,\n NodeConfig,\n NodeDetachQuerySchema,\n NodeModuleEventData,\n NodeParams,\n NodeRegisteredQuerySchema,\n} from '@xyo-network/node-model'\nimport { Schema } from '@xyo-network/payload-model'\nimport { Mutex } from 'async-mutex'\n\nexport const ViewNodeConfigSchema = 'network.xyo.node.view.config' as const\nexport type ViewNodeConfigSchema = typeof ViewNodeConfigSchema\n\nexport type ViewNodeConfig = NodeConfig<\n {\n ids: ModuleIdentifier[]\n source: ModuleIdentifier\n },\n ViewNodeConfigSchema\n>\n\nexport type ViewNodeParams = NodeParams<AnyConfigSchema<ViewNodeConfig>>\n\nexport class ViewNode<TParams extends ViewNodeParams = ViewNodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends MemoryNode<TParams, TEventData>\n implements AttachableNodeInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewNodeConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewNodeConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _buildMutex = new Mutex()\n private _built = false\n private _limitedResolver = new SimpleModuleResolver({ root: this })\n\n get ids() {\n return this.config.ids\n }\n\n override get queries(): Schema[] {\n const disallowedQueries = new Set<Schema>([NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\n const queries: Schema[] = [...super.queries]\n return queries.filter((query) => !disallowedQueries.has(query))\n }\n\n get source() {\n return this.config.source\n }\n\n async build() {\n return await this._buildMutex.runExclusive(async () => {\n const source = asNodeInstance(await super.resolve(this.source))\n if (source) {\n await Promise.all(\n this.ids.map(async (id) => {\n await NodeHelper.attachToExistingNode(source, id, this)\n }),\n )\n this._built = true\n }\n })\n }\n\n /** @deprecated do not pass undefined. If trying to get all, pass '*' */\n override async resolve(): Promise<ModuleInstance[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(all: '*', options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(filter: ModuleFilter, options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(id: ModuleIdentifier, options?: ModuleFilterOptions<T>): Promise<T | undefined>\n override async resolve<T extends ModuleInstance = ModuleInstance>(\n idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',\n options: ModuleFilterOptions<T> = {},\n ): Promise<T | T[] | undefined> {\n if (!this._built) {\n await this.build()\n }\n const mods = await this._limitedResolver.resolve('*')\n if (idOrFilter === '*') {\n return mods as unknown as T[]\n }\n switch (typeof idOrFilter) {\n case 'string': {\n const mod = mods.find((mod) => mod.modName === idOrFilter || mod.address === idOrFilter)\n return mod as unknown as T\n }\n case 'object': {\n if (isAddressModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.address.map(async (address) => await this.resolve(address, options)))).filter(exists)\n } else if (isNameModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.name.map(async (name) => await this.resolve(name, options)))).filter(exists)\n }\n return []\n }\n }\n }\n\n protected override async attachUsingAddress(address: Address) {\n const attached = await this.attached()\n const mods = this.registeredModules().filter((mod) => attached.includes(mod.address))\n const existingModule = mods.find((mod) => mod.address === address)\n assertEx(!existingModule, () => `Module [${existingModule?.modName ?? existingModule?.address}] already attached at address [${address}]`)\n const module = this.registeredModuleMap[address]\n\n if (!module) {\n return\n }\n\n module.addParent(this)\n\n const args = { module, name: module.modName }\n await this.emit('moduleAttached', args)\n\n this._limitedResolver.add(module)\n\n if (isNodeModule(module)) {\n const attachedListener: EventListener<TEventData['moduleAttached']> = async (args: TEventData['moduleAttached']) =>\n await this.emit('moduleAttached', args)\n\n const detachedListener: EventListener<TEventData['moduleDetached']> = async (args: TEventData['moduleDetached']) =>\n await this.emit('moduleDetached', args)\n\n module.on('moduleAttached', attachedListener)\n module.on('moduleDetached', detachedListener)\n }\n\n return address\n }\n\n protected override async attachedPublicModules(): Promise<ModuleInstance[]> {\n return (await this._limitedResolver.resolve('*')).filter((module) => module.address !== this.address)\n }\n\n protected override async detachUsingAddress(address: Address) {\n const module = await this.downResolver.resolve(address)\n if (module) {\n this._limitedResolver.remove(address)\n return address\n }\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n await this.build()\n return true\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/ViewNode.ts"],"sourcesContent":["export * from './ViewNode'\n","import { assertEx } from '@xylabs/assert'\nimport { exists } from '@xylabs/exists'\nimport { Address } from '@xylabs/hex'\nimport { EventListener } from '@xyo-network/module-events'\nimport {\n AnyConfigSchema,\n isAddressModuleFilter,\n isNameModuleFilter,\n ModuleFilter,\n ModuleFilterOptions,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport { SimpleModuleResolver } from '@xyo-network/module-resolver'\nimport { MemoryNode, NodeHelper } from '@xyo-network/node-memory'\nimport {\n asNodeInstance,\n AttachableNodeInstance,\n isNodeModule,\n NodeAttachQuerySchema,\n NodeConfig,\n NodeDetachQuerySchema,\n NodeModuleEventData,\n NodeParams,\n NodeRegisteredQuerySchema,\n} from '@xyo-network/node-model'\nimport { Schema } from '@xyo-network/payload-model'\nimport { Mutex } from 'async-mutex'\n\nexport const ViewNodeConfigSchema = 'network.xyo.node.view.config' as const\nexport type ViewNodeConfigSchema = typeof ViewNodeConfigSchema\n\nexport type ViewNodeConfig = NodeConfig<\n {\n ids: ModuleIdentifier[]\n source: ModuleIdentifier\n },\n ViewNodeConfigSchema\n>\n\nexport type ViewNodeParams = NodeParams<AnyConfigSchema<ViewNodeConfig>>\n\nexport class ViewNode<TParams extends ViewNodeParams = ViewNodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends MemoryNode<TParams, TEventData>\n implements AttachableNodeInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewNodeConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewNodeConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _buildMutex = new Mutex()\n private _built = false\n private _limitedResolver = new SimpleModuleResolver({ root: this })\n\n get ids() {\n return this.config.ids\n }\n\n override get queries(): Schema[] {\n const disallowedQueries = new Set<Schema>([NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\n const queries: Schema[] = [...super.queries]\n return queries.filter((query) => !disallowedQueries.has(query))\n }\n\n get source() {\n return this.config.source\n }\n\n async build() {\n return await this._buildMutex.runExclusive(async () => {\n const source = asNodeInstance(await super.resolve(this.source))\n if (source) {\n await Promise.all(\n this.ids.map(async (id) => {\n await NodeHelper.attachToExistingNode(source, id, this)\n }),\n )\n this._built = true\n }\n })\n }\n\n /** @deprecated do not pass undefined. If trying to get all, pass '*' */\n override async resolve(): Promise<ModuleInstance[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(all: '*', options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(filter: ModuleFilter, options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(id: ModuleIdentifier, options?: ModuleFilterOptions<T>): Promise<T | undefined>\n override async resolve<T extends ModuleInstance = ModuleInstance>(\n idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',\n options: ModuleFilterOptions<T> = {},\n ): Promise<T | T[] | undefined> {\n if (!this._built) {\n await this.build()\n }\n const mods = await this._limitedResolver.resolve('*')\n if (idOrFilter === '*') {\n return mods as unknown as T[]\n }\n switch (typeof idOrFilter) {\n case 'string': {\n const mod = mods.find((mod) => mod.modName === idOrFilter || mod.address === idOrFilter)\n return mod as unknown as T\n }\n case 'object': {\n if (isAddressModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.address.map(async (address) => await this.resolve(address, options)))).filter(exists)\n } else if (isNameModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.name.map(async (name) => await this.resolve(name, options)))).filter(exists)\n }\n return []\n }\n }\n }\n\n protected override async attachUsingAddress(address: Address) {\n const attached = await this.attached()\n const mods = this.registeredModules().filter((mod) => attached.includes(mod.address))\n const existingModule = mods.find((mod) => mod.address === address)\n assertEx(!existingModule, () => `Module [${existingModule?.modName ?? existingModule?.address}] already attached at address [${address}]`)\n const module = this.registeredModuleMap[address]\n\n if (!module) {\n return\n }\n\n module.addParent(this)\n\n const args = { module, name: module.modName }\n await this.emit('moduleAttached', args)\n\n this._limitedResolver.add(module)\n\n if (isNodeModule(module)) {\n const attachedListener: EventListener<TEventData['moduleAttached']> = async (args: TEventData['moduleAttached']) =>\n await this.emit('moduleAttached', args)\n\n const detachedListener: EventListener<TEventData['moduleDetached']> = async (args: TEventData['moduleDetached']) =>\n await this.emit('moduleDetached', args)\n\n module.on('moduleAttached', attachedListener)\n module.on('moduleDetached', detachedListener)\n }\n\n return address\n }\n\n protected override async attachedPublicModules(): Promise<ModuleInstance[]> {\n return (await this._limitedResolver.resolve('*')).filter((module) => module.address !== this.address)\n }\n\n protected override async detachUsingAddress(address: Address) {\n const module = await this.downResolver.resolve(address)\n if (module) {\n this._limitedResolver.remove(address)\n return address\n }\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n await this.build()\n return true\n }\n}\n"],"mappings":"yqBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,yBAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAAyB,0BACzBC,EAAuB,0BAGvBC,EASO,qCACPC,EAAqC,wCACrCC,EAAuC,oCACvCC,EAUO,mCAEPC,EAAsB,uBAEf,IAAMC,EAAuB,+BAavBC,EAAN,MAAMA,UACHC,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CAAAA,EACtBA,CAEX,CAEA,MAAyB0B,cAAiC,CACxD,aAAM,MAAMA,aAAAA,EACZ,MAAM,KAAK1C,MAAK,EACT,EACT,CACF,EAxHUnB,EAAAA,EAAAA,YAGR8D,EAJW/D,EAIcgE,gBAA0B,IAAIC,EAAAC,IAAMF,iBAAejE,IAC5EgE,EALW/D,EAKcmE,sBAA8BpE,GACvDgE,EANW/D,EAMcoE,SAAS,CAAE,GAAGC,2BAA0B,GAN5D,IAAMrE,EAANkE","names":["src_exports","__export","ViewNode","ViewNodeConfigSchema","__toCommonJS","import_assert","import_exists","import_module_model","import_module_resolver","import_node_memory","import_node_model","import_async_mutex","ViewNodeConfigSchema","ViewNode","MemoryNode","_buildMutex","Mutex","_built","_limitedResolver","SimpleModuleResolver","root","ids","config","queries","disallowedQueries","Set","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","filter","query","has","source","build","runExclusive","asNodeInstance","resolve","Promise","all","map","id","NodeHelper","attachToExistingNode","idOrFilter","options","mods","find","mod","modName","address","isAddressModuleFilter","exists","isNameModuleFilter","name","attachUsingAddress","attached","existingModule","registeredModules","includes","assertEx","module","registeredModuleMap","addParent","args","emit","add","isNodeModule","attachedListener","__name","detachedListener","on","attachedPublicModules","detachUsingAddress","downResolver","remove","startHandler","__publicField","configSchemas","__superGet","_ViewNode","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,129 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
-
var __reflectGet = Reflect.get;
|
|
4
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
-
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
8
|
-
|
|
9
|
-
// src/ViewNode.ts
|
|
10
|
-
import { assertEx } from "@xylabs/assert";
|
|
11
|
-
import { exists } from "@xylabs/exists";
|
|
12
|
-
import { isAddressModuleFilter, isNameModuleFilter, ModuleLimitationViewLabel } from "@xyo-network/module-model";
|
|
13
|
-
import { SimpleModuleResolver } from "@xyo-network/module-resolver";
|
|
14
|
-
import { MemoryNode, NodeHelper } from "@xyo-network/node-memory";
|
|
15
|
-
import { asNodeInstance, isNodeModule, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema } from "@xyo-network/node-model";
|
|
16
|
-
import { Mutex } from "async-mutex";
|
|
17
|
-
var ViewNodeConfigSchema = "network.xyo.node.view.config";
|
|
18
|
-
var _ViewNode = class _ViewNode extends MemoryNode {
|
|
19
|
-
_buildMutex = new Mutex();
|
|
20
|
-
_built = false;
|
|
21
|
-
_limitedResolver = new SimpleModuleResolver({
|
|
22
|
-
root: this
|
|
23
|
-
});
|
|
24
|
-
get ids() {
|
|
25
|
-
return this.config.ids;
|
|
26
|
-
}
|
|
27
|
-
get queries() {
|
|
28
|
-
const disallowedQueries = /* @__PURE__ */ new Set([
|
|
29
|
-
NodeAttachQuerySchema,
|
|
30
|
-
NodeDetachQuerySchema,
|
|
31
|
-
NodeRegisteredQuerySchema
|
|
32
|
-
]);
|
|
33
|
-
const queries = [
|
|
34
|
-
...super.queries
|
|
35
|
-
];
|
|
36
|
-
return queries.filter((query) => !disallowedQueries.has(query));
|
|
37
|
-
}
|
|
38
|
-
get source() {
|
|
39
|
-
return this.config.source;
|
|
40
|
-
}
|
|
41
|
-
async build() {
|
|
42
|
-
return await this._buildMutex.runExclusive(async () => {
|
|
43
|
-
const source = asNodeInstance(await super.resolve(this.source));
|
|
44
|
-
if (source) {
|
|
45
|
-
await Promise.all(this.ids.map(async (id) => {
|
|
46
|
-
await NodeHelper.attachToExistingNode(source, id, this);
|
|
47
|
-
}));
|
|
48
|
-
this._built = true;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
async resolve(idOrFilter = "*", options = {}) {
|
|
53
|
-
if (!this._built) {
|
|
54
|
-
await this.build();
|
|
55
|
-
}
|
|
56
|
-
const mods = await this._limitedResolver.resolve("*");
|
|
57
|
-
if (idOrFilter === "*") {
|
|
58
|
-
return mods;
|
|
59
|
-
}
|
|
60
|
-
switch (typeof idOrFilter) {
|
|
61
|
-
case "string": {
|
|
62
|
-
const mod = mods.find((mod2) => mod2.modName === idOrFilter || mod2.address === idOrFilter);
|
|
63
|
-
return mod;
|
|
64
|
-
}
|
|
65
|
-
case "object": {
|
|
66
|
-
if (isAddressModuleFilter(idOrFilter)) {
|
|
67
|
-
return (await Promise.all(idOrFilter.address.map(async (address) => await this.resolve(address, options)))).filter(exists);
|
|
68
|
-
} else if (isNameModuleFilter(idOrFilter)) {
|
|
69
|
-
return (await Promise.all(idOrFilter.name.map(async (name) => await this.resolve(name, options)))).filter(exists);
|
|
70
|
-
}
|
|
71
|
-
return [];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
async attachUsingAddress(address) {
|
|
76
|
-
const attached = await this.attached();
|
|
77
|
-
const mods = this.registeredModules().filter((mod) => attached.includes(mod.address));
|
|
78
|
-
const existingModule = mods.find((mod) => mod.address === address);
|
|
79
|
-
assertEx(!existingModule, () => `Module [${(existingModule == null ? void 0 : existingModule.modName) ?? (existingModule == null ? void 0 : existingModule.address)}] already attached at address [${address}]`);
|
|
80
|
-
const module = this.registeredModuleMap[address];
|
|
81
|
-
if (!module) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
module.addParent(this);
|
|
85
|
-
const args = {
|
|
86
|
-
module,
|
|
87
|
-
name: module.modName
|
|
88
|
-
};
|
|
89
|
-
await this.emit("moduleAttached", args);
|
|
90
|
-
this._limitedResolver.add(module);
|
|
91
|
-
if (isNodeModule(module)) {
|
|
92
|
-
const attachedListener = /* @__PURE__ */ __name(async (args2) => await this.emit("moduleAttached", args2), "attachedListener");
|
|
93
|
-
const detachedListener = /* @__PURE__ */ __name(async (args2) => await this.emit("moduleDetached", args2), "detachedListener");
|
|
94
|
-
module.on("moduleAttached", attachedListener);
|
|
95
|
-
module.on("moduleDetached", detachedListener);
|
|
96
|
-
}
|
|
97
|
-
return address;
|
|
98
|
-
}
|
|
99
|
-
async attachedPublicModules() {
|
|
100
|
-
return (await this._limitedResolver.resolve("*")).filter((module) => module.address !== this.address);
|
|
101
|
-
}
|
|
102
|
-
async detachUsingAddress(address) {
|
|
103
|
-
const module = await this.downResolver.resolve(address);
|
|
104
|
-
if (module) {
|
|
105
|
-
this._limitedResolver.remove(address);
|
|
106
|
-
return address;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async startHandler() {
|
|
110
|
-
await super.startHandler();
|
|
111
|
-
await this.build();
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
__name(_ViewNode, "ViewNode");
|
|
116
|
-
__publicField(_ViewNode, "configSchemas", [
|
|
117
|
-
...__superGet(_ViewNode, _ViewNode, "configSchemas"),
|
|
118
|
-
ViewNodeConfigSchema
|
|
119
|
-
]);
|
|
120
|
-
__publicField(_ViewNode, "defaultConfigSchema", ViewNodeConfigSchema);
|
|
121
|
-
__publicField(_ViewNode, "labels", {
|
|
122
|
-
...ModuleLimitationViewLabel
|
|
123
|
-
});
|
|
124
|
-
var ViewNode = _ViewNode;
|
|
125
|
-
export {
|
|
126
|
-
ViewNode,
|
|
127
|
-
ViewNodeConfigSchema
|
|
128
|
-
};
|
|
1
|
+
var u=Object.defineProperty;var v=Object.getPrototypeOf;var g=Reflect.get;var b=(i,e,t)=>e in i?u(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var c=(i,e)=>u(i,"name",{value:e,configurable:!0});var n=(i,e,t)=>b(i,typeof e!="symbol"?e+"":e,t);var m=(i,e,t)=>g(v(i),t,e);import{assertEx as M}from"@xylabs/assert";import{exists as h}from"@xylabs/exists";import{isAddressModuleFilter as x,isNameModuleFilter as S,ModuleLimitationViewLabel as R}from"@xyo-network/module-model";import{SimpleModuleResolver as A}from"@xyo-network/module-resolver";import{MemoryNode as N,NodeHelper as P}from"@xyo-network/node-memory";import{asNodeInstance as q,isNodeModule as L,NodeAttachQuerySchema as Q,NodeDetachQuerySchema as _,NodeRegisteredQuerySchema as D}from"@xyo-network/node-model";import{Mutex as E}from"async-mutex";var f="network.xyo.node.view.config",r=class r extends N{_buildMutex=new E;_built=!1;_limitedResolver=new A({root:this});get ids(){return this.config.ids}get queries(){let e=new Set([Q,_,D]);return[...super.queries].filter(o=>!e.has(o))}get source(){return this.config.source}async build(){return await this._buildMutex.runExclusive(async()=>{let e=q(await super.resolve(this.source));e&&(await Promise.all(this.ids.map(async t=>{await P.attachToExistingNode(e,t,this)})),this._built=!0)})}async resolve(e="*",t={}){this._built||await this.build();let o=await this._limitedResolver.resolve("*");if(e==="*")return o;switch(typeof e){case"string":return o.find(a=>a.modName===e||a.address===e);case"object":return x(e)?(await Promise.all(e.address.map(async s=>await this.resolve(s,t)))).filter(h):S(e)?(await Promise.all(e.name.map(async s=>await this.resolve(s,t)))).filter(h):[]}}async attachUsingAddress(e){let t=await this.attached(),s=this.registeredModules().filter(d=>t.includes(d.address)).find(d=>d.address===e);M(!s,()=>`Module [${(s==null?void 0:s.modName)??(s==null?void 0:s.address)}] already attached at address [${e}]`);let a=this.registeredModuleMap[e];if(!a)return;a.addParent(this);let p={module:a,name:a.modName};if(await this.emit("moduleAttached",p),this._limitedResolver.add(a),L(a)){let d=c(async l=>await this.emit("moduleAttached",l),"attachedListener"),y=c(async l=>await this.emit("moduleDetached",l),"detachedListener");a.on("moduleAttached",d),a.on("moduleDetached",y)}return e}async attachedPublicModules(){return(await this._limitedResolver.resolve("*")).filter(e=>e.address!==this.address)}async detachUsingAddress(e){if(await this.downResolver.resolve(e))return this._limitedResolver.remove(e),e}async startHandler(){return await super.startHandler(),await this.build(),!0}};c(r,"ViewNode"),n(r,"configSchemas",[...m(r,r,"configSchemas"),f]),n(r,"defaultConfigSchema",f),n(r,"labels",{...R});var w=r;export{w as ViewNode,f as ViewNodeConfigSchema};
|
|
129
2
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ViewNode.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { exists } from '@xylabs/exists'\nimport { Address } from '@xylabs/hex'\nimport { EventListener } from '@xyo-network/module-events'\nimport {\n AnyConfigSchema,\n isAddressModuleFilter,\n isNameModuleFilter,\n ModuleFilter,\n ModuleFilterOptions,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport { SimpleModuleResolver } from '@xyo-network/module-resolver'\nimport { MemoryNode, NodeHelper } from '@xyo-network/node-memory'\nimport {\n asNodeInstance,\n AttachableNodeInstance,\n isNodeModule,\n NodeAttachQuerySchema,\n NodeConfig,\n NodeDetachQuerySchema,\n NodeModuleEventData,\n NodeParams,\n NodeRegisteredQuerySchema,\n} from '@xyo-network/node-model'\nimport { Schema } from '@xyo-network/payload-model'\nimport { Mutex } from 'async-mutex'\n\nexport const ViewNodeConfigSchema = 'network.xyo.node.view.config' as const\nexport type ViewNodeConfigSchema = typeof ViewNodeConfigSchema\n\nexport type ViewNodeConfig = NodeConfig<\n {\n ids: ModuleIdentifier[]\n source: ModuleIdentifier\n },\n ViewNodeConfigSchema\n>\n\nexport type ViewNodeParams = NodeParams<AnyConfigSchema<ViewNodeConfig>>\n\nexport class ViewNode<TParams extends ViewNodeParams = ViewNodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends MemoryNode<TParams, TEventData>\n implements AttachableNodeInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewNodeConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewNodeConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _buildMutex = new Mutex()\n private _built = false\n private _limitedResolver = new SimpleModuleResolver({ root: this })\n\n get ids() {\n return this.config.ids\n }\n\n override get queries(): Schema[] {\n const disallowedQueries = new Set<Schema>([NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\n const queries: Schema[] = [...super.queries]\n return queries.filter((query) => !disallowedQueries.has(query))\n }\n\n get source() {\n return this.config.source\n }\n\n async build() {\n return await this._buildMutex.runExclusive(async () => {\n const source = asNodeInstance(await super.resolve(this.source))\n if (source) {\n await Promise.all(\n this.ids.map(async (id) => {\n await NodeHelper.attachToExistingNode(source, id, this)\n }),\n )\n this._built = true\n }\n })\n }\n\n /** @deprecated do not pass undefined. If trying to get all, pass '*' */\n override async resolve(): Promise<ModuleInstance[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(all: '*', options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(filter: ModuleFilter, options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(id: ModuleIdentifier, options?: ModuleFilterOptions<T>): Promise<T | undefined>\n override async resolve<T extends ModuleInstance = ModuleInstance>(\n idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',\n options: ModuleFilterOptions<T> = {},\n ): Promise<T | T[] | undefined> {\n if (!this._built) {\n await this.build()\n }\n const mods = await this._limitedResolver.resolve('*')\n if (idOrFilter === '*') {\n return mods as unknown as T[]\n }\n switch (typeof idOrFilter) {\n case 'string': {\n const mod = mods.find((mod) => mod.modName === idOrFilter || mod.address === idOrFilter)\n return mod as unknown as T\n }\n case 'object': {\n if (isAddressModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.address.map(async (address) => await this.resolve(address, options)))).filter(exists)\n } else if (isNameModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.name.map(async (name) => await this.resolve(name, options)))).filter(exists)\n }\n return []\n }\n }\n }\n\n protected override async attachUsingAddress(address: Address) {\n const attached = await this.attached()\n const mods = this.registeredModules().filter((mod) => attached.includes(mod.address))\n const existingModule = mods.find((mod) => mod.address === address)\n assertEx(!existingModule, () => `Module [${existingModule?.modName ?? existingModule?.address}] already attached at address [${address}]`)\n const module = this.registeredModuleMap[address]\n\n if (!module) {\n return\n }\n\n module.addParent(this)\n\n const args = { module, name: module.modName }\n await this.emit('moduleAttached', args)\n\n this._limitedResolver.add(module)\n\n if (isNodeModule(module)) {\n const attachedListener: EventListener<TEventData['moduleAttached']> = async (args: TEventData['moduleAttached']) =>\n await this.emit('moduleAttached', args)\n\n const detachedListener: EventListener<TEventData['moduleDetached']> = async (args: TEventData['moduleDetached']) =>\n await this.emit('moduleDetached', args)\n\n module.on('moduleAttached', attachedListener)\n module.on('moduleDetached', detachedListener)\n }\n\n return address\n }\n\n protected override async attachedPublicModules(): Promise<ModuleInstance[]> {\n return (await this._limitedResolver.resolve('*')).filter((module) => module.address !== this.address)\n }\n\n protected override async detachUsingAddress(address: Address) {\n const module = await this.downResolver.resolve(address)\n if (module) {\n this._limitedResolver.remove(address)\n return address\n }\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n await this.build()\n return true\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/ViewNode.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { exists } from '@xylabs/exists'\nimport { Address } from '@xylabs/hex'\nimport { EventListener } from '@xyo-network/module-events'\nimport {\n AnyConfigSchema,\n isAddressModuleFilter,\n isNameModuleFilter,\n ModuleFilter,\n ModuleFilterOptions,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport { SimpleModuleResolver } from '@xyo-network/module-resolver'\nimport { MemoryNode, NodeHelper } from '@xyo-network/node-memory'\nimport {\n asNodeInstance,\n AttachableNodeInstance,\n isNodeModule,\n NodeAttachQuerySchema,\n NodeConfig,\n NodeDetachQuerySchema,\n NodeModuleEventData,\n NodeParams,\n NodeRegisteredQuerySchema,\n} from '@xyo-network/node-model'\nimport { Schema } from '@xyo-network/payload-model'\nimport { Mutex } from 'async-mutex'\n\nexport const ViewNodeConfigSchema = 'network.xyo.node.view.config' as const\nexport type ViewNodeConfigSchema = typeof ViewNodeConfigSchema\n\nexport type ViewNodeConfig = NodeConfig<\n {\n ids: ModuleIdentifier[]\n source: ModuleIdentifier\n },\n ViewNodeConfigSchema\n>\n\nexport type ViewNodeParams = NodeParams<AnyConfigSchema<ViewNodeConfig>>\n\nexport class ViewNode<TParams extends ViewNodeParams = ViewNodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends MemoryNode<TParams, TEventData>\n implements AttachableNodeInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewNodeConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewNodeConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _buildMutex = new Mutex()\n private _built = false\n private _limitedResolver = new SimpleModuleResolver({ root: this })\n\n get ids() {\n return this.config.ids\n }\n\n override get queries(): Schema[] {\n const disallowedQueries = new Set<Schema>([NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\n const queries: Schema[] = [...super.queries]\n return queries.filter((query) => !disallowedQueries.has(query))\n }\n\n get source() {\n return this.config.source\n }\n\n async build() {\n return await this._buildMutex.runExclusive(async () => {\n const source = asNodeInstance(await super.resolve(this.source))\n if (source) {\n await Promise.all(\n this.ids.map(async (id) => {\n await NodeHelper.attachToExistingNode(source, id, this)\n }),\n )\n this._built = true\n }\n })\n }\n\n /** @deprecated do not pass undefined. If trying to get all, pass '*' */\n override async resolve(): Promise<ModuleInstance[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(all: '*', options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(filter: ModuleFilter, options?: ModuleFilterOptions<T>): Promise<T[]>\n override async resolve<T extends ModuleInstance = ModuleInstance>(id: ModuleIdentifier, options?: ModuleFilterOptions<T>): Promise<T | undefined>\n override async resolve<T extends ModuleInstance = ModuleInstance>(\n idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',\n options: ModuleFilterOptions<T> = {},\n ): Promise<T | T[] | undefined> {\n if (!this._built) {\n await this.build()\n }\n const mods = await this._limitedResolver.resolve('*')\n if (idOrFilter === '*') {\n return mods as unknown as T[]\n }\n switch (typeof idOrFilter) {\n case 'string': {\n const mod = mods.find((mod) => mod.modName === idOrFilter || mod.address === idOrFilter)\n return mod as unknown as T\n }\n case 'object': {\n if (isAddressModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.address.map(async (address) => await this.resolve(address, options)))).filter(exists)\n } else if (isNameModuleFilter(idOrFilter)) {\n return (await Promise.all(idOrFilter.name.map(async (name) => await this.resolve(name, options)))).filter(exists)\n }\n return []\n }\n }\n }\n\n protected override async attachUsingAddress(address: Address) {\n const attached = await this.attached()\n const mods = this.registeredModules().filter((mod) => attached.includes(mod.address))\n const existingModule = mods.find((mod) => mod.address === address)\n assertEx(!existingModule, () => `Module [${existingModule?.modName ?? existingModule?.address}] already attached at address [${address}]`)\n const module = this.registeredModuleMap[address]\n\n if (!module) {\n return\n }\n\n module.addParent(this)\n\n const args = { module, name: module.modName }\n await this.emit('moduleAttached', args)\n\n this._limitedResolver.add(module)\n\n if (isNodeModule(module)) {\n const attachedListener: EventListener<TEventData['moduleAttached']> = async (args: TEventData['moduleAttached']) =>\n await this.emit('moduleAttached', args)\n\n const detachedListener: EventListener<TEventData['moduleDetached']> = async (args: TEventData['moduleDetached']) =>\n await this.emit('moduleDetached', args)\n\n module.on('moduleAttached', attachedListener)\n module.on('moduleDetached', detachedListener)\n }\n\n return address\n }\n\n protected override async attachedPublicModules(): Promise<ModuleInstance[]> {\n return (await this._limitedResolver.resolve('*')).filter((module) => module.address !== this.address)\n }\n\n protected override async detachUsingAddress(address: Address) {\n const module = await this.downResolver.resolve(address)\n if (module) {\n this._limitedResolver.remove(address)\n return address\n }\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n await this.build()\n return true\n }\n}\n"],"mappings":"gSAAA,OAASA,YAAAA,MAAgB,iBACzB,OAASC,UAAAA,MAAc,iBAGvB,OAEEC,yBAAAA,EACAC,sBAAAA,EAKAC,6BAAAA,MACK,4BACP,OAASC,wBAAAA,MAA4B,+BACrC,OAASC,cAAAA,EAAYC,cAAAA,MAAkB,2BACvC,OACEC,kBAAAA,EAEAC,gBAAAA,EACAC,yBAAAA,EAEAC,yBAAAA,EAGAC,6BAAAA,MACK,0BAEP,OAASC,SAAAA,MAAa,cAEf,IAAMC,EAAuB,+BAavBC,EAAN,MAAMA,UACHC,CAAAA,CAOAC,YAAc,IAAIC,EAClBC,OAAS,GACTC,iBAAmB,IAAIC,EAAqB,CAAEC,KAAM,IAAK,CAAA,EAEjE,IAAIC,KAAM,CACR,OAAO,KAAKC,OAAOD,GACrB,CAEA,IAAaE,SAAoB,CAC/B,IAAMC,EAAoB,IAAIC,IAAY,CAACC,EAAuBC,EAAuBC,EAA0B,EAEnH,MAD0B,IAAI,MAAML,SACrBM,OAAQC,GAAU,CAACN,EAAkBO,IAAID,CAAAA,CAAAA,CAC1D,CAEA,IAAIE,QAAS,CACX,OAAO,KAAKV,OAAOU,MACrB,CAEA,MAAMC,OAAQ,CACZ,OAAO,MAAM,KAAKlB,YAAYmB,aAAa,SAAA,CACzC,IAAMF,EAASG,EAAe,MAAM,MAAMC,QAAQ,KAAKJ,MAAM,CAAA,EACzDA,IACF,MAAMK,QAAQC,IACZ,KAAKjB,IAAIkB,IAAI,MAAOC,GAAAA,CAClB,MAAMC,EAAWC,qBAAqBV,EAAQQ,EAAI,IAAI,CACxD,CAAA,CAAA,EAEF,KAAKvB,OAAS,GAElB,CAAA,CACF,CAOA,MAAemB,QACbO,EAAiD,IACjDC,EAAkC,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EC,EAAA,MAAOL,GAC3E,MAAM,KAAKC,KAAK,iBAAkBD,CAAAA,EADkC,oBAGhEM,EAAgED,EAAA,MAAOL,GAC3E,MAAM,KAAKC,KAAK,iBAAkBD,CAAAA,EADkC,oBAGtEH,EAAOU,GAAG,iBAAkBH,CAAAA,EAC5BP,EAAOU,GAAG,iBAAkBD,CAAAA,CAC9B,CAEA,OAAOpB,CACT,CAEA,MAAyBsB,uBAAmD,CAC1E,OAAQ,MAAM,KAAKrD,iBAAiBkB,QAAQ,GAAA,GAAMP,OAAQ+B,GAAWA,EAAOX,UAAY,KAAKA,OAAO,CACtG,CAEA,MAAyBuB,mBAAmBvB,EAAkB,CAE5D,GADe,MAAM,KAAKwB,aAAarC,QAAQa,CAAAA,EAE7C,YAAK/B,iBAAiBwD,OAAOzB,CAAAA,EACtBA,CAEX,CAEA,MAAyB0B,cAAiC,CACxD,aAAM,MAAMA,aAAAA,EACZ,MAAM,KAAK1C,MAAK,EACT,EACT,CACF,EAxHUnB,EAAAA,EAAAA,YAGR8D,EAJW/D,EAIcgE,gBAA0B,IAAIC,EAAAC,IAAMF,iBAAejE,IAC5EgE,EALW/D,EAKcmE,sBAA8BpE,GACvDgE,EANW/D,EAMcoE,SAAS,CAAE,GAAGC,CAA0B,GAN5D,IAAMrE,EAANkE","names":["assertEx","exists","isAddressModuleFilter","isNameModuleFilter","ModuleLimitationViewLabel","SimpleModuleResolver","MemoryNode","NodeHelper","asNodeInstance","isNodeModule","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","Mutex","ViewNodeConfigSchema","ViewNode","MemoryNode","_buildMutex","Mutex","_built","_limitedResolver","SimpleModuleResolver","root","ids","config","queries","disallowedQueries","Set","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","filter","query","has","source","build","runExclusive","asNodeInstance","resolve","Promise","all","map","id","NodeHelper","attachToExistingNode","idOrFilter","options","mods","find","mod","modName","address","isAddressModuleFilter","exists","isNameModuleFilter","name","attachUsingAddress","attached","existingModule","registeredModules","includes","assertEx","module","registeredModuleMap","addParent","args","emit","add","isNodeModule","attachedListener","__name","detachedListener","on","attachedPublicModules","detachUsingAddress","downResolver","remove","startHandler","__publicField","configSchemas","__superGet","_ViewNode","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}
|
package/package.json
CHANGED
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"@xylabs/assert": "^3.5.1",
|
|
14
14
|
"@xylabs/exists": "^3.5.1",
|
|
15
15
|
"@xylabs/hex": "^3.5.1",
|
|
16
|
-
"@xyo-network/module-events": "~2.
|
|
17
|
-
"@xyo-network/module-model": "~2.
|
|
18
|
-
"@xyo-network/module-resolver": "~2.
|
|
19
|
-
"@xyo-network/node-memory": "~2.
|
|
20
|
-
"@xyo-network/node-model": "~2.
|
|
21
|
-
"@xyo-network/payload-model": "~2.
|
|
16
|
+
"@xyo-network/module-events": "~2.107.1",
|
|
17
|
+
"@xyo-network/module-model": "~2.107.1",
|
|
18
|
+
"@xyo-network/module-resolver": "~2.107.1",
|
|
19
|
+
"@xyo-network/node-memory": "~2.107.1",
|
|
20
|
+
"@xyo-network/node-model": "~2.107.1",
|
|
21
|
+
"@xyo-network/payload-model": "~2.107.1",
|
|
22
22
|
"async-mutex": "^0.5.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@xylabs/ts-scripts-yarn3": "^3.11.
|
|
26
|
-
"@xylabs/tsconfig": "^3.11.
|
|
27
|
-
"typescript": "^5.
|
|
25
|
+
"@xylabs/ts-scripts-yarn3": "^3.11.9",
|
|
26
|
+
"@xylabs/tsconfig": "^3.11.9",
|
|
27
|
+
"typescript": "^5.5.2"
|
|
28
28
|
},
|
|
29
29
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
30
30
|
"types": "dist/node/index.d.ts",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
66
66
|
},
|
|
67
67
|
"sideEffects": false,
|
|
68
|
-
"version": "2.
|
|
68
|
+
"version": "2.107.1",
|
|
69
69
|
"type": "module"
|
|
70
70
|
}
|