@xyo-network/diviner-jsonpatch-model 6.0.4 → 7.0.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.
package/README.md CHANGED
@@ -38,10 +38,12 @@ bun add {{name}}
38
38
 
39
39
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
40
 
41
+ ## Credits
41
42
 
43
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
42
44
 
43
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
44
45
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/diviner-jsonpatch-model.svg
45
46
  [npm-link]: https://www.npmjs.com/package/@xyo-network/diviner-jsonpatch-model
46
47
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/diviner-jsonpatch-model.svg
47
48
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
49
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
@@ -1,9 +1,20 @@
1
+ import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
1
2
  import type { DivinerConfig } from '@xyo-network/diviner-model';
3
+ import { DivinerConfigZod } from '@xyo-network/diviner-model';
2
4
  import type { Operation } from 'fast-json-patch';
5
+ import * as z from 'zod/mini';
3
6
  export declare const JsonPatchDivinerConfigSchema: string & {
4
7
  readonly __schema: true;
5
8
  };
6
9
  export type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema;
10
+ export declare const JsonPatchDivinerConfigZod: z.ZodMiniObject<Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {
11
+ operations: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<Operation, Operation>>>;
12
+ schema: z.ZodMiniLiteral<JsonPatchDivinerConfigSchema>;
13
+ }, z.core.$strip>;
14
+ export type JsonPatchDivinerConfigBase = z.infer<typeof JsonPatchDivinerConfigZod>;
15
+ export declare const isJsonPatchDivinerConfig: ReturnType<typeof zodIsFactory<JsonPatchDivinerConfigBase>>;
16
+ export declare const asJsonPatchDivinerConfig: ReturnType<typeof zodAsFactory<JsonPatchDivinerConfigBase>>;
17
+ export declare const toJsonPatchDivinerConfig: ReturnType<typeof zodToFactory<JsonPatchDivinerConfigBase>>;
7
18
  export type JsonPatchDivinerConfig = DivinerConfig<{
8
19
  operations?: Operation[];
9
20
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAIhD,eAAO,MAAM,4BAA4B;;CAAqD,CAAA;AAC9F,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAS9E,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IAAE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,4BAA4B,EAAE,MAAM,GAAG;IAClD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC6B,CAAA;AACtD,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAS9E,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,aAAa,CACrD,IAAI,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAAG;IACnD,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACpF,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAA;CACvD,EACD,CAAC,CAAC,IAAI,CAAC,MAAM,CAIb,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAElF,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,0BAA0B,CAAC,CAA2C,CAAA;AAC5I,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,0BAA0B,CAAC,CAAuE,CAAA;AACxK,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,0BAA0B,CAAC,CAAuE,CAAA;AAExK,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IAAE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- export declare const JsonPatchDivinerSchema: "network.xyo.diviner.jsonpatch" & {
1
+ export declare const JsonPatchDivinerSchema: 'network.xyo.diviner.jsonpatch' & {
2
2
  readonly __schema: true;
3
3
  };
4
4
  export type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAAkD,CAAA;AACrF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,EAAE,+BAA+B,GAAG;IACrE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC0B,CAAA;AACnD,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA"}
@@ -1,5 +1,12 @@
1
1
  // src/Config.ts
2
+ import {
3
+ zodAsFactory,
4
+ zodIsFactory,
5
+ zodToFactory
6
+ } from "@xylabs/sdk-js";
7
+ import { DivinerConfigZod } from "@xyo-network/diviner-model";
2
8
  import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol-js";
9
+ import * as z from "zod/mini";
3
10
 
4
11
  // src/Schema.ts
5
12
  import { asSchema } from "@xyo-network/sdk-protocol-js";
@@ -7,8 +14,19 @@ var JsonPatchDivinerSchema = asSchema("network.xyo.diviner.jsonpatch", true);
7
14
 
8
15
  // src/Config.ts
9
16
  var JsonPatchDivinerConfigSchema = asSchema2(`${JsonPatchDivinerSchema}.config`, true);
17
+ var JsonPatchDivinerConfigZod = z.extend(DivinerConfigZod, {
18
+ operations: z.optional(z.array(z.custom())),
19
+ schema: z.literal(JsonPatchDivinerConfigSchema)
20
+ });
21
+ var isJsonPatchDivinerConfig = zodIsFactory(JsonPatchDivinerConfigZod);
22
+ var asJsonPatchDivinerConfig = zodAsFactory(JsonPatchDivinerConfigZod, "asJsonPatchDivinerConfig");
23
+ var toJsonPatchDivinerConfig = zodToFactory(JsonPatchDivinerConfigZod, "toJsonPatchDivinerConfig");
10
24
  export {
11
25
  JsonPatchDivinerConfigSchema,
12
- JsonPatchDivinerSchema
26
+ JsonPatchDivinerConfigZod,
27
+ JsonPatchDivinerSchema,
28
+ asJsonPatchDivinerConfig,
29
+ isJsonPatchDivinerConfig,
30
+ toJsonPatchDivinerConfig
13
31
  };
14
32
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Config.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\nimport type { Operation } from 'fast-json-patch'\n\nimport { JsonPatchDivinerSchema } from './Schema.ts'\n\nexport const JsonPatchDivinerConfigSchema = asSchema(`${JsonPatchDivinerSchema}.config`, true)\nexport type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema\n\n// TODO: Export our own compatible Operation type to hide implementation details\n// export interface Operation {\n// op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test'\n// path: string\n// value?: JsonValue\n// }\n\nexport type JsonPatchDivinerConfig = DivinerConfig<{ operations?: Operation[] } & { schema: JsonPatchDivinerConfigSchema }>\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const JsonPatchDivinerSchema = asSchema('network.xyo.diviner.jsonpatch', true)\nexport type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema\n"],
5
- "mappings": ";AACA,SAAS,YAAAA,iBAAgB;;;ACDzB,SAAS,gBAAgB;AAElB,IAAM,yBAAyB,SAAS,iCAAiC,IAAI;;;ADI7E,IAAM,+BAA+BC,UAAS,GAAG,sBAAsB,WAAW,IAAI;",
4
+ "sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\nimport type { Operation } from 'fast-json-patch'\nimport * as z from 'zod/mini'\n\nimport { JsonPatchDivinerSchema } from './Schema.ts'\n\nexport const JsonPatchDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${JsonPatchDivinerSchema}.config`, true)\nexport type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema\n\n// TODO: Export our own compatible Operation type to hide implementation details\n// export interface Operation {\n// op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test'\n// path: string\n// value?: JsonValue\n// }\n\nexport const JsonPatchDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n operations: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<Operation, Operation>>>\n schema: z.ZodMiniLiteral<JsonPatchDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n operations: z.optional(z.array(z.custom<Operation>())),\n schema: z.literal(JsonPatchDivinerConfigSchema),\n})\n\nexport type JsonPatchDivinerConfigBase = z.infer<typeof JsonPatchDivinerConfigZod>\n\nexport const isJsonPatchDivinerConfig: ReturnType<typeof zodIsFactory<JsonPatchDivinerConfigBase>> = zodIsFactory(JsonPatchDivinerConfigZod)\nexport const asJsonPatchDivinerConfig: ReturnType<typeof zodAsFactory<JsonPatchDivinerConfigBase>> = zodAsFactory(JsonPatchDivinerConfigZod, 'asJsonPatchDivinerConfig')\nexport const toJsonPatchDivinerConfig: ReturnType<typeof zodToFactory<JsonPatchDivinerConfigBase>> = zodToFactory(JsonPatchDivinerConfigZod, 'toJsonPatchDivinerConfig')\n\nexport type JsonPatchDivinerConfig = DivinerConfig<{ operations?: Operation[] } & { schema: JsonPatchDivinerConfigSchema }>\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const JsonPatchDivinerSchema: 'network.xyo.diviner.jsonpatch' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.jsonpatch', true)\nexport type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema\n"],
5
+ "mappings": ";AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AACjC,SAAS,YAAAA,iBAAgB;AAEzB,YAAY,OAAO;;;ACPnB,SAAS,gBAAgB;AAElB,IAAM,yBAET,SAAS,iCAAiC,IAAI;;;ADO3C,IAAM,+BAETC,UAAS,GAAG,sBAAsB,WAAW,IAAI;AAU9C,IAAM,4BAMP,SAAO,kBAAkB;AAAA,EAC7B,YAAc,WAAW,QAAQ,SAAkB,CAAC,CAAC;AAAA,EACrD,QAAU,UAAQ,4BAA4B;AAChD,CAAC;AAIM,IAAM,2BAAwF,aAAa,yBAAyB;AACpI,IAAM,2BAAwF,aAAa,2BAA2B,0BAA0B;AAChK,IAAM,2BAAwF,aAAa,2BAA2B,0BAA0B;",
6
6
  "names": ["asSchema", "asSchema"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpatch-model",
3
- "version": "6.0.4",
3
+ "version": "7.0.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,29 +34,27 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/diviner-model": "~6.0.4",
38
- "@xyo-network/module-model": "~6.0.4"
37
+ "@xyo-network/diviner-model": "~7.0.0",
38
+ "@xyo-network/module-model": "~7.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@bitauth/libauth": "~3.0.0",
42
42
  "@metamask/providers": "^22.1.1",
43
43
  "@noble/post-quantum": "~0.6.1",
44
44
  "@opentelemetry/api": "^1.9.1",
45
- "@opentelemetry/sdk-trace-base": "^2.7.1",
45
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
46
46
  "@scure/base": "~2.2.0",
47
47
  "@scure/bip39": "~2.2.0",
48
- "@xylabs/geo": "^6.0.8",
49
- "@xylabs/sdk-js": "^6.0.8",
50
- "@xylabs/threads": "^6.0.8",
51
- "@xylabs/toolchain": "~8.1.16",
52
- "@xylabs/tsconfig": "~8.1.16",
53
- "@xyo-network/sdk-protocol-js": "~6.0.9",
48
+ "@xylabs/geo": "^6.1.1",
49
+ "@xylabs/sdk-js": "^6.1.1",
50
+ "@xylabs/threads": "^6.1.1",
51
+ "@xylabs/toolchain": "^8.1.20",
52
+ "@xylabs/tsconfig": "^8.1.20",
53
+ "@xyo-network/sdk-protocol-js": "~7.0",
54
54
  "ajv": "^8.20.0",
55
55
  "async-mutex": "^0.5.0",
56
- "bn.js": "^5.2.3",
57
- "buffer": "^6.0.3",
58
56
  "debug": "~4.4.3",
59
- "eslint": "^10.4.1",
57
+ "eslint": "^10.5.0",
60
58
  "ethers": "^6.16.0",
61
59
  "fast-json-patch": "~3.1.1",
62
60
  "hash-wasm": "~4.12.0",
@@ -77,11 +75,9 @@
77
75
  "@xylabs/geo": "^6.0",
78
76
  "@xylabs/sdk-js": "^6.0",
79
77
  "@xylabs/threads": "^6.0",
80
- "@xyo-network/sdk-protocol-js": "~6.0",
78
+ "@xyo-network/sdk-protocol-js": "^7.0",
81
79
  "ajv": "^8.20",
82
80
  "async-mutex": "^0.5",
83
- "bn.js": "^5.2",
84
- "buffer": "^6.0",
85
81
  "debug": "~4.4",
86
82
  "ethers": "^6.16",
87
83
  "fast-json-patch": "~3.1",
@@ -91,6 +87,9 @@
91
87
  "webextension-polyfill": "^0.12",
92
88
  "zod": "^4.4"
93
89
  },
90
+ "engines": {
91
+ "node": "^24"
92
+ },
94
93
  "publishConfig": {
95
94
  "access": "public"
96
95
  }