LeoVasanko
4c0be1bfa7
Forward extra args to create-vue, e.g. for no-interactive use.
2026-09-12 05:15:50 +00:00
LeoVasanko
beca6806ef
Tidy up HTTP client; nowadays we have UTF-8 headers.
2026-09-12 04:56:18 +00:00
LeoVasanko
c25835f467
Rewritten devutil.ProcessGroup with proper handling of subprocess deaths
...
- Terminates instantly when vital process dies (e.g. backend doesn't start)
- Derived of TaskGroup, augmenting its functionality with similar semantics
2026-09-12 04:48:03 +00:00
LeoVasanko
38d5402045
Enable colored access log, tracerite and other software when running under systemd/journald which support colors (journalctl -ocat) and can strip them off (any other output mode). Sets environment FORCE_COLOR to full color if conditions are met. This is intended to affect all other modules and child processes alike (set NO_COLOR or FORCE_COLOR to override).
2026-09-03 17:27:48 +00:00
LeoVasanko
4f09622241
Suppress watchfiles "INFO: 1 change detected" which is useless given we already get a WARNING about which file and Reloading...
2026-09-02 13:56:25 +00:00
LeoVasanko
372d91bf49
Pin fastapi-vue minimum patch version to that of fastapi-vue-setup when ran, to force upgrades.
2026-08-31 21:14:04 +00:00
LeoVasanko
b0b216b784
Run backend as module (python -m) in devserver instead of PATH-installed CLI.
2026-08-31 20:26:30 +00:00
LeoVasanko
475a2cdc3c
Cleaner and non-deprecated typing for template app module. Avoids ruff errors with strict configurations.
2026-08-31 20:14:39 +00:00
LeoVasanko
8774224545
Apply lifespan error logging patch in reload/worker subprocesses too.
2026-08-31 20:04:25 +00:00
LeoVasanko
cb742000a8
Render debug-mode HTTP errors with tracerite, replacing Starlette's formatter.
2026-08-31 20:00:39 +00:00
LeoVasanko
be8dc0c513
Don't clear screen on vite startup as that hides our own startup banner.
2026-08-31 19:53:22 +00:00
LeoVasanko
e4c21109d9
Prettier logging of errors in lifespan startup/shutdown.
2026-08-31 19:23:59 +00:00
LeoVasanko
1287ba4077
Load tracerite for devserver script too.
2026-08-31 19:23:07 +00:00
LeoVasanko
9c51b89226
Make missing frontend files non-fatal: log an error and serve the placeholder page instead of raising during lifespan startup
2026-08-31 18:48:27 +00:00
LeoVasanko
d5e94a2186
Startup box: server.run() prints app name, version and connect URL in a rounded unicode box on stderr. Shared termwidth module for ANSI-aware unicode display width and padding.
2026-08-31 18:22:06 +00:00
LeoVasanko
c65d8eaa12
Target project no longer depends on httpx but depends on ~matching fastapi-vue version. Ruff cleanup.
2026-08-31 17:07:49 +00:00
LeoVasanko
cb0b1f067d
A hack to silence INFO level log chatter from uvicorn, while still doing this via log config.
2026-08-31 16:22:16 +00:00
LeoVasanko
5dbe9a0dcd
Ignore executable flag of the temporary file being used to build devserver script.
2026-08-31 15:52:56 +00:00
LeoVasanko
0bba199376
Implement a pretty logging config by default. Emoji levels. Fixes root logger info being lost and warning+ printing with lastResort without any formatting. Replaces uvicorn's default formatter and log config that the author is not willing to fix (any time soon).
2026-08-31 15:52:23 +00:00
LeoVasanko
4232304a00
Added TraceRite CLI error logging. Simplified logging setup.
2026-08-31 05:34:33 +00:00
LeoVasanko
77a34753d9
Add colored HTTP/WebSocket access logging to fastapi_vue.server.
...
run() gains access_log (default on) and log_config parameters. When
enabled, uvicorn's own access log is disabled (access_log=False) and
replaced by an ASGI middleware (adapted from the uvicorn access-log
branch) that logs colored request lines, WebSocket open/close pairs,
and pre-accept rejections in open format.
log_config dicts (uvicorn's default or user-supplied) are patched
best-effort via a registered patch pipeline in fastapi_vue.logging:
swapping in our AccessFormatter, routing our output to a private
fastapi_vue.access logger (uvicorn gates its protocol-level access
logging on uvicorn.access.hasHandlers(), so that logger must stay
handlerless), and filtering stock WebSocket handshake chatter from
uvicorn.error. Non-dict or structurally unexpected configs pass
through untouched.
The middleware is installed by patching Config.load/load_app, hooked
into AccessFormatter instantiation so reload/worker subprocesses
(which re-apply log_config without re-calling run()) are covered.
2026-08-31 04:16:43 +00:00
LeoVasanko
52ca3f4f49
Update project URLs.
2026-08-31 02:18:08 +00:00
LeoVasanko
ebc13c0ee4
Add ruff ignores for the check phase to avoid useless diagnostics.
2026-08-26 01:07:24 +00:00
LeoVasanko
7a64d8f73b
Disable server: uvicorn header.
2026-08-25 23:42:21 +00:00
LeoVasanko
a5b7d88a89
Fix typo in devserver.py comment
...
'Tell the everyone' -> 'Tell everyone via environment'.
2026-08-25 23:41:46 +00:00
LeoVasanko
03aa31cedb
Implement smarter reload handing on fastapi_vue.server(), simplify __main__, reload the main folder regardless of CWD.
2026-06-29 18:49:18 +00:00
LeoVasanko
ec6a084969
Fix hardcoded project dir in template __main__.py (regression in commit 1b24a7).
2026-06-29 18:18:04 +00:00
LeoVasanko
15a6710c17
[lint] Format template after change.
2026-03-08 17:35:02 +00:00
LeoVasanko
dcaf415032
Fix a typing issue with the fastapi-vue staticfiles module causing problems with SPA mode handler.
2026-03-08 17:30:42 +00:00
LeoVasanko
79316eebd4
Rename build-frontend.py to buildhook.py.
2026-03-08 15:40:49 +00:00
LeoVasanko
682d70cb23
Cleanup for ALL ruff checks, and re-ruff to target project settings when installing templates, avoiding formatting errors after patching.
2026-03-08 15:25:52 +00:00
LeoVasanko
1aaf040db7
Make devserver backend health check endpoint configurable, preserved in upgrades and optional.
2026-03-07 23:55:10 +00:00
LeoVasanko
aac27da67c
Suppress CancelledError along with KeyboardInterrupt as a normal exit from server.run().
2026-02-18 17:50:34 +00:00
LeoVasanko
79e645a263
Add parse_endpoints helper function that handles complicated listen structures alike server.run() already did, returning a simple list of every endpoint.
2026-02-18 17:05:10 +00:00
LeoVasanko
8b8a24a6b2
Determine app module path correctly even when in a submodule. A bit cleaner dev options.
2026-02-11 20:41:36 +00:00
LeoVasanko
cb6017cedf
Find custom CLI main before looking up existing DEFAULT_PORT. Cleaner messages when Vue doesn't need patching.
2026-02-11 20:27:35 +00:00
LeoVasanko
fab4108e92
Cleaner devserver help message.
2026-02-11 20:06:36 +00:00
LeoVasanko
637f737d4c
Restore app module isort by reusing the full format function.
2026-02-11 19:48:45 +00:00
LeoVasanko
0b986717eb
Cleaner message
2026-02-11 18:40:58 +00:00
LeoVasanko
9469d57f90
Better patching with existing custom main modules. Print all .new.py needing migration at the end.
2026-02-11 18:35:28 +00:00
LeoVasanko
1ce0fffe3e
Use dev port as default fallback in vite-plugin-fastapi, instead of default port. No effect on invocations via devserver script.
2026-02-11 18:15:57 +00:00
LeoVasanko
f483cf978c
Ruff format
2026-02-10 20:56:06 +00:00
LeoVasanko
0e12e3a531
Improved error message.
2026-02-10 19:51:05 +00:00
LeoVasanko
67bea9a2a7
Remove unnecessary bool()
2026-02-10 19:46:32 +00:00
LeoVasanko
a05c8236f6
Format Python modules installed with ruff to target project style.
2026-02-10 19:34:35 +00:00
LeoVasanko
fc3d6dc912
README
2026-02-10 19:00:41 +00:00
LeoVasanko
c63a375ab2
Use ## to allow command be pasted as a whole.
2026-02-10 17:14:14 +00:00
LeoVasanko
c98994fd1a
Dry run cleanup, also allow --dry-run.
2026-02-10 17:06:42 +00:00
LeoVasanko
6beaa88418
Improved setup complete message.
2026-02-10 17:00:24 +00:00
LeoVasanko
26a77dcf84
Cleaner messages while running the setup.
2026-02-10 16:39:45 +00:00
LeoVasanko
38c9ffe00b
Add --version, rename --dry-run to just --dry.
2026-02-10 16:29:30 +00:00
LeoVasanko
b87984af9a
Consistent form of CLI arguments.
2026-02-10 16:16:32 +00:00
LeoVasanko
d3b6fccce0
The devserver now takes --listen for vite endpoint rather than a positional argument. Changed FRONTEND_URL to VITE_URL and streamlined terminology elsewhere.
2026-02-10 16:09:07 +00:00
LeoVasanko
d2ee7395c5
health?from=frontend for logs
2026-02-10 16:01:06 +00:00
LeoVasanko
b94608ffe3
Run ruff within local venv (otherwise required system path which did not include the venv with uv tool install).
2026-02-09 16:03:30 +00:00
LeoVasanko
ef6bce8f3f
Use the CLI script rather than python -m for running the main app from devserver.
2026-02-09 15:55:08 +00:00
LeoVasanko
b8bf46132a
Reload arguments passed differently to avoid uvicorn warning in prod mode.
2026-02-06 22:43:00 +00:00
LeoVasanko
ca85c2fcfb
Ruff
2026-02-06 22:37:03 +00:00
LeoVasanko
440808361a
Patch existing projects better.
2026-02-06 20:09:17 +00:00
LeoVasanko
05fd5c562e
Missing import
2026-02-06 19:35:04 +00:00
LeoVasanko
5f0e74713f
Improved dry mode message.
2026-02-06 19:17:06 +00:00
LeoVasanko
2d117a9d5e
Improved messages.
2026-02-06 19:07:50 +00:00
LeoVasanko
4bf102579a
Added automatic handling of FastAPI debug mode. Use templating more completely to enable project name as env prefix etc.
2026-02-06 19:05:36 +00:00
LeoVasanko
fbed7873e5
[fastapi_vue] Further cleanup, wildcards for favicon.
2026-02-06 18:09:22 +00:00
LeoVasanko
008b3593db
[fastapi_vue] StaticFiles cleanup: use app.debug rather than env variables; default assets caching.
2026-02-06 17:21:40 +00:00
LeoVasanko
3820c6f3c1
Fix argument passing to vite under deno.
2026-02-05 20:11:22 +00:00
LeoVasanko
c300a1a291
Simplified uvicorn running in multiprocess mode, avoiding a crash on Windows when it couldn't setup threads (running from a worker thread).
2026-02-02 21:02:34 +00:00
LeoVasanko
bdfaa22b0c
Another file extension showing, swapping to stem for logging.
2026-02-02 20:47:32 +00:00
LeoVasanko
47e5ec279c
Hide tool.CMD .EXE etc. from logs, makes Windows cleaner.
2026-02-02 20:42:18 +00:00
LeoVasanko
093b83737e
Improved status messages, added a note of not installing main CLI entry point.
2026-02-02 20:35:30 +00:00
LeoVasanko
a84041a923
Refactor with new fastapi-vue utility module to run the server, used in CLI main and devserver to run the main app. Default ports made part of templating, so that --ports can be easily specified to fastapi-vue-setup to customize (respects earlier choices when no --ports is specified). New overall default ports 3100, 3200.
2026-02-02 19:56:31 +00:00
LeoVasanko
9a9a00380f
Add a release script to simplify building both.
2026-02-02 19:53:06 +00:00
LeoVasanko
0e4f8f65f2
Moved fastapi-vue project to fastapi-vue-setup repository, using common version numbering (starting with v0.7.0).
2026-02-02 19:51:45 +00:00
LeoVasanko
5391c81e8b
Cleanup fixes, and-- cleanup.
2026-02-02 16:43:39 +00:00
LeoVasanko
c106ce1a44
Add missing files.
2026-02-02 16:27:34 +00:00
LeoVasanko
b7b1920846
Make devserver verify that no servers are already running before starting them.
2026-02-02 16:26:19 +00:00
LeoVasanko
8ccfa1f658
Simplified devserver script, fixed termination on failed npm install.
2026-02-02 15:56:19 +00:00
LeoVasanko
c23401de88
Avoid external venv or of fastapi-vue-setup itself leaking into target project. Cleaner and faster uv processing.
2026-02-02 13:46:34 +00:00
LeoVasanko
c271f66615
Work around some Microsoft idiocy to attain Windows compatibility.
2026-02-02 13:28:36 +00:00
LeoVasanko
458d798022
Refactored scripts to remove any extra code from build-frontend.py and devserver.py (for better user editability). Individual helper functions can still be imported from scripts/fastapi-vue/ for any customization needs. Removed devmode support from CLI entry point simplifying it. Instead running via FastAPI CLI in dev mode (but it is still easy to modify to use a custom CLI entry).
2026-01-30 18:15:52 +00:00
LeoVasanko
f5fcd626e8
Update templates for fastapi_vue 0.5.0 catch-all toggle.
2026-01-25 01:07:56 +00:00
LeoVasanko
1d9ddf7dc5
Update target project python version requirement if needed.
2026-01-24 21:31:07 +00:00
LeoVasanko
b189ae66e7
Smarter .gitignore patching.
2026-01-24 21:16:05 +00:00
LeoVasanko
4156eb2db3
Better handling of upgrades, an option to avoid overwriting main and devserver scripts, writing .new.py instead. Error out on unix socket in devserver.
2026-01-21 21:13:23 +00:00
LeoVasanko
3f6559b2db
Simplify devserver script and remove its duplicated parse_endpoint function.
2026-01-18 01:15:34 +00:00
LeoVasanko
71d4e053a7
Strictly correct indent and formatting on Vue demo patches.
2026-01-17 23:21:01 +00:00
LeoVasanko
2dec331afb
Setup script cleanup. Use discovered app module and var names when creating __main__.py from template. README updates.
2026-01-17 23:04:07 +00:00
LeoVasanko
64f43df3e3
Completely rewritten CLI main, support unix sockets and wildcard bindings.
2026-01-17 22:48:13 +00:00
LeoVasanko
6ccba2be9f
Adjust vite args (cleanup, don't clear screen).
2026-01-17 22:20:27 +00:00
LeoVasanko
2b735528ab
Fix another Deno issue running Vue without typescript.
2026-01-17 22:19:28 +00:00
LeoVasanko
e6170549f0
README
2026-01-17 20:21:31 +00:00
LeoVasanko
a2983a62a0
Simplified templating, backend port config on devserver.py, simplified Vue app patches.
2026-01-17 19:51:47 +00:00
LeoVasanko
d9323f34e1
Silence type warnings for symbols that actually are available at build time.
2026-01-17 17:08:50 +00:00
LeoVasanko
a4379094db
README
2026-01-17 16:42:02 +00:00
LeoVasanko
52ec232ce4
Fix deno npm run-p problem that was preventing TypeScript builds on Deno, by using build-only instead.
2026-01-17 16:40:43 +00:00
LeoVasanko
a6ef9b7c8f
Better handling of dependencies. Display FastAPI status in Vue demo apps.
2026-01-17 03:28:41 +00:00
LeoVasanko
44e06df66c
Initial commit
2026-01-17 01:53:02 +00:00