@ikalogic/at1000 0.1.34 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/at1000-CQR8byxP.cjs +3 -0
- package/build/{at1000-DfziElfg.cjs.map → at1000-CQR8byxP.cjs.map} +1 -1
- package/build/{at1000-CPP2QQVp.d.mts → at1000-CrXOo07c.d.cts} +7 -7
- package/build/{at1000-D0rR4HmP.d.cts.map → at1000-CrXOo07c.d.cts.map} +1 -1
- package/build/{at1000-CfhKJdSC.mjs → at1000-Dg_S21jO.mjs} +2 -2
- package/build/{at1000-CfhKJdSC.mjs.map → at1000-Dg_S21jO.mjs.map} +1 -1
- package/build/{at1000-D0rR4HmP.d.cts → at1000-RNA4yNKP.d.mts} +7 -7
- package/build/{at1000-CPP2QQVp.d.mts.map → at1000-RNA4yNKP.d.mts.map} +1 -1
- package/build/browser.cjs +1 -1
- package/build/browser.cjs.map +1 -1
- package/build/browser.d.cts +1 -1
- package/build/browser.d.cts.map +1 -1
- package/build/browser.d.mts +1 -1
- package/build/browser.d.mts.map +1 -1
- package/build/browser.mjs +1 -1
- package/build/browser.mjs.map +1 -1
- package/build/{chunk-Bmb41Sf3.cjs → chunk-CMqjfN_6.cjs} +1 -1
- package/build/{com-BjLONerN.d.cts → com-B2qxT8se.d.cts} +62 -57
- package/build/com-B2qxT8se.d.cts.map +1 -0
- package/build/{com-DwQrU-7L.d.mts → com-B2qxT8se.d.mts} +62 -57
- package/build/com-B2qxT8se.d.mts.map +1 -0
- package/build/com.cjs +1 -1
- package/build/com.cjs.map +1 -1
- package/build/com.d.cts +1 -1
- package/build/com.d.mts +1 -1
- package/build/com.mjs +1 -1
- package/build/com.mjs.map +1 -1
- package/build/common-BSabSaAU.cjs +2 -0
- package/build/{common-PXzrB8CC.cjs.map → common-BSabSaAU.cjs.map} +1 -1
- package/build/{common-Cc9ZDx5b.d.mts → common-BY1vXz1l.d.cts} +1 -1
- package/build/{common-Cc9ZDx5b.d.mts.map → common-BY1vXz1l.d.cts.map} +1 -1
- package/build/{common-DWQyDOs5.d.cts → common-BY1vXz1l.d.mts} +1 -1
- package/build/{common-DWQyDOs5.d.cts.map → common-BY1vXz1l.d.mts.map} +1 -1
- package/build/{common-DzTRbz1N.mjs → common-Ce3FeF-Q.mjs} +1 -1
- package/build/{common-DzTRbz1N.mjs.map → common-Ce3FeF-Q.mjs.map} +1 -1
- package/build/{gpio-BvBm3GF2.d.cts → gpio-BDMTNT6V.d.mts} +8 -8
- package/build/gpio-BDMTNT6V.d.mts.map +1 -0
- package/build/{gpio-COBjpH3q.d.mts → gpio-D1QpFMeE.d.cts} +8 -8
- package/build/gpio-D1QpFMeE.d.cts.map +1 -0
- package/build/gpio.cjs +1 -1
- package/build/gpio.cjs.map +1 -1
- package/build/gpio.d.cts +3 -3
- package/build/gpio.d.mts +3 -3
- package/build/gpio.mjs +1 -1
- package/build/gpio.mjs.map +1 -1
- package/build/{hmi-BAaIE12L.d.mts → hmi-Cw9EEy_5.d.cts} +2 -2
- package/build/hmi-Cw9EEy_5.d.cts.map +1 -0
- package/build/{hmi-C5ga9KYh.d.cts → hmi-Cw9EEy_5.d.mts} +2 -2
- package/build/hmi-Cw9EEy_5.d.mts.map +1 -0
- package/build/hmi.cjs +1 -1
- package/build/hmi.cjs.map +1 -1
- package/build/hmi.d.cts +1 -1
- package/build/hmi.d.mts +1 -1
- package/build/hmi.mjs +1 -1
- package/build/hmi.mjs.map +1 -1
- package/build/{management-B6XF1gCN.d.mts → management-C0iQha23.d.cts} +6 -3
- package/build/management-C0iQha23.d.cts.map +1 -0
- package/build/{management-DUeEuVUY.d.cts → management-C0iQha23.d.mts} +6 -3
- package/build/management-C0iQha23.d.mts.map +1 -0
- package/build/management.cjs +1 -1
- package/build/management.cjs.map +1 -1
- package/build/management.d.cts +1 -1
- package/build/management.d.mts +1 -1
- package/build/management.mjs +1 -1
- package/build/management.mjs.map +1 -1
- package/build/node.cjs +1 -1
- package/build/node.cjs.map +1 -1
- package/build/node.d.cts +1 -1
- package/build/node.d.mts +1 -1
- package/build/node.mjs +1 -1
- package/build/node.mjs.map +1 -1
- package/build/{power-BOYFnxXm.d.cts → power-BQGaOZjf.d.mts} +9 -9
- package/build/power-BQGaOZjf.d.mts.map +1 -0
- package/build/{power-BT1cG5Kn.d.mts → power-CR0Hkay6.d.cts} +9 -9
- package/build/power-CR0Hkay6.d.cts.map +1 -0
- package/build/power.cjs +1 -1
- package/build/power.cjs.map +1 -1
- package/build/power.d.cts +3 -3
- package/build/power.d.mts +3 -3
- package/build/power.mjs +1 -1
- package/build/power.mjs.map +1 -1
- package/build/{relays-C-vNqDM-.d.cts → relays-BCn6rQN1.d.cts} +1 -1
- package/build/relays-BCn6rQN1.d.cts.map +1 -0
- package/build/{relays-CbyqFtJP.d.mts → relays-BCn6rQN1.d.mts} +1 -1
- package/build/relays-BCn6rQN1.d.mts.map +1 -0
- package/build/relays.cjs +1 -1
- package/build/relays.cjs.map +1 -1
- package/build/relays.d.cts +1 -1
- package/build/relays.d.mts +1 -1
- package/build/relays.mjs +1 -1
- package/build/relays.mjs.map +1 -1
- package/package.json +10 -10
- package/build/at1000-DfziElfg.cjs +0 -3
- package/build/com-BjLONerN.d.cts.map +0 -1
- package/build/com-DwQrU-7L.d.mts.map +0 -1
- package/build/common-PXzrB8CC.cjs +0 -2
- package/build/gpio-BvBm3GF2.d.cts.map +0 -1
- package/build/gpio-COBjpH3q.d.mts.map +0 -1
- package/build/hmi-BAaIE12L.d.mts.map +0 -1
- package/build/hmi-C5ga9KYh.d.cts.map +0 -1
- package/build/management-B6XF1gCN.d.mts.map +0 -1
- package/build/management-DUeEuVUY.d.cts.map +0 -1
- package/build/power-BOYFnxXm.d.cts.map +0 -1
- package/build/power-BT1cG5Kn.d.mts.map +0 -1
- package/build/relays-C-vNqDM-.d.cts.map +0 -1
- package/build/relays-CbyqFtJP.d.mts.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require("./com.cjs"),t=require("./gpio.cjs"),n=require("./hmi.cjs"),r=require("./management.cjs"),i=require("./power.cjs"),a=require("./relays.cjs");let o=require("up-fetch");var s=`0.2.1`;function c(e){return e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}var l=class s{host;info;fetch;com;hmi;gpio;management;power;relays;constructor(s,l){this.host=s,this.info=l,this.fetch=(0,o.up)(fetch,()=>({baseUrl:`http://${c(this.host)}/v0`,timeout:1e3,parseRejected:async(e,t)=>{let n,r=e.headers.get(`content-type`);try{n=r?.includes(`application/json`)?await e.json():await e.text()}catch{n=`Failed to parse response body`}if(typeof n==`object`&&[`code`,`message`,`suggestion`,`path`].every(e=>e in n)){let e=n.suggestion.replace(/\n/g,`
|
|
2
|
+
`);throw Error(`${n.message} (${n.code})\n Suggestion: ${e}\n Path: ${n.path}`)}throw Error(`API request to ${t.method} ${e.url} failed with status ${e.status}: ${typeof n==`string`?n:JSON.stringify(n)}`)}})),this.com=new e.ComApi(this.fetch),this.hmi=new n.HmiApi(this.fetch),this.gpio=new t.GpioApi(this.fetch,this.info),this.management=new r.ManagementApi(this.fetch),this.power=new i.PowerApi(this.fetch,this.info),this.relays=new a.RelaysApi(this.fetch)}async reset(){await this.com.reset(),await this.hmi.reset(),await this.gpio.reset(),await this.power.reset(),await this.relays.reset()}static create=async e=>new s(e,await new r.ManagementApi((0,o.up)(fetch,()=>({baseUrl:`http://${c(e)}/v0`,timeout:1e3}))).info())};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
3
|
+
//# sourceMappingURL=at1000-CQR8byxP.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at1000-
|
|
1
|
+
{"version":3,"file":"at1000-CQR8byxP.cjs","names":["ComApi","HmiApi","GpioApi","ManagementApi","PowerApi","RelaysApi"],"sources":["../package.json","../src/at1000.ts"],"sourcesContent":["","import { up, type UpFetch } from 'up-fetch';\n\nimport { ComApi } from './api/com';\nimport { GpioApi } from './api/gpio';\nimport { HmiApi } from './api/hmi';\nimport { type Information, ManagementApi } from './api/management';\nimport { PowerApi } from './api/power';\nimport { RelaysApi } from './api/relays';\n\n/** Wraps IPv6 literal addresses in brackets for use in URLs (RFC 3986). */\nfunction format_host_for_url(host: string): string {\n if (host.includes(':') && !host.startsWith('[')) {\n return `[${host}]`;\n }\n return host;\n}\n\n/** @hideconstructor */\nexport class AT1000Base {\n /**\n * IP address or hostname of the AT1000 device\n */\n public readonly host: string;\n /**\n * Device information\n */\n public readonly info: Information;\n\n private fetch: UpFetch;\n /**\n * COM API\n */\n public readonly com: ComApi;\n /**\n * HMI API\n */\n public readonly hmi: HmiApi;\n /**\n * GPIO API\n */\n public readonly gpio: GpioApi;\n /**\n * Management API\n */\n public readonly management: ManagementApi;\n /**\n * Power management API\n */\n public readonly power: PowerApi;\n /**\n * Relays API\n */\n public readonly relays: RelaysApi;\n\n constructor(host: string, info: Information) {\n this.host = host;\n this.info = info;\n\n this.fetch = up(\n fetch,\n () => ({\n baseUrl: `http://${format_host_for_url(this.host)}/v0`,\n timeout: 1000,\n parseRejected: async (response, request) => {\n let errorData: any;\n const contentType = response.headers.get('content-type');\n try {\n if (contentType?.includes('application/json')) {\n errorData = await response.json();\n } else {\n errorData = await response.text();\n }\n } catch {\n errorData = 'Failed to parse response body';\n }\n\n if (\n typeof errorData === 'object'\n && ['code', 'message', 'suggestion', 'path'].every((key) => key in errorData)\n ) {\n const formattedSuggestion = errorData.suggestion.replace(/\\n/g, '\\n ');\n throw new Error(\n `${errorData.message} (${errorData.code})\\n Suggestion: ${formattedSuggestion}\\n Path: ${errorData.path}`,\n );\n }\n\n throw new Error(\n `API request to ${request.method} ${response.url} failed with status ${response.status}: ${\n typeof errorData === 'string' ? errorData : JSON.stringify(errorData)\n }`,\n );\n },\n }),\n );\n\n this.com = new ComApi(this.fetch);\n this.hmi = new HmiApi(this.fetch);\n this.gpio = new GpioApi(this.fetch, this.info);\n this.management = new ManagementApi(this.fetch);\n this.power = new PowerApi(this.fetch, this.info);\n this.relays = new RelaysApi(this.fetch);\n }\n\n async reset() {\n await this.com.reset();\n await this.hmi.reset();\n await this.gpio.reset();\n await this.power.reset();\n await this.relays.reset();\n }\n\n public static create = async (host: string): Promise<AT1000Base> => {\n // Create a temporary client to fetch device info\n const management = new ManagementApi(\n up(fetch, () => ({ baseUrl: `http://${format_host_for_url(host)}/v0`, timeout: 1000 })),\n );\n const info = await management.info();\n\n return new AT1000Base(host, info);\n };\n}\n"],"mappings":"qMCUA,SAAS,EAAoB,EAAsB,CAIjD,OAHI,EAAK,SAAS,GAAG,GAAK,CAAC,EAAK,WAAW,GAAG,EACrC,IAAI,EAAK,GAEX,CACT,CAGA,IAAa,EAAb,MAAa,CAAW,CAItB,KAIA,KAEA,MAIA,IAIA,IAIA,KAIA,WAIA,MAIA,OAEA,YAAY,EAAc,EAAmB,CAC3C,KAAK,KAAO,EACZ,KAAK,KAAO,EAEZ,KAAK,OAAA,EAAA,EAAA,GAAA,CACH,WACO,CACL,QAAS,UAAU,EAAoB,KAAK,IAAI,EAAE,KAClD,QAAS,IACT,cAAe,MAAO,EAAU,IAAY,CAC1C,IAAI,EACE,EAAc,EAAS,QAAQ,IAAI,cAAc,EACvD,GAAI,CACF,AAGE,EAHE,GAAa,SAAS,kBAAkB,EAC9B,MAAM,EAAS,KAAK,EAEpB,MAAM,EAAS,KAAK,CAEpC,MAAQ,CACN,EAAY,+BACd,CAEA,GACE,OAAO,GAAc,UAClB,CAAC,OAAQ,UAAW,aAAc,MAAM,CAAC,CAAC,MAAO,GAAQ,KAAO,CAAS,EAC5E,CACA,IAAM,EAAsB,EAAU,WAAW,QAAQ,MAAO;iBAAoB,EACpF,MAAU,MACR,GAAG,EAAU,QAAQ,IAAI,EAAU,KAAK,qBAAqB,EAAoB,cAAc,EAAU,MAC3G,CACF,CAEA,MAAU,MACR,kBAAkB,EAAQ,OAAO,GAAG,EAAS,IAAI,sBAAsB,EAAS,OAAO,IACrF,OAAO,GAAc,SAAW,EAAY,KAAK,UAAU,CAAS,GAExE,CACF,CACF,EACF,EAEA,KAAK,IAAM,IAAIA,EAAAA,OAAO,KAAK,KAAK,EAChC,KAAK,IAAM,IAAIC,EAAAA,OAAO,KAAK,KAAK,EAChC,KAAK,KAAO,IAAIC,EAAAA,QAAQ,KAAK,MAAO,KAAK,IAAI,EAC7C,KAAK,WAAa,IAAIC,EAAAA,cAAc,KAAK,KAAK,EAC9C,KAAK,MAAQ,IAAIC,EAAAA,SAAS,KAAK,MAAO,KAAK,IAAI,EAC/C,KAAK,OAAS,IAAIC,EAAAA,UAAU,KAAK,KAAK,CACxC,CAEA,MAAM,OAAQ,CACZ,MAAM,KAAK,IAAI,MAAM,EACrB,MAAM,KAAK,IAAI,MAAM,EACrB,MAAM,KAAK,KAAK,MAAM,EACtB,MAAM,KAAK,MAAM,MAAM,EACvB,MAAM,KAAK,OAAO,MAAM,CAC1B,CAEA,OAAc,OAAS,KAAO,IAOrB,IAAI,EAAW,EAAM,MAFT,IAHIF,EAAAA,eAAAA,EAAAA,EAAAA,GAAAA,CAClB,WAAc,CAAE,QAAS,UAAU,EAAoB,CAAI,EAAE,KAAM,QAAS,GAAK,EAAE,CAE5D,CAAC,CAAC,KAAK,CAEH,CAEpC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as ComApi } from "./com-
|
|
2
|
-
import { d as ManagementApi, l as Information } from "./management-
|
|
3
|
-
import { s as GpioApi } from "./gpio-
|
|
4
|
-
import { r as HmiApi } from "./hmi-
|
|
5
|
-
import { i as PowerApi } from "./power-
|
|
6
|
-
import { n as RelaysApi } from "./relays-
|
|
1
|
+
import { s as ComApi } from "./com-B2qxT8se.cjs";
|
|
2
|
+
import { d as ManagementApi, l as Information } from "./management-C0iQha23.cjs";
|
|
3
|
+
import { s as GpioApi } from "./gpio-D1QpFMeE.cjs";
|
|
4
|
+
import { r as HmiApi } from "./hmi-Cw9EEy_5.cjs";
|
|
5
|
+
import { i as PowerApi } from "./power-CR0Hkay6.cjs";
|
|
6
|
+
import { n as RelaysApi } from "./relays-BCn6rQN1.cjs";
|
|
7
7
|
|
|
8
8
|
//#region src/at1000.d.ts
|
|
9
9
|
/** @hideconstructor */
|
|
@@ -47,4 +47,4 @@ declare class AT1000Base {
|
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
49
|
export { AT1000Base as t };
|
|
50
|
-
//# sourceMappingURL=at1000-
|
|
50
|
+
//# sourceMappingURL=at1000-CrXOo07c.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at1000-
|
|
1
|
+
{"version":3,"file":"at1000-CrXOo07c.d.cts","names":[],"sources":["../src/at1000.ts"],"mappings":";;;;;;;;;cAkBa,UAAA;EAAA;;;EAAA,SAIK,IAAA;EAUK;;;EAAA,SANL,IAAA,EAAM,WAAA;EAAA,QAEd,KAAA;EAwBgB;;;EAAA,SApBR,GAAA,EAAK,MAAA;EA+EwB;;;EAAA,SA3E7B,GAAA,EAAK,MAAA;EAVL;;;EAAA,SAcA,IAAA,EAAM,OAAA;EARD;;;EAAA,SAYL,UAAA,EAAY,aAAA;EAJN;;;EAAA,SAQN,KAAA,EAAO,QAAA;EAAA;;;EAAA,SAIP,MAAA,EAAQ,SAAA;cAEZ,IAAA,UAAc,IAAA,EAAM,WAAA;EAiD1B,KAAA,IAAK,OAAA;EAAA,OAQG,MAAA,GAAgB,IAAA,aAAe,OAAA,CAAQ,UAAA;AAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ComApi as e}from"./com.mjs";import{GpioApi as t}from"./gpio.mjs";import{HmiApi as n}from"./hmi.mjs";import{ManagementApi as r}from"./management.mjs";import{PowerApi as i}from"./power.mjs";import{RelaysApi as a}from"./relays.mjs";import{up as o}from"up-fetch";var s=`0.1
|
|
1
|
+
import{ComApi as e}from"./com.mjs";import{GpioApi as t}from"./gpio.mjs";import{HmiApi as n}from"./hmi.mjs";import{ManagementApi as r}from"./management.mjs";import{PowerApi as i}from"./power.mjs";import{RelaysApi as a}from"./relays.mjs";import{up as o}from"up-fetch";var s=`0.2.1`;function c(e){return e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}var l=class s{host;info;fetch;com;hmi;gpio;management;power;relays;constructor(s,l){this.host=s,this.info=l,this.fetch=o(fetch,()=>({baseUrl:`http://${c(this.host)}/v0`,timeout:1e3,parseRejected:async(e,t)=>{let n,r=e.headers.get(`content-type`);try{n=r?.includes(`application/json`)?await e.json():await e.text()}catch{n=`Failed to parse response body`}if(typeof n==`object`&&[`code`,`message`,`suggestion`,`path`].every(e=>e in n)){let e=n.suggestion.replace(/\n/g,`
|
|
2
2
|
`);throw Error(`${n.message} (${n.code})\n Suggestion: ${e}\n Path: ${n.path}`)}throw Error(`API request to ${t.method} ${e.url} failed with status ${e.status}: ${typeof n==`string`?n:JSON.stringify(n)}`)}})),this.com=new e(this.fetch),this.hmi=new n(this.fetch),this.gpio=new t(this.fetch,this.info),this.management=new r(this.fetch),this.power=new i(this.fetch,this.info),this.relays=new a(this.fetch)}async reset(){await this.com.reset(),await this.hmi.reset(),await this.gpio.reset(),await this.power.reset(),await this.relays.reset()}static create=async e=>new s(e,await new r(o(fetch,()=>({baseUrl:`http://${c(e)}/v0`,timeout:1e3}))).info())};export{s as n,l as t};
|
|
3
|
-
//# sourceMappingURL=at1000-
|
|
3
|
+
//# sourceMappingURL=at1000-Dg_S21jO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at1000-
|
|
1
|
+
{"version":3,"file":"at1000-Dg_S21jO.mjs","names":[],"sources":["../package.json","../src/at1000.ts"],"sourcesContent":["","import { up, type UpFetch } from 'up-fetch';\n\nimport { ComApi } from './api/com';\nimport { GpioApi } from './api/gpio';\nimport { HmiApi } from './api/hmi';\nimport { type Information, ManagementApi } from './api/management';\nimport { PowerApi } from './api/power';\nimport { RelaysApi } from './api/relays';\n\n/** Wraps IPv6 literal addresses in brackets for use in URLs (RFC 3986). */\nfunction format_host_for_url(host: string): string {\n if (host.includes(':') && !host.startsWith('[')) {\n return `[${host}]`;\n }\n return host;\n}\n\n/** @hideconstructor */\nexport class AT1000Base {\n /**\n * IP address or hostname of the AT1000 device\n */\n public readonly host: string;\n /**\n * Device information\n */\n public readonly info: Information;\n\n private fetch: UpFetch;\n /**\n * COM API\n */\n public readonly com: ComApi;\n /**\n * HMI API\n */\n public readonly hmi: HmiApi;\n /**\n * GPIO API\n */\n public readonly gpio: GpioApi;\n /**\n * Management API\n */\n public readonly management: ManagementApi;\n /**\n * Power management API\n */\n public readonly power: PowerApi;\n /**\n * Relays API\n */\n public readonly relays: RelaysApi;\n\n constructor(host: string, info: Information) {\n this.host = host;\n this.info = info;\n\n this.fetch = up(\n fetch,\n () => ({\n baseUrl: `http://${format_host_for_url(this.host)}/v0`,\n timeout: 1000,\n parseRejected: async (response, request) => {\n let errorData: any;\n const contentType = response.headers.get('content-type');\n try {\n if (contentType?.includes('application/json')) {\n errorData = await response.json();\n } else {\n errorData = await response.text();\n }\n } catch {\n errorData = 'Failed to parse response body';\n }\n\n if (\n typeof errorData === 'object'\n && ['code', 'message', 'suggestion', 'path'].every((key) => key in errorData)\n ) {\n const formattedSuggestion = errorData.suggestion.replace(/\\n/g, '\\n ');\n throw new Error(\n `${errorData.message} (${errorData.code})\\n Suggestion: ${formattedSuggestion}\\n Path: ${errorData.path}`,\n );\n }\n\n throw new Error(\n `API request to ${request.method} ${response.url} failed with status ${response.status}: ${\n typeof errorData === 'string' ? errorData : JSON.stringify(errorData)\n }`,\n );\n },\n }),\n );\n\n this.com = new ComApi(this.fetch);\n this.hmi = new HmiApi(this.fetch);\n this.gpio = new GpioApi(this.fetch, this.info);\n this.management = new ManagementApi(this.fetch);\n this.power = new PowerApi(this.fetch, this.info);\n this.relays = new RelaysApi(this.fetch);\n }\n\n async reset() {\n await this.com.reset();\n await this.hmi.reset();\n await this.gpio.reset();\n await this.power.reset();\n await this.relays.reset();\n }\n\n public static create = async (host: string): Promise<AT1000Base> => {\n // Create a temporary client to fetch device info\n const management = new ManagementApi(\n up(fetch, () => ({ baseUrl: `http://${format_host_for_url(host)}/v0`, timeout: 1000 })),\n );\n const info = await management.info();\n\n return new AT1000Base(host, info);\n };\n}\n"],"mappings":"wRCUA,SAAS,EAAoB,EAAsB,CAIjD,OAHI,EAAK,SAAS,GAAG,GAAK,CAAC,EAAK,WAAW,GAAG,EACrC,IAAI,EAAK,GAEX,CACT,CAGA,IAAa,EAAb,MAAa,CAAW,CAItB,KAIA,KAEA,MAIA,IAIA,IAIA,KAIA,WAIA,MAIA,OAEA,YAAY,EAAc,EAAmB,CAC3C,KAAK,KAAO,EACZ,KAAK,KAAO,EAEZ,KAAK,MAAQ,EACX,WACO,CACL,QAAS,UAAU,EAAoB,KAAK,IAAI,EAAE,KAClD,QAAS,IACT,cAAe,MAAO,EAAU,IAAY,CAC1C,IAAI,EACE,EAAc,EAAS,QAAQ,IAAI,cAAc,EACvD,GAAI,CACF,AAGE,EAHE,GAAa,SAAS,kBAAkB,EAC9B,MAAM,EAAS,KAAK,EAEpB,MAAM,EAAS,KAAK,CAEpC,MAAQ,CACN,EAAY,+BACd,CAEA,GACE,OAAO,GAAc,UAClB,CAAC,OAAQ,UAAW,aAAc,MAAM,CAAC,CAAC,MAAO,GAAQ,KAAO,CAAS,EAC5E,CACA,IAAM,EAAsB,EAAU,WAAW,QAAQ,MAAO;iBAAoB,EACpF,MAAU,MACR,GAAG,EAAU,QAAQ,IAAI,EAAU,KAAK,qBAAqB,EAAoB,cAAc,EAAU,MAC3G,CACF,CAEA,MAAU,MACR,kBAAkB,EAAQ,OAAO,GAAG,EAAS,IAAI,sBAAsB,EAAS,OAAO,IACrF,OAAO,GAAc,SAAW,EAAY,KAAK,UAAU,CAAS,GAExE,CACF,CACF,EACF,EAEA,KAAK,IAAM,IAAI,EAAO,KAAK,KAAK,EAChC,KAAK,IAAM,IAAI,EAAO,KAAK,KAAK,EAChC,KAAK,KAAO,IAAI,EAAQ,KAAK,MAAO,KAAK,IAAI,EAC7C,KAAK,WAAa,IAAI,EAAc,KAAK,KAAK,EAC9C,KAAK,MAAQ,IAAI,EAAS,KAAK,MAAO,KAAK,IAAI,EAC/C,KAAK,OAAS,IAAI,EAAU,KAAK,KAAK,CACxC,CAEA,MAAM,OAAQ,CACZ,MAAM,KAAK,IAAI,MAAM,EACrB,MAAM,KAAK,IAAI,MAAM,EACrB,MAAM,KAAK,KAAK,MAAM,EACtB,MAAM,KAAK,MAAM,MAAM,EACvB,MAAM,KAAK,OAAO,MAAM,CAC1B,CAEA,OAAc,OAAS,KAAO,IAOrB,IAAI,EAAW,EAAM,MAFT,IAHI,EACrB,EAAG,WAAc,CAAE,QAAS,UAAU,EAAoB,CAAI,EAAE,KAAM,QAAS,GAAK,EAAE,CAE5D,CAAC,CAAC,KAAK,CAEH,CAEpC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as ComApi } from "./com-
|
|
2
|
-
import { d as ManagementApi, l as Information } from "./management-
|
|
3
|
-
import { s as GpioApi } from "./gpio-
|
|
4
|
-
import { r as HmiApi } from "./hmi-
|
|
5
|
-
import { i as PowerApi } from "./power-
|
|
6
|
-
import { n as RelaysApi } from "./relays-
|
|
1
|
+
import { s as ComApi } from "./com-B2qxT8se.mjs";
|
|
2
|
+
import { d as ManagementApi, l as Information } from "./management-C0iQha23.mjs";
|
|
3
|
+
import { s as GpioApi } from "./gpio-BDMTNT6V.mjs";
|
|
4
|
+
import { r as HmiApi } from "./hmi-Cw9EEy_5.mjs";
|
|
5
|
+
import { i as PowerApi } from "./power-BQGaOZjf.mjs";
|
|
6
|
+
import { n as RelaysApi } from "./relays-BCn6rQN1.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/at1000.d.ts
|
|
9
9
|
/** @hideconstructor */
|
|
@@ -47,4 +47,4 @@ declare class AT1000Base {
|
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
49
|
export { AT1000Base as t };
|
|
50
|
-
//# sourceMappingURL=at1000-
|
|
50
|
+
//# sourceMappingURL=at1000-RNA4yNKP.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at1000-
|
|
1
|
+
{"version":3,"file":"at1000-RNA4yNKP.d.mts","names":[],"sources":["../src/at1000.ts"],"mappings":";;;;;;;;;cAkBa,UAAA;EAAA;;;EAAA,SAIK,IAAA;EAUK;;;EAAA,SANL,IAAA,EAAM,WAAA;EAAA,QAEd,KAAA;EAwBgB;;;EAAA,SApBR,GAAA,EAAK,MAAA;EA+EwB;;;EAAA,SA3E7B,GAAA,EAAK,MAAA;EAVL;;;EAAA,SAcA,IAAA,EAAM,OAAA;EARD;;;EAAA,SAYL,UAAA,EAAY,aAAA;EAJN;;;EAAA,SAQN,KAAA,EAAO,QAAA;EAAA;;;EAAA,SAIP,MAAA,EAAQ,SAAA;cAEZ,IAAA,UAAc,IAAA,EAAM,WAAA;EAiD1B,KAAA,IAAK,OAAA;EAAA,OAQG,MAAA,GAAgB,IAAA,aAAe,OAAA,CAAQ,UAAA;AAAA"}
|
package/build/browser.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-CQR8byxP.cjs");var t=class extends e.t{static apiVersion=e.n};exports.AT1000=t;
|
|
2
2
|
//# sourceMappingURL=browser.cjs.map
|
package/build/browser.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.cjs","names":["AT1000Base","version"],"sources":["../src/browser.ts"],"sourcesContent":["import { version } from '../package.json';\nimport { AT1000Base } from './at1000';\n\n/** @hideconstructor */\nexport class AT1000 extends AT1000Base {\n static readonly apiVersion = version;\n}\n"],"mappings":"4GAIA,IAAa,EAAb,cAA4BA,EAAAA,CAAW,CACrC,OAAgB,WAAaC,EAAAA"}
|
|
1
|
+
{"version":3,"file":"browser.cjs","names":["AT1000Base","version"],"sources":["../src/browser.ts"],"sourcesContent":["import { version } from '../package.json';\nimport { AT1000Base } from './at1000';\n\n/** @hideconstructor */\nexport class AT1000 extends AT1000Base {\n static readonly apiVersion = version;\n}\n"],"mappings":"4GAIA,IAAa,EAAb,cAA4BA,EAAAA,CAAW,CACrC,OAAgB,WAAaC,EAAAA,CAC/B"}
|
package/build/browser.d.cts
CHANGED
package/build/browser.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.cts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;cAIa,MAAA,SAAe,
|
|
1
|
+
{"version":3,"file":"browser.d.cts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;cAIa,MAAA,SAAe,UAAU;EAAA,gBACpB,UAAU;AAAA"}
|
package/build/browser.d.mts
CHANGED
package/build/browser.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.mts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;cAIa,MAAA,SAAe,
|
|
1
|
+
{"version":3,"file":"browser.d.mts","names":[],"sources":["../src/browser.ts"],"mappings":";;;;cAIa,MAAA,SAAe,UAAU;EAAA,gBACpB,UAAU;AAAA"}
|
package/build/browser.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,t}from"./at1000-
|
|
1
|
+
import{n as e,t}from"./at1000-Dg_S21jO.mjs";var n=class extends t{static apiVersion=e};export{n as AT1000};
|
|
2
2
|
//# sourceMappingURL=browser.mjs.map
|
package/build/browser.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.mjs","names":[],"sources":["../src/browser.ts"],"sourcesContent":["import { version } from '../package.json';\nimport { AT1000Base } from './at1000';\n\n/** @hideconstructor */\nexport class AT1000 extends AT1000Base {\n static readonly apiVersion = version;\n}\n"],"mappings":"4CAIA,IAAa,EAAb,cAA4B,CAAW,CACrC,OAAgB,WAAa"}
|
|
1
|
+
{"version":3,"file":"browser.mjs","names":[],"sources":["../src/browser.ts"],"sourcesContent":["import { version } from '../package.json';\nimport { AT1000Base } from './at1000';\n\n/** @hideconstructor */\nexport class AT1000 extends AT1000Base {\n static readonly apiVersion = version;\n}\n"],"mappings":"4CAIA,IAAa,EAAb,cAA4B,CAAW,CACrC,OAAgB,WAAa,CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|