* 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.
* Feature: gzip
Docs: changelog, removed todos
Feature: locking macro for sse generators.
Feature: flowstorm setup
Refactor: the SSE event writing code is now generic
Chore: bumped http-kit version
Feature: new malli schemas + fixes
Docs: adding the how to load more list items doc
* Fix: forgotten closing call
* Docs: fixed text
* Refactor: using write profiles to configure compression and buffering
Docs: modified the docs to reflect the new write profile mechanism
Refactor: changed the malli schema to go with the write profiles
* Feature: better error handling
* Docs: fixed unbalanced brackets / typos
* Docs: fixed example
* Docs: better write profiles docs
* Refactor: consistent namespaced keyword for all option
`:on-open` and `:on-close` options are deprecated
Docs: all callbacks are documented in docstrings
Calling context, return values and exception behavior are documented
* Refactor: using the new callback name everywhere
* Docs: Readme is redone and more docstrings
* fix(python sdk): fasthtml simple example import from responses
* fasthtml examples: URLs use latest datastar version
Replace versioned CDN URLs with unversioned ones in FastHTML examples to
automatically use the latest Datastar bundle.
* fix(python examples): fasthtml use repo datastar bundles
---------
Co-authored-by: Lucian Knock <git@lucianknock.com>
* ready for pull request
* I had the consts_haskell.qtpl in the wrong place
* made changes requested by Ben
* made changes requested by Ben
* fixed license and version in cabal
* more changes per Ben
* renamed dstar.cabal to datastar.cabal
* Update LICENSE
* Rename LICENSE to LICENSE.md
* Update datastar.cabal
---------
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
* WiP initial setup, ServerSentEventGenerator class
* WiP working merge_fragments in Rails
* #merge_fragments and #merge_signals
* Handle SSE vs Data* options
* Test that #merge_fragments works with a #call(view_context:) interface
* Test Dispatcher#stream
* #remove_fragments
* #remove_signals
* #execute_script
* execute_script with attributes Hash
* Connection: keep-alive
* Use 2 line-breaks as message end, plus last line's 1 line break (3 total)
* Connection callbacks. #on_connect, #on_disconnect, #on_error
* Dispatcher#signals
* Omit retry if using default value (1000)
* Omit defaults
* Multiline scripts
* Test Rack endpoint
* Document test Rack endpoint
* Add missing defaults
* Spawn multiple streams in threads, client_disconnect and server_disconnect handlers
* Move ThreadSpawner to configuration
* Configure a RailsThreadSpawner when Rails detected
* Move Railtie one dir up
* Global error callback
Datastar.config.on_error { |err| Sentry.notify(err) }
* Catch exception from stream threads in main thread
* Linearlize exception handling
* Refactor dispatcher to handle single stream in main thread, multi streams in separate threads
* spawner => executor. Rails Async executor using fibers.
* Support Async for fiber-based concurrency
* Finalize response for Rack and Rails
* test Rack app
* Threaded demo
* Test Dispatcher#sse?
Also do not check for SSE Accept on stream.
Leave it up to the user.
* Do not check Accept header in test app. Test scripts don't send it properly.
* Document code
* Example progress bar Rack app
* README
* Link to D* SSE docs
* See examples
* Document callbacks
* List Ruby SDK in SDKs.md
* Ruby struct in consts.go
* Document running tasks with arguments via Docker
* Code-gen Ruby constants from shared data via template
* Make test rely on constants
* Datastar.from_rack_env(env) => Datastar::Dispatcher
* Ruby example snippets
* #redirect(location)
* Ruby snippet using #redirect(new_path)
* Add X-Accel-Buffering: no header
To disable response buffering by NGinx and other proxies.
* Clarify linearisation of updates in Readme
* Tidy-up progress example
* Move examples to /examples/ruby
* Document Rails and Phlex
* Version 1.0.0.beta.1
* Version 1.0.0.beta.1
* Do not set Connection header if not HTTP/1.1
* Don't touch BUILDING.md docs in this PR
* Remove Changelog for now
* Sort Ruby alphabetically (just "ruby", not the entire line)
* Add hello world example, remove progress bar one.
* Add hello-world example to code-gen
* Typos
* update zig to work on master
* Updated deps, fixed to use tests.zig as root, add datastar as module, refactoring
* Update test_runner.zig. Move tests to root.zig.
* tokamak: use post0 when no body
* Refactor: Ring jetty adapter is now a generic ring adapter
Minor changes:
- Properly eliding SSE retry duration
- Added a small utility in the main api.
- Added a new option to the ->sse-response functions to support
modifying the HTTP response status.
- Fixed typos and errors in the docs.
- using consts version number.
- Prepared tests for rj9a
- Properly killing webrivers when shutting down tests
* Docs: fixing the fixed typo
* sdk/dotnet - more renaming, doco, and code shortening; caching of signals
* sdk/dotnet - added model binding
* sdk/dotnet-model_binding - FromSignals behaves more like other From* attributes
---------
Co-authored-by: Greg Holden <SpiralOSS@users.noreply.github.com>
* Feature: added clojure sdk
Chore: rebasing on latest
(last commit from clojure-sdk d6259824908c)
* Fix: alphabetical order
* Docs: Actual broadcast example
* Test: adding shell test support
Fix: order of options in data-lines for execute scripts events
Fix: fixed signal handling / missing options
Refactor: using the generated constants for boolean options
* Test: passing shell tests
Chore: task build
* rust sdk
* add settle duration an use view transition to `RemoveFragments`
* replace `std::time::Duration` with `core::time::Duration`
* add `settle_duration` and `use_view_transition` setters to `RemoveFragments`
* remove `workspace` from `Cargo.toml`
* update `Cargo.lock`
* align documentation with official documentation
* change description
* use consts
* fix typo in `consts.go`
* code snippets
* add semi colons to bool consts
* fix example
* always include `retry_duration` in event body
* fix typo
* add extra newline to every event
* remove unnecessary `.as_ref()`
* remove `datastar-request: true` validation from `ReadSignals`
* add retry and extra newline to doc tests
* add tests and update package files
* Can .value be removed?
Fixes#428
* get dialog working
* add } to terminators
* Add fujs.svg
* whackamole
* sigh
* recursive regex tag template literals, lol
* Regex example
* (jacks|lack|of|complete|surprise)
* persist fixed
* fix current regex example
* current state
* Update all examples
* regex version of signals, actions and escapement
* Fix Go examples
* fix templates
* Add `@` to actions in examples
* Revert `.Value`
* frontpage
* all test pass
* move to @get/post/put/patch/delete
* Fix up docs and examples
* Add true client size to readme
* Add v1.0.0-beta.1 release notes
* @ → $
* Add space
* Fix more docs and examples
* missed files in merge
---------
Co-authored-by: Ben Croker <ben@putyourlightson.com>
- Rewrite the entire API to leverage JDK 17 features and implement a fluent API design.
- Updated the minimal JDK version requirement to 17.
- Temporarily removed examples as they are not yet aligned with the new API.
BREAKING CHANGE: The API has been completely redesigned and requires JDK 17 or higher.
BREAKING CHANGE: Previous examples and usages are no longer compatible.