@xyo-network/pentair-plugin 2.99.4 → 2.99.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,7 +40,13 @@ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin
39
40
  var import_node_screenlogic = require("node-screenlogic");
40
41
  var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
41
42
  var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
42
- static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
43
+ static {
44
+ __name(this, "PentairScreenlogicWitness");
45
+ }
46
+ static configSchemas = [
47
+ ...super.configSchemas,
48
+ PentairScreenlogicWitnessConfigSchema
49
+ ];
43
50
  static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
44
51
  async observeHandler(_payloads) {
45
52
  const finder = new import_node_screenlogic.FindUnits();
@@ -71,13 +78,15 @@ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWi
71
78
  };
72
79
 
73
80
  // 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
- );
81
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
82
+ required: {
83
+ [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1
84
+ },
85
+ schema: import_payload_model.PayloadSetSchema
86
+ }, {
87
+ witness: /* @__PURE__ */ __name(async (params) => {
88
+ const result = await PentairScreenlogicWitness.create(params);
89
+ return result;
90
+ }, "witness")
91
+ }), "PentairScreenlogicPlugin");
83
92
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js'\nexport * from './Witness.js'\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.js'\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
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts'\nexport * from './Witness.ts'\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.ts'\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;;;;;;;;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,4BAAN,cAEGC,wCAAAA;EAnBV,OAmBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EAEvD,MAAyBK,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,kCAAAA;AACnB,UAAMC,gBAAYC,yBAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,wCAAYC,SAASL,SAAAA;AACrBC,gCAAS,MAAMG,oCAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,oCAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,oCAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,oCAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,oCAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,oCAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,oCAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,oCAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,oCAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,oCAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,oCAAYsB,SAASE,qBAAqBC,mCAAWC,OAAO;UACxEC,WAAW,MAAM3B,oCAAYsB,SAASE,qBAAqBC,mCAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,oCAAYgC,gBAAe;MAC5C;;EAEJ;AACF;;;AD7CO,IAAMC,2BAA2B,iCACtCC,wDACE;EAAEC,UAAU;IAAE,CAACC,uDAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["import_pentair_payload_plugin","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","configSchemas","defaultConfigSchema","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/Plugin.ts
2
5
  import { PayloadSetSchema } from "@xyo-network/payload-model";
3
6
  import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
@@ -10,7 +13,13 @@ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
13
  import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
14
  var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
15
  var PentairScreenlogicWitness = class extends AbstractWitness {
13
- static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
16
+ static {
17
+ __name(this, "PentairScreenlogicWitness");
18
+ }
19
+ static configSchemas = [
20
+ ...super.configSchemas,
21
+ PentairScreenlogicWitnessConfigSchema
22
+ ];
14
23
  static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
15
24
  async observeHandler(_payloads) {
16
25
  const finder = new FindUnits();
@@ -42,19 +51,21 @@ var PentairScreenlogicWitness = class extends AbstractWitness {
42
51
  };
43
52
 
44
53
  // 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
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
55
+ required: {
56
+ [PentairScreenlogicSchema2]: 1
57
+ },
58
+ schema: PayloadSetSchema
59
+ }, {
60
+ witness: /* @__PURE__ */ __name(async (params) => {
61
+ const result = await PentairScreenlogicWitness.create(params);
62
+ return result;
63
+ }, "witness")
64
+ }), "PentairScreenlogicPlugin");
54
65
  export {
55
66
  PentairScreenlogicPlugin,
56
67
  PentairScreenlogicWitness,
57
68
  PentairScreenlogicWitnessConfigSchema,
58
69
  PentairScreenlogicPlugin as default
59
70
  };
