@xyo-network/diviner-image-thumbnail 7.0.0 → 7.0.1
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/Diviner/Diviner.d.ts +1 -1
- package/dist/neutral/Diviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailDivinerLabels.d.ts +1 -1
- package/dist/neutral/Diviner/ImageThumbnailDivinerLabels.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailDivinerState.d.ts +1 -1
- package/dist/neutral/Diviner/ImageThumbnailDivinerState.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.d.ts +2 -2
- package/dist/neutral/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.d.ts +2 -2
- package/dist/neutral/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.d.ts +2 -2
- package/dist/neutral/Diviner/ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailResultQuery.d.ts +32 -32
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.d.ts +1 -1
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Diviner.d.ts +4 -4
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Params.d.ts +1 -1
- package/dist/neutral/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Params.d.ts.map +1 -1
- package/dist/neutral/index.mjs +9 -9
- package/dist/neutral/index.mjs.map +2 -2
- package/package.json +27 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IndexingDiviner } from '@xyo-network/diviner-indexing';
|
|
2
|
-
import type { AttachableDivinerInstance } from '@xyo-network/sdk
|
|
2
|
+
import type { AttachableDivinerInstance } from '@xyo-network/sdk';
|
|
3
3
|
import { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts';
|
|
4
4
|
export declare class ImageThumbnailDiviner extends IndexingDiviner implements AttachableDivinerInstance {
|
|
5
5
|
static readonly labels: ImageThumbnailDivinerLabels;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAEjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAE9E,qBAAa,qBAAsB,SAAQ,eAAgB,YAAW,yBAAyB;IAC7F,gBAAyB,MAAM,EAAE,2BAA2B,CAAsD;CACnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageThumbnailDivinerLabels.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailDivinerLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAC7F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageThumbnailDivinerLabels.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailDivinerLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAC7F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,MAAM;IACzD,6BAA6B,EAAE,SAAS,CAAA;CACzC;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,2BAA0E,CAAA;AAEpH;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,2BAA2B,GAAG,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageThumbnailDivinerState.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailDivinerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageThumbnailDivinerState.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailDivinerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEjE,MAAM,MAAM,0BAA0B,GAAG,eAAe,GAAG;IACzD,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageThumbnailResultIndex } from '@xyo-network/image-thumbnail-payload-plugin';
|
|
2
|
-
import type { Payload, Schema, WithSources } from '@xyo-network/sdk
|
|
3
|
-
import { AbstractDiviner } from '@xyo-network/sdk
|
|
2
|
+
import type { Payload, Schema, WithSources } from '@xyo-network/sdk';
|
|
3
|
+
import { AbstractDiviner } from '@xyo-network/sdk';
|
|
4
4
|
import type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts';
|
|
5
5
|
/**
|
|
6
6
|
* Transforms candidates for image thumbnail indexing into their indexed representation
|
package/dist/neutral/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,yBAAyB,EAE1B,MAAM,6CAA6C,CAAA;AAMpD,OAAO,KAAK,EAEV,OAAO,EAAE,MAAM,EAAE,WAAW,EAC7B,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,yBAAyB,EAE1B,MAAM,6CAA6C,CAAA;AAMpD,OAAO,KAAK,EAEV,OAAO,EAAE,MAAM,EAAE,WAAW,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,eAAe,EAChB,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAA;AAGxF;;GAEG;AACH,qBAAa,wDAAyD,SAAQ,eAAe;IAC3F,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAgD;IAChG,gBAAyB,mBAAmB,EAAE,MAAM,CAAsB;IAC1E,gBAAyB,MAAM,EAAE,gCAAgC,CAIhE;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,EAAE,CAAC;CA4CpH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageThumbnailResult } from '@xyo-network/image-thumbnail-payload-plugin';
|
|
2
|
-
import type { Payload, Schema } from '@xyo-network/sdk
|
|
3
|
-
import { AbstractDiviner } from '@xyo-network/sdk
|
|
2
|
+
import type { Payload, Schema } from '@xyo-network/sdk';
|
|
3
|
+
import { AbstractDiviner } from '@xyo-network/sdk';
|
|
4
4
|
import type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts';
|
|
5
5
|
/**
|
|
6
6
|
* Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,6CAA6C,CAAA;AAMpD,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,6CAA6C,CAAA;AAMpD,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,eAAe,EAChB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAA;AAGxF;;GAEG;AACH,qBAAa,oEAAqE,SAAQ,eAAe;IACvG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAgD;IAChG,gBAAyB,mBAAmB,EAAE,MAAM,CAAsB;IAC1E,gBAAyB,MAAM,EAAE,gCAAgC,CAIhE;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAsClG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Payload, Schema } from '@xyo-network/sdk
|
|
2
|
-
import { AbstractDiviner } from '@xyo-network/sdk
|
|
1
|
+
import type { Payload, Schema } from '@xyo-network/sdk';
|
|
2
|
+
import { AbstractDiviner } from '@xyo-network/sdk';
|
|
3
3
|
import type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts';
|
|
4
4
|
import type { ImageThumbnailResultQuery } from './ImageThumbnailResultQuery.ts';
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.d.ts","sourceRoot":"","sources":["../../../src/Diviner/ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EACL,eAAe,EAChB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAA;AAExF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAE/E;;GAEG;AACH,qBAAa,oDAAqD,SAAQ,eAAe;IACvF,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAgD;IAChG,gBAAyB,mBAAmB,EAAE,MAAM,CAAsB;IAC1E,gBAAyB,MAAM,EAAE,gCAAgC,CAIhE;cAEwB,aAAa,CACpC,QAAQ,GAAE,OAAO,EAAO,GACvB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,WAAW,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;CA+BhJ"}
|
|
@@ -13,19 +13,19 @@ export declare const ImageThumbnailResultQueryZod: z.ZodMiniObject<{
|
|
|
13
13
|
readonly __hex: true;
|
|
14
14
|
} & {
|
|
15
15
|
readonly __address: true;
|
|
16
|
-
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk-protocol
|
|
16
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk-protocol").XyoQuantAddress, string>>]>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
17
17
|
readonly __hex: true;
|
|
18
18
|
} & {
|
|
19
19
|
readonly __address: true;
|
|
20
|
-
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk-protocol
|
|
20
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk-protocol").XyoQuantAddress, string>>]>>]>>;
|
|
21
21
|
budget: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
22
22
|
maxFrequency: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"once">, z.ZodMiniLiteral<"second">, z.ZodMiniLiteral<"minute">, z.ZodMiniLiteral<"hour">, z.ZodMiniLiteral<"day">, z.ZodMiniLiteral<"week">, z.ZodMiniLiteral<"month">, z.ZodMiniLiteral<"year">]>>;
|
|
23
23
|
minBid: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
24
|
-
cursor: z.ZodMiniOptional<z.ZodMiniCustom<import("@xyo-network/sdk-protocol
|
|
24
|
+
cursor: z.ZodMiniOptional<z.ZodMiniCustom<import("@xyo-network/sdk-protocol").Sequence, import("@xyo-network/sdk-protocol").Sequence>>;
|
|
25
25
|
limit: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
26
26
|
order: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"asc">, z.ZodMiniLiteral<"desc">]>>;
|
|
27
|
-
schemas: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<import("@xyo-network/sdk-protocol
|
|
28
|
-
key: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk
|
|
27
|
+
schemas: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<import("@xyo-network/sdk-protocol").Schema, import("@xyo-network/sdk-protocol").Schema>>>;
|
|
28
|
+
key: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk").BrandedHash, string>>;
|
|
29
29
|
status: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
30
30
|
success: z.ZodMiniBoolean<boolean>;
|
|
31
31
|
timestamp: z.ZodMiniNumber<number>;
|
|
@@ -38,14 +38,14 @@ export declare const isImageThumbnailResultQuery: <T>(value: T) => value is T &
|
|
|
38
38
|
schema: string & {
|
|
39
39
|
readonly __schema: true;
|
|
40
40
|
};
|
|
41
|
-
key: import("@xylabs/sdk
|
|
41
|
+
key: import("@xylabs/sdk").BrandedHash;
|
|
42
42
|
success: boolean;
|
|
43
43
|
timestamp: number;
|
|
44
|
-
address?: import("@xyo-network/sdk-protocol
|
|
44
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
45
45
|
readonly __hex: true;
|
|
46
46
|
} & {
|
|
47
47
|
readonly __address: true;
|
|
48
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
48
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
49
49
|
readonly __hex: true;
|
|
50
50
|
} & {
|
|
51
51
|
readonly __address: true;
|
|
@@ -53,10 +53,10 @@ export declare const isImageThumbnailResultQuery: <T>(value: T) => value is T &
|
|
|
53
53
|
budget?: number | undefined;
|
|
54
54
|
maxFrequency?: "once" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | undefined;
|
|
55
55
|
minBid?: number | undefined;
|
|
56
|
-
cursor?: import("@xyo-network/sdk-protocol
|
|
56
|
+
cursor?: import("@xyo-network/sdk-protocol").Sequence | undefined;
|
|
57
57
|
limit?: number | undefined;
|
|
58
58
|
order?: "asc" | "desc" | undefined;
|
|
59
|
-
schemas?: import("@xyo-network/sdk-protocol
|
|
59
|
+
schemas?: import("@xyo-network/sdk-protocol").Schema[] | undefined;
|
|
60
60
|
status?: number | undefined;
|
|
61
61
|
};
|
|
62
62
|
export declare const asImageThumbnailResultQuery: {
|
|
@@ -64,14 +64,14 @@ export declare const asImageThumbnailResultQuery: {
|
|
|
64
64
|
schema: string & {
|
|
65
65
|
readonly __schema: true;
|
|
66
66
|
};
|
|
67
|
-
key: import("@xylabs/sdk
|
|
67
|
+
key: import("@xylabs/sdk").BrandedHash;
|
|
68
68
|
success: boolean;
|
|
69
69
|
timestamp: number;
|
|
70
|
-
address?: import("@xyo-network/sdk-protocol
|
|
70
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
71
71
|
readonly __hex: true;
|
|
72
72
|
} & {
|
|
73
73
|
readonly __address: true;
|
|
74
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
74
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
75
75
|
readonly __hex: true;
|
|
76
76
|
} & {
|
|
77
77
|
readonly __address: true;
|
|
@@ -79,24 +79,24 @@ export declare const asImageThumbnailResultQuery: {
|
|
|
79
79
|
budget?: number | undefined;
|
|
80
80
|
maxFrequency?: "once" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | undefined;
|
|
81
81
|
minBid?: number | undefined;
|
|
82
|
-
cursor?: import("@xyo-network/sdk-protocol
|
|
82
|
+
cursor?: import("@xyo-network/sdk-protocol").Sequence | undefined;
|
|
83
83
|
limit?: number | undefined;
|
|
84
84
|
order?: "asc" | "desc" | undefined;
|
|
85
|
-
schemas?: import("@xyo-network/sdk-protocol
|
|
85
|
+
schemas?: import("@xyo-network/sdk-protocol").Schema[] | undefined;
|
|
86
86
|
status?: number | undefined;
|
|
87
87
|
}) | undefined;
|
|
88
|
-
<T>(value: T, assert: import("@xylabs/sdk
|
|
88
|
+
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
89
89
|
schema: string & {
|
|
90
90
|
readonly __schema: true;
|
|
91
91
|
};
|
|
92
|
-
key: import("@xylabs/sdk
|
|
92
|
+
key: import("@xylabs/sdk").BrandedHash;
|
|
93
93
|
success: boolean;
|
|
94
94
|
timestamp: number;
|
|
95
|
-
address?: import("@xyo-network/sdk-protocol
|
|
95
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
96
96
|
readonly __hex: true;
|
|
97
97
|
} & {
|
|
98
98
|
readonly __address: true;
|
|
99
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
99
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
100
100
|
readonly __hex: true;
|
|
101
101
|
} & {
|
|
102
102
|
readonly __address: true;
|
|
@@ -104,10 +104,10 @@ export declare const asImageThumbnailResultQuery: {
|
|
|
104
104
|
budget?: number | undefined;
|
|
105
105
|
maxFrequency?: "once" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | undefined;
|
|
106
106
|
minBid?: number | undefined;
|
|
107
|
-
cursor?: import("@xyo-network/sdk-protocol
|
|
107
|
+
cursor?: import("@xyo-network/sdk-protocol").Sequence | undefined;
|
|
108
108
|
limit?: number | undefined;
|
|
109
109
|
order?: "asc" | "desc" | undefined;
|
|
110
|
-
schemas?: import("@xyo-network/sdk-protocol
|
|
110
|
+
schemas?: import("@xyo-network/sdk-protocol").Schema[] | undefined;
|
|
111
111
|
status?: number | undefined;
|
|
112
112
|
};
|
|
113
113
|
};
|
|
@@ -116,14 +116,14 @@ export declare const toImageThumbnailResultQuery: {
|
|
|
116
116
|
schema: string & {
|
|
117
117
|
readonly __schema: true;
|
|
118
118
|
};
|
|
119
|
-
key: import("@xylabs/sdk
|
|
119
|
+
key: import("@xylabs/sdk").BrandedHash;
|
|
120
120
|
success: boolean;
|
|
121
121
|
timestamp: number;
|
|
122
|
-
address?: import("@xyo-network/sdk-protocol
|
|
122
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
123
123
|
readonly __hex: true;
|
|
124
124
|
} & {
|
|
125
125
|
readonly __address: true;
|
|
126
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
126
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
127
127
|
readonly __hex: true;
|
|
128
128
|
} & {
|
|
129
129
|
readonly __address: true;
|
|
@@ -131,24 +131,24 @@ export declare const toImageThumbnailResultQuery: {
|
|
|
131
131
|
budget?: number | undefined;
|
|
132
132
|
maxFrequency?: "once" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | undefined;
|
|
133
133
|
minBid?: number | undefined;
|
|
134
|
-
cursor?: import("@xyo-network/sdk-protocol
|
|
134
|
+
cursor?: import("@xyo-network/sdk-protocol").Sequence | undefined;
|
|
135
135
|
limit?: number | undefined;
|
|
136
136
|
order?: "asc" | "desc" | undefined;
|
|
137
|
-
schemas?: import("@xyo-network/sdk-protocol
|
|
137
|
+
schemas?: import("@xyo-network/sdk-protocol").Schema[] | undefined;
|
|
138
138
|
status?: number | undefined;
|
|
139
139
|
}) | undefined;
|
|
140
|
-
<T>(value: T, assert: import("@xylabs/sdk
|
|
140
|
+
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
141
141
|
schema: string & {
|
|
142
142
|
readonly __schema: true;
|
|
143
143
|
};
|
|
144
|
-
key: import("@xylabs/sdk
|
|
144
|
+
key: import("@xylabs/sdk").BrandedHash;
|
|
145
145
|
success: boolean;
|
|
146
146
|
timestamp: number;
|
|
147
|
-
address?: import("@xyo-network/sdk-protocol
|
|
147
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
148
148
|
readonly __hex: true;
|
|
149
149
|
} & {
|
|
150
150
|
readonly __address: true;
|
|
151
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
151
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
152
152
|
readonly __hex: true;
|
|
153
153
|
} & {
|
|
154
154
|
readonly __address: true;
|
|
@@ -156,10 +156,10 @@ export declare const toImageThumbnailResultQuery: {
|
|
|
156
156
|
budget?: number | undefined;
|
|
157
157
|
maxFrequency?: "once" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | undefined;
|
|
158
158
|
minBid?: number | undefined;
|
|
159
|
-
cursor?: import("@xyo-network/sdk-protocol
|
|
159
|
+
cursor?: import("@xyo-network/sdk-protocol").Sequence | undefined;
|
|
160
160
|
limit?: number | undefined;
|
|
161
161
|
order?: "asc" | "desc" | undefined;
|
|
162
|
-
schemas?: import("@xyo-network/sdk-protocol
|
|
162
|
+
schemas?: import("@xyo-network/sdk-protocol").Schema[] | undefined;
|
|
163
163
|
status?: number | undefined;
|
|
164
164
|
};
|
|
165
165
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SearchableStorage } from '@xyo-network/image-thumbnail-payload-plugin';
|
|
2
|
-
import type { DivinerConfig } from '@xyo-network/sdk
|
|
2
|
+
import type { DivinerConfig } from '@xyo-network/sdk';
|
|
3
3
|
export type ImageThumbnailStateToIndexCandidateDivinerConfigSchema = typeof ImageThumbnailStateToIndexCandidateDivinerConfigSchema;
|
|
4
4
|
export declare const ImageThumbnailStateToIndexCandidateDivinerConfigSchema: string & {
|
|
5
5
|
readonly __schema: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAKrD,MAAM,MAAM,sDAAsD,GAAG,OAAO,sDAAsD,CAAA;AAClI,eAAO,MAAM,sDAAsD;;CACa,CAAA;AAEhF,MAAM,MAAM,gDAAgD,GAAG,aAAa,CAAC;IAC3E,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,MAAM,EAAE,sDAAsD,CAAA;CAC/D,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin';
|
|
2
|
-
import type { ArchivistInstance, BoundWitness, ModuleState, Payload, Schema } from '@xyo-network/sdk
|
|
3
|
-
import { AbstractDiviner, ArchivistWrapper
|
|
2
|
+
import type { ArchivistInstance, BoundWitness, DivinerInstance, ModuleState, Payload, Schema } from '@xyo-network/sdk';
|
|
3
|
+
import { AbstractDiviner, ArchivistWrapper } from '@xyo-network/sdk';
|
|
4
4
|
import type { Timestamp } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import type { ImageThumbnailDivinerStageLabels } from '../ImageThumbnailDivinerLabels.ts';
|
|
6
6
|
import type { ImageThumbnailDivinerState } from '../ImageThumbnailDivinerState.ts';
|
|
@@ -36,11 +36,11 @@ export declare class ImageThumbnailStateToIndexCandidateDiviner<TParams extends
|
|
|
36
36
|
* Retrieves the archivist for the payloadStore
|
|
37
37
|
* @returns The archivist for the payloadStore
|
|
38
38
|
*/
|
|
39
|
-
protected getArchivistForStore(): Promise<ArchivistWrapper<import("@xyo-network/sdk
|
|
39
|
+
protected getArchivistForStore(): Promise<ArchivistWrapper<import("@xyo-network/sdk").ArchivistModuleInstance<import("@xyo-network/sdk").QueryableModuleParams<import("@xyo-network/sdk").AnyConfigSchema<import("@xyo-network/sdk").ArchivistConfig>>, import("@xyo-network/sdk").ArchivistModuleEventData>>>;
|
|
40
40
|
/**
|
|
41
41
|
* Retrieves the BoundWitness Diviner for the payloadStore
|
|
42
42
|
* @returns The BoundWitness Diviner for the payloadStore
|
|
43
43
|
*/
|
|
44
|
-
protected getBoundWitnessDivinerForStore(): Promise<
|
|
44
|
+
protected getBoundWitnessDivinerForStore(): Promise<DivinerInstance>;
|
|
45
45
|
}
|
|
46
46
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAEjF,OAAO,KAAK,EACV,iBAAiB,EAAwB,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAEjF,OAAO,KAAK,EACV,iBAAiB,EAAwB,YAAY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@xyo-network/sdk
|
|
1
|
+
import type { AnyConfigSchema, DivinerParams } from '@xyo-network/sdk';
|
|
2
2
|
import type { ImageThumbnailStateToIndexCandidateDivinerConfig } from './Config.ts';
|
|
3
3
|
export type ImageThumbnailStateToIndexCandidateDivinerParams = DivinerParams<AnyConfigSchema<ImageThumbnailStateToIndexCandidateDivinerConfig>>;
|
|
4
4
|
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEtE,OAAO,KAAK,EAAE,gDAAgD,EAAE,MAAM,aAAa,CAAA;AAEnF,MAAM,MAAM,gDAAgD,GAAG,aAAa,CAAC,eAAe,CAAC,gDAAgD,CAAC,CAAC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
DivinerConfigSchema,
|
|
21
21
|
isBoundWitness,
|
|
22
22
|
PayloadBuilder
|
|
23
|
-
} from "@xyo-network/sdk
|
|
23
|
+
} from "@xyo-network/sdk";
|
|
24
24
|
import { UrlSchema } from "@xyo-network/url-payload-plugin";
|
|
25
25
|
import { isTimestamp, TimestampSchema } from "@xyo-network/witness-timestamp";
|
|
26
26
|
var ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner = class extends AbstractDiviner {
|
|
@@ -77,7 +77,7 @@ var ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner = class extends Abs
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// src/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.ts
|
|
80
|
-
import { exists } from "@xylabs/sdk
|
|
80
|
+
import { exists } from "@xylabs/sdk";
|
|
81
81
|
import {
|
|
82
82
|
ImageThumbnailResultSchema,
|
|
83
83
|
isImageThumbnailDivinerQuery,
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
AbstractDiviner as AbstractDiviner2,
|
|
88
88
|
DivinerConfigSchema as DivinerConfigSchema2,
|
|
89
89
|
PayloadBuilder as PayloadBuilder2
|
|
90
|
-
} from "@xyo-network/sdk
|
|
90
|
+
} from "@xyo-network/sdk";
|
|
91
91
|
import { UrlSchema as UrlSchema2 } from "@xyo-network/url-payload-plugin";
|
|
92
92
|
var ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner = class extends AbstractDiviner2 {
|
|
93
93
|
static configSchemas = [...super.configSchemas, DivinerConfigSchema2];
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
AbstractDiviner as AbstractDiviner3,
|
|
140
140
|
DivinerConfigSchema as DivinerConfigSchema3,
|
|
141
141
|
PayloadBuilder as PayloadBuilder3
|
|
142
|
-
} from "@xyo-network/sdk
|
|
142
|
+
} from "@xyo-network/sdk";
|
|
143
143
|
import { UrlSchema as UrlSchema3 } from "@xyo-network/url-payload-plugin";
|
|
144
144
|
var ImageThumbnailQueryToImageThumbnailIndexQueryDiviner = class extends AbstractDiviner3 {
|
|
145
145
|
static configSchemas = [...super.configSchemas, DivinerConfigSchema3];
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
zodAsFactory,
|
|
188
188
|
zodIsFactory,
|
|
189
189
|
zodToFactory
|
|
190
|
-
} from "@xylabs/sdk
|
|
190
|
+
} from "@xylabs/sdk";
|
|
191
191
|
import { PayloadDivinerQueryPayloadZod } from "@xyo-network/diviner-payload-model";
|
|
192
192
|
import { ImageThumbnailResultIndexZod } from "@xyo-network/image-thumbnail-payload-plugin";
|
|
193
193
|
import * as z from "zod/mini";
|
|
@@ -202,11 +202,11 @@ var asImageThumbnailResultQuery = zodAsFactory(ImageThumbnailResultQueryZod, "as
|
|
|
202
202
|
var toImageThumbnailResultQuery = zodToFactory(ImageThumbnailResultQueryZod, "toImageThumbnailResultQuery");
|
|
203
203
|
|
|
204
204
|
// src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.ts
|
|
205
|
-
import { asSchema as asSchema2 } from "@xyo-network/sdk
|
|
205
|
+
import { asSchema as asSchema2 } from "@xyo-network/sdk";
|
|
206
206
|
|
|
207
207
|
// src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Schema.ts
|
|
208
208
|
import { ImageThumbnailDivinerSchema } from "@xyo-network/image-thumbnail-payload-plugin";
|
|
209
|
-
import { asSchema } from "@xyo-network/sdk
|
|
209
|
+
import { asSchema } from "@xyo-network/sdk";
|
|
210
210
|
var ImageThumbnailStateToIndexCandidateDivinerSchema = asSchema(`${ImageThumbnailDivinerSchema}.stage.stateToIndexCandidateDiviner`, true);
|
|
211
211
|
|
|
212
212
|
// src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.ts
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
assertEx,
|
|
219
219
|
exists as exists2,
|
|
220
220
|
filterAs
|
|
221
|
-
} from "@xylabs/sdk
|
|
221
|
+
} from "@xylabs/sdk";
|
|
222
222
|
import { ImageThumbnailSchema as ImageThumbnailSchema2, isImageThumbnail as isImageThumbnail2 } from "@xyo-network/image-thumbnail-payload-plugin";
|
|
223
223
|
import {
|
|
224
224
|
AbstractDiviner as AbstractDiviner4,
|
|
@@ -230,7 +230,7 @@ import {
|
|
|
230
230
|
ModuleStateSchema,
|
|
231
231
|
payloadSchemasContainsAll,
|
|
232
232
|
SequenceConstants
|
|
233
|
-
} from "@xyo-network/sdk
|
|
233
|
+
} from "@xyo-network/sdk";
|
|
234
234
|
import { isTimestamp as isTimestamp2, TimestampSchema as TimestampSchema2 } from "@xyo-network/witness-timestamp";
|
|
235
235
|
var payload_schemas = [ImageThumbnailSchema2, TimestampSchema2];
|
|
236
236
|
var indexCandidateIdentityFunctions = [isImageThumbnail2, isTimestamp2];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Diviner/Diviner.ts", "../../src/Diviner/ImageThumbnailDivinerLabels.ts", "../../src/Diviner/ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner.ts", "../../src/Diviner/ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner.ts", "../../src/Diviner/ImageThumbnailQueryToImageThumbnailIndexQueryDiviner.ts", "../../src/Diviner/ImageThumbnailResultQuery.ts", "../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Config.ts", "../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Schema.ts", "../../src/Diviner/ImageThumbnailStateToIndexCandidateDiviner/Diviner.ts"],
|
|
4
|
-
"sourcesContent": ["import { IndexingDiviner } from '@xyo-network/diviner-indexing'\nimport type { AttachableDivinerInstance } from '@xyo-network/sdk-js'\n\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\nexport class ImageThumbnailDiviner extends IndexingDiviner implements AttachableDivinerInstance {\n static override readonly labels: ImageThumbnailDivinerLabels = { ...super.labels, ...ImageThumbnailDivinerLabels }\n}\n", "import type { DivinerStageSchema, IndexingDivinerStage } from '@xyo-network/diviner-indexing'\nimport type { Labels } from '@xyo-network/sdk-js'\n\n/**\n * Labels for Image Thumbnail Diviner components\n */\nexport interface ImageThumbnailDivinerLabels extends Labels {\n 'network.xyo.image.thumbnail': 'diviner'\n}\n\n/**\n * Labels for Image Thumbnail Diviner components\n */\nexport const ImageThumbnailDivinerLabels: ImageThumbnailDivinerLabels = { 'network.xyo.image.thumbnail': 'diviner' }\n\n/**\n * Labels for Image Thumbnail Diviner Stage Diviners\n */\nexport type ImageThumbnailDivinerStageLabels = ImageThumbnailDivinerLabels & Record<DivinerStageSchema, IndexingDivinerStage>\n", "import type { Hash } from '@xylabs/sdk-js'\nimport type {\n ImageThumbnail,\n ImageThumbnailResultIndex,\n ImageThumbnailResultIndexFields,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport {\n ImageThumbnailResultIndexSchema,\n ImageThumbnailSchema,\n isImageThumbnail,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n BoundWitness,\n Payload, Schema, WithSources,\n} from '@xyo-network/sdk-js'\nimport {\n AbstractDiviner, DivinerConfigSchema, isBoundWitness, PayloadBuilder,\n} from '@xyo-network/sdk-js'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { isTimestamp, TimestampSchema } from '@xyo-network/witness-timestamp'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'indexCandidateToIndexDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<WithSources<ImageThumbnailResultIndex>[]> {\n const bws: BoundWitness[] = payloads.filter(isBoundWitness)\n const imageThumbnailPayloads: ImageThumbnail[] = payloads.filter(isImageThumbnail)\n const timestampPayloads: Timestamp[] = payloads.filter(isTimestamp)\n if (bws.length > 0 && imageThumbnailPayloads.length > 0 && timestampPayloads.length > 0) {\n const payloadDictionary: Record<string, Payload> = await PayloadBuilder.toDataHashMap(payloads)\n // eslint-disable-next-line unicorn/no-array-reduce\n const tuples: [BoundWitness, ImageThumbnail, Timestamp][] = bws.reduce<[BoundWitness, ImageThumbnail, Timestamp][]>(\n (acc, curr) => {\n const imageThumbnailIndex = curr.payload_schemas?.indexOf(ImageThumbnailSchema)\n const timestampIndex = curr.payload_schemas?.indexOf(TimestampSchema)\n const imageThumbnailHash: string | undefined = imageThumbnailIndex == null ? undefined : curr.payload_hashes?.[imageThumbnailIndex]\n const timestampHash: string | undefined = timestampIndex == null ? undefined : curr.payload_hashes?.[timestampIndex]\n const imageThumbnailPayload = imageThumbnailHash == null ? undefined : [payloadDictionary[imageThumbnailHash]].find(isImageThumbnail)\n const timestampPayload = timestampHash == null ? undefined : [payloadDictionary[timestampHash]].find(isTimestamp)\n if (imageThumbnailPayload != null && timestampPayload != null) acc.push([curr, imageThumbnailPayload, timestampPayload])\n return acc\n },\n [] as [BoundWitness, ImageThumbnail, Timestamp][],\n )\n const indexes = await Promise.all(\n tuples.map(async ([bw, imageThumbnailPayload, timestampPayload]) => {\n const { sourceUrl: url, http } = imageThumbnailPayload\n const { timestamp } = timestampPayload\n const { status } = http ?? {}\n const success = (imageThumbnailPayload.url?.length ?? 0) > 0 // Call anything with a thumbnail URL a success\n const $sources: Hash[] = await PayloadBuilder.dataHashes([bw, imageThumbnailPayload, timestampPayload])\n const urlPayload = { schema: UrlSchema, url }\n const key: Hash = await PayloadBuilder.dataHash(urlPayload)\n const fields: ImageThumbnailResultIndexFields = {\n key, success, timestamp,\n }\n if (status != null) fields.status = status\n const builder = new PayloadBuilder<WithSources<ImageThumbnailResultIndex>>({ schema: ImageThumbnailResultIndexSchema })\n const result = builder\n .fields({ ...fields }).meta({ $sources })\n .build()\n return [result]\n }),\n )\n return indexes.flat()\n }\n return []\n }\n}\n", "import { exists } from '@xylabs/sdk-js'\nimport type {\n ImageThumbnailResult,\n ImageThumbnailResultFields,\n ImageThumbnailResultIndex,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport {\n ImageThumbnailResultSchema,\n isImageThumbnailDivinerQuery,\n isImageThumbnailResultIndex,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n Payload, Schema, WithSources,\n} from '@xyo-network/sdk-js'\nimport {\n AbstractDiviner, DivinerConfigSchema, PayloadBuilder,\n} from '@xyo-network/sdk-js'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\n/**\n * Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response\n */\nexport class ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'indexQueryResponseToDivinerQueryResponseDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<ImageThumbnailResult[]> {\n // Filter out the two operands\n const imageThumbnailDivinerQueries = payloads.filter(isImageThumbnailDivinerQuery)\n const imageThumbnailResultIndexes = payloads.filter(isImageThumbnailResultIndex) as WithSources<ImageThumbnailResultIndex>[]\n\n // If we have operands\n if (imageThumbnailDivinerQueries.length > 0 && imageThumbnailResultIndexes.length > 0) {\n // Create a dictionary to translate index keys to the urls that represent them\n const keyToUrlDictionary = Object.fromEntries(\n await Promise.all(\n imageThumbnailDivinerQueries.map(async (imageThumbnailDivinerQuery) => {\n const { url } = imageThumbnailDivinerQuery\n const urlPayloadBuilder = new PayloadBuilder<Omit<ImageThumbnailResult, 'timestamp' | 'success' | 'sources'>>({ schema: UrlSchema })\n const urlPayload = urlPayloadBuilder\n .fields({ url })\n .build()\n const key = await PayloadBuilder.dataHash(urlPayload)\n return [key, url] as const\n }),\n ),\n )\n // Map the indexes to responses using the dictionary\n return imageThumbnailResultIndexes.map((imageThumbnailResultIndex) => {\n const {\n\n key, schema, $sources, ...commonFields\n } = imageThumbnailResultIndex\n const keyString: string = key\n const url = keyToUrlDictionary[keyString]\n if (url != null && url !== '') {\n const fields: ImageThumbnailResultFields = { ...commonFields, url }\n const builder = new PayloadBuilder<ImageThumbnailResult>({ schema: ImageThumbnailResultSchema })\n return builder.fields(fields).meta({ $sources }).build()\n }\n }).filter(exists)\n }\n return []\n }\n}\n", "import { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\nimport { isImageThumbnailDivinerQuery } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type { Payload, Schema } from '@xyo-network/sdk-js'\nimport {\n AbstractDiviner, DivinerConfigSchema, PayloadBuilder,\n} from '@xyo-network/sdk-js'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\nimport type { ImageThumbnailResultQuery } from './ImageThumbnailResultQuery.ts'\n\n/**\n * A diviner that converts ImageThumbnailDivinerQuery to ImageThumbnailResultQuery\n */\nexport class ImageThumbnailQueryToImageThumbnailIndexQueryDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'divinerQueryToIndexQueryDiviner',\n }\n\n protected override async divineHandler(\n payloads: Payload[] = [],\n ): Promise<Omit<Omit<ImageThumbnailResultQuery, 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>>, 'timestamp'>[]> {\n const queries = payloads.filter(isImageThumbnailDivinerQuery)\n if (queries.length > 0) {\n const results = await Promise.all(\n queries.map(async (query) => {\n const {\n limit: payloadLimit, order: payloadOrder, status: payloadStatus, success: payloadSuccess, url,\n } = query\n const limit = payloadLimit ?? 1\n const order = payloadOrder ?? 'desc'\n const urlPayload = { schema: UrlSchema, url }\n const key = await PayloadBuilder.dataHash(urlPayload)\n const fields: Omit<ImageThumbnailResultQuery, 'schema' | 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>> = {\n key,\n limit,\n order,\n }\n if (payloadSuccess !== undefined) fields.success = payloadSuccess\n if (payloadStatus !== undefined) fields.status = payloadStatus\n const builder = new PayloadBuilder<\n Omit<ImageThumbnailResultQuery, 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>>\n >({ schema: PayloadDivinerQuerySchema })\n return builder\n .fields(fields)\n .build()\n }),\n )\n return results\n }\n return []\n }\n}\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { PayloadDivinerQueryPayloadZod } from '@xyo-network/diviner-payload-model'\nimport type { ImageThumbnailResultIndex } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { ImageThumbnailResultIndexZod } from '@xyo-network/image-thumbnail-payload-plugin'\nimport * as z from 'zod/mini'\n\n/**\n * The fields that will need to be indexed on in the underlying store\n */\nexport type QueryableImageThumbnailResultProperties = Extract<keyof ImageThumbnailResultIndex, 'status' | 'success' | 'timestamp' | 'key'>\n\n/**\n * The query that will be used to retrieve the results from the underlying store\n */\nexport const ImageThumbnailResultQueryZod = z.extend(PayloadDivinerQueryPayloadZod, {\n key: ImageThumbnailResultIndexZod.shape.key,\n status: ImageThumbnailResultIndexZod.shape.status,\n success: ImageThumbnailResultIndexZod.shape.success,\n timestamp: ImageThumbnailResultIndexZod.shape.timestamp,\n})\n\nexport type ImageThumbnailResultQuery = z.infer<typeof ImageThumbnailResultQueryZod>\n\n/**\n * A type guard for ImageThumbnailResultQuery\n */\nexport const isImageThumbnailResultQuery = zodIsFactory(ImageThumbnailResultQueryZod)\nexport const asImageThumbnailResultQuery = zodAsFactory(ImageThumbnailResultQueryZod, 'asImageThumbnailResultQuery')\nexport const toImageThumbnailResultQuery = zodToFactory(ImageThumbnailResultQueryZod, 'toImageThumbnailResultQuery')\n", "import type { SearchableStorage } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type { DivinerConfig } from '@xyo-network/sdk-js'\nimport { asSchema } from '@xyo-network/sdk-js'\n\nimport { ImageThumbnailStateToIndexCandidateDivinerSchema } from './Schema.ts'\n\nexport type ImageThumbnailStateToIndexCandidateDivinerConfigSchema = typeof ImageThumbnailStateToIndexCandidateDivinerConfigSchema\nexport const ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n = asSchema(`${ImageThumbnailStateToIndexCandidateDivinerSchema}.config`, true)\n\nexport type ImageThumbnailStateToIndexCandidateDivinerConfig = DivinerConfig<{\n payloadDivinerLimit?: number\n /**\n * Where the diviner should look for stored thumbnails\n */\n payloadStore?: SearchableStorage\n schema: ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n}>\n", "import { ImageThumbnailDivinerSchema } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { asSchema } from '@xyo-network/sdk-js'\n\nexport type ImageThumbnailStateToIndexCandidateDivinerSchema = typeof ImageThumbnailStateToIndexCandidateDivinerSchema\nexport const ImageThumbnailStateToIndexCandidateDivinerSchema\n = asSchema(`${ImageThumbnailDivinerSchema}.stage.stateToIndexCandidateDiviner`, true)\n", "import {\n AsObjectFactory, assertEx, exists, filterAs,\n} from '@xylabs/sdk-js'\nimport type { ImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { ImageThumbnailSchema, isImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n ArchivistInstance, ArchivistNextOptions, BoundWitness, ModuleState, Payload, Schema,\n} from '@xyo-network/sdk-js'\nimport {\n AbstractDiviner, ArchivistWrapper, asBoundWitness, DivinerWrapper, isBoundWitness, isModuleState, ModuleStateSchema, payloadSchemasContainsAll, SequenceConstants,\n} from '@xyo-network/sdk-js'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { isTimestamp, TimestampSchema } from '@xyo-network/witness-timestamp'\n\nimport type { ImageThumbnailDivinerStageLabels } from '../ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from '../ImageThumbnailDivinerLabels.ts'\nimport type { ImageThumbnailDivinerState } from '../ImageThumbnailDivinerState.ts'\nimport { ImageThumbnailStateToIndexCandidateDivinerConfigSchema } from './Config.ts'\nimport type { ImageThumbnailStateToIndexCandidateDivinerParams } from './Params.ts'\n\n/**\n * All Payload types involved in index candidates for indexing\n */\nexport type IndexCandidate = BoundWitness | ImageThumbnail | Timestamp\n\n/**\n * The response from the ImageThumbnailStateToIndexCandidateDiviner\n */\nexport type ImageThumbnailStateToIndexCandidateDivinerResponse = [\n /**\n * The next state of the diviner\n */\n nextState: ModuleState<ImageThumbnailDivinerState>,\n /**\n * The index candidates\n */\n ...IndexCandidate[],\n]\n\n/**\n * The required payload_schemas within BoundWitnesses to identify index candidates\n */\nconst payload_schemas = [ImageThumbnailSchema, TimestampSchema]\n\n/**\n * Index candidate identity functions\n */\nconst indexCandidateIdentityFunctions = [isImageThumbnail, isTimestamp] as const\nconst isIndexCandidate = (x?: unknown): x is IndexCandidate => {\n return indexCandidateIdentityFunctions.map(is => is(x)).some(Boolean)\n}\nconst asIndexCandidate = AsObjectFactory.create(isIndexCandidate)\n\n/**\n * The default order to search Bound Witnesses to identify index candidates\n */\nconst order = 'asc'\n\n/**\n * The name of the module (for logging purposes)\n */\nconst moduleName = 'ImageThumbnailStateToIndexCandidateDiviner'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class ImageThumbnailStateToIndexCandidateDiviner<\n TParams extends ImageThumbnailStateToIndexCandidateDivinerParams = ImageThumbnailStateToIndexCandidateDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ImageThumbnailStateToIndexCandidateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'stateToIndexCandidateDiviner',\n }\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1000\n }\n\n protected static async getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined> {\n const indexes = payload_schemas.map(schema => bw.payload_schemas?.indexOf(schema))\n const hashes = indexes.map(index => bw.payload_hashes?.[index])\n const results = await archivist.get(hashes)\n const filteredResults = indexCandidateIdentityFunctions.map(is => results.find(is))\n if (filteredResults.includes(undefined)) return undefined\n const indexCandidates: IndexCandidate[] = filterAs(filteredResults, asIndexCandidate)\n return [bw, ...indexCandidates]\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<ImageThumbnailStateToIndexCandidateDivinerResponse> {\n // Retrieve the last state from what was passed in\n const lastState = payloads.find(isModuleState<ImageThumbnailDivinerState>)\n // If there is no last state, start from the beginning\n ?? { schema: ModuleStateSchema, state: { cursor: SequenceConstants.minLocalSequence } }\n\n // Get the last cursor\n const cursor = lastState?.state?.cursor\n // Get the archivist for the store\n const sourceArchivist = await this.getArchivistForStore()\n\n // Get the next batch of results\n const nextOffset: ArchivistNextOptions = { limit: this.payloadDivinerLimit, order }\n // Only use the cursor if it's a valid offset\n if (cursor !== SequenceConstants.minLocalSequence) nextOffset.cursor = cursor\n // Get next batch of results starting from the offset\n const next = await sourceArchivist.next(nextOffset)\n if (next.length === 0) return [lastState]\n\n const batch = filterAs(next, asBoundWitness)\n .filter(exists)\n .filter(bw => payloadSchemasContainsAll(bw, payload_schemas))\n // Get source data\n const boundWitnessCandidates = await Promise.all(\n batch\n .filter(isBoundWitness)\n .map(bw => ImageThumbnailStateToIndexCandidateDiviner.getPayloadsInBoundWitness(bw, sourceArchivist)),\n )\n const indexCandidates: IndexCandidate[] = boundWitnessCandidates\n .filter(exists)\n .flat()\n const nextCursor = assertEx(next.at(-1)?._sequence, () => `${moduleName}: Expected next to have a sequence`)\n const nextState: ModuleState<ImageThumbnailDivinerState> = { schema: ModuleStateSchema, state: { ...lastState.state, cursor: nextCursor } }\n return [nextState, ...indexCandidates]\n }\n\n /**\n * Retrieves the archivist for the payloadStore\n * @returns The archivist for the payloadStore\n */\n protected async getArchivistForStore() {\n const name = assertEx(this.config?.payloadStore?.archivist, () => `${moduleName}: Config for payloadStore.archivist not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve payloadStore.archivist`)\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the payloadStore\n * @returns The BoundWitness Diviner for the payloadStore\n */\n protected async getBoundWitnessDivinerForStore() {\n const name = assertEx(\n this.config?.payloadStore?.boundWitnessDiviner,\n () => `${moduleName}: Config for payloadStore.boundWitnessDiviner not specified`,\n )\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve payloadStore.boundWitnessDiviner`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,uBAAuB;;;ACazB,IAAM,8BAA2D,EAAE,+BAA+B,UAAU;;;ADR5G,IAAM,wBAAN,cAAoC,gBAAqD;AAAA,EAC9F,OAAyB,SAAsC,EAAE,GAAG,MAAM,QAAQ,GAAG,4BAA4B;AACnH;;;AEDA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EACE;AAAA,EAAiB;AAAA,EAAqB;AAAA,EAAgB;AAAA,OACjD;AACP,SAAS,iBAAiB;AAE1B,SAAS,aAAa,uBAAuB;AAQtC,IAAM,2DAAN,cAAuE,gBAAgB;AAAA,EAC5F,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,mBAAmB;AAAA,EAC/F,OAAyB,sBAA8B;AAAA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GAAG,UAAU,mDAAmD;AAClI,UAAM,MAAM,SAAS,MAAM,KAAK,QAAQ,IAAI,GAAG,MAAM,GAAG,UAAU,4CAA4C;AAC9G,WAAO,iBAAiB,KAAK,KAAK,KAAK,OAAO;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAgB,
|
|
4
|
+
"sourcesContent": ["import { IndexingDiviner } from '@xyo-network/diviner-indexing'\nimport type { AttachableDivinerInstance } from '@xyo-network/sdk'\n\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\nexport class ImageThumbnailDiviner extends IndexingDiviner implements AttachableDivinerInstance {\n static override readonly labels: ImageThumbnailDivinerLabels = { ...super.labels, ...ImageThumbnailDivinerLabels }\n}\n", "import type { DivinerStageSchema, IndexingDivinerStage } from '@xyo-network/diviner-indexing'\nimport type { Labels } from '@xyo-network/sdk'\n\n/**\n * Labels for Image Thumbnail Diviner components\n */\nexport interface ImageThumbnailDivinerLabels extends Labels {\n 'network.xyo.image.thumbnail': 'diviner'\n}\n\n/**\n * Labels for Image Thumbnail Diviner components\n */\nexport const ImageThumbnailDivinerLabels: ImageThumbnailDivinerLabels = { 'network.xyo.image.thumbnail': 'diviner' }\n\n/**\n * Labels for Image Thumbnail Diviner Stage Diviners\n */\nexport type ImageThumbnailDivinerStageLabels = ImageThumbnailDivinerLabels & Record<DivinerStageSchema, IndexingDivinerStage>\n", "import type { Hash } from '@xylabs/sdk'\nimport type {\n ImageThumbnail,\n ImageThumbnailResultIndex,\n ImageThumbnailResultIndexFields,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport {\n ImageThumbnailResultIndexSchema,\n ImageThumbnailSchema,\n isImageThumbnail,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n BoundWitness,\n Payload, Schema, WithSources,\n} from '@xyo-network/sdk'\nimport {\n AbstractDiviner, DivinerConfigSchema, isBoundWitness, PayloadBuilder,\n} from '@xyo-network/sdk'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { isTimestamp, TimestampSchema } from '@xyo-network/witness-timestamp'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class ImageThumbnailIndexCandidateToImageThumbnailIndexDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'indexCandidateToIndexDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<WithSources<ImageThumbnailResultIndex>[]> {\n const bws: BoundWitness[] = payloads.filter(isBoundWitness)\n const imageThumbnailPayloads: ImageThumbnail[] = payloads.filter(isImageThumbnail)\n const timestampPayloads: Timestamp[] = payloads.filter(isTimestamp)\n if (bws.length > 0 && imageThumbnailPayloads.length > 0 && timestampPayloads.length > 0) {\n const payloadDictionary: Record<string, Payload> = await PayloadBuilder.toDataHashMap(payloads)\n\n const tuples: [BoundWitness, ImageThumbnail, Timestamp][] = bws.reduce<[BoundWitness, ImageThumbnail, Timestamp][]>(\n (acc, curr) => {\n const imageThumbnailIndex = curr.payload_schemas?.indexOf(ImageThumbnailSchema)\n const timestampIndex = curr.payload_schemas?.indexOf(TimestampSchema)\n const imageThumbnailHash: string | undefined = imageThumbnailIndex == null ? undefined : curr.payload_hashes?.[imageThumbnailIndex]\n const timestampHash: string | undefined = timestampIndex == null ? undefined : curr.payload_hashes?.[timestampIndex]\n const imageThumbnailPayload = imageThumbnailHash == null ? undefined : [payloadDictionary[imageThumbnailHash]].find(isImageThumbnail)\n const timestampPayload = timestampHash == null ? undefined : [payloadDictionary[timestampHash]].find(isTimestamp)\n if (imageThumbnailPayload != null && timestampPayload != null) acc.push([curr, imageThumbnailPayload, timestampPayload])\n return acc\n },\n [] as [BoundWitness, ImageThumbnail, Timestamp][],\n )\n const indexes = await Promise.all(\n tuples.map(async ([bw, imageThumbnailPayload, timestampPayload]) => {\n const { sourceUrl: url, http } = imageThumbnailPayload\n const { timestamp } = timestampPayload\n const { status } = http ?? {}\n const success = (imageThumbnailPayload.url?.length ?? 0) > 0 // Call anything with a thumbnail URL a success\n const $sources: Hash[] = await PayloadBuilder.dataHashes([bw, imageThumbnailPayload, timestampPayload])\n const urlPayload = { schema: UrlSchema, url }\n const key: Hash = await PayloadBuilder.dataHash(urlPayload)\n const fields: ImageThumbnailResultIndexFields = {\n key, success, timestamp,\n }\n if (status != null) fields.status = status\n const builder = new PayloadBuilder<WithSources<ImageThumbnailResultIndex>>({ schema: ImageThumbnailResultIndexSchema })\n const result = builder\n .fields({ ...fields }).meta({ $sources })\n .build()\n return [result]\n }),\n )\n return indexes.flat()\n }\n return []\n }\n}\n", "import { exists } from '@xylabs/sdk'\nimport type {\n ImageThumbnailResult,\n ImageThumbnailResultFields,\n ImageThumbnailResultIndex,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport {\n ImageThumbnailResultSchema,\n isImageThumbnailDivinerQuery,\n isImageThumbnailResultIndex,\n} from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n Payload, Schema, WithSources,\n} from '@xyo-network/sdk'\nimport {\n AbstractDiviner, DivinerConfigSchema, PayloadBuilder,\n} from '@xyo-network/sdk'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\n\n/**\n * Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response\n */\nexport class ImageThumbnailIndexQueryResponseToImageThumbnailQueryResponseDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'indexQueryResponseToDivinerQueryResponseDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<ImageThumbnailResult[]> {\n // Filter out the two operands\n const imageThumbnailDivinerQueries = payloads.filter(isImageThumbnailDivinerQuery)\n const imageThumbnailResultIndexes = payloads.filter(isImageThumbnailResultIndex) as WithSources<ImageThumbnailResultIndex>[]\n\n // If we have operands\n if (imageThumbnailDivinerQueries.length > 0 && imageThumbnailResultIndexes.length > 0) {\n // Create a dictionary to translate index keys to the urls that represent them\n const keyToUrlDictionary = Object.fromEntries(\n await Promise.all(\n imageThumbnailDivinerQueries.map(async (imageThumbnailDivinerQuery) => {\n const { url } = imageThumbnailDivinerQuery\n const urlPayloadBuilder = new PayloadBuilder<Omit<ImageThumbnailResult, 'timestamp' | 'success' | 'sources'>>({ schema: UrlSchema })\n const urlPayload = urlPayloadBuilder\n .fields({ url })\n .build()\n const key = await PayloadBuilder.dataHash(urlPayload)\n return [key, url] as const\n }),\n ),\n )\n // Map the indexes to responses using the dictionary\n return imageThumbnailResultIndexes.map((imageThumbnailResultIndex) => {\n const {\n\n key, schema, $sources, ...commonFields\n } = imageThumbnailResultIndex\n const keyString: string = key\n const url = keyToUrlDictionary[keyString]\n if (url != null && url !== '') {\n const fields: ImageThumbnailResultFields = { ...commonFields, url }\n const builder = new PayloadBuilder<ImageThumbnailResult>({ schema: ImageThumbnailResultSchema })\n return builder.fields(fields).meta({ $sources }).build()\n }\n }).filter(exists)\n }\n return []\n }\n}\n", "import { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\nimport { isImageThumbnailDivinerQuery } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type { Payload, Schema } from '@xyo-network/sdk'\nimport {\n AbstractDiviner, DivinerConfigSchema, PayloadBuilder,\n} from '@xyo-network/sdk'\nimport { UrlSchema } from '@xyo-network/url-payload-plugin'\n\nimport type { ImageThumbnailDivinerStageLabels } from './ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from './ImageThumbnailDivinerLabels.ts'\nimport type { ImageThumbnailResultQuery } from './ImageThumbnailResultQuery.ts'\n\n/**\n * A diviner that converts ImageThumbnailDivinerQuery to ImageThumbnailResultQuery\n */\nexport class ImageThumbnailQueryToImageThumbnailIndexQueryDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, DivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = DivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'divinerQueryToIndexQueryDiviner',\n }\n\n protected override async divineHandler(\n payloads: Payload[] = [],\n ): Promise<Omit<Omit<ImageThumbnailResultQuery, 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>>, 'timestamp'>[]> {\n const queries = payloads.filter(isImageThumbnailDivinerQuery)\n if (queries.length > 0) {\n const results = await Promise.all(\n queries.map(async (query) => {\n const {\n limit: payloadLimit, order: payloadOrder, status: payloadStatus, success: payloadSuccess, url,\n } = query\n const limit = payloadLimit ?? 1\n const order = payloadOrder ?? 'desc'\n const urlPayload = { schema: UrlSchema, url }\n const key = await PayloadBuilder.dataHash(urlPayload)\n const fields: Omit<ImageThumbnailResultQuery, 'schema' | 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>> = {\n key,\n limit,\n order,\n }\n if (payloadSuccess !== undefined) fields.success = payloadSuccess\n if (payloadStatus !== undefined) fields.status = payloadStatus\n const builder = new PayloadBuilder<\n Omit<ImageThumbnailResultQuery, 'timestamp' | 'success'> & Partial<Pick<ImageThumbnailResultQuery, 'success'>>\n >({ schema: PayloadDivinerQuerySchema })\n return builder\n .fields(fields)\n .build()\n }),\n )\n return results\n }\n return []\n }\n}\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport { PayloadDivinerQueryPayloadZod } from '@xyo-network/diviner-payload-model'\nimport type { ImageThumbnailResultIndex } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { ImageThumbnailResultIndexZod } from '@xyo-network/image-thumbnail-payload-plugin'\nimport * as z from 'zod/mini'\n\n/**\n * The fields that will need to be indexed on in the underlying store\n */\nexport type QueryableImageThumbnailResultProperties = Extract<keyof ImageThumbnailResultIndex, 'status' | 'success' | 'timestamp' | 'key'>\n\n/**\n * The query that will be used to retrieve the results from the underlying store\n */\nexport const ImageThumbnailResultQueryZod = z.extend(PayloadDivinerQueryPayloadZod, {\n key: ImageThumbnailResultIndexZod.shape.key,\n status: ImageThumbnailResultIndexZod.shape.status,\n success: ImageThumbnailResultIndexZod.shape.success,\n timestamp: ImageThumbnailResultIndexZod.shape.timestamp,\n})\n\nexport type ImageThumbnailResultQuery = z.infer<typeof ImageThumbnailResultQueryZod>\n\n/**\n * A type guard for ImageThumbnailResultQuery\n */\nexport const isImageThumbnailResultQuery = zodIsFactory(ImageThumbnailResultQueryZod)\nexport const asImageThumbnailResultQuery = zodAsFactory(ImageThumbnailResultQueryZod, 'asImageThumbnailResultQuery')\nexport const toImageThumbnailResultQuery = zodToFactory(ImageThumbnailResultQueryZod, 'toImageThumbnailResultQuery')\n", "import type { SearchableStorage } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type { DivinerConfig } from '@xyo-network/sdk'\nimport { asSchema } from '@xyo-network/sdk'\n\nimport { ImageThumbnailStateToIndexCandidateDivinerSchema } from './Schema.ts'\n\nexport type ImageThumbnailStateToIndexCandidateDivinerConfigSchema = typeof ImageThumbnailStateToIndexCandidateDivinerConfigSchema\nexport const ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n = asSchema(`${ImageThumbnailStateToIndexCandidateDivinerSchema}.config`, true)\n\nexport type ImageThumbnailStateToIndexCandidateDivinerConfig = DivinerConfig<{\n payloadDivinerLimit?: number\n /**\n * Where the diviner should look for stored thumbnails\n */\n payloadStore?: SearchableStorage\n schema: ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n}>\n", "import { ImageThumbnailDivinerSchema } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { asSchema } from '@xyo-network/sdk'\n\nexport type ImageThumbnailStateToIndexCandidateDivinerSchema = typeof ImageThumbnailStateToIndexCandidateDivinerSchema\nexport const ImageThumbnailStateToIndexCandidateDivinerSchema\n = asSchema(`${ImageThumbnailDivinerSchema}.stage.stateToIndexCandidateDiviner`, true)\n", "import {\n AsObjectFactory, assertEx, exists, filterAs,\n} from '@xylabs/sdk'\nimport type { ImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin'\nimport { ImageThumbnailSchema, isImageThumbnail } from '@xyo-network/image-thumbnail-payload-plugin'\nimport type {\n ArchivistInstance, ArchivistNextOptions, BoundWitness, DivinerInstance, ModuleState, Payload, Schema,\n} from '@xyo-network/sdk'\nimport {\n AbstractDiviner, ArchivistWrapper, asBoundWitness, DivinerWrapper, isBoundWitness, isModuleState, ModuleStateSchema, payloadSchemasContainsAll, SequenceConstants,\n} from '@xyo-network/sdk'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { isTimestamp, TimestampSchema } from '@xyo-network/witness-timestamp'\n\nimport type { ImageThumbnailDivinerStageLabels } from '../ImageThumbnailDivinerLabels.ts'\nimport { ImageThumbnailDivinerLabels } from '../ImageThumbnailDivinerLabels.ts'\nimport type { ImageThumbnailDivinerState } from '../ImageThumbnailDivinerState.ts'\nimport { ImageThumbnailStateToIndexCandidateDivinerConfigSchema } from './Config.ts'\nimport type { ImageThumbnailStateToIndexCandidateDivinerParams } from './Params.ts'\n\n/**\n * All Payload types involved in index candidates for indexing\n */\nexport type IndexCandidate = BoundWitness | ImageThumbnail | Timestamp\n\n/**\n * The response from the ImageThumbnailStateToIndexCandidateDiviner\n */\nexport type ImageThumbnailStateToIndexCandidateDivinerResponse = [\n /**\n * The next state of the diviner\n */\n nextState: ModuleState<ImageThumbnailDivinerState>,\n /**\n * The index candidates\n */\n ...IndexCandidate[],\n]\n\n/**\n * The required payload_schemas within BoundWitnesses to identify index candidates\n */\nconst payload_schemas = [ImageThumbnailSchema, TimestampSchema]\n\n/**\n * Index candidate identity functions\n */\nconst indexCandidateIdentityFunctions = [isImageThumbnail, isTimestamp] as const\nconst isIndexCandidate = (x?: unknown): x is IndexCandidate => {\n return indexCandidateIdentityFunctions.map(is => is(x)).some(Boolean)\n}\nconst asIndexCandidate = AsObjectFactory.create(isIndexCandidate)\n\n/**\n * The default order to search Bound Witnesses to identify index candidates\n */\nconst order = 'asc'\n\n/**\n * The name of the module (for logging purposes)\n */\nconst moduleName = 'ImageThumbnailStateToIndexCandidateDiviner'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class ImageThumbnailStateToIndexCandidateDiviner<\n TParams extends ImageThumbnailStateToIndexCandidateDivinerParams = ImageThumbnailStateToIndexCandidateDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ImageThumbnailStateToIndexCandidateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = ImageThumbnailStateToIndexCandidateDivinerConfigSchema\n static override readonly labels: ImageThumbnailDivinerStageLabels = {\n ...super.labels,\n ...ImageThumbnailDivinerLabels,\n 'network.xyo.diviner.stage': 'stateToIndexCandidateDiviner',\n }\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1000\n }\n\n protected static async getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined> {\n const indexes = payload_schemas.map(schema => bw.payload_schemas?.indexOf(schema))\n const hashes = indexes.map(index => bw.payload_hashes?.[index])\n const results = await archivist.get(hashes)\n const filteredResults = indexCandidateIdentityFunctions.map(is => results.find(is))\n if (filteredResults.includes(undefined)) return undefined\n const indexCandidates: IndexCandidate[] = filterAs(filteredResults, asIndexCandidate)\n return [bw, ...indexCandidates]\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<ImageThumbnailStateToIndexCandidateDivinerResponse> {\n // Retrieve the last state from what was passed in\n const lastState = payloads.find(isModuleState<ImageThumbnailDivinerState>)\n // If there is no last state, start from the beginning\n ?? { schema: ModuleStateSchema, state: { cursor: SequenceConstants.minLocalSequence } }\n\n // Get the last cursor\n const cursor = lastState?.state?.cursor\n // Get the archivist for the store\n const sourceArchivist = await this.getArchivistForStore()\n\n // Get the next batch of results\n const nextOffset: ArchivistNextOptions = { limit: this.payloadDivinerLimit, order }\n // Only use the cursor if it's a valid offset\n if (cursor !== SequenceConstants.minLocalSequence) nextOffset.cursor = cursor\n // Get next batch of results starting from the offset\n const next = await sourceArchivist.next(nextOffset)\n if (next.length === 0) return [lastState]\n\n const batch = filterAs(next, asBoundWitness)\n .filter(exists)\n .filter(bw => payloadSchemasContainsAll(bw, payload_schemas))\n // Get source data\n const boundWitnessCandidates = await Promise.all(\n batch\n .filter(isBoundWitness)\n .map(bw => ImageThumbnailStateToIndexCandidateDiviner.getPayloadsInBoundWitness(bw, sourceArchivist)),\n )\n const indexCandidates: IndexCandidate[] = boundWitnessCandidates\n .filter(exists)\n .flat()\n const nextCursor = assertEx(next.at(-1)?._sequence, () => `${moduleName}: Expected next to have a sequence`)\n const nextState: ModuleState<ImageThumbnailDivinerState> = { schema: ModuleStateSchema, state: { ...lastState.state, cursor: nextCursor } }\n return [nextState, ...indexCandidates]\n }\n\n /**\n * Retrieves the archivist for the payloadStore\n * @returns The archivist for the payloadStore\n */\n protected async getArchivistForStore() {\n const name = assertEx(this.config?.payloadStore?.archivist, () => `${moduleName}: Config for payloadStore.archivist not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve payloadStore.archivist`)\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the payloadStore\n * @returns The BoundWitness Diviner for the payloadStore\n */\n protected async getBoundWitnessDivinerForStore(): Promise<DivinerInstance> {\n const name = assertEx(\n this.config?.payloadStore?.boundWitnessDiviner,\n () => `${moduleName}: Config for payloadStore.boundWitnessDiviner not specified`,\n )\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve payloadStore.boundWitnessDiviner`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,uBAAuB;;;ACazB,IAAM,8BAA2D,EAAE,+BAA+B,UAAU;;;ADR5G,IAAM,wBAAN,cAAoC,gBAAqD;AAAA,EAC9F,OAAyB,SAAsC,EAAE,GAAG,MAAM,QAAQ,GAAG,4BAA4B;AACnH;;;AEDA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EACE;AAAA,EAAiB;AAAA,EAAqB;AAAA,EAAgB;AAAA,OACjD;AACP,SAAS,iBAAiB;AAE1B,SAAS,aAAa,uBAAuB;AAQtC,IAAM,2DAAN,cAAuE,gBAAgB;AAAA,EAC5F,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,mBAAmB;AAAA,EAC/F,OAAyB,sBAA8B;AAAA,EACvD,OAAyB,SAA2C;AAAA,IAClE,GAAG,MAAM;AAAA,IACT,GAAG;AAAA,IACH,6BAA6B;AAAA,EAC/B;AAAA,EAEA,MAAyB,cAAc,WAAsB,CAAC,GAAsD;AAClH,UAAM,MAAsB,SAAS,OAAO,cAAc;AAC1D,UAAM,yBAA2C,SAAS,OAAO,gBAAgB;AACjF,UAAM,oBAAiC,SAAS,OAAO,WAAW;AAClE,QAAI,IAAI,SAAS,KAAK,uBAAuB,SAAS,KAAK,kBAAkB,SAAS,GAAG;AACvF,YAAM,oBAA6C,MAAM,eAAe,cAAc,QAAQ;AAE9F,YAAM,SAAsD,IAAI;AAAA,QAC9D,CAAC,KAAK,SAAS;AACb,gBAAM,sBA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|
6
6
|
"names": ["AbstractDiviner", "DivinerConfigSchema", "PayloadBuilder", "UrlSchema", "AbstractDiviner", "DivinerConfigSchema", "PayloadBuilder", "UrlSchema", "isImageThumbnailDivinerQuery", "AbstractDiviner", "DivinerConfigSchema", "PayloadBuilder", "UrlSchema", "AbstractDiviner", "DivinerConfigSchema", "isImageThumbnailDivinerQuery", "order", "UrlSchema", "PayloadBuilder", "asSchema", "asSchema", "exists", "ImageThumbnailSchema", "isImageThumbnail", "AbstractDiviner", "isBoundWitness", "isTimestamp", "TimestampSchema", "ImageThumbnailSchema", "TimestampSchema", "isImageThumbnail", "isTimestamp", "AbstractDiviner", "exists", "isBoundWitness"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-image-thumbnail",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -31,63 +31,62 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@xyo-network/image-thumbnail-payload-plugin": "~7.0.
|
|
35
|
-
"@xyo-network/url-payload-plugin": "~7.0.
|
|
34
|
+
"@xyo-network/image-thumbnail-payload-plugin": "~7.0.1",
|
|
35
|
+
"@xyo-network/url-payload-plugin": "~7.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@bitauth/libauth": "~3.0.0",
|
|
39
|
-
"@metamask/providers": "^22.1.1",
|
|
40
39
|
"@noble/post-quantum": "~0.6.1",
|
|
41
40
|
"@opentelemetry/api": "^1.9.1",
|
|
42
41
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
43
42
|
"@scure/base": "^2.2.0",
|
|
44
43
|
"@scure/bip39": "~2.2.0",
|
|
45
|
-
"@xylabs/geo": "^
|
|
46
|
-
"@xylabs/sdk
|
|
47
|
-
"@xylabs/threads": "^
|
|
48
|
-
"@xylabs/toolchain": "~8.
|
|
49
|
-
"@xylabs/tsconfig": "~8.
|
|
50
|
-
"@xylabs/vitest-extended": "^
|
|
51
|
-
"@xyo-network/diviner-boundwitness": "^7.0.
|
|
52
|
-
"@xyo-network/diviner-indexing": "~7.0",
|
|
53
|
-
"@xyo-network/diviner-payload-generic": "^7.0.
|
|
54
|
-
"@xyo-network/diviner-payload-model": "^7.0.
|
|
55
|
-
"@xyo-network/payload-utils": "~7.0",
|
|
56
|
-
"@xyo-network/sdk
|
|
57
|
-
"@xyo-network/sdk-protocol
|
|
58
|
-
"@xyo-network/witness-timestamp": "^7.0.
|
|
44
|
+
"@xylabs/geo": "^7.0.1",
|
|
45
|
+
"@xylabs/sdk": "^7.0.1",
|
|
46
|
+
"@xylabs/threads": "^7.0.1",
|
|
47
|
+
"@xylabs/toolchain": "~8.5.3",
|
|
48
|
+
"@xylabs/tsconfig": "~8.5.3",
|
|
49
|
+
"@xylabs/vitest-extended": "^7.0.1",
|
|
50
|
+
"@xyo-network/diviner-boundwitness": "^7.0.3",
|
|
51
|
+
"@xyo-network/diviner-indexing": "~7.0.3",
|
|
52
|
+
"@xyo-network/diviner-payload-generic": "^7.0.3",
|
|
53
|
+
"@xyo-network/diviner-payload-model": "^7.0.3",
|
|
54
|
+
"@xyo-network/payload-utils": "~7.0.4",
|
|
55
|
+
"@xyo-network/sdk": "~7.0.3",
|
|
56
|
+
"@xyo-network/sdk-protocol": "^7.0.4",
|
|
57
|
+
"@xyo-network/witness-timestamp": "^7.0.3",
|
|
59
58
|
"ajv": "^8.20.0",
|
|
60
59
|
"async-mutex": "^0.5.0",
|
|
60
|
+
"browserslist": "4.28.4",
|
|
61
61
|
"debug": "~4.4.3",
|
|
62
|
-
"eslint": "^10.
|
|
63
|
-
"
|
|
62
|
+
"eslint": "^10.6.0",
|
|
63
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
64
|
+
"ethers": "^6.17.0",
|
|
64
65
|
"hash-wasm": "^4.12.0",
|
|
65
66
|
"idb": "^8.0.3",
|
|
66
67
|
"jsonpath-plus": "^10.4.0",
|
|
67
68
|
"lru-cache": "^11.5.1",
|
|
68
69
|
"observable-fns": "~0.6.1",
|
|
69
70
|
"typescript": "~6.0.3",
|
|
70
|
-
"vite": "^8.0
|
|
71
|
+
"vite": "^8.1.0",
|
|
71
72
|
"vitest": "^4.1.9",
|
|
72
|
-
"webextension-polyfill": "^0.12.0",
|
|
73
73
|
"zod": "^4.4.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@bitauth/libauth": "~3.0",
|
|
77
|
-
"@metamask/providers": "^22.1",
|
|
78
77
|
"@noble/post-quantum": "~0.6.1",
|
|
79
78
|
"@opentelemetry/api": "^1.9",
|
|
80
79
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
81
80
|
"@scure/base": "^2.2",
|
|
82
81
|
"@scure/bip39": "~2.2",
|
|
83
|
-
"@xylabs/geo": "^
|
|
84
|
-
"@xylabs/sdk
|
|
85
|
-
"@xylabs/threads": "^
|
|
82
|
+
"@xylabs/geo": "^7.0",
|
|
83
|
+
"@xylabs/sdk": "^7.0",
|
|
84
|
+
"@xylabs/threads": "^7.0",
|
|
86
85
|
"@xyo-network/diviner-indexing": "^7.0",
|
|
87
86
|
"@xyo-network/diviner-payload-model": "^7.0",
|
|
88
87
|
"@xyo-network/payload-utils": "~7.0",
|
|
89
|
-
"@xyo-network/sdk
|
|
90
|
-
"@xyo-network/sdk-protocol
|
|
88
|
+
"@xyo-network/sdk": "^7.0",
|
|
89
|
+
"@xyo-network/sdk-protocol": "^7.0",
|
|
91
90
|
"@xyo-network/witness-timestamp": "^7.0",
|
|
92
91
|
"ajv": "^8.20",
|
|
93
92
|
"async-mutex": "^0.5",
|
|
@@ -98,7 +97,6 @@
|
|
|
98
97
|
"jsonpath-plus": "^10.3",
|
|
99
98
|
"lru-cache": "^11.3",
|
|
100
99
|
"observable-fns": "~0.6",
|
|
101
|
-
"webextension-polyfill": "^0.12",
|
|
102
100
|
"zod": "^4.4"
|
|
103
101
|
},
|
|
104
102
|
"engines": {
|