@xyo-network/sentinel-memory 4.1.2 → 4.1.3
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 +4 -67
- package/package.json +25 -25
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { PayloadWrapper } from '@xyo-network/payload-wrapper';
|
|
6
|
-
import { BaseParams, Base } from '@xylabs/base';
|
|
7
|
-
|
|
8
|
-
type MemorySentinelParams<TConfig extends AnyConfigSchema<SentinelConfig> = AnyConfigSchema<SentinelConfig>> = SentinelParams<TConfig>;
|
|
9
|
-
declare class MemorySentinel<TParams extends MemorySentinelParams = MemorySentinelParams, TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> extends AbstractSentinel<TParams, TEventData> {
|
|
10
|
-
static readonly configSchemas: Schema[];
|
|
11
|
-
static readonly defaultConfigSchema: Schema;
|
|
12
|
-
private runner?;
|
|
13
|
-
reportHandler(inPayloads?: Payload[]): Promise<Payload[]>;
|
|
14
|
-
startHandler(): Promise<void>;
|
|
15
|
-
stopHandler(): Promise<void>;
|
|
16
|
-
private inputAddresses;
|
|
17
|
-
private processPreviousResults;
|
|
18
|
-
private runJob;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare class SentinelIntervalAutomationWrapper<T extends SentinelIntervalAutomationPayload = SentinelIntervalAutomationPayload> extends PayloadWrapper<T> {
|
|
22
|
-
constructor(payload: T);
|
|
23
|
-
protected get frequencyMillis(): number;
|
|
24
|
-
protected get remaining(): number;
|
|
25
|
-
next(): this;
|
|
26
|
-
protected checkEnd(): void;
|
|
27
|
-
protected consumeRemaining(count?: number): void;
|
|
28
|
-
/**
|
|
29
|
-
* Sets the remaining of the wrapped automation
|
|
30
|
-
* @param remaining The remaining time in milliseconds
|
|
31
|
-
*/
|
|
32
|
-
protected setRemaining(remaining: number): void;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the start of the wrapped automation
|
|
35
|
-
* @param start The start time in milliseconds
|
|
36
|
-
*/
|
|
37
|
-
protected setStart(start: number): void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
type OnSentinelRunnerTriggerResult = (result: Payload[]) => void;
|
|
41
|
-
interface SentinelRunnerParams extends BaseParams {
|
|
42
|
-
automations?: SentinelAutomationPayload[];
|
|
43
|
-
onTriggerResult?: OnSentinelRunnerTriggerResult;
|
|
44
|
-
sentinel: SentinelInstance;
|
|
45
|
-
}
|
|
46
|
-
declare class SentinelRunner extends Base {
|
|
47
|
-
protected _automations: Record<string, SentinelAutomationPayload>;
|
|
48
|
-
protected onTriggerResult: OnSentinelRunnerTriggerResult | undefined;
|
|
49
|
-
protected sentinel: SentinelInstance;
|
|
50
|
-
protected timeoutId?: NodeJS.Timeout | string | number;
|
|
51
|
-
constructor(params: SentinelRunnerParams);
|
|
52
|
-
get automations(): Record<string, SentinelAutomationPayload>;
|
|
53
|
-
private get next();
|
|
54
|
-
add(automation: SentinelAutomationPayload, restart?: boolean): Promise<Lowercase<string>>;
|
|
55
|
-
find(hash: string): [string, SentinelAutomationPayload] | undefined;
|
|
56
|
-
remove(hash: string, restart?: boolean): void;
|
|
57
|
-
removeAll(): void;
|
|
58
|
-
restart(): void;
|
|
59
|
-
start(): void;
|
|
60
|
-
startHandler(): void;
|
|
61
|
-
stop(): void;
|
|
62
|
-
update(hash: string, automation: SentinelAutomationPayload, restart?: boolean): Promise<void>;
|
|
63
|
-
private trigger;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { MemorySentinel, SentinelIntervalAutomationWrapper, SentinelRunner };
|
|
67
|
-
export type { MemorySentinelParams, OnSentinelRunnerTriggerResult, SentinelRunnerParams };
|
|
1
|
+
export * from './MemorySentinel.ts';
|
|
2
|
+
export * from './SentinelIntervalAutomationWrapper.ts';
|
|
3
|
+
export * from './SentinelRunner.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/sentinel-memory",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.13.
|
|
33
|
-
"@xylabs/base": "^4.13.
|
|
34
|
-
"@xylabs/forget": "^4.13.
|
|
35
|
-
"@xylabs/promise": "^4.13.
|
|
36
|
-
"@xylabs/telemetry": "^4.13.
|
|
37
|
-
"@xylabs/typeof": "^4.13.
|
|
38
|
-
"@xyo-network/diviner-model": "^4.1.
|
|
39
|
-
"@xyo-network/module-model": "^4.1.
|
|
40
|
-
"@xyo-network/payload-builder": "^4.1.
|
|
41
|
-
"@xyo-network/payload-model": "^4.1.
|
|
42
|
-
"@xyo-network/payload-wrapper": "^4.1.
|
|
43
|
-
"@xyo-network/sentinel-abstract": "^4.1.
|
|
44
|
-
"@xyo-network/sentinel-model": "^4.1.
|
|
45
|
-
"@xyo-network/witness-model": "^4.1.
|
|
32
|
+
"@xylabs/assert": "^4.13.16",
|
|
33
|
+
"@xylabs/base": "^4.13.16",
|
|
34
|
+
"@xylabs/forget": "^4.13.16",
|
|
35
|
+
"@xylabs/promise": "^4.13.16",
|
|
36
|
+
"@xylabs/telemetry": "^4.13.16",
|
|
37
|
+
"@xylabs/typeof": "^4.13.16",
|
|
38
|
+
"@xyo-network/diviner-model": "^4.1.3",
|
|
39
|
+
"@xyo-network/module-model": "^4.1.3",
|
|
40
|
+
"@xyo-network/payload-builder": "^4.1.3",
|
|
41
|
+
"@xyo-network/payload-model": "^4.1.3",
|
|
42
|
+
"@xyo-network/payload-wrapper": "^4.1.3",
|
|
43
|
+
"@xyo-network/sentinel-abstract": "^4.1.3",
|
|
44
|
+
"@xyo-network/sentinel-model": "^4.1.3",
|
|
45
|
+
"@xyo-network/witness-model": "^4.1.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@xylabs/delay": "^4.13.
|
|
49
|
-
"@xylabs/hex": "^4.13.
|
|
50
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
51
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
52
|
-
"@xylabs/vitest-extended": "^4.13.
|
|
53
|
-
"@xyo-network/abstract-witness": "^4.1.
|
|
54
|
-
"@xyo-network/archivist-memory": "^4.1.
|
|
55
|
-
"@xyo-network/id-payload-plugin": "^4.1.
|
|
56
|
-
"@xyo-network/node-memory": "^4.1.
|
|
57
|
-
"@xyo-network/witness-adhoc": "^4.1.
|
|
48
|
+
"@xylabs/delay": "^4.13.16",
|
|
49
|
+
"@xylabs/hex": "^4.13.16",
|
|
50
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
51
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
52
|
+
"@xylabs/vitest-extended": "^4.13.16",
|
|
53
|
+
"@xyo-network/abstract-witness": "^4.1.3",
|
|
54
|
+
"@xyo-network/archivist-memory": "^4.1.3",
|
|
55
|
+
"@xyo-network/id-payload-plugin": "^4.1.3",
|
|
56
|
+
"@xyo-network/node-memory": "^4.1.3",
|
|
57
|
+
"@xyo-network/witness-adhoc": "^4.1.3",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vitest": "^3.2.4"
|
|
60
60
|
},
|