60
- //# sourceMappingURL=index.js.map
71
+ //# sourceMappingURL=index.mjs.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.js'\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
+ {"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.ts'\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,SAASA,wBAAwB;AACjC,SAASC,qCAAqC;AAC9C,SAASC,4BAAAA,iCAAgC;;;ACFzC,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAGhC,SAAoCC,gCAAgC;AAEpE,SAASC,WAAWC,YAAYC,mBAAmB;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,4BAAN,cAEGC,gBAAAA;EAnBV,OAmBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EAEvD,MAAyBK,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,UAAAA;AACnB,UAAMC,YAAYC,UAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,gBAAYC,SAASL,SAAAA;AACrBC,aAAS,MAAMG,YAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,YAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,YAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,YAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,YAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,YAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,YAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,YAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,YAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,YAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,YAAYsB,SAASE,qBAAqBC,WAAWC,OAAO;UACxEC,WAAW,MAAM3B,YAAYsB,SAASE,qBAAqBC,WAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,YAAYgC,gBAAe;MAC5C;;EAEJ;AACF;;;AD7CO,IAAMC,2BAA2B,6BACtCC,8BACE;EAAEC,UAAU;IAAE,CAACC,yBAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","configSchemas","defaultConfigSchema","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,7 +40,13 @@ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin
39
40
  var import_node_screenlogic = require("node-screenlogic");
40
41
  var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
41
42
  var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
42
- static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
43
+ static {
44
+ __name(this, "PentairScreenlogicWitness");
45
+ }
46
+ static configSchemas = [
47
+ ...super.configSchemas,
48
+ PentairScreenlogicWitnessConfigSchema
49
+ ];
43
50
  static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
44
51
  async observeHandler(_payloads) {
45
52
  const finder = new import_node_screenlogic.FindUnits();
@@ -71,13 +78,15 @@ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWi
71
78
  };
72
79
 
73
80
  // 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
- );
81
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
82
+ required: {
83
+ [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1
84
+ },
85
+ schema: import_payload_model.PayloadSetSchema
86
+ }, {
87
+ witness: /* @__PURE__ */ __name(async (params) => {
88
+ const result = await PentairScreenlogicWitness.create(params);
89
+ return result;
90
+ }, "witness")
91
+ }), "PentairScreenlogicPlugin");
83
92
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js'\nexport * from './Witness.js'\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.js'\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
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts'\nexport * from './Witness.ts'\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.ts'\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;;;;;;;;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,4BAAN,cAEGC,wCAAAA;EAnBV,OAmBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EAEvD,MAAyBK,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,kCAAAA;AACnB,UAAMC,gBAAYC,yBAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,wCAAYC,SAASL,SAAAA;AACrBC,gCAAS,MAAMG,oCAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,oCAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,oCAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,oCAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,oCAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,oCAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,oCAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,oCAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,oCAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,oCAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,oCAAYsB,SAASE,qBAAqBC,mCAAWC,OAAO;UACxEC,WAAW,MAAM3B,oCAAYsB,SAASE,qBAAqBC,mCAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,oCAAYgC,gBAAe;MAC5C;;EAEJ;AACF;;;AD7CO,IAAMC,2BAA2B,iCACtCC,wDACE;EAAEC,UAAU;IAAE,CAACC,uDAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["import_pentair_payload_plugin","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","configSchemas","defaultConfigSchema","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/Plugin.ts
2
5
  import { PayloadSetSchema } from "@xyo-network/payload-model";
3
6
  import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
@@ -10,7 +13,13 @@ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
13
  import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
14
  var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
15
  var PentairScreenlogicWitness = class extends AbstractWitness {
13
- static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
16
+ static {
17
+ __name(this, "PentairScreenlogicWitness");
18
+ }
19
+ static configSchemas = [
20
+ ...super.configSchemas,
21
+ PentairScreenlogicWitnessConfigSchema
22
+ ];
14
23
  static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
15
24
  async observeHandler(_payloads) {
16
25
  const finder = new FindUnits();
@@ -42,19 +51,21 @@ var PentairScreenlogicWitness = class extends AbstractWitness {
42
51
  };
43
52
 
44
53
  // 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
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
55
+ required: {
56
+ [PentairScreenlogicSchema2]: 1
57
+ },
58
+ schema: PayloadSetSchema
59
+ }, {
60
+ witness: /* @__PURE__ */ __name(async (params) => {
61
+ const result = await PentairScreenlogicWitness.create(params);
62
+ return result;
63
+ }, "witness")
64
+ }), "PentairScreenlogicPlugin");
54
65
  export {
55
66
  PentairScreenlogicPlugin,
56
67
  PentairScreenlogicWitness,
57
68
  PentairScreenlogicWitnessConfigSchema,
58
69
  PentairScreenlogicPlugin as default
59
70
  };
