@xyo-network/diviner-jsonpatch-model 6.1.0 → 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.
@@ -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,EAAE,MAAM,GAAG;IA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C,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,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: 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 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": ";AACA,SAAS,YAAAA,iBAAgB;;;ACDzB,SAAS,gBAAgB;AAElB,IAAM,yBAET,SAAS,iCAAiC,IAAI;;;ADE3C,IAAM,+BAETC,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.1.0",
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,27 +34,27 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/diviner-model": "~6.1.0",
38
- "@xyo-network/module-model": "~6.1.0"
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.1.0",
49
- "@xylabs/sdk-js": "^6.1.0",
50
- "@xylabs/threads": "^6.1.0",
48
+ "@xylabs/geo": "^6.1.1",
49
+ "@xylabs/sdk-js": "^6.1.1",
50
+ "@xylabs/threads": "^6.1.1",
51
51
  "@xylabs/toolchain": "^8.1.20",
52
52
  "@xylabs/tsconfig": "^8.1.20",
53
- "@xyo-network/sdk-protocol-js": "^6.1.0",
53
+ "@xyo-network/sdk-protocol-js": "~7.0",
54
54
  "ajv": "^8.20.0",
55
55
  "async-mutex": "^0.5.0",
56
56
  "debug": "~4.4.3",
57
- "eslint": "^10.4.1",
57
+ "eslint": "^10.5.0",
58
58
  "ethers": "^6.16.0",
59
59
  "fast-json-patch": "~3.1.1",
60
60
  "hash-wasm": "~4.12.0",
@@ -75,7 +75,7 @@
75
75
  "@xylabs/geo": "^6.0",
76
76
  "@xylabs/sdk-js": "^6.0",
77
77
  "@xylabs/threads": "^6.0",
78
- "@xyo-network/sdk-protocol-js": "^6.1",
78
+ "@xyo-network/sdk-protocol-js": "^7.0",
79
79
  "ajv": "^8.20",
80
80
  "async-mutex": "^0.5",
81
81
  "debug": "~4.4",