@xyo-network/archivist-view 5.3.20 → 5.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/archivist-view",
3
- "version": "5.3.20",
3
+ "version": "5.3.24",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,35 +30,48 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
- "!**/*.test.*"
35
+ "!**/*.test.*",
36
+ "README.md"
37
37
  ],
38
38
  "dependencies": {
39
- "@xyo-network/archivist-abstract": "~5.3.20",
40
- "@xyo-network/archivist-model": "~5.3.20",
41
- "@xyo-network/module-model": "~5.3.20",
42
- "@xyo-network/payload-model": "~5.3.20"
39
+ "@xyo-network/module-model": "~5.3.24",
40
+ "@xyo-network/archivist-abstract": "~5.3.24",
41
+ "@xyo-network/archivist-model": "~5.3.24",
42
+ "@xyo-network/payload-model": "~5.3.24"
43
43
  },
44
44
  "devDependencies": {
45
- "@xylabs/sdk-js": "^5.0.90",
46
- "@xylabs/ts-scripts-common": "~7.5.6",
47
- "@xylabs/ts-scripts-yarn3": "~7.5.6",
48
- "@xylabs/tsconfig": "~7.5.6",
49
- "@xyo-network/archivist-memory": "~5.3.20",
50
- "@xyo-network/node-memory": "~5.3.20",
51
- "@xyo-network/payload-builder": "~5.3.20",
45
+ "@opentelemetry/api": "^1.9.1",
46
+ "@types/node": "^25.5.0",
47
+ "@xylabs/sdk-js": "^5.0.93",
48
+ "@xylabs/ts-scripts-common": "~7.6.16",
49
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
50
+ "@xylabs/tsconfig": "~7.6.16",
51
+ "acorn": "^8.16.0",
52
+ "axios": "^1.14.0",
53
+ "esbuild": "^0.28.0",
54
+ "ethers": "^6.16.0",
55
+ "tslib": "^2.8.1",
52
56
  "typescript": "~5.9.3",
57
+ "vite": "^8.0.3",
53
58
  "vitest": "~4.1.2",
54
- "zod": "^4.3.6"
59
+ "zod": "^4.3.6",
60
+ "@xyo-network/archivist-abstract": "~5.3.24",
61
+ "@xyo-network/archivist-memory": "~5.3.24",
62
+ "@xyo-network/archivist-model": "~5.3.24",
63
+ "@xyo-network/module-model": "~5.3.24",
64
+ "@xyo-network/node-memory": "~5.3.24",
65
+ "@xyo-network/payload-builder": "~5.3.24",
66
+ "@xyo-network/payload-model": "~5.3.24"
55
67
  },
56
68
  "peerDependencies": {
57
69
  "@xylabs/sdk-js": "^5",
70
+ "ethers": "^6",
58
71
  "tslib": "^2.8.1",
59
72
  "zod": "^4"
60
73
  },
61
74
  "publishConfig": {
62
75
  "access": "public"
63
76
  }
64
- }
77
+ }
@@ -1,79 +0,0 @@
1
- import {
2
- assertEx, Hash, Promisable,
3
- } from '@xylabs/sdk-js'
4
- import { AbstractArchivist, StorageClassLabel } from '@xyo-network/archivist-abstract'
5
- import {
6
- ArchivistAllQuerySchema,
7
- ArchivistConfig,
8
- ArchivistGetQuerySchema,
9
- ArchivistInstance,
10
- ArchivistModuleEventData,
11
- ArchivistNextOptions,
12
- ArchivistNextQuerySchema,
13
- ArchivistParams,
14
- isArchivistInstance,
15
- } from '@xyo-network/archivist-model'
16
- import {
17
- AnyConfigSchema,
18
- labeledCreatableModule,
19
- ModuleIdentifier,
20
- ModuleInstance,
21
- ModuleLimitationViewLabel,
22
- } from '@xyo-network/module-model'
23
- import {
24
- asSchema,
25
- Payload, Schema, WithStorageMeta,
26
- } from '@xyo-network/payload-model'
27
-
28
- export const ViewArchivistConfigSchema = asSchema('network.xyo.archivist.view.config', true)
29
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema
30
-
31
- export type ViewArchivistConfig = ArchivistConfig<
32
- {
33
- originArchivist?: ModuleIdentifier
34
- },
35
- ViewArchivistConfigSchema
36
- >
37
-
38
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ArchivistParams<TConfig>
39
-
40
- @labeledCreatableModule()
41
- export class ViewArchivist<
42
- TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,
43
- TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,
44
- >
45
- extends AbstractArchivist<TParams, TEventData>
46
- implements ArchivistInstance, ModuleInstance {
47
- static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]
48
- static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema
49
- static override readonly labels = { ...ModuleLimitationViewLabel, [StorageClassLabel]: 'proxy' }
50
-
51
- private _originArchivistInstance?: ArchivistInstance
52
-
53
- get originArchivist() {
54
- return assertEx(this.config.originArchivist, () => 'originArchivist not configured')
55
- }
56
-
57
- override get queries() {
58
- return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]
59
- }
60
-
61
- async originArchivistInstance() {
62
- this._originArchivistInstance
63
- = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))
64
- return this._originArchivistInstance
65
- }
66
-
67
- /** @deprecated use next instead */
68
- protected override allHandler(): Promisable<WithStorageMeta<Payload>[]> {
69
- throw new Error('allHandler is deprecated, use nextHandler instead')
70
- }
71
-
72
- protected override async getHandler(hashes: Hash[]): Promise<WithStorageMeta<Payload>[]> {
73
- return await (await this.originArchivistInstance()).get(hashes)
74
- }
75
-
76
- protected override async nextHandler(options?: ArchivistNextOptions): Promise<WithStorageMeta<Payload>[]> {
77
- return (await (await this.originArchivistInstance()).next?.(options)) ?? []
78
- }
79
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './ViewArchivist.ts'