60
- //# sourceMappingURL=index.js.map
71
+ //# sourceMappingURL=index.mjs.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.js'\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
+ {"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.ts'\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,SAASA,wBAAwB;AACjC,SAASC,qCAAqC;AAC9C,SAASC,4BAAAA,iCAAgC;;;ACFzC,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAGhC,SAAoCC,gCAAgC;AAEpE,SAASC,WAAWC,YAAYC,mBAAmB;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,4BAAN,cAEGC,gBAAAA;EAnBV,OAmBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EAEvD,MAAyBK,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,UAAAA;AACnB,UAAMC,YAAYC,UAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,gBAAYC,SAASL,SAAAA;AACrBC,aAAS,MAAMG,YAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,YAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,YAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,YAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,YAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,YAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,YAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,YAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,YAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,YAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,YAAYsB,SAASE,qBAAqBC,WAAWC,OAAO;UACxEC,WAAW,MAAM3B,YAAYsB,SAASE,qBAAqBC,WAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,YAAYgC,gBAAe;MAC5C;;EAEJ;AACF;;;AD7CO,IAAMC,2BAA2B,6BACtCC,8BACE;EAAEC,UAAU;IAAE,CAACC,yBAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","configSchemas","defaultConfigSchema","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -1,4 +1,4 @@
1
- import { PentairScreenlogicWitness } from './Witness.js';
1
+ import { PentairScreenlogicWitness } from './Witness.ts';
2
2
  export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xylabs/object").BaseParamsFields & {
3
3
  account?: import("@xyo-network/account-model").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
@@ -7,7 +7,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.pentair.screenlogic.witness.config";
9
9
  } & {
10
- schema: import("./Witness.js").PentairScreenlogicWitnessConfigSchema;
10
+ schema: import("./Witness.ts").PentairScreenlogicWitnessConfigSchema;
11
11
  }, "schema"> & {
12
12
  schema: "network.xyo.pentair.screenlogic.witness.config";
13
13
  }, "schema"> & {
@@ -2,7 +2,11 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __reflectGet = Reflect.get;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
10
  var __export = (target, all) => {
7
11
  for (var name in all)
8
12
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -16,6 +20,8 @@ var __copyProps = (to, from, except, desc) => {
16
20
  return to;
17
21
  };
18
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
24
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
19
25
 
20
26
  // src/index.ts
21
27
  var src_exports = {};
@@ -38,9 +44,7 @@ var import_abstract_witness = require("@xyo-network/abstract-witness");
38
44
  var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
39
45
  var import_node_screenlogic = require("node-screenlogic");
40
46
  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;
47
+ var _PentairScreenlogicWitness = class _PentairScreenlogicWitness extends import_abstract_witness.AbstractWitness {
44
48
  async observeHandler(_payloads) {
45
49
  const finder = new import_node_screenlogic.FindUnits();
46
50
  const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
@@ -69,17 +73,26 @@ var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWi
69
73
  ];
70
74
  }
71
75
  };
76
+ __name(_PentairScreenlogicWitness, "PentairScreenlogicWitness");
77
+ __publicField(_PentairScreenlogicWitness, "configSchemas", [
78
+ ...__superGet(_PentairScreenlogicWitness, _PentairScreenlogicWitness, "configSchemas"),
79
+ PentairScreenlogicWitnessConfigSchema
80
+ ]);
81
+ __publicField(_PentairScreenlogicWitness, "defaultConfigSchema", PentairScreenlogicWitnessConfigSchema);
82
+ var PentairScreenlogicWitness = _PentairScreenlogicWitness;
72
83
 
73
84
  // 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
- );
85
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
86
+ required: {
87
+ [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1
88
+ },
89
+ schema: import_payload_model.PayloadSetSchema
90
+ }, {
91
+ witness: /* @__PURE__ */ __name(async (params) => {
92
+ const result = await PentairScreenlogicWitness.create(params);
93
+ return result;
94
+ }, "witness")
95
+ }), "PentairScreenlogicPlugin");
83
96
  // Annotate the CommonJS export names for ESM import in node:
