@xyo-network/module-factory-locator 2.102.0 → 2.102.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/index.cjs +2 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/index.cjs +2 -2
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js +1 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +13 -13
- package/src/standardCreatableFactories.ts +1 -1
package/dist/browser/index.cjs
CHANGED
|
@@ -34,17 +34,17 @@ var import_module_model2 = require("@xyo-network/module-model");
|
|
|
34
34
|
// src/standardCreatableFactories.ts
|
|
35
35
|
var import_archivist_memory = require("@xyo-network/archivist-memory");
|
|
36
36
|
var import_archivist_view = require("@xyo-network/archivist-view");
|
|
37
|
+
var import_bridge_http = require("@xyo-network/bridge-http");
|
|
37
38
|
var import_diviner_boundwitness_memory = require("@xyo-network/diviner-boundwitness-memory");
|
|
38
39
|
var import_diviner_identity = require("@xyo-network/diviner-identity");
|
|
39
40
|
var import_diviner_payload_memory = require("@xyo-network/diviner-payload-memory");
|
|
40
|
-
var import_http_bridge = require("@xyo-network/http-bridge");
|
|
41
41
|
var import_module_model = require("@xyo-network/module-model");
|
|
42
42
|
var import_node_memory = require("@xyo-network/node-memory");
|
|
43
43
|
var import_node_view = require("@xyo-network/node-view");
|
|
44
44
|
var import_sentinel_memory = require("@xyo-network/sentinel-memory");
|
|
45
45
|
var import_witness_adhoc = require("@xyo-network/witness-adhoc");
|
|
46
46
|
var standardCreatableFactoriesList = [
|
|
47
|
-
|
|
47
|
+
import_bridge_http.HttpBridge,
|
|
48
48
|
import_archivist_view.ViewArchivist,
|
|
49
49
|
import_node_view.ViewNode,
|
|
50
50
|
import_witness_adhoc.AdhocWitness,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;ACAA,oBAAyB;AACzB,IAAAA,uBAQO;;;ACTP,8BAAgC;AAChC,4BAA8B;AAC9B,yBAA2B;AAC3B,yCAA0C;AAC1C,8BAAgC;AAChC,oCAAqC;AACrC,0BAAwG;AACxG,yBAA2B;AAC3B,uBAAyB;AACzB,6BAA+B;AAC/B,2BAA6B;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,aAAOC,sDAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,uBAAN,MAAMA;EAjBb,OAiBaA;;;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,eAAOC,wBACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,6DAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAE7G,WAAOA;;MAEH,KAAKL,UAAUI,MAAAA,GAASY,OAAOC,8BAAAA,EAAWC,KAAK,CAACP,gBAAYQ,mCAAaR,SAASN,QAAQA,MAAAA,CAAAA;QAE1F,KAAKL,UAAUI,MAAAA,IAAU,CAAA;EAC/B;AACF;","names":["import_module_model","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/dist/browser/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import { hasAllLabels, hasLabels, registerCreatableModuleFactory } from "@xyo-ne
|
|
|
8
8
|
// src/standardCreatableFactories.ts
|
|
9
9
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
10
10
|
import { ViewArchivist } from "@xyo-network/archivist-view";
|
|
11
|
+
import { HttpBridge } from "@xyo-network/bridge-http";
|
|
11
12
|
import { MemoryBoundWitnessDiviner } from "@xyo-network/diviner-boundwitness-memory";
|
|
12
13
|
import { IdentityDiviner } from "@xyo-network/diviner-identity";
|
|
13
14
|
import { MemoryPayloadDiviner } from "@xyo-network/diviner-payload-memory";
|
|
14
|
-
import { HttpBridge } from "@xyo-network/http-bridge";
|
|
15
15
|
import { registerCreatableModuleFactories } from "@xyo-network/module-model";
|
|
16
16
|
import { MemoryNode } from "@xyo-network/node-memory";
|
|
17
17
|
import { ViewNode } from "@xyo-network/node-view";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AACzB,SAGEC,cACAC,WAGAC,sCACK;;;ACTP,SAASC,uBAAuB;AAChC,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;AAC3B,SAASC,iCAAiC;AAC1C,SAASC,uBAAuB;AAChC,SAASC,4BAA4B;AACrC,SAAgEC,wCAAwC;AACxG,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAC/B,SAASC,oBAAoB;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,SAAOC,iCAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,uBAAN,MAAMA;EAjBb,OAiBaA;;;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,WAAOC,SACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,mCAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAE7G,WAAOA;;MAEH,KAAKL,UAAUI,MAAAA,GAASY,OAAOC,SAAAA,EAAWC,KAAK,CAACP,YAAYQ,aAAaR,SAASN,QAAQA,MAAAA,CAAAA;QAE1F,KAAKL,UAAUI,MAAAA,IAAU,CAAA;EAC/B;AACF;","names":["assertEx","hasAllLabels","hasLabels","registerCreatableModuleFactory","MemoryArchivist","ViewArchivist","HttpBridge","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryPayloadDiviner","registerCreatableModuleFactories","MemoryNode","ViewNode","MemorySentinel","AdhocWitness","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/dist/neutral/index.cjs
CHANGED
|
@@ -34,17 +34,17 @@ var import_module_model2 = require("@xyo-network/module-model");
|
|
|
34
34
|
// src/standardCreatableFactories.ts
|
|
35
35
|
var import_archivist_memory = require("@xyo-network/archivist-memory");
|
|
36
36
|
var import_archivist_view = require("@xyo-network/archivist-view");
|
|
37
|
+
var import_bridge_http = require("@xyo-network/bridge-http");
|
|
37
38
|
var import_diviner_boundwitness_memory = require("@xyo-network/diviner-boundwitness-memory");
|
|
38
39
|
var import_diviner_identity = require("@xyo-network/diviner-identity");
|
|
39
40
|
var import_diviner_payload_memory = require("@xyo-network/diviner-payload-memory");
|
|
40
|
-
var import_http_bridge = require("@xyo-network/http-bridge");
|
|
41
41
|
var import_module_model = require("@xyo-network/module-model");
|
|
42
42
|
var import_node_memory = require("@xyo-network/node-memory");
|
|
43
43
|
var import_node_view = require("@xyo-network/node-view");
|
|
44
44
|
var import_sentinel_memory = require("@xyo-network/sentinel-memory");
|
|
45
45
|
var import_witness_adhoc = require("@xyo-network/witness-adhoc");
|
|
46
46
|
var standardCreatableFactoriesList = [
|
|
47
|
-
|
|
47
|
+
import_bridge_http.HttpBridge,
|
|
48
48
|
import_archivist_view.ViewArchivist,
|
|
49
49
|
import_node_view.ViewNode,
|
|
50
50
|
import_witness_adhoc.AdhocWitness,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;ACAA,oBAAyB;AACzB,IAAAA,uBAQO;;;ACTP,8BAAgC;AAChC,4BAA8B;AAC9B,yBAA2B;AAC3B,yCAA0C;AAC1C,8BAAgC;AAChC,oCAAqC;AACrC,0BAAwG;AACxG,yBAA2B;AAC3B,uBAAyB;AACzB,6BAA+B;AAC/B,2BAA6B;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,aAAOC,sDAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,uBAAN,MAAMA;EAjBb,OAiBaA;;;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,eAAOC,wBACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,6DAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAE7G,WAAOA;;MAEH,KAAKL,UAAUI,MAAAA,GAASY,OAAOC,8BAAAA,EAAWC,KAAK,CAACP,gBAAYQ,mCAAaR,SAASN,QAAQA,MAAAA,CAAAA;QAE1F,KAAKL,UAAUI,MAAAA,IAAU,CAAA;EAC/B;AACF;","names":["import_module_model","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/dist/neutral/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import { hasAllLabels, hasLabels, registerCreatableModuleFactory } from "@xyo-ne
|
|
|
8
8
|
// src/standardCreatableFactories.ts
|
|
9
9
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
10
10
|
import { ViewArchivist } from "@xyo-network/archivist-view";
|
|
11
|
+
import { HttpBridge } from "@xyo-network/bridge-http";
|
|
11
12
|
import { MemoryBoundWitnessDiviner } from "@xyo-network/diviner-boundwitness-memory";
|
|
12
13
|
import { IdentityDiviner } from "@xyo-network/diviner-identity";
|
|
13
14
|
import { MemoryPayloadDiviner } from "@xyo-network/diviner-payload-memory";
|
|
14
|
-
import { HttpBridge } from "@xyo-network/http-bridge";
|
|
15
15
|
import { registerCreatableModuleFactories } from "@xyo-network/module-model";
|
|
16
16
|
import { MemoryNode } from "@xyo-network/node-memory";
|
|
17
17
|
import { ViewNode } from "@xyo-network/node-view";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AACzB,SAGEC,cACAC,WAGAC,sCACK;;;ACTP,SAASC,uBAAuB;AAChC,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;AAC3B,SAASC,iCAAiC;AAC1C,SAASC,uBAAuB;AAChC,SAASC,4BAA4B;AACrC,SAAgEC,wCAAwC;AACxG,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAC/B,SAASC,oBAAoB;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,SAAOC,iCAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,uBAAN,MAAMA;EAjBb,OAiBaA;;;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,WAAOC,SACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,mCAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAE7G,WAAOA;;MAEH,KAAKL,UAAUI,MAAAA,GAASY,OAAOC,SAAAA,EAAWC,KAAK,CAACP,YAAYQ,aAAaR,SAASN,QAAQA,MAAAA,CAAAA;QAE1F,KAAKL,UAAUI,MAAAA,IAAU,CAAA;EAC/B;AACF;","names":["assertEx","hasAllLabels","hasLabels","registerCreatableModuleFactory","MemoryArchivist","ViewArchivist","HttpBridge","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryPayloadDiviner","registerCreatableModuleFactories","MemoryNode","ViewNode","MemorySentinel","AdhocWitness","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/dist/node/index.cjs
CHANGED
|
@@ -34,17 +34,17 @@ var import_module_model2 = require("@xyo-network/module-model");
|
|
|
34
34
|
// src/standardCreatableFactories.ts
|
|
35
35
|
var import_archivist_memory = require("@xyo-network/archivist-memory");
|
|
36
36
|
var import_archivist_view = require("@xyo-network/archivist-view");
|
|
37
|
+
var import_bridge_http = require("@xyo-network/bridge-http");
|
|
37
38
|
var import_diviner_boundwitness_memory = require("@xyo-network/diviner-boundwitness-memory");
|
|
38
39
|
var import_diviner_identity = require("@xyo-network/diviner-identity");
|
|
39
40
|
var import_diviner_payload_memory = require("@xyo-network/diviner-payload-memory");
|
|
40
|
-
var import_http_bridge = require("@xyo-network/http-bridge");
|
|
41
41
|
var import_module_model = require("@xyo-network/module-model");
|
|
42
42
|
var import_node_memory = require("@xyo-network/node-memory");
|
|
43
43
|
var import_node_view = require("@xyo-network/node-view");
|
|
44
44
|
var import_sentinel_memory = require("@xyo-network/sentinel-memory");
|
|
45
45
|
var import_witness_adhoc = require("@xyo-network/witness-adhoc");
|
|
46
46
|
var standardCreatableFactoriesList = [
|
|
47
|
-
|
|
47
|
+
import_bridge_http.HttpBridge,
|
|
48
48
|
import_archivist_view.ViewArchivist,
|
|
49
49
|
import_node_view.ViewNode,
|
|
50
50
|
import_witness_adhoc.AdhocWitness,
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["export * from './ModuleFactoryLocator'\nexport * from './standardCreatableFactories'\n","import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;ACAA,oBAAyB;AACzB,IAAAA,uBAQO;;;ACTP,8BAAgC;AAChC,4BAA8B;AAC9B,yBAA2B;AAC3B,yCAA0C;AAC1C,8BAAgC;AAChC,oCAAqC;AACrC,0BAAwG;AACxG,yBAA2B;AAC3B,uBAAyB;AACzB,6BAA+B;AAC/B,2BAA6B;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,aAAOC,sDAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,wBAAN,MAAMA,sBAAAA;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,eAAOC,wBACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,6DAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAnEjH;AAqEI,WAAOA;;OAEH,UAAKL,UAAUI,MAAAA,MAAf,mBAAwBY,OAAOC,gCAAWC,KAAK,CAACP,gBAAYQ,mCAAaR,mCAASN,QAAQA,MAAAA;SAE1F,UAAKL,UAAUI,MAAAA,MAAf,mBAAyB;EAC/B;AACF;AA1DaN;AAAN,IAAMA,uBAAN;","names":["import_module_model","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/dist/node/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import { hasAllLabels, hasLabels, registerCreatableModuleFactory } from "@xyo-ne
|
|
|
8
8
|
// src/standardCreatableFactories.ts
|
|
9
9
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
10
10
|
import { ViewArchivist } from "@xyo-network/archivist-view";
|
|
11
|
+
import { HttpBridge } from "@xyo-network/bridge-http";
|
|
11
12
|
import { MemoryBoundWitnessDiviner } from "@xyo-network/diviner-boundwitness-memory";
|
|
12
13
|
import { IdentityDiviner } from "@xyo-network/diviner-identity";
|
|
13
14
|
import { MemoryPayloadDiviner } from "@xyo-network/diviner-payload-memory";
|
|
14
|
-
import { HttpBridge } from "@xyo-network/http-bridge";
|
|
15
15
|
import { registerCreatableModuleFactories } from "@xyo-network/module-model";
|
|
16
16
|
import { MemoryNode } from "@xyo-network/node-memory";
|
|
17
17
|
import { ViewNode } from "@xyo-network/node-view";
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/ModuleFactoryLocator.ts","../../src/standardCreatableFactories.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport {\n CreatableModuleFactory,\n CreatableModuleRegistry,\n hasAllLabels,\n hasLabels,\n LabeledCreatableModuleFactory,\n Labels,\n registerCreatableModuleFactory,\n} from '@xyo-network/module-model'\nimport { Schema } from '@xyo-network/payload-model'\n\nimport { standardCreatableFactories } from './standardCreatableFactories'\n\n/**\n * A class which encapsulates the Service Locator Pattern for Module Factories\n */\nexport class ModuleFactoryLocator {\n constructor(protected readonly _registry: CreatableModuleRegistry = standardCreatableFactories()) {}\n\n /**\n * The current registry for the module factory\n */\n get registry(): Readonly<CreatableModuleRegistry> {\n return this._registry\n }\n\n /**\n * Locates a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or throws if one is not found\n */\n locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory {\n return assertEx(\n this.tryLocate(schema, labels),\n () => `No module factory for the supplied ${`config schema [${schema}]`}${labels ? ` & labels [${JSON.stringify(labels)}]` : ''} registered`,\n )\n }\n\n /**\n * Registers a single module factory (with optional tags) with the locator\n * @param factory The factory to register\n * @param labels The labels for the module factory\n */\n register(factory: CreatableModuleFactory, labels?: Labels, primary: boolean | Schema | Schema[] = false): this {\n registerCreatableModuleFactory(this._registry, factory, labels, primary)\n return this\n }\n\n /**\n * Registers multiple module factories with the locator\n * @param factories The factories to register\n */\n registerMany(factories: CreatableModuleFactory[]): this {\n for (const factory of factories) {\n this.register(factory)\n }\n return this\n }\n\n /**\n * Tries to locate a module factory that matches the supplied schema and labels\n * @param schema The config schema for the module\n * @param labels The labels for the module factory\n * @returns A module factory that matches the supplied schema and labels or undefined\n */\n tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined {\n // If labels were provided\n return labels ?\n // Find the first factory that has labels and has all the labels provided\n this._registry[schema]?.filter(hasLabels).find((factory) => hasAllLabels(factory?.labels, labels))\n : // Otherwise, return the first factory\n this._registry[schema]?.[0]\n }\n}\n","import { MemoryArchivist } from '@xyo-network/archivist-memory'\nimport { ViewArchivist } from '@xyo-network/archivist-view'\nimport { HttpBridge } from '@xyo-network/bridge-http'\nimport { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'\nimport { IdentityDiviner } from '@xyo-network/diviner-identity'\nimport { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'\nimport { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { ViewNode } from '@xyo-network/node-view'\nimport { MemorySentinel } from '@xyo-network/sentinel-memory'\nimport { AdhocWitness } from '@xyo-network/witness-adhoc'\n\n//order matters in this array. later items will register themselves as primary for schemas shared with earlier items\nexport const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[] = [\n HttpBridge,\n ViewArchivist,\n ViewNode,\n AdhocWitness,\n MemoryPayloadDiviner,\n MemoryBoundWitnessDiviner,\n IdentityDiviner,\n MemoryArchivist,\n MemoryArchivist,\n MemoryNode,\n MemorySentinel,\n]\n\nexport const standardCreatableFactories = () => {\n return registerCreatableModuleFactories(standardCreatableFactoriesList, {}, true)\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AACzB,SAGEC,cACAC,WAGAC,sCACK;;;ACTP,SAASC,uBAAuB;AAChC,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;AAC3B,SAASC,iCAAiC;AAC1C,SAASC,uBAAuB;AAChC,SAASC,4BAA4B;AACrC,SAAgEC,wCAAwC;AACxG,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAC/B,SAASC,oBAAoB;AAGtB,IAAMC,iCAA6F;EACxGC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAA;EACAC;EACAC;;AAGK,IAAMC,6BAA6B,6BAAA;AACxC,SAAOC,iCAAiCZ,gCAAgC,CAAC,GAAG,IAAA;AAC9E,GAF0C;;;ADVnC,IAAMa,wBAAN,MAAMA,sBAAAA;;EACXC,YAA+BC,YAAqCC,2BAAAA,GAA8B;SAAnED,YAAAA;EAAoE;;;;EAKnG,IAAIE,WAA8C;AAChD,WAAO,KAAKF;EACd;;;;;;;EAQAG,OAAOC,QAAgBC,QAAyE;AAC9F,WAAOC,SACL,KAAKC,UAAUH,QAAQC,MAAAA,GACvB,MAAM,sCAAsC,kBAAkBD,MAAAA,GAAS,GAAGC,SAAS,cAAcG,KAAKC,UAAUJ,MAAAA,CAAAA,MAAa,EAAA,aAAe;EAEhJ;;;;;;EAOAK,SAASC,SAAiCN,QAAiBO,UAAuC,OAAa;AAC7GC,mCAA+B,KAAKb,WAAWW,SAASN,QAAQO,OAAAA;AAChE,WAAO;EACT;;;;;EAMAE,aAAaC,WAA2C;AACtD,eAAWJ,WAAWI,WAAW;AAC/B,WAAKL,SAASC,OAAAA;IAChB;AACA,WAAO;EACT;;;;;;;EAQAJ,UAAUH,QAAgBC,QAAqF;AAnEjH;AAqEI,WAAOA;;OAEH,UAAKL,UAAUI,MAAAA,MAAf,mBAAwBY,OAAOC,WAAWC,KAAK,CAACP,YAAYQ,aAAaR,mCAASN,QAAQA,MAAAA;SAE1F,UAAKL,UAAUI,MAAAA,MAAf,mBAAyB;EAC/B;AACF;AA1DaN;AAAN,IAAMA,uBAAN;","names":["assertEx","hasAllLabels","hasLabels","registerCreatableModuleFactory","MemoryArchivist","ViewArchivist","HttpBridge","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryPayloadDiviner","registerCreatableModuleFactories","MemoryNode","ViewNode","MemorySentinel","AdhocWitness","standardCreatableFactoriesList","HttpBridge","ViewArchivist","ViewNode","AdhocWitness","MemoryPayloadDiviner","MemoryBoundWitnessDiviner","IdentityDiviner","MemoryArchivist","MemoryNode","MemorySentinel","standardCreatableFactories","registerCreatableModuleFactories","ModuleFactoryLocator","constructor","_registry","standardCreatableFactories","registry","locate","schema","labels","assertEx","tryLocate","JSON","stringify","register","factory","primary","registerCreatableModuleFactory","registerMany","factories","filter","hasLabels","find","hasAllLabels"]}
|
package/package.json
CHANGED
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/assert": "^3.3.3",
|
|
14
|
-
"@xyo-network/archivist-memory": "~2.102.
|
|
15
|
-
"@xyo-network/archivist-view": "~2.102.
|
|
16
|
-
"@xyo-network/diviner-boundwitness-memory": "~2.102.
|
|
17
|
-
"@xyo-network/diviner-identity": "~2.102.
|
|
18
|
-
"@xyo-network/diviner-payload-memory": "~2.102.
|
|
19
|
-
"@xyo-network/http-bridge": "~2.102.
|
|
20
|
-
"@xyo-network/module-model": "~2.102.
|
|
21
|
-
"@xyo-network/node-memory": "~2.102.
|
|
22
|
-
"@xyo-network/node-view": "~2.102.
|
|
23
|
-
"@xyo-network/payload-model": "~2.102.
|
|
24
|
-
"@xyo-network/sentinel-memory": "~2.102.
|
|
25
|
-
"@xyo-network/witness-adhoc": "~2.102.
|
|
14
|
+
"@xyo-network/archivist-memory": "~2.102.2",
|
|
15
|
+
"@xyo-network/archivist-view": "~2.102.2",
|
|
16
|
+
"@xyo-network/diviner-boundwitness-memory": "~2.102.2",
|
|
17
|
+
"@xyo-network/diviner-identity": "~2.102.2",
|
|
18
|
+
"@xyo-network/diviner-payload-memory": "~2.102.2",
|
|
19
|
+
"@xyo-network/http-bridge": "~2.102.2",
|
|
20
|
+
"@xyo-network/module-model": "~2.102.2",
|
|
21
|
+
"@xyo-network/node-memory": "~2.102.2",
|
|
22
|
+
"@xyo-network/node-view": "~2.102.2",
|
|
23
|
+
"@xyo-network/payload-model": "~2.102.2",
|
|
24
|
+
"@xyo-network/sentinel-memory": "~2.102.2",
|
|
25
|
+
"@xyo-network/witness-adhoc": "~2.102.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@xylabs/ts-scripts-yarn3": "^3.10.4",
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
69
69
|
},
|
|
70
70
|
"sideEffects": false,
|
|
71
|
-
"version": "2.102.
|
|
71
|
+
"version": "2.102.2",
|
|
72
72
|
"type": "module"
|
|
73
73
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
2
2
|
import { ViewArchivist } from '@xyo-network/archivist-view'
|
|
3
|
+
import { HttpBridge } from '@xyo-network/bridge-http'
|
|
3
4
|
import { MemoryBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-memory'
|
|
4
5
|
import { IdentityDiviner } from '@xyo-network/diviner-identity'
|
|
5
6
|
import { MemoryPayloadDiviner } from '@xyo-network/diviner-payload-memory'
|
|
6
|
-
import { HttpBridge } from '@xyo-network/http-bridge'
|
|
7
7
|
import { CreatableModuleFactory, LabeledCreatableModuleFactory, registerCreatableModuleFactories } from '@xyo-network/module-model'
|
|
8
8
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
9
9
|
import { ViewNode } from '@xyo-network/node-view'
|