@xyo-network/diviner-transform-abstract 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/diviner-transform-abstract",
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,31 +30,45 @@
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/diviner-abstract": "~5.3.20",
40
- "@xyo-network/diviner-model": "~5.3.20",
41
- "@xyo-network/diviner-transform-model": "~5.3.20",
42
- "@xyo-network/module-model": "~5.3.20",
43
- "@xyo-network/payload-model": "~5.3.20"
39
+ "@xyo-network/diviner-model": "~5.3.24",
40
+ "@xyo-network/diviner-transform-model": "~5.3.24",
41
+ "@xyo-network/diviner-abstract": "~5.3.24",
42
+ "@xyo-network/module-model": "~5.3.24",
43
+ "@xyo-network/payload-model": "~5.3.24"
44
44
  },
45
45
  "devDependencies": {
46
- "@xylabs/sdk-js": "^5.0.90",
47
- "@xylabs/ts-scripts-common": "~7.5.6",
48
- "@xylabs/ts-scripts-yarn3": "~7.5.6",
49
- "@xylabs/tsconfig": "~7.5.6",
46
+ "@opentelemetry/api": "^1.9.1",
47
+ "@types/node": "^25.5.0",
48
+ "@xylabs/sdk-js": "^5.0.93",
49
+ "@xylabs/ts-scripts-common": "~7.6.16",
50
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
51
+ "@xylabs/tsconfig": "~7.6.16",
52
+ "acorn": "^8.16.0",
53
+ "axios": "^1.14.0",
54
+ "esbuild": "^0.28.0",
55
+ "ethers": "^6.16.0",
56
+ "tslib": "^2.8.1",
50
57
  "typescript": "~5.9.3",
51
- "zod": "^4.3.6"
58
+ "zod": "^4.3.6",
59
+ "@xyo-network/diviner-model": "~5.3.24",
60
+ "@xyo-network/diviner-abstract": "~5.3.24",
61
+ "@xyo-network/diviner-transform-model": "~5.3.24",
62
+ "@xyo-network/module-model": "~5.3.24",
63
+ "@xyo-network/payload-model": "~5.3.24"
52
64
  },
53
65
  "peerDependencies": {
54
66
  "@xylabs/sdk-js": "^5",
67
+ "ethers": "^6",
68
+ "tslib": "^2.8.1",
55
69
  "zod": "^4"
56
70
  },
57
71
  "publishConfig": {
58
72
  "access": "public"
59
73
  }
60
- }
74
+ }
package/src/Diviner.ts DELETED
@@ -1,41 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/diviner-abstract'
2
- import type {
3
- DivinerInstance, DivinerModuleEventData, DivinerParams,
4
- } from '@xyo-network/diviner-model'
5
- import type {
6
- PayloadTransformer,
7
- Transform,
8
- TransformDivinerConfig,
9
- } from '@xyo-network/diviner-transform-model'
10
- import {
11
- TransformDivinerConfigSchema,
12
- TransformDivinerSchema,
13
- } from '@xyo-network/diviner-transform-model'
14
- import type { AnyConfigSchema } from '@xyo-network/module-model'
15
- import type { Payload, Schema } from '@xyo-network/payload-model'
16
-
17
- export type TransformDivinerParams = DivinerParams<AnyConfigSchema<TransformDivinerConfig>>
18
-
19
- export abstract class AbstractTransformDiviner<
20
- TParams extends TransformDivinerParams = TransformDivinerParams,
21
- TIn extends Payload = Payload,
22
- TOut extends Payload = Payload,
23
- TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<
24
- DivinerInstance<TParams, TIn, TOut>,
25
- TIn,
26
- TOut
27
- >,
28
- > extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
29
- static override readonly configSchemas: Schema[] = [...super.configSchemas, TransformDivinerConfigSchema]
30
- static override readonly defaultConfigSchema: Schema = TransformDivinerConfigSchema
31
-
32
- protected override divineHandler(payloads?: TIn[]): TOut[] {
33
- const transforms: Transform[] = []
34
- if (this.config.transform) {
35
- transforms.push({ schema: TransformDivinerSchema, transform: this.config.transform })
36
- }
37
- return transforms.flatMap(transform => payloads?.map(this.transformer(transform)) || [])
38
- }
39
-
40
- protected abstract transformer(transform: Transform): PayloadTransformer<TIn, TOut>
41
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Diviner.ts'