| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | src/hero.mjs: Make sure globalInceptors are used even when we get a 404 | EuAndreh | 2024-03-08 | 1 | -1/+16 | |
| | | ||||||
| * | src/hero.mjs: Add buildTable() | EuAndreh | 2024-03-08 | 1 | -0/+13 | |
| | | ||||||
| * | src/hero.mjs: server.listen() -> server.start(); server.close() -> server.stop() | EuAndreh | 2024-03-07 | 1 | -4/+4 | |
| | | ||||||
| * | src/hero.mjs: Add makeReopeningPipeReader() | EuAndreh | 2024-03-07 | 1 | -25/+89 | |
| | | | | | | This addresses point nº 2 from commit 40118a188fb05219d1188ff775ce71f66c8cb56a. | |||||
| * | src/hero.mjs: makePipeReader() now returns a function for closing it | EuAndreh | 2024-03-07 | 1 | -4/+0 | |
| | | ||||||
| * | tests/js/hero.mjs: Better names for pipes and sockets created by tests | EuAndreh | 2024-03-07 | 1 | -21/+28 | |
| | | ||||||
| * | src/hero.mjs: Add minimalistic "ping" action for doing smoke tests in production | EuAndreh | 2024-03-06 | 1 | -0/+19 | |
| | | ||||||
| * | src/hero.mjs: Add simplified implementation of `makePipeReader()` | EuAndreh | 2024-03-06 | 1 | -0/+21 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few limitations of the current approach that I didn't figure out how to solve yet: 1. when stopping the server, mainly for shutting down the Node.js process when running the tests, we need to open and close the pipe in write mode at least once, otherwise it hangs forever. After opening and closing it, the "autoClose" functionality of the `fs.createReadStream()` kicks in, and it closes, otherwise the test hangs forever as Node.js still has open handles. That's why the `server.close()` function has a gratuitous call to `fs.createWriteStream(pipe).end()`: so that when stopping the server, the pipe is always closed at least once; 2. when actually running the application, if one tries an IPC command like: $ echo '{ "action": "config-dump" }' > web.pipe It works, but only for the first time. As this shell line opened the pipe, wrote to it and then closed it, the reader that `makePipeReader()` constructed closed, but didn't open it again. So when running the exact same IPC command for a second time, the shell hangs, as there is no process on the other side listening for the command and consuming the pipe. Shortcoming nº 2 is much more important to be solved, as we can live with shortcoming nª 1 for some time. Both are to be fixed in the near future. | |||||
| * | src/hero.mjs: Change server.listen() to receive no arguments | EuAndreh | 2024-03-06 | 1 | -4/+6 | |
| | | ||||||
| * | src/hero.mjs: Add skeleton for makePipeReaderFn() | EuAndreh | 2024-03-06 | 1 | -0/+20 | |
| | | ||||||
| * | src/hero.mjs: Add makeLineEmitter() | EuAndreh | 2024-03-06 | 1 | -0/+81 | |
| | | ||||||
| * | src/utils.mjs: Add first(), rest(), butlast() and last() | EuAndreh | 2024-03-06 | 1 | -0/+78 | |
| | | ||||||
| * | src/hero.mjs: Add rmIf() and mkfifo() | EuAndreh | 2024-03-06 | 2 | -7/+82 | |
| | | ||||||
| * | tests/runner.mjs: Add missing await in t.test("", () => {}) | EuAndreh | 2024-03-06 | 6 | -152/+153 | |
| | | ||||||
| * | src/utils.mjs: s/first/findFirst/g | EuAndreh | 2024-03-06 | 1 | -8/+8 | |
| | | ||||||
| * | src/hero.mjs: Add app name as first argument to buildServer() | EuAndreh | 2024-03-01 | 1 | -3/+3 | |
| | | ||||||
| * | src/hero.mjs: Add actionsFn() and lineHandlerFn() | EuAndreh | 2024-03-01 | 1 | -1/+113 | |
| | | ||||||
| * | Setup user-level lighttpd reverse proxy for development and testing | EuAndreh | 2024-03-01 | 1 | -0/+32 | |
| | | | | | Add static files as in production, too. | |||||
| * | src/api.mjs: Simplify handling of arguments | EuAndreh | 2024-03-01 | 1 | -1/+1 | |
| | | ||||||
| * | src/utils.mjs: Remove eq(), use utils.isDeepStrictEqual from "node:utils" ↵ | EuAndreh | 2024-03-01 | 1 | -81/+0 | |
| | | | | | instead | |||||
| * | src/utils.mjs: Replace promisify() by util.promisify() | EuAndreh | 2024-02-28 | 1 | -33/+0 | |
| | | ||||||
| * | src/utils.mjs: Add undefinedAsNull() | EuAndreh | 2024-02-28 | 1 | -0/+20 | |
| | | ||||||
| * | src/utils.mjs: Define strSortFn() and use it on all files | EuAndreh | 2024-02-28 | 2 | -1/+20 | |
| | | ||||||
| * | tests/runner.mjs: Use process.stderr.write() to avoid printing newlines when ↵ | EuAndreh | 2024-02-28 | 1 | -2/+5 | |
| | | | | | not needed | |||||
| * | tests/runner.mjs: Remove unused `AssertionError` type | EuAndreh | 2024-02-28 | 1 | -2/+0 | |
| | | ||||||
| * | src/hero.mjs: Promote log() to fancy logger object | EuAndreh | 2024-02-25 | 2 | -12/+209 | |
| | | ||||||
| * | Explicit import from "node:process"; move log() to hero.mjs | EuAndreh | 2024-02-25 | 4 | -24/+35 | |
| | | ||||||
| * | Normalize how modules import and name each other | EuAndreh | 2024-02-24 | 8 | -38/+39 | |
| | | | | | | Also add a `defaultInterceptors` variable in `src/hero.mjs` to avoid needing to redefine it in every application. | |||||
| * | src/hero.mjs: Add buildServer() | EuAndreh | 2024-02-23 | 4 | -130/+284 | |
| | | ||||||
| * | Implement accretion.runMigrations() and wrappings of node-sqlite3 | EuAndreh | 2024-02-23 | 3 | -3/+203 | |
| | | ||||||
| * | Big cleanup | EuAndreh | 2024-02-23 | 11 | -166/+1368 | |
| | | | | | | | - delete all SQLite Node-API code: we'll use the C++ one instead; - implement hero.mjs, with tests! - use ESM all over. | |||||
| * | Remove C code and cleanup repository | EuAndreh | 2024-02-21 | 9 | -295/+0 | |
| | | ||||||
| * | tests/js/db.js: Disable test for incomplete code | EuAndreh | 2023-11-27 | 1 | -1/+1 | |
| | | ||||||
| * | tests/runner.js: Replace hand-rolled assert with "node:assert" module | EuAndreh | 2023-11-16 | 2 | -56/+45 | |
| | | ||||||
| * | Add WIP non-async functions to napi-sqlite.c | EuAndreh | 2023-11-16 | 1 | -0/+16 | |
| | | ||||||
| * | Add support for multi-file C project | EuAndreh | 2023-11-15 | 7 | -40/+197 | |
| | | | | | | | - have dynamic discovered dependencies via `mkdeps.hs`, and also move the listing of JavaScript files to it. - copy over stub C files for setting up the project skeleton. | |||||
| * | tests/assert-*.sh: Reuse rebuilt assets for tests | EuAndreh | 2023-11-13 | 3 | -22/+6 | |
| | | ||||||
| * | tests/assert-*.sh: Allow tests to run independently from "all" and from each ↵ | EuAndreh | 2023-11-13 | 4 | -16/+34 | |
| | | | | | other | |||||
| * | tests/assert-uninstall.sh: Split from assert-install.sh | EuAndreh | 2023-11-13 | 2 | -14/+24 | |
| | | ||||||
| * | tests/assert-*.sh: Normalize output using yellow and green colors | EuAndreh | 2023-11-12 | 3 | -10/+15 | |
| | | ||||||
| * | src/{ircd,web}.js: Init stub servers | EuAndreh | 2023-11-11 | 2 | -0/+14 | |
| | | ||||||
| * | tests/js/: Run the files directly | EuAndreh | 2023-11-10 | 2 | -16/+10 | |
| | | | | | | Instead of dynamically `import()`ing them in `tests/runner.js`, make each test file instead load `tests/runner.js` and run its own tests. | |||||
| * | tests/js/utils.js: Remove test on "new Date()" objects | EuAndreh | 2023-11-10 | 1 | -8/+0 | |
| | | ||||||
| * | tests/js/server/web.js: Remove unused file | EuAndreh | 2023-11-10 | 1 | -12/+0 | |
| | | ||||||
| * | tests/js/compat.js: Remove unused file | EuAndreh | 2023-11-10 | 1 | -17/+0 | |
| | | ||||||
| * | tests/assert-*: Use standartized STDERR message format | EuAndreh | 2023-11-10 | 2 | -3/+5 | |
| | | ||||||
| * | tests/assert-clean.sh: Enforce correctness of "make clean" | EuAndreh | 2023-11-10 | 1 | -0/+47 | |
| | | ||||||
| * | tests/assert-install.sh: Fix progress report string | EuAndreh | 2023-11-10 | 1 | -1/+1 | |
| | | ||||||
| * | tests/assert-install.sh: Always to enforce correct installation | EuAndreh | 2023-11-10 | 3 | -34/+44 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also in this change: - now we call ln(1) in the "install" target without using the -r "relative" flag, as it isn't POSIX; - add `+` as a prefix to the "assert-tests" command, so we tell sub-make calls to also run things in parallel. In this case, the "make DESTDIR=... install" calls; - use the implicit `index.js` entrypoint and do away completly with `package.json`; - change from `import` to `require` as Node.js ESM modules don't support `$NODE_PATH`[0]: "NODE_PATH is not part of resolving import specifiers. Please use symlinks if this behavior is desired." 🤦; The parallel sub-make behaviour isn't available in current specification of make (POSIX issue 7) but is included in the upcoming[1] version 8: > If a rule invokes a sub-make either via the MAKE macro or via a > command line that begins with '+', the sub-make is the same > implementation as the make that invoked the sub-make, and the −j > option is passed to the sub-make via the MAKEFLAGS environment > variable with the same maxjobs value and is not overridden by a > maxjobs value from another source (even if it has the same value), the > sub-make shall use the same token pool as its invoking make rather > than create a new token pool. [0]: https://nodejs.org/api/esm.html#no-node_path [1]: https://www.opengroup.org/austin/restricted/202x-d3/202x_d3.pdf | |||||
| * | tests/assert-deps.sh: Enforce Makefile is always up-to-date | EuAndreh | 2023-11-09 | 1 | -0/+33 | |
| | | ||||||
