@xyo-network/diviner-indexing-memory 2.111.3 → 3.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/index.d.ts +158 -2
- package/package.json +21 -40
- package/xy.config.ts +12 -0
- package/dist/browser/Diviner.d.cts +0 -102
- package/dist/browser/Diviner.d.cts.map +0 -1
- package/dist/browser/Diviner.d.mts +0 -102
- package/dist/browser/Diviner.d.mts.map +0 -1
- package/dist/browser/Diviner.d.ts +0 -102
- package/dist/browser/Diviner.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -238
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.mjs +0 -217
- package/dist/browser/index.mjs.map +0 -1
- package/dist/neutral/Diviner.d.cts +0 -102
- package/dist/neutral/Diviner.d.cts.map +0 -1
- package/dist/neutral/Diviner.d.mts +0 -102
- package/dist/neutral/Diviner.d.mts.map +0 -1
- package/dist/neutral/Diviner.d.ts +0 -102
- package/dist/neutral/Diviner.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -238
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/node/Diviner.d.cts +0 -102
- package/dist/node/Diviner.d.cts.map +0 -1
- package/dist/node/Diviner.d.mts +0 -102
- package/dist/node/Diviner.d.mts.map +0 -1
- package/dist/node/Diviner.d.ts +0 -102
- package/dist/node/Diviner.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -254
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.mjs +0 -229
- package/dist/node/index.mjs.map +0 -1
package/dist/node/Diviner.d.cts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
2
|
-
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
3
|
-
import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
|
|
4
|
-
import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
5
|
-
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
6
|
-
import { ModuleState } from '@xyo-network/module-model';
|
|
7
|
-
import { Payload, Schema, WithMeta } from '@xyo-network/payload-model';
|
|
8
|
-
export type ConfigStoreKey = 'indexStore' | 'stateStore';
|
|
9
|
-
export type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
|
|
10
|
-
export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, 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> {
|
|
11
|
-
static readonly allowRandomAccount = false;
|
|
12
|
-
static readonly configSchemas: Schema[];
|
|
13
|
-
static readonly defaultConfigSchema: Schema;
|
|
14
|
-
private _lastState?;
|
|
15
|
-
private _pollId?;
|
|
16
|
-
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number;
|
|
18
|
-
protected backgroundDivine: () => Promise<void>;
|
|
19
|
-
protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
|
|
20
|
-
protected divineHandler(payloads?: TIn[]): Promise<WithMeta<TOut>[]>;
|
|
21
|
-
protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule<import("@xylabs/object").BaseParamsFields & {
|
|
22
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
23
|
-
addToResolvers?: boolean;
|
|
24
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
25
|
-
allowNameResolution?: boolean;
|
|
26
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
27
|
-
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
28
|
-
requireAllParents?: boolean;
|
|
29
|
-
schema: "network.xyo.archivist.config";
|
|
30
|
-
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
31
|
-
storeParentReads?: boolean;
|
|
32
|
-
}, "schema"> & {
|
|
33
|
-
schema: "network.xyo.archivist.config";
|
|
34
|
-
}, "schema"> & {
|
|
35
|
-
schema: string;
|
|
36
|
-
};
|
|
37
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
38
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
39
|
-
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
|
|
40
|
-
protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
41
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
42
|
-
addToResolvers?: boolean;
|
|
43
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
44
|
-
allowNameResolution?: boolean;
|
|
45
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
46
|
-
schema: "network.xyo.diviner.config";
|
|
47
|
-
}, "schema"> & {
|
|
48
|
-
schema: "network.xyo.diviner.config";
|
|
49
|
-
}, "schema"> & {
|
|
50
|
-
schema: string;
|
|
51
|
-
};
|
|
52
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
53
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
54
|
-
}, DivinerModuleEventData>, {
|
|
55
|
-
schema: string;
|
|
56
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
57
|
-
schema: string;
|
|
58
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
59
|
-
protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xylabs/object").BaseParamsFields & {
|
|
60
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
61
|
-
addToResolvers?: boolean;
|
|
62
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
63
|
-
allowNameResolution?: boolean;
|
|
64
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
65
|
-
schema: "network.xyo.diviner.config";
|
|
66
|
-
}, "schema"> & {
|
|
67
|
-
schema: "network.xyo.diviner.config";
|
|
68
|
-
}, "schema"> & {
|
|
69
|
-
schema: string;
|
|
70
|
-
};
|
|
71
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
72
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
73
|
-
}, {
|
|
74
|
-
schema: string;
|
|
75
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
76
|
-
schema: string;
|
|
77
|
-
} & import("@xyo-network/payload-model").PayloadFields, DivinerModuleEventData>>;
|
|
78
|
-
protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
79
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
80
|
-
addToResolvers?: boolean;
|
|
81
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
82
|
-
allowNameResolution?: boolean;
|
|
83
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
84
|
-
schema: "network.xyo.diviner.config";
|
|
85
|
-
}, "schema"> & {
|
|
86
|
-
schema: "network.xyo.diviner.config";
|
|
87
|
-
}, "schema"> & {
|
|
88
|
-
schema: string;
|
|
89
|
-
};
|
|
90
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
91
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
92
|
-
}, DivinerModuleEventData>, {
|
|
93
|
-
schema: string;
|
|
94
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
95
|
-
schema: string;
|
|
96
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
97
|
-
protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
|
|
98
|
-
protected startHandler(): Promise<boolean>;
|
|
99
|
-
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
100
|
-
private poll;
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EACL,qBAAqB,EAErB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAqB,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAyD,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAEjI,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAEtE,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,YAAY,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,cAAc,CAAC,CAAA;AAI9E,qBACa,eAAe,CAC1B,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAC7D,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;IACvD,gBAAyB,kBAAkB,SAAQ;IACnD,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAwD;IACxG,gBAAyB,mBAAmB,EAAE,MAAM,CAA8B;IAElF,OAAO,CAAC,UAAU,CAAC,CAAmC;IACtD,OAAO,CAAC,OAAO,CAAC,CAAQ;IAExB,IAAI,mBAAmB,WAEtB;IAED,IAAI,aAAa,WAEhB;IAMD,SAAS,CAAC,gBAAgB,QAAa,OAAO,CAAC,IAAI,CAAC,CAmBnD;cASe,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;cA2BvE,oBAAoB,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAWvC,8BAA8B,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAWjD,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;cAcvD,yBAAyB,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAU5C,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cA0C9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrF,OAAO,CAAC,IAAI;CAcb"}
|
package/dist/node/Diviner.d.mts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
2
|
-
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
3
|
-
import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
|
|
4
|
-
import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
5
|
-
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
6
|
-
import { ModuleState } from '@xyo-network/module-model';
|
|
7
|
-
import { Payload, Schema, WithMeta } from '@xyo-network/payload-model';
|
|
8
|
-
export type ConfigStoreKey = 'indexStore' | 'stateStore';
|
|
9
|
-
export type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
|
|
10
|
-
export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, 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> {
|
|
11
|
-
static readonly allowRandomAccount = false;
|
|
12
|
-
static readonly configSchemas: Schema[];
|
|
13
|
-
static readonly defaultConfigSchema: Schema;
|
|
14
|
-
private _lastState?;
|
|
15
|
-
private _pollId?;
|
|
16
|
-
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number;
|
|
18
|
-
protected backgroundDivine: () => Promise<void>;
|
|
19
|
-
protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
|
|
20
|
-
protected divineHandler(payloads?: TIn[]): Promise<WithMeta<TOut>[]>;
|
|
21
|
-
protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule<import("@xylabs/object").BaseParamsFields & {
|
|
22
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
23
|
-
addToResolvers?: boolean;
|
|
24
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
25
|
-
allowNameResolution?: boolean;
|
|
26
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
27
|
-
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
28
|
-
requireAllParents?: boolean;
|
|
29
|
-
schema: "network.xyo.archivist.config";
|
|
30
|
-
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
31
|
-
storeParentReads?: boolean;
|
|
32
|
-
}, "schema"> & {
|
|
33
|
-
schema: "network.xyo.archivist.config";
|
|
34
|
-
}, "schema"> & {
|
|
35
|
-
schema: string;
|
|
36
|
-
};
|
|
37
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
38
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
39
|
-
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
|
|
40
|
-
protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
41
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
42
|
-
addToResolvers?: boolean;
|
|
43
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
44
|
-
allowNameResolution?: boolean;
|
|
45
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
46
|
-
schema: "network.xyo.diviner.config";
|
|
47
|
-
}, "schema"> & {
|
|
48
|
-
schema: "network.xyo.diviner.config";
|
|
49
|
-
}, "schema"> & {
|
|
50
|
-
schema: string;
|
|
51
|
-
};
|
|
52
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
53
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
54
|
-
}, DivinerModuleEventData>, {
|
|
55
|
-
schema: string;
|
|
56
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
57
|
-
schema: string;
|
|
58
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
59
|
-
protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xylabs/object").BaseParamsFields & {
|
|
60
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
61
|
-
addToResolvers?: boolean;
|
|
62
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
63
|
-
allowNameResolution?: boolean;
|
|
64
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
65
|
-
schema: "network.xyo.diviner.config";
|
|
66
|
-
}, "schema"> & {
|
|
67
|
-
schema: "network.xyo.diviner.config";
|
|
68
|
-
}, "schema"> & {
|
|
69
|
-
schema: string;
|
|
70
|
-
};
|
|
71
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
72
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
73
|
-
}, {
|
|
74
|
-
schema: string;
|
|
75
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
76
|
-
schema: string;
|
|
77
|
-
} & import("@xyo-network/payload-model").PayloadFields, DivinerModuleEventData>>;
|
|
78
|
-
protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
79
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
80
|
-
addToResolvers?: boolean;
|
|
81
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
82
|
-
allowNameResolution?: boolean;
|
|
83
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
84
|
-
schema: "network.xyo.diviner.config";
|
|
85
|
-
}, "schema"> & {
|
|
86
|
-
schema: "network.xyo.diviner.config";
|
|
87
|
-
}, "schema"> & {
|
|
88
|
-
schema: string;
|
|
89
|
-
};
|
|
90
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
91
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
92
|
-
}, DivinerModuleEventData>, {
|
|
93
|
-
schema: string;
|
|
94
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
95
|
-
schema: string;
|
|
96
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
97
|
-
protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
|
|
98
|
-
protected startHandler(): Promise<boolean>;
|
|
99
|
-
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
100
|
-
private poll;
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,E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AAC,gBAAgB,QAAa,OAAO,CAAC,IAAI,CAAC,CAmBnD;cASe,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;cA2BvE,oBAAoB,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAWvC,8BAA8B,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAWjD,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;cAcvD,yBAAyB,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAU5C,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cA0C9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrF,OAAO,CAAC,IAAI;CAcb"}
|
package/dist/node/Diviner.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
|
|
2
|
-
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
3
|
-
import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
|
|
4
|
-
import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
5
|
-
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
6
|
-
import { ModuleState } from '@xyo-network/module-model';
|
|
7
|
-
import { Payload, Schema, WithMeta } from '@xyo-network/payload-model';
|
|
8
|
-
export type ConfigStoreKey = 'indexStore' | 'stateStore';
|
|
9
|
-
export type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
|
|
10
|
-
export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, 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> {
|
|
11
|
-
static readonly allowRandomAccount = false;
|
|
12
|
-
static readonly configSchemas: Schema[];
|
|
13
|
-
static readonly defaultConfigSchema: Schema;
|
|
14
|
-
private _lastState?;
|
|
15
|
-
private _pollId?;
|
|
16
|
-
get payloadDivinerLimit(): number;
|
|
17
|
-
get pollFrequency(): number;
|
|
18
|
-
protected backgroundDivine: () => Promise<void>;
|
|
19
|
-
protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
|
|
20
|
-
protected divineHandler(payloads?: TIn[]): Promise<WithMeta<TOut>[]>;
|
|
21
|
-
protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule<import("@xylabs/object").BaseParamsFields & {
|
|
22
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
23
|
-
addToResolvers?: boolean;
|
|
24
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
25
|
-
allowNameResolution?: boolean;
|
|
26
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
27
|
-
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
28
|
-
requireAllParents?: boolean;
|
|
29
|
-
schema: "network.xyo.archivist.config";
|
|
30
|
-
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
31
|
-
storeParentReads?: boolean;
|
|
32
|
-
}, "schema"> & {
|
|
33
|
-
schema: "network.xyo.archivist.config";
|
|
34
|
-
}, "schema"> & {
|
|
35
|
-
schema: string;
|
|
36
|
-
};
|
|
37
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
38
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
39
|
-
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
|
|
40
|
-
protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
41
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
42
|
-
addToResolvers?: boolean;
|
|
43
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
44
|
-
allowNameResolution?: boolean;
|
|
45
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
46
|
-
schema: "network.xyo.diviner.config";
|
|
47
|
-
}, "schema"> & {
|
|
48
|
-
schema: "network.xyo.diviner.config";
|
|
49
|
-
}, "schema"> & {
|
|
50
|
-
schema: string;
|
|
51
|
-
};
|
|
52
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
53
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
54
|
-
}, DivinerModuleEventData>, {
|
|
55
|
-
schema: string;
|
|
56
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
57
|
-
schema: string;
|
|
58
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
59
|
-
protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xylabs/object").BaseParamsFields & {
|
|
60
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
61
|
-
addToResolvers?: boolean;
|
|
62
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
63
|
-
allowNameResolution?: boolean;
|
|
64
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
65
|
-
schema: "network.xyo.diviner.config";
|
|
66
|
-
}, "schema"> & {
|
|
67
|
-
schema: "network.xyo.diviner.config";
|
|
68
|
-
}, "schema"> & {
|
|
69
|
-
schema: string;
|
|
70
|
-
};
|
|
71
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
72
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
73
|
-
}, {
|
|
74
|
-
schema: string;
|
|
75
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
76
|
-
schema: string;
|
|
77
|
-
} & import("@xyo-network/payload-model").PayloadFields, DivinerModuleEventData>>;
|
|
78
|
-
protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
|
|
79
|
-
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
80
|
-
addToResolvers?: boolean;
|
|
81
|
-
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
82
|
-
allowNameResolution?: boolean;
|
|
83
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
84
|
-
schema: "network.xyo.diviner.config";
|
|
85
|
-
}, "schema"> & {
|
|
86
|
-
schema: "network.xyo.diviner.config";
|
|
87
|
-
}, "schema"> & {
|
|
88
|
-
schema: string;
|
|
89
|
-
};
|
|
90
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
91
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
92
|
-
}, DivinerModuleEventData>, {
|
|
93
|
-
schema: string;
|
|
94
|
-
} & import("@xyo-network/payload-model").PayloadFields, {
|
|
95
|
-
schema: string;
|
|
96
|
-
} & import("@xyo-network/payload-model").PayloadFields>>;
|
|
97
|
-
protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
|
|
98
|
-
protected startHandler(): Promise<boolean>;
|
|
99
|
-
protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
|
|
100
|
-
private poll;
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EACL,qBAAqB,EAErB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAqB,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAyD,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAEjI,OAAO,EAA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E,oBAAoB;;;;;;;;;;;;;;;;;;;cAcvD,yBAAyB,CAAC,KAAK,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAU5C,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cA0C9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrF,OAAO,CAAC,IAAI;CAcb"}
|
package/dist/node/index.cjs
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __reflectGet = Reflect.get;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name in all)
|
|
12
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24
|
-
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
25
|
-
|
|
26
|
-
// src/index.ts
|
|
27
|
-
var src_exports = {};
|
|
28
|
-
__export(src_exports, {
|
|
29
|
-
IndexingDiviner: () => IndexingDiviner
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(src_exports);
|
|
32
|
-
|
|
33
|
-
// src/Diviner.ts
|
|
34
|
-
var import_assert = require("@xylabs/assert");
|
|
35
|
-
var import_timer = require("@xylabs/timer");
|
|
36
|
-
var import_archivist_wrapper = require("@xyo-network/archivist-wrapper");
|
|
37
|
-
var import_boundwitness_builder = require("@xyo-network/boundwitness-builder");
|
|
38
|
-
var import_boundwitness_model = require("@xyo-network/boundwitness-model");
|
|
39
|
-
var import_diviner_abstract = require("@xyo-network/diviner-abstract");
|
|
40
|
-
var import_diviner_boundwitness_model = require("@xyo-network/diviner-boundwitness-model");
|
|
41
|
-
var import_diviner_indexing_model = require("@xyo-network/diviner-indexing-model");
|
|
42
|
-
var import_diviner_model = require("@xyo-network/diviner-model");
|
|
43
|
-
var import_diviner_wrapper = require("@xyo-network/diviner-wrapper");
|
|
44
|
-
var import_module_model = require("@xyo-network/module-model");
|
|
45
|
-
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
46
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
47
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
48
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
49
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
50
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
51
|
-
}
|
|
52
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
53
|
-
var moduleName = "IndexingDiviner";
|
|
54
|
-
var _IndexingDiviner = class _IndexingDiviner extends import_diviner_abstract.AbstractDiviner {
|
|
55
|
-
_lastState;
|
|
56
|
-
_pollId;
|
|
57
|
-
get payloadDivinerLimit() {
|
|
58
|
-
return this.config.payloadDivinerLimit ?? 1e3;
|
|
59
|
-
}
|
|
60
|
-
get pollFrequency() {
|
|
61
|
-
return this.config.pollFrequency ?? 1e4;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Works via batched iteration of the source archivist to populate the index.
|
|
65
|
-
* @returns A promise that resolves when the background process is complete
|
|
66
|
-
*/
|
|
67
|
-
backgroundDivine = /* @__PURE__ */ __name(async () => {
|
|
68
|
-
const lastState = await this.retrieveState();
|
|
69
|
-
const indexCandidateDiviner = await this.getIndexingDivinerStage("stateToIndexCandidateDiviner");
|
|
70
|
-
const results = lastState ? await indexCandidateDiviner.divine([
|
|
71
|
-
lastState
|
|
72
|
-
]) : await indexCandidateDiviner.divine();
|
|
73
|
-
const nextState = results.find(import_module_model.isModuleStateWithMeta);
|
|
74
|
-
const indexCandidates = results.filter((x) => !(0, import_module_model.isModuleStateWithMeta)(x));
|
|
75
|
-
const toIndexTransformDiviner = await this.getIndexingDivinerStage("indexCandidateToIndexDiviner");
|
|
76
|
-
const indexes = await toIndexTransformDiviner.divine(indexCandidates);
|
|
77
|
-
const indexArchivist = await this.getArchivistForStore("indexStore");
|
|
78
|
-
await indexArchivist.insert(indexes);
|
|
79
|
-
if (nextState) {
|
|
80
|
-
await this.commitState(nextState);
|
|
81
|
-
}
|
|
82
|
-
}, "backgroundDivine");
|
|
83
|
-
/**
|
|
84
|
-
* Commit the internal state of the Diviner process. This is similar
|
|
85
|
-
* to a transaction completion in a database and should only be called
|
|
86
|
-
* when results have been successfully persisted to the appropriate
|
|
87
|
-
* external stores.
|
|
88
|
-
* @param nextState The state to commit
|
|
89
|
-
*/
|
|
90
|
-
async commitState(nextState) {
|
|
91
|
-
var _a;
|
|
92
|
-
if (nextState.state.offset === ((_a = this._lastState) == null ? void 0 : _a.state.offset)) return;
|
|
93
|
-
this._lastState = nextState;
|
|
94
|
-
const archivist = await this.getArchivistForStore("stateStore");
|
|
95
|
-
const [bw] = await new import_boundwitness_builder.BoundWitnessBuilder().payload(nextState).signer(this.account).build();
|
|
96
|
-
await archivist.insert([
|
|
97
|
-
bw,
|
|
98
|
-
nextState
|
|
99
|
-
]);
|
|
100
|
-
}
|
|
101
|
-
async divineHandler(payloads = []) {
|
|
102
|
-
const indexPayloadDiviner = await this.getPayloadDivinerForStore("indexStore");
|
|
103
|
-
const divinerQueryToIndexQueryDiviner = await this.getIndexingDivinerStage("divinerQueryToIndexQueryDiviner");
|
|
104
|
-
const indexQueryResponseToDivinerQueryResponseDiviner = await this.getIndexingDivinerStage("indexQueryResponseToDivinerQueryResponseDiviner");
|
|
105
|
-
const results = (await Promise.all(payloads.map(async (payload) => {
|
|
106
|
-
const indexQuery = await divinerQueryToIndexQueryDiviner.divine([
|
|
107
|
-
payload
|
|
108
|
-
]);
|
|
109
|
-
const indexedResults = await indexPayloadDiviner.divine(indexQuery);
|
|
110
|
-
const response = await Promise.all(indexedResults.flat().map((indexedResult) => indexQueryResponseToDivinerQueryResponseDiviner.divine([
|
|
111
|
-
payload,
|
|
112
|
-
indexedResult
|
|
113
|
-
])));
|
|
114
|
-
return response.flat();
|
|
115
|
-
}))).flat();
|
|
116
|
-
return await Promise.all(results.map((result) => import_payload_builder.PayloadBuilder.build(result)));
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Retrieves the archivist for the specified store
|
|
120
|
-
* @param store The store to retrieve the archivist for
|
|
121
|
-
* @returns The archivist for the specified store
|
|
122
|
-
*/
|
|
123
|
-
async getArchivistForStore(store) {
|
|
124
|
-
var _a, _b;
|
|
125
|
-
const name = (0, import_assert.assertEx)((_b = (_a = this.config) == null ? void 0 : _a[store]) == null ? void 0 : _b.archivist, () => `${moduleName}: Config for ${store}.archivist not specified`);
|
|
126
|
-
const mod = (0, import_assert.assertEx)(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.archivist [${name}]`);
|
|
127
|
-
return import_archivist_wrapper.ArchivistWrapper.wrap(mod, this.account);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Retrieves the BoundWitness Diviner for the specified store
|
|
131
|
-
* @param store The store to retrieve the BoundWitness Diviner for
|
|
132
|
-
* @returns The BoundWitness Diviner for the specified store
|
|
133
|
-
*/
|
|
134
|
-
async getBoundWitnessDivinerForStore(store) {
|
|
135
|
-
var _a, _b;
|
|
136
|
-
const name = (0, import_assert.assertEx)((_b = (_a = this.config) == null ? void 0 : _a[store]) == null ? void 0 : _b.boundWitnessDiviner, () => `${moduleName}: Config for ${store}.boundWitnessDiviner not specified`);
|
|
137
|
-
const mod = (0, import_assert.assertEx)(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.boundWitnessDiviner [${name}]`);
|
|
138
|
-
return import_diviner_wrapper.DivinerWrapper.wrap(mod, this.account);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Gets the Diviner for the supplied Indexing Diviner stage
|
|
142
|
-
* @param transform The Indexing Diviner stage
|
|
143
|
-
* @returns The diviner corresponding to the Indexing Diviner stage
|
|
144
|
-
*/
|
|
145
|
-
async getIndexingDivinerStage(transform) {
|
|
146
|
-
var _a, _b;
|
|
147
|
-
const nameOrAddress = (0, import_assert.assertEx)((_b = (_a = this.config) == null ? void 0 : _a.indexingDivinerStages) == null ? void 0 : _b[transform], () => `${moduleName}: Config for indexingDivinerStages.${transform} not specified`);
|
|
148
|
-
const mod = await this.resolve(nameOrAddress);
|
|
149
|
-
return (0, import_assert.assertEx)((0, import_diviner_model.asDivinerInstance)(mod), () => `${moduleName}: Failed to resolve indexing diviner stage for ${transform}`);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Retrieves the Payload Diviner for the specified store
|
|
153
|
-
* @param store The store to retrieve the Payload Diviner for
|
|
154
|
-
* @returns The Payload Diviner for the specified store
|
|
155
|
-
*/
|
|
156
|
-
async getPayloadDivinerForStore(store) {
|
|
157
|
-
var _a, _b;
|
|
158
|
-
const name = (0, import_assert.assertEx)((_b = (_a = this.config) == null ? void 0 : _a[store]) == null ? void 0 : _b.payloadDiviner, () => `${moduleName}: Config for ${store}.payloadDiviner not specified`);
|
|
159
|
-
const mod = (0, import_assert.assertEx)(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.payloadDiviner [${name}]`);
|
|
160
|
-
return import_diviner_wrapper.DivinerWrapper.wrap(mod, this.account);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
164
|
-
* preemptions, reboots, etc.
|
|
165
|
-
*/
|
|
166
|
-
async retrieveState() {
|
|
167
|
-
const accountAddress = this.account.address;
|
|
168
|
-
if (this._lastState) return this._lastState;
|
|
169
|
-
let hash = "";
|
|
170
|
-
const diviner = await this.getBoundWitnessDivinerForStore("stateStore");
|
|
171
|
-
const query = await new import_payload_builder.PayloadBuilder({
|
|
172
|
-
schema: import_diviner_boundwitness_model.BoundWitnessDivinerQuerySchema
|
|
173
|
-
}).fields({
|
|
174
|
-
address: accountAddress,
|
|
175
|
-
limit: 1,
|
|
176
|
-
offset: 0,
|
|
177
|
-
order: "desc",
|
|
178
|
-
payload_schemas: [
|
|
179
|
-
import_module_model.ModuleStateSchema
|
|
180
|
-
]
|
|
181
|
-
}).build();
|
|
182
|
-
const boundWitnesses = await diviner.divine([
|
|
183
|
-
query
|
|
184
|
-
]);
|
|
185
|
-
if (boundWitnesses.length > 0) {
|
|
186
|
-
const boundWitness = boundWitnesses[0];
|
|
187
|
-
if ((0, import_boundwitness_model.isBoundWitness)(boundWitness)) {
|
|
188
|
-
hash = boundWitness.addresses.map((address, index) => ({
|
|
189
|
-
address,
|
|
190
|
-
index
|
|
191
|
-
})).filter(({ address }) => address === accountAddress).reduce((prev, curr) => {
|
|
192
|
-
var _a;
|
|
193
|
-
return ((_a = boundWitness.payload_schemas) == null ? void 0 : _a[curr == null ? void 0 : curr.index]) === import_module_model.ModuleStateSchema ? boundWitness.payload_hashes[curr == null ? void 0 : curr.index] : prev;
|
|
194
|
-
}, "");
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (hash !== "") {
|
|
198
|
-
const archivist = await this.getArchivistForStore("stateStore");
|
|
199
|
-
const payload = (await archivist.get([
|
|
200
|
-
hash
|
|
201
|
-
])).find(import_module_model.isModuleState);
|
|
202
|
-
if (payload) {
|
|
203
|
-
return payload;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return void 0;
|
|
207
|
-
}
|
|
208
|
-
async startHandler() {
|
|
209
|
-
await super.startHandler();
|
|
210
|
-
this.poll();
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
|
-
async stopHandler(_timeout) {
|
|
214
|
-
if (this._pollId) {
|
|
215
|
-
clearTimeout(this._pollId);
|
|
216
|
-
this._pollId = void 0;
|
|
217
|
-
}
|
|
218
|
-
return await super.stopHandler();
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Runs the background divine process on a loop with a delay
|
|
222
|
-
* specified by the `config.pollFrequency`
|
|
223
|
-
*/
|
|
224
|
-
poll() {
|
|
225
|
-
this._pollId = (0, import_timer.setTimeoutEx)(async () => {
|
|
226
|
-
try {
|
|
227
|
-
await Promise.resolve();
|
|
228
|
-
await this.backgroundDivine();
|
|
229
|
-
} catch (e) {
|
|
230
|
-
console.log(e);
|
|
231
|
-
} finally {
|
|
232
|
-
if (this._pollId) (0, import_timer.clearTimeoutEx)(this._pollId);
|
|
233
|
-
this._pollId = void 0;
|
|
234
|
-
this.poll();
|
|
235
|
-
}
|
|
236
|
-
}, this.pollFrequency);
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
__name(_IndexingDiviner, "IndexingDiviner");
|
|
240
|
-
__publicField(_IndexingDiviner, "allowRandomAccount", false);
|
|
241
|
-
__publicField(_IndexingDiviner, "configSchemas", [
|
|
242
|
-
...__superGet(_IndexingDiviner, _IndexingDiviner, "configSchemas"),
|
|
243
|
-
import_diviner_indexing_model.IndexingDivinerConfigSchema
|
|
244
|
-
]);
|
|
245
|
-
__publicField(_IndexingDiviner, "defaultConfigSchema", import_diviner_indexing_model.IndexingDivinerConfigSchema);
|
|
246
|
-
var IndexingDiviner = _IndexingDiviner;
|
|
247
|
-
IndexingDiviner = _ts_decorate([
|
|
248
|
-
(0, import_module_model.creatableModule)()
|
|
249
|
-
], IndexingDiviner);
|
|
250
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
251
|
-
0 && (module.exports = {
|
|
252
|
-
IndexingDiviner
|
|
253
|
-
});
|
|
254
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/node/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Diviner.ts"],"sourcesContent":["export * from './Diviner.ts'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { clearTimeoutEx, setTimeoutEx } from '@xylabs/timer'\nimport { ArchivistWrapper } from '@xyo-network/archivist-wrapper'\nimport { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { BoundWitnessDivinerQueryPayload, BoundWitnessDivinerQuerySchema } from '@xyo-network/diviner-boundwitness-model'\nimport {\n IndexingDivinerConfig,\n IndexingDivinerConfigSchema,\n IndexingDivinerParams,\n IndexingDivinerStage,\n IndexingDivinerState,\n} from '@xyo-network/diviner-indexing-model'\nimport { asDivinerInstance, DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { DivinerWrapper } from '@xyo-network/diviner-wrapper'\nimport { creatableModule, isModuleState, isModuleStateWithMeta, ModuleState, ModuleStateSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema, WithMeta } from '@xyo-network/payload-model'\n\nexport type ConfigStoreKey = 'indexStore' | 'stateStore'\n\nexport type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>\n\nconst moduleName = 'IndexingDiviner'\n\n@creatableModule<IndexingDiviner>()\nexport class IndexingDiviner<\n TParams extends IndexingDivinerParams = IndexingDivinerParams,\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 static override readonly allowRandomAccount = false\n static override readonly configSchemas: Schema[] = [...super.configSchemas, IndexingDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = IndexingDivinerConfigSchema\n\n private _lastState?: ModuleState<IndexingDivinerState>\n private _pollId?: string\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1000\n }\n\n get pollFrequency() {\n return this.config.pollFrequency ?? 10_000\n }\n\n /**\n * Works via batched iteration of the source archivist to populate the index.\n * @returns A promise that resolves when the background process is complete\n */\n protected backgroundDivine = async (): Promise<void> => {\n // Load last state\n const lastState = await this.retrieveState()\n // Get next batch of results\n const indexCandidateDiviner = await this.getIndexingDivinerStage('stateToIndexCandidateDiviner')\n const results = lastState ? await indexCandidateDiviner.divine([lastState]) : await indexCandidateDiviner.divine()\n // Filter next state out from results\n const nextState = results.find(isModuleStateWithMeta<IndexingDivinerState>)\n const indexCandidates = results.filter(x => !isModuleStateWithMeta(x))\n // Transform candidates to indexes\n const toIndexTransformDiviner = await this.getIndexingDivinerStage('indexCandidateToIndexDiviner')\n const indexes = await toIndexTransformDiviner.divine(indexCandidates)\n // Insert index results\n const indexArchivist = await this.getArchivistForStore('indexStore')\n await indexArchivist.insert(indexes)\n // Update state\n if (nextState) {\n await this.commitState(nextState)\n }\n }\n\n /**\n * Commit the internal state of the Diviner process. This is similar\n * to a transaction completion in a database and should only be called\n * when results have been successfully persisted to the appropriate\n * external stores.\n * @param nextState The state to commit\n */\n protected async commitState(nextState: ModuleState<IndexingDivinerState>) {\n // Don't commit state if no state has changed\n if (nextState.state.offset === this._lastState?.state.offset) return\n this._lastState = nextState\n const archivist = await this.getArchivistForStore('stateStore')\n const [bw] = await new BoundWitnessBuilder().payload(nextState).signer(this.account).build()\n await archivist.insert([bw, nextState])\n }\n\n protected override async divineHandler(payloads: TIn[] = []): Promise<WithMeta<TOut>[]> {\n const indexPayloadDiviner = await this.getPayloadDivinerForStore('indexStore')\n const divinerQueryToIndexQueryDiviner = await this.getIndexingDivinerStage('divinerQueryToIndexQueryDiviner')\n const indexQueryResponseToDivinerQueryResponseDiviner = await this.getIndexingDivinerStage('indexQueryResponseToDivinerQueryResponseDiviner')\n const results = (\n await Promise.all(\n payloads.map(async (payload) => {\n const indexQuery = await divinerQueryToIndexQueryDiviner.divine([payload])\n // Divine the results\n const indexedResults = await indexPayloadDiviner.divine(indexQuery)\n // Transform the results to the response shape\n const response = await Promise.all(\n indexedResults.flat().map(indexedResult => indexQueryResponseToDivinerQueryResponseDiviner.divine([payload, indexedResult])),\n )\n return response.flat()\n }),\n )\n ).flat()\n // TODO: Infer this type over casting to this type\n return (await Promise.all(results.map(result => PayloadBuilder.build(result)))) as WithMeta<TOut>[]\n }\n\n /**\n * Retrieves the archivist for the specified store\n * @param store The store to retrieve the archivist for\n * @returns The archivist for the specified store\n */\n protected async getArchivistForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.archivist, () => `${moduleName}: Config for ${store}.archivist not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.archivist [${name}]`)\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the specified store\n * @param store The store to retrieve the BoundWitness Diviner for\n * @returns The BoundWitness Diviner for the specified store\n */\n protected async getBoundWitnessDivinerForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.boundWitnessDiviner, () => `${moduleName}: Config for ${store}.boundWitnessDiviner not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.boundWitnessDiviner [${name}]`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n\n /**\n * Gets the Diviner for the supplied Indexing Diviner stage\n * @param transform The Indexing Diviner stage\n * @returns The diviner corresponding to the Indexing Diviner stage\n */\n protected async getIndexingDivinerStage(transform: IndexingDivinerStage) {\n const nameOrAddress = assertEx(\n this.config?.indexingDivinerStages?.[transform],\n () => `${moduleName}: Config for indexingDivinerStages.${transform} not specified`,\n )\n const mod = await this.resolve(nameOrAddress)\n return assertEx(asDivinerInstance(mod), () => `${moduleName}: Failed to resolve indexing diviner stage for ${transform}`) as DivinerInstance\n }\n\n /**\n * Retrieves the Payload Diviner for the specified store\n * @param store The store to retrieve the Payload Diviner for\n * @returns The Payload Diviner for the specified store\n */\n protected async getPayloadDivinerForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.payloadDiviner, () => `${moduleName}: Config for ${store}.payloadDiviner not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.payloadDiviner [${name}]`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the last state of the Diviner process. Used to recover state after\n * preemptions, reboots, etc.\n */\n protected async retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined> {\n const accountAddress = this.account.address\n if (this._lastState) return this._lastState\n let hash: Hash = ''\n const diviner = await this.getBoundWitnessDivinerForStore('stateStore')\n const query = await new PayloadBuilder<BoundWitnessDivinerQueryPayload>({ schema: BoundWitnessDivinerQuerySchema })\n .fields({\n address: accountAddress,\n limit: 1,\n offset: 0,\n order: 'desc',\n payload_schemas: [ModuleStateSchema],\n })\n .build()\n const boundWitnesses = await diviner.divine([query])\n if (boundWitnesses.length > 0) {\n const boundWitness = boundWitnesses[0]\n if (isBoundWitness(boundWitness)) {\n // Find the index for this address in the BoundWitness that is a ModuleState\n hash = boundWitness.addresses\n .map((address, index) => ({ address, index }))\n .filter(({ address }) => address === accountAddress)\n // eslint-disable-next-line unicorn/no-array-reduce\n .reduce(\n (prev, curr) => (boundWitness.payload_schemas?.[curr?.index] === ModuleStateSchema ? boundWitness.payload_hashes[curr?.index] : prev),\n '' as Hash,\n )\n }\n }\n\n // If we able to located the last state\n if (hash !== '') {\n // Get last state\n const archivist = await this.getArchivistForStore('stateStore')\n const payload = (await archivist.get([hash])).find(isModuleState<IndexingDivinerState>)\n if (payload) {\n return payload as WithMeta<ModuleState<IndexingDivinerState>>\n }\n }\n return undefined\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n this.poll()\n return true\n }\n\n protected override async stopHandler(_timeout?: number | undefined): Promise<boolean> {\n if (this._pollId) {\n clearTimeout(this._pollId)\n this._pollId = undefined\n }\n return await super.stopHandler()\n }\n\n /**\n * Runs the background divine process on a loop with a delay\n * specified by the `config.pollFrequency`\n */\n private poll() {\n this._pollId = setTimeoutEx(async () => {\n try {\n await Promise.resolve()\n await this.backgroundDivine()\n } catch (e) {\n console.log(e)\n } finally {\n if (this._pollId) clearTimeoutEx(this._pollId)\n this._pollId = undefined\n this.poll()\n }\n }, this.pollFrequency)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,oBAAyB;AAEzB,mBAA6C;AAC7C,+BAAiC;AACjC,kCAAoC;AACpC,gCAA+B;AAC/B,8BAAgC;AAChC,wCAAgF;AAChF,oCAMO;AACP,2BAA2E;AAC3E,6BAA+B;AAC/B,0BAAsG;AACtG,6BAA+B;;;;;;;;AAO/B,IAAMA,aAAa;AAGZ,IAAMC,mBAAN,MAAMA,yBASHC,wCAAAA;EAKAC;EACAC;EAER,IAAIC,sBAAsB;AACxB,WAAO,KAAK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AAO,CAAC,EAAEiD,QAAO,MAAOA,YAAYD,cAAAA,EAEpCkB,OACC,CAACC,MAAMC,SAAAA;;AAAUN,qCAAaJ,oBAAbI,mBAA+BM,6BAAMH,YAAWN,wCAAoBG,aAAaO,eAAeD,6BAAMH,KAAAA,IAASE;WAChI,EAAA;MAEN;IACF;AAGA,QAAIjB,SAAS,IAAI;AAEf,YAAMxC,YAAY,MAAM,KAAKL,qBAAqB,YAAA;AAClD,YAAMQ,WAAW,MAAMH,UAAU4D,IAAI;QAACpB;OAAK,GAAGrD,KAAK0E,iCAAAA;AACnD,UAAI1D,SAAS;AACX,eAAOA;MACT;IACF;AACA,WAAO2D;EACT;EAEA,MAAyBC,eAAiC;AACxD,UAAM,MAAMA,aAAAA;AACZ,SAAKC,KAAI;AACT,WAAO;EACT;EAEA,MAAyBC,YAAYC,UAAiD;AACpF,QAAI,KAAK3F,SAAS;AAChB4F,mBAAa,KAAK5F,OAAO;AACzB,WAAKA,UAAUuF;IACjB;AACA,WAAO,MAAM,MAAMG,YAAAA;EACrB;;;;;EAMQD,OAAO;AACb,SAAKzF,cAAU6F,2BAAa,YAAA;AAC1B,UAAI;AACF,cAAMvD,QAAQc,QAAO;AACrB,cAAM,KAAKhD,iBAAgB;MAC7B,SAAS0F,GAAG;AACVC,gBAAQC,IAAIF,CAAAA;MACd,UAAA;AACE,YAAI,KAAK9F,QAASiG,kCAAe,KAAKjG,OAAO;AAC7C,aAAKA,UAAUuF;AACf,aAAKE,KAAI;MACX;IACF,GAAG,KAAKtF,aAAa;EACvB;AACF;AA5MUL;AACR,cAVWD,kBAUcqG,sBAAqB;AAC9C,cAXWrG,kBAWcsG,iBAA0B;KAAI,+CAAMA;EAAeC;;AAC5E,cAZWvG,kBAYcwG,uBAA8BD;AAZlD,IAAMvG,kBAAN;;;;","names":["moduleName","IndexingDiviner","AbstractDiviner","_lastState","_pollId","payloadDivinerLimit","config","pollFrequency","backgroundDivine","lastState","retrieveState","indexCandidateDiviner","getIndexingDivinerStage","results","divine","nextState","find","isModuleStateWithMeta","indexCandidates","filter","x","toIndexTransformDiviner","indexes","indexArchivist","getArchivistForStore","insert","commitState","state","offset","archivist","bw","BoundWitnessBuilder","payload","signer","account","build","divineHandler","payloads","indexPayloadDiviner","getPayloadDivinerForStore","divinerQueryToIndexQueryDiviner","indexQueryResponseToDivinerQueryResponseDiviner","Promise","all","map","indexQuery","indexedResults","response","flat","indexedResult","result","PayloadBuilder","store","name","assertEx","mod","resolve","ArchivistWrapper","wrap","getBoundWitnessDivinerForStore","boundWitnessDiviner","DivinerWrapper","transform","nameOrAddress","indexingDivinerStages","asDivinerInstance","payloadDiviner","accountAddress","address","hash","diviner","query","schema","BoundWitnessDivinerQuerySchema","fields","limit","order","payload_schemas","ModuleStateSchema","boundWitnesses","length","boundWitness","isBoundWitness","addresses","index","reduce","prev","curr","payload_hashes","get","isModuleState","undefined","startHandler","poll","stopHandler","_timeout","clearTimeout","setTimeoutEx","e","console","log","clearTimeoutEx","allowRandomAccount","configSchemas","IndexingDivinerConfigSchema","defaultConfigSchema"]}
|
package/dist/node/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|