@xyo-network/pentair-plugin 2.97.0 → 2.97.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.
@@ -1,2 +1,83 @@
1
- "use strict";var o=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var d=(i,t)=>{for(var n in t)o(i,n,{get:t[n],enumerable:!0})},w=(i,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!h.call(i,a)&&a!==n&&o(i,a,{get:()=>t[a],enumerable:!(c=y(t,a))||c.enumerable});return i};var C=i=>w(o({},"__esModule",{value:!0}),i);var A={};d(A,{PentairScreenlogicPlugin:()=>l,PentairScreenlogicWitness:()=>r,PentairScreenlogicWitnessConfigSchema:()=>m,default:()=>l});module.exports=C(A);var f=require("@xyo-network/payload-model"),p=require("@xyo-network/payloadset-plugin"),P=require("@xyo-network/pentair-payload-plugin");var s=require("@xylabs/assert"),g=require("@xyo-network/abstract-witness"),S=require("@xyo-network/pentair-payload-plugin"),e=require("node-screenlogic"),m="network.xyo.pentair.screenlogic.witness.config",r=class extends g.AbstractWitness{static configSchemas=[...super.configSchemas,m];static defaultConfigSchema=m;async observeHandler(t){let n=new e.FindUnits,c=(0,s.assertEx)((await n.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.screenlogic.initUnit(c),(0,s.assertEx)(await e.screenlogic.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.screenlogic.chem.getChemicalDataAsync(),chlor:await e.screenlogic.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.screenlogic.equipment.getAllCircuitNamesAsync(),config:await e.screenlogic.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.screenlogic.equipment.getControllerConfigAsync(),customNames:await e.screenlogic.equipment.getCustomNamesAsync(),state:await e.screenlogic.equipment.getEquipmentStateAsync(),systemTime:await e.screenlogic.equipment.getSystemTimeAsync(),weatherForecast:await e.screenlogic.equipment.getWeatherForecastAsync()},schedule:{once:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RUNONCE),recurring:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RECURRING)},schema:S.PentairScreenlogicSchema,version:await e.screenlogic.getVersionAsync()}]}};var l=()=>(0,p.createPayloadSetWitnessPlugin)({required:{[P.PentairScreenlogicSchema]:1},schema:f.PayloadSetSchema},{witness:async i=>await r.create(i)});
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
+ PentairScreenlogicPlugin: () => PentairScreenlogicPlugin,
24
+ PentairScreenlogicWitness: () => PentairScreenlogicWitness,
25
+ PentairScreenlogicWitnessConfigSchema: () => PentairScreenlogicWitnessConfigSchema,
26
+ default: () => PentairScreenlogicPlugin
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+
30
+ // src/Plugin.ts
31
+ var import_payload_model = require("@xyo-network/payload-model");
32
+ var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
33
+ var import_pentair_payload_plugin2 = require("@xyo-network/pentair-payload-plugin");
34
+
35
+ // src/Witness.ts
36
+ var import_assert = require("@xylabs/assert");
37
+ var import_abstract_witness = require("@xyo-network/abstract-witness");
38
+ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
39
+ var import_node_screenlogic = require("node-screenlogic");
40
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
41
+ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
42
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
43
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
44
+ async observeHandler(_payloads) {
45
+ const finder = new import_node_screenlogic.FindUnits();
46
+ const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
47
+ import_node_screenlogic.screenlogic.initUnit(localUnit);
48
+ (0, import_assert.assertEx)(await import_node_screenlogic.screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
49
+ return [
50
+ {
51
+ chem: await import_node_screenlogic.screenlogic.chem.getChemicalDataAsync(),
52
+ chlor: await import_node_screenlogic.screenlogic.chlor.getIntellichlorConfigAsync(),
53
+ equipment: {
54
+ circuitNames: await import_node_screenlogic.screenlogic.equipment.getAllCircuitNamesAsync(),
55
+ config: await import_node_screenlogic.screenlogic.equipment.getEquipmentConfigurationAsync(),
56
+ controllerConfig: await import_node_screenlogic.screenlogic.equipment.getControllerConfigAsync(),
57
+ customNames: await import_node_screenlogic.screenlogic.equipment.getCustomNamesAsync(),
58
+ state: await import_node_screenlogic.screenlogic.equipment.getEquipmentStateAsync(),
59
+ systemTime: await import_node_screenlogic.screenlogic.equipment.getSystemTimeAsync(),
60
+ weatherForecast: await import_node_screenlogic.screenlogic.equipment.getWeatherForecastAsync()
61
+ },
62
+ schedule: {
63
+ once: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RUNONCE),
64
+ recurring: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RECURRING)
65
+ },
66
+ schema: import_pentair_payload_plugin.PentairScreenlogicSchema,
67
+ version: await import_node_screenlogic.screenlogic.getVersionAsync()
68
+ }
69
+ ];
70
+ }
71
+ };
72
+
73
+ // src/Plugin.ts
74
+ var PentairScreenlogicPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
75
+ { required: { [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
76
+ {
77
+ witness: async (params) => {
78
+ const result = await PentairScreenlogicWitness.create(params);
79
+ return result;
80
+ }
81
+ }
82
+ );
2
83
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAA,8BAAAC,EAAA,0CAAAC,EAAA,YAAAF,IAAA,eAAAG,EAAAL,GCAA,IAAAM,EAAiC,sCACjCC,EAA8C,0CAC9CC,EAAyC,+CCFzC,IAAAC,EAAyB,0BACzBC,EAAgC,yCAGhCC,EAAoE,+CAEpEC,EAAmD,4BAGtCC,EAA+E,iDAQ/EC,EAAN,cAEG,iBAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeD,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAI,YACbC,KAAY,aAAU,MAAMD,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,qBAAY,SAASC,CAAS,KAC9B,YAAS,MAAM,cAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAM,cAAY,KAAK,qBAAqB,EAClD,MAAO,MAAM,cAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAM,cAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAM,cAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAM,cAAY,UAAU,yBAAyB,EACvE,YAAa,MAAM,cAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAM,cAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAM,cAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAM,cAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAM,cAAY,SAAS,qBAAqB,aAAW,OAAO,EACxE,UAAW,MAAM,cAAY,SAAS,qBAAqB,aAAW,SAAS,CACjF,EACA,OAAQ,2BACR,QAAS,MAAM,cAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMC,EAA2B,OACtC,iCACE,CAAE,SAAU,CAAE,CAAC,0BAAwB,EAAG,CAAE,EAAG,OAAQ,kBAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["src_exports","__export","PentairScreenlogicPlugin","PentairScreenlogicWitness","PentairScreenlogicWitnessConfigSchema","__toCommonJS","import_payload_model","import_payloadset_plugin","import_pentair_payload_plugin","import_assert","import_abstract_witness","import_pentair_payload_plugin","import_node_screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,oCAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,oCAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,oCAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,oCAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,oCAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,oCAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,oCAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,oCAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,oCAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,OAAO;AAAA,UACxE,WAAW,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,oCAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,UACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,uDAAwB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_pentair_payload_plugin"]}
@@ -1,2 +1,60 @@
1
- import{PayloadSetSchema as f}from"@xyo-network/payload-model";import{createPayloadSetWitnessPlugin as p}from"@xyo-network/payloadset-plugin";import{PentairScreenlogicSchema as P}from"@xyo-network/pentair-payload-plugin";import{assertEx as n}from"@xylabs/assert";import{AbstractWitness as l}from"@xyo-network/abstract-witness";import{PentairScreenlogicSchema as g}from"@xyo-network/pentair-payload-plugin";import{FindUnits as S,SchedTypes as a,screenlogic as e}from"node-screenlogic";var r="network.xyo.pentair.screenlogic.witness.config",t=class extends l{static configSchemas=[...super.configSchemas,r];static defaultConfigSchema=r;async observeHandler(o){let s=new S,m=n((await s.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.initUnit(m),n(await e.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.chem.getChemicalDataAsync(),chlor:await e.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.equipment.getAllCircuitNamesAsync(),config:await e.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.equipment.getControllerConfigAsync(),customNames:await e.equipment.getCustomNamesAsync(),state:await e.equipment.getEquipmentStateAsync(),systemTime:await e.equipment.getSystemTimeAsync(),weatherForecast:await e.equipment.getWeatherForecastAsync()},schedule:{once:await e.schedule.getScheduleDataAsync(a.RUNONCE),recurring:await e.schedule.getScheduleDataAsync(a.RECURRING)},schema:g,version:await e.getVersionAsync()}]}};var c=()=>p({required:{[P]:1},schema:f},{witness:async i=>await t.create(i)});export{c as PentairScreenlogicPlugin,t as PentairScreenlogicWitness,r as PentairScreenlogicWitnessConfigSchema,c as default};
1
+ // src/Plugin.ts
2
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
3
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
4
+ import { PentairScreenlogicSchema as PentairScreenlogicSchema2 } from "@xyo-network/pentair-payload-plugin";
5
+
6
+ // src/Witness.ts
7
+ import { assertEx } from "@xylabs/assert";
8
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
9
+ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
+ import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
+ var PentairScreenlogicWitness = class extends AbstractWitness {
13
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
14
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
15
+ async observeHandler(_payloads) {
16
+ const finder = new FindUnits();
17
+ const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
18
+ screenlogic.initUnit(localUnit);
19
+ assertEx(await screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
20
+ return [
21
+ {
22
+ chem: await screenlogic.chem.getChemicalDataAsync(),
23
+ chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
24
+ equipment: {
25
+ circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
26
+ config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
27
+ controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
28
+ customNames: await screenlogic.equipment.getCustomNamesAsync(),
29
+ state: await screenlogic.equipment.getEquipmentStateAsync(),
30
+ systemTime: await screenlogic.equipment.getSystemTimeAsync(),
31
+ weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
32
+ },
33
+ schedule: {
34
+ once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
35
+ recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
36
+ },
37
+ schema: PentairScreenlogicSchema,
38
+ version: await screenlogic.getVersionAsync()
39
+ }
40
+ ];
41
+ }
42
+ };
43
+
44
+ // src/Plugin.ts
45
+ var PentairScreenlogicPlugin = () => createPayloadSetWitnessPlugin(
46
+ { required: { [PentairScreenlogicSchema2]: 1 }, schema: PayloadSetSchema },
47
+ {
48
+ witness: async (params) => {
49
+ const result = await PentairScreenlogicWitness.create(params);
50
+ return result;
51
+ }
52
+ }
53
+ );
54
+ export {
55
+ PentairScreenlogicPlugin,
56
+ PentairScreenlogicWitness,
57
+ PentairScreenlogicWitnessConfigSchema,
58
+ PentairScreenlogicPlugin as default
59
+ };
2
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"AAAA,OAAS,oBAAAA,MAAwB,6BACjC,OAAS,iCAAAC,MAAqC,iCAC9C,OAAS,4BAAAC,MAAgC,sCCFzC,OAAS,YAAAC,MAAgB,iBACzB,OAAS,mBAAAC,MAAuB,gCAGhC,OAAoC,4BAAAC,MAAgC,sCAEpE,OAAS,aAAAC,EAAW,cAAAC,EAAY,eAAAC,MAAmB,mBAG5C,IAAMC,EAA+E,iDAQ/EC,EAAN,cAEGN,CAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeK,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAIN,EACbO,EAAYV,GAAU,MAAMS,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,OAAAJ,EAAY,SAASK,CAAS,EAC9BV,EAAS,MAAMK,EAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAMA,EAAY,KAAK,qBAAqB,EAClD,MAAO,MAAMA,EAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAMA,EAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAMA,EAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAMA,EAAY,UAAU,yBAAyB,EACvE,YAAa,MAAMA,EAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAMA,EAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAMA,EAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAMA,EAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAMA,EAAY,SAAS,qBAAqBD,EAAW,OAAO,EACxE,UAAW,MAAMC,EAAY,SAAS,qBAAqBD,EAAW,SAAS,CACjF,EACA,OAAQF,EACR,QAAS,MAAMG,EAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMM,EAA2B,IACtCC,EACE,CAAE,SAAU,CAAE,CAACC,CAAwB,EAAG,CAAE,EAAG,OAAQC,CAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","PayloadSetSchema","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,YAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,YAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,YAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,YAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,YAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,YAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,YAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,YAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,YAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,YAAY,SAAS,qBAAqB,WAAW,OAAO;AAAA,UACxE,WAAW,MAAM,YAAY,SAAS,qBAAqB,WAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,YAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
@@ -1,2 +1,83 @@
1
- "use strict";var o=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var d=(i,t)=>{for(var n in t)o(i,n,{get:t[n],enumerable:!0})},w=(i,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!h.call(i,a)&&a!==n&&o(i,a,{get:()=>t[a],enumerable:!(c=y(t,a))||c.enumerable});return i};var C=i=>w(o({},"__esModule",{value:!0}),i);var A={};d(A,{PentairScreenlogicPlugin:()=>l,PentairScreenlogicWitness:()=>r,PentairScreenlogicWitnessConfigSchema:()=>m,default:()=>l});module.exports=C(A);var f=require("@xyo-network/payload-model"),p=require("@xyo-network/payloadset-plugin"),P=require("@xyo-network/pentair-payload-plugin");var s=require("@xylabs/assert"),g=require("@xyo-network/abstract-witness"),S=require("@xyo-network/pentair-payload-plugin"),e=require("node-screenlogic"),m="network.xyo.pentair.screenlogic.witness.config",r=class extends g.AbstractWitness{static configSchemas=[...super.configSchemas,m];static defaultConfigSchema=m;async observeHandler(t){let n=new e.FindUnits,c=(0,s.assertEx)((await n.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.screenlogic.initUnit(c),(0,s.assertEx)(await e.screenlogic.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.screenlogic.chem.getChemicalDataAsync(),chlor:await e.screenlogic.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.screenlogic.equipment.getAllCircuitNamesAsync(),config:await e.screenlogic.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.screenlogic.equipment.getControllerConfigAsync(),customNames:await e.screenlogic.equipment.getCustomNamesAsync(),state:await e.screenlogic.equipment.getEquipmentStateAsync(),systemTime:await e.screenlogic.equipment.getSystemTimeAsync(),weatherForecast:await e.screenlogic.equipment.getWeatherForecastAsync()},schedule:{once:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RUNONCE),recurring:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RECURRING)},schema:S.PentairScreenlogicSchema,version:await e.screenlogic.getVersionAsync()}]}};var l=()=>(0,p.createPayloadSetWitnessPlugin)({required:{[P.PentairScreenlogicSchema]:1},schema:f.PayloadSetSchema},{witness:async i=>await r.create(i)});
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
+ PentairScreenlogicPlugin: () => PentairScreenlogicPlugin,
24
+ PentairScreenlogicWitness: () => PentairScreenlogicWitness,
25
+ PentairScreenlogicWitnessConfigSchema: () => PentairScreenlogicWitnessConfigSchema,
26
+ default: () => PentairScreenlogicPlugin
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+
30
+ // src/Plugin.ts
31
+ var import_payload_model = require("@xyo-network/payload-model");
32
+ var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
33
+ var import_pentair_payload_plugin2 = require("@xyo-network/pentair-payload-plugin");
34
+
35
+ // src/Witness.ts
36
+ var import_assert = require("@xylabs/assert");
37
+ var import_abstract_witness = require("@xyo-network/abstract-witness");
38
+ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
39
+ var import_node_screenlogic = require("node-screenlogic");
40
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
41
+ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
42
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
43
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
44
+ async observeHandler(_payloads) {
45
+ const finder = new import_node_screenlogic.FindUnits();
46
+ const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
47
+ import_node_screenlogic.screenlogic.initUnit(localUnit);
48
+ (0, import_assert.assertEx)(await import_node_screenlogic.screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
49
+ return [
50
+ {
51
+ chem: await import_node_screenlogic.screenlogic.chem.getChemicalDataAsync(),
52
+ chlor: await import_node_screenlogic.screenlogic.chlor.getIntellichlorConfigAsync(),
53
+ equipment: {
54
+ circuitNames: await import_node_screenlogic.screenlogic.equipment.getAllCircuitNamesAsync(),
55
+ config: await import_node_screenlogic.screenlogic.equipment.getEquipmentConfigurationAsync(),
56
+ controllerConfig: await import_node_screenlogic.screenlogic.equipment.getControllerConfigAsync(),
57
+ customNames: await import_node_screenlogic.screenlogic.equipment.getCustomNamesAsync(),
58
+ state: await import_node_screenlogic.screenlogic.equipment.getEquipmentStateAsync(),
59
+ systemTime: await import_node_screenlogic.screenlogic.equipment.getSystemTimeAsync(),
60
+ weatherForecast: await import_node_screenlogic.screenlogic.equipment.getWeatherForecastAsync()
61
+ },
62
+ schedule: {
63
+ once: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RUNONCE),
64
+ recurring: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RECURRING)
65
+ },
66
+ schema: import_pentair_payload_plugin.PentairScreenlogicSchema,
67
+ version: await import_node_screenlogic.screenlogic.getVersionAsync()
68
+ }
69
+ ];
70
+ }
71
+ };
72
+
73
+ // src/Plugin.ts
74
+ var PentairScreenlogicPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
75
+ { required: { [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
76
+ {
77
+ witness: async (params) => {
78
+ const result = await PentairScreenlogicWitness.create(params);
79
+ return result;
80
+ }
81
+ }
82
+ );
2
83
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAA,8BAAAC,EAAA,0CAAAC,EAAA,YAAAF,IAAA,eAAAG,EAAAL,GCAA,IAAAM,EAAiC,sCACjCC,EAA8C,0CAC9CC,EAAyC,+CCFzC,IAAAC,EAAyB,0BACzBC,EAAgC,yCAGhCC,EAAoE,+CAEpEC,EAAmD,4BAGtCC,EAA+E,iDAQ/EC,EAAN,cAEG,iBAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeD,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAI,YACbC,KAAY,aAAU,MAAMD,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,qBAAY,SAASC,CAAS,KAC9B,YAAS,MAAM,cAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAM,cAAY,KAAK,qBAAqB,EAClD,MAAO,MAAM,cAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAM,cAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAM,cAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAM,cAAY,UAAU,yBAAyB,EACvE,YAAa,MAAM,cAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAM,cAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAM,cAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAM,cAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAM,cAAY,SAAS,qBAAqB,aAAW,OAAO,EACxE,UAAW,MAAM,cAAY,SAAS,qBAAqB,aAAW,SAAS,CACjF,EACA,OAAQ,2BACR,QAAS,MAAM,cAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMC,EAA2B,OACtC,iCACE,CAAE,SAAU,CAAE,CAAC,0BAAwB,EAAG,CAAE,EAAG,OAAQ,kBAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["src_exports","__export","PentairScreenlogicPlugin","PentairScreenlogicWitness","PentairScreenlogicWitnessConfigSchema","__toCommonJS","import_payload_model","import_payloadset_plugin","import_pentair_payload_plugin","import_assert","import_abstract_witness","import_pentair_payload_plugin","import_node_screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,oCAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,oCAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,oCAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,oCAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,oCAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,oCAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,oCAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,oCAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,oCAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,OAAO;AAAA,UACxE,WAAW,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,oCAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,UACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,uDAAwB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_pentair_payload_plugin"]}
@@ -1,2 +1,60 @@
1
- import{PayloadSetSchema as f}from"@xyo-network/payload-model";import{createPayloadSetWitnessPlugin as p}from"@xyo-network/payloadset-plugin";import{PentairScreenlogicSchema as P}from"@xyo-network/pentair-payload-plugin";import{assertEx as n}from"@xylabs/assert";import{AbstractWitness as l}from"@xyo-network/abstract-witness";import{PentairScreenlogicSchema as g}from"@xyo-network/pentair-payload-plugin";import{FindUnits as S,SchedTypes as a,screenlogic as e}from"node-screenlogic";var r="network.xyo.pentair.screenlogic.witness.config",t=class extends l{static configSchemas=[...super.configSchemas,r];static defaultConfigSchema=r;async observeHandler(o){let s=new S,m=n((await s.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.initUnit(m),n(await e.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.chem.getChemicalDataAsync(),chlor:await e.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.equipment.getAllCircuitNamesAsync(),config:await e.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.equipment.getControllerConfigAsync(),customNames:await e.equipment.getCustomNamesAsync(),state:await e.equipment.getEquipmentStateAsync(),systemTime:await e.equipment.getSystemTimeAsync(),weatherForecast:await e.equipment.getWeatherForecastAsync()},schedule:{once:await e.schedule.getScheduleDataAsync(a.RUNONCE),recurring:await e.schedule.getScheduleDataAsync(a.RECURRING)},schema:g,version:await e.getVersionAsync()}]}};var c=()=>p({required:{[P]:1},schema:f},{witness:async i=>await t.create(i)});export{c as PentairScreenlogicPlugin,t as PentairScreenlogicWitness,r as PentairScreenlogicWitnessConfigSchema,c as default};
1
+ // src/Plugin.ts
2
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
3
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
4
+ import { PentairScreenlogicSchema as PentairScreenlogicSchema2 } from "@xyo-network/pentair-payload-plugin";
5
+
6
+ // src/Witness.ts
7
+ import { assertEx } from "@xylabs/assert";
8
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
9
+ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
+ import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
+ var PentairScreenlogicWitness = class extends AbstractWitness {
13
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
14
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
15
+ async observeHandler(_payloads) {
16
+ const finder = new FindUnits();
17
+ const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
18
+ screenlogic.initUnit(localUnit);
19
+ assertEx(await screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
20
+ return [
21
+ {
22
+ chem: await screenlogic.chem.getChemicalDataAsync(),
23
+ chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
24
+ equipment: {
25
+ circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
26
+ config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
27
+ controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
28
+ customNames: await screenlogic.equipment.getCustomNamesAsync(),
29
+ state: await screenlogic.equipment.getEquipmentStateAsync(),
30
+ systemTime: await screenlogic.equipment.getSystemTimeAsync(),
31
+ weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
32
+ },
33
+ schedule: {
34
+ once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
35
+ recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
36
+ },
37
+ schema: PentairScreenlogicSchema,
38
+ version: await screenlogic.getVersionAsync()
39
+ }
40
+ ];
41
+ }
42
+ };
43
+
44
+ // src/Plugin.ts
45
+ var PentairScreenlogicPlugin = () => createPayloadSetWitnessPlugin(
46
+ { required: { [PentairScreenlogicSchema2]: 1 }, schema: PayloadSetSchema },
47
+ {
48
+ witness: async (params) => {
49
+ const result = await PentairScreenlogicWitness.create(params);
50
+ return result;
51
+ }
52
+ }
53
+ );
54
+ export {
55
+ PentairScreenlogicPlugin,
56
+ PentairScreenlogicWitness,
57
+ PentairScreenlogicWitnessConfigSchema,
58
+ PentairScreenlogicPlugin as default
59
+ };
2
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"AAAA,OAAS,oBAAAA,MAAwB,6BACjC,OAAS,iCAAAC,MAAqC,iCAC9C,OAAS,4BAAAC,MAAgC,sCCFzC,OAAS,YAAAC,MAAgB,iBACzB,OAAS,mBAAAC,MAAuB,gCAGhC,OAAoC,4BAAAC,MAAgC,sCAEpE,OAAS,aAAAC,EAAW,cAAAC,EAAY,eAAAC,MAAmB,mBAG5C,IAAMC,EAA+E,iDAQ/EC,EAAN,cAEGN,CAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeK,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAIN,EACbO,EAAYV,GAAU,MAAMS,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,OAAAJ,EAAY,SAASK,CAAS,EAC9BV,EAAS,MAAMK,EAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAMA,EAAY,KAAK,qBAAqB,EAClD,MAAO,MAAMA,EAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAMA,EAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAMA,EAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAMA,EAAY,UAAU,yBAAyB,EACvE,YAAa,MAAMA,EAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAMA,EAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAMA,EAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAMA,EAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAMA,EAAY,SAAS,qBAAqBD,EAAW,OAAO,EACxE,UAAW,MAAMC,EAAY,SAAS,qBAAqBD,EAAW,SAAS,CACjF,EACA,OAAQF,EACR,QAAS,MAAMG,EAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMM,EAA2B,IACtCC,EACE,CAAE,SAAU,CAAE,CAACC,CAAwB,EAAG,CAAE,EAAG,OAAQC,CAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","PayloadSetSchema","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,YAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,YAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,YAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,YAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,YAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,YAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,YAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,YAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,YAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,YAAY,SAAS,qBAAqB,WAAW,OAAO;AAAA,UACxE,WAAW,MAAM,YAAY,SAAS,qBAAqB,WAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,YAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
@@ -1,2 +1,89 @@
1
- "use strict";var o=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var d=(i,t)=>{for(var n in t)o(i,n,{get:t[n],enumerable:!0})},w=(i,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!h.call(i,a)&&a!==n&&o(i,a,{get:()=>t[a],enumerable:!(c=y(t,a))||c.enumerable});return i};var C=i=>w(o({},"__esModule",{value:!0}),i);var A={};d(A,{PentairScreenlogicPlugin:()=>l,PentairScreenlogicWitness:()=>r,PentairScreenlogicWitnessConfigSchema:()=>m,default:()=>l});module.exports=C(A);var f=require("@xyo-network/payload-model"),p=require("@xyo-network/payloadset-plugin"),P=require("@xyo-network/pentair-payload-plugin");var s=require("@xylabs/assert"),g=require("@xyo-network/abstract-witness"),S=require("@xyo-network/pentair-payload-plugin"),e=require("node-screenlogic"),m="network.xyo.pentair.screenlogic.witness.config",r=class extends g.AbstractWitness{static configSchemas=[...super.configSchemas,m];static defaultConfigSchema=m;async observeHandler(t){let n=new e.FindUnits,c=(0,s.assertEx)((await n.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.screenlogic.initUnit(c),(0,s.assertEx)(await e.screenlogic.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.screenlogic.chem.getChemicalDataAsync(),chlor:await e.screenlogic.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.screenlogic.equipment.getAllCircuitNamesAsync(),config:await e.screenlogic.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.screenlogic.equipment.getControllerConfigAsync(),customNames:await e.screenlogic.equipment.getCustomNamesAsync(),state:await e.screenlogic.equipment.getEquipmentStateAsync(),systemTime:await e.screenlogic.equipment.getSystemTimeAsync(),weatherForecast:await e.screenlogic.equipment.getWeatherForecastAsync()},schedule:{once:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RUNONCE),recurring:await e.screenlogic.schedule.getScheduleDataAsync(e.SchedTypes.RECURRING)},schema:S.PentairScreenlogicSchema,version:await e.screenlogic.getVersionAsync()}]}};var l=()=>(0,p.createPayloadSetWitnessPlugin)({required:{[P.PentairScreenlogicSchema]:1},schema:f.PayloadSetSchema},{witness:async i=>await r.create(i)});0&&(module.exports={PentairScreenlogicPlugin,PentairScreenlogicWitness,PentairScreenlogicWitnessConfigSchema});
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
+ PentairScreenlogicPlugin: () => PentairScreenlogicPlugin,
24
+ PentairScreenlogicWitness: () => PentairScreenlogicWitness,
25
+ PentairScreenlogicWitnessConfigSchema: () => PentairScreenlogicWitnessConfigSchema,
26
+ default: () => PentairScreenlogicPlugin
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+
30
+ // src/Plugin.ts
31
+ var import_payload_model = require("@xyo-network/payload-model");
32
+ var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
33
+ var import_pentair_payload_plugin2 = require("@xyo-network/pentair-payload-plugin");
34
+
35
+ // src/Witness.ts
36
+ var import_assert = require("@xylabs/assert");
37
+ var import_abstract_witness = require("@xyo-network/abstract-witness");
38
+ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
39
+ var import_node_screenlogic = require("node-screenlogic");
40
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
41
+ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
42
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
43
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
44
+ async observeHandler(_payloads) {
45
+ const finder = new import_node_screenlogic.FindUnits();
46
+ const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
47
+ import_node_screenlogic.screenlogic.initUnit(localUnit);
48
+ (0, import_assert.assertEx)(await import_node_screenlogic.screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
49
+ return [
50
+ {
51
+ chem: await import_node_screenlogic.screenlogic.chem.getChemicalDataAsync(),
52
+ chlor: await import_node_screenlogic.screenlogic.chlor.getIntellichlorConfigAsync(),
53
+ equipment: {
54
+ circuitNames: await import_node_screenlogic.screenlogic.equipment.getAllCircuitNamesAsync(),
55
+ config: await import_node_screenlogic.screenlogic.equipment.getEquipmentConfigurationAsync(),
56
+ controllerConfig: await import_node_screenlogic.screenlogic.equipment.getControllerConfigAsync(),
57
+ customNames: await import_node_screenlogic.screenlogic.equipment.getCustomNamesAsync(),
58
+ state: await import_node_screenlogic.screenlogic.equipment.getEquipmentStateAsync(),
59
+ systemTime: await import_node_screenlogic.screenlogic.equipment.getSystemTimeAsync(),
60
+ weatherForecast: await import_node_screenlogic.screenlogic.equipment.getWeatherForecastAsync()
61
+ },
62
+ schedule: {
63
+ once: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RUNONCE),
64
+ recurring: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RECURRING)
65
+ },
66
+ schema: import_pentair_payload_plugin.PentairScreenlogicSchema,
67
+ version: await import_node_screenlogic.screenlogic.getVersionAsync()
68
+ }
69
+ ];
70
+ }
71
+ };
72
+
73
+ // src/Plugin.ts
74
+ var PentairScreenlogicPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
75
+ { required: { [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
76
+ {
77
+ witness: async (params) => {
78
+ const result = await PentairScreenlogicWitness.create(params);
79
+ return result;
80
+ }
81
+ }
82
+ );
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ PentairScreenlogicPlugin,
86
+ PentairScreenlogicWitness,
87
+ PentairScreenlogicWitnessConfigSchema
88
+ });
2
89
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAA,8BAAAC,EAAA,0CAAAC,EAAA,YAAAF,IAAA,eAAAG,EAAAL,GCAA,IAAAM,EAAiC,sCACjCC,EAA8C,0CAC9CC,EAAyC,+CCFzC,IAAAC,EAAyB,0BACzBC,EAAgC,yCAGhCC,EAAoE,+CAEpEC,EAAmD,4BAGtCC,EAA+E,iDAQ/EC,EAAN,cAEG,iBAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeD,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAI,YACbC,KAAY,aAAU,MAAMD,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,qBAAY,SAASC,CAAS,KAC9B,YAAS,MAAM,cAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAM,cAAY,KAAK,qBAAqB,EAClD,MAAO,MAAM,cAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAM,cAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAM,cAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAM,cAAY,UAAU,yBAAyB,EACvE,YAAa,MAAM,cAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAM,cAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAM,cAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAM,cAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAM,cAAY,SAAS,qBAAqB,aAAW,OAAO,EACxE,UAAW,MAAM,cAAY,SAAS,qBAAqB,aAAW,SAAS,CACjF,EACA,OAAQ,2BACR,QAAS,MAAM,cAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMC,EAA2B,OACtC,iCACE,CAAE,SAAU,CAAE,CAAC,0BAAwB,EAAG,CAAE,EAAG,OAAQ,kBAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["src_exports","__export","PentairScreenlogicPlugin","PentairScreenlogicWitness","PentairScreenlogicWitnessConfigSchema","__toCommonJS","import_payload_model","import_payloadset_plugin","import_pentair_payload_plugin","import_assert","import_abstract_witness","import_pentair_payload_plugin","import_node_screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,oCAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,oCAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,oCAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,oCAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,oCAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,oCAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,oCAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,oCAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,oCAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,OAAO;AAAA,UACxE,WAAW,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,oCAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,UACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,uDAAwB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_pentair_payload_plugin"]}
@@ -1,2 +1,60 @@
1
- import{PayloadSetSchema as f}from"@xyo-network/payload-model";import{createPayloadSetWitnessPlugin as p}from"@xyo-network/payloadset-plugin";import{PentairScreenlogicSchema as P}from"@xyo-network/pentair-payload-plugin";import{assertEx as n}from"@xylabs/assert";import{AbstractWitness as l}from"@xyo-network/abstract-witness";import{PentairScreenlogicSchema as g}from"@xyo-network/pentair-payload-plugin";import{FindUnits as S,SchedTypes as a,screenlogic as e}from"node-screenlogic";var r="network.xyo.pentair.screenlogic.witness.config",t=class extends l{static configSchemas=[...super.configSchemas,r];static defaultConfigSchema=r;async observeHandler(o){let s=new S,m=n((await s.searchAsync()).shift(),()=>"No local screenlogic unit found");return e.initUnit(m),n(await e.connectAsync(),()=>"Failed to connect to ScreenLogic"),[{chem:await e.chem.getChemicalDataAsync(),chlor:await e.chlor.getIntellichlorConfigAsync(),equipment:{circuitNames:await e.equipment.getAllCircuitNamesAsync(),config:await e.equipment.getEquipmentConfigurationAsync(),controllerConfig:await e.equipment.getControllerConfigAsync(),customNames:await e.equipment.getCustomNamesAsync(),state:await e.equipment.getEquipmentStateAsync(),systemTime:await e.equipment.getSystemTimeAsync(),weatherForecast:await e.equipment.getWeatherForecastAsync()},schedule:{once:await e.schedule.getScheduleDataAsync(a.RUNONCE),recurring:await e.schedule.getScheduleDataAsync(a.RECURRING)},schema:g,version:await e.getVersionAsync()}]}};var c=()=>p({required:{[P]:1},schema:f},{witness:async i=>await t.create(i)});export{c as PentairScreenlogicPlugin,t as PentairScreenlogicWitness,r as PentairScreenlogicWitnessConfigSchema,c as default};
1
+ // src/Plugin.ts
2
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
3
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
4
+ import { PentairScreenlogicSchema as PentairScreenlogicSchema2 } from "@xyo-network/pentair-payload-plugin";
5
+
6
+ // src/Witness.ts
7
+ import { assertEx } from "@xylabs/assert";
8
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
9
+ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
+ import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
+ var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
+ var PentairScreenlogicWitness = class extends AbstractWitness {
13
+ static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
14
+ static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
15
+ async observeHandler(_payloads) {
16
+ const finder = new FindUnits();
17
+ const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
18
+ screenlogic.initUnit(localUnit);
19
+ assertEx(await screenlogic.connectAsync(), () => "Failed to connect to ScreenLogic");
20
+ return [
21
+ {
22
+ chem: await screenlogic.chem.getChemicalDataAsync(),
23
+ chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
24
+ equipment: {
25
+ circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
26
+ config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
27
+ controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
28
+ customNames: await screenlogic.equipment.getCustomNamesAsync(),
29
+ state: await screenlogic.equipment.getEquipmentStateAsync(),
30
+ systemTime: await screenlogic.equipment.getSystemTimeAsync(),
31
+ weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
32
+ },
33
+ schedule: {
34
+ once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
35
+ recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
36
+ },
37
+ schema: PentairScreenlogicSchema,
38
+ version: await screenlogic.getVersionAsync()
39
+ }
40
+ ];
41
+ }
42
+ };
43
+
44
+ // src/Plugin.ts
45
+ var PentairScreenlogicPlugin = () => createPayloadSetWitnessPlugin(
46
+ { required: { [PentairScreenlogicSchema2]: 1 }, schema: PayloadSetSchema },
47
+ {
48
+ witness: async (params) => {
49
+ const result = await PentairScreenlogicWitness.create(params);
50
+ return result;
51
+ }
52
+ }
53
+ );
54
+ export {
55
+ PentairScreenlogicPlugin,
56
+ PentairScreenlogicWitness,
57
+ PentairScreenlogicWitnessConfigSchema,
58
+ PentairScreenlogicPlugin as default
59
+ };
2
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":"AAAA,OAAS,oBAAAA,MAAwB,6BACjC,OAAS,iCAAAC,MAAqC,iCAC9C,OAAS,4BAAAC,MAAgC,sCCFzC,OAAS,YAAAC,MAAgB,iBACzB,OAAS,mBAAAC,MAAuB,gCAGhC,OAAoC,4BAAAC,MAAgC,sCAEpE,OAAS,aAAAC,EAAW,cAAAC,EAAY,eAAAC,MAAmB,mBAG5C,IAAMC,EAA+E,iDAQ/EC,EAAN,cAEGN,CAAyB,CACjC,OAAyB,cAA0B,CAAC,GAAG,MAAM,cAAeK,CAAqC,EACjH,OAAyB,oBAA8BA,EAEvD,MAAyB,eAAeE,EAAoD,CAC1F,IAAMC,EAAS,IAAIN,EACbO,EAAYV,GAAU,MAAMS,EAAO,YAAY,GAAG,MAAM,EAAG,IAAM,iCAAiC,EACxG,OAAAJ,EAAY,SAASK,CAAS,EAC9BV,EAAS,MAAMK,EAAY,aAAa,EAAG,IAAM,kCAAkC,EAE5E,CACL,CACE,KAAM,MAAMA,EAAY,KAAK,qBAAqB,EAClD,MAAO,MAAMA,EAAY,MAAM,2BAA2B,EAC1D,UAAW,CACT,aAAc,MAAMA,EAAY,UAAU,wBAAwB,EAClE,OAAQ,MAAMA,EAAY,UAAU,+BAA+B,EACnE,iBAAkB,MAAMA,EAAY,UAAU,yBAAyB,EACvE,YAAa,MAAMA,EAAY,UAAU,oBAAoB,EAC7D,MAAO,MAAMA,EAAY,UAAU,uBAAuB,EAC1D,WAAY,MAAMA,EAAY,UAAU,mBAAmB,EAC3D,gBAAiB,MAAMA,EAAY,UAAU,wBAAwB,CACvE,EACA,SAAU,CACR,KAAM,MAAMA,EAAY,SAAS,qBAAqBD,EAAW,OAAO,EACxE,UAAW,MAAMC,EAAY,SAAS,qBAAqBD,EAAW,SAAS,CACjF,EACA,OAAQF,EACR,QAAS,MAAMG,EAAY,gBAAgB,CAC7C,CACF,CACF,CACF,ED7CO,IAAMM,EAA2B,IACtCC,EACE,CAAE,SAAU,CAAE,CAACC,CAAwB,EAAG,CAAE,EAAG,OAAQC,CAAiB,EACxE,CACE,QAAS,MAAOC,GACC,MAAMC,EAA0B,OAAOD,CAAM,CAGhE,CACF","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","_payloads","finder","localUnit","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","PayloadSetSchema","params","PentairScreenlogicWitness"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACjH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,YAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,YAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,YAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,YAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,YAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,YAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,YAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,YAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,YAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,YAAY,SAAS,qBAAqB,WAAW,OAAO;AAAA,UACxE,WAAW,MAAM,YAAY,SAAS,qBAAqB,WAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,YAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
package/package.json CHANGED
@@ -11,20 +11,20 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/assert": "^3.5.1",
14
- "@xyo-network/abstract-witness": "^2.107.0",
15
- "@xyo-network/module-model": "^2.107.0",
16
- "@xyo-network/payload-model": "^2.107.0",
17
- "@xyo-network/payloadset-plugin": "^2.107.0",
18
- "@xyo-network/pentair-payload-plugin": "~2.97.0",
19
- "@xyo-network/witness-model": "^2.107.0",
14
+ "@xyo-network/abstract-witness": "^2.107.4",
15
+ "@xyo-network/module-model": "^2.107.4",
16
+ "@xyo-network/payload-model": "^2.107.4",
17
+ "@xyo-network/payloadset-plugin": "^2.107.4",
18
+ "@xyo-network/pentair-payload-plugin": "~2.97.1",
19
+ "@xyo-network/witness-model": "^2.107.4",
20
20
  "node-screenlogic": "^2.1.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@xylabs/jest-helpers": "^3.5.1",
24
- "@xylabs/ts-scripts-yarn3": "^3.11.8",
25
- "@xylabs/tsconfig": "^3.11.8",
26
- "@xyo-network/account": "^2.107.0",
27
- "@xyo-network/payload-wrapper": "^2.107.0",
24
+ "@xylabs/ts-scripts-yarn3": "^3.11.10",
25
+ "@xylabs/tsconfig": "^3.11.10",
26
+ "@xyo-network/account": "^2.107.4",
27
+ "@xyo-network/payload-wrapper": "^2.107.4",
28
28
  "jest": "^29.7.0",
29
29
  "typescript": "^5.5.2"
30
30
  },
@@ -67,6 +67,6 @@
67
67
  "url": "https://github.com/XYOracleNetwork/plugins.git"
68
68
  },
69
69
  "sideEffects": false,
70
- "version": "2.97.0",
70
+ "version": "2.97.1",
71
71
  "type": "module"
72
72
  }