96 Commits

Author SHA1 Message Date
TheJltres
438278e859
Remove seed one file 2025-05-03 00:00:40 +02:00
TheJltres
de48478c6d
Remove comand, not needed 2025-05-03 00:00:13 +02:00
TheJltres
6f0e731303
Testing seeders 2025-05-01 22:23:39 +02:00
Bob Farrell
c26d563898 Zig 0.15 compatibility
Various dependencies updated after changes to `std.zig.Ast` and
`std.LinkedList` and other things.
2025-04-09 20:08:38 +01:00
Sean M. Collins
b81c6dfe91 update paths to database template 2025-03-10 21:55:20 -04:00
Sean M. Collins
9e4e8529c5 Create a template file for init
This allows us to use database.zig for CI, while still creating a blank
database.zig for new projects that are created via jetzig init
2025-03-10 21:49:36 -04:00
Bob Farrell
034ecddfa0 JetQuery: groupBy synthetic columns 2025-03-09 11:38:01 +00:00
blurrycat
23d0102ae8 Fix memory leak in CLI 2025-03-06 19:59:51 +01:00
Bob Farrell
7eea1e3f0a Minor CLI improvements
Show some progress "..." when running external commands to give the user
a bit of extra feedback while commands run.
2025-03-02 14:14:42 +00:00
Bob Farrell
9c4b6198cd Use llvm on MacOS
Experimental feature currently only tested with Linux, builds failing
for Mac.
2025-03-02 14:00:18 +00:00
Bob Farrell
06674db51f Use fork of zig-args (temporary)
Revert when [this PR](https://github.com/ikskuh/zig-args/pull/67) is
merged.
2025-03-02 13:12:29 +00:00
Bob Farrell
099a2a5349 Use Zig compiler
Default to not using LLVM for application compilation. This gives more
than 2x performance improvement for compilation stage.
2025-03-01 14:33:17 +00:00
Bob Farrell
fb969d9b81 Update JetQuery
Provides "INSERT ... RETURNING" thanks to @Cohors1316
2025-02-15 18:01:28 +00:00
Bob Farrell
a5430ff380 Zig 0.14 test runner config changes
Update dependencies to match new Zig build config API for test runners,
misc. fixes needed after upgrading dependencies.
2025-02-02 11:31:40 +00:00
bobf
1b5c72b75f
Merge pull request #143 from erg/fix-142-jetzig-init
util.zig: more helpful error message when `zig` is not in path
2025-02-01 11:53:50 +00:00
Bob Farrell
a99999af52 Misc. Zig updates
Changes to latest Zig nightly build required several minor fixes across
multiple dependencies.
2025-01-25 12:22:19 +00:00
Doug Coleman
b5ae4ec181 util.zig: more helpful error message when zig is not in path 2025-01-16 14:55:01 -06:00
Bob Farrell
76f14a89a1 Zig build fixes for latest Zig nightly build 2024-12-22 12:34:11 +00:00
z1fire
be8e517a06 unicode for windows 2024-11-30 16:25:31 -05:00
z1fire
6cabafc63f unicode for windows 2024-11-30 15:31:36 -05:00
z1fire
63cd638149 Merge branch 'wip' of https://github.com/z1fire/jetzig into wip 2024-11-30 15:24:19 -05:00
z1fire
f9d8ef3776 update allow unicode images in windows terminal 2024-11-30 15:13:02 -05:00
Zackary Housend
2f7687a0e5
Merge branch 'jetzig-framework:main' into wip 2024-11-30 14:25:03 -05:00
bobf
7b03850593
Merge pull request #130 from jetzig-framework/per-request-database-connection
Per-request database connection
2024-11-30 12:58:57 +00:00
Bob Farrell
9cf6705c88 Per-request database connection
Use JetQuery's new `Repo.bindConnect()` to get a new Repo bound to a
connection for each request. This significantly simplifies connection
management and offloads all the connection pool
management/reconnecting/etc. to pg.zig where it belongs.

Improve development mode SQL syntax highlighting - highlight `SELECT`,
`UPDATE`, `DELETE`, `INSERT` in different bolded colors for clarity.
2024-11-30 12:48:18 +00:00
z1fire
22badde8c0 Jetzigg init direction update 2024-11-30 07:18:06 -05:00
z1fire
50bcda1cbe Added imports to mailers 2024-11-29 17:55:09 -05:00
Bob Farrell
6075708bf4 JetQuery optionals rework
Optionals now supported as param types.
2024-11-28 22:25:39 +00:00
Bob Farrell
54480a7b39 Update JetQuery 2024-11-27 22:39:02 +00:00
Bob Farrell
e27fc06d8c Update JetQuery 2024-11-27 22:32:40 +00:00
Bob Farrell
c91eda51d3 Schema reflection improvements
Reflect foreign keys, fix pk/fk serial type inference, add missing
numeric types.
2024-11-27 22:15:15 +00:00
Bob Farrell
f44a6b33c5 Routing updates
Implement `/foo/1/edit` route/view.

Allow setting HTTP verb by passing e.g. `/_PATCH` as the last segment of
a URL - this allows browsers to submit a `POST` request with a
pseudo-HTTP verb encoded in the URL which Jetzig can translate, i.e.
allowing forms to submit a `PATCH`.
2024-11-24 20:46:56 +00:00
Bob Farrell
773eb1dc6e Add --debug option to jetzig server
Defaults to true, allow disabling new debug console.
2024-11-23 19:58:52 +00:00
Bob Farrell
1565ae3b73 Debug console
Use `jetzig server` or `zig build -Ddebug_console=true run` to launch a
development server with the debug console enabled.

When an error is encountered a formatted stack trace is dumped to the
browser along with the current response data. Both outputs are
syntax-highlighted using Prism JS.
2024-11-23 18:07:19 +00:00
Bob Farrell
92dce21244 Database CLI improvements
Eradication of `data` arg to requests. We no longer need to pass this
value around as we have a) type inference, b) nested object insertion
via `put` and `append`.

Fix `joinPath` numeric type coercion

Detect empty string params and treat them as blank with expectParams()

Fix error logging/stack trace printing.

Update Zmpl - includes debug tokens + error tracing to source template
in debug builds.
2024-11-19 21:39:01 +00:00
Bob Farrell
78b6938530 Fix custom routes
Fix CLI view generator
2024-11-17 19:32:46 +00:00
Bob Farrell
b95506caf9 Params helpers
Implement `request.expectParams()` to coerce params to a given struct.
`request.paramsInfo()` provides information about each param (present,
blank, failed + original values and errors where applicable).
2024-11-17 19:07:27 +00:00
Bob Farrell
49c5c2db26 Update dependencies
Add assertion to verify compatible jetcommon versions between
dependencies.
2024-11-17 12:34:49 +00:00
Bob Farrell
f3b56e14ea Fix admin database schema detection
Fix missing optional database name type when reading from config
2024-11-17 10:50:03 +00:00
Bob Farrell
e12b69985b Fix database CLI environment variables config
Use the same environment setup as the main Jetzig app when running
database CLI commands.
2024-11-16 17:16:29 +00:00
Bob Farrell
2761d7b132 Update JetQuery - fix default migration 2024-11-16 12:42:41 +00:00
Bob Farrell
5b285df07b Add new to view generator 2024-11-14 21:36:45 +00:00
Bob Farrell
3ca7ade6a6 Update CLI JetQuery version 2024-11-14 20:22:33 +00:00
Bob Farrell
b1dc086afb GH actions fixes
Fix `/.json` root path detection
2024-11-14 18:54:26 +00:00
Bob Farrell
d9b5f7af63 Update JetQuery - fixes bool coercion 2024-11-14 08:50:21 +00:00
Bob Farrell
4330cc93e9 Update JetQuery, improve migration CLI docstring 2024-11-14 08:31:38 +00:00
Bob Farrell
c8ae44b508 Accept password at command line for auth user create
Intended for local development only
2024-11-13 20:35:50 +00:00
Bob Farrell
f9c6f9f38f Fix memory leak in auth CLI command 2024-11-13 20:15:24 +00:00
Bob Farrell
a6d1b92f5e Simplify DevelopmentLogger, add ProductionLogger
Add auth helper to create a user from CLI:

```
jetzig auth user:create user@example.com
```
2024-11-11 22:25:35 +00:00
Bob Farrell
d219a3ce83 Fix environment for bundle command 2024-11-10 22:24:27 +00:00