@xyo-network/archivist-view 2.109.1 → 2.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.js'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -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 ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.js'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -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 ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;AAlCUpB;AAGR,cAPWD,gBAOcuB,iBAA0B;KAAI,2CAAMA;EAAexB;;AAC5E,cARWC,gBAQcwB,uBAA8BzB;AACvD,cATWC,gBAScyB,UAAS;EAAE,GAAGC;AAA0B;AAT5D,IAAM1B,gBAAN;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.js'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\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' as const\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 [ArchivistGetQuerySchema, 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,6BASO;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;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACH,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACrI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,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;AAlCUpB;AAGR,cAPWD,gBAOcuB,iBAA0B;KAAI,2CAAMA;EAAexB;;AAC5E,cARWC,gBAQcwB,uBAA8BzB;AACvD,cATWC,gBAScyB,UAAS;EAAE,GAAGC;AAA0B;AAT5D,IAAM1B,gBAAN;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './ViewArchivist';
1
+ export * from './ViewArchivist.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
package/package.json CHANGED
@@ -10,19 +10,19 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/assert": "^3.5.3",
14
- "@xylabs/hex": "^3.5.3",
15
- "@xyo-network/archivist-abstract": "^2.109.1",
16
- "@xyo-network/archivist-model": "^2.109.1",
17
- "@xyo-network/module-model": "^2.109.1",
18
- "@xyo-network/payload-model": "^2.109.1"
13
+ "@xylabs/assert": "^3.5.9",
14
+ "@xylabs/hex": "^3.5.9",
15
+ "@xyo-network/archivist-abstract": "^2.110.0",
16
+ "@xyo-network/archivist-model": "^2.110.0",
17
+ "@xyo-network/module-model": "^2.110.0",
18
+ "@xyo-network/payload-model": "^2.110.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@xylabs/ts-scripts-yarn3": "^3.11.12",
22
22
  "@xylabs/tsconfig": "^3.11.12",
23
- "@xyo-network/archivist-memory": "^2.109.1",
24
- "@xyo-network/node-memory": "^2.109.1",
25
- "@xyo-network/payload-builder": "^2.109.1",
23
+ "@xyo-network/archivist-memory": "^2.110.0",
24
+ "@xyo-network/node-memory": "^2.110.0",
25
+ "@xyo-network/payload-builder": "^2.110.0",
26
26
  "typescript": "^5.5.3"
27
27
  },
28
28
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -64,6 +64,6 @@
64
64
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
65
65
  },
66
66
  "sideEffects": false,
67
- "version": "2.109.1",
67
+ "version": "2.110.0",
68
68
  "type": "module"
69
69
  }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './ViewArchivist'
1
+ export * from './ViewArchivist.js'