Maxim Prokhorov
1ab136cbdf
webui(build): error tracing for the file stream pipeline
...
usually, errors of the build script itself of b/c of file access
lint is called separately, only build errors would be shown
esbuild opts out of too much syntax checks, usually breaking js
execution instead and / or when referenced modules cannot be loaded
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
f98565e528
webui(build): missing builder readme.md
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
a6fa8c8d8b
webui(build): lint javascript & html before gulp build
...
reproduce cli calls in js api, do not wait for ci to run these
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
6acb8c5a16
webui(build): through2 -> node:stream Transform
...
drop local dependency on through2 in favour of node:stream
but, still ensure that things work for gulp-style File streams
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
108ee655fe
webui(build): pipeline instead of pipe
...
ref.
https://github.com/gulpjs/gulp/issues/2812
https://nodejs.org/en/learn/modules/how-to-use-streams#how-to-operate-with-streams
https://nodejs.org/en/learn/modules/how-to-use-streams#pipeline
while the gulp issue refers to this as a workaround, this is actually the
proper way to handle streams, merging streams and applying transformations
webserver code still spawns the pipe(line) unconditionally, though
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
2d33cc8da1
webui(build): yet another vite server ghsa bump
...
ref. npm-audit-fix and https://github.com/advisories/GHSA-x574-m823-4x7w
note that vite server is not used in webui_serve
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
6384955e04
webui(build): clone-stats override for node-22+
...
avoid deprecation warning from incorrectly cloned fs.Stats{}
https://www.npmjs.com/package/clone-stats-node22
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
a593009fbd
webui(settings): clarify dataset[...] and query for data-...
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
0e4ae21368
webui(lint): explicit file patterns
...
eslint v9 replaces empty pattern list with a ['.']
ignore known directories when running locally
explicit paths for eslint in the ci script
2025-03-19 23:56:03 +03:00
Maxim Prokhorov
d16fd98006
webui(build): bump npm dependencies
2025-03-19 23:55:52 +03:00
Maxim Prokhorov
1112cf47c3
mqtt(common): missing header ref
2025-03-19 06:15:23 +03:00
Maxim Prokhorov
edd5481388
webui: rebuild blobs
2025-03-19 04:42:34 +03:00
Maxim Prokhorov
efffead793
webui(settings): datalist enumerable for ntp timezones
...
making use of the feature to programatically generate offset options
additionally, saves 38bytes in the resulting blob
2025-03-19 04:41:06 +03:00
Maxim Prokhorov
1d2503a19e
webui(settings): enumerables for both datalist & select
...
generalize <options> handlers, providing same entrypoint for both
2025-03-19 04:40:05 +03:00
Maxim Prokhorov
f2153f4a38
webui(settings): allow string id mapping in enumerables
...
store names as {id: name, ...}, not [{id, name}, ...]
entries appear the same way, and js stores keys in the insertion order
fixup numbers converted to strings
fixup select options typing to accept [string, string] instead of [number, string]
2025-03-19 04:38:39 +03:00
Maxim Prokhorov
d7af980bdf
test(webui): enumerables spec extended
...
minimum viable checks for ranges and manually created entries
listen to and trigger events for span & select enumerable elements
2025-03-19 00:05:16 +03:00
Maxim Prokhorov
faf58e9237
sns: allow sensor instance to provide slot id
...
implement i2c address as slot id for the current sensors
ref. #2639
2025-03-18 20:50:02 +03:00
Maxim Prokhorov
58181d21a3
sns: explicit static instantiation
...
avoid yet again falling for ambigious instantiation order
amends 5ff4efd513
2025-03-18 20:47:50 +03:00
Maxim Prokhorov
ceeccce0b1
sns: off-by-one errors
...
mod10 and mod100 should be inclusive (oops)
recover from post vs. pre increment mixup
offset when formatting, store as-is
2025-03-18 04:26:20 +03:00
Maxim Prokhorov
fe08a66819
sns: experiment with magnitude persistent id
...
ref. #2639
global slot to identify specific sensor+num+type+slot combination
for now, not used anywhere but terminal listing
2025-03-18 03:43:43 +03:00
Maxim Prokhorov
cfa17df261
test(dht): consistent values and types
...
mask magnitude for all branches, matched when inlining
accumulate values for checksum without type ambiguity
2025-03-07 15:54:00 +03:00
Maxim Prokhorov
e48dac27b5
test(a02yyu): sample data
...
https://github.com/xoseperez/espurna/pull/2622#issuecomment-2440181937
2025-03-07 15:08:03 +03:00
Maxim Prokhorov
f77544fbd8
test(dht): checksum and dht11
2025-03-06 00:40:00 +03:00
Maxim Prokhorov
4c3122c153
test: fix unused / uninitialized warnings
2025-03-05 23:23:10 +03:00
Maxim Prokhorov
40500b489f
sns(dht): another dht22 variant w/ 12bit values
2025-03-05 23:02:13 +03:00
Maxim Prokhorov
7476793a53
sns(dht): dont overwrite dht22 sign bit
2025-03-05 22:12:42 +03:00
Maxim Prokhorov
abbf7218f4
webui(build): rename files inline
...
note node-22 currently harmless deprecation warning coming from vinyl-fs clone()
2025-03-05 19:09:03 +03:00
Maxim Prokhorov
93dbcb9e31
test(unity): unused function
2025-03-05 18:44:07 +03:00
Maxim Prokhorov
39f2fa14cc
webui(build): bump esbuild & vitest
2025-03-05 18:44:06 +03:00
Maxim Prokhorov
12a6506905
webui(build): bump locked versions
2025-03-05 18:44:06 +03:00
Maxim Prokhorov
f984ec9dbc
libs(delimiter): revert to shared iterator instance
...
old gcc compat, plus stl would work more nicely
2025-03-05 18:44:06 +03:00
Maxim Prokhorov
cc0f3b2d03
sns(dht): merge common dht11 & dht12 calculations
...
notice sign bit in both bytes, apply magnitude mask to integer & scale
nb. technically... dht11 shares dht12 format, but prefer to stay on the integer side
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
305918d5d8
sns(dht): different number representations for dht22
...
sometimes sign-magnitude, sometimes twos-complement
resolve #2638
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
ff6d86c7e5
light(color): fix stateful parser api
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
edb458fac6
test(sch): fix utc offset
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
5ff4efd513
test(sns): voltage magnitude should work
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
180361a89d
test: expected vs. actual stringified
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
824c527064
libs(delimiter): stateless and stateful splitview
...
reference, value, difference and tag metadata
std::find_if needs same type for begin() and end()
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
91fa550018
libs(delimiter): iterate over split view
...
adjust internals to provide .begin(), .end(), and the iterator object itself
since the original class is only forward-going, iterator behaves the same
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
56061ec054
led(api): apply mode through payload string
...
allow to reset to a specific mode without settings reload
similarly, interpret on & off as modes and not just status updates
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
6aaa62fac7
types(span): infer const from T
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
6cc364e04d
led(api): status changes state based on payload
...
do not always reset status when processing payload
allow to pass mode string as payload (e.g revert from from manual mode via mqtt)
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
8e91a34a48
led: constexpr methods instead of temporaries
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
4a4dcaeab5
sch(restore): avoid duplicate actions on matching schedule
...
skip restore::run when action was already executed at least once
(since restore search never returns offset==0 result)
2025-03-05 18:13:33 +03:00
Maxim Prokhorov
0114d69809
led: shared delay logic and schedule checks
2025-03-05 18:13:15 +03:00
Maxim Prokhorov
0033735caa
led(relay): ensure link exists before applying status
2025-03-05 18:13:07 +03:00
Maxim Prokhorov
a189c5f33f
test(delimiter): split and delimiter view
...
using comparison macro for tests referencing string views
move all local code related to unity to a separate object
2025-03-05 18:12:59 +03:00
Maxim Prokhorov
ac86899764
libs(delimiter): split strings using the same utility function
2025-03-05 18:12:47 +03:00
Maxim Prokhorov
8e698ac28b
util(stream): not all 3.x.x streams have peek api
2025-03-05 18:12:39 +03:00
Maxim Prokhorov
1366713896
terminal: typo
2025-01-29 12:47:31 +03:00