84
97
  0 && (module.exports = {
85
98
  PentairScreenlogicPlugin,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js'\nexport * from './Witness.js'\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.js'\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
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["// eslint-disable-next-line import/no-default-export\nexport { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts'\nexport * from './Witness.ts'\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.ts'\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;;;;;;;;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,6BAAN,MAAMA,mCAEHC,wCAAAA;EAIR,MAAyBC,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,kCAAAA;AACnB,UAAMC,gBAAYC,yBAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,wCAAYC,SAASL,SAAAA;AACrBC,gCAAS,MAAMG,oCAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,oCAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,oCAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,oCAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,oCAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,oCAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,oCAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,oCAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,oCAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,oCAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,oCAAYsB,SAASE,qBAAqBC,mCAAWC,OAAO;UACxEC,WAAW,MAAM3B,oCAAYsB,SAASE,qBAAqBC,mCAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,oCAAYgC,gBAAe;MAC5C;;EAEJ;AACF;AAhCUzC;AACR,cAHWD,4BAGc2C,iBAA0B;KAAI,mEAAMA;EAAe5C;;AAC5E,cAJWC,4BAIc4C,uBAA8B7C;AAJlD,IAAMC,4BAAN;;;ADXA,IAAM6C,2BAA2B,iCACtCC,wDACE;EAAEC,UAAU;IAAE,CAACC,uDAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["import_pentair_payload_plugin","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","configSchemas","defaultConfigSchema","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js';
2
- export * from './Witness.js';
1
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts';
2
+ export * from './Witness.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __reflectGet = Reflect.get;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
8
+
1
9
  // src/Plugin.ts
2
10
  import { PayloadSetSchema } from "@xyo-network/payload-model";
3
11
  import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
@@ -9,9 +17,7 @@ import { AbstractWitness } from "@xyo-network/abstract-witness";
9
17
  import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
10
18
  import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
11
19
  var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
12
- var PentairScreenlogicWitness = class extends AbstractWitness {
13
- static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
14
- static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
20
+ var _PentairScreenlogicWitness = class _PentairScreenlogicWitness extends AbstractWitness {
15
21
  async observeHandler(_payloads) {
16
22
  const finder = new FindUnits();
17
23
  const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
@@ -40,21 +46,30 @@ var PentairScreenlogicWitness = class extends AbstractWitness {
40
46
  ];
41
47
  }
42
48
  };
49
+ __name(_PentairScreenlogicWitness, "PentairScreenlogicWitness");
50
+ __publicField(_PentairScreenlogicWitness, "configSchemas", [
51
+ ...__superGet(_PentairScreenlogicWitness, _PentairScreenlogicWitness, "configSchemas"),
52
+ PentairScreenlogicWitnessConfigSchema
53
+ ]);
54
+ __publicField(_PentairScreenlogicWitness, "defaultConfigSchema", PentairScreenlogicWitnessConfigSchema);
55
+ var PentairScreenlogicWitness = _PentairScreenlogicWitness;
43
56
 
44
57
  // 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
- );
58
+ var PentairScreenlogicPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
59
+ required: {
60
+ [PentairScreenlogicSchema2]: 1
61
+ },
62
+ schema: PayloadSetSchema
63
+ }, {
64
+ witness: /* @__PURE__ */ __name(async (params) => {
65
+ const result = await PentairScreenlogicWitness.create(params);
66
+ return result;
67
+ }, "witness")
68
+ }), "PentairScreenlogicPlugin");
54
69
  export {
55
70
  PentairScreenlogicPlugin,
56
71
  PentairScreenlogicWitness,
57
72
  PentairScreenlogicWitnessConfigSchema,
58
73
  PentairScreenlogicPlugin as default
59
74
  };
60
- //# sourceMappingURL=index.js.map
75
+ //# sourceMappingURL=index.mjs.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.js'\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
+ {"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.ts'\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,SAASA,wBAAwB;AACjC,SAASC,qCAAqC;AAC9C,SAASC,4BAAAA,iCAAgC;;;ACFzC,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAGhC,SAAoCC,gCAAgC;AAEpE,SAASC,WAAWC,YAAYC,mBAAmB;AAG5C,IAAMC,wCAA+E;AAQrF,IAAMC,6BAAN,MAAMA,mCAEHC,gBAAAA;EAIR,MAAyBC,eAAeC,WAAoD;AAC1F,UAAMC,SAAS,IAAIC,UAAAA;AACnB,UAAMC,YAAYC,UAAU,MAAMH,OAAOI,YAAW,GAAIC,MAAK,GAAI,MAAM,iCAAA;AACvEC,gBAAYC,SAASL,SAAAA;AACrBC,aAAS,MAAMG,YAAYE,aAAY,GAAI,MAAM,kCAAA;AAEjD,WAAO;MACL;QACEC,MAAM,MAAMH,YAAYG,KAAKC,qBAAoB;QACjDC,OAAO,MAAML,YAAYK,MAAMC,2BAA0B;QACzDC,WAAW;UACTC,cAAc,MAAMR,YAAYO,UAAUE,wBAAuB;UACjEC,QAAQ,MAAMV,YAAYO,UAAUI,+BAA8B;UAClEC,kBAAkB,MAAMZ,YAAYO,UAAUM,yBAAwB;UACtEC,aAAa,MAAMd,YAAYO,UAAUQ,oBAAmB;UAC5DC,OAAO,MAAMhB,YAAYO,UAAUU,uBAAsB;UACzDC,YAAY,MAAMlB,YAAYO,UAAUY,mBAAkB;UAC1DC,iBAAiB,MAAMpB,YAAYO,UAAUc,wBAAuB;QACtE;QACAC,UAAU;UACRC,MAAM,MAAMvB,YAAYsB,SAASE,qBAAqBC,WAAWC,OAAO;UACxEC,WAAW,MAAM3B,YAAYsB,SAASE,qBAAqBC,WAAWG,SAAS;QACjF;QACAC,QAAQC;QACRC,SAAS,MAAM/B,YAAYgC,gBAAe;MAC5C;;EAEJ;AACF;AAhCUzC;AACR,cAHWD,4BAGc2C,iBAA0B;KAAI,mEAAMA;EAAe5C;;AAC5E,cAJWC,4BAIc4C,uBAA8B7C;AAJlD,IAAMC,4BAAN;;;ADXA,IAAM6C,2BAA2B,6BACtCC,8BACE;EAAEC,UAAU;IAAE,CAACC,yBAAAA,GAA2B;EAAE;EAAGC,QAAQC;AAAiB,GACxE;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,0BAA0BC,OAAOH,MAAAA;AACtD,WAAOC;EACT,GAHS;AAIX,CAAA,GARoC;","names":["PayloadSetSchema","createPayloadSetWitnessPlugin","PentairScreenlogicSchema","assertEx","AbstractWitness","PentairScreenlogicSchema","FindUnits","SchedTypes","screenlogic","PentairScreenlogicWitnessConfigSchema","PentairScreenlogicWitness","AbstractWitness","observeHandler","_payloads","finder","FindUnits","localUnit","assertEx","searchAsync","shift","screenlogic","initUnit","connectAsync","chem","getChemicalDataAsync","chlor","getIntellichlorConfigAsync","equipment","circuitNames","getAllCircuitNamesAsync","config","getEquipmentConfigurationAsync","controllerConfig","getControllerConfigAsync","customNames","getCustomNamesAsync","state","getEquipmentStateAsync","systemTime","getSystemTimeAsync","weatherForecast","getWeatherForecastAsync","schedule","once","getScheduleDataAsync","SchedTypes","RUNONCE","recurring","RECURRING","schema","PentairScreenlogicSchema","version","getVersionAsync","configSchemas","defaultConfigSchema","PentairScreenlogicPlugin","createPayloadSetWitnessPlugin","required","PentairScreenlogicSchema","schema","PayloadSetSchema","witness","params","result","PentairScreenlogicWitness","create"]}
package/package.json CHANGED
@@ -10,22 +10,22 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/assert": "^3.6.1",
14
- "@xyo-network/abstract-witness": "^2.110.6",
15
- "@xyo-network/module-model": "^2.110.6",
16
- "@xyo-network/payload-model": "^2.110.6",
17
- "@xyo-network/payloadset-plugin": "^2.110.6",
18
- "@xyo-network/pentair-payload-plugin": "^2.99.4",
19
- "@xyo-network/witness-model": "^2.110.6",
13
+ "@xylabs/assert": "^3.6.8",
14
+ "@xyo-network/abstract-witness": "^2.111.2",
15
+ "@xyo-network/module-model": "^2.111.2",
16
+ "@xyo-network/payload-model": "^2.111.2",
17
+ "@xyo-network/payloadset-plugin": "^2.111.2",
18
+ "@xyo-network/pentair-payload-plugin": "^2.99.5",
19
+ "@xyo-network/witness-model": "^2.111.2",
20
20
  "node-screenlogic": "^2.1.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@xylabs/jest-helpers": "^3.6.1",
