@xyo-network/pentair-plugin 2.75.14 → 2.75.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/Plugin.d.cts +2 -2
- package/dist/browser/Plugin.d.mts +2 -2
- package/dist/browser/Plugin.d.ts +2 -2
- package/dist/browser/Witness.d.cts +3 -2
- package/dist/browser/Witness.d.cts.map +1 -1
- package/dist/browser/Witness.d.mts +3 -2
- package/dist/browser/Witness.d.mts.map +1 -1
- package/dist/browser/Witness.d.ts +3 -2
- package/dist/browser/Witness.d.ts.map +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +803 -406
- package/dist/node/Plugin.d.cts +2 -2
- package/dist/node/Plugin.d.mts +2 -2
- package/dist/node/Plugin.d.ts +2 -2
- package/dist/node/Witness.d.cts +3 -2
- package/dist/node/Witness.d.cts.map +1 -1
- package/dist/node/Witness.d.mts +3 -2
- package/dist/node/Witness.d.mts.map +1 -1
- package/dist/node/Witness.d.ts +3 -2
- package/dist/node/Witness.d.ts.map +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +13 -12
- package/src/Witness.ts +3 -2
- package/dist/browser/Plugin.cjs +0 -77
- package/dist/browser/Plugin.cjs.map +0 -1
- package/dist/browser/Plugin.js +0 -56
- package/dist/browser/Plugin.js.map +0 -1
- package/dist/browser/Witness.cjs +0 -62
- package/dist/browser/Witness.cjs.map +0 -1
- package/dist/browser/Witness.js +0 -41
- package/dist/browser/Witness.js.map +0 -1
- package/dist/node/Plugin.js +0 -81
- package/dist/node/Plugin.js.map +0 -1
- package/dist/node/Plugin.mjs +0 -56
- package/dist/node/Plugin.mjs.map +0 -1
- package/dist/node/Witness.js +0 -67
- package/dist/node/Witness.js.map +0 -1
- package/dist/node/Witness.mjs +0 -41
- package/dist/node/Witness.mjs.map +0 -1
package/dist/node/Plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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 configSchemas = [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,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AAGzB,oCAAoE;AACpE,qBAA8D;AAC9D,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,+BAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,kCAAkC;AAE7E,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;;;AD3CO,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"]}
|
package/dist/node/Plugin.mjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// src/Plugin.ts
|
|
2
|
-
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
3
|
-
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
4
|
-
import { PentairScreenlogicSchema as PentairScreenlogicSchema2 } from "@xyo-network/pentair-payload-plugin";
|
|
5
|
-
|
|
6
|
-
// src/Witness.ts
|
|
7
|
-
import { assertEx } from "@xylabs/assert";
|
|
8
|
-
import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
|
|
9
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
10
|
-
import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
|
|
11
|
-
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
12
|
-
var PentairScreenlogicWitness = class extends AbstractWitness {
|
|
13
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
14
|
-
async observeHandler(_payloads) {
|
|
15
|
-
const finder = new FindUnits();
|
|
16
|
-
const localUnit = assertEx((await finder.searchAsync()).shift(), "No local screenlogic unit found");
|
|
17
|
-
screenlogic.initUnit(localUnit);
|
|
18
|
-
assertEx(await screenlogic.connectAsync(), "Failed to connect to ScreenLogic");
|
|
19
|
-
return [
|
|
20
|
-
{
|
|
21
|
-
chem: await screenlogic.chem.getChemicalDataAsync(),
|
|
22
|
-
chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
23
|
-
equipment: {
|
|
24
|
-
circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
25
|
-
config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
26
|
-
controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
|
|
27
|
-
customNames: await screenlogic.equipment.getCustomNamesAsync(),
|
|
28
|
-
state: await screenlogic.equipment.getEquipmentStateAsync(),
|
|
29
|
-
systemTime: await screenlogic.equipment.getSystemTimeAsync(),
|
|
30
|
-
weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
|
|
31
|
-
},
|
|
32
|
-
schedule: {
|
|
33
|
-
once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
|
|
34
|
-
recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
|
|
35
|
-
},
|
|
36
|
-
schema: PentairScreenlogicSchema,
|
|
37
|
-
version: await screenlogic.getVersionAsync()
|
|
38
|
-
}
|
|
39
|
-
];
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// src/Plugin.ts
|
|
44
|
-
var PentairScreenlogicPlugin = () => createPayloadSetWitnessPlugin(
|
|
45
|
-
{ required: { [PentairScreenlogicSchema2]: 1 }, schema: PayloadSetSchema },
|
|
46
|
-
{
|
|
47
|
-
witness: async (params) => {
|
|
48
|
-
const result = await PentairScreenlogicWitness.create(params);
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
export {
|
|
54
|
-
PentairScreenlogicPlugin
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=Plugin.mjs.map
|
package/dist/node/Plugin.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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 configSchemas = [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;AAGzB,SAAoC,gCAAgC;AACpE,SAAS,uBAAqD;AAC9D,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,kCAAkC;AAE7E,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;;;AD3CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
|
package/dist/node/Witness.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/Witness.ts
|
|
21
|
-
var Witness_exports = {};
|
|
22
|
-
__export(Witness_exports, {
|
|
23
|
-
PentairScreenlogicWitness: () => PentairScreenlogicWitness,
|
|
24
|
-
PentairScreenlogicWitnessConfigSchema: () => PentairScreenlogicWitnessConfigSchema
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(Witness_exports);
|
|
27
|
-
var import_assert = require("@xylabs/assert");
|
|
28
|
-
var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
|
|
29
|
-
var import_witness = require("@xyo-network/witness");
|
|
30
|
-
var import_node_screenlogic = require("node-screenlogic");
|
|
31
|
-
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
32
|
-
var PentairScreenlogicWitness = class extends import_witness.AbstractWitness {
|
|
33
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
34
|
-
async observeHandler(_payloads) {
|
|
35
|
-
const finder = new import_node_screenlogic.FindUnits();
|
|
36
|
-
const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), "No local screenlogic unit found");
|
|
37
|
-
import_node_screenlogic.screenlogic.initUnit(localUnit);
|
|
38
|
-
(0, import_assert.assertEx)(await import_node_screenlogic.screenlogic.connectAsync(), "Failed to connect to ScreenLogic");
|
|
39
|
-
return [
|
|
40
|
-
{
|
|
41
|
-
chem: await import_node_screenlogic.screenlogic.chem.getChemicalDataAsync(),
|
|
42
|
-
chlor: await import_node_screenlogic.screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
43
|
-
equipment: {
|
|
44
|
-
circuitNames: await import_node_screenlogic.screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
45
|
-
config: await import_node_screenlogic.screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
46
|
-
controllerConfig: await import_node_screenlogic.screenlogic.equipment.getControllerConfigAsync(),
|
|
47
|
-
customNames: await import_node_screenlogic.screenlogic.equipment.getCustomNamesAsync(),
|
|
48
|
-
state: await import_node_screenlogic.screenlogic.equipment.getEquipmentStateAsync(),
|
|
49
|
-
systemTime: await import_node_screenlogic.screenlogic.equipment.getSystemTimeAsync(),
|
|
50
|
-
weatherForecast: await import_node_screenlogic.screenlogic.equipment.getWeatherForecastAsync()
|
|
51
|
-
},
|
|
52
|
-
schedule: {
|
|
53
|
-
once: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RUNONCE),
|
|
54
|
-
recurring: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RECURRING)
|
|
55
|
-
},
|
|
56
|
-
schema: import_pentair_payload_plugin.PentairScreenlogicSchema,
|
|
57
|
-
version: await import_node_screenlogic.screenlogic.getVersionAsync()
|
|
58
|
-
}
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
PentairScreenlogicWitness,
|
|
65
|
-
PentairScreenlogicWitnessConfigSchema
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=Witness.js.map
|
package/dist/node/Witness.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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 configSchemas = [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,oBAAyB;AAGzB,oCAAoE;AACpE,qBAA8D;AAC9D,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,+BAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,kCAAkC;AAE7E,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;","names":[]}
|
package/dist/node/Witness.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// src/Witness.ts
|
|
2
|
-
import { assertEx } from "@xylabs/assert";
|
|
3
|
-
import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
|
|
4
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
5
|
-
import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
|
|
6
|
-
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
7
|
-
var PentairScreenlogicWitness = class extends AbstractWitness {
|
|
8
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
9
|
-
async observeHandler(_payloads) {
|
|
10
|
-
const finder = new FindUnits();
|
|
11
|
-
const localUnit = assertEx((await finder.searchAsync()).shift(), "No local screenlogic unit found");
|
|
12
|
-
screenlogic.initUnit(localUnit);
|
|
13
|
-
assertEx(await screenlogic.connectAsync(), "Failed to connect to ScreenLogic");
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
chem: await screenlogic.chem.getChemicalDataAsync(),
|
|
17
|
-
chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
18
|
-
equipment: {
|
|
19
|
-
circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
20
|
-
config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
21
|
-
controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
|
|
22
|
-
customNames: await screenlogic.equipment.getCustomNamesAsync(),
|
|
23
|
-
state: await screenlogic.equipment.getEquipmentStateAsync(),
|
|
24
|
-
systemTime: await screenlogic.equipment.getSystemTimeAsync(),
|
|
25
|
-
weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
|
|
26
|
-
},
|
|
27
|
-
schedule: {
|
|
28
|
-
once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
|
|
29
|
-
recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
|
|
30
|
-
},
|
|
31
|
-
schema: PentairScreenlogicSchema,
|
|
32
|
-
version: await screenlogic.getVersionAsync()
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
PentairScreenlogicWitness,
|
|
39
|
-
PentairScreenlogicWitnessConfigSchema
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=Witness.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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 configSchemas = [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,gBAAgB;AAGzB,SAAoC,gCAAgC;AACpE,SAAS,uBAAqD;AAC9D,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,kCAAkC;AAE7E,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;","names":[]}
|