@xyo-network/archivist-view 5.2.25 → 5.3.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.
|
@@ -3,7 +3,9 @@ import { AbstractArchivist } from '@xyo-network/archivist-abstract';
|
|
|
3
3
|
import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions, ArchivistParams } from '@xyo-network/archivist-model';
|
|
4
4
|
import { AnyConfigSchema, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
|
|
5
5
|
import { Payload, Schema, WithStorageMeta } from '@xyo-network/payload-model';
|
|
6
|
-
export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config"
|
|
6
|
+
export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
7
9
|
export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
|
|
8
10
|
export type ViewArchivistConfig = ArchivistConfig<{
|
|
9
11
|
originArchivist?: ModuleIdentifier;
|
|
@@ -22,7 +24,7 @@ export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfig
|
|
|
22
24
|
} & {
|
|
23
25
|
readonly __address: true;
|
|
24
26
|
});
|
|
25
|
-
get queries():
|
|
27
|
+
get queries(): Schema[];
|
|
26
28
|
originArchivistInstance(): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>>;
|
|
27
29
|
/** @deprecated use next instead */
|
|
28
30
|
protected allHandler(): Promise<WithStorageMeta<Payload>[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAqB,MAAM,iCAAiC,CAAA;AACtF,OAAO,EAEL,e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AAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;;MAAiE;IAEhG,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe;;;;OAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;IAM7B,mCAAmC;cACV,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAKjD,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAI/D,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;CAG1G"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -27,7 +27,10 @@ import {
|
|
|
27
27
|
labeledCreatableModule,
|
|
28
28
|
ModuleLimitationViewLabel
|
|
29
29
|
} from "@xyo-network/module-model";
|
|
30
|
-
|
|
30
|
+
import {
|
|
31
|
+
asSchema
|
|
32
|
+
} from "@xyo-network/payload-model";
|
|
33
|
+
var ViewArchivistConfigSchema = asSchema("network.xyo.archivist.view.config", true);
|
|
31
34
|
var ViewArchivist = class extends AbstractArchivist {
|
|
32
35
|
_originArchivistInstance;
|
|
33
36
|
get originArchivist() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx, Hash } from '@xylabs/sdk-js'\nimport { AbstractArchivist, StorageClassLabel } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n ArchivistParams,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModule,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport {\n Payload, Schema, WithStorageMeta,\n} from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'
|
|
1
|
+
{"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx, Hash } from '@xylabs/sdk-js'\nimport { AbstractArchivist, StorageClassLabel } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n ArchivistParams,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModule,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport {\n asSchema,\n Payload, Schema, WithStorageMeta,\n} from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = asSchema('network.xyo.archivist.view.config', true)\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>> = ArchivistParams<TConfig>\n\n@labeledCreatableModule()\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 static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel, [StorageClassLabel]: 'proxy' }\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 /** @deprecated use next instead */\n protected override async allHandler(): Promise<WithStorageMeta<Payload>[]> {\n // eslint-disable-next-line sonarjs/deprecation\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<WithStorageMeta<Payload>[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<WithStorageMeta<Payload>[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAsB;AAC/B,SAAS,mBAAmB,yBAAyB;AACrD;AAAA,EACE;AAAA,EAEA;AAAA,EAIA;AAAA,EAEA;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EAGA;AAAA,OACK;AACP;AAAA,EACE;AAAA,OAEK;AAEA,IAAM,4BAA4B,SAAS,qCAAqC,IAAI;AAapF,IAAM,gBAAN,cAIG,kBACqC;AAAA,EAKrC;AAAA,EAER,IAAI,kBAAkB;AACpB,WAAO,SAAS,KAAK,OAAO,iBAAiB,MAAM,gCAAgC;AAAA,EACrF;AAAA,EAEA,IAAa,UAAU;AACrB,WAAO,CAAC,yBAAyB,yBAAyB,0BAA0B,GAAG,MAAM,OAAO;AAAA,EACtG;AAAA,EAEA,MAAM,0BAA0B;AAC9B,SAAK,2BACD,KAAK,4BAA4B,SAAS,MAAM,KAAK,QAAQ,KAAK,iBAAiB,EAAE,UAAU,qBAAqB,UAAU,KAAK,CAAC,CAAC;AACzI,WAAO,KAAK;AAAA,EACd;AAAA;AAAA,EAGA,MAAyB,aAAkD;AAEzE,WAAQ,OAAO,MAAM,KAAK,wBAAwB,GAAG,MAAM,KAAM,CAAC;AAAA,EACpE;AAAA,EAEA,MAAyB,WAAW,QAAqD;AACvF,WAAO,OAAO,MAAM,KAAK,wBAAwB,GAAG,IAAI,MAAM;AAAA,EAChE;AAAA,EAEA,MAAyB,YAAY,SAAqE;AACxG,WAAQ,OAAO,MAAM,KAAK,wBAAwB,GAAG,OAAO,OAAO,KAAM,CAAC;AAAA,EAC5E;AACF;AAjCE,cANW,eAMc,iBAA0B,CAAC,GAAG,yCAAM,kBAAe,yBAAyB;AACrG,cAPW,eAOc,uBAA8B;AACvD,cARW,eAQc,UAAS,EAAE,GAAG,2BAA2B,CAAC,iBAAiB,GAAG,QAAQ;AARpF,gBAAN;AAAA,EADN,uBAAuB;AAAA,GACX;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-view",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/sdk-js": "~5.0.
|
|
40
|
-
"@xyo-network/archivist-abstract": "~5.
|
|
41
|
-
"@xyo-network/archivist-model": "~5.
|
|
42
|
-
"@xyo-network/module-model": "~5.
|
|
43
|
-
"@xyo-network/payload-model": "~5.
|
|
39
|
+
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
+
"@xyo-network/archivist-abstract": "~5.3.0",
|
|
41
|
+
"@xyo-network/archivist-model": "~5.3.0",
|
|
42
|
+
"@xyo-network/module-model": "~5.3.0",
|
|
43
|
+
"@xyo-network/payload-model": "~5.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@xylabs/ts-scripts-yarn3": "~7.2
|
|
47
|
-
"@xylabs/tsconfig": "~7.2
|
|
48
|
-
"@xyo-network/archivist-memory": "~5.
|
|
49
|
-
"@xyo-network/node-memory": "~5.
|
|
50
|
-
"@xyo-network/payload-builder": "~5.
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
47
|
+
"@xylabs/tsconfig": "~7.3.2",
|
|
48
|
+
"@xyo-network/archivist-memory": "~5.3.0",
|
|
49
|
+
"@xyo-network/node-memory": "~5.3.0",
|
|
50
|
+
"@xyo-network/payload-builder": "~5.3.0",
|
|
51
51
|
"typescript": "~5.9.3",
|
|
52
|
-
"vitest": "~4.0.
|
|
52
|
+
"vitest": "~4.0.18"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
package/src/ViewArchivist.ts
CHANGED
|
@@ -19,10 +19,11 @@ import {
|
|
|
19
19
|
ModuleLimitationViewLabel,
|
|
20
20
|
} from '@xyo-network/module-model'
|
|
21
21
|
import {
|
|
22
|
+
asSchema,
|
|
22
23
|
Payload, Schema, WithStorageMeta,
|
|
23
24
|
} from '@xyo-network/payload-model'
|
|
24
25
|
|
|
25
|
-
export const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config'
|
|
26
|
+
export const ViewArchivistConfigSchema = asSchema('network.xyo.archivist.view.config', true)
|
|
26
27
|
export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema
|
|
27
28
|
|
|
28
29
|
export type ViewArchivistConfig = ArchivistConfig<
|