24
- "@xylabs/ts-scripts-yarn3": "^3.12.2",
25
- "@xylabs/tsconfig": "^3.12.2",
26
- "@xyo-network/payload-wrapper": "^2.110.6",
23
+ "@xylabs/jest-helpers": "^3.6.8",
24
+ "@xylabs/ts-scripts-yarn3": "^3.15.13",
25
+ "@xylabs/tsconfig": "^3.15.13",
26
+ "@xyo-network/payload-wrapper": "^2.111.2",
27
27
  "jest": "^29.7.0",
28
- "typescript": "^5.5.3"
28
+ "typescript": "^5.5.4"
29
29
  },
30
30
  "description": "Typescript/Javascript Plugins for XYO Platform",
31
31
  "types": "dist/node/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "import": {
40
40
  "types": "./dist/browser/index.d.mts",
41
- "default": "./dist/browser/index.js"
41
+ "default": "./dist/browser/index.mjs"
42
42
  }
43
43
  },
44
44
  "node": {
@@ -48,14 +48,14 @@
48
48
  },
49
49
  "import": {
50
50
  "types": "./dist/node/index.d.mts",
51
- "default": "./dist/node/index.js"
51
+ "default": "./dist/node/index.mjs"
52
52
  }
53
53
  }
54
54
  },
55
55
  "./package.json": "./package.json"
56
56
  },
57
57
  "main": "dist/node/index.cjs",
58
- "module": "dist/node/index.js",
58
+ "module": "dist/node/index.mjs",
59
59
  "homepage": "https://xyo.network",
60
60
  "license": "LGPL-3.0-only",
61
61
  "publishConfig": {
@@ -66,6 +66,6 @@
66
66
  "url": "https://github.com/XYOracleNetwork/plugins.git"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "2.99.4",
69
+ "version": "2.99.5",
70
70
  "type": "module"
71
71
  }
package/src/Plugin.ts CHANGED
@@ -2,7 +2,7 @@ import { PayloadSetSchema } from '@xyo-network/payload-model'
2
2
  import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
3
3
  import { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'
4
4
 
5
- import { PentairScreenlogicWitness } from './Witness.js'
5
+ import { PentairScreenlogicWitness } from './Witness.ts'
6
6
 
7
7
  export const PentairScreenlogicPlugin = () =>
8
8
  createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // eslint-disable-next-line import/no-default-export
2
- export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.js'
3
- export * from './Witness.js'
2
+ export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin.ts'
3
+ export * from './Witness.ts'