@danidoble/webserial 4.3.6 → 4.3.7
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/relay.cjs +1 -1
- package/dist/relay.js +1 -1
- package/package.json +4 -4
package/dist/relay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./kernel-D8A562gb.cjs"),i=require("./relay-DGFymXOw.cjs"),r=require("./webserial-core-N14HUamr.cjs");class o extends a.Kernel{constructor({filters:t=null,config_port:e=null,no_device:n=1}={}){if(super({filters:t,config_port:e,no_device:n}),this.__internal__.device.type="relay",this.__internal__.auto_response=!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./kernel-D8A562gb.cjs"),i=require("./relay-DGFymXOw.cjs"),r=require("./webserial-core-N14HUamr.cjs");class o extends a.Kernel{constructor({filters:t=null,config_port:e=null,no_device:n=1}={}){if(super({filters:t,config_port:e,no_device:n}),this.__internal__.device.type="relay",this.__internal__.auto_response=!1,r.h.getCustom(this.typeDevice,n))throw new Error(`Device ${this.typeDevice} ${n} already exists`);r.h.add(this)}serialMessage(t){const e={code:t,name:null,description:null,request:null,no_code:0};switch(t[1].toString()){case"dd":e.name="Connection with the serial device completed.",e.description="Your connection with the serial device was successfully completed.",e.request="connect",e.no_code=100;break;case"de":break;default:e.name="Unrecognized response",e.description="The response of application was received, but dont identify with any of current parameters",e.request="undefined",e.no_code=400;break}this.dispatch("serial:message",e)}serialRelaySumHex(t){let e=0;return t.forEach((n,s)=>{s!==3&&(e+=n)}),e}serialSetConnectionConstant(t=1){return i.e.connection(t)}async turnOn(){const t=i.e.activate();await this.appendToQueue(t,"relay:turn-on")}async turnOff(){const t=i.e.deactivate();await this.appendToQueue(t,"relay:turn-off")}async toggle({inverse:t=!1,ms:e=300}={}){if(!t){await this.turnOn(),await a.wait(e),await this.turnOff();return}await this.turnOff(),await a.wait(e),await this.turnOn()}}exports.Relay=o;
|
package/dist/relay.js
CHANGED
|
@@ -3,7 +3,7 @@ import { e as a } from "./relay-CsdB0FSa.js";
|
|
|
3
3
|
import { h as s } from "./webserial-core-BjytHor1.js";
|
|
4
4
|
class p extends o {
|
|
5
5
|
constructor({ filters: t = null, config_port: e = null, no_device: n = 1 } = {}) {
|
|
6
|
-
if (super({ filters: t, config_port: e, no_device: n }), this.__internal__.device.type = "relay", this.__internal__.auto_response = !
|
|
6
|
+
if (super({ filters: t, config_port: e, no_device: n }), this.__internal__.device.type = "relay", this.__internal__.auto_response = !1, s.getCustom(this.typeDevice, n))
|
|
7
7
|
throw new Error(`Device ${this.typeDevice} ${n} already exists`);
|
|
8
8
|
s.add(this);
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danidoble/webserial",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.7",
|
|
4
4
|
"author": "danidoble",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@danidoble/webserial-vending-commands": "^1.0.1",
|
|
13
13
|
"@eslint/eslintrc": "^3.3.1",
|
|
14
|
-
"@eslint/js": "^9.
|
|
14
|
+
"@eslint/js": "^9.31.0",
|
|
15
15
|
"autoprefixer": "^10.4.21",
|
|
16
16
|
"axios": "^1.10.0",
|
|
17
|
-
"eslint": "^9.
|
|
17
|
+
"eslint": "^9.31.0",
|
|
18
18
|
"globals": "^15.15.0",
|
|
19
19
|
"jsencrypt": "^3.3.2",
|
|
20
20
|
"postcss": "^8.5.6",
|
|
21
21
|
"prettier": "^3.6.2",
|
|
22
22
|
"uuid": "^11.1.0",
|
|
23
|
-
"vite": "^7.0.
|
|
23
|
+
"vite": "^7.0.5",
|
|
24
24
|
"webserial-core": "1.0.11"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|