@xyo-network/module-factory-locator 3.9.18 → 3.9.19

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.
@@ -0,0 +1,44 @@
1
+ import type { CreatableModuleFactory, CreatableModuleRegistry, LabeledCreatableModuleFactory, Labels } from '@xyo-network/module-model';
2
+ import type { Schema } from '@xyo-network/payload-model';
3
+ /**
4
+ * A class which encapsulates the Service Locator Pattern for Module Factories
5
+ */
6
+ export declare class ModuleFactoryLocator {
7
+ protected readonly _registry: CreatableModuleRegistry;
8
+ private _frozen;
9
+ constructor(_registry?: CreatableModuleRegistry);
10
+ /**
11
+ * The current registry for the module factory
12
+ */
13
+ get registry(): Readonly<CreatableModuleRegistry>;
14
+ static empty(): ModuleFactoryLocator;
15
+ static standard(): ModuleFactoryLocator;
16
+ freeze(): void;
17
+ /**
18
+ * Locates a module factory that matches the supplied schema and labels
19
+ * @param schema The config schema for the module
20
+ * @param labels The labels for the module factory
21
+ * @returns A module factory that matches the supplied schema and labels or throws if one is not found
22
+ */
23
+ locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory;
24
+ merge(locator: ModuleFactoryLocator): ModuleFactoryLocator;
25
+ /**
26
+ * Registers a single module factory (with optional tags) with the locator
27
+ * @param factory The factory to register
28
+ * @param labels The labels for the module factory
29
+ */
30
+ register(factory: CreatableModuleFactory, labels?: Labels, primary?: boolean | Schema | Schema[]): this;
31
+ /**
32
+ * Registers multiple module factories with the locator
33
+ * @param factories The factories to register
34
+ */
35
+ registerMany(factories: CreatableModuleFactory[]): this;
36
+ /**
37
+ * Tries to locate a module factory that matches the supplied schema and labels
38
+ * @param schema The config schema for the module
39
+ * @param labels The labels for the module factory
40
+ * @returns A module factory that matches the supplied schema and labels or undefined
41
+ */
42
+ tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined;
43
+ }
44
+ //# sourceMappingURL=ModuleFactoryLocator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleFactoryLocator.d.ts","sourceRoot":"","sources":["../../src/ModuleFactoryLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,MAAM,EACP,MAAM,2BAA2B,CAAA;AAMlC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAIxD;;GAEG;AACH,qBAAa,oBAAoB;IAGnB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,uBAAuB;IAFjE,OAAO,CAAC,OAAO,CAAQ;gBAEQ,SAAS,GAAE,uBAAsD;IAEhG;;OAEG;IACH,IAAI,QAAQ,IAAI,QAAQ,CAAC,uBAAuB,CAAC,CAEhD;IAED,MAAM,CAAC,KAAK;IAIZ,MAAM,CAAC,QAAQ;IAIf,MAAM;IAIN;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,GAAG,6BAA6B;IAQ/F,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB;IAY1D;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAU,GAAG,IAAI;IAM9G;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,sBAAsB,EAAE,GAAG,IAAI;IAOvD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,GAAG,6BAA6B,GAAG,SAAS;CAO/G"}
@@ -1,23 +1,3 @@
1
- import * as _xyo_network_module_model from '@xyo-network/module-model';
2
- import { CreatableModuleRegistry, Labels, CreatableModuleFactory, LabeledCreatableModuleFactory } from '@xyo-network/module-model';
3
- import { Schema } from '@xyo-network/payload-model';
4
-
5
- declare class ModuleFactoryLocator {
6
- protected readonly _registry: CreatableModuleRegistry;
7
- private _frozen;
8
- constructor(_registry?: CreatableModuleRegistry);
9
- get registry(): Readonly<CreatableModuleRegistry>;
10
- static empty(): ModuleFactoryLocator;
11
- static standard(): ModuleFactoryLocator;
12
- freeze(): void;
13
- locate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory;
14
- merge(locator: ModuleFactoryLocator): ModuleFactoryLocator;
15
- register(factory: CreatableModuleFactory, labels?: Labels, primary?: boolean | Schema | Schema[]): this;
16
- registerMany(factories: CreatableModuleFactory[]): this;
17
- tryLocate(schema: string, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined;
18
- }
19
-
20
- declare const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[];
21
- declare const standardCreatableFactories: () => _xyo_network_module_model.CreatableModuleRegistry;
22
-
23
- export { ModuleFactoryLocator, standardCreatableFactories, standardCreatableFactoriesList };
1
+ export * from './ModuleFactoryLocator.ts';
2
+ export * from './standardCreatableFactories.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { CreatableModuleFactory, LabeledCreatableModuleFactory } from '@xyo-network/module-model';
2
+ export declare const standardCreatableFactoriesList: (CreatableModuleFactory | LabeledCreatableModuleFactory)[];
3
+ export declare const standardCreatableFactories: () => import("@xyo-network/module-model").CreatableModuleRegistry;
4
+ //# sourceMappingURL=standardCreatableFactories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standardCreatableFactories.d.ts","sourceRoot":"","sources":["../../src/standardCreatableFactories.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAQtG,eAAO,MAAM,8BAA8B,EAAE,CAAC,sBAAsB,GAAG,6BAA6B,CAAC,EAapG,CAAA;AAED,eAAO,MAAM,0BAA0B,mEAEtC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/module-factory-locator",
3
- "version": "3.9.18",
3
+ "version": "3.9.19",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,24 +30,24 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
32
  "@xylabs/assert": "^4.5.1",
33
- "@xyo-network/archivist-memory": "^3.9.18",
34
- "@xyo-network/archivist-view": "^3.9.18",
35
- "@xyo-network/bridge-http": "^3.9.18",
36
- "@xyo-network/diviner-boundwitness-memory": "^3.9.18",
37
- "@xyo-network/diviner-identity": "^3.9.18",
38
- "@xyo-network/diviner-payload-generic": "^3.9.18",
39
- "@xyo-network/diviner-payload-memory": "^3.9.18",
40
- "@xyo-network/module-model": "^3.9.18",
41
- "@xyo-network/node-memory": "^3.9.18",
42
- "@xyo-network/node-view": "^3.9.18",
43
- "@xyo-network/payload-model": "^3.9.18",
44
- "@xyo-network/sentinel-memory": "^3.9.18",
45
- "@xyo-network/witness-adhoc": "^3.9.18"
33
+ "@xyo-network/archivist-memory": "^3.9.19",
34
+ "@xyo-network/archivist-view": "^3.9.19",
35
+ "@xyo-network/bridge-http": "^3.9.19",
36
+ "@xyo-network/diviner-boundwitness-memory": "^3.9.19",
37
+ "@xyo-network/diviner-identity": "^3.9.19",
38
+ "@xyo-network/diviner-payload-generic": "^3.9.19",
39
+ "@xyo-network/diviner-payload-memory": "^3.9.19",
40
+ "@xyo-network/module-model": "^3.9.19",
41
+ "@xyo-network/node-memory": "^3.9.19",
42
+ "@xyo-network/node-view": "^3.9.19",
43
+ "@xyo-network/payload-model": "^3.9.19",
44
+ "@xyo-network/sentinel-memory": "^3.9.19",
45
+ "@xyo-network/witness-adhoc": "^3.9.19"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "^5.0.25",
49
- "@xylabs/tsconfig": "^5.0.25",
50
- "typescript": "^5.7.3"
48
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
49
+ "@xylabs/tsconfig": "^5.0.39",
50
+ "typescript": "^5.8.2"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"