@xyo-network/node-system-info-plugin 5.3.1 → 5.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/node-system-info-plugin",
3
- "version": "5.3.1",
3
+ "version": "5.3.3",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,27 +30,37 @@
30
30
  "types": "dist/node/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
- "!**/*.bench.*",
35
- "!**/*.spec.*",
36
- "!**/*.test.*"
33
+ "README.md"
37
34
  ],
38
35
  "dependencies": {
39
- "@xyo-network/abstract-witness": "~5.3.2",
40
- "@xyo-network/module-model": "~5.3.2",
41
- "@xyo-network/node-system-info-payload-plugin": "5.3.1",
42
- "@xyo-network/payload-model": "~5.3.2",
43
- "@xyo-network/payloadset-plugin": "~5.3.2",
44
- "@xyo-network/witness-model": "~5.3.2",
45
- "systeminformation": "~5.30.6"
36
+ "@xyo-network/node-system-info-payload-plugin": "workspace:^"
46
37
  },
47
38
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "~7.3.2",
49
- "@xylabs/tsconfig": "~7.3.2",
50
- "@xylabs/vitest-extended": "~5.0.64",
51
- "@xyo-network/payload-wrapper": "~5.3.2",
39
+ "@xylabs/sdk-js": "^5.0.90",
40
+ "@xylabs/ts-scripts-common": "~7.5.10",
41
+ "@xylabs/ts-scripts-yarn3": "~7.5.10",
42
+ "@xylabs/tsconfig": "~7.5.10",
43
+ "@xylabs/vitest-extended": "~5.0.90",
44
+ "@xyo-network/abstract-witness": "~5.3.5",
45
+ "@xyo-network/module-model": "~5.3.5",
46
+ "@xyo-network/payload-model": "~5.3.5",
47
+ "@xyo-network/payloadset-plugin": "~5.3.5",
48
+ "@xyo-network/sdk-js": "~5.3.5",
49
+ "@xyo-network/witness-model": "~5.3.5",
50
+ "systeminformation": "~5.30.8",
52
51
  "typescript": "~5.9.3",
53
- "vitest": "~4.0.18"
52
+ "vitest": "~4.1.2",
53
+ "zod": "^4.3.6"
54
+ },
55
+ "peerDependencies": {
56
+ "@xylabs/sdk-js": "^5",
57
+ "@xyo-network/abstract-witness": "^5",
58
+ "@xyo-network/module-model": "^5",
59
+ "@xyo-network/payload-model": "^5",
60
+ "@xyo-network/payloadset-plugin": "^5",
61
+ "@xyo-network/witness-model": "^5",
62
+ "systeminformation": "^5",
63
+ "zod": "^4"
54
64
  },
55
65
  "publishConfig": {
56
66
  "access": "public"
package/src/Config.ts DELETED
@@ -1,10 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
- import type { WitnessConfig } from '@xyo-network/witness-model'
3
-
4
- export type NodeSystemInfoWitnessConfigSchema = typeof NodeSystemInfoWitnessConfigSchema
5
- export const NodeSystemInfoWitnessConfigSchema = asSchema('network.xyo.system.info.witness.node.config', true)
6
-
7
- export type NodeSystemInfoWitnessConfig = WitnessConfig<{
8
- nodeValues?: Record<string, string>
9
- schema: NodeSystemInfoWitnessConfigSchema
10
- }>
package/src/Plugin.ts DELETED
@@ -1,16 +0,0 @@
1
- import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'
2
- import { PayloadSetSchema } from '@xyo-network/payload-model'
3
- import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
4
-
5
- import { NodeSystemInfoWitness } from './Witness.ts'
6
-
7
- export const NodeSystemInfoPlugin = () =>
8
- createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(
9
- { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },
10
- {
11
- witness: async (params) => {
12
- const result = await NodeSystemInfoWitness.create(params)
13
- return result
14
- },
15
- },
16
- )
package/src/Witness.ts DELETED
@@ -1,25 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness'
2
- import type { AnyConfigSchema } from '@xyo-network/module-model'
3
- import { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'
4
- import type { Payload, Schema } from '@xyo-network/payload-model'
5
- import type { WitnessModule, WitnessParams } from '@xyo-network/witness-model'
6
- import { get } from 'systeminformation'
7
-
8
- import type { NodeSystemInfoWitnessConfig } from './Config.ts'
9
- import { NodeSystemInfoWitnessConfigSchema } from './Config.ts'
10
-
11
- export type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>
12
-
13
- export class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>
14
- extends AbstractWitness<TParams>
15
- implements WitnessModule {
16
- static override readonly configSchemas: Schema[] = [...super.configSchemas, NodeSystemInfoWitnessConfigSchema]
17
- static override readonly defaultConfigSchema: Schema = NodeSystemInfoWitnessConfigSchema
18
-
19
- protected override async observeHandler(payloads?: Payload[]) {
20
- const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())
21
- return [{
22
- ...node, ...payloads?.[0], schema: NodeSystemInfoSchema,
23
- }]
24
- }
25
- }
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './Config.ts'
2
- export { NodeSystemInfoPlugin as default, NodeSystemInfoPlugin } from './Plugin.ts'
3
- export * from './Witness.ts'