also bump version to 0.1.2
- add makefile with all commands for rust sdk developers
to run all relevant checks and test,
which also auto formatting of code and toml deps
- fixed broken clippy rules
(this also required fixing some stuff in consts)
Also fixed the docs.rs attributes to ensure _all_
modules and symbols get published in docs,
instead of only those that are available in default features
(which was missing the framework specific stuff in docs)
Only nitpick issue left: in generated code (consts.rs)
some descriptions can contain 'html' code which is not escaped,
pretty certain this html will be rendered in docs.rs
as rust docs renders docs as markdown (which includes html),
but given that's auto generated I have left that for now as-is.
ready for publish
- changelogs per sdk's is not done it seems,
so I did not add that
Once this is merged we should be able to run
> cargo publish
and all should be ok
The current link is a link to a channel in a server which only works if you are already in the discord. This PR Replaces it with the invite link <https://discord.com/invite/bnRNgZjgPh> which I found on the datastar website: <https://data-star.dev/>
The merge fragments call configuration struct had an EventID field and
logic that added it to the SSE call, but no option to configure it.
Added that missing option.
* externalize interface compatibility for two optional template engines
Templ and GoStar are currently module dependencies for Golang SDK. They
should not be required for 1.0 release. This step replaces two component
interfaces with copies that ensure compatibility without having to
include various optional engines as dependencies with each Datastar
deployment.
* update comments and documentation for Golang SDK
Added comments to `execute.go` file. I will make similar changes to
other files. I submit those as a way of getting feedback.
The only public API change is the removal of execute script options
struct. It is changed to private by letter case because the options
pattern is used to configure script execution. The struct serves no
purpose and pollutes the public API.
* add hot reload example to Golang SDK
Updated the Golang SDK README.md file to include a list of examples that
will be expanded in the future. A basic example is moved into its own
directory. A hot reload example is added alongside it.
* expand Golang SDK documentation by adding comments to every method
Added a comment to every public method. Removed inaccessible options
structs from public API by letter case change. Exposed one hidden option
to public API. Refactored fragment merge mode parsing and added a
matching validation test.
* reinstate ValidFragmentMergeTypes because the website documentation depends on it
* externalize interface compatibility for two optional template engines
Templ and GoStar are currently module dependencies for Golang SDK. They
should not be required for 1.0 release. This step replaces two component
interfaces with copies that ensure compatibility without having to
include various optional engines as dependencies with each Datastar
deployment.
* update comments and documentation for Golang SDK
Added comments to `execute.go` file. I will make similar changes to
other files. I submit those as a way of getting feedback.
The only public API change is the removal of execute script options
struct. It is changed to private by letter case because the options
pattern is used to configure script execution. The struct serves no
purpose and pollutes the public API.
* add hot reload example to Golang SDK
Updated the Golang SDK README.md file to include a list of examples that
will be expanded in the future. A basic example is moved into its own
directory. A hot reload example is added alongside it.
* update to go 1.24
* run go mod tidy
* make qtc a go tool
* remove tools installation from dockerfile dev
since it is now taken care of by the go tool command
* update makefile to use go tool task
* externalize interface compatibility for two optional template engines
Templ and GoStar are currently module dependencies for Golang SDK. They
should not be required for 1.0 release. This step replaces two component
interfaces with copies that ensure compatibility without having to
include various optional engines as dependencies with each Datastar
deployment.
* update comments and documentation for Golang SDK
Added comments to `execute.go` file. I will make similar changes to
other files. I submit those as a way of getting feedback.
The only public API change is the removal of execute script options
struct. It is changed to private by letter case because the options
pattern is used to configure script execution. The struct serves no
purpose and pollutes the public API.
* go get go@latest
* go get -tool github.com/go-task/task/v3/cmd/task@latest
* go get -tool github.com/a-h/templ/cmd/templ@latest
* upd task file to use go tool templ
Templ and GoStar are currently module dependencies for Golang SDK. They
should not be required for 1.0 release. This step replaces two component
interfaces with copies that ensure compatibility without having to
include various optional engines as dependencies with each Datastar
deployment.
* add compression
make compression work
update compression logic
* made compression configurable
* allow for compression strategy
cleanup api
---------
Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
* Allow passing arguments to the generator function in fastapi sdk
* Allow passing extra headers in FastAPI streaming response
* Keep method signature of upstream FastAPI streaming response
* Split out python sdk frameworks into their own modules
Make all python sdk frameworks mirror the native way of streaming responses
* Rename the sanic helper in python sdk to match sanic convention.
Add some type hinting to sanic helper
* ruff format new python sdk files
* fix: support connection header over WSGI
Per spec, WSGI doesn't allow the connection header:
https://peps.python.org/pep-0333/#other-http-features
This commit works around that limitation and permits the connection
header over a WSGI connection.
* feat: add WSGI views/urls to Django example
* build(py-sdk): add django/datastar_py/daphne pkgs
Other related changes:
* Added "daphne" to INSTALLED_APPS to provide us with an ASGI runserver.
* Changed a setting to make ASGI the default.
* docs: add a README to the example Django project
The docs explain why Django devs should use ASGI and explain how to use
WSGI if needed.