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
Maxim Prokhorov
9ccef13050
webui(build): vendor clone-stats & bump deps
2025-03-31 20:54:12 +03:00
Maxim Prokhorov
e4b5dcb232
webui(build): consistent zlib header mtime and os-code
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
5c0c20d046
webui(build): cleanup ci & mention tools in the readme
...
no need to manually invoke things when gulpfile already does it
c/p commands into the readme to handle any other use case
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
181c12d719
webui(build): include vitest runner
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
151b2bcebc
webui(build): clarify gulp commands and tasks tree
2025-03-31 19:55:14 +03:00
Maxim Prokhorov
8c52153c7d
webui(build): generic err cleanup
2025-03-31 19:55:13 +03:00
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