@xyo-network/sentinel-model 2.75.18 → 2.76.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/browser/Config.d.cts +2 -2
- package/dist/browser/Config.d.cts.map +1 -1
- package/dist/browser/Config.d.mts +2 -2
- package/dist/browser/Config.d.mts.map +1 -1
- package/dist/browser/Config.d.ts +2 -2
- package/dist/browser/Config.d.ts.map +1 -1
- package/dist/browser/Instance.d.cts +1 -5
- package/dist/browser/Instance.d.cts.map +1 -1
- package/dist/browser/Instance.d.mts +1 -5
- package/dist/browser/Instance.d.mts.map +1 -1
- package/dist/browser/Instance.d.ts +1 -5
- package/dist/browser/Instance.d.ts.map +1 -1
- package/dist/browser/Job.d.cts +10 -0
- package/dist/browser/Job.d.cts.map +1 -0
- package/dist/browser/Job.d.mts +10 -0
- package/dist/browser/Job.d.mts.map +1 -0
- package/dist/browser/Job.d.ts +10 -0
- package/dist/browser/Job.d.ts.map +1 -0
- package/dist/browser/Task.d.cts +8 -0
- package/dist/browser/Task.d.cts.map +1 -0
- package/dist/browser/Task.d.mts +8 -0
- package/dist/browser/Task.d.mts.map +1 -0
- package/dist/browser/Task.d.ts +8 -0
- package/dist/browser/Task.d.ts.map +1 -0
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +2 -0
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +2 -0
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Config.d.cts +2 -2
- package/dist/node/Config.d.cts.map +1 -1
- package/dist/node/Config.d.mts +2 -2
- package/dist/node/Config.d.mts.map +1 -1
- package/dist/node/Config.d.ts +2 -2
- package/dist/node/Config.d.ts.map +1 -1
- package/dist/node/Instance.d.cts +1 -5
- package/dist/node/Instance.d.cts.map +1 -1
- package/dist/node/Instance.d.mts +1 -5
- package/dist/node/Instance.d.mts.map +1 -1
- package/dist/node/Instance.d.ts +1 -5
- package/dist/node/Instance.d.ts.map +1 -1
- package/dist/node/Job.d.cts +10 -0
- package/dist/node/Job.d.cts.map +1 -0
- package/dist/node/Job.d.mts +10 -0
- package/dist/node/Job.d.mts.map +1 -0
- package/dist/node/Job.d.ts +10 -0
- package/dist/node/Job.d.ts.map +1 -0
- package/dist/node/Task.d.cts +8 -0
- package/dist/node/Task.d.cts.map +1 -0
- package/dist/node/Task.d.mts +8 -0
- package/dist/node/Task.d.mts.map +1 -0
- package/dist/node/Task.d.ts +8 -0
- package/dist/node/Task.d.ts.map +1 -0
- package/dist/node/index.d.cts +2 -0
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +2 -0
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +11 -15
- package/src/Config.ts +3 -2
- package/src/Instance.ts +1 -7
- package/src/Job.ts +12 -0
- package/src/Task.ts +8 -0
- package/src/index.ts +2 -0
- package/dist/docs.json +0 -5015
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './Sentinel'\nexport * from './typeChecks'\n","import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Config'\nexport * from './EventData'\nexport * from './EventsModels'\nexport * from './Instance'\nexport * from './Job'\nexport * from './Module'\nexport * from './Params'\nexport * from './Queries'\nexport * from './Sentinel'\nexport * from './Task'\nexport * from './typeChecks'\n","import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelTask } from './Task'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n tasks: SentinelTask[]\n },\n TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n>\n","import { Query } from '@xyo-network/payload-model'\n\nexport type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\nexport const SentinelReportQuerySchema: SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\n\nexport type SentinelReportQuery = Query<{\n schema: SentinelReportQuerySchema\n}>\n","import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { SentinelInstance } from './Instance'\nimport { SentinelModule } from './Module'\nimport { SentinelReportQuerySchema } from './Queries'\n\nexport const isSentinelInstance = new IsInstanceFactory<SentinelInstance>().create({ report: 'function' }, [isModuleInstance])\nexport const isSentinelModule = new IsModuleFactory<SentinelModule>().create([SentinelReportQuerySchema])\n\nexport const asSentinelModule = AsObjectFactory.create(isSentinelModule)\nexport const asSentinelInstance = AsObjectFactory.create(isSentinelInstance)\nexport const withSentinelModule = WithFactory.create(isSentinelModule)\nexport const withSentinelInstance = WithFactory.create(isSentinelInstance)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,uBAA6C;;;ACHnD,IAAM,4BAAuD;;;ACHpE,0BAAkF;AAClF,oBAAgC;AAMzB,IAAM,qBAAqB,IAAI,sCAAoC,EAAE,OAAO,EAAE,QAAQ,WAAW,GAAG,CAAC,oCAAgB,CAAC;AACtH,IAAM,mBAAmB,IAAI,oCAAgC,EAAE,OAAO,CAAC,yBAAyB,CAAC;AAEjG,IAAM,mBAAmB,8BAAgB,OAAO,gBAAgB;AAChE,IAAM,qBAAqB,8BAAgB,OAAO,kBAAkB;AACpE,IAAM,qBAAqB,gCAAY,OAAO,gBAAgB;AAC9D,IAAM,uBAAuB,gCAAY,OAAO,kBAAkB;","names":[]}
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts","../../src/Queries/Report.ts","../../src/typeChecks.ts"],"sourcesContent":["import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { SentinelTask } from './Task'\n\nexport type SentinelConfigSchema = 'network.xyo.sentinel.config'\nexport const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'\n\nexport type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n tasks: SentinelTask[]\n },\n TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema\n>\n","import { Query } from '@xyo-network/payload-model'\n\nexport type SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\nexport const SentinelReportQuerySchema: SentinelReportQuerySchema = 'network.xyo.query.sentinel.report'\n\nexport type SentinelReportQuery = Query<{\n schema: SentinelReportQuerySchema\n}>\n","import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { SentinelInstance } from './Instance'\nimport { SentinelModule } from './Module'\nimport { SentinelReportQuerySchema } from './Queries'\n\nexport const isSentinelInstance = new IsInstanceFactory<SentinelInstance>().create({ report: 'function' }, [isModuleInstance])\nexport const isSentinelModule = new IsModuleFactory<SentinelModule>().create([SentinelReportQuerySchema])\n\nexport const asSentinelModule = AsObjectFactory.create(isSentinelModule)\nexport const asSentinelInstance = AsObjectFactory.create(isSentinelInstance)\nexport const withSentinelModule = WithFactory.create(isSentinelModule)\nexport const withSentinelInstance = WithFactory.create(isSentinelInstance)\n"],"mappings":";AAMO,IAAM,uBAA6C;;;ACHnD,IAAM,4BAAuD;;;ACHpE,SAAS,mBAAmB,iBAAiB,kBAAkB,mBAAmB;AAClF,SAAS,uBAAuB;AAMzB,IAAM,qBAAqB,IAAI,kBAAoC,EAAE,OAAO,EAAE,QAAQ,WAAW,GAAG,CAAC,gBAAgB,CAAC;AACtH,IAAM,mBAAmB,IAAI,gBAAgC,EAAE,OAAO,CAAC,yBAAyB,CAAC;AAEjG,IAAM,mBAAmB,gBAAgB,OAAO,gBAAgB;AAChE,IAAM,qBAAqB,gBAAgB,OAAO,kBAAkB;AACpE,IAAM,qBAAqB,YAAY,OAAO,gBAAgB;AAC9D,IAAM,uBAAuB,YAAY,OAAO,kBAAkB;","names":[]}
|
package/package.json
CHANGED
|
@@ -10,19 +10,18 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/boundwitness-model": "~2.
|
|
14
|
-
"@xyo-network/core": "~2.
|
|
15
|
-
"@xyo-network/module-events": "~2.
|
|
16
|
-
"@xyo-network/module-model": "~2.
|
|
17
|
-
"@xyo-network/object": "~2.
|
|
18
|
-
"@xyo-network/payload-model": "~2.
|
|
19
|
-
"@xyo-network/promise": "~2.
|
|
20
|
-
"@xyo-network/witness-model": "~2.75.18"
|
|
13
|
+
"@xyo-network/boundwitness-model": "~2.76.1",
|
|
14
|
+
"@xyo-network/core": "~2.76.1",
|
|
15
|
+
"@xyo-network/module-events": "~2.76.1",
|
|
16
|
+
"@xyo-network/module-model": "~2.76.1",
|
|
17
|
+
"@xyo-network/object": "~2.76.1",
|
|
18
|
+
"@xyo-network/payload-model": "~2.76.1",
|
|
19
|
+
"@xyo-network/promise": "~2.76.1"
|
|
21
20
|
},
|
|
22
21
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
23
22
|
"devDependencies": {
|
|
24
|
-
"@xylabs/ts-scripts-yarn3": "^3.1.
|
|
25
|
-
"@xylabs/tsconfig": "^3.1.
|
|
23
|
+
"@xylabs/ts-scripts-yarn3": "^3.1.12",
|
|
24
|
+
"@xylabs/tsconfig": "^3.1.12",
|
|
26
25
|
"typescript": "^5.2.2"
|
|
27
26
|
},
|
|
28
27
|
"docs": "dist/docs.json",
|
|
@@ -50,15 +49,12 @@
|
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
},
|
|
53
|
-
"./docs": {
|
|
54
|
-
"default": "./dist/docs.json"
|
|
55
|
-
},
|
|
56
52
|
"./package.json": "./package.json"
|
|
57
53
|
},
|
|
58
54
|
"main": "dist/node/index.js",
|
|
59
55
|
"module": "dist/node/index.mjs",
|
|
60
56
|
"homepage": "https://xyo.network",
|
|
61
|
-
"license": "LGPL-3.0",
|
|
57
|
+
"license": "LGPL-3.0-only",
|
|
62
58
|
"publishConfig": {
|
|
63
59
|
"access": "public"
|
|
64
60
|
},
|
|
@@ -67,5 +63,5 @@
|
|
|
67
63
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
68
64
|
},
|
|
69
65
|
"sideEffects": false,
|
|
70
|
-
"version": "2.
|
|
66
|
+
"version": "2.76.1"
|
|
71
67
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ModuleConfig } from '@xyo-network/module-model'
|
|
2
2
|
import { Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
+
import { SentinelTask } from './Task'
|
|
5
|
+
|
|
4
6
|
export type SentinelConfigSchema = 'network.xyo.sentinel.config'
|
|
5
7
|
export const SentinelConfigSchema: SentinelConfigSchema = 'network.xyo.sentinel.config'
|
|
6
8
|
|
|
7
9
|
export type SentinelConfig<TConfig extends Payload | void = void> = ModuleConfig<
|
|
8
10
|
TConfig,
|
|
9
11
|
{
|
|
10
|
-
|
|
11
|
-
witnesses?: string[]
|
|
12
|
+
tasks: SentinelTask[]
|
|
12
13
|
},
|
|
13
14
|
TConfig extends Payload ? TConfig['schema'] : SentinelConfigSchema
|
|
14
15
|
>
|
package/src/Instance.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { ModuleInstance } from '@xyo-network/module-model'
|
|
2
|
-
import { Promisable } from '@xyo-network/promise'
|
|
3
|
-
import { WitnessInstance } from '@xyo-network/witness-model'
|
|
4
2
|
|
|
5
3
|
import { SentinelModuleEventData } from './EventData'
|
|
6
4
|
import { CustomSentinelModule, SentinelModule } from './Module'
|
|
7
5
|
import { SentinelParams } from './Params'
|
|
8
6
|
import { Sentinel } from './Sentinel'
|
|
9
7
|
|
|
10
|
-
export type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> &
|
|
11
|
-
Sentinel &
|
|
12
|
-
ModuleInstance<TParams> & {
|
|
13
|
-
witnesses: () => Promisable<WitnessInstance[]>
|
|
14
|
-
}
|
|
8
|
+
export type SentinelInstance<TParams extends SentinelParams = SentinelParams> = SentinelModule<TParams> & Sentinel & ModuleInstance<TParams>
|
|
15
9
|
|
|
16
10
|
export type CustomSentinelInstance<
|
|
17
11
|
TParams extends SentinelParams = SentinelParams,
|
package/src/Job.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModuleInstance } from '@xyo-network/module-model'
|
|
2
|
+
|
|
3
|
+
import { SentinelTask } from './Task'
|
|
4
|
+
|
|
5
|
+
export type ResolvedSentinelTask = Omit<SentinelTask, 'module'> & {
|
|
6
|
+
/** @field the modules that performs the task */
|
|
7
|
+
module: ModuleInstance
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SentinelJob {
|
|
11
|
+
tasks: ResolvedSentinelTask[][]
|
|
12
|
+
}
|
package/src/Task.ts
ADDED
package/src/index.ts
CHANGED
|
@@ -2,8 +2,10 @@ export * from './Config'
|
|
|
2
2
|
export * from './EventData'
|
|
3
3
|
export * from './EventsModels'
|
|
4
4
|
export * from './Instance'
|
|
5
|
+
export * from './Job'
|
|
5
6
|
export * from './Module'
|
|
6
7
|
export * from './Params'
|
|
7
8
|
export * from './Queries'
|
|
8
9
|
export * from './Sentinel'
|
|
10
|
+
export * from './Task'
|
|
9
11
|
export * from './typeChecks'
|