460 Commits

Author SHA1 Message Date
Bob Farrell
ab84e23a8b Update Zmpl - more @for loop fixes 2024-11-08 20:43:40 +00:00
Bob Farrell
b3191060a0 Update Zmpl - improved identifier detection 2024-11-08 19:46:11 +00:00
Bob Farrell
94ce83b425 Update Zmpl - @for fixes and partial arg type coercion 2024-11-08 19:42:39 +00:00
Bob Farrell
3861bd8dea Update Zmpl 2024-11-06 08:53:31 +00:00
Bob Farrell
c7b79f144a Fixes for https://github.com/ziglang/zig/pull/21817 2024-11-06 08:44:07 +00:00
bobf
2d8ca92143
Merge pull request #109 from IbrahimOuhamou/bismi_allah_add_session_remove
add 'session.remove()' for #107 thanks to Allah
2024-11-03 12:24:02 +00:00
IbrahimOuhamou
bd2761b12f added session.remove to demo thanks to Allah 2024-11-03 13:10:47 +01:00
IbrahimOuhamou
d5078cc617 added 'session.save()' inside 'session.remove()' thanks to Allah 2024-11-03 13:08:43 +01:00
IbrahimOuhamou
cea2781391 updated zmpl and added session.remove() thanks to Allah 2024-11-03 11:39:03 +01:00
Bob Farrell
f971f18a60 Global data
Define `pub const Global = SomeType` at top level in `src/main.zig`,
then create a pointer to `SomeType` and pass to `app.start`:

```
app.start(routes, .{ .global = global });
```

Then access in a view as `request.global`.
2024-10-28 09:07:06 +00:00
Bob Farrell
06ee58eb8b Closes #106: Link libc and linked objects to static routes/tests 2024-10-19 11:33:58 +01:00
Bob Farrell
9e4a81aa19 Closes #105: Configure SMTP from environment variables
Fall back to hardcoded values if each `JETZIG_SMTP_*` variable is not
present.
2024-10-17 22:09:04 +01:00
Bob Farrell
bf6c595d64 Zig cache hack
This should solve Zig caching issues but is a temporary fix - instead we
should pass file args to the command which will help Zig to know when to
cache and when to refresh.
2024-10-06 10:53:31 +01:00
bobf
852129384b
Merge pull request #102 from jetzig-framework/http.zig-vuln-patch
Update http.zig
2024-09-27 18:42:03 +01:00
Bob Farrell
9b2d6274ff Update http.zig
Resolves overflow vuln.
2024-09-27 18:27:22 +01:00
Bob Farrell
940bc27a93 Add Zinc to related projects
Good luck, Zinc.
2024-09-15 17:19:52 +01:00
Bob Farrell
dda433bb73 Update Zmpl - adds Data.Object.items() and Data.Array.items()
`Data.Object` now preserves insertion order.
2024-09-07 12:01:40 +01:00
Bob Farrell
bed877b16a Update Zmpl
Misc. improvements to Zmpl from @T-136
2024-09-07 11:01:40 +01:00
Bob Farrell
47f9455060 Update Zmpl
Includes update that allows using arbitrary structs as Data-compatible
values (thanks @T-136 !)
2024-09-02 21:44:03 +01:00
Bob Farrell
a8a552cfa3 More Type fixes 2024-08-31 11:04:33 +01:00
Bob Farrell
af4de258f0 More Type fixes 2024-08-30 19:02:56 +01:00
Bob Farrell
ca049012b6 Update Zmpl - more Type fixes 2024-08-30 19:00:53 +01:00
Bob Farrell
15b0fa1af9 Latest Zig master compatibility 2024-08-30 18:43:12 +01:00
bobf
3c7ca4eacd
Merge pull request #97 from jetzig-framework/httpz-upgrade
Httpz upgrade
2024-08-24 11:18:18 +01:00
Bob Farrell
e98c5ec3df Update http.zig
Refactor routes generation to standalone exe (fixes some build-time vs.
run-time issues).
2024-08-24 11:18:08 +01:00
Bob Farrell
32da79ca21 Fixes #96: Trim module name properly 2024-08-15 18:02:55 +01:00
bobf
f5fb5ba9ea
Merge pull request #95 from karlseguin/smtp_client_update
Update the smtp_client dependency.
2024-08-11 16:31:09 +01:00
Karl Seguin
3f22e03723 Update the smtp_client dependency.
smtp_client was making a wrong local copy of
an internal buffer.

Diff between current version and this updated one.

964152ad4e...48971bc919
2024-08-11 21:14:48 +08:00
Bob Farrell
f0c7475386 Provide default value for Route.formats 2024-08-10 18:39:28 +01:00
bobf
cec907a415
Merge pull request #94 from jetzig-framework/response-format-constraints
Implement response format constraints
2024-08-05 08:57:12 +01:00
Bob Farrell
1406447f24 Implement response format constraints
Define `pub const formats` in a view to specify which formats are
available. Use this to e.g. disable JSON responses.
2024-08-04 16:06:39 +01:00
Bob Farrell
68656fae35 Update zig-args in CLI
Fixes:

```
error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "src/main.zig" }
```
2024-07-02 19:30:03 +01:00
bobf
bed5241316
Merge pull request #90 from jetzig-framework/file-uploads
Implement file upload support
2024-06-19 21:00:09 +01:00
Bob Farrell
9971cde875 Close #89: Implement file upload support
Use `request.file("form-field-name")` to try to find a multipart-encoded
form value for the given name. Returns `jetzig.http.File` if a match is
found which provides `content` (uploaded file content) and `filename`
(filename as passed by browser).
2024-06-19 20:47:05 +01:00
bobf
7805dd3cfa
Merge pull request #88 from drsneed/main
Fix nested paths in public folder on windows
2024-06-12 17:53:42 +01:00
Dustin
33e76d74ad Fix nested paths in public folder on windows 2024-06-11 16:27:24 -06:00
Dustin
6ee43f7c9f Fix nested paths in public folder on windows 2024-06-11 16:08:00 -06:00
Bob Farrell
179b5e77c3 Comment custom route - use as example only 2024-06-09 11:18:14 +01:00
Bob Farrell
3882eba2f3 Clean up static params and init script 2024-06-09 11:13:33 +01:00
bobf
055c018368
Merge pull request #86 from jetzig-framework/embed-static-routes
Embed static routes in compiled exe
2024-06-08 19:44:17 +01:00
Bob Farrell
e30d340a7a Embed static routes in compiled exe
Remove need for static routes output files to be copied/generated in
deployment.
2024-06-08 19:37:41 +01:00
bobf
aafcd4cddc
Merge pull request #85 from jetzig-framework/routes-command
Add `jetzig routes` command
2024-06-05 21:50:55 +01:00
Bob Farrell
2d921a1c27 Add jetzig routes command
Output all current routes. Invokes `zig build jetzig:routes`.
2024-06-05 21:26:23 +01:00
bobf
1fb4509dbb
Merge pull request #84 from rhues/fix-issue-52-windows-colors
Fixed issue 52 by using only native Windows colors.
2024-06-04 18:11:29 +01:00
rhues
cea262e066 Fixed issue 52 by using only native Windows colors on Windows. This should fix log colorization for all Windows terminals. Note: when Zig 0.12 support is no longer needed, a much more elegant solution is possible that allows ANSI colors on Windows. This fix works with Zig 0.12 and up. 2024-06-04 08:17:14 -07:00
Bob Farrell
06e13b3752 Add missing (accidentally .gitignored) templates 2024-06-03 22:15:31 +01:00
Bob Farrell
bdf63673f3 Compile static view content before tests 2024-06-03 22:12:00 +01:00
Bob Farrell
634ce40bb4 Fix GH workflow 2024-06-03 22:00:04 +01:00
bobf
072fc713c0
Merge pull request #83 from jetzig-framework/test-helpers
Test helpers
2024-06-03 21:58:20 +01:00
Bob Farrell
a46bc0ed19 Test helpers
Add `jetzig test` command which runs build step `jetzig:test`.

Add `jetzig.testing` namespace which provides test helpers and a test
app.

Add tests to view generator (i.e. include tests for generated routes).
2024-06-03 21:56:32 +01:00