Commit Graph

4628 Commits

Author SHA1 Message Date
Maxim Prokhorov
667fe0c5cf docs: changelog github250601 2025-06-01 03:13:03 +03:00
Maxim Prokhorov
4af7e18a2f api: detect not-REST data requests with uncommon params
count every param that was not already handled internally

allow terminal handler to process "line=..." w/ put handler
impl todo and iterate over all available "line=..."s
2025-05-27 04:56:22 +03:00
Maxim Prokhorov
b23851ab77 api: response-stream cannot read from unaligned mem
names() references arbitrary stringview, not string
internal cbuf does not use memcpy_P, but memcpy
2025-05-27 04:56:19 +03:00
Maxim Prokhorov
43eefd6124 webui(build): sync dependencies
build output is the same as before, no need to recreate blobs
attempt to fix clone-stats-node22 name field sometimes appearing in lockfile
2025-05-06 01:08:09 +03:00
Maxim Prokhorov
4b1aadeded lib: consistent writeable -> writable 2025-04-15 20:56:46 +03:00
Maxim Prokhorov
b41a20aa86 webui(build): support type=...;base64
in case there are any unquotable or binary sources

SCRIPT is an odd one per the spec, ignore type=...
as it is describing how minification & bundling is done
2025-04-15 20:43:01 +03:00
Maxim Prokhorov
2bb8f15c76 webui(vite): rename when building
same as gulp, index.${name}.html
2025-04-15 03:09:44 +03:00
Maxim Prokhorov
fd52b590ba doc(readme): badge url should query pre-releases 2025-04-14 23:54:58 +03:00
Maxim Prokhorov
367dca8b05 webui(test): import when paths become available 2025-04-14 23:44:50 +03:00
Maxim Prokhorov
ed60ee02fc webui(build): expect string or string[] as preset arg 2025-04-14 23:26:17 +03:00
Maxim Prokhorov
cadde6dac6 webui(build): shared build & test paths 2025-04-14 23:18:25 +03:00
Maxim Prokhorov
fc5a5f4d40 webui(preset): .env unused 2025-04-14 05:18:25 +03:00
Maxim Prokhorov
4b624a2e99 webui(lib): missing file 2025-04-14 04:56:15 +03:00
Maxim Prokhorov
68631fbbcd webui(build): gulp html modifications should not happen in parallel
Promise.all() does not handle array members in sequence
2025-04-14 04:47:00 +03:00
Maxim Prokhorov
93d7d3986b webui(build): vitest.config.js & shared location imports 2025-04-14 04:08:48 +03:00
Maxim Prokhorov
e7acf9fb6a webui(build): rollup circular dependency
avoid sharing utility funcs through the main module
2025-04-14 04:08:48 +03:00
Maxim Prokhorov
e0cc18b4e9 webui(doc): preset configuration & files 2025-04-14 04:08:48 +03:00
Maxim Prokhorov
144cebf8b9 webui(build): unused esbuild defines 2025-04-14 04:08:48 +03:00
Maxim Prokhorov
f63dfe2b51 webui(build): npm-update 2025-04-14 01:14:13 +03:00
Maxim Prokhorov
0853a8e346 webui(build): .ico -> .svg favicon
initial generation via https://picsvg.com/
> Created by potrace 1.10, written by Peter Selinger 2001-2011

compressed via https://jakearchibald.github.io/svgomg/
2025-04-14 01:14:13 +03:00
Maxim Prokhorov
9dc57878c1 webui(build): build params & vite dev support
- experimental vite dev server support
- gulp webui_build & webui_PRESET -> build
- gulp task params for build and dev server
- bundle sources using rollup in both gulp and vite
- PRESET lib to manage available modules and their constants
  replacing 'define' method of .js code treeshaking
2025-04-14 01:14:13 +03:00
Maxim Prokhorov
a5a65c6a61 webui(build): types and fixup pipeline comment section 2025-04-05 01:03:59 +03:00
Maxim Prokhorov
831e935c7c webui(build): wrap gulp.dest to log outputs
using original function naming, too
2025-04-05 00:24:38 +03:00
Maxim Prokhorov
cbd28d26e4 webui(build): separate stylesheet files per module 2025-04-05 00:24:38 +03:00
Maxim Prokhorov
5152dc9958 webui(template): missing password-reveal click handler 2025-04-04 18:50:57 +03:00
Maxim Prokhorov
70b9843288 webui(debug): local cmdoutput instance & dev log output
avoid awkward `... | null` for the console text elem member var
update handlers to also clear up oldest lines when pushing new ones
2025-04-04 17:13:43 +03:00
Maxim Prokhorov
1697f0193f webui(local): do not attach network event handlers 2025-04-04 17:12:37 +03:00
Maxim Prokhorov
f08f86608f webui(build): adjust mtime based on inline-source
consistent datetime value when rebuilding from the same source
2025-04-03 18:48:01 +03:00
Maxim Prokhorov
60ace03ef3 webui(menu): status highlighted inconsistently 2025-04-03 16:17:00 +03:00
Maxim Prokhorov
31247d4f02 webui(impl): empty callback is always done 2025-04-03 15:57:33 +03:00
Maxim Prokhorov
6d55788b69 webui(impl): noexcept hints for simple data moves 2025-04-03 15:00:35 +03:00
Maxim Prokhorov
401fac953f webui(ws): cache log object reference 2025-04-03 14:51:53 +03:00
Maxim Prokhorov
74f4f48e09 webui(ws): use loop timing when waiting 2025-04-03 14:27:09 +03:00
Maxim Prokhorov
7ced7ebb26 webui(ws): avoid off-by-one length for output
pretend this is a generic 'print' interface and do not fall back to
char buffer output default that injects '\0' at the end
2025-04-03 07:40:21 +03:00
Maxim Prokhorov
9ba2734878 debug(impl): reduce stack usage by not constructing sv
pass message + length to callbacks in all cases
2025-04-03 03:14:31 +03:00
Maxim Prokhorov
221f33566c webui: rebuild blobs 2025-04-03 03:02:12 +03:00
Maxim Prokhorov
a8756c7975 webui(ws): proper type of the callback container element
lists refer to plain funcs, std::func only applies to a single callback
namespace things yet again to fix the original implementation discrepancy
2025-04-03 03:01:05 +03:00
Maxim Prokhorov
cac3e84110 webui(ws): namespace for postponed callbacks 2025-04-03 02:32:38 +03:00
Maxim Prokhorov
7efb72c86e webui(ws): refactored payload storage
- introduce plain constructors for storage container
  pack std::func, vector pointer or vector itself in one union
  streamline main entry to accept just Storage{} instead of vector plus
  iterator stored currently
- allow postponed callback to set json buffer size
  set up small buffers for logging, no need to spawn 3KiB for one entry
  drop the last wsSend usage in onConnected in favour of a callback
- revert 'manual' for all and sequence implementation in favour
  of just one - for a single std::func callback
2025-04-03 02:24:39 +03:00
Maxim Prokhorov
2525d88b04 webui(server): headers helpers 2025-04-03 02:22:54 +03:00
Maxim Prokhorov
db84cdda5e webui(ws): try to contain wsSend to the queue callback
- 'log' payload nesting reduced, just one element (for now)
- move terminal and ws logger into ws helper classes
- 'manual' callback mode to simply allow for ws send window
  by using slightly more complicated loop w/ queue checks, though
2025-04-02 23:03:32 +03:00
Maxim Prokhorov
be46c3fd70 webui(build): rollback to gzip & fix content-encoding
br only works w/ https://... endpoint and abruptly fails on most (if not all) clients
fix gz -> gzip previously missed in the response header
2025-04-02 19:09:22 +03:00
Maxim Prokhorov
e9c4118e65 debug(api): explicit prefix and message lengths
also sometimes missing data checked in modules
2025-04-02 06:09:48 +03:00
Maxim Prokhorov
a7d084206b webui(server): export web & ws settings in the respective module
cors setup does not have to be in ws, move to web setup routine
actually set up ws auth setting, don't just report it in the ui
2025-04-02 05:37:47 +03:00
Maxim Prokhorov
6622c6d3ab webui(server): remove ws & web internal settings references to external modules
- provide 'prepend' option for ws callbacks, in addition to current 'append'
- move unintentional adminpass check under normal callbacks, do not
  break the on_keychecks iteration when adminpass key is present
- move key checks to their respective modules; reference existing key objects
2025-04-02 05:15:19 +03:00
Maxim Prokhorov
1f017adfd0 webui(server): clean-up response headers handling
immediately access the header object instead of check -> access-value
function for generic corb / xss headers for responses
2025-04-02 00:33:18 +03:00
Maxim Prokhorov
a18913358c webui(build): last-modified as .html build value, not .cpp
also convert strings at comptime, ensure strlen never gets called
2025-04-01 03:22:28 +03:00
Maxim Prokhorov
00c3df0954 webui(build): group test & build 2025-04-01 03:00:12 +03:00
Maxim Prokhorov
e890b0be76 webui(build): allow both gzip and br in the builder
- switch to 'br' by default. convert relevant file references in the web.cpp
  .h -> .ipp and drop compression type from the filename
  'webui_content_encoding' string to help out the server
- build options now include both minification and compression type
- make sure output file syntax is valid when opening it standalone
2025-04-01 03:00:08 +03:00
Maxim Prokhorov
078df05d7f webui(build): lint & test imported on-demand
minor speed-up when just building .html & .mjs
2025-03-31 21:01:27 +03:00