@ikalogic/at1000 0.1.8 → 0.1.10

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.
Files changed (61) hide show
  1. package/build/at1000-C05Nf5BV.mjs +2 -0
  2. package/build/at1000-C05Nf5BV.mjs.map +1 -0
  3. package/build/{at1000-CtJGQzs4.d.mts → at1000-DC56gH_z.d.mts} +5 -5
  4. package/build/{at1000-CtJGQzs4.d.mts.map → at1000-DC56gH_z.d.mts.map} +1 -1
  5. package/build/{at1000-BhiyEaDO.d.cts → at1000-DWXwGN_p.d.cts} +5 -5
  6. package/build/{at1000-BhiyEaDO.d.cts.map → at1000-DWXwGN_p.d.cts.map} +1 -1
  7. package/build/at1000-yTj5rhJg.cjs +2 -0
  8. package/build/at1000-yTj5rhJg.cjs.map +1 -0
  9. package/build/browser.cjs +1 -1
  10. package/build/browser.d.cts +1 -8
  11. package/build/browser.d.cts.map +1 -1
  12. package/build/browser.d.mts +5 -5
  13. package/build/browser.mjs +1 -1
  14. package/build/com-Bq-d2n2_.mjs.map +1 -1
  15. package/build/{com-Bau2RVba.d.cts → com-CrsBtPlz.d.cts} +29 -29
  16. package/build/{com-Bau2RVba.d.cts.map → com-CrsBtPlz.d.cts.map} +1 -1
  17. package/build/com-D6zvDfVV.cjs.map +1 -1
  18. package/build/{com-Bd30LXVW.d.mts → com-_ILcTDIy.d.mts} +29 -29
  19. package/build/{com-Bd30LXVW.d.mts.map → com-_ILcTDIy.d.mts.map} +1 -1
  20. package/build/com.d.cts +1 -1
  21. package/build/com.d.mts +1 -1
  22. package/build/gpio-BnyLCBEg.cjs.map +1 -1
  23. package/build/{gpio-DGcccQh6.d.cts → gpio-CAEHrpQE.d.cts} +17 -17
  24. package/build/{gpio-CvLKWnSo.d.mts.map → gpio-CAEHrpQE.d.cts.map} +1 -1
  25. package/build/{gpio-CvLKWnSo.d.mts → gpio-DH9cP9Yd.d.mts} +17 -17
  26. package/build/{gpio-DGcccQh6.d.cts.map → gpio-DH9cP9Yd.d.mts.map} +1 -1
  27. package/build/gpio-bjzKV_Vy.mjs.map +1 -1
  28. package/build/gpio.d.cts +1 -2
  29. package/build/gpio.d.mts +1 -1
  30. package/build/{hmi-C1-vU40b.d.cts → hmi-BqgMEVWu.d.mts} +4 -4
  31. package/build/{hmi-C1-vU40b.d.cts.map → hmi-BqgMEVWu.d.mts.map} +1 -1
  32. package/build/{hmi-CIOjZVch.d.mts → hmi-CG5IhN4l.d.cts} +4 -4
  33. package/build/{hmi-CIOjZVch.d.mts.map → hmi-CG5IhN4l.d.cts.map} +1 -1
  34. package/build/hmi-CTx2jfxU.mjs.map +1 -1
  35. package/build/hmi-CnTa8kMx.cjs.map +1 -1
  36. package/build/hmi.d.cts +1 -1
  37. package/build/hmi.d.mts +1 -1
  38. package/build/management-BKLSOMbM.mjs.map +1 -1
  39. package/build/management-DHD60Xrp.cjs.map +1 -1
  40. package/build/node.cjs +1 -1
  41. package/build/node.cjs.map +1 -1
  42. package/build/node.d.cts +1 -8
  43. package/build/node.d.cts.map +1 -1
  44. package/build/node.d.mts +5 -5
  45. package/build/node.mjs +1 -1
  46. package/build/node.mjs.map +1 -1
  47. package/build/{power-CSNvBKgh.d.cts → power-CDwKKL2S.d.cts} +19 -19
  48. package/build/{power-CSNvBKgh.d.cts.map → power-CDwKKL2S.d.cts.map} +1 -1
  49. package/build/{power-Cefqtt9P.d.mts → power-DWFus9vw.d.mts} +19 -19
  50. package/build/{power-Cefqtt9P.d.mts.map → power-DWFus9vw.d.mts.map} +1 -1
  51. package/build/power-PrmE0ai2.cjs.map +1 -1
  52. package/build/power-hwld3j5a.mjs.map +1 -1
  53. package/build/power.d.cts +1 -2
  54. package/build/power.d.mts +1 -1
  55. package/build/relays-BK2uL5i_.cjs.map +1 -1
  56. package/build/relays-CqglfFwF.mjs.map +1 -1
  57. package/package.json +8 -8
  58. package/build/at1000-CgxthtV5.cjs +0 -2
  59. package/build/at1000-CgxthtV5.cjs.map +0 -1
  60. package/build/at1000-zvuVNh5z.mjs +0 -2
  61. package/build/at1000-zvuVNh5z.mjs.map +0 -1
@@ -23,18 +23,18 @@ declare const dutConfiguration: Omit<Omit<v.ObjectSchema<{
23
23
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
24
24
  readonly current: v.NumberSchema<undefined>;
25
25
  }, "enabled" | "target_voltage">;
26
- readonly '~standard': v.StandardProps<{
26
+ readonly "~standard": v.StandardProps<{
27
27
  enabled: boolean;
28
28
  target_voltage: number;
29
29
  }, {
30
30
  enabled: boolean;
31
31
  target_voltage: number;
32
32
  }>;
33
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
33
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
34
34
  enabled: boolean;
35
35
  target_voltage: number;
36
36
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
37
- readonly '~types'?: {
37
+ readonly "~types"?: {
38
38
  readonly input: {
39
39
  enabled: boolean;
40
40
  target_voltage: number;
@@ -50,18 +50,18 @@ declare const dutConfiguration: Omit<Omit<v.ObjectSchema<{
50
50
  readonly enabled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
51
51
  readonly target_voltage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>, undefined>;
52
52
  };
53
- readonly '~standard': v.StandardProps<{
53
+ readonly "~standard": v.StandardProps<{
54
54
  enabled?: boolean | undefined;
55
55
  target_voltage?: number | undefined;
56
56
  }, {
57
57
  enabled?: boolean | undefined;
58
58
  target_voltage?: number | undefined;
59
59
  }>;
60
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
60
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
61
61
  enabled?: boolean | undefined;
62
62
  target_voltage?: number | undefined;
63
63
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
64
- readonly '~types'?: {
64
+ readonly "~types"?: {
65
65
  readonly input: {
66
66
  enabled?: boolean | undefined;
67
67
  target_voltage?: number | undefined;
@@ -86,7 +86,7 @@ declare const usbState: Omit<v.ObjectSchema<{
86
86
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
87
87
  readonly current: v.NumberSchema<undefined>;
88
88
  }, "enabled" | "voltage" | "current">;
89
- readonly '~standard': v.StandardProps<{
89
+ readonly "~standard": v.StandardProps<{
90
90
  enabled: boolean;
91
91
  voltage: number;
92
92
  current: number;
@@ -95,12 +95,12 @@ declare const usbState: Omit<v.ObjectSchema<{
95
95
  voltage: number;
96
96
  current: number;
97
97
  }>;
98
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
98
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
99
99
  enabled: boolean;
100
100
  voltage: number;
101
101
  current: number;
102
102
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
103
- readonly '~types'?: {
103
+ readonly "~types"?: {
104
104
  readonly input: {
105
105
  enabled: boolean;
106
106
  voltage: number;
@@ -127,7 +127,7 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
127
127
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
128
128
  readonly current: v.NumberSchema<undefined>;
129
129
  }, "enabled" | "voltage" | "current">;
130
- readonly '~standard': v.StandardProps<{
130
+ readonly "~standard": v.StandardProps<{
131
131
  enabled: boolean;
132
132
  voltage: number;
133
133
  current: number;
@@ -136,12 +136,12 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
136
136
  voltage: number;
137
137
  current: number;
138
138
  }>;
139
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
139
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
140
140
  enabled: boolean;
141
141
  voltage: number;
142
142
  current: number;
143
143
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
144
- readonly '~types'?: {
144
+ readonly "~types"?: {
145
145
  readonly input: {
146
146
  enabled: boolean;
147
147
  voltage: number;
@@ -161,15 +161,15 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
161
161
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
162
162
  readonly current: v.NumberSchema<undefined>;
163
163
  }, "enabled" | "voltage" | "current">, "enabled">;
164
- readonly '~standard': v.StandardProps<{
164
+ readonly "~standard": v.StandardProps<{
165
165
  enabled: boolean;
166
166
  }, {
167
167
  enabled: boolean;
168
168
  }>;
169
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
169
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
170
170
  enabled: boolean;
171
171
  }, v.BooleanIssue | v.ObjectIssue>;
172
- readonly '~types'?: {
172
+ readonly "~types"?: {
173
173
  readonly input: {
174
174
  enabled: boolean;
175
175
  };
@@ -192,15 +192,15 @@ declare const relayState: Omit<v.ObjectSchema<{
192
192
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
193
193
  readonly current: v.NumberSchema<undefined>;
194
194
  }, "current">;
195
- readonly '~standard': v.StandardProps<{
195
+ readonly "~standard": v.StandardProps<{
196
196
  current: number;
197
197
  }, {
198
198
  current: number;
199
199
  }>;
200
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
200
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
201
201
  current: number;
202
202
  }, v.NumberIssue | v.ObjectIssue>;
203
- readonly '~types'?: {
203
+ readonly "~types"?: {
204
204
  readonly input: {
205
205
  current: number;
206
206
  };
@@ -340,4 +340,4 @@ declare class RelayPower {
340
340
  }
341
341
  //#endregion
342
342
  export { RelayPower as a, UsbConfiguration as c, PowerApi as i, UsbState as l, DutConfiguration as n, RelayState as o, DutState as r, Usb as s, Dut as t };
343
- //# sourceMappingURL=power-CSNvBKgh.d.cts.map
343
+ //# sourceMappingURL=power-CDwKKL2S.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"power-CSNvBKgh.d.cts","names":[],"sources":["../src/api/power.ts"],"sourcesContent":[],"mappings":";;;;;;cAQM,UAAQ,CAAA,CAAA;EAAR,SAAA,OAKJ,iBAAA,CAAA,SAAA,CAAA;;;;;KACU,QAAA,GAAW,CAAA,CAAE,mBAAmB;cAEtC,kBAAgB,KAAA,KAAA,CAAA,CAAA;;;;;CARR,EAAA,SAAA,CAAA,EAAA,WAAA,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA,CAAA,GAAA;EAAA,SAAA,OAAA,MAAA,CAAA;IAMF,SAAQ,OAAA,iBAAK,CAAA,SAAW,CAAA;IAE9B,SAAA,cAA6E,kBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,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AQ;;;;;kBAQM"}
@@ -23,18 +23,18 @@ declare const dutConfiguration: Omit<Omit<v.ObjectSchema<{
23
23
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
24
24
  readonly current: v.NumberSchema<undefined>;
25
25
  }, "enabled" | "target_voltage">;
26
- readonly '~standard': v.StandardProps<{
26
+ readonly "~standard": v.StandardProps<{
27
27
  enabled: boolean;
28
28
  target_voltage: number;
29
29
  }, {
30
30
  enabled: boolean;
31
31
  target_voltage: number;
32
32
  }>;
33
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
33
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
34
34
  enabled: boolean;
35
35
  target_voltage: number;
36
36
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
37
- readonly '~types'?: {
37
+ readonly "~types"?: {
38
38
  readonly input: {
39
39
  enabled: boolean;
40
40
  target_voltage: number;
@@ -50,18 +50,18 @@ declare const dutConfiguration: Omit<Omit<v.ObjectSchema<{
50
50
  readonly enabled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
51
51
  readonly target_voltage: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>, undefined>;
52
52
  };
53
- readonly '~standard': v.StandardProps<{
53
+ readonly "~standard": v.StandardProps<{
54
54
  enabled?: boolean | undefined;
55
55
  target_voltage?: number | undefined;
56
56
  }, {
57
57
  enabled?: boolean | undefined;
58
58
  target_voltage?: number | undefined;
59
59
  }>;
60
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
60
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
61
61
  enabled?: boolean | undefined;
62
62
  target_voltage?: number | undefined;
63
63
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
64
- readonly '~types'?: {
64
+ readonly "~types"?: {
65
65
  readonly input: {
66
66
  enabled?: boolean | undefined;
67
67
  target_voltage?: number | undefined;
@@ -86,7 +86,7 @@ declare const usbState: Omit<v.ObjectSchema<{
86
86
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
87
87
  readonly current: v.NumberSchema<undefined>;
88
88
  }, "enabled" | "voltage" | "current">;
89
- readonly '~standard': v.StandardProps<{
89
+ readonly "~standard": v.StandardProps<{
90
90
  enabled: boolean;
91
91
  voltage: number;
92
92
  current: number;
@@ -95,12 +95,12 @@ declare const usbState: Omit<v.ObjectSchema<{
95
95
  voltage: number;
96
96
  current: number;
97
97
  }>;
98
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
98
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
99
99
  enabled: boolean;
100
100
  voltage: number;
101
101
  current: number;
102
102
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
103
- readonly '~types'?: {
103
+ readonly "~types"?: {
104
104
  readonly input: {
105
105
  enabled: boolean;
106
106
  voltage: number;
@@ -127,7 +127,7 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
127
127
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
128
128
  readonly current: v.NumberSchema<undefined>;
129
129
  }, "enabled" | "voltage" | "current">;
130
- readonly '~standard': v.StandardProps<{
130
+ readonly "~standard": v.StandardProps<{
131
131
  enabled: boolean;
132
132
  voltage: number;
133
133
  current: number;
@@ -136,12 +136,12 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
136
136
  voltage: number;
137
137
  current: number;
138
138
  }>;
139
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
139
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
140
140
  enabled: boolean;
141
141
  voltage: number;
142
142
  current: number;
143
143
  }, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
144
- readonly '~types'?: {
144
+ readonly "~types"?: {
145
145
  readonly input: {
146
146
  enabled: boolean;
147
147
  voltage: number;
@@ -161,15 +161,15 @@ declare const usbConfiguration: Omit<Omit<v.ObjectSchema<{
161
161
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
162
162
  readonly current: v.NumberSchema<undefined>;
163
163
  }, "enabled" | "voltage" | "current">, "enabled">;
164
- readonly '~standard': v.StandardProps<{
164
+ readonly "~standard": v.StandardProps<{
165
165
  enabled: boolean;
166
166
  }, {
167
167
  enabled: boolean;
168
168
  }>;
169
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
169
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
170
170
  enabled: boolean;
171
171
  }, v.BooleanIssue | v.ObjectIssue>;
172
- readonly '~types'?: {
172
+ readonly "~types"?: {
173
173
  readonly input: {
174
174
  enabled: boolean;
175
175
  };
@@ -192,15 +192,15 @@ declare const relayState: Omit<v.ObjectSchema<{
192
192
  readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
193
193
  readonly current: v.NumberSchema<undefined>;
194
194
  }, "current">;
195
- readonly '~standard': v.StandardProps<{
195
+ readonly "~standard": v.StandardProps<{
196
196
  current: number;
197
197
  }, {
198
198
  current: number;
199
199
  }>;
200
- readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
200
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
201
201
  current: number;
202
202
  }, v.NumberIssue | v.ObjectIssue>;
203
- readonly '~types'?: {
203
+ readonly "~types"?: {
204
204
  readonly input: {
205
205
  current: number;
206
206
  };
@@ -340,4 +340,4 @@ declare class RelayPower {
340
340
  }
341
341
  //#endregion
342
342
  export { RelayPower as a, UsbConfiguration as c, PowerApi as i, UsbState as l, DutConfiguration as n, RelayState as o, DutState as r, Usb as s, Dut as t };
343
- //# sourceMappingURL=power-Cefqtt9P.d.mts.map
343
+ //# sourceMappingURL=power-DWFus9vw.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"power-Cefqtt9P.d.mts","names":[],"sources":["../src/api/power.ts"],"sourcesContent":[],"mappings":";;;;;;cAQM,UAAQ,CAAA,CAAA;EAAR,SAAA,OAKJ,iBAAA,CAAA,SAAA,CAAA;;;;;KACU,QAAA,GAAW,CAAA,CAAE,mBAAmB;cAEtC,kBAAgB,KAAA,KAAA,CAAA,CAAA;;;;;CARR,EAAA,SAAA,CAAA,EAAA,WAAA,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA,CAAA,GAAA;EAAA,SAAA,OAAA,MAAA,CAAA;IAMF,SAAQ,OAAA,iBAAK,CAAA,SAAW,CAAA;IAE9B,SAAA,cAA6E,kBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,EAAA,EAAA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E0ai2.cjs","names":["v","analogLevel","fetch: UpFetch","id: number"],"sources":["../src/api/power.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel } from './common';\nimport type { Device } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst dutState = v.object({\n enabled: v.boolean(),\n target_voltage: analogLevel,\n voltage: analogLevel,\n current: v.number(),\n});\nexport type DutState = v.InferOutput<typeof dutState>;\n\nconst dutConfiguration = v.partial(v.pick(dutState, ['enabled', 'target_voltage']));\nexport type DutConfiguration = v.InferOutput<typeof dutConfiguration>;\n\nconst usbState = v.pick(dutState, ['enabled', 'current', 'voltage']);\nexport type UsbState = v.InferOutput<typeof usbState>;\n\nconst usbConfiguration = v.pick(usbState, ['enabled']);\nexport type UsbConfiguration = v.InferOutput<typeof usbConfiguration>;\n\nconst relayState = v.pick(dutState, ['current']);\nexport type RelayState = v.InferOutput<typeof relayState>;\n\n/** @hideconstructor */\nexport class PowerApi {\n private readonly usb_count: number;\n private readonly dut_count = 1;\n\n constructor(private readonly fetch: UpFetch, device: Device) {\n this.usb_count = device.capabilities.usb_ports.reduce((a, b) => a + b.count, 0);\n }\n\n /**\n * Resets the power API.\n */\n reset(): Promise<void> {\n return this.fetch('/power/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific DUT by id.\n * @param id The DUT id.\n * @returns The DUT instance.\n */\n dut(id: number): Dut {\n if (id < 0 || id >= this.dut_count) {\n throw new Error(\n `Invalid DUT id ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a DUT ID between 0 and ${\n this.dut_count - 1\n }\\n Path: /power/dut/${id}`,\n );\n }\n\n return new Dut(this.fetch, id);\n }\n\n /**\n * Access a specific USB port by id.\n * @param id The USB port id.\n * @returns The USB port instance.\n */\n usb(id: number): Usb {\n if (id < 0 || id >= this.usb_count) {\n throw new Error(\n `Invalid USB port ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a USB port ID between 0 and ${\n this.usb_count - 1\n }\\n Path: /power/usb/${id}`,\n );\n }\n\n return new Usb(this.fetch, id);\n }\n\n /**\n * Access the relay at index 4.\n * @returns The relay instance.\n */\n relay_4(): RelayPower {\n return new RelayPower(this.fetch, 4);\n }\n}\n\n/** @hideconstructor */\nexport class Dut {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the DUT.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/dut/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the DUT.\n * @param config The configuration to apply.\n * @returns The updated DUT state.\n */\n configure(config: DutConfiguration): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, {\n method: 'PATCH',\n body: v.parse(dutConfiguration, config),\n schema: dutState,\n });\n }\n\n /**\n * Powers up the DUT to the specified voltage.\n * @param voltage The target voltage to set.\n * @returns The updated DUT state.\n */\n async power_up(voltage: AnalogOutputLevel): Promise<DutState> {\n return this.configure({ enabled: true, target_voltage: voltage });\n }\n\n /**\n * Powers down the DUT.\n * @returns The updated DUT state.\n */\n async power_down(): Promise<DutState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current DUT state.\n * @returns The current DUT state.\n */\n read(): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, { schema: dutState });\n }\n\n /**\n * Reads the current drawn by the DUT.\n * @returns The current drawn by the DUT.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage supplied to the DUT.\n * @returns The voltage supplied to the DUT.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class Usb {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the USB port.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/usb/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the USB port.\n * @param config The configuration to apply.\n * @returns The updated USB state.\n */\n configure(config: UsbConfiguration): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, {\n method: 'PATCH',\n body: v.parse(usbConfiguration, config),\n schema: usbState,\n });\n }\n\n /**\n * Powers up the USB port.\n * @returns The updated USB state.\n */\n power_up(): Promise<UsbState> {\n return this.configure({ enabled: true });\n }\n\n /**\n * Powers down the USB port.\n * @returns The updated USB state.\n */\n power_down(): Promise<UsbState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current state of the USB port.\n * @returns The current USB state.\n */\n read(): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, { schema: usbState });\n }\n\n /**\n * Reads the current drawn by the USB port.\n * @returns The current drawn by the USB port.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage at the USB port.\n * @returns The voltage at the USB port.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class RelayPower {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Reads the current state of the relay.\n * @returns The current relay state.\n */\n read(): Promise<RelayState> {\n return this.fetch(`/power/relay/${this.id}`, { schema: relayState });\n }\n\n /**\n * Reads the current drawn through the relay.\n * @returns The current drawn through the relay.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n}\n"],"mappings":"6GAQA,MAAM,EAAWA,EAAE,OAAO,CACxB,QAASA,EAAE,SAAS,CACpB,eAAgBC,EAAAA,EAChB,QAASA,EAAAA,EACT,QAASD,EAAE,QAAQ,CACpB,CAAC,CAGI,EAAmBA,EAAE,QAAQA,EAAE,KAAK,EAAU,CAAC,UAAW,iBAAiB,CAAC,CAAC,CAG7E,EAAWA,EAAE,KAAK,EAAU,CAAC,UAAW,UAAW,UAAU,CAAC,CAG9D,EAAmBA,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAGhD,EAAaA,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAIhD,IAAa,EAAb,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AQ,MAAM,KAAK,MAAM,EAAE,QAO7B,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,UAKlB,EAAb,KAAiB,CACf,YAAY,EAAiC,EAA4B,CAA5C,KAAA,MAAA,EAAgC,KAAA,GAAA,EAK7D,OAAuB,CACrB,OAAO,KAAK,MAAM,cAAc,KAAK,GAAG,QAAS,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQ/F,UAAU,EAA6C,CACrD,OAAO,KAAK,MAAM,cAAc,KAAK,KAAM,CACzC,OAAQ,QACR,KAAMA,EAAE,MAAM,EAAkB,EAAO,CACvC,OAAQ,EACT,CAAC,CAOJ,UAA8B,CAC5B,OAAO,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAO1C,YAAgC,CAC9B,OAAO,KAAK,UAAU,CAAE,QAAS,GAAO,CAAC,CAO3C,MAA0B,CACxB,OAAO,KAAK,MAAM,cAAc,KAAK,KAAM,CAAE,OAAQ,EAAU,CAAC,CAOlE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,QAO7B,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,UAKlB,EAAb,KAAwB,CACtB,YAAY,EAAiC,EAA4B,CAA5C,KAAA,MAAA,EAAgC,KAAA,GAAA,EAM7D,MAA4B,CAC1B,OAAO,KAAK,MAAM,gBAAgB,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,CAOtE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE"}
1
+ {"version":3,"file":"power-PrmE0ai2.cjs","names":["v","analogLevel"],"sources":["../src/api/power.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel } from './common';\nimport type { Device } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst dutState = v.object({\n enabled: v.boolean(),\n target_voltage: analogLevel,\n voltage: analogLevel,\n current: v.number(),\n});\nexport type DutState = v.InferOutput<typeof dutState>;\n\nconst dutConfiguration = v.partial(v.pick(dutState, ['enabled', 'target_voltage']));\nexport type DutConfiguration = v.InferOutput<typeof dutConfiguration>;\n\nconst usbState = v.pick(dutState, ['enabled', 'current', 'voltage']);\nexport type UsbState = v.InferOutput<typeof usbState>;\n\nconst usbConfiguration = v.pick(usbState, ['enabled']);\nexport type UsbConfiguration = v.InferOutput<typeof usbConfiguration>;\n\nconst relayState = v.pick(dutState, ['current']);\nexport type RelayState = v.InferOutput<typeof relayState>;\n\n/** @hideconstructor */\nexport class PowerApi {\n private readonly usb_count: number;\n private readonly dut_count = 1;\n\n constructor(private readonly fetch: UpFetch, device: Device) {\n this.usb_count = device.capabilities.usb_ports.reduce((a, b) => a + b.count, 0);\n }\n\n /**\n * Resets the power API.\n */\n reset(): Promise<void> {\n return this.fetch('/power/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific DUT by id.\n * @param id The DUT id.\n * @returns The DUT instance.\n */\n dut(id: number): Dut {\n if (id < 0 || id >= this.dut_count) {\n throw new Error(\n `Invalid DUT id ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a DUT ID between 0 and ${\n this.dut_count - 1\n }\\n Path: /power/dut/${id}`,\n );\n }\n\n return new Dut(this.fetch, id);\n }\n\n /**\n * Access a specific USB port by id.\n * @param id The USB port id.\n * @returns The USB port instance.\n */\n usb(id: number): Usb {\n if (id < 0 || id >= this.usb_count) {\n throw new Error(\n `Invalid USB port ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a USB port ID between 0 and ${\n this.usb_count - 1\n }\\n Path: /power/usb/${id}`,\n );\n }\n\n return new Usb(this.fetch, id);\n }\n\n /**\n * Access the relay at index 4.\n * @returns The relay instance.\n */\n relay_4(): RelayPower {\n return new RelayPower(this.fetch, 4);\n }\n}\n\n/** @hideconstructor */\nexport class Dut {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the DUT.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/dut/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the DUT.\n * @param config The configuration to apply.\n * @returns The updated DUT state.\n */\n configure(config: DutConfiguration): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, {\n method: 'PATCH',\n body: v.parse(dutConfiguration, config),\n schema: dutState,\n });\n }\n\n /**\n * Powers up the DUT to the specified voltage.\n * @param voltage The target voltage to set.\n * @returns The updated DUT state.\n */\n async power_up(voltage: AnalogOutputLevel): Promise<DutState> {\n return this.configure({ enabled: true, target_voltage: voltage });\n }\n\n /**\n * Powers down the DUT.\n * @returns The updated DUT state.\n */\n async power_down(): Promise<DutState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current DUT state.\n * @returns The current DUT state.\n */\n read(): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, { schema: dutState });\n }\n\n /**\n * Reads the current drawn by the DUT.\n * @returns The current drawn by the DUT.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage supplied to the DUT.\n * @returns The voltage supplied to the DUT.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class Usb {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the USB port.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/usb/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the USB port.\n * @param config The configuration to apply.\n * @returns The updated USB state.\n */\n configure(config: UsbConfiguration): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, {\n method: 'PATCH',\n body: v.parse(usbConfiguration, config),\n schema: usbState,\n });\n }\n\n /**\n * Powers up the USB port.\n * @returns The updated USB state.\n */\n power_up(): Promise<UsbState> {\n return this.configure({ enabled: true });\n }\n\n /**\n * Powers down the USB port.\n * @returns The updated USB state.\n */\n power_down(): Promise<UsbState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current state of the USB port.\n * @returns The current USB state.\n */\n read(): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, { schema: usbState });\n }\n\n /**\n * Reads the current drawn by the USB port.\n * @returns The current drawn by the USB port.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage at the USB port.\n * @returns The voltage at the USB port.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class RelayPower {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Reads the current state of the relay.\n * @returns The current relay state.\n */\n read(): Promise<RelayState> {\n return this.fetch(`/power/relay/${this.id}`, { schema: relayState });\n }\n\n /**\n * Reads the current drawn through the relay.\n * @returns The current drawn through the relay.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n}\n"],"mappings":"6GAQA,MAAM,EAAWA,EAAE,OAAO,CACxB,QAASA,EAAE,SAAS,CACpB,eAAgBC,EAAAA,EAChB,QAASA,EAAAA,EACT,QAASD,EAAE,QAAQ,CACpB,CAAC,CAGI,EAAmBA,EAAE,QAAQA,EAAE,KAAK,EAAU,CAAC,UAAW,iBAAiB,CAAC,CAAC,CAG7E,EAAWA,EAAE,KAAK,EAAU,CAAC,UAAW,UAAW,UAAU,CAAC,CAG9D,EAAmBA,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAGhD,EAAaA,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAIhD,IAAa,EAAb,KAAsB,CACpB,UACA,UAA6B,EAE7B,YAAY,EAAiC,EAAgB,CAAhC,KAAA,MAAA,EAC3B,KAAK,UAAY,EAAO,aAAa,UAAU,QAAQ,EAAG,IAAM,EAAI,EAAE,MAAO,EAAE,CAMjF,OAAuB,CACrB,OAAO,KAAK,MAAM,eAAgB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQhF,IAAI,EAAi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AqB,GAAI,CAAC,CAQ/F,UAAU,EAA6C,CACrD,OAAO,KAAK,MAAM,cAAc,KAAK,KAAM,CACzC,OAAQ,QACR,KAAMA,EAAE,MAAM,EAAkB,EAAO,CACvC,OAAQ,EACT,CAAC,CAOJ,UAA8B,CAC5B,OAAO,KAAK,UAAU,CAAE,QAAS,GAAM,CAAC,CAO1C,YAAgC,CAC9B,OAAO,KAAK,UAAU,CAAE,QAAS,GAAO,CAAC,CAO3C,MAA0B,CACxB,OAAO,KAAK,MAAM,cAAc,KAAK,KAAM,CAAE,OAAQ,EAAU,CAAC,CAOlE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,QAO7B,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,UAKlB,EAAb,KAAwB,CACtB,YAAY,EAAiC,EAA4B,CAA5C,KAAA,MAAA,EAAgC,KAAA,GAAA,EAM7D,MAA4B,CAC1B,OAAO,KAAK,MAAM,gBAAgB,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,CAOtE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"power-hwld3j5a.mjs","names":["fetch: UpFetch","id: number"],"sources":["../src/api/power.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel } from './common';\nimport type { Device } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst dutState = v.object({\n enabled: v.boolean(),\n target_voltage: analogLevel,\n voltage: analogLevel,\n current: v.number(),\n});\nexport type DutState = v.InferOutput<typeof dutState>;\n\nconst dutConfiguration = v.partial(v.pick(dutState, ['enabled', 'target_voltage']));\nexport type DutConfiguration = v.InferOutput<typeof dutConfiguration>;\n\nconst usbState = v.pick(dutState, ['enabled', 'current', 'voltage']);\nexport type UsbState = v.InferOutput<typeof usbState>;\n\nconst usbConfiguration = v.pick(usbState, ['enabled']);\nexport type UsbConfiguration = v.InferOutput<typeof usbConfiguration>;\n\nconst relayState = v.pick(dutState, ['current']);\nexport type RelayState = v.InferOutput<typeof relayState>;\n\n/** @hideconstructor */\nexport class PowerApi {\n private readonly usb_count: number;\n private readonly dut_count = 1;\n\n constructor(private readonly fetch: UpFetch, device: Device) {\n this.usb_count = device.capabilities.usb_ports.reduce((a, b) => a + b.count, 0);\n }\n\n /**\n * Resets the power API.\n */\n reset(): Promise<void> {\n return this.fetch('/power/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific DUT by id.\n * @param id The DUT id.\n * @returns The DUT instance.\n */\n dut(id: number): Dut {\n if (id < 0 || id >= this.dut_count) {\n throw new Error(\n `Invalid DUT id ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a DUT ID between 0 and ${\n this.dut_count - 1\n }\\n Path: /power/dut/${id}`,\n );\n }\n\n return new Dut(this.fetch, id);\n }\n\n /**\n * Access a specific USB port by id.\n * @param id The USB port id.\n * @returns The USB port instance.\n */\n usb(id: number): Usb {\n if (id < 0 || id >= this.usb_count) {\n throw new Error(\n `Invalid USB port ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a USB port ID between 0 and ${\n this.usb_count - 1\n }\\n Path: /power/usb/${id}`,\n );\n }\n\n return new Usb(this.fetch, id);\n }\n\n /**\n * Access the relay at index 4.\n * @returns The relay instance.\n */\n relay_4(): RelayPower {\n return new RelayPower(this.fetch, 4);\n }\n}\n\n/** @hideconstructor */\nexport class Dut {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the DUT.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/dut/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the DUT.\n * @param config The configuration to apply.\n * @returns The updated DUT state.\n */\n configure(config: DutConfiguration): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, {\n method: 'PATCH',\n body: v.parse(dutConfiguration, config),\n schema: dutState,\n });\n }\n\n /**\n * Powers up the DUT to the specified voltage.\n * @param voltage The target voltage to set.\n * @returns The updated DUT state.\n */\n async power_up(voltage: AnalogOutputLevel): Promise<DutState> {\n return this.configure({ enabled: true, target_voltage: voltage });\n }\n\n /**\n * Powers down the DUT.\n * @returns The updated DUT state.\n */\n async power_down(): Promise<DutState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current DUT state.\n * @returns The current DUT state.\n */\n read(): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, { schema: dutState });\n }\n\n /**\n * Reads the current drawn by the DUT.\n * @returns The current drawn by the DUT.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage supplied to the DUT.\n * @returns The voltage supplied to the DUT.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class Usb {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the USB port.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/usb/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the USB port.\n * @param config The configuration to apply.\n * @returns The updated USB state.\n */\n configure(config: UsbConfiguration): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, {\n method: 'PATCH',\n body: v.parse(usbConfiguration, config),\n schema: usbState,\n });\n }\n\n /**\n * Powers up the USB port.\n * @returns The updated USB state.\n */\n power_up(): Promise<UsbState> {\n return this.configure({ enabled: true });\n }\n\n /**\n * Powers down the USB port.\n * @returns The updated USB state.\n */\n power_down(): Promise<UsbState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current state of the USB port.\n * @returns The current USB state.\n */\n read(): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, { schema: usbState });\n }\n\n /**\n * Reads the current drawn by the USB port.\n * @returns The current drawn by the USB port.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage at the USB port.\n * @returns The voltage at the USB port.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class RelayPower {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Reads the current state of the relay.\n * @returns The current relay state.\n */\n read(): Promise<RelayState> {\n return this.fetch(`/power/relay/${this.id}`, { schema: relayState });\n }\n\n /**\n * Reads the current drawn through the relay.\n * @returns The current drawn through the relay.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n}\n"],"mappings":"oEAQA,MAAM,EAAW,EAAE,OAAO,CACxB,QAAS,EAAE,SAAS,CACpB,eAAgB,EAChB,QAAS,EACT,QAAS,EAAE,QAAQ,CACpB,CAAC,CAGI,EAAmB,EAAE,QAAQ,EAAE,KAAK,EAAU,CAAC,UAAW,iBAAiB,CAAC,CAAC,CAG7E,EAAW,EAAE,KAAK,EAAU,CAAC,UAAW,UAAW,UAAU,CAAC,CAG9D,EAAmB,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAGhD,EAAa,EAAE,KAAK,EAAU,CAAC,UAAU,CAAC,CAIhD,IAAa,EAAb,KAAsB,CACpB,UACA,UAA6B,EAE7B,YAAY,EAAiC,EAAgB,CAAhC,KAAA,MAAA,EAC3B,KAAK,UAAY,EAAO,aAAa,UAAU,QAAQ,EAAG,IAAM,EAAI,EAAE,MAAO,EAAE,CAMjF,OAAuB,CACrB,OAAO,KAAK,MAAM,eAAgB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQhF,IAAI,EAAiB,CACnB,GAAI,EAAK,GAAK,GAAM,KAAK,UACvB,MAAU,MACR,kBAAkB,EAAG,oEACnB,KAAK,UAAY,EAClB,yBAAyB,IAC3B,CAGH,OAAO,IAAI,EAAI,KAAK,MAAO,EAAG,CAQhC,IAAI,EAAiB,CACnB,GAAI,EAAK,GAAK,GAAM,KAAK,UACvB,MAAU,MACR,oBAAoB,EAAG,yEACrB,KAAK,UAAY,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E,QAAS,GAAO,CAAC,CAO3C,MAA0B,CACxB,OAAO,KAAK,MAAM,cAAc,KAAK,KAAM,CAAE,OAAQ,EAAU,CAAC,CAOlE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,QAO7B,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE,UAKlB,EAAb,KAAwB,CACtB,YAAY,EAAiC,EAA4B,CAA5C,KAAA,MAAA,EAAgC,KAAA,GAAA,EAM7D,MAA4B,CAC1B,OAAO,KAAK,MAAM,gBAAgB,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,CAOtE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE"}
1
+ {"version":3,"file":"power-hwld3j5a.mjs","names":[],"sources":["../src/api/power.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel } from './common';\nimport type { Device } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst dutState = v.object({\n enabled: v.boolean(),\n target_voltage: analogLevel,\n voltage: analogLevel,\n current: v.number(),\n});\nexport type DutState = v.InferOutput<typeof dutState>;\n\nconst dutConfiguration = v.partial(v.pick(dutState, ['enabled', 'target_voltage']));\nexport type DutConfiguration = v.InferOutput<typeof dutConfiguration>;\n\nconst usbState = v.pick(dutState, ['enabled', 'current', 'voltage']);\nexport type UsbState = v.InferOutput<typeof usbState>;\n\nconst usbConfiguration = v.pick(usbState, ['enabled']);\nexport type UsbConfiguration = v.InferOutput<typeof usbConfiguration>;\n\nconst relayState = v.pick(dutState, ['current']);\nexport type RelayState = v.InferOutput<typeof relayState>;\n\n/** @hideconstructor */\nexport class PowerApi {\n private readonly usb_count: number;\n private readonly dut_count = 1;\n\n constructor(private readonly fetch: UpFetch, device: Device) {\n this.usb_count = device.capabilities.usb_ports.reduce((a, b) => a + b.count, 0);\n }\n\n /**\n * Resets the power API.\n */\n reset(): Promise<void> {\n return this.fetch('/power/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific DUT by id.\n * @param id The DUT id.\n * @returns The DUT instance.\n */\n dut(id: number): Dut {\n if (id < 0 || id >= this.dut_count) {\n throw new Error(\n `Invalid DUT id ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a DUT ID between 0 and ${\n this.dut_count - 1\n }\\n Path: /power/dut/${id}`,\n );\n }\n\n return new Dut(this.fetch, id);\n }\n\n /**\n * Access a specific USB port by id.\n * @param id The USB port id.\n * @returns The USB port instance.\n */\n usb(id: number): Usb {\n if (id < 0 || id >= this.usb_count) {\n throw new Error(\n `Invalid USB port ${id} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a USB port ID between 0 and ${\n this.usb_count - 1\n }\\n Path: /power/usb/${id}`,\n );\n }\n\n return new Usb(this.fetch, id);\n }\n\n /**\n * Access the relay at index 4.\n * @returns The relay instance.\n */\n relay_4(): RelayPower {\n return new RelayPower(this.fetch, 4);\n }\n}\n\n/** @hideconstructor */\nexport class Dut {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the DUT.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/dut/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the DUT.\n * @param config The configuration to apply.\n * @returns The updated DUT state.\n */\n configure(config: DutConfiguration): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, {\n method: 'PATCH',\n body: v.parse(dutConfiguration, config),\n schema: dutState,\n });\n }\n\n /**\n * Powers up the DUT to the specified voltage.\n * @param voltage The target voltage to set.\n * @returns The updated DUT state.\n */\n async power_up(voltage: AnalogOutputLevel): Promise<DutState> {\n return this.configure({ enabled: true, target_voltage: voltage });\n }\n\n /**\n * Powers down the DUT.\n * @returns The updated DUT state.\n */\n async power_down(): Promise<DutState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current DUT state.\n * @returns The current DUT state.\n */\n read(): Promise<DutState> {\n return this.fetch(`/power/dut/${this.id}`, { schema: dutState });\n }\n\n /**\n * Reads the current drawn by the DUT.\n * @returns The current drawn by the DUT.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage supplied to the DUT.\n * @returns The voltage supplied to the DUT.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class Usb {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Resets the USB port.\n */\n reset(): Promise<void> {\n return this.fetch(`/power/usb/${this.id}/reset`, { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Configures the USB port.\n * @param config The configuration to apply.\n * @returns The updated USB state.\n */\n configure(config: UsbConfiguration): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, {\n method: 'PATCH',\n body: v.parse(usbConfiguration, config),\n schema: usbState,\n });\n }\n\n /**\n * Powers up the USB port.\n * @returns The updated USB state.\n */\n power_up(): Promise<UsbState> {\n return this.configure({ enabled: true });\n }\n\n /**\n * Powers down the USB port.\n * @returns The updated USB state.\n */\n power_down(): Promise<UsbState> {\n return this.configure({ enabled: false });\n }\n\n /**\n * Reads the current state of the USB port.\n * @returns The current USB state.\n */\n read(): Promise<UsbState> {\n return this.fetch(`/power/usb/${this.id}`, { schema: usbState });\n }\n\n /**\n * Reads the current drawn by the USB port.\n * @returns The current drawn by the USB port.\n */\n async read_current(): Promise<number> {\n return (await this.read()).current;\n }\n\n /**\n * Reads the voltage at the USB port.\n * @returns The voltage at the USB port.\n */\n async read_voltage(): Promise<number> {\n return (await this.read()).voltage;\n }\n}\n\n/** @hideconstructor */\nexport class RelayPower {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Reads the current state of the relay.\n * @returns The current relay state.\n */\n read(): Promise<RelayState> {\n return this.fetch(`/power/relay/${this.id}`, { schema: relayState });\n }\n\n /**\n * Reads the current drawn through the relay.\n * @returns The current drawn through the relay.\n */\n async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AAA,GAAA,EAM7D,MAA4B,CAC1B,OAAO,KAAK,MAAM,gBAAgB,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,CAOtE,MAAM,cAAgC,CACpC,OAAQ,MAAM,KAAK,MAAM,EAAE"}
package/build/power.d.cts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { t as AnalogOutputLevel } from "./common-DAOxX-Zx.cjs";
2
- import "./management-BIDVdvlQ.cjs";
3
- import { a as RelayPower, c as UsbConfiguration, i as PowerApi, l as UsbState, n as DutConfiguration, o as RelayState, r as DutState, s as Usb, t as Dut } from "./power-CSNvBKgh.cjs";
2
+ import { a as RelayPower, c as UsbConfiguration, i as PowerApi, l as UsbState, n as DutConfiguration, o as RelayState, r as DutState, s as Usb, t as Dut } from "./power-CDwKKL2S.cjs";
4
3
  export { AnalogOutputLevel, Dut, DutConfiguration, DutState, PowerApi, RelayPower, RelayState, Usb, UsbConfiguration, UsbState };
package/build/power.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { t as AnalogOutputLevel } from "./common-SiysH9tt.mjs";
2
2
  import "./management-CwNeejKZ.mjs";
3
- import { a as RelayPower, c as UsbConfiguration, i as PowerApi, l as UsbState, n as DutConfiguration, o as RelayState, r as DutState, s as Usb, t as Dut } from "./power-Cefqtt9P.mjs";
3
+ import { a as RelayPower, c as UsbConfiguration, i as PowerApi, l as UsbState, n as DutConfiguration, o as RelayState, r as DutState, s as Usb, t as Dut } from "./power-DWFus9vw.mjs";
4
4
  export { AnalogOutputLevel, Dut, DutConfiguration, DutState, PowerApi, RelayPower, RelayState, Usb, UsbConfiguration, UsbState };
@@ -1 +1 @@
1
- {"version":3,"file":"relays-BK2uL5i_.cjs","names":["v","fetch: UpFetch","id: number"],"sources":["../src/api/relays.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst state = v.picklist(['open', 'closed']);\nexport type State = v.InferOutput<typeof state>;\nconst states = v.array(state);\nexport type States = v.InferOutput<typeof states>;\nconst relayState = v.object({ state: state });\n\nconst action = v.picklist(['open', 'close']);\nconst relayAction = v.object({ action: action });\ntype RelayAction = v.InferOutput<typeof relayAction>;\n\n/** @hideconstructor */\nexport class RelaysApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets all relays to their default state.\n */\n reset() {\n return this.fetch('/relays/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific relay by id.\n * @param id The relay id.\n * @returns The relay instance.\n */\n relay(id: number): Relay {\n return new Relay(this.fetch, id);\n }\n\n /**\n * Reads the state of all relays.\n * @returns The state of all relays.\n */\n read(): Promise<States> {\n return this.fetch(`/relays`, { schema: states });\n }\n\n /**\n * Opens all the relays.\n * @returns The new state of all relays.\n */\n open(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: states,\n });\n }\n\n /**\n * Closes all the relays.\n * @returns The new state of all relays.\n */\n close(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: states,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Relay {\n constructor(\n private readonly fetch: UpFetch,\n /**\n * The relay id.\n */\n public readonly id: number,\n ) {}\n\n /**\n * Reads the state of the relay.\n * @returns The relay state.\n */\n async read(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, { schema: relayState })).state;\n }\n\n /**\n * Returns whether the relay is open.\n * @returns True if the relay is open, false otherwise.\n */\n async is_open(): Promise<boolean> {\n return (await this.read()) === 'open';\n }\n\n /**\n * Returns whether the relay is closed.\n * @returns True if the relay is closed, false otherwise.\n */\n async is_closed(): Promise<boolean> {\n return (await this.read()) === 'closed';\n }\n\n /**\n * Opens the relay.\n * @returns The new relay state.\n */\n async open(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n\n /**\n * Closes the relay.\n * @returns The new relay state.\n */\n async close(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n}\n"],"mappings":"0EAGA,MAAM,EAAQA,EAAE,SAAS,CAAC,OAAQ,SAAS,CAAC,CAEtC,EAASA,EAAE,MAAM,EAAM,CAEvB,EAAaA,EAAE,OAAO,CAAS,QAAO,CAAC,CAEvC,EAASA,EAAE,SAAS,CAAC,OAAQ,QAAQ,CAAC,CACxBA,EAAE,OAAO,CAAU,SAAQ,CAAC,CAIhD,IAAa,EAAb,KAAuB,CACrB,YAAY,EAAiC,CAAhB,KAAA,MAAA,EAK7B,OAAQ,CACN,OAAO,KAAK,MAAM,gBAAiB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQjF,MAAM,EAAmB,CACvB,OAAO,IAAI,EAAM,KAAK,MAAO,EAAG,CAOlC,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAAE,OAAQ,EAAQ,CAAC,CAOlD,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,CAOJ,OAAyB,CACvB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,GAKO,EAAb,KAAmB,CACjB,YACE,EAIA,EACA,CALiB,KAAA,MAAA,EAID,KAAA,GAAA,EAOlB,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,EAAE,MAO1E,MAAM,SAA4B,CAChC,OAAQ,MAAM,KAAK,MAAM,GAAM,OAOjC,MAAM,WAA8B,CAClC,OAAQ,MAAM,KAAK,MAAM,GAAM,SAOjC,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,EACC,MAOL,MAAM,OAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,EACC"}
1
+ {"version":3,"file":"relays-BK2uL5i_.cjs","names":["v"],"sources":["../src/api/relays.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst state = v.picklist(['open', 'closed']);\nexport type State = v.InferOutput<typeof state>;\nconst states = v.array(state);\nexport type States = v.InferOutput<typeof states>;\nconst relayState = v.object({ state: state });\n\nconst action = v.picklist(['open', 'close']);\nconst relayAction = v.object({ action: action });\ntype RelayAction = v.InferOutput<typeof relayAction>;\n\n/** @hideconstructor */\nexport class RelaysApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets all relays to their default state.\n */\n reset() {\n return this.fetch('/relays/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific relay by id.\n * @param id The relay id.\n * @returns The relay instance.\n */\n relay(id: number): Relay {\n return new Relay(this.fetch, id);\n }\n\n /**\n * Reads the state of all relays.\n * @returns The state of all relays.\n */\n read(): Promise<States> {\n return this.fetch(`/relays`, { schema: states });\n }\n\n /**\n * Opens all the relays.\n * @returns The new state of all relays.\n */\n open(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: states,\n });\n }\n\n /**\n * Closes all the relays.\n * @returns The new state of all relays.\n */\n close(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: states,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Relay {\n constructor(\n private readonly fetch: UpFetch,\n /**\n * The relay id.\n */\n public readonly id: number,\n ) {}\n\n /**\n * Reads the state of the relay.\n * @returns The relay state.\n */\n async read(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, { schema: relayState })).state;\n }\n\n /**\n * Returns whether the relay is open.\n * @returns True if the relay is open, false otherwise.\n */\n async is_open(): Promise<boolean> {\n return (await this.read()) === 'open';\n }\n\n /**\n * Returns whether the relay is closed.\n * @returns True if the relay is closed, false otherwise.\n */\n async is_closed(): Promise<boolean> {\n return (await this.read()) === 'closed';\n }\n\n /**\n * Opens the relay.\n * @returns The new relay state.\n */\n async open(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n\n /**\n * Closes the relay.\n * @returns The new relay state.\n */\n async close(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n}\n"],"mappings":"0EAGA,MAAM,EAAQA,EAAE,SAAS,CAAC,OAAQ,SAAS,CAAC,CAEtC,EAASA,EAAE,MAAM,EAAM,CAEvB,EAAaA,EAAE,OAAO,CAAS,QAAO,CAAC,CAEvC,EAASA,EAAE,SAAS,CAAC,OAAQ,QAAQ,CAAC,CACxBA,EAAE,OAAO,CAAU,SAAQ,CAAC,CAIhD,IAAa,EAAb,KAAuB,CACrB,YAAY,EAAiC,CAAhB,KAAA,MAAA,EAK7B,OAAQ,CACN,OAAO,KAAK,MAAM,gBAAiB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQjF,MAAM,EAAmB,CACvB,OAAO,IAAI,EAAM,KAAK,MAAO,EAAG,CAOlC,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAAE,OAAQ,EAAQ,CAAC,CAOlD,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,CAOJ,OAAyB,CACvB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,GAKO,EAAb,KAAmB,CACjB,YACE,EAIA,EACA,CALiB,KAAA,MAAA,EAID,KAAA,GAAA,EAOlB,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,EAAE,MAO1E,MAAM,SAA4B,CAChC,OAAQ,MAAM,KAAK,MAAM,GAAM,OAOjC,MAAM,WAA8B,CAClC,OAAQ,MAAM,KAAK,MAAM,GAAM,SAOjC,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,EACC,MAOL,MAAM,OAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,EACC"}
@@ -1 +1 @@
1
- {"version":3,"file":"relays-CqglfFwF.mjs","names":["fetch: UpFetch","id: number"],"sources":["../src/api/relays.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst state = v.picklist(['open', 'closed']);\nexport type State = v.InferOutput<typeof state>;\nconst states = v.array(state);\nexport type States = v.InferOutput<typeof states>;\nconst relayState = v.object({ state: state });\n\nconst action = v.picklist(['open', 'close']);\nconst relayAction = v.object({ action: action });\ntype RelayAction = v.InferOutput<typeof relayAction>;\n\n/** @hideconstructor */\nexport class RelaysApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets all relays to their default state.\n */\n reset() {\n return this.fetch('/relays/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific relay by id.\n * @param id The relay id.\n * @returns The relay instance.\n */\n relay(id: number): Relay {\n return new Relay(this.fetch, id);\n }\n\n /**\n * Reads the state of all relays.\n * @returns The state of all relays.\n */\n read(): Promise<States> {\n return this.fetch(`/relays`, { schema: states });\n }\n\n /**\n * Opens all the relays.\n * @returns The new state of all relays.\n */\n open(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: states,\n });\n }\n\n /**\n * Closes all the relays.\n * @returns The new state of all relays.\n */\n close(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: states,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Relay {\n constructor(\n private readonly fetch: UpFetch,\n /**\n * The relay id.\n */\n public readonly id: number,\n ) {}\n\n /**\n * Reads the state of the relay.\n * @returns The relay state.\n */\n async read(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, { schema: relayState })).state;\n }\n\n /**\n * Returns whether the relay is open.\n * @returns True if the relay is open, false otherwise.\n */\n async is_open(): Promise<boolean> {\n return (await this.read()) === 'open';\n }\n\n /**\n * Returns whether the relay is closed.\n * @returns True if the relay is closed, false otherwise.\n */\n async is_closed(): Promise<boolean> {\n return (await this.read()) === 'closed';\n }\n\n /**\n * Opens the relay.\n * @returns The new relay state.\n */\n async open(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n\n /**\n * Closes the relay.\n * @returns The new relay state.\n */\n async close(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n}\n"],"mappings":"0BAGA,MAAM,EAAQ,EAAE,SAAS,CAAC,OAAQ,SAAS,CAAC,CAEtC,EAAS,EAAE,MAAM,EAAM,CAEvB,EAAa,EAAE,OAAO,CAAS,QAAO,CAAC,CAEvC,EAAS,EAAE,SAAS,CAAC,OAAQ,QAAQ,CAAC,CACxB,EAAE,OAAO,CAAU,SAAQ,CAAC,CAIhD,IAAa,EAAb,KAAuB,CACrB,YAAY,EAAiC,CAAhB,KAAA,MAAA,EAK7B,OAAQ,CACN,OAAO,KAAK,MAAM,gBAAiB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQjF,MAAM,EAAmB,CACvB,OAAO,IAAI,EAAM,KAAK,MAAO,EAAG,CAOlC,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAAE,OAAQ,EAAQ,CAAC,CAOlD,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,CAOJ,OAAyB,CACvB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,GAKO,EAAb,KAAmB,CACjB,YACE,EAIA,EACA,CALiB,KAAA,MAAA,EAID,KAAA,GAAA,EAOlB,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,EAAE,MAO1E,MAAM,SAA4B,CAChC,OAAQ,MAAM,KAAK,MAAM,GAAM,OAOjC,MAAM,WAA8B,CAClC,OAAQ,MAAM,KAAK,MAAM,GAAM,SAOjC,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,EACC,MAOL,MAAM,OAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,EACC"}
1
+ {"version":3,"file":"relays-CqglfFwF.mjs","names":[],"sources":["../src/api/relays.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst state = v.picklist(['open', 'closed']);\nexport type State = v.InferOutput<typeof state>;\nconst states = v.array(state);\nexport type States = v.InferOutput<typeof states>;\nconst relayState = v.object({ state: state });\n\nconst action = v.picklist(['open', 'close']);\nconst relayAction = v.object({ action: action });\ntype RelayAction = v.InferOutput<typeof relayAction>;\n\n/** @hideconstructor */\nexport class RelaysApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets all relays to their default state.\n */\n reset() {\n return this.fetch('/relays/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific relay by id.\n * @param id The relay id.\n * @returns The relay instance.\n */\n relay(id: number): Relay {\n return new Relay(this.fetch, id);\n }\n\n /**\n * Reads the state of all relays.\n * @returns The state of all relays.\n */\n read(): Promise<States> {\n return this.fetch(`/relays`, { schema: states });\n }\n\n /**\n * Opens all the relays.\n * @returns The new state of all relays.\n */\n open(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: states,\n });\n }\n\n /**\n * Closes all the relays.\n * @returns The new state of all relays.\n */\n close(): Promise<States> {\n return this.fetch(`/relays`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: states,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Relay {\n constructor(\n private readonly fetch: UpFetch,\n /**\n * The relay id.\n */\n public readonly id: number,\n ) {}\n\n /**\n * Reads the state of the relay.\n * @returns The relay state.\n */\n async read(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, { schema: relayState })).state;\n }\n\n /**\n * Returns whether the relay is open.\n * @returns True if the relay is open, false otherwise.\n */\n async is_open(): Promise<boolean> {\n return (await this.read()) === 'open';\n }\n\n /**\n * Returns whether the relay is closed.\n * @returns True if the relay is closed, false otherwise.\n */\n async is_closed(): Promise<boolean> {\n return (await this.read()) === 'closed';\n }\n\n /**\n * Opens the relay.\n * @returns The new relay state.\n */\n async open(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'open' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n\n /**\n * Closes the relay.\n * @returns The new relay state.\n */\n async close(): Promise<State> {\n return (await this.fetch(`/relays/${this.id}`, {\n method: 'POST',\n body: { action: 'close' } satisfies RelayAction,\n schema: relayState,\n }))\n .state;\n }\n}\n"],"mappings":"0BAGA,MAAM,EAAQ,EAAE,SAAS,CAAC,OAAQ,SAAS,CAAC,CAEtC,EAAS,EAAE,MAAM,EAAM,CAEvB,EAAa,EAAE,OAAO,CAAS,QAAO,CAAC,CAEvC,EAAS,EAAE,SAAS,CAAC,OAAQ,QAAQ,CAAC,CACxB,EAAE,OAAO,CAAU,SAAQ,CAAC,CAIhD,IAAa,EAAb,KAAuB,CACrB,YAAY,EAAiC,CAAhB,KAAA,MAAA,EAK7B,OAAQ,CACN,OAAO,KAAK,MAAM,gBAAiB,CAAE,OAAQ,OAAQ,kBAAqB,GAAI,CAAC,CAQjF,MAAM,EAAmB,CACvB,OAAO,IAAI,EAAM,KAAK,MAAO,EAAG,CAOlC,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAAE,OAAQ,EAAQ,CAAC,CAOlD,MAAwB,CACtB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,CAOJ,OAAyB,CACvB,OAAO,KAAK,MAAM,UAAW,CAC3B,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,GAKO,EAAb,KAAmB,CACjB,YACE,EAIA,EACA,CALiB,KAAA,MAAA,EAID,KAAA,GAAA,EAOlB,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAAE,OAAQ,EAAY,CAAC,EAAE,MAO1E,MAAM,SAA4B,CAChC,OAAQ,MAAM,KAAK,MAAM,GAAM,OAOjC,MAAM,WAA8B,CAClC,OAAQ,MAAM,KAAK,MAAM,GAAM,SAOjC,MAAM,MAAuB,CAC3B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,OAAQ,CACxB,OAAQ,EACT,CAAC,EACC,MAOL,MAAM,OAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,WAAW,KAAK,KAAM,CAC7C,OAAQ,OACR,KAAM,CAAE,OAAQ,QAAS,CACzB,OAAQ,EACT,CAAC,EACC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikalogic/at1000",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Ikalogic AT1000 API",
5
5
  "type": "module",
6
6
  "main": "./build/node.cjs",
@@ -104,18 +104,18 @@
104
104
  "dependencies": {
105
105
  "dns-packet": "^5.6.1",
106
106
  "ip-address": "^10.1.0",
107
- "up-fetch": "^2.5.0",
108
- "valibot": "^1.1.0"
107
+ "up-fetch": "^2.5.1",
108
+ "valibot": "^1.2.0"
109
109
  },
110
110
  "devDependencies": {
111
111
  "@arethetypeswrong/core": "^0.18.2",
112
- "@types/bun": "^1.3.3",
112
+ "@types/bun": "^1.3.6",
113
113
  "@types/dns-packet": "^5.6.5",
114
- "@types/node": "^24.10.1",
114
+ "@types/node": "^25.0.9",
115
115
  "@typhonjs-typedoc/typedoc-pkg": "^0.4.0",
116
- "publint": "^0.3.15",
117
- "tsdown": "^0.16.6",
118
- "typedoc": "^0.28.14",
116
+ "publint": "^0.3.16",
117
+ "tsdown": "^0.19.0",
118
+ "typedoc": "^0.28.16",
119
119
  "typescript": "^5.9.3"
120
120
  },
121
121
  "typedocOptions": {
@@ -1,2 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./com-D6zvDfVV.cjs`),n=require(`./gpio-BnyLCBEg.cjs`),r=require(`./hmi-CnTa8kMx.cjs`),i=require(`./management-DHD60Xrp.cjs`),a=require(`./power-PrmE0ai2.cjs`),o=require(`./relays-BK2uL5i_.cjs`);let s=require(`up-fetch`);var c=`0.1.8`,l=class e{host;device;fetch;com;hmi;gpio;management;power;relays;constructor(e,c){this.host=e,this.device=c,this.fetch=(0,s.up)(fetch,()=>({baseUrl:`http://${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`}throw typeof n==`object`&&[`code`,`message`,`suggestion`,`path`].every(e=>e in n)?Error(`${n.message} (${n.code})\n Suggestion: ${n.suggestion}\n Path: ${n.path}`):Error(`API request to ${t.method} ${e.url} failed with status ${e.status}: ${typeof n==`string`?n:JSON.stringify(n)}`)}})),this.com=new t.n(this.fetch),this.hmi=new r.n(this.fetch),this.gpio=new n.r(this.fetch,this.device),this.management=new i.n(this.fetch),this.power=new a.n(this.fetch,this.device),this.relays=new o.n(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 t=>new e(t,await new i.n((0,s.up)(fetch,()=>({baseUrl:`http://${t}/v0`,timeout:1e3}))).device())};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
2
- //# sourceMappingURL=at1000-CgxthtV5.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at1000-CgxthtV5.cjs","names":["errorData: any","ComApi","HmiApi","GpioApi","ManagementApi","PowerApi","RelaysApi"],"sources":["../package.json","../src/at1000.ts"],"sourcesContent":["{\n \"name\": \"@ikalogic/at1000\",\n \"version\": \"0.1.8\",\n \"description\": \"Ikalogic AT1000 API\",\n \"type\": \"module\",\n \"main\": \"./build/node.cjs\",\n \"module\": \"./build/node.mjs\",\n \"types\": \"./build/node.d.cts\",\n \"license\": \"MIT\",\n \"homepage\": \"https://ikalogic.com/test-sequencers/at1000/intro/\",\n \"readme\": \"README.md\",\n \"files\": [\n \"build\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./build/node.d.mts\",\n \"browser\": \"./build/browser.mjs\",\n \"node\": \"./build/node.mjs\",\n \"default\": \"./build/node.mjs\"\n },\n \"require\": {\n \"types\": \"./build/node.d.cts\",\n \"browser\": \"./build/browser.cjs\",\n \"node\": \"./build/node.cjs\",\n \"default\": \"./build/node.cjs\"\n }\n },\n \"./com\": {\n \"import\": {\n \"types\": \"./build/com.d.mts\",\n \"default\": \"./build/com.mjs\"\n },\n \"require\": {\n \"types\": \"./build/com.d.cts\",\n \"default\": \"./build/com.cjs\"\n }\n },\n \"./gpio\": {\n \"import\": {\n \"types\": \"./build/gpio.d.mts\",\n \"default\": \"./build/gpio.mjs\"\n },\n \"require\": {\n \"types\": \"./build/gpio.d.cts\",\n \"default\": \"./build/gpio.cjs\"\n }\n },\n \"./hmi\": {\n \"import\": {\n \"types\": \"./build/hmi.d.mts\",\n \"default\": \"./build/hmi.mjs\"\n },\n \"require\": {\n \"types\": \"./build/hmi.d.cts\",\n \"default\": \"./build/hmi.cjs\"\n }\n },\n \"./management\": {\n \"import\": {\n \"types\": \"./build/management.d.mts\",\n \"default\": \"./build/management.mjs\"\n },\n \"require\": {\n \"types\": \"./build/management.d.cts\",\n \"default\": \"./build/management.cjs\"\n }\n },\n \"./power\": {\n \"import\": {\n \"types\": \"./build/power.d.mts\",\n \"default\": \"./build/power.mjs\"\n },\n \"require\": {\n \"types\": \"./build/power.d.cts\",\n \"default\": \"./build/power.cjs\"\n }\n },\n \"./relays\": {\n \"import\": {\n \"types\": \"./build/relays.d.mts\",\n \"default\": \"./build/relays.mjs\"\n },\n \"require\": {\n \"types\": \"./build/relays.d.cts\",\n \"default\": \"./build/relays.cjs\"\n }\n },\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"build\": \"bun --bun tsdown && bun --bun publint\",\n \"check\": \"bun run typecheck && bun --bun oxlint --type-aware --deny-warnings\",\n \"dev\": \"bun --bun tsdown --watch\",\n \"typecheck\": \"bun --bun tsc --noEmit\",\n \"release\": \"bun publish\",\n \"test\": \"bun test --coverage\",\n \"docs\": \"bun typedoc-pkg -o build/docs\"\n },\n \"dependencies\": {\n \"dns-packet\": \"^5.6.1\",\n \"ip-address\": \"^10.1.0\",\n \"up-fetch\": \"^2.5.0\",\n \"valibot\": \"^1.1.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/core\": \"^0.18.2\",\n \"@types/bun\": \"^1.3.3\",\n \"@types/dns-packet\": \"^5.6.5\",\n \"@types/node\": \"^24.10.1\",\n \"@typhonjs-typedoc/typedoc-pkg\": \"^0.4.0\",\n \"publint\": \"^0.3.15\",\n \"tsdown\": \"^0.16.6\",\n \"typedoc\": \"^0.28.14\",\n \"typescript\": \"^5.9.3\"\n },\n \"typedocOptions\": {\n \"out\": \"build/docs\",\n \"entryPoints\": [\n \"./src/browser.ts\",\n \"./src/node.ts\",\n \"./src/api/*\"\n ]\n }\n}\n","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 Device, ManagementApi } from './api/management';\nimport { PowerApi } from './api/power';\nimport { RelaysApi } from './api/relays';\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 device: Device;\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, device: Device) {\n this.host = host;\n this.device = device;\n\n this.fetch = up(\n fetch,\n () => ({\n baseUrl: `http://${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 throw new Error(\n `${errorData.message} (${errorData.code})\\n Suggestion: ${errorData.suggestion}\\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.device);\n this.management = new ManagementApi(this.fetch);\n this.power = new PowerApi(this.fetch, this.device);\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://${host}/v0`, timeout: 1000 })),\n );\n const device = await management.device();\n\n return new AT1000Base(host, device);\n };\n}\n"],"mappings":"qRAEa,QCQA,EAAb,MAAa,CAAW,CAItB,KAIA,OAEA,MAIA,IAIA,IAIA,KAIA,WAIA,MAIA,OAEA,YAAY,EAAc,EAAgB,CACxC,KAAK,KAAO,EACZ,KAAK,OAAS,EAEd,KAAK,OAAA,EAAA,EAAA,IACH,WACO,CACL,QAAS,UAAU,KAAK,KAAK,KAC7B,QAAS,IACT,cAAe,MAAO,EAAU,IAAY,CAC1C,IAAIA,EACE,EAAc,EAAS,QAAQ,IAAI,eAAe,CACxD,GAAI,CACF,AAGE,EAHE,GAAa,SAAS,mBAAmB,CAC/B,MAAM,EAAS,MAAM,CAErB,MAAM,EAAS,MAAM,MAE7B,CACN,EAAY,gCAYd,MARE,OAAO,GAAc,UAClB,CAAC,OAAQ,UAAW,aAAc,OAAO,CAAC,MAAO,GAAQ,KAAO,EAAU,CAEnE,MACR,GAAG,EAAU,QAAQ,IAAI,EAAU,KAAK,qBAAqB,EAAU,WAAW,cAAc,EAAU,OAC3G,CAGO,MACR,kBAAkB,EAAQ,OAAO,GAAG,EAAS,IAAI,sBAAsB,EAAS,OAAO,IACrF,OAAO,GAAc,SAAW,EAAY,KAAK,UAAU,EAAU,GAExE,EAEJ,EACF,CAED,KAAK,IAAM,IAAIC,EAAAA,EAAO,KAAK,MAAM,CACjC,KAAK,IAAM,IAAIC,EAAAA,EAAO,KAAK,MAAM,CACjC,KAAK,KAAO,IAAIC,EAAAA,EAAQ,KAAK,MAAO,KAAK,OAAO,CAChD,KAAK,WAAa,IAAIC,EAAAA,EAAc,KAAK,MAAM,CAC/C,KAAK,MAAQ,IAAIC,EAAAA,EAAS,KAAK,MAAO,KAAK,OAAO,CAClD,KAAK,OAAS,IAAIC,EAAAA,EAAU,KAAK,MAAM,CAGzC,MAAM,OAAQ,CACZ,MAAM,KAAK,IAAI,OAAO,CACtB,MAAM,KAAK,IAAI,OAAO,CACtB,MAAM,KAAK,KAAK,OAAO,CACvB,MAAM,KAAK,MAAM,OAAO,CACxB,MAAM,KAAK,OAAO,OAAO,CAG3B,OAAc,OAAS,KAAO,IAOrB,IAAI,EAAW,EAFP,MAHI,IAAIF,EAAAA,GAAAA,EAAAA,EAAAA,IAClB,WAAc,CAAE,QAAS,UAAU,EAAK,KAAM,QAAS,IAAM,EAAE,CACnE,CAC+B,QAAQ,CAEL"}
@@ -1,2 +0,0 @@
1
- import{n as e}from"./com-Bq-d2n2_.mjs";import{r as t}from"./gpio-bjzKV_Vy.mjs";import{n}from"./hmi-CTx2jfxU.mjs";import{n as r}from"./management-BKLSOMbM.mjs";import{n as i}from"./power-hwld3j5a.mjs";import{n as a}from"./relays-CqglfFwF.mjs";import{up as o}from"up-fetch";var s=`0.1.8`,c=class s{host;device;fetch;com;hmi;gpio;management;power;relays;constructor(s,c){this.host=s,this.device=c,this.fetch=o(fetch,()=>({baseUrl:`http://${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`}throw typeof n==`object`&&[`code`,`message`,`suggestion`,`path`].every(e=>e in n)?Error(`${n.message} (${n.code})\n Suggestion: ${n.suggestion}\n Path: ${n.path}`):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.device),this.management=new r(this.fetch),this.power=new i(this.fetch,this.device),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://${e}/v0`,timeout:1e3}))).device())};export{s as n,c as t};
2
- //# sourceMappingURL=at1000-zvuVNh5z.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at1000-zvuVNh5z.mjs","names":["errorData: any"],"sources":["../package.json","../src/at1000.ts"],"sourcesContent":["{\n \"name\": \"@ikalogic/at1000\",\n \"version\": \"0.1.8\",\n \"description\": \"Ikalogic AT1000 API\",\n \"type\": \"module\",\n \"main\": \"./build/node.cjs\",\n \"module\": \"./build/node.mjs\",\n \"types\": \"./build/node.d.cts\",\n \"license\": \"MIT\",\n \"homepage\": \"https://ikalogic.com/test-sequencers/at1000/intro/\",\n \"readme\": \"README.md\",\n \"files\": [\n \"build\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./build/node.d.mts\",\n \"browser\": \"./build/browser.mjs\",\n \"node\": \"./build/node.mjs\",\n \"default\": \"./build/node.mjs\"\n },\n \"require\": {\n \"types\": \"./build/node.d.cts\",\n \"browser\": \"./build/browser.cjs\",\n \"node\": \"./build/node.cjs\",\n \"default\": \"./build/node.cjs\"\n }\n },\n \"./com\": {\n \"import\": {\n \"types\": \"./build/com.d.mts\",\n \"default\": \"./build/com.mjs\"\n },\n \"require\": {\n \"types\": \"./build/com.d.cts\",\n \"default\": \"./build/com.cjs\"\n }\n },\n \"./gpio\": {\n \"import\": {\n \"types\": \"./build/gpio.d.mts\",\n \"default\": \"./build/gpio.mjs\"\n },\n \"require\": {\n \"types\": \"./build/gpio.d.cts\",\n \"default\": \"./build/gpio.cjs\"\n }\n },\n \"./hmi\": {\n \"import\": {\n \"types\": \"./build/hmi.d.mts\",\n \"default\": \"./build/hmi.mjs\"\n },\n \"require\": {\n \"types\": \"./build/hmi.d.cts\",\n \"default\": \"./build/hmi.cjs\"\n }\n },\n \"./management\": {\n \"import\": {\n \"types\": \"./build/management.d.mts\",\n \"default\": \"./build/management.mjs\"\n },\n \"require\": {\n \"types\": \"./build/management.d.cts\",\n \"default\": \"./build/management.cjs\"\n }\n },\n \"./power\": {\n \"import\": {\n \"types\": \"./build/power.d.mts\",\n \"default\": \"./build/power.mjs\"\n },\n \"require\": {\n \"types\": \"./build/power.d.cts\",\n \"default\": \"./build/power.cjs\"\n }\n },\n \"./relays\": {\n \"import\": {\n \"types\": \"./build/relays.d.mts\",\n \"default\": \"./build/relays.mjs\"\n },\n \"require\": {\n \"types\": \"./build/relays.d.cts\",\n \"default\": \"./build/relays.cjs\"\n }\n },\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"build\": \"bun --bun tsdown && bun --bun publint\",\n \"check\": \"bun run typecheck && bun --bun oxlint --type-aware --deny-warnings\",\n \"dev\": \"bun --bun tsdown --watch\",\n \"typecheck\": \"bun --bun tsc --noEmit\",\n \"release\": \"bun publish\",\n \"test\": \"bun test --coverage\",\n \"docs\": \"bun typedoc-pkg -o build/docs\"\n },\n \"dependencies\": {\n \"dns-packet\": \"^5.6.1\",\n \"ip-address\": \"^10.1.0\",\n \"up-fetch\": \"^2.5.0\",\n \"valibot\": \"^1.1.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/core\": \"^0.18.2\",\n \"@types/bun\": \"^1.3.3\",\n \"@types/dns-packet\": \"^5.6.5\",\n \"@types/node\": \"^24.10.1\",\n \"@typhonjs-typedoc/typedoc-pkg\": \"^0.4.0\",\n \"publint\": \"^0.3.15\",\n \"tsdown\": \"^0.16.6\",\n \"typedoc\": \"^0.28.14\",\n \"typescript\": \"^5.9.3\"\n },\n \"typedocOptions\": {\n \"out\": \"build/docs\",\n \"entryPoints\": [\n \"./src/browser.ts\",\n \"./src/node.ts\",\n \"./src/api/*\"\n ]\n }\n}\n","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 Device, ManagementApi } from './api/management';\nimport { PowerApi } from './api/power';\nimport { RelaysApi } from './api/relays';\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 device: Device;\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, device: Device) {\n this.host = host;\n this.device = device;\n\n this.fetch = up(\n fetch,\n () => ({\n baseUrl: `http://${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 throw new Error(\n `${errorData.message} (${errorData.code})\\n Suggestion: ${errorData.suggestion}\\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.device);\n this.management = new ManagementApi(this.fetch);\n this.power = new PowerApi(this.fetch, this.device);\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://${host}/v0`, timeout: 1000 })),\n );\n const device = await management.device();\n\n return new AT1000Base(host, device);\n };\n}\n"],"mappings":"sRAEa,QCQA,EAAb,MAAa,CAAW,CAItB,KAIA,OAEA,MAIA,IAIA,IAIA,KAIA,WAIA,MAIA,OAEA,YAAY,EAAc,EAAgB,CACxC,KAAK,KAAO,EACZ,KAAK,OAAS,EAEd,KAAK,MAAQ,EACX,WACO,CACL,QAAS,UAAU,KAAK,KAAK,KAC7B,QAAS,IACT,cAAe,MAAO,EAAU,IAAY,CAC1C,IAAIA,EACE,EAAc,EAAS,QAAQ,IAAI,eAAe,CACxD,GAAI,CACF,AAGE,EAHE,GAAa,SAAS,mBAAmB,CAC/B,MAAM,EAAS,MAAM,CAErB,MAAM,EAAS,MAAM,MAE7B,CACN,EAAY,gCAYd,MARE,OAAO,GAAc,UAClB,CAAC,OAAQ,UAAW,aAAc,OAAO,CAAC,MAAO,GAAQ,KAAO,EAAU,CAEnE,MACR,GAAG,EAAU,QAAQ,IAAI,EAAU,KAAK,qBAAqB,EAAU,WAAW,cAAc,EAAU,OAC3G,CAGO,MACR,kBAAkB,EAAQ,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