@xyo-network/node-system-info-plugin 2.80.3 → 2.80.5
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 +8 -0
- package/dist/browser/Config.d.cts.map +1 -0
- package/dist/browser/Config.d.mts +8 -0
- package/dist/browser/Config.d.mts.map +1 -0
- package/dist/browser/Config.d.ts +8 -0
- package/dist/browser/Config.d.ts.map +1 -0
- package/dist/browser/Plugin.d.cts +55 -0
- package/dist/browser/Plugin.d.cts.map +1 -0
- package/dist/browser/Plugin.d.mts +55 -0
- package/dist/browser/Plugin.d.mts.map +1 -0
- package/dist/browser/Plugin.d.ts +55 -0
- package/dist/browser/Plugin.d.ts.map +1 -0
- package/dist/browser/Witness.d.cts +11 -0
- package/dist/browser/Witness.d.cts.map +1 -0
- package/dist/browser/Witness.d.mts +11 -0
- package/dist/browser/Witness.d.mts.map +1 -0
- package/dist/browser/Witness.d.ts +11 -0
- package/dist/browser/Witness.d.ts.map +1 -0
- package/dist/browser/index.cjs +65 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +6 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.d.mts +6 -0
- package/dist/browser/index.d.mts.map +1 -0
- package/dist/browser/index.d.ts +6 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/{node/index.mjs → browser/index.js} +3 -4
- package/dist/{node/index.mjs.map → browser/index.js.map} +1 -1
- package/dist/node/index.cjs +72 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.js +15 -44
- package/dist/node/index.js.map +1 -1
- package/package.json +19 -9
- package/xy.config.ts +3 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
+
export type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config';
|
|
3
|
+
export declare const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema;
|
|
4
|
+
export type NodeSystemInfoWitnessConfig = WitnessConfig<{
|
|
5
|
+
nodeValues?: Record<string, string>;
|
|
6
|
+
schema: NodeSystemInfoWitnessConfigSchema;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,iCAAiC,GAAG,6CAA6C,CAAA;AAC7F,eAAO,MAAM,iCAAiC,EAAE,iCAAiF,CAAA;AAEjI,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,iCAAiC,CAAA;CAC1C,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
+
export type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config';
|
|
3
|
+
export declare const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema;
|
|
4
|
+
export type NodeSystemInfoWitnessConfig = WitnessConfig<{
|
|
5
|
+
nodeValues?: Record<string, string>;
|
|
6
|
+
schema: NodeSystemInfoWitnessConfigSchema;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,iCAAiC,GAAG,6CAA6C,CAAA;AAC7F,eAAO,MAAM,iCAAiC,EAAE,iCAAiF,CAAA;AAEjI,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,iCAAiC,CAAA;CAC1C,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
+
export type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config';
|
|
3
|
+
export declare const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema;
|
|
4
|
+
export type NodeSystemInfoWitnessConfig = WitnessConfig<{
|
|
5
|
+
nodeValues?: Record<string, string>;
|
|
6
|
+
schema: NodeSystemInfoWitnessConfigSchema;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,iCAAiC,GAAG,6CAA6C,CAAA;AAC7F,eAAO,MAAM,iCAAiC,EAAE,iCAAiF,CAAA;AAEjI,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,iCAAiC,CAAA;CAC1C,CAAC,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NodeSystemInfoWitness } from './Witness';
|
|
2
|
+
export declare const NodeSystemInfoPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<NodeSystemInfoWitness<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & Omit<import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
37
|
+
archivist?: string | undefined;
|
|
38
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
39
|
+
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
40
|
+
schema: "network.xyo.payload.set";
|
|
41
|
+
}) | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
nodeValues?: Record<string, string> | undefined;
|
|
44
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
45
|
+
}, "schema"> & {
|
|
46
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
47
|
+
}, "schema"> & {
|
|
48
|
+
schema: string;
|
|
49
|
+
}, "schema"> & {
|
|
50
|
+
schema: string;
|
|
51
|
+
};
|
|
52
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
53
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAS9B,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NodeSystemInfoWitness } from './Witness';
|
|
2
|
+
export declare const NodeSystemInfoPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<NodeSystemInfoWitness<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & Omit<import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
37
|
+
archivist?: string | undefined;
|
|
38
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
39
|
+
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
40
|
+
schema: "network.xyo.payload.set";
|
|
41
|
+
}) | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
nodeValues?: Record<string, string> | undefined;
|
|
44
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
45
|
+
}, "schema"> & {
|
|
46
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
47
|
+
}, "schema"> & {
|
|
48
|
+
schema: string;
|
|
49
|
+
}, "schema"> & {
|
|
50
|
+
schema: string;
|
|
51
|
+
};
|
|
52
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
53
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAS9B,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NodeSystemInfoWitness } from './Witness';
|
|
2
|
+
export declare const NodeSystemInfoPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<NodeSystemInfoWitness<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & Omit<import("@xyo-network/payload-model").SchemaFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & import("@xyo-network/module-model").ArchivingModuleConfig & {
|
|
37
|
+
archivist?: string | undefined;
|
|
38
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
39
|
+
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
40
|
+
schema: "network.xyo.payload.set";
|
|
41
|
+
}) | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
nodeValues?: Record<string, string> | undefined;
|
|
44
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
45
|
+
}, "schema"> & {
|
|
46
|
+
schema: "network.xyo.system.info.witness.node.config";
|
|
47
|
+
}, "schema"> & {
|
|
48
|
+
schema: string;
|
|
49
|
+
}, "schema"> & {
|
|
50
|
+
schema: string;
|
|
51
|
+
};
|
|
52
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
53
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAS9B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import { WitnessModule, WitnessParams } from '@xyo-network/witness-model';
|
|
5
|
+
import { NodeSystemInfoWitnessConfig } from './Config';
|
|
6
|
+
export type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>;
|
|
7
|
+
export declare class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams> extends AbstractWitness<TParams> implements WitnessModule {
|
|
8
|
+
static configSchemas: "network.xyo.system.info.witness.node.config"[];
|
|
9
|
+
protected observeHandler(payloads?: Payload[]): Promise<any[]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAErG,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAC1G,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IAExB,OAAgB,aAAa,kDAAsC;cAE1C,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE;CAI7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import { WitnessModule, WitnessParams } from '@xyo-network/witness-model';
|
|
5
|
+
import { NodeSystemInfoWitnessConfig } from './Config';
|
|
6
|
+
export type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>;
|
|
7
|
+
export declare class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams> extends AbstractWitness<TParams> implements WitnessModule {
|
|
8
|
+
static configSchemas: "network.xyo.system.info.witness.node.config"[];
|
|
9
|
+
protected observeHandler(payloads?: Payload[]): Promise<any[]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAErG,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAC1G,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IAExB,OAAgB,aAAa,kDAAsC;cAE1C,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE;CAI7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import { WitnessModule, WitnessParams } from '@xyo-network/witness-model';
|
|
5
|
+
import { NodeSystemInfoWitnessConfig } from './Config';
|
|
6
|
+
export type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>;
|
|
7
|
+
export declare class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams> extends AbstractWitness<TParams> implements WitnessModule {
|
|
8
|
+
static configSchemas: "network.xyo.system.info.witness.node.config"[];
|
|
9
|
+
protected observeHandler(payloads?: Payload[]): Promise<any[]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,OAAO,EAAE,2BAA2B,EAAqC,MAAM,UAAU,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAErG,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAC1G,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IAExB,OAAgB,aAAa,kDAAsC;cAE1C,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE;CAI7D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
NodeSystemInfoPlugin: () => NodeSystemInfoPlugin,
|
|
24
|
+
NodeSystemInfoWitness: () => NodeSystemInfoWitness,
|
|
25
|
+
NodeSystemInfoWitnessConfigSchema: () => NodeSystemInfoWitnessConfigSchema,
|
|
26
|
+
default: () => src_default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
|
|
30
|
+
// src/Plugin.ts
|
|
31
|
+
var import_node_system_info_payload_plugin2 = require("@xyo-network/node-system-info-payload-plugin");
|
|
32
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
|
+
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
34
|
+
|
|
35
|
+
// src/Witness.ts
|
|
36
|
+
var import_abstract_witness = require("@xyo-network/abstract-witness");
|
|
37
|
+
var import_node_system_info_payload_plugin = require("@xyo-network/node-system-info-payload-plugin");
|
|
38
|
+
var import_systeminformation = require("systeminformation");
|
|
39
|
+
|
|
40
|
+
// src/Config.ts
|
|
41
|
+
var NodeSystemInfoWitnessConfigSchema = "network.xyo.system.info.witness.node.config";
|
|
42
|
+
|
|
43
|
+
// src/Witness.ts
|
|
44
|
+
var NodeSystemInfoWitness = class extends import_abstract_witness.AbstractWitness {
|
|
45
|
+
static configSchemas = [NodeSystemInfoWitnessConfigSchema];
|
|
46
|
+
async observeHandler(payloads) {
|
|
47
|
+
const node = await (0, import_systeminformation.get)(this.config?.nodeValues ?? (0, import_node_system_info_payload_plugin.defaultSystemInfoConfig)());
|
|
48
|
+
return [{ ...node, ...payloads?.[0], schema: import_node_system_info_payload_plugin.NodeSystemInfoSchema }];
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/Plugin.ts
|
|
53
|
+
var NodeSystemInfoPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
54
|
+
{ required: { [import_node_system_info_payload_plugin2.NodeSystemInfoSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
55
|
+
{
|
|
56
|
+
witness: async (params) => {
|
|
57
|
+
const result = await NodeSystemInfoWitness.create(params);
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// src/index.ts
|
|
64
|
+
var src_default = NodeSystemInfoPlugin;
|
|
65
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/Config.ts"],"sourcesContent":["import { NodeSystemInfoPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Witness'\n\nexport { NodeSystemInfoPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default NodeSystemInfoPlugin\n","import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { NodeSystemInfoWitness } from './Witness'\n\nexport const NodeSystemInfoPlugin = () =>\n createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(\n { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await NodeSystemInfoWitness.create(params)\n return result\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessModule, WitnessParams } from '@xyo-network/witness-model'\nimport { get } from 'systeminformation'\n\nimport { NodeSystemInfoWitnessConfig, NodeSystemInfoWitnessConfigSchema } from './Config'\n\nexport type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>\n\nexport class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>\n extends AbstractWitness<TParams>\n implements WitnessModule\n{\n static override configSchemas = [NodeSystemInfoWitnessConfigSchema]\n\n protected override async observeHandler(payloads?: Payload[]) {\n const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())\n return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }]\n }\n}\n","import { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\nexport const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\n\nexport type NodeSystemInfoWitnessConfig = WitnessConfig<{\n nodeValues?: Record<string, string>\n schema: NodeSystemInfoWitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,0CAAqC;AACrC,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAEhC,6CAA8D;AAG9D,+BAAoB;;;ACFb,IAAM,oCAAuE;;;ADQ7E,IAAM,wBAAN,cACG,wCAEV;AAAA,EACE,OAAgB,gBAAgB,CAAC,iCAAiC;AAAA,EAElE,MAAyB,eAAe,UAAsB;AAC5D,UAAM,OAAO,UAAM,8BAAI,KAAK,QAAQ,kBAAc,gEAAwB,CAAC;AAC3E,WAAO,CAAC,EAAE,GAAG,MAAM,GAAG,WAAW,CAAC,GAAG,QAAQ,4DAAqB,CAAC;AAAA,EACrE;AACF;;;ADfO,IAAM,uBAAuB,UAClC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4DAAoB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACpE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,sBAAsB,OAAO,MAAM;AACxD,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;ADPF,IAAO,cAAQ;","names":["import_node_system_info_payload_plugin"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAG/B,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAG/B,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAG/B,eAAe,oBAAoB,CAAA"}
|
|
@@ -15,9 +15,8 @@ var NodeSystemInfoWitnessConfigSchema = "network.xyo.system.info.witness.node.co
|
|
|
15
15
|
var NodeSystemInfoWitness = class extends AbstractWitness {
|
|
16
16
|
static configSchemas = [NodeSystemInfoWitnessConfigSchema];
|
|
17
17
|
async observeHandler(payloads) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return [{ ...node, ...payloads == null ? void 0 : payloads[0], schema: NodeSystemInfoSchema }];
|
|
18
|
+
const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig());
|
|
19
|
+
return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }];
|
|
21
20
|
}
|
|
22
21
|
};
|
|
23
22
|
|
|
@@ -40,4 +39,4 @@ export {
|
|
|
40
39
|
NodeSystemInfoWitnessConfigSchema,
|
|
41
40
|
src_default as default
|
|
42
41
|
};
|
|
43
|
-
//# sourceMappingURL=index.
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/Config.ts","../../src/index.ts"],"sourcesContent":["import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { NodeSystemInfoWitness } from './Witness'\n\nexport const NodeSystemInfoPlugin = () =>\n createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(\n { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await NodeSystemInfoWitness.create(params)\n return result\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessModule, WitnessParams } from '@xyo-network/witness-model'\nimport { get } from 'systeminformation'\n\nimport { NodeSystemInfoWitnessConfig, NodeSystemInfoWitnessConfigSchema } from './Config'\n\nexport type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>\n\nexport class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>\n extends AbstractWitness<TParams>\n implements WitnessModule\n{\n static override configSchemas = [NodeSystemInfoWitnessConfigSchema]\n\n protected override async observeHandler(payloads?: Payload[]) {\n const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())\n return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }]\n }\n}\n","import { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\nexport const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\n\nexport type NodeSystemInfoWitnessConfig = WitnessConfig<{\n nodeValues?: Record<string, string>\n schema: NodeSystemInfoWitnessConfigSchema\n}>\n","import { NodeSystemInfoPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Witness'\n\nexport { NodeSystemInfoPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default NodeSystemInfoPlugin\n"],"mappings":";AAAA,SAAS,wBAAAA,6BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAEhC,SAAS,yBAAyB,4BAA4B;AAG9D,SAAS,WAAW;;;ACFb,IAAM,oCAAuE;;;ADQ7E,IAAM,wBAAN,cACG,gBAEV;AAAA,EACE,OAAgB,gBAAgB,CAAC,iCAAiC;AAAA,EAElE,MAAyB,eAAe,UAAsB;
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/Config.ts","../../src/index.ts"],"sourcesContent":["import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { NodeSystemInfoWitness } from './Witness'\n\nexport const NodeSystemInfoPlugin = () =>\n createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(\n { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await NodeSystemInfoWitness.create(params)\n return result\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessModule, WitnessParams } from '@xyo-network/witness-model'\nimport { get } from 'systeminformation'\n\nimport { NodeSystemInfoWitnessConfig, NodeSystemInfoWitnessConfigSchema } from './Config'\n\nexport type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>\n\nexport class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>\n extends AbstractWitness<TParams>\n implements WitnessModule\n{\n static override configSchemas = [NodeSystemInfoWitnessConfigSchema]\n\n protected override async observeHandler(payloads?: Payload[]) {\n const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())\n return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }]\n }\n}\n","import { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\nexport const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\n\nexport type NodeSystemInfoWitnessConfig = WitnessConfig<{\n nodeValues?: Record<string, string>\n schema: NodeSystemInfoWitnessConfigSchema\n}>\n","import { NodeSystemInfoPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Witness'\n\nexport { NodeSystemInfoPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default NodeSystemInfoPlugin\n"],"mappings":";AAAA,SAAS,wBAAAA,6BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAEhC,SAAS,yBAAyB,4BAA4B;AAG9D,SAAS,WAAW;;;ACFb,IAAM,oCAAuE;;;ADQ7E,IAAM,wBAAN,cACG,gBAEV;AAAA,EACE,OAAgB,gBAAgB,CAAC,iCAAiC;AAAA,EAElE,MAAyB,eAAe,UAAsB;AAC5D,UAAM,OAAO,MAAM,IAAI,KAAK,QAAQ,cAAc,wBAAwB,CAAC;AAC3E,WAAO,CAAC,EAAE,GAAG,MAAM,GAAG,WAAW,CAAC,GAAG,QAAQ,qBAAqB,CAAC;AAAA,EACrE;AACF;;;ADfO,IAAM,uBAAuB,MAClC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,qBAAoB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACpE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,sBAAsB,OAAO,MAAM;AACxD,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;AGPF,IAAO,cAAQ;","names":["NodeSystemInfoSchema","NodeSystemInfoSchema"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
NodeSystemInfoPlugin: () => NodeSystemInfoPlugin,
|
|
24
|
+
NodeSystemInfoWitness: () => NodeSystemInfoWitness,
|
|
25
|
+
NodeSystemInfoWitnessConfigSchema: () => NodeSystemInfoWitnessConfigSchema,
|
|
26
|
+
default: () => src_default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
|
|
30
|
+
// src/Plugin.ts
|
|
31
|
+
var import_node_system_info_payload_plugin2 = require("@xyo-network/node-system-info-payload-plugin");
|
|
32
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
|
+
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
34
|
+
|
|
35
|
+
// src/Witness.ts
|
|
36
|
+
var import_abstract_witness = require("@xyo-network/abstract-witness");
|
|
37
|
+
var import_node_system_info_payload_plugin = require("@xyo-network/node-system-info-payload-plugin");
|
|
38
|
+
var import_systeminformation = require("systeminformation");
|
|
39
|
+
|
|
40
|
+
// src/Config.ts
|
|
41
|
+
var NodeSystemInfoWitnessConfigSchema = "network.xyo.system.info.witness.node.config";
|
|
42
|
+
|
|
43
|
+
// src/Witness.ts
|
|
44
|
+
var NodeSystemInfoWitness = class extends import_abstract_witness.AbstractWitness {
|
|
45
|
+
static configSchemas = [NodeSystemInfoWitnessConfigSchema];
|
|
46
|
+
async observeHandler(payloads) {
|
|
47
|
+
var _a;
|
|
48
|
+
const node = await (0, import_systeminformation.get)(((_a = this.config) == null ? void 0 : _a.nodeValues) ?? (0, import_node_system_info_payload_plugin.defaultSystemInfoConfig)());
|
|
49
|
+
return [{ ...node, ...payloads == null ? void 0 : payloads[0], schema: import_node_system_info_payload_plugin.NodeSystemInfoSchema }];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/Plugin.ts
|
|
54
|
+
var NodeSystemInfoPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
55
|
+
{ required: { [import_node_system_info_payload_plugin2.NodeSystemInfoSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
56
|
+
{
|
|
57
|
+
witness: async (params) => {
|
|
58
|
+
const result = await NodeSystemInfoWitness.create(params);
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// src/index.ts
|
|
65
|
+
var src_default = NodeSystemInfoPlugin;
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
NodeSystemInfoPlugin,
|
|
69
|
+
NodeSystemInfoWitness,
|
|
70
|
+
NodeSystemInfoWitnessConfigSchema
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/Config.ts"],"sourcesContent":["import { NodeSystemInfoPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Witness'\n\nexport { NodeSystemInfoPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default NodeSystemInfoPlugin\n","import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { NodeSystemInfoWitness } from './Witness'\n\nexport const NodeSystemInfoPlugin = () =>\n createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(\n { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await NodeSystemInfoWitness.create(params)\n return result\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessModule, WitnessParams } from '@xyo-network/witness-model'\nimport { get } from 'systeminformation'\n\nimport { NodeSystemInfoWitnessConfig, NodeSystemInfoWitnessConfigSchema } from './Config'\n\nexport type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>\n\nexport class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>\n extends AbstractWitness<TParams>\n implements WitnessModule\n{\n static override configSchemas = [NodeSystemInfoWitnessConfigSchema]\n\n protected override async observeHandler(payloads?: Payload[]) {\n const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())\n return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }]\n }\n}\n","import { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\nexport const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\n\nexport type NodeSystemInfoWitnessConfig = WitnessConfig<{\n nodeValues?: Record<string, string>\n schema: NodeSystemInfoWitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,0CAAqC;AACrC,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAEhC,6CAA8D;AAG9D,+BAAoB;;;ACFb,IAAM,oCAAuE;;;ADQ7E,IAAM,wBAAN,cACG,wCAEV;AAAA,EACE,OAAgB,gBAAgB,CAAC,iCAAiC;AAAA,EAElE,MAAyB,eAAe,UAAsB;AAjBhE;AAkBI,UAAM,OAAO,UAAM,gCAAI,UAAK,WAAL,mBAAa,mBAAc,gEAAwB,CAAC;AAC3E,WAAO,CAAC,EAAE,GAAG,MAAM,GAAG,qCAAW,IAAI,QAAQ,4DAAqB,CAAC;AAAA,EACrE;AACF;;;ADfO,IAAM,uBAAuB,UAClC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4DAAoB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACpE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,sBAAsB,OAAO,MAAM;AACxD,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;ADPF,IAAO,cAAQ;","names":["import_node_system_info_payload_plugin"]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,58 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
NodeSystemInfoPlugin: () => NodeSystemInfoPlugin,
|
|
24
|
-
NodeSystemInfoWitness: () => NodeSystemInfoWitness,
|
|
25
|
-
NodeSystemInfoWitnessConfigSchema: () => NodeSystemInfoWitnessConfigSchema,
|
|
26
|
-
default: () => src_default
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(src_exports);
|
|
29
|
-
|
|
30
1
|
// src/Plugin.ts
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
import { NodeSystemInfoSchema as NodeSystemInfoSchema2 } from "@xyo-network/node-system-info-payload-plugin";
|
|
3
|
+
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
4
|
+
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
34
5
|
|
|
35
6
|
// src/Witness.ts
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
7
|
+
import { AbstractWitness } from "@xyo-network/abstract-witness";
|
|
8
|
+
import { defaultSystemInfoConfig, NodeSystemInfoSchema } from "@xyo-network/node-system-info-payload-plugin";
|
|
9
|
+
import { get } from "systeminformation";
|
|
39
10
|
|
|
40
11
|
// src/Config.ts
|
|
41
12
|
var NodeSystemInfoWitnessConfigSchema = "network.xyo.system.info.witness.node.config";
|
|
42
13
|
|
|
43
14
|
// src/Witness.ts
|
|
44
|
-
var NodeSystemInfoWitness = class extends
|
|
15
|
+
var NodeSystemInfoWitness = class extends AbstractWitness {
|
|
45
16
|
static configSchemas = [NodeSystemInfoWitnessConfigSchema];
|
|
46
17
|
async observeHandler(payloads) {
|
|
47
18
|
var _a;
|
|
48
|
-
const node = await
|
|
49
|
-
return [{ ...node, ...payloads == null ? void 0 : payloads[0], schema:
|
|
19
|
+
const node = await get(((_a = this.config) == null ? void 0 : _a.nodeValues) ?? defaultSystemInfoConfig());
|
|
20
|
+
return [{ ...node, ...payloads == null ? void 0 : payloads[0], schema: NodeSystemInfoSchema }];
|
|
50
21
|
}
|
|
51
22
|
};
|
|
52
23
|
|
|
53
24
|
// src/Plugin.ts
|
|
54
|
-
var NodeSystemInfoPlugin = () =>
|
|
55
|
-
{ required: { [
|
|
25
|
+
var NodeSystemInfoPlugin = () => createPayloadSetWitnessPlugin(
|
|
26
|
+
{ required: { [NodeSystemInfoSchema2]: 1 }, schema: PayloadSetSchema },
|
|
56
27
|
{
|
|
57
28
|
witness: async (params) => {
|
|
58
29
|
const result = await NodeSystemInfoWitness.create(params);
|
|
@@ -63,10 +34,10 @@ var NodeSystemInfoPlugin = () => (0, import_payloadset_plugin.createPayloadSetWi
|
|
|
63
34
|
|
|
64
35
|
// src/index.ts
|
|
65
36
|
var src_default = NodeSystemInfoPlugin;
|
|
66
|
-
|
|
67
|
-
0 && (module.exports = {
|
|
37
|
+
export {
|
|
68
38
|
NodeSystemInfoPlugin,
|
|
69
39
|
NodeSystemInfoWitness,
|
|
70
|
-
NodeSystemInfoWitnessConfigSchema
|
|
71
|
-
|
|
40
|
+
NodeSystemInfoWitnessConfigSchema,
|
|
41
|
+
src_default as default
|
|
42
|
+
};
|
|
72
43
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/Config.ts","../../src/index.ts"],"sourcesContent":["import { NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { NodeSystemInfoWitness } from './Witness'\n\nexport const NodeSystemInfoPlugin = () =>\n createPayloadSetWitnessPlugin<NodeSystemInfoWitness>(\n { required: { [NodeSystemInfoSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await NodeSystemInfoWitness.create(params)\n return result\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { defaultSystemInfoConfig, NodeSystemInfoSchema } from '@xyo-network/node-system-info-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessModule, WitnessParams } from '@xyo-network/witness-model'\nimport { get } from 'systeminformation'\n\nimport { NodeSystemInfoWitnessConfig, NodeSystemInfoWitnessConfigSchema } from './Config'\n\nexport type NodeSystemInfoWitnessParams = WitnessParams<AnyConfigSchema<NodeSystemInfoWitnessConfig>>\n\nexport class NodeSystemInfoWitness<TParams extends NodeSystemInfoWitnessParams = NodeSystemInfoWitnessParams>\n extends AbstractWitness<TParams>\n implements WitnessModule\n{\n static override configSchemas = [NodeSystemInfoWitnessConfigSchema]\n\n protected override async observeHandler(payloads?: Payload[]) {\n const node = await get(this.config?.nodeValues ?? defaultSystemInfoConfig())\n return [{ ...node, ...payloads?.[0], schema: NodeSystemInfoSchema }]\n }\n}\n","import { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\nexport const NodeSystemInfoWitnessConfigSchema: NodeSystemInfoWitnessConfigSchema = 'network.xyo.system.info.witness.node.config'\n\nexport type NodeSystemInfoWitnessConfig = WitnessConfig<{\n nodeValues?: Record<string, string>\n schema: NodeSystemInfoWitnessConfigSchema\n}>\n","import { NodeSystemInfoPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Witness'\n\nexport { NodeSystemInfoPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default NodeSystemInfoPlugin\n"],"mappings":";AAAA,SAAS,wBAAAA,6BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAEhC,SAAS,yBAAyB,4BAA4B;AAG9D,SAAS,WAAW;;;ACFb,IAAM,oCAAuE;;;ADQ7E,IAAM,wBAAN,cACG,gBAEV;AAAA,EACE,OAAgB,gBAAgB,CAAC,iCAAiC;AAAA,EAElE,MAAyB,eAAe,UAAsB;AAjBhE;AAkBI,UAAM,OAAO,MAAM,MAAI,UAAK,WAAL,mBAAa,eAAc,wBAAwB,CAAC;AAC3E,WAAO,CAAC,EAAE,GAAG,MAAM,GAAG,qCAAW,IAAI,QAAQ,qBAAqB,CAAC;AAAA,EACrE;AACF;;;ADfO,IAAM,uBAAuB,MAClC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,qBAAoB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACpE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,sBAAsB,OAAO,MAAM;AACxD,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;AGPF,IAAO,cAAQ;","names":["NodeSystemInfoSchema","NodeSystemInfoSchema"]}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xyo-network/abstract-witness": "^2.79.8",
|
|
14
14
|
"@xyo-network/module-model": "^2.79.8",
|
|
15
|
-
"@xyo-network/node-system-info-payload-plugin": "~2.80.
|
|
15
|
+
"@xyo-network/node-system-info-payload-plugin": "~2.80.5",
|
|
16
16
|
"@xyo-network/payload-model": "^2.79.8",
|
|
17
17
|
"@xyo-network/payloadset-plugin": "^2.79.8",
|
|
18
18
|
"@xyo-network/witness-model": "^2.79.8",
|
|
@@ -26,25 +26,35 @@
|
|
|
26
26
|
"typescript": "^5.2.2"
|
|
27
27
|
},
|
|
28
28
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
29
|
-
"docs": "dist/docs.json",
|
|
30
|
-
"types": "dist/node/index.d.ts",
|
|
31
29
|
"exports": {
|
|
32
30
|
".": {
|
|
31
|
+
"browser": {
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/browser/index.d.cts",
|
|
34
|
+
"default": "./dist/browser/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/browser/index.d.mts",
|
|
38
|
+
"default": "./dist/browser/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
33
41
|
"node": {
|
|
34
42
|
"require": {
|
|
35
|
-
"types": "./dist/node/index.d.
|
|
36
|
-
"default": "./dist/node/index.
|
|
43
|
+
"types": "./dist/node/index.d.cts",
|
|
44
|
+
"default": "./dist/node/index.cjs"
|
|
37
45
|
},
|
|
38
46
|
"import": {
|
|
39
47
|
"types": "./dist/node/index.d.mts",
|
|
40
|
-
"default": "./dist/node/index.
|
|
48
|
+
"default": "./dist/node/index.js"
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
},
|
|
44
52
|
"./package.json": "./package.json"
|
|
45
53
|
},
|
|
46
|
-
"main": "dist/node/index.
|
|
47
|
-
"module": "dist/node/index.
|
|
54
|
+
"main": "dist/node/index.cjs",
|
|
55
|
+
"module": "dist/node/index.js",
|
|
56
|
+
"types": "dist/node/index.d.mts",
|
|
57
|
+
"type": "module",
|
|
48
58
|
"homepage": "https://xyo.network",
|
|
49
59
|
"license": "LGPL-3.0-only",
|
|
50
60
|
"publishConfig": {
|
|
@@ -55,5 +65,5 @@
|
|
|
55
65
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
56
66
|
},
|
|
57
67
|
"sideEffects": false,
|
|
58
|
-
"version": "2.80.
|
|
68
|
+
"version": "2.80.5"
|
|
59
69
|
}
|