Releases: lxsmnsyc/thaler
Releases · lxsmnsyc/thaler
v0.9.0
v0.8.0
Since seroval now has built-in support for AsyncIterables, and has JSON streaming API, we can now turn all seroval-based server functions to utilize the streaming feature.
Basically, this is now possible:
const example = fn$(async function* foo(items: string[]) {
for (const item of items) {
yield sleep(item, 1000);
}
});
// client code
const iterator = await example(['foo', 'bar', 'baz']);
for await (const value of iterator) {
console.log('Received: ', value);
}
v0.7.0
- Add support for defining custom server functions. The configuration follows the same internal definition for the built-in server functions, and can be defined through the plugin integrations (e.g. Vite). Functions defined in the configuration must call one of the "internally-defined" functions for Thaler to recognize the function call.
// This is based on the unplugin integration
thaler.vite({
functions: [
{
// Name of the function
name: 'server$',
// Boolean check if the function needs to perform
// closure extraction
scoping: false,
// Target identifier (to be compiled)
target: {
// Name of the identifier
name: 'server$',
// Where it is imported
source: 'thaler',
// Kind of import (named or default)
kind: 'named',
},
// Compiled function for the client
client: {
// Compiled function identifier
name: '$$server',
// Where it is imported
source: 'thaler/client',
// Kind of import
kind: 'named',
},
// Compiled function for the server
server: {
// Compiled function identifier
name: '$$server',
// Where it is imported
source: 'thaler/server',
// Kind of import
kind: 'named',
},
}
],
});
v0.6.0
- Add
loader$
andaction$
a84da60 - Change second parameter for functions (except
server$
) to receive an event object with arequest
property instead of therequest
directly fcc39b9- This change also adds support for
response
modification forfn$
andpure$
- This change also adds support for
- Add
retry
tothaler/utils
d33e4b4 - Add
timeout
tothaler/utils
00c9766 - Fix
debounce
race conditions 81af3ff - Drop
origin
config 0d17d50
v0.5.0
v0.4.0
v0.2.0
- Add support for Promise serialization
- Fix closure extraction to support live binding
let
variables captured but was updated after it is captured. Callingfn$
sends the stale closure instead of the updated closure.
Full Changelog: v0.1.3...v0.2.0