@restatedev/restate-sdk-core 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,29 +3,13 @@
|
|
|
3
3
|
[](https://discord.gg/skW3AZ6uGd)
|
|
4
4
|
[](https://twitter.com/intent/follow?screen_name=restatedev)
|
|
5
5
|
|
|
6
|
-
# Restate Typescript SDK
|
|
6
|
+
# Restate Typescript SDK - Core
|
|
7
7
|
|
|
8
8
|
[Restate](https://restate.dev/) is a system for easily building resilient applications using *distributed durable async/await*. This repository contains the Restate SDK for writing services in **Node.js / Typescript**.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
as part of long-running processes, or as FaaS (AWS Lambda).
|
|
10
|
+
This package contains the core types used in the several SDK modules.
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
import * as restate from "@restatedev/restate-sdk";
|
|
15
|
-
|
|
16
|
-
const greeter = restate.service({
|
|
17
|
-
name: "greeter",
|
|
18
|
-
handlers: {
|
|
19
|
-
greet: async (ctx: restate.Context, name: string) => {
|
|
20
|
-
return `Hello ${name}!`;
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
restate.endpoint()
|
|
26
|
-
.bind(greeter)
|
|
27
|
-
.listen(9080);
|
|
28
|
-
```
|
|
12
|
+
For the SDK main package, checkout https://www.npmjs.com/package/@restatedev/restate-sdk.
|
|
29
13
|
|
|
30
14
|
## Community
|
|
31
15
|
|
|
@@ -53,11 +37,13 @@ This library follows [Semantic Versioning](https://semver.org/).
|
|
|
53
37
|
|
|
54
38
|
The compatibility with Restate is described in the following table:
|
|
55
39
|
|
|
56
|
-
| Restate Server\sdk-typescript | 1.0
|
|
57
|
-
|
|
58
|
-
| 1.0 | ✅ | ❌ | ❌
|
|
59
|
-
| 1.1 | ✅ <sup>(1)</sup> | ✅ | ❌
|
|
60
|
-
| 1.2 | ✅ | ✅ | ❌
|
|
61
|
-
| 1.3 | ✅ | ✅ | ✅
|
|
40
|
+
| Restate Server\sdk-typescript | 1.0 - 1.3 | 1.4 | 1.5 - 1.6 | 1.7 |
|
|
41
|
+
|-------------------------------|------------------|-----|-----------|------------------|
|
|
42
|
+
| 1.0 | ✅ | ❌ | ❌ | ❌ |
|
|
43
|
+
| 1.1 | ✅ <sup>(1)</sup> | ✅ | ❌ | ❌ |
|
|
44
|
+
| 1.2 | ✅ | ✅ | ❌ | ❌ |
|
|
45
|
+
| 1.3 | ✅ | ✅ | ✅ | ✅ <sup>(2)</sup> |
|
|
46
|
+
| 1.4 | ✅ | ✅ | ✅ | ✅ |
|
|
62
47
|
|
|
63
|
-
<sup>(1)</sup> **Only** when upgrading from 1.0 to 1.1 you MUST rediscover all the existing deployments using `restate dp register <address> --force`. You don't need to update the SDK, nor change the code.
|
|
48
|
+
<sup>(1)</sup> **Only** when upgrading from 1.0 to 1.1 you MUST rediscover all the existing deployments using `restate dp register <address> --force`. You don't need to update the SDK, nor change the code.
|
|
49
|
+
<sup>(2)</sup> **Note** the new `options` in service/object/workflow constructors, together with some of the new options in the `handler`s too, work only from Restate 1.4 onward. Check the in-code documentation for more details.
|