@xyo-network/diviner-schema-stats 7.0.1 → 7.0.2
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/dist/neutral/Config.d.ts +2 -2
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/MemorySchemaStatsDiviner.d.ts +1 -1
- package/dist/neutral/MemorySchemaStatsDiviner.d.ts.map +1 -1
- package/dist/neutral/Payload.d.ts +1 -1
- package/dist/neutral/Payload.d.ts.map +1 -1
- package/dist/neutral/Query.d.ts +2 -2
- package/dist/neutral/Query.d.ts.map +1 -1
- package/dist/neutral/SchemaStatsDiviner.d.ts +1 -1
- package/dist/neutral/SchemaStatsDiviner.d.ts.map +1 -1
- package/dist/neutral/abstract.mjs.map +1 -1
- package/dist/neutral/index.mjs +10 -10
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/memory.mjs +8 -8
- package/dist/neutral/memory.mjs.map +1 -1
- package/dist/neutral/model.mjs +7 -7
- package/dist/neutral/model.mjs.map +1 -1
- package/package.json +13 -13
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk
|
|
1
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk';
|
|
2
2
|
import type { DivinerConfig } from '@xyo-network/diviner-model';
|
|
3
3
|
import { DivinerConfigZod } from '@xyo-network/diviner-model';
|
|
4
|
-
import { type Payload } from '@xyo-network/sdk-protocol
|
|
4
|
+
import { type Payload } from '@xyo-network/sdk-protocol';
|
|
5
5
|
import * as z from 'zod/mini';
|
|
6
6
|
export declare const SchemaStatsDivinerConfigSchema: string & {
|
|
7
7
|
readonly __schema: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YA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/E,CAAC,GAAG;IACF,MAAM,EAAE,8BAA8B,CAAA;CACvC,CACF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Payload, type Schema, type XyoAddress } from '@xyo-network/sdk-protocol
|
|
1
|
+
import { type Payload, type Schema, type XyoAddress } from '@xyo-network/sdk-protocol';
|
|
2
2
|
import type { SchemaStatsDivinerParams } from './Params.ts';
|
|
3
3
|
import { SchemaStatsDiviner } from './SchemaStatsDiviner.ts';
|
|
4
4
|
export declare class MemorySchemaStatsDiviner<TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams> extends SchemaStatsDiviner<TParams> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemorySchemaStatsDiviner.d.ts","sourceRoot":"","sources":["../../src/MemorySchemaStatsDiviner.ts"],"names":[],"mappings":"AAEA,OAAO,EACU,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAC1D,MAAM,
|
|
1
|
+
{"version":3,"file":"MemorySchemaStatsDiviner.d.ts","sourceRoot":"","sources":["../../src/MemorySchemaStatsDiviner.ts"],"names":[],"mappings":"AAEA,OAAO,EACU,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAC1D,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAK3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,qBAAa,wBAAwB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CAAE,SAAQ,kBAAkB,CAAC,OAAO,CAAC;IAC5I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;cAErE,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;cAiBnE,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;cAc5C,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAYjF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk
|
|
1
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk';
|
|
2
2
|
import * as z from 'zod/mini';
|
|
3
3
|
import { SchemaStatsDivinerSchema } from './Schema.ts';
|
|
4
4
|
export declare const SchemaStatsPayloadZod: z.ZodMiniObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAEtD,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,aAAa,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;IACxE,IAAI,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;IAChD,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAA;CACnD,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAId,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kBAAkB,CAAC,CAAuC,CAAA;AAC5H,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kBAAkB,CAAC,CAA+D,CAAA;AACpJ,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kBAAkB,CAAC,CAA+D,CAAA"}
|
package/dist/neutral/Query.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk
|
|
2
|
-
import { QueryFieldsZod } from '@xyo-network/sdk-protocol
|
|
1
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk';
|
|
2
|
+
import { QueryFieldsZod } from '@xyo-network/sdk-protocol';
|
|
3
3
|
import * as z from 'zod/mini';
|
|
4
4
|
export declare const SchemaStatsQuerySchema: string & {
|
|
5
5
|
readonly __schema: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,aAAa,CAAA;AACpB,OAAO,EACyB,cAAc,EAC7C,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,sBAAsB,EAAE,MAAM,GAAG;IAC5C,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC8B,CAAA;AACvD,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,aAAa,CACpD;IAAE,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAA;CAAE,GACpD,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,CAAC,EAClC,CAAC,CAAC,IAAI,CAAC,MAAM,CACsE,CAAA;AAErF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,uBAAuB,CAAC,CAA4C,CAAA;AAC3I,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,uBAAuB,CAAC,CAAyE,CAAA;AACxK,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,uBAAuB,CAAC,CAAyE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
2
2
|
import type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
3
|
-
import type { Payload } from '@xyo-network/sdk-protocol
|
|
3
|
+
import type { Payload } from '@xyo-network/sdk-protocol';
|
|
4
4
|
import type { SchemaStatsDivinerParams } from './Params.ts';
|
|
5
5
|
export declare abstract class SchemaStatsDiviner<TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaStatsDiviner.d.ts","sourceRoot":"","sources":["../../src/SchemaStatsDiviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SchemaStatsDiviner.d.ts","sourceRoot":"","sources":["../../src/SchemaStatsDiviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAE3D,8BAAsB,kBAAkB,CACtC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,EACnE,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SchemaStatsDiviner.ts"],
|
|
4
|
-
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol
|
|
4
|
+
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol'\n\nimport type { SchemaStatsDivinerParams } from './Params.ts'\n\nexport abstract class SchemaStatsDiviner<\n TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,uBAAuB;AAMzB,IAAe,qBAAf,cASG,gBAAgD;AAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -4,24 +4,24 @@ var SchemaStatsDiviner = class extends AbstractDiviner {
|
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
// src/MemorySchemaStatsDiviner.ts
|
|
7
|
-
import { assertEx } from "@xylabs/sdk
|
|
8
|
-
import { isBoundWitness, PayloadBuilder } from "@xyo-network/sdk-protocol
|
|
7
|
+
import { assertEx } from "@xylabs/sdk";
|
|
8
|
+
import { isBoundWitness, PayloadBuilder } from "@xyo-network/sdk-protocol";
|
|
9
9
|
import {
|
|
10
10
|
isStorageMeta
|
|
11
|
-
} from "@xyo-network/sdk-protocol
|
|
11
|
+
} from "@xyo-network/sdk-protocol";
|
|
12
12
|
|
|
13
13
|
// src/Config.ts
|
|
14
14
|
import {
|
|
15
15
|
zodAsFactory,
|
|
16
16
|
zodIsFactory,
|
|
17
17
|
zodToFactory
|
|
18
|
-
} from "@xylabs/sdk
|
|
18
|
+
} from "@xylabs/sdk";
|
|
19
19
|
import { DivinerConfigZod } from "@xyo-network/diviner-model";
|
|
20
|
-
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol
|
|
20
|
+
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol";
|
|
21
21
|
import * as z from "zod/mini";
|
|
22
22
|
|
|
23
23
|
// src/Schema.ts
|
|
24
|
-
import { asSchema } from "@xyo-network/sdk-protocol
|
|
24
|
+
import { asSchema } from "@xyo-network/sdk-protocol";
|
|
25
25
|
var SchemaStatsDivinerSchema = asSchema("network.xyo.diviner.schema.stats", true);
|
|
26
26
|
|
|
27
27
|
// src/Config.ts
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
zodAsFactory as zodAsFactory2,
|
|
37
37
|
zodIsFactory as zodIsFactory2,
|
|
38
38
|
zodToFactory as zodToFactory2
|
|
39
|
-
} from "@xylabs/sdk
|
|
39
|
+
} from "@xylabs/sdk";
|
|
40
40
|
import {
|
|
41
41
|
asSchema as asSchema3,
|
|
42
42
|
PayloadZodOfSchema,
|
|
43
43
|
QueryFieldsZod
|
|
44
|
-
} from "@xyo-network/sdk-protocol
|
|
44
|
+
} from "@xyo-network/sdk-protocol";
|
|
45
45
|
import * as z2 from "zod/mini";
|
|
46
46
|
var SchemaStatsQuerySchema = asSchema3(`${SchemaStatsDivinerSchema}.query`, true);
|
|
47
47
|
var SchemaStatsQueryPayloadZod = z2.extend(PayloadZodOfSchema(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape });
|
|
@@ -92,8 +92,8 @@ import {
|
|
|
92
92
|
zodAsFactory as zodAsFactory3,
|
|
93
93
|
zodIsFactory as zodIsFactory3,
|
|
94
94
|
zodToFactory as zodToFactory3
|
|
95
|
-
} from "@xylabs/sdk
|
|
96
|
-
import { PayloadZodOfSchema as PayloadZodOfSchema2 } from "@xyo-network/sdk-protocol
|
|
95
|
+
} from "@xylabs/sdk";
|
|
96
|
+
import { PayloadZodOfSchema as PayloadZodOfSchema2 } from "@xyo-network/sdk-protocol";
|
|
97
97
|
import * as z3 from "zod/mini";
|
|
98
98
|
var SchemaStatsPayloadZod = z3.extend(PayloadZodOfSchema2(SchemaStatsDivinerSchema), {
|
|
99
99
|
count: z3.record(z3.string(), z3.number()),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SchemaStatsDiviner.ts", "../../src/MemorySchemaStatsDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts", "../../src/Query.ts", "../../src/Payload.ts"],
|
|
4
|
-
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol
|
|
4
|
+
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol'\n\nimport type { SchemaStatsDivinerParams } from './Params.ts'\n\nexport abstract class SchemaStatsDiviner<\n TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n", "import { assertEx } from '@xylabs/sdk'\nimport { isBoundWitness, PayloadBuilder } from '@xyo-network/sdk-protocol'\nimport {\n isStorageMeta, type Payload, type Schema, type XyoAddress,\n} from '@xyo-network/sdk-protocol'\n\nimport { SchemaStatsDivinerConfigSchema } from './Config.ts'\nimport type { SchemaStatsDivinerParams } from './Params.ts'\nimport type { SchemaStatsPayload } from './Payload.ts'\nimport type { SchemaStatsQueryPayload } from './Query.ts'\nimport { isSchemaStatsQueryPayload } from './Query.ts'\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\nimport { SchemaStatsDiviner } from './SchemaStatsDiviner.ts'\n\nexport class MemorySchemaStatsDiviner<TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams> extends SchemaStatsDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, SchemaStatsDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = SchemaStatsDivinerConfigSchema\n\n protected async divineAddress(address: XyoAddress): Promise<Record<string, number>> {\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const all = await archivist.next({ limit: 20_000 })\n const filtered = all\n .filter(x => isBoundWitness(x) && isStorageMeta(x))\n .filter(bw => bw.addresses.includes(address))\n\n const counts: Record<string, number> = filtered.reduce(\n (acc, payload) => {\n acc[payload.schema] = acc[payload.schema] ? acc[payload.schema] + 1 : 1\n return acc\n },\n {} as Record<string, number>,\n )\n return counts\n }\n\n protected async divineAllAddresses(): Promise<Record<string, number>> {\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const all = await archivist.next({ limit: 20_000 })\n\n const counts: Record<string, number> = all.reduce(\n (acc, payload) => {\n acc[payload.schema] = acc[payload.schema] ? acc[payload.schema] + 1 : 1\n return acc\n },\n {} as Record<string, number>,\n )\n return counts\n }\n\n protected override async divineHandler(payloads?: Payload[]): Promise<Payload[]> {\n const query = payloads?.find<SchemaStatsQueryPayload>(isSchemaStatsQueryPayload)\n if (!query) return []\n const addresses\n = query?.address\n ? Array.isArray(query?.address)\n ? query.address\n : [query.address]\n : undefined\n const counts = addresses ? await Promise.all(addresses.map(address => this.divineAddress(address))) : [await this.divineAllAddresses()]\n return counts.map(count => new PayloadBuilder<SchemaStatsPayload>({ schema: SchemaStatsDivinerSchema }).fields({ count }).build())\n }\n}\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.config`, true)\nexport type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema\n\nexport const SchemaStatsDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<SchemaStatsDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, { schema: z.literal(SchemaStatsDivinerConfigSchema) })\n\nexport type SchemaStatsDivinerConfigBase = z.infer<typeof SchemaStatsDivinerConfigZod>\n\nexport const isSchemaStatsDivinerConfig: ReturnType<typeof zodIsFactory<SchemaStatsDivinerConfigBase>> = zodIsFactory(SchemaStatsDivinerConfigZod)\nexport const asSchemaStatsDivinerConfig: ReturnType<typeof zodAsFactory<SchemaStatsDivinerConfigBase>> = zodAsFactory(SchemaStatsDivinerConfigZod, 'asSchemaStatsDivinerConfig')\nexport const toSchemaStatsDivinerConfig: ReturnType<typeof zodToFactory<SchemaStatsDivinerConfigBase>> = zodToFactory(SchemaStatsDivinerConfigZod, 'toSchemaStatsDivinerConfig')\n\nexport type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: SchemaStatsDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nexport const SchemaStatsDivinerSchema: 'network.xyo.diviner.schema.stats' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.schema.stats', true)\nexport type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport {\n asSchema, PayloadZodOfSchema, QueryFieldsZod,\n} from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.query`, true)\nexport type SchemaStatsQuerySchema = typeof SchemaStatsQuerySchema\n\nexport const SchemaStatsQueryPayloadZod: z.ZodMiniObject<\n & { schema: z.ZodMiniLiteral<SchemaStatsQuerySchema> }\n & (typeof QueryFieldsZod)['shape'],\n z.core.$strip\n> = z.extend(PayloadZodOfSchema(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape })\n\nexport type SchemaStatsQueryPayload = z.infer<typeof SchemaStatsQueryPayloadZod>\n\nexport const isSchemaStatsQueryPayload: ReturnType<typeof zodIsFactory<SchemaStatsQueryPayload>> = zodIsFactory(SchemaStatsQueryPayloadZod)\nexport const asSchemaStatsQueryPayload: ReturnType<typeof zodAsFactory<SchemaStatsQueryPayload>> = zodAsFactory(SchemaStatsQueryPayloadZod, 'asSchemaStatsQueryPayload')\nexport const toSchemaStatsQueryPayload: ReturnType<typeof zodToFactory<SchemaStatsQueryPayload>> = zodToFactory(SchemaStatsQueryPayloadZod, 'toSchemaStatsQueryPayload')\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport { PayloadZodOfSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsPayloadZod: z.ZodMiniObject<{\n count: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumber<number>>\n name: z.ZodMiniOptional<z.ZodMiniString<string>>\n schema: z.ZodMiniLiteral<SchemaStatsDivinerSchema>\n}, z.core.$strip> = z.extend(PayloadZodOfSchema(SchemaStatsDivinerSchema), {\n count: z.record(z.string(), z.number()),\n // the name of the schema that the count is for. If name is undefined, then it is the count for all schemas\n name: z.optional(z.string()),\n})\n\nexport type SchemaStatsPayload = z.infer<typeof SchemaStatsPayloadZod>\n\nexport const isSchemaStatsPayload: ReturnType<typeof zodIsFactory<SchemaStatsPayload>> = zodIsFactory(SchemaStatsPayloadZod)\nexport const asSchemaStatsPayload: ReturnType<typeof zodAsFactory<SchemaStatsPayload>> = zodAsFactory(SchemaStatsPayloadZod, 'asSchemaStatsPayload')\nexport const toSchemaStatsPayload: ReturnType<typeof zodToFactory<SchemaStatsPayload>> = zodToFactory(SchemaStatsPayloadZod, 'toSchemaStatsPayload')\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,uBAAuB;AAMzB,IAAe,qBAAf,cASG,gBAAgD;AAAC;;;ACf3D,SAAS,gBAAgB;AACzB,SAAS,gBAAgB,sBAAsB;AAC/C;AAAA,EACE;AAAA,OACK;;;ACJP;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AACjC,SAAS,YAAAA,iBAA8B;AACvC,YAAY,OAAO;;;ACNnB,SAAS,gBAAgB;AAElB,IAAM,2BAET,SAAS,oCAAoC,IAAI;;;ADM9C,IAAM,iCAETC,UAAS,GAAG,wBAAwB,WAAW,IAAI;AAGhD,IAAM,8BAKP,SAAO,kBAAkB,EAAE,QAAU,UAAQ,8BAA8B,EAAE,CAAC;AAI7E,IAAM,6BAA4F,aAAa,2BAA2B;AAC1I,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;AACxK,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;;;AE1B/K;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP;AAAA,EACE,YAAAC;AAAA,EAAU;AAAA,EAAoB;AAAA,OACzB;AACP,YAAYC,QAAO;AAIZ,IAAM,yBAETC,UAAS,GAAG,wBAAwB,UAAU,IAAI;AAG/C,IAAM,6BAIP,UAAO,mBAAmB,sBAAsB,GAAG,EAAE,GAAG,eAAe,MAAM,CAAC;AAI7E,IAAM,4BAAsFC,cAAa,0BAA0B;AACnI,IAAM,4BAAsFC,cAAa,4BAA4B,2BAA2B;AAChK,IAAM,4BAAsFC,cAAa,4BAA4B,2BAA2B;;;AHXhK,IAAM,2BAAN,cAA4G,mBAA4B;AAAA,EAC7I,OA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CAAC,IAAI,CAAC,MAAM,KAAK,mBAAmB,CAAC;AACtI,WAAO,OAAO,IAAI,WAAS,IAAI,eAAmC,EAAE,QAAQ,yBAAyB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC;AAAA,EACnI;AACF;;;AI7DA;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,sBAAAC,2BAA0B;AACnC,YAAYC,QAAO;AAIZ,IAAM,wBAIS,UAAOC,oBAAmB,wBAAwB,GAAG;AAAA,EACzE,OAAS,UAAS,UAAO,GAAK,UAAO,CAAC;AAAA;AAAA,EAEtC,MAAQ,YAAW,UAAO,CAAC;AAC7B,CAAC;AAIM,IAAM,uBAA4EC,cAAa,qBAAqB;AACpH,IAAM,uBAA4EC,cAAa,uBAAuB,sBAAsB;AAC5I,IAAM,uBAA4EC,cAAa,uBAAuB,sBAAsB;",
|
|
6
6
|
"names": ["asSchema", "asSchema", "zodAsFactory", "zodIsFactory", "zodToFactory", "asSchema", "z", "asSchema", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "PayloadZodOfSchema", "z", "PayloadZodOfSchema", "zodIsFactory", "zodAsFactory", "zodToFactory"]
|
|
7
7
|
}
|
package/dist/neutral/memory.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// src/MemorySchemaStatsDiviner.ts
|
|
2
|
-
import { assertEx } from "@xylabs/sdk
|
|
3
|
-
import { isBoundWitness, PayloadBuilder } from "@xyo-network/sdk-protocol
|
|
2
|
+
import { assertEx } from "@xylabs/sdk";
|
|
3
|
+
import { isBoundWitness, PayloadBuilder } from "@xyo-network/sdk-protocol";
|
|
4
4
|
import {
|
|
5
5
|
isStorageMeta
|
|
6
|
-
} from "@xyo-network/sdk-protocol
|
|
6
|
+
} from "@xyo-network/sdk-protocol";
|
|
7
7
|
|
|
8
8
|
// src/Config.ts
|
|
9
9
|
import {
|
|
10
10
|
zodAsFactory,
|
|
11
11
|
zodIsFactory,
|
|
12
12
|
zodToFactory
|
|
13
|
-
} from "@xylabs/sdk
|
|
13
|
+
} from "@xylabs/sdk";
|
|
14
14
|
import { DivinerConfigZod } from "@xyo-network/diviner-model";
|
|
15
|
-
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol
|
|
15
|
+
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol";
|
|
16
16
|
import * as z from "zod/mini";
|
|
17
17
|
|
|
18
18
|
// src/Schema.ts
|
|
19
|
-
import { asSchema } from "@xyo-network/sdk-protocol
|
|
19
|
+
import { asSchema } from "@xyo-network/sdk-protocol";
|
|
20
20
|
var SchemaStatsDivinerSchema = asSchema("network.xyo.diviner.schema.stats", true);
|
|
21
21
|
|
|
22
22
|
// src/Config.ts
|
|
@@ -31,12 +31,12 @@ import {
|
|
|
31
31
|
zodAsFactory as zodAsFactory2,
|
|
32
32
|
zodIsFactory as zodIsFactory2,
|
|
33
33
|
zodToFactory as zodToFactory2
|
|
34
|
-
} from "@xylabs/sdk
|
|
34
|
+
} from "@xylabs/sdk";
|
|
35
35
|
import {
|
|
36
36
|
asSchema as asSchema3,
|
|
37
37
|
PayloadZodOfSchema,
|
|
38
38
|
QueryFieldsZod
|
|
39
|
-
} from "@xyo-network/sdk-protocol
|
|
39
|
+
} from "@xyo-network/sdk-protocol";
|
|
40
40
|
import * as z2 from "zod/mini";
|
|
41
41
|
var SchemaStatsQuerySchema = asSchema3(`${SchemaStatsDivinerSchema}.query`, true);
|
|
42
42
|
var SchemaStatsQueryPayloadZod = z2.extend(PayloadZodOfSchema(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/MemorySchemaStatsDiviner.ts", "../../src/Config.ts", "../../src/Schema.ts", "../../src/Query.ts", "../../src/SchemaStatsDiviner.ts"],
|
|
4
|
-
"sourcesContent": ["import { assertEx } from '@xylabs/sdk
|
|
4
|
+
"sourcesContent": ["import { assertEx } from '@xylabs/sdk'\nimport { isBoundWitness, PayloadBuilder } from '@xyo-network/sdk-protocol'\nimport {\n isStorageMeta, type Payload, type Schema, type XyoAddress,\n} from '@xyo-network/sdk-protocol'\n\nimport { SchemaStatsDivinerConfigSchema } from './Config.ts'\nimport type { SchemaStatsDivinerParams } from './Params.ts'\nimport type { SchemaStatsPayload } from './Payload.ts'\nimport type { SchemaStatsQueryPayload } from './Query.ts'\nimport { isSchemaStatsQueryPayload } from './Query.ts'\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\nimport { SchemaStatsDiviner } from './SchemaStatsDiviner.ts'\n\nexport class MemorySchemaStatsDiviner<TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams> extends SchemaStatsDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, SchemaStatsDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = SchemaStatsDivinerConfigSchema\n\n protected async divineAddress(address: XyoAddress): Promise<Record<string, number>> {\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const all = await archivist.next({ limit: 20_000 })\n const filtered = all\n .filter(x => isBoundWitness(x) && isStorageMeta(x))\n .filter(bw => bw.addresses.includes(address))\n\n const counts: Record<string, number> = filtered.reduce(\n (acc, payload) => {\n acc[payload.schema] = acc[payload.schema] ? acc[payload.schema] + 1 : 1\n return acc\n },\n {} as Record<string, number>,\n )\n return counts\n }\n\n protected async divineAllAddresses(): Promise<Record<string, number>> {\n const archivist = assertEx(await this.archivistInstance(), () => 'Unable to resolve archivist')\n const all = await archivist.next({ limit: 20_000 })\n\n const counts: Record<string, number> = all.reduce(\n (acc, payload) => {\n acc[payload.schema] = acc[payload.schema] ? acc[payload.schema] + 1 : 1\n return acc\n },\n {} as Record<string, number>,\n )\n return counts\n }\n\n protected override async divineHandler(payloads?: Payload[]): Promise<Payload[]> {\n const query = payloads?.find<SchemaStatsQueryPayload>(isSchemaStatsQueryPayload)\n if (!query) return []\n const addresses\n = query?.address\n ? Array.isArray(query?.address)\n ? query.address\n : [query.address]\n : undefined\n const counts = addresses ? await Promise.all(addresses.map(address => this.divineAddress(address))) : [await this.divineAllAddresses()]\n return counts.map(count => new PayloadBuilder<SchemaStatsPayload>({ schema: SchemaStatsDivinerSchema }).fields({ count }).build())\n }\n}\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.config`, true)\nexport type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema\n\nexport const SchemaStatsDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<SchemaStatsDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, { schema: z.literal(SchemaStatsDivinerConfigSchema) })\n\nexport type SchemaStatsDivinerConfigBase = z.infer<typeof SchemaStatsDivinerConfigZod>\n\nexport const isSchemaStatsDivinerConfig: ReturnType<typeof zodIsFactory<SchemaStatsDivinerConfigBase>> = zodIsFactory(SchemaStatsDivinerConfigZod)\nexport const asSchemaStatsDivinerConfig: ReturnType<typeof zodAsFactory<SchemaStatsDivinerConfigBase>> = zodAsFactory(SchemaStatsDivinerConfigZod, 'asSchemaStatsDivinerConfig')\nexport const toSchemaStatsDivinerConfig: ReturnType<typeof zodToFactory<SchemaStatsDivinerConfigBase>> = zodToFactory(SchemaStatsDivinerConfigZod, 'toSchemaStatsDivinerConfig')\n\nexport type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: SchemaStatsDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nexport const SchemaStatsDivinerSchema: 'network.xyo.diviner.schema.stats' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.schema.stats', true)\nexport type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport {\n asSchema, PayloadZodOfSchema, QueryFieldsZod,\n} from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.query`, true)\nexport type SchemaStatsQuerySchema = typeof SchemaStatsQuerySchema\n\nexport const SchemaStatsQueryPayloadZod: z.ZodMiniObject<\n & { schema: z.ZodMiniLiteral<SchemaStatsQuerySchema> }\n & (typeof QueryFieldsZod)['shape'],\n z.core.$strip\n> = z.extend(PayloadZodOfSchema(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape })\n\nexport type SchemaStatsQueryPayload = z.infer<typeof SchemaStatsQueryPayloadZod>\n\nexport const isSchemaStatsQueryPayload: ReturnType<typeof zodIsFactory<SchemaStatsQueryPayload>> = zodIsFactory(SchemaStatsQueryPayloadZod)\nexport const asSchemaStatsQueryPayload: ReturnType<typeof zodAsFactory<SchemaStatsQueryPayload>> = zodAsFactory(SchemaStatsQueryPayloadZod, 'asSchemaStatsQueryPayload')\nexport const toSchemaStatsQueryPayload: ReturnType<typeof zodToFactory<SchemaStatsQueryPayload>> = zodToFactory(SchemaStatsQueryPayloadZod, 'toSchemaStatsQueryPayload')\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol'\n\nimport type { SchemaStatsDivinerParams } from './Params.ts'\n\nexport abstract class SchemaStatsDiviner<\n TParams extends SchemaStatsDivinerParams = SchemaStatsDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB,sBAAsB;AAC/C;AAAA,EACE;AAAA,OACK;;;ACJP;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AACjC,SAAS,YAAAA,iBAA8B;AACvC,YAAY,OAAO;;;ACNnB,SAAS,gBAAgB;AAElB,IAAM,2BAET,SAAS,oCAAoC,IAAI;;;ADM9C,IAAM,iCAETC,UAAS,GAAG,wBAAwB,WAAW,IAAI;AAGhD,IAAM,8BAKP,SAAO,kBAAkB,EAAE,QAAU,UAAQ,8BAA8B,EAAE,CAAC;AAI7E,IAAM,6BAA4F,aAAa,2BAA2B;AAC1I,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;AACxK,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;;;AE1B/K;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP;AAAA,EACE,YAAAC;AAAA,EAAU;AAAA,EAAoB;AAAA,OACzB;AACP,YAAYC,QAAO;AAIZ,IAAM,yBAETC,UAAS,GAAG,wBAAwB,UAAU,IAAI;AAG/C,IAAM,6BAIP,UAAO,mBAAmB,sBAAsB,GAAG,EAAE,GAAG,eAAe,MAAM,CAAC;AAI7E,IAAM,4BAAsFC,cAAa,0BAA0B;AACnI,IAAM,4BAAsFC,cAAa,4BAA4B,2BAA2B;AAChK,IAAM,4BA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M,QAAQ,OAAO,OAAO,IAC1B,MAAM,UACN,CAAC,MAAM,OAAO,IAChB;AACN,UAAM,SAAS,YAAY,MAAM,QAAQ,IAAI,UAAU,IAAI,aAAW,KAAK,cAAc,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,mBAAmB,CAAC;AACtI,WAAO,OAAO,IAAI,WAAS,IAAI,eAAmC,EAAE,QAAQ,yBAAyB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC;AAAA,EACnI;AACF;",
|
|
6
6
|
"names": ["asSchema", "asSchema", "zodAsFactory", "zodIsFactory", "zodToFactory", "asSchema", "z", "asSchema", "zodIsFactory", "zodAsFactory", "zodToFactory"]
|
|
7
7
|
}
|
package/dist/neutral/model.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
zodAsFactory,
|
|
4
4
|
zodIsFactory,
|
|
5
5
|
zodToFactory
|
|
6
|
-
} from "@xylabs/sdk
|
|
6
|
+
} from "@xylabs/sdk";
|
|
7
7
|
import { DivinerConfigZod } from "@xyo-network/diviner-model";
|
|
8
|
-
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol
|
|
8
|
+
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol";
|
|
9
9
|
import * as z from "zod/mini";
|
|
10
10
|
|
|
11
11
|
// src/Schema.ts
|
|
12
|
-
import { asSchema } from "@xyo-network/sdk-protocol
|
|
12
|
+
import { asSchema } from "@xyo-network/sdk-protocol";
|
|
13
13
|
var SchemaStatsDivinerSchema = asSchema("network.xyo.diviner.schema.stats", true);
|
|
14
14
|
|
|
15
15
|
// src/Config.ts
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
zodAsFactory as zodAsFactory2,
|
|
25
25
|
zodIsFactory as zodIsFactory2,
|
|
26
26
|
zodToFactory as zodToFactory2
|
|
27
|
-
} from "@xylabs/sdk
|
|
28
|
-
import { PayloadZodOfSchema } from "@xyo-network/sdk-protocol
|
|
27
|
+
} from "@xylabs/sdk";
|
|
28
|
+
import { PayloadZodOfSchema } from "@xyo-network/sdk-protocol";
|
|
29
29
|
import * as z2 from "zod/mini";
|
|
30
30
|
var SchemaStatsPayloadZod = z2.extend(PayloadZodOfSchema(SchemaStatsDivinerSchema), {
|
|
31
31
|
count: z2.record(z2.string(), z2.number()),
|
|
@@ -41,12 +41,12 @@ import {
|
|
|
41
41
|
zodAsFactory as zodAsFactory3,
|
|
42
42
|
zodIsFactory as zodIsFactory3,
|
|
43
43
|
zodToFactory as zodToFactory3
|
|
44
|
-
} from "@xylabs/sdk
|
|
44
|
+
} from "@xylabs/sdk";
|
|
45
45
|
import {
|
|
46
46
|
asSchema as asSchema3,
|
|
47
47
|
PayloadZodOfSchema as PayloadZodOfSchema2,
|
|
48
48
|
QueryFieldsZod
|
|
49
|
-
} from "@xyo-network/sdk-protocol
|
|
49
|
+
} from "@xyo-network/sdk-protocol";
|
|
50
50
|
import * as z3 from "zod/mini";
|
|
51
51
|
var SchemaStatsQuerySchema = asSchema3(`${SchemaStatsDivinerSchema}.query`, true);
|
|
52
52
|
var SchemaStatsQueryPayloadZod = z3.extend(PayloadZodOfSchema2(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Config.ts", "../../src/Schema.ts", "../../src/Payload.ts", "../../src/Query.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk
|
|
4
|
+
"sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.config`, true)\nexport type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema\n\nexport const SchemaStatsDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<SchemaStatsDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, { schema: z.literal(SchemaStatsDivinerConfigSchema) })\n\nexport type SchemaStatsDivinerConfigBase = z.infer<typeof SchemaStatsDivinerConfigZod>\n\nexport const isSchemaStatsDivinerConfig: ReturnType<typeof zodIsFactory<SchemaStatsDivinerConfigBase>> = zodIsFactory(SchemaStatsDivinerConfigZod)\nexport const asSchemaStatsDivinerConfig: ReturnType<typeof zodAsFactory<SchemaStatsDivinerConfigBase>> = zodAsFactory(SchemaStatsDivinerConfigZod, 'asSchemaStatsDivinerConfig')\nexport const toSchemaStatsDivinerConfig: ReturnType<typeof zodToFactory<SchemaStatsDivinerConfigBase>> = zodToFactory(SchemaStatsDivinerConfigZod, 'toSchemaStatsDivinerConfig')\n\nexport type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: SchemaStatsDivinerConfigSchema\n }\n>\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nexport const SchemaStatsDivinerSchema: 'network.xyo.diviner.schema.stats' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.schema.stats', true)\nexport type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport { PayloadZodOfSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsPayloadZod: z.ZodMiniObject<{\n count: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumber<number>>\n name: z.ZodMiniOptional<z.ZodMiniString<string>>\n schema: z.ZodMiniLiteral<SchemaStatsDivinerSchema>\n}, z.core.$strip> = z.extend(PayloadZodOfSchema(SchemaStatsDivinerSchema), {\n count: z.record(z.string(), z.number()),\n // the name of the schema that the count is for. If name is undefined, then it is the count for all schemas\n name: z.optional(z.string()),\n})\n\nexport type SchemaStatsPayload = z.infer<typeof SchemaStatsPayloadZod>\n\nexport const isSchemaStatsPayload: ReturnType<typeof zodIsFactory<SchemaStatsPayload>> = zodIsFactory(SchemaStatsPayloadZod)\nexport const asSchemaStatsPayload: ReturnType<typeof zodAsFactory<SchemaStatsPayload>> = zodAsFactory(SchemaStatsPayloadZod, 'asSchemaStatsPayload')\nexport const toSchemaStatsPayload: ReturnType<typeof zodToFactory<SchemaStatsPayload>> = zodToFactory(SchemaStatsPayloadZod, 'toSchemaStatsPayload')\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport {\n asSchema, PayloadZodOfSchema, QueryFieldsZod,\n} from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${SchemaStatsDivinerSchema}.query`, true)\nexport type SchemaStatsQuerySchema = typeof SchemaStatsQuerySchema\n\nexport const SchemaStatsQueryPayloadZod: z.ZodMiniObject<\n & { schema: z.ZodMiniLiteral<SchemaStatsQuerySchema> }\n & (typeof QueryFieldsZod)['shape'],\n z.core.$strip\n> = z.extend(PayloadZodOfSchema(SchemaStatsQuerySchema), { ...QueryFieldsZod.shape })\n\nexport type SchemaStatsQueryPayload = z.infer<typeof SchemaStatsQueryPayloadZod>\n\nexport const isSchemaStatsQueryPayload: ReturnType<typeof zodIsFactory<SchemaStatsQueryPayload>> = zodIsFactory(SchemaStatsQueryPayloadZod)\nexport const asSchemaStatsQueryPayload: ReturnType<typeof zodAsFactory<SchemaStatsQueryPayload>> = zodAsFactory(SchemaStatsQueryPayloadZod, 'asSchemaStatsQueryPayload')\nexport const toSchemaStatsQueryPayload: ReturnType<typeof zodToFactory<SchemaStatsQueryPayload>> = zodToFactory(SchemaStatsQueryPayloadZod, 'toSchemaStatsQueryPayload')\n"],
|
|
5
5
|
"mappings": ";AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AACjC,SAAS,YAAAA,iBAA8B;AACvC,YAAY,OAAO;;;ACNnB,SAAS,gBAAgB;AAElB,IAAM,2BAET,SAAS,oCAAoC,IAAI;;;ADM9C,IAAM,iCAETC,UAAS,GAAG,wBAAwB,WAAW,IAAI;AAGhD,IAAM,8BAKP,SAAO,kBAAkB,EAAE,QAAU,UAAQ,8BAA8B,EAAE,CAAC;AAI7E,IAAM,6BAA4F,aAAa,2BAA2B;AAC1I,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;AACxK,IAAM,6BAA4F,aAAa,6BAA6B,4BAA4B;;;AE1B/K;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,0BAA0B;AACnC,YAAYC,QAAO;AAIZ,IAAM,wBAIS,UAAO,mBAAmB,wBAAwB,GAAG;AAAA,EACzE,OAAS,UAAS,UAAO,GAAK,UAAO,CAAC;AAAA;AAAA,EAEtC,MAAQ,YAAW,UAAO,CAAC;AAC7B,CAAC;AAIM,IAAM,uBAA4EC,cAAa,qBAAqB;AACpH,IAAM,uBAA4EC,cAAa,uBAAuB,sBAAsB;AAC5I,IAAM,uBAA4EC,cAAa,uBAAuB,sBAAsB;;;ACtBnJ;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP;AAAA,EACE,YAAAC;AAAA,EAAU,sBAAAC;AAAA,EAAoB;AAAA,OACzB;AACP,YAAYC,QAAO;AAIZ,IAAM,yBAETC,UAAS,GAAG,wBAAwB,UAAU,IAAI;AAG/C,IAAM,6BAIP,UAAOC,oBAAmB,sBAAsB,GAAG,EAAE,GAAG,eAAe,MAAM,CAAC;AAI7E,IAAM,4BAAsFC,cAAa,0BAA0B;AACnI,IAAM,4BAAsFC,cAAa,4BAA4B,2BAA2B;AAChK,IAAM,4BAAsFC,cAAa,4BAA4B,2BAA2B;",
|
|
6
6
|
"names": ["asSchema", "asSchema", "zodAsFactory", "zodIsFactory", "zodToFactory", "z", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "asSchema", "PayloadZodOfSchema", "z", "asSchema", "PayloadZodOfSchema", "zodIsFactory", "zodAsFactory", "zodToFactory"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-schema-stats",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@xyo-network/diviner-abstract": "~7.0.
|
|
50
|
-
"@xyo-network/diviner-model": "~7.0.
|
|
51
|
-
"@xyo-network/module-model": "~7.0.
|
|
49
|
+
"@xyo-network/diviner-abstract": "~7.0.2",
|
|
50
|
+
"@xyo-network/diviner-model": "~7.0.2",
|
|
51
|
+
"@xyo-network/module-model": "~7.0.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
59
59
|
"@scure/base": "~2.2.0",
|
|
60
60
|
"@scure/bip39": "~2.2.0",
|
|
61
|
-
"@xylabs/geo": "^
|
|
62
|
-
"@xylabs/sdk
|
|
63
|
-
"@xylabs/threads": "^
|
|
64
|
-
"@xylabs/toolchain": "^8.3
|
|
65
|
-
"@xylabs/tsconfig": "^8.3
|
|
66
|
-
"@xyo-network/sdk-protocol
|
|
61
|
+
"@xylabs/geo": "^7.0.1",
|
|
62
|
+
"@xylabs/sdk": "^7.0.1",
|
|
63
|
+
"@xylabs/threads": "^7.0.1",
|
|
64
|
+
"@xylabs/toolchain": "^8.5.3",
|
|
65
|
+
"@xylabs/tsconfig": "^8.5.3",
|
|
66
|
+
"@xyo-network/sdk-protocol": "^7.0.4",
|
|
67
67
|
"ajv": "^8.20.0",
|
|
68
68
|
"async-mutex": "^0.5.0",
|
|
69
69
|
"debug": "~4.4.3",
|
|
70
|
-
"eslint": "^10.
|
|
70
|
+
"eslint": "^10.6.0",
|
|
71
71
|
"ethers": "^6.17.0",
|
|
72
72
|
"hash-wasm": "~4.12.0",
|
|
73
73
|
"idb": "^8.0.3",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"@scure/base": "~2.2",
|
|
87
87
|
"@scure/bip39": "~2.2",
|
|
88
88
|
"@xylabs/geo": "^6.0",
|
|
89
|
-
"@xylabs/sdk
|
|
89
|
+
"@xylabs/sdk": "^6.0",
|
|
90
90
|
"@xylabs/threads": "^6.0",
|
|
91
|
-
"@xyo-network/sdk-protocol
|
|
91
|
+
"@xyo-network/sdk-protocol": "^7.0",
|
|
92
92
|
"ajv": "^8.20",
|
|
93
93
|
"async-mutex": "^0.5",
|
|
94
94
|
"debug": "~4.4",
|