@xyo-network/diviner-transform-memory 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-memory",
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,50 @@
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-transform-abstract": "~5.3.20",
40
- "@xyo-network/diviner-transform-model": "~5.3.20",
41
- "@xyo-network/payload-model": "~5.3.20",
42
- "@xyo-network/value-payload-plugin": "~5.3.20",
43
- "jsonpath": "~1.3.0"
39
+ "jsonpath": "~1.3.0",
40
+ "@xyo-network/diviner-transform-abstract": "~5.3.24",
41
+ "@xyo-network/diviner-transform-model": "~5.3.24",
42
+ "@xyo-network/payload-model": "~5.3.24",
43
+ "@xyo-network/value-payload-plugin": "~5.3.24"
44
44
  },
45
45
  "devDependencies": {
46
+ "@opentelemetry/api": "^1.9.1",
46
47
  "@types/jsonpath": "~0.2.4",
47
- "@xylabs/sdk-js": "^5.0.90",
48
- "@xylabs/ts-scripts-common": "~7.5.6",
49
- "@xylabs/ts-scripts-yarn3": "~7.5.6",
50
- "@xylabs/tsconfig": "~7.5.6",
51
- "@xylabs/vitest-extended": "~5.0.90",
52
- "@xyo-network/account": "~5.3.20",
48
+ "@types/node": "^25.5.0",
49
+ "@xylabs/sdk-js": "^5.0.93",
50
+ "@xylabs/ts-scripts-common": "~7.6.16",
51
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
52
+ "@xylabs/tsconfig": "~7.6.16",
53
+ "@xylabs/vitest-extended": "~5.0.93",
54
+ "acorn": "^8.16.0",
55
+ "axios": "^1.14.0",
56
+ "esbuild": "^0.28.0",
57
+ "ethers": "^6.16.0",
58
+ "jsonpath": "~1.3.0",
59
+ "tslib": "^2.8.1",
53
60
  "typescript": "~5.9.3",
61
+ "vite": "^8.0.3",
54
62
  "vitest": "~4.1.2",
55
- "zod": "^4.3.6"
63
+ "zod": "^4.3.6",
64
+ "@xyo-network/account": "~5.3.24",
65
+ "@xyo-network/diviner-transform-abstract": "~5.3.24",
66
+ "@xyo-network/payload-model": "~5.3.24",
67
+ "@xyo-network/diviner-transform-model": "~5.3.24",
68
+ "@xyo-network/value-payload-plugin": "~5.3.24"
56
69
  },
57
70
  "peerDependencies": {
58
71
  "@xylabs/sdk-js": "^5",
72
+ "ethers": "^6",
73
+ "tslib": "^2.8.1",
59
74
  "zod": "^4"
60
75
  },
61
76
  "publishConfig": {
62
77
  "access": "public"
63
78
  }
64
- }
79
+ }
package/src/Diviner.ts DELETED
@@ -1,36 +0,0 @@
1
- import type { TransformDivinerParams } from '@xyo-network/diviner-transform-abstract'
2
- import { AbstractTransformDiviner } from '@xyo-network/diviner-transform-abstract'
3
- import type { PayloadTransformer, Transform } from '@xyo-network/diviner-transform-model'
4
- import { TransformDivinerConfigSchema } from '@xyo-network/diviner-transform-model'
5
- import type { Payload, Schema } from '@xyo-network/payload-model'
6
- import { ValueSchema } from '@xyo-network/value-payload-plugin'
7
- import jsonpath from 'jsonpath'
8
-
9
- const getJsonPathTransformer = <TSource extends Payload = Payload, TDestination extends Payload = Payload>(
10
- transform: Transform,
11
- ): PayloadTransformer<TSource, TDestination> => {
12
- const transformer: PayloadTransformer<TSource, TDestination> = (source: TSource) => {
13
- const value = Object.fromEntries(
14
- Object.entries(transform.transform).map(([key, pathExpression]) => {
15
- const value = jsonpath.value(source, pathExpression)
16
- return [key, value]
17
- }),
18
- )
19
- // TODO: Render this cast unnecessary
20
- return { schema: ValueSchema, value } as unknown as TDestination
21
- }
22
- return transformer
23
- }
24
-
25
- export class MemoryTransformDiviner<
26
- TParams extends TransformDivinerParams = TransformDivinerParams,
27
- TIn extends Payload = Payload,
28
- TOut extends Payload = Payload,
29
- > extends AbstractTransformDiviner<TParams, TIn, TOut> {
30
- static override readonly configSchemas: Schema[] = [...super.configSchemas, TransformDivinerConfigSchema]
31
- static override readonly defaultConfigSchema: Schema = TransformDivinerConfigSchema
32
-
33
- protected override transformer(transform: Transform) {
34
- return getJsonPathTransformer<TIn, TOut>(transform)
35
- }
36
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Diviner.ts'