@xyo-network/archivist-view 2.98.5 → 2.99.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.
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAmB,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/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OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACtB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAExE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAE5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAmB,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACtB,OAAO,SAAS,mBAAmB,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C1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACtB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAExE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAE5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAmB,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACtB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAExE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAE5C,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAsD;IAC7F,OAAgB,mBAAmB,EAAE,MAAM,CA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AAU,SAAS,wBAAwB,GAAG,wBAAwB,CAExE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAE5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -52,6 +52,9 @@ var ViewArchivist = class extends import_archivist_abstract.AbstractArchivist {
52
52
  ViewArchivistConfigSchema
53
53
  ];
54
54
  static defaultConfigSchema = ViewArchivistConfigSchema;
55
+ static labels = {
56
+ ...import_module_model.ModuleLimitationViewLabel
57
+ };
55
58
  _originArchivistInstance;
56
59
  get originArchivist() {
57
60
  return (0, import_assert.assertEx)(this.config.originArchivist, () => "originArchivist not configured");
@@ -81,6 +84,6 @@ var ViewArchivist = class extends import_archivist_abstract.AbstractArchivist {
81
84
  }
82
85
  };
83
86
  ViewArchivist = _ts_decorate([
84
- (0, import_module_model.creatableModule)()
87
+ (0, import_module_model.labeledCreatableModuleFactory)()
85
88
  ], ViewArchivist);
86
89
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport { AnyConfigSchema, creatableModule, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@creatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override defaultConfigSchema: Schema = ViewArchivistConfigSchema\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BAQO;AACP,0BAAiG;;;;;;;;;;;;AAG1F,IAAMA,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,4CAAAA;SAAAA;;;EAGR,OAAgBC,gBAA0B;OAAI,MAAMA;IAAeH;;EACnE,OAAgBI,sBAA8BJ;EAEtCK;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;AArCatB,gBAAAA,aAAAA;MADZwB,qCAAAA;GACYxB,aAAAA;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","creatableModule"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BAQO;AACP,0BAOO;;;;;;;;;;;;AAGA,IAAMA,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,4CAAAA;SAAAA;;;EAGR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EACvD,OAAyBK,SAAS;IAAE,GAAGC;EAA0B;EAEzDC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;AAtCaxB,gBAAAA,aAAAA;MADZ0B,mDAAAA;GACY1B,aAAAA;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","labeledCreatableModuleFactory"]}
@@ -5,7 +5,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
5
5
  import { assertEx } from "@xylabs/assert";
6
6
  import { AbstractArchivist } from "@xyo-network/archivist-abstract";
7
7
  import { ArchivistAllQuerySchema, ArchivistNextQuerySchema, isArchivistInstance } from "@xyo-network/archivist-model";
8
- import { creatableModule } from "@xyo-network/module-model";
8
+ import { labeledCreatableModuleFactory, ModuleLimitationViewLabel } from "@xyo-network/module-model";
9
9
  function _ts_decorate(decorators, target, key, desc) {
10
10
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11
11
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -27,6 +27,9 @@ var ViewArchivist = class extends AbstractArchivist {
27
27
  ViewArchivistConfigSchema
28
28
  ];
29
29
  static defaultConfigSchema = ViewArchivistConfigSchema;
30
+ static labels = {
31
+ ...ModuleLimitationViewLabel
32
+ };
30
33
  _originArchivistInstance;
31
34
  get originArchivist() {
32
35
  return assertEx(this.config.originArchivist, () => "originArchivist not configured");
@@ -56,7 +59,7 @@ var ViewArchivist = class extends AbstractArchivist {
56
59
  }
57
60
  };
58
61
  ViewArchivist = _ts_decorate([
59
- creatableModule()
62
+ labeledCreatableModuleFactory()
60
63
  ], ViewArchivist);
61
64
  export {
62
65
  ViewArchivist,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport { AnyConfigSchema, creatableModule, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@creatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override defaultConfigSchema: Schema = ViewArchivistConfigSchema\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAKAC,0BACAC,2BACK;AACP,SAA0BC,uBAAuE;;;;;;;;;;;;AAG1F,IAAMC,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,kBAAAA;SAAAA;;;EAGR,OAAgBC,gBAA0B;OAAI,MAAMA;IAAeH;;EACnE,OAAgBI,sBAA8BJ;EAEtCK;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,4BAA4BE,SAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;AArCatB,gBAAAA,aAAAA;EADZwB,gBAAAA;GACYxB,aAAAA;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","creatableModule","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","creatableModule"]}
1
+ {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAKAC,0BACAC,2BACK;AACP,SAEEC,+BAGAC,iCAEK;;;;;;;;;;;;AAGA,IAAMC,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,kBAAAA;SAAAA;;;EAGR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EACvD,OAAyBK,SAAS;IAAE,GAAGC;EAA0B;EAEzDC;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,4BAA4BE,SAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;AAtCaxB,gBAAAA,aAAAA;EADZ0B,8BAAAA;GACY1B,aAAAA;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","labeledCreatableModuleFactory","ModuleLimitationViewLabel","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","labeledCreatableModuleFactory"]}
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAA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aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAmB,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B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G"}
@@ -10,8 +10,11 @@ export type ViewArchivistConfig = ArchivistConfig<{
10
10
  }, ViewArchivistConfigSchema>;
11
11
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
12
  export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static configSchemas: Schema[];
14
- static defaultConfigSchema: Schema;
13
+ static readonly configSchemas: Schema[];
14
+ static readonly defaultConfigSchema: Schema;
15
+ static readonly labels: {
16
+ ModuleLimitationLabelName: string;
17
+ };
15
18
  private _originArchivistInstance?;
16
19
  get originArchivist(): string;
17
20
  get queries(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,eAAe,EAAmB,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,S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,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACtB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAExE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAE5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -88,9 +88,12 @@ __publicField(_ViewArchivist, "configSchemas", [
88
88
  ViewArchivistConfigSchema
89
89
  ]);
90
90
  __publicField(_ViewArchivist, "defaultConfigSchema", ViewArchivistConfigSchema);
91
+ __publicField(_ViewArchivist, "labels", {
92
+ ...import_module_model.ModuleLimitationViewLabel
93
+ });
91
94
  var ViewArchivist = _ViewArchivist;
92
95
  ViewArchivist = _ts_decorate([
93
- (0, import_module_model.creatableModule)()
96
+ (0, import_module_model.labeledCreatableModuleFactory)()
94
97
  ], ViewArchivist);
95
98
  // Annotate the CommonJS export names for ESM import in node:
96
99
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport { AnyConfigSchema, creatableModule, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@creatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override defaultConfigSchema: Schema = ViewArchivistConfigSchema\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BAQO;AACP,0BAAiG;;;;;;;;;;;;AAG1F,IAAMA,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,4CAAAA;EAMAC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAjCUnB;AAGR,cAPWD,gBAOKsB,iBAA0B;KAAI,2CAAMA;EAAevB;;AACnE,cARWC,gBAQKuB,uBAA8BxB;AARzC,IAAMC,gBAAN;AAAMA,gBAAAA,aAAAA;MADZwB,qCAAAA;GACYxB,aAAAA;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","creatableModule"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BAQO;AACP,0BAOO;;;;;;;;;;;;AAGA,IAAMA,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,4CAAAA;EAOAC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAlCUnB;AAGR,cAPWD,gBAOcsB,iBAA0B;KAAI,2CAAMA;EAAevB;;AAC5E,cARWC,gBAQcuB,uBAA8BxB;AACvD,cATWC,gBAScwB,UAAS;EAAE,GAAGC;AAA0B;AAT5D,IAAMzB,gBAAN;AAAMA,gBAAAA,aAAAA;MADZ0B,mDAAAA;GACY1B,aAAAA;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","labeledCreatableModuleFactory"]}
@@ -13,7 +13,7 @@ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
13
13
  import { assertEx } from "@xylabs/assert";
14
14
  import { AbstractArchivist } from "@xyo-network/archivist-abstract";
15
15
  import { ArchivistAllQuerySchema, ArchivistNextQuerySchema, isArchivistInstance } from "@xyo-network/archivist-model";
16
- import { creatableModule } from "@xyo-network/module-model";
16
+ import { labeledCreatableModuleFactory, ModuleLimitationViewLabel } from "@xyo-network/module-model";
17
17
  function _ts_decorate(decorators, target, key, desc) {
18
18
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
19
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -63,9 +63,12 @@ __publicField(_ViewArchivist, "configSchemas", [
63
63
  ViewArchivistConfigSchema
64
64
  ]);
65
65
  __publicField(_ViewArchivist, "defaultConfigSchema", ViewArchivistConfigSchema);
66
+ __publicField(_ViewArchivist, "labels", {
67
+ ...ModuleLimitationViewLabel
68
+ });
66
69
  var ViewArchivist = _ViewArchivist;
67
70
  ViewArchivist = _ts_decorate([
68
- creatableModule()
71
+ labeledCreatableModuleFactory()
69
72
  ], ViewArchivist);
70
73
  export {
71
74
  ViewArchivist,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport { AnyConfigSchema, creatableModule, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@creatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override defaultConfigSchema: Schema = ViewArchivistConfigSchema\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAKAC,0BACAC,2BACK;AACP,SAA0BC,uBAAuE;;;;;;;;;;;;AAG1F,IAAMC,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,kBAAAA;EAMAC;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,4BAA4BE,SAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAjCUnB;AAGR,cAPWD,gBAOKsB,iBAA0B;KAAI,2CAAMA;EAAevB;;AACnE,cARWC,gBAQKuB,uBAA8BxB;AARzC,IAAMC,gBAAN;AAAMA,gBAAAA,aAAAA;EADZwB,gBAAAA;GACYxB,aAAAA;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","creatableModule","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","creatableModule"]}
1
+ {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n >\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance\n{\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance =\n this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAKAC,0BACAC,2BACK;AACP,SAEEC,+BAGAC,iCAEK;;;;;;;;;;;;AAGA,IAAMC,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,kBAAAA;EAOAC;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;SAA6B,MAAMF;;EACtE;EAEA,MAAMG,0BAA0B;AAC9B,SAAKP,2BACH,KAAKA,4BAA4BE,SAAS,MAAM,KAAKM,QAAQ,KAAKP,iBAAiB;MAAEQ,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKX;EACd;EAEA,MAAyBY,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAlCUnB;AAGR,cAPWD,gBAOcsB,iBAA0B;KAAI,2CAAMA;EAAevB;;AAC5E,cARWC,gBAQcuB,uBAA8BxB;AACvD,cATWC,gBAScwB,UAAS;EAAE,GAAGC;AAA0B;AAT5D,IAAMzB,gBAAN;AAAMA,gBAAAA,aAAAA;EADZ0B,8BAAAA;GACY1B,aAAAA;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","labeledCreatableModuleFactory","ModuleLimitationViewLabel","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","labeledCreatableModuleFactory"]}
package/package.json CHANGED
@@ -10,20 +10,20 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/assert": "^3.1.10",
14
- "@xylabs/hex": "^3.1.10",
15
- "@xyo-network/archivist-abstract": "~2.98.5",
16
- "@xyo-network/archivist-model": "~2.98.5",
17
- "@xyo-network/module-model": "~2.98.5",
18
- "@xyo-network/payload-model": "~2.98.5"
13
+ "@xylabs/assert": "^3.1.11",
14
+ "@xylabs/hex": "^3.1.11",
15
+ "@xyo-network/archivist-abstract": "~2.99.1",
16
+ "@xyo-network/archivist-model": "~2.99.1",
17
+ "@xyo-network/module-model": "~2.99.1",
18
+ "@xyo-network/payload-model": "~2.99.1"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@xylabs/ts-scripts-yarn3": "^3.9.1",
22
22
  "@xylabs/tsconfig": "^3.9.1",
23
- "@xyo-network/account": "~2.98.5",
24
- "@xyo-network/archivist-memory": "~2.98.5",
25
- "@xyo-network/node-memory": "~2.98.5",
26
- "@xyo-network/payload-builder": "~2.98.5",
23
+ "@xyo-network/account": "~2.99.1",
24
+ "@xyo-network/archivist-memory": "~2.99.1",
25
+ "@xyo-network/node-memory": "~2.99.1",
26
+ "@xyo-network/payload-builder": "~2.99.1",
27
27
  "typescript": "^5.4.5"
28
28
  },
29
29
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -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.98.5",
68
+ "version": "2.99.1",
69
69
  "type": "module"
70
70
  }
@@ -10,7 +10,14 @@ import {
10
10
  ArchivistNextQuerySchema,
11
11
  isArchivistInstance,
12
12
  } from '@xyo-network/archivist-model'
13
- import { AnyConfigSchema, creatableModule, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model'
13
+ import {
14
+ AnyConfigSchema,
15
+ labeledCreatableModuleFactory,
16
+ ModuleIdentifier,
17
+ ModuleInstance,
18
+ ModuleLimitationViewLabel,
19
+ ModuleParams,
20
+ } from '@xyo-network/module-model'
14
21
  import { PayloadWithMeta, Schema } from '@xyo-network/payload-model'
15
22
 
16
23
  export const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'
@@ -25,7 +32,7 @@ export type ViewArchivistConfig = ArchivistConfig<
25
32
 
26
33
  export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>
27
34
 
28
- @creatableModule()
35
+ @labeledCreatableModuleFactory()
29
36
  export class ViewArchivist<
30
37
  TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,
31
38
  TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,
@@ -33,8 +40,9 @@ export class ViewArchivist<
33
40
  extends AbstractArchivist<TParams, TEventData>
34
41
  implements ArchivistInstance, ModuleInstance
35
42
  {
36
- static override configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]
37
- static override defaultConfigSchema: Schema = ViewArchivistConfigSchema
43
+ static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]
44
+ static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema
45
+ static override readonly labels = { ...ModuleLimitationViewLabel }
38
46
 
39
47
  private _originArchivistInstance?: ArchivistInstance